Fix erroneous treatment of varargs in models

This commit is contained in:
Owen Mansel-Chan
2021-08-04 14:44:28 +01:00
parent 9533f12e24
commit 5d3f10824e
2 changed files with 44 additions and 9 deletions

View File

@@ -607,7 +607,7 @@ private class ApacheIteratorUtilsModel extends SummaryModelCsv {
"org.apache.commons.collections4;IteratorUtils;true;chainedIterator;(Iterator,Iterator);;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;chainedIterator;(Iterator,Iterator);;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;collatedIterator;(Comparator,Collection);;Element of Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;collatedIterator;(Comparator,Iterator[]);;Element of Argument[1];Element of Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;collatedIterator;(Comparator,Iterator[]);;Element of ArrayElement of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;collatedIterator;(Comparator,Iterator,Iterator);;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;collatedIterator;(Comparator,Iterator,Iterator);;Element of Argument[2];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;filteredIterator;;;Element of Argument[0];Element of ReturnValue;value",
@@ -634,7 +634,7 @@ private class ApacheIteratorUtilsModel extends SummaryModelCsv {
"org.apache.commons.collections4;IteratorUtils;true;unmodifiableListIterator;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;unmodifiableMapIterator;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;unmodifiableMapIterator;;;MapValue of Argument[0];MapValue of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;zippingIterator;(Iterator[]);;Element of Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;zippingIterator;(Iterator[]);;Element of ArrayElement of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;zippingIterator;(Iterator,Iterator);;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;zippingIterator;(Iterator,Iterator);;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections4;IteratorUtils;true;zippingIterator;(Iterator,Iterator,Iterator);;Element of Argument[0];Element of ReturnValue;value",
@@ -651,7 +651,7 @@ private class ApacheIteratorUtilsModel extends SummaryModelCsv {
"org.apache.commons.collections;IteratorUtils;true;chainedIterator;(Iterator,Iterator);;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;chainedIterator;(Iterator,Iterator);;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;collatedIterator;(Comparator,Collection);;Element of Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;collatedIterator;(Comparator,Iterator[]);;Element of Argument[1];Element of Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;collatedIterator;(Comparator,Iterator[]);;Element of ArrayElement of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;collatedIterator;(Comparator,Iterator,Iterator);;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;collatedIterator;(Comparator,Iterator,Iterator);;Element of Argument[2];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;filteredIterator;;;Element of Argument[0];Element of ReturnValue;value",
@@ -678,7 +678,7 @@ private class ApacheIteratorUtilsModel extends SummaryModelCsv {
"org.apache.commons.collections;IteratorUtils;true;unmodifiableListIterator;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;unmodifiableMapIterator;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;unmodifiableMapIterator;;;MapValue of Argument[0];MapValue of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;zippingIterator;(Iterator[]);;Element of Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;zippingIterator;(Iterator[]);;Element of ArrayElement of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;zippingIterator;(Iterator,Iterator);;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;zippingIterator;(Iterator,Iterator);;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections;IteratorUtils;true;zippingIterator;(Iterator,Iterator,Iterator);;Element of Argument[0];Element of ReturnValue;value",
@@ -697,7 +697,7 @@ private class ApacheIterableUtilsModel extends SummaryModelCsv {
[
// Note that when lambdas are supported we should have a model for forEach, forEachButLast, transformedIterable
"org.apache.commons.collections4;IterableUtils;true;boundedIterable;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IterableUtils;true;chainedIterable;(Iterable[]);;Element of Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IterableUtils;true;chainedIterable;(Iterable[]);;Element of ArrayElement of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IterableUtils;true;chainedIterable;(Iterable,Iterable);;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IterableUtils;true;chainedIterable;(Iterable,Iterable);;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections4;IterableUtils;true;chainedIterable;(Iterable,Iterable,Iterable);;Element of Argument[0];Element of ReturnValue;value",
@@ -725,10 +725,10 @@ private class ApacheIterableUtilsModel extends SummaryModelCsv {
"org.apache.commons.collections4;IterableUtils;true;uniqueIterable;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IterableUtils;true;unmodifiableIterable;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IterableUtils;true;zippingIterable;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;IterableUtils;true;zippingIterable;(Iterable,Iterable[]);;Element of Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections4;IterableUtils;true;zippingIterable;(Iterable,Iterable[]);;Element of ArrayElement of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections4;IterableUtils;true;zippingIterable;(Iterable,Iterable);;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;boundedIterable;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;chainedIterable;(Iterable[]);;Element of Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;chainedIterable;(Iterable[]);;Element of ArrayElement of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;chainedIterable;(Iterable,Iterable);;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;chainedIterable;(Iterable,Iterable);;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;chainedIterable;(Iterable,Iterable,Iterable);;Element of Argument[0];Element of ReturnValue;value",
@@ -756,7 +756,7 @@ private class ApacheIterableUtilsModel extends SummaryModelCsv {
"org.apache.commons.collections;IterableUtils;true;uniqueIterable;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;unmodifiableIterable;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;zippingIterable;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;zippingIterable;(Iterable,Iterable[]);;Element of Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;zippingIterable;(Iterable,Iterable[]);;Element of ArrayElement of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections;IterableUtils;true;zippingIterable;(Iterable,Iterable);;Element of Argument[1];Element of ReturnValue;value"
]
}
@@ -858,7 +858,7 @@ private class ApacheSetUtilsModel extends SummaryModelCsv {
"org.apache.commons.collections4;SetUtils;true;difference;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;SetUtils;true;difference;;;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections4;SetUtils;true;emptyIfNull;;;Argument[0];ReturnValue;value",
"org.apache.commons.collections4;SetUtils;true;hashSet;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;SetUtils;true;hashSet;;;ArrayElement of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;SetUtils;true;intersection;;;Element of Argument[0];Element of ReturnValue;value",
"org.apache.commons.collections4;SetUtils;true;intersection;;;Element of Argument[1];Element of ReturnValue;value",
"org.apache.commons.collections4;SetUtils;true;orderedSet;;;Element of Argument[0];Element of ReturnValue;value",

View File

@@ -1863,6 +1863,13 @@ public class Test {
out = IterableUtils.boundedIterable(in, 0L);
sink(getElement(out)); // $ hasValueFlow
}
{
// "org.apache.commons.collections4;IterableUtils;true;chainedIterable;(Iterable[]);;Element of ArrayElement of Argument[0];Element of ReturnValue;value"
Iterable out = null;
Iterable in = newVectorWithElement((String)source());
out = IterableUtils.chainedIterable(in);
sink(getElement(out)); // $ hasValueFlow
}
{
// "org.apache.commons.collections4;IterableUtils;true;chainedIterable;(Iterable,Iterable);;Element of Argument[0];Element of ReturnValue;value"
Iterable out = null;
@@ -2080,6 +2087,13 @@ public class Test {
out = IterableUtils.zippingIterable((Iterable)null, in);
sink(getElement(out)); // $ hasValueFlow
}
{
// "org.apache.commons.collections4;IterableUtils;true;zippingIterable;(Iterable,Iterable[]);;Element of ArrayElement of Argument[1];Element of ReturnValue;value"
Iterable out = null;
Iterable in = newVectorWithElement((String)source());
out = IterableUtils.zippingIterable((Iterable)null, in);
sink(getElement(out)); // $ hasValueFlow
}
{
// "org.apache.commons.collections4;IterableUtils;true;zippingIterable;;;Element of Argument[0];Element of ReturnValue;value"
Iterable out = null;
@@ -2213,6 +2227,13 @@ public class Test {
out = IteratorUtils.collatedIterator((Comparator)null, in);
sink(getElement(out)); // $ hasValueFlow
}
{
// "org.apache.commons.collections4;IteratorUtils;true;collatedIterator;(Comparator,Iterator[]);;Element of ArrayElement of Argument[1];Element of ReturnValue;value"
Iterator out = null;
Iterator in = newListIteratorWithElement((String)source());
out = IteratorUtils.collatedIterator((Comparator)null, in);
sink(getElement(out)); // $ hasValueFlow
}
{
// "org.apache.commons.collections4;IteratorUtils;true;collatedIterator;(Comparator,Iterator,Iterator);;Element of Argument[1];Element of ReturnValue;value"
Iterator out = null;
@@ -2416,6 +2437,13 @@ public class Test {
out = IteratorUtils.unmodifiableMapIterator(in);
sink(getMapValue(out)); // $ hasValueFlow
}
{
// "org.apache.commons.collections4;IteratorUtils;true;zippingIterator;(Iterator[]);;Element of ArrayElement of Argument[0];Element of ReturnValue;value"
ZippingIterator out = null;
Iterator in = newListIteratorWithElement((String)source());
out = IteratorUtils.zippingIterator(in);
sink(getElement(out)); // $ hasValueFlow
}
{
// "org.apache.commons.collections4;IteratorUtils;true;zippingIterator;(Iterator,Iterator);;Element of Argument[0];Element of ReturnValue;value"
ZippingIterator out = null;
@@ -3123,6 +3151,13 @@ public class Test {
out = SetUtils.emptyIfNull(in);
sink(out); // $ hasValueFlow
}
{
// "org.apache.commons.collections4;SetUtils;true;hashSet;;;ArrayElement of Argument[0];Element of ReturnValue;value"
HashSet out = null;
Object in = source();
out = SetUtils.hashSet(in, null);
sink(getElement(out)); // $ hasValueFlow
}
{
// "org.apache.commons.collections4;SetUtils;true;intersection;;;Element of Argument[0];Element of ReturnValue;value"
SetUtils.SetView out = null;