22import java .lang .StringBuilder ;
33
44class A {
5- public static String taint () {
5+ public static String source () {
66 return "tainted" ;
77 }
88
99 public static void test1 () {
10- String bad = taint (); // $ hasTaintFlow
10+ String bad = source (); // $ hasTaintFlow
1111 String good = "hi" ;
1212
1313 bad .formatted (good ); // $ hasTaintFlow
@@ -18,7 +18,7 @@ public static void test1() {
1818 }
1919
2020 public static void test2 () {
21- String bad = taint (); // $ hasTaintFlow
21+ String bad = source (); // $ hasTaintFlow
2222 Formatter f = new Formatter ();
2323
2424 f .toString ();
@@ -27,7 +27,7 @@ public static void test2() {
2727 }
2828
2929 public static void test3 () {
30- String bad = taint (); // $ hasTaintFlow
30+ String bad = source (); // $ hasTaintFlow
3131 StringBuilder sb = new StringBuilder ();
3232 Formatter f = new Formatter (sb );
3333
@@ -37,7 +37,7 @@ public static void test3() {
3737 }
3838
3939 public static void test4 () {
40- String bad = taint (); // $ hasTaintFlow
40+ String bad = source (); // $ hasTaintFlow
4141 StringBuilder sb = new StringBuilder ();
4242
4343 sb .append (bad ); // $ hasTaintFlow
0 commit comments