Skip to content

Commit 57cd4c1

Browse files
author
Stephan Brandauer
committed
Java: format
1 parent 70ec97c commit 57cd4c1

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

java/ql/src/Telemetry/AutomodelApplicationModeExtractCandidates.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ where
7575
|
7676
sinkType, ", "
7777
)
78-
select endpoint.asNode(), message + "\nrelated locations: $@." + "\nmetadata: $@, $@, $@, $@, $@, $@.", //
78+
select endpoint.asNode(),
79+
message + "\nrelated locations: $@." + "\nmetadata: $@, $@, $@, $@, $@, $@.", //
7980
CharacteristicsImpl::getRelatedLocationOrCandidate(endpoint, CallContext()), "CallContext", //
8081
package, "package", //
8182
type, "type", //

java/ql/src/Telemetry/AutomodelApplicationModeExtractNegativeExamples.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ where
6363
characteristic2.hasImplications(positiveType, true, confidence2)
6464
) and
6565
message = characteristic
66-
select endpoint.asNode(), message + "\nrelated locations: $@." + "\nmetadata: $@, $@, $@, $@, $@, $@.", //
66+
select endpoint.asNode(),
67+
message + "\nrelated locations: $@." + "\nmetadata: $@, $@, $@, $@, $@, $@.", //
6768
CharacteristicsImpl::getRelatedLocationOrCandidate(endpoint, CallContext()), "CallContext", //
6869
package, "package", //
6970
type, "type", //

java/ql/src/Telemetry/AutomodelApplicationModeExtractPositiveExamples.ql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ where
2222
not erroneousEndpoints(endpoint, _, _, _, _, false) and
2323
meta.hasMetadata(endpoint, package, type, subtypes, name, signature, input) and
2424
// Extract positive examples of sinks belonging to the existing ATM query configurations.
25-
CharacteristicsImpl::isKnownSink(endpoint, sinkType)
26-
and exists(CharacteristicsImpl::getRelatedLocationOrCandidate(endpoint, CallContext()))
27-
select endpoint.asNode(), sinkType + "\nrelated locations: $@." + "\nmetadata: $@, $@, $@, $@, $@, $@.", //
25+
CharacteristicsImpl::isKnownSink(endpoint, sinkType) and
26+
exists(CharacteristicsImpl::getRelatedLocationOrCandidate(endpoint, CallContext()))
27+
select endpoint.asNode(),
28+
sinkType + "\nrelated locations: $@." + "\nmetadata: $@, $@, $@, $@, $@, $@.", //
2829
CharacteristicsImpl::getRelatedLocationOrCandidate(endpoint, CallContext()), "CallContext", //
2930
package, "package", //
3031
type, "type", //

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public static int compareFiles(File f1, File f2) {
4747
);
4848
}
4949

50-
public static void FilesWalkExample(String username, String sub) throws Exception {
50+
public static void FilesWalkExample(Path p) throws Exception {
5151
Files.walk(
52-
Paths.get("test-dir"),
52+
p, // not a candidate (modeled as a taint step)
5353
FileVisitOption.FOLLOW_LINKS // the implicit varargs array is a candidate
5454
);
5555
}

0 commit comments

Comments
 (0)