Skip to content

Commit 20c9608

Browse files
sapbenbenbenben.sap
andauthored
fix wrong or ambiguity of ground truth (#145)
* fix wrong ground truth * fix ambiguity --------- Co-authored-by: benben.sap <benben.sap@antgroup.com>
1 parent 5dd214f commit 20c9608

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

sast-java/src/main/java/com/sast/astbenchmark/case_language_maturity/accuracy/object_field_sensitive/field_sensitive_one_collection/numeric_index_state_no_solver/QueueWithLambda_002_F.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public Map<String, Object> testcase(@RequestParam String cmd) {
3131
queue.add("cd /");
3232
queue.add("cd ~");
3333
queue.stream().forEach(e -> {
34-
if ("cd /".equals(e)) {
34+
if ("cd /".equals("e")) {
3535
try {
3636
Runtime.getRuntime().exec(e);
3737
} catch (IOException ex) {

sast-java/src/main/java/com/sast/astbenchmark/case_language_maturity/accuracy/path_sensitive/exception_throw/Statement_TryStatement_005_T.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public Map<String, Object> testcase(@PathVariable String cmd) {
2424
Map<String, Object> modelMap = new HashMap<>();
2525
try {
2626
int[] data = new int[10];
27-
cmd = "";
2827
throw new IOException(cmd);
2928
} catch (IndexOutOfBoundsException | IOException ex) {
3029
try {

sast-java/src/main/java/com/sast/astbenchmark/case_language_maturity/completeness/single_app_tracing/variable_scope/static_variable/static_variable_002_F.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.sast.astbenchmark.case_language_maturity.completeness.single_app_tracing.variable_scope.static_variable;
22

33
import com.sast.astbenchmark.common.utils.SinkUtil;
4-
import com.sast.astbenchmark.model.custom.P;
4+
import com.sast.astbenchmark.model.custom.Q;
55
import org.springframework.web.bind.annotation.PostMapping;
66
import org.springframework.web.bind.annotation.RequestMapping;
77
import org.springframework.web.bind.annotation.RequestParam;
@@ -25,7 +25,7 @@ public class static_variable_002_F {
2525
public Map<String, Object> testcase(@RequestParam String cmd) {
2626
Map<String, Object> modelMap = new HashMap<>();
2727
try {
28-
SinkUtil.sink(P.t);
28+
SinkUtil.sink(Q.t);
2929
modelMap.put("status", "success");
3030
} catch (Exception e) {
3131
modelMap.put("status", "error");
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.sast.astbenchmark.model.custom;
2+
3+
public class Q {
4+
public static String t;
5+
6+
private String cmd;
7+
8+
public Q(String cmd) {
9+
this.cmd = cmd;
10+
}
11+
12+
public String getCmd() {
13+
return this.cmd;
14+
}
15+
16+
}

0 commit comments

Comments
 (0)