2
2
import java .lang .StringBuilder ;
3
3
4
4
class A {
5
- public static String taint () {
5
+ public static String source () {
6
6
return "tainted" ;
7
7
}
8
8
9
9
public static void test1 () {
10
- String bad = taint (); // $ hasTaintFlow
10
+ String bad = source (); // $ hasTaintFlow
11
11
String good = "hi" ;
12
12
13
13
bad .formatted (good ); // $ hasTaintFlow
@@ -18,7 +18,7 @@ public static void test1() {
18
18
}
19
19
20
20
public static void test2 () {
21
- String bad = taint (); // $ hasTaintFlow
21
+ String bad = source (); // $ hasTaintFlow
22
22
Formatter f = new Formatter ();
23
23
24
24
f .toString ();
@@ -27,7 +27,7 @@ public static void test2() {
27
27
}
28
28
29
29
public static void test3 () {
30
- String bad = taint (); // $ hasTaintFlow
30
+ String bad = source (); // $ hasTaintFlow
31
31
StringBuilder sb = new StringBuilder ();
32
32
Formatter f = new Formatter (sb );
33
33
@@ -37,7 +37,7 @@ public static void test3() {
37
37
}
38
38
39
39
public static void test4 () {
40
- String bad = taint (); // $ hasTaintFlow
40
+ String bad = source (); // $ hasTaintFlow
41
41
StringBuilder sb = new StringBuilder ();
42
42
43
43
sb .append (bad ); // $ hasTaintFlow
0 commit comments