Java: tests for automodel framework mode positive example extraction

This commit is contained in:
Stephan Brandauer
2023-07-21 16:52:26 +02:00
parent 1bc222ec40
commit abed936556
3 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1 @@
| java/nio/file/Files.java:9:29:9:39 | source | path-injection\nrelated locations: $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@. | java/nio/file/Files.java:9:29:9:39 | source | MethodDoc | java/nio/file/Files.java:9:29:9:39 | source | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://copy:1:1:1:1 | copy | name | file://(Path,OutputStream):1:1:1:1 | (Path,OutputStream) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://source:1:1:1:1 | source | parameterName |

View File

@@ -0,0 +1 @@
Telemetry/AutomodelFrameworkModeExtractPositiveExamples.ql

View File

@@ -0,0 +1,12 @@
package java.nio.file;
import java.nio.file.Path;
import java.io.IOException;
import java.io.OutputStream;
public class Files {
// source is a positive example because there's a model for it
public static void copy(Path source, OutputStream out) throws IOException {
// ...
}
}