[java-inference] Failure contract inference improved

GitOrigin-RevId: 687b4c909c1d2ae67d519ec71899d52fa3e29434
This commit is contained in:
Tagir Valeev
2021-03-11 11:40:45 +07:00
committed by intellij-monorepo-bot
parent 23e19832d4
commit b4c69a9cec
31 changed files with 387 additions and 111 deletions

View File

@@ -1191,11 +1191,13 @@
</item>
<item name='org.apache.commons.collections.CursorableLinkedList.Cursor int nextIndex()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.CursorableLinkedList.Cursor int previousIndex()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -1599,39 +1601,24 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.DoubleOrderedMap void checkKey(java.lang.Object) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.DoubleOrderedMap void checkKeyAndValue(java.lang.Object, java.lang.Object)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;_,null-&gt;fail;null,_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.DoubleOrderedMap void checkKeyAndValue(java.lang.Object, java.lang.Object) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.DoubleOrderedMap void checkKeyAndValue(java.lang.Object, java.lang.Object) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.DoubleOrderedMap void checkNonNullComparable(java.lang.Object, int)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null,_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.DoubleOrderedMap void checkNonNullComparable(java.lang.Object, int) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.DoubleOrderedMap void checkValue(java.lang.Object)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.DoubleOrderedMap void checkValue(java.lang.Object) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.DoubleOrderedMap void copyColor(org.apache.commons.collections.DoubleOrderedMap.Node, org.apache.commons.collections.DoubleOrderedMap.Node, int) 0'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>

View File

@@ -502,39 +502,24 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.bidimap.TreeBidiMap void checkKey(java.lang.Object) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.bidimap.TreeBidiMap void checkKeyAndValue(java.lang.Object, java.lang.Object)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;_,null-&gt;fail;null,_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.bidimap.TreeBidiMap void checkKeyAndValue(java.lang.Object, java.lang.Object) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.bidimap.TreeBidiMap void checkKeyAndValue(java.lang.Object, java.lang.Object) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.bidimap.TreeBidiMap void checkNonNullComparable(java.lang.Object, int)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null,_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.bidimap.TreeBidiMap void checkNonNullComparable(java.lang.Object, int) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.bidimap.TreeBidiMap void checkValue(java.lang.Object)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.bidimap.TreeBidiMap void checkValue(java.lang.Object) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.bidimap.TreeBidiMap void copyColor(org.apache.commons.collections.bidimap.TreeBidiMap.Node, org.apache.commons.collections.bidimap.TreeBidiMap.Node, int) 0'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>

View File

@@ -436,27 +436,18 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.functors.FunctorUtils void validate(org.apache.commons.collections.Closure[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.functors.FunctorUtils void validate(org.apache.commons.collections.Predicate[])'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.functors.FunctorUtils void validate(org.apache.commons.collections.Predicate[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.functors.FunctorUtils void validate(org.apache.commons.collections.Transformer[])'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.functors.FunctorUtils void validate(org.apache.commons.collections.Transformer[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.functors.IdentityPredicate IdentityPredicate(java.lang.Object)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>

View File

@@ -26,21 +26,25 @@
</item>
<item name='org.apache.commons.collections.iterators.AbstractEmptyIterator java.lang.Object getKey()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.iterators.AbstractEmptyIterator java.lang.Object getValue()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.iterators.AbstractEmptyIterator java.lang.Object next()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.iterators.AbstractEmptyIterator java.lang.Object previous()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -64,6 +68,7 @@
</item>
<item name='org.apache.commons.collections.iterators.AbstractEmptyIterator void remove()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -163,6 +168,7 @@
</item>
<item name='org.apache.commons.collections.iterators.ArrayIterator void remove()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -415,6 +421,7 @@
</item>
<item name='org.apache.commons.collections.iterators.FilterListIterator void remove()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -538,6 +545,7 @@
</item>
<item name='org.apache.commons.collections.iterators.ListIteratorWrapper void remove()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -620,6 +628,7 @@
</item>
<item name='org.apache.commons.collections.iterators.ObjectArrayIterator void remove()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>

View File

@@ -390,6 +390,7 @@
</item>
<item name='org.apache.commons.collections.list.FixedSizeList java.lang.Object remove(int)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -432,6 +433,7 @@
</item>
<item name='org.apache.commons.collections.list.FixedSizeList void clear()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -454,6 +456,7 @@
</item>
<item name='org.apache.commons.collections.list.FixedSizeList.FixedSizeListIterator void remove()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>

View File

@@ -909,6 +909,7 @@
</item>
<item name='org.apache.commons.collections.map.FixedSizeMap void clear()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -978,6 +979,7 @@
</item>
<item name='org.apache.commons.collections.map.FixedSizeSortedMap void clear()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -1418,11 +1420,13 @@
</item>
<item name='org.apache.commons.collections.map.LinkedMap.LinkedMapList java.lang.Object remove(int)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.map.LinkedMap.LinkedMapList void clear()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -1774,9 +1778,6 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.map.MultiKeyMap void checkKey(java.lang.Object) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.map.MultiKeyMap void putAll(java.util.Map) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
@@ -2106,6 +2107,7 @@
</item>
<item name='org.apache.commons.collections.map.SingletonMap void clear()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -2135,6 +2137,7 @@
</item>
<item name='org.apache.commons.collections.map.SingletonMap.SingletonMapIterator void remove()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -2166,6 +2169,7 @@
</item>
<item name='org.apache.commons.collections.map.SingletonMap.SingletonValues void clear()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>

View File

@@ -4445,72 +4445,52 @@
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.lang.Object[])'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.lang.Object[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.lang.Object[], java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null,_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.lang.Object[], java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.util.Collection)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.util.Collection) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.util.Collection, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null,_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.util.Collection, java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void notEmpty(java.lang.Object[])'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void notEmpty(java.lang.Object[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void notEmpty(java.lang.Object[], java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null,_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void notEmpty(java.lang.Object[], java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void notEmpty(java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void notEmpty(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void notEmpty(java.lang.String, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null,_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void notEmpty(java.lang.String, java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void notEmpty(java.util.Collection) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
@@ -4529,18 +4509,12 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void notNull(java.lang.Object) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void notNull(java.lang.Object, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null,_-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void notNull(java.lang.Object, java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.WordUtils WordUtils()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>

View File

@@ -1169,6 +1169,7 @@
</item>
<item name='org.apache.commons.lang.text.StrTokenizer void remove()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>

View File

@@ -349,6 +349,7 @@
</item>
<item name='org.apache.commons.lang.time.DateUtils.DateIterator void remove()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>

View File

@@ -535,6 +535,7 @@
</item>
<item name='org.apache.velocity.runtime.directive.Scope void stop()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -571,6 +572,11 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.velocity.runtime.directive.Stop boolean render(org.apache.velocity.context.InternalContextAdapter, java.io.Writer, org.apache.velocity.runtime.parser.node.Node)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;_,_,_-&gt;fail&quot;"/>
</annotation>
</item>
<item name='org.apache.velocity.runtime.directive.Stop boolean render(org.apache.velocity.context.InternalContextAdapter, java.io.Writer, org.apache.velocity.runtime.parser.node.Node) 1'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>

View File

@@ -203,6 +203,7 @@
</item>
<item name='org.apache.velocity.runtime.log.RuntimeLoggerLog boolean getShowStackTraces()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>
@@ -233,6 +234,7 @@
</item>
<item name='org.apache.velocity.runtime.log.RuntimeLoggerLog org.apache.velocity.runtime.log.LogChute getLogChute()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>

View File

@@ -9,6 +9,7 @@
</item>
<item name='org.apache.velocity.util.ArrayIterator void remove()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;-&gt;fail&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>