Commit Graph

26 Commits

Author SHA1 Message Date
Tom Hvitved
7024b07dd2 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 + "\"]"
      )
    }
```
2026-01-26 12:40:15 +01:00
Anders Schack-Mulligen
95afd551ff Java: Fix qltest 2023-06-09 08:37:36 +02:00
Michael Nebel
e86f1e4961 Java: Replace Argument[-1] with Argument[this]. 2023-03-20 10:14:20 +01:00
Michael Nebel
2e46e93f36 Java: Update java models with provenance column information. 2022-06-20 16:20:02 +02:00
Owen Mansel-Chan
e6df8164cf Fix up old tests for new helper functions 2021-09-27 16:24:39 +01:00
Owen Mansel-Chan
cf03bd8bd1 Merge new and old tests
# Conflicts:
#	java/ql/test/library-tests/frameworks/apache-collections/TestNew.java
2021-09-27 16:24:38 +01:00
Owen Mansel-Chan
342c14887b Fix existing models for MapUtils 2021-09-27 16:24:37 +01:00
Owen Mansel-Chan
e1101e582e Minor improvement to existing tests 2021-09-27 16:24:37 +01:00
Owen Mansel-Chan
b23fabe8cb Fix errors from previous PR 2021-08-16 16:11:17 +01:00
Owen Mansel-Chan
fe477ff989 Fix more models based on review comments 2021-08-12 14:51:37 +01:00
Owen Mansel-Chan
2000985509 Remove duplicate test 2021-08-10 11:58:28 +01:00
Owen Mansel-Chan
a55a32f50a Add more missing models
And corresponding tests
2021-08-10 11:35:20 +01:00
Owen Mansel-Chan
54fdfe3906 Make helper functions more consistent 2021-08-09 17:18:03 +01:00
Owen Mansel-Chan
2d31bb8d64 Remove toString taint propagation
We do not do this for other overrides of toString
2021-08-09 17:18:02 +01:00
Owen Mansel-Chan
1997dfbb4a Remove unnecessary casts 2021-08-08 14:03:57 +01:00
Owen Mansel-Chan
f94e467076 Fixes to models and tests
Running the test generator script again showed many missing tests.
2021-08-08 14:03:48 +01:00
Owen Mansel-Chan
377403d525 Remove redundant models and corresponding test
Iterator.next is already modelled
2021-08-08 13:57:51 +01:00
Owen Mansel-Chan
5d3f10824e Fix erroneous treatment of varargs in models 2021-08-08 13:57:50 +01:00
Owen Mansel-Chan
2ba41df2ba Remove commented line 2021-08-06 07:06:36 +01:00
Owen Mansel-Chan
d1a440a45a Improve helper functions for Put 2021-08-06 07:06:35 +01:00
Owen Mansel-Chan
2e04319d9f Manually improve tests 2021-08-04 14:27:01 +01:00
Owen Mansel-Chan
a538699a0a Add automatically generated tests 2021-08-04 14:27:00 +01:00
Owen Mansel-Chan
044ecc51e5 Manually improve tests #2 2021-06-25 13:51:18 +01:00
Owen Mansel-Chan
2fd4c9f1b9 Manually improve tests 2021-06-25 11:17:11 +01:00
Owen Mansel-Chan
7004c87ec0 Manually edit tests so they pass 2021-06-25 11:17:05 +01:00
Owen Mansel-Chan
4388f19ddf Add automatically-generated tests 2021-06-25 11:17:04 +01:00