Skip to content

Commit c78c031

Browse files
committed
Java: tests for automodel application mode negative example extraction
1 parent e2e7220 commit c78c031

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| Test.java:7:10:7:19 | ByteBuffer | class qualifier\nrelated locations: $@.\nmetadata: $@, $@, $@, $@, $@, $@. | Test.java:7:10:8: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[this]:1:1:1:1 | Argument[this] | input |
2+
| Test.java:8:15:8:18 | size | external\nrelated locations: $@.\nmetadata: $@, $@, $@, $@, $@, $@. | Test.java:7:10:8: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 |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Telemetry/AutomodelApplicationModeExtractNegativeExamples.ql
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.github.codeql.test;
2+
3+
import java.nio.ByteBuffer;
4+
5+
class AutomodelApplicationModeExtractNegativeExamples {
6+
public static ByteBuffer getBuffer(int size) {
7+
return ByteBuffer // negative example, modeled as a neutral model
8+
.allocate(size); // negative example, modeled as a neutral model
9+
}
10+
}

0 commit comments

Comments
 (0)