mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Java: Adapt to changes in FlowSummaryImpl
Missing manual models were added using the following code added to `FlowSummaryImpl.qll`:
```ql
private predicate testsummaryElement(
Input::SummarizedCallableBase c, string namespace, string type, boolean subtypes, string name,
string signature, string ext, string originalInput, string originalOutput, string kind,
string provenance, string model, boolean isExact
) {
exists(string input, string output, Callable baseCallable |
summaryModel(namespace, type, subtypes, name, signature, ext, originalInput, originalOutput,
kind, provenance, model) and
baseCallable = interpretElement(namespace, type, subtypes, name, signature, ext, isExact) and
(
c.asCallable() = baseCallable and input = originalInput and output = originalOutput
or
correspondingKotlinParameterDefaultsArgSpec(baseCallable, c.asCallable(), originalInput,
input) and
correspondingKotlinParameterDefaultsArgSpec(baseCallable, c.asCallable(), originalOutput,
output)
)
)
}
private predicate testsummaryElement2(
string namespace, string type, boolean subtypes, string name, string signature, string ext,
string originalInput, string originalOutput, string kind, string provenance, string model,
string namespace2, string type2
) {
exists(Input::SummarizedCallableBase c |
testsummaryElement(c, namespace2, type2, _, _, _, ext, originalInput, originalOutput, kind,
provenance, model, false) and
testsummaryElement(c, namespace, type, subtypes, name, _, _, _, _, _, provenance, _, true) and
signature = paramsString(c.asCallable()) and
not testsummaryElement(c, _, _, _, _, _, _, originalInput, originalOutput, kind, provenance,
_, true)
)
}
private string getAMissingManualModel(string namespace2, string type2) {
exists(
string namespace, string type, boolean subtypes, string name, string signature, string ext,
string originalInput, string originalOutput, string kind, string provenance, string model
|
testsummaryElement2(namespace, type, subtypes, name, signature, ext, originalInput,
originalOutput, kind, provenance, model, namespace2, type2) and
result =
"- [\"" + namespace + "\", \"" + type + "\", True, \"" + name + "\", \"" + signature +
"\", \"\", \"" + originalInput + "\", \"" + originalOutput + "\", \"" + kind + "\", \"" +
provenance + "\"]"
)
}
```
This commit is contained in:
@@ -53,9 +53,7 @@ edges
|
||||
| FunctionalTest.java:42:22:42:22 | v : String | FunctionalTest.java:43:18:43:18 | v | provenance | |
|
||||
| FunctionalTest.java:45:9:48:22 | or(...) : Optional [<element>] : String | FunctionalTest.java:48:34:48:34 | v : String | provenance | MaD:6 |
|
||||
| FunctionalTest.java:48:15:48:21 | ...->... : new Supplier<Optional<? extends String>>(...) { ... } [Optional<String> o, <element>] : String | FunctionalTest.java:45:9:48:22 | or(...) : Optional [<element>] : String | provenance | MaD:11 |
|
||||
| FunctionalTest.java:48:15:48:21 | ...->... : new Supplier<Optional<? extends String>>(...) { ... } [Optional<String> o, <element>] : String | FunctionalTest.java:45:9:48:22 | or(...) : Optional [<element>] : String | provenance | heuristic-callback |
|
||||
| FunctionalTest.java:48:15:48:21 | ...->... : new Supplier<Optional<? extends String>>(...) { ... } [Optional<String> o, <element>] : String | FunctionalTest.java:48:15:48:21 | parameter this : new Supplier<Optional<? extends String>>(...) { ... } [Optional<String> o, <element>] : String | provenance | MaD:11 |
|
||||
| FunctionalTest.java:48:15:48:21 | ...->... : new Supplier<Optional<? extends String>>(...) { ... } [Optional<String> o, <element>] : String | FunctionalTest.java:48:15:48:21 | parameter this : new Supplier<Optional<? extends String>>(...) { ... } [Optional<String> o, <element>] : String | provenance | heuristic-callback |
|
||||
| FunctionalTest.java:48:15:48:21 | Optional<String> o : Optional [<element>] : String | FunctionalTest.java:48:15:48:21 | ...->... : new Supplier<Optional<? extends String>>(...) { ... } [Optional<String> o, <element>] : String | provenance | |
|
||||
| FunctionalTest.java:48:15:48:21 | parameter this : new Supplier<Optional<? extends String>>(...) { ... } [Optional<String> o, <element>] : String | FunctionalTest.java:48:21:48:21 | this : new Supplier<Optional<? extends String>>(...) { ... } [Optional<String> o, <element>] : String | provenance | |
|
||||
| FunctionalTest.java:48:21:48:21 | this : new Supplier<Optional<? extends String>>(...) { ... } [Optional<String> o, <element>] : String | FunctionalTest.java:48:21:48:21 | o : Optional [<element>] : String | provenance | |
|
||||
|
||||
Reference in New Issue
Block a user