Add tests for and slightly expand models of Commons Lang's ArrayUtils class

This commit is contained in:
Chris Smowton
2021-03-10 11:51:59 +00:00
parent bc9682c22d
commit 7fb5bd0cab
3 changed files with 1470 additions and 4 deletions

View File

@@ -49,19 +49,27 @@ private class ApacheLangArrayUtilsTaintPreservingMethod extends TaintPreservingC
src = [0 .. getNumberOfParameters() - 1]
or
this.hasName([
"clone", "nullToEmpty", "remove", "removeAll", "removeElement", "removeElements", "reverse",
"shift", "shuffle", "subarray", "swap", "toArray", "toMap", "toObject", "toPrimitive",
"toString", "toStringArray"
"clone", "nullToEmpty", "remove", "removeAll", "removeElement", "removeElements",
"subarray", "toArray", "toMap", "toObject", "removeAllOccurences", "removeAllOccurrences"
]) and
src = 0
or
this.hasName("toPrimitive") and
src = [0, 1]
or
this.hasName("add") and
this.getNumberOfParameters() = 2 and
src = [0, 1]
or
this.hasName("add") and
this.hasName(["add"]) and
this.getNumberOfParameters() = 3 and
src = [0, 2]
or
this.hasName("insert") and
src = [1, 2]
or
this.hasName("get") and
src = [0, 2]
}
}