mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
Java: tests for automodel application mode negative example extraction
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
| 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 |
|
||||
| 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 |
|
||||
@@ -0,0 +1 @@
|
||||
Telemetry/AutomodelApplicationModeExtractNegativeExamples.ql
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.github.codeql.test;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
class AutomodelApplicationModeExtractNegativeExamples {
|
||||
public static ByteBuffer getBuffer(int size) {
|
||||
return ByteBuffer // negative example, modeled as a neutral model
|
||||
.allocate(size); // negative example, modeled as a neutral model
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user