Skip to content

Commit f5c4155

Browse files
committed
Java: Automodel tests: update after merging #13818
1 parent 44b8ec6 commit f5c4155

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
| Test.java:40:14:40:21 | openPath | taint step\nrelated locations: $@.\nmetadata: $@, $@, $@, $@, $@, $@. | Test.java:40:4:40:22 | get(...) | CallContext | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Paths:1:1:1:1 | Paths | type | file://false:1:1:1:1 | false | subtypes | file://get:1:1:1:1 | get | name | file://(String,String[]):1:1:1:1 | (String,String[]) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input |
2-
| Test.java:46:15:46:18 | size | known non-sink\nrelated locations: $@.\nmetadata: $@, $@, $@, $@, $@, $@. | Test.java:45:10:46:19 | allocate(...) | CallContext | file://java.nio:1:1:1:1 | java.nio | package | file://ByteBuffer:1:1:1:1 | ByteBuffer | type | file://false:1:1:1:1 | false | subtypes | file://allocate:1:1:1:1 | allocate | name | file://(int):1:1:1:1 | (int) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input |
3-
| Test.java:46:15:46:18 | size | known sanitizer\nrelated locations: $@.\nmetadata: $@, $@, $@, $@, $@, $@. | Test.java:45:10:46:19 | allocate(...) | CallContext | file://java.nio:1:1:1:1 | java.nio | package | file://ByteBuffer:1:1:1:1 | ByteBuffer | type | file://false:1:1:1:1 | false | subtypes | file://allocate:1:1:1:1 | allocate | name | file://(int):1:1:1:1 | (int) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input |
2+
| Test.java:46:4:46:5 | f2 | known non-sink\nrelated locations: $@.\nmetadata: $@, $@, $@, $@, $@, $@. | Test.java:45:10:47:3 | compareTo(...) | CallContext | file://java.io:1:1:1:1 | java.io | package | file://File:1:1:1:1 | File | type | file://true:1:1:1:1 | true | subtypes | file://compareTo:1:1:1:1 | compareTo | name | file://(File):1:1:1:1 | (File) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input |

java/ql/test/query-tests/Telemetry/AutomodelApplicationModeExtraction/Test.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import java.nio.file.Paths;
88
import java.util.concurrent.atomic.AtomicReference;
99
import java.util.function.Supplier;
10-
import java.nio.ByteBuffer;
10+
import java.io.File;
1111

1212

1313
class Test {
@@ -41,9 +41,10 @@ public static InputStream getInputStream(String openPath) throws Exception {
4141
);
4242
}
4343

44-
public static ByteBuffer getBuffer(int size) {
45-
return ByteBuffer // negative example, modeled as a neutral model
46-
.allocate(size); // negative example, modeled as a neutral model
44+
public static int compareFiles(File f1, File f2) {
45+
return f1.compareTo(
46+
f2 // negative example (modeled as not a sink)
47+
);
4748
}
4849
}
4950

0 commit comments

Comments
 (0)