From fd29aff3a78320a6651c93a3843ffc171c7c51a6 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Thu, 4 Oct 2018 07:49:47 -0700 Subject: [PATCH] [infer] remove the special case to always create summaries for the Java methods Reviewed By: ngorogiannis Differential Revision: D10188301 fbshipit-source-id: 2f5c33454 --- infer/src/backend/ondemand.ml | 40 ++++++-------- infer/tests/build_systems/ant/issues.exp | 24 ++++----- .../tests/codetoanalyze/java/infer/issues.exp | 54 +++++++++---------- .../codetoanalyze/java/tracing/issues.exp | 12 ++--- 4 files changed, 61 insertions(+), 69 deletions(-) diff --git a/infer/src/backend/ondemand.ml b/infer/src/backend/ondemand.ml index c1ae47ad6..f34256af9 100644 --- a/infer/src/backend/ondemand.ml +++ b/infer/src/backend/ondemand.ml @@ -44,26 +44,19 @@ let is_active, add_active, remove_active = (is_active, add_active, remove_active) -let should_create_summary proc_name proc_attributes = - match proc_name with - | Typ.Procname.Java _ -> - true - | _ -> - proc_attributes.ProcAttributes.is_defined - - -let should_be_analyzed proc_name proc_attributes = - let already_analyzed proc_name = - match Summary.get proc_name with - | Some summary -> - Summary.(Status.is_analyzed (get_status summary)) - | None -> - false - in - should_create_summary proc_name proc_attributes - && (not (is_active proc_name)) - && (* avoid infinite loops *) - not (already_analyzed proc_name) +let already_analyzed proc_name = + match Summary.get proc_name with + | Some summary -> + Summary.(Status.is_analyzed (get_status summary)) + | None -> + false + + +let should_be_analyzed proc_attributes = + proc_attributes.ProcAttributes.is_defined + && + let proc_name = proc_attributes.ProcAttributes.proc_name in + (not (is_active proc_name)) (* avoid infinite loops *) && not (already_analyzed proc_name) let procedure_should_be_analyzed proc_name = @@ -71,9 +64,9 @@ let procedure_should_be_analyzed proc_name = | Some proc_attributes when Config.reactive_capture && not proc_attributes.is_defined -> (* try to capture procedure first *) let defined_proc_attributes = OndemandCapture.try_capture proc_attributes in - Option.value_map ~f:(should_be_analyzed proc_name) ~default:false defined_proc_attributes + Option.value_map ~f:should_be_analyzed ~default:false defined_proc_attributes | Some proc_attributes -> - should_be_analyzed proc_name proc_attributes + should_be_analyzed proc_attributes | None -> false @@ -234,8 +227,7 @@ let analyze_proc_desc ~caller_pdesc callee_pdesc = try Typ.Procname.Hash.find cache callee_pname with Caml.Not_found -> let summary_option = let proc_attributes = Procdesc.get_attributes callee_pdesc in - if should_be_analyzed callee_pname proc_attributes then - analyze_proc ~caller_pdesc callee_pdesc + if should_be_analyzed proc_attributes then analyze_proc ~caller_pdesc callee_pdesc else Summary.get callee_pname in Typ.Procname.Hash.add cache callee_pname summary_option ; diff --git a/infer/tests/build_systems/ant/issues.exp b/infer/tests/build_systems/ant/issues.exp index edcf8f791..ee4b138af 100644 --- a/infer/tests/build_systems/ant/issues.exp +++ b/infer/tests/build_systems/ant/issues.exp @@ -1,15 +1,15 @@ -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadInCalleeMayCauseFalseNegative():void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure fieldReadInCalleeMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadInCalleeWithAngelicObjFieldMayCauseFalseNegative():void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure fieldReadInCalleeWithAngelicObjFieldMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.skipFunctionInLoopMayCauseFalseNegative():void, 5, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure skipFunctionInLoopMayCauseFalseNegative(),Taking true branch,Skipping externalFunc(): method has no implementation,Definition of externalFunc(),Taking false branch] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadInCalleeMayCauseFalseNegative():void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure fieldReadInCalleeMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadInCalleeWithAngelicObjFieldMayCauseFalseNegative():void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure fieldReadInCalleeWithAngelicObjFieldMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.skipFunctionInLoopMayCauseFalseNegative():void, 5, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure skipFunctionInLoopMayCauseFalseNegative(),Taking true branch,Skipping externalFunc(): unknown method,Definition of externalFunc(),Taking false branch] codetoanalyze/java/infer/AutoGenerated.java, codetoanalyze.java.infer.AutoGenerated.npe():void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure npe()] codetoanalyze/java/infer/Builtins.java, codetoanalyze.java.infer.Builtins.doNotBlockError(java.lang.Object):void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure doNotBlockError(...),Taking true branch] -codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.failToCloseWithCloseQuietly():void, 5, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure failToCloseWithCloseQuietly(),start of procedure SomeResource(),return from a call to SomeResource.(),start of procedure doSomething(),Skipping star(): method has no implementation,Definition of star(),Taking true branch,start of procedure LocalException(),return from a call to LocalException.(),exception codetoanalyze.java.infer.LocalException,return from a call to void SomeResource.doSomething()] +codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.failToCloseWithCloseQuietly():void, 5, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure failToCloseWithCloseQuietly(),start of procedure SomeResource(),return from a call to SomeResource.(),start of procedure doSomething(),Skipping star(): unknown method,Definition of star(),Taking true branch,start of procedure LocalException(),return from a call to LocalException.(),exception codetoanalyze.java.infer.LocalException,return from a call to void SomeResource.doSomething()] codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.leakFoundWhenIndirectlyImplementingCloseable():void, 1, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure leakFoundWhenIndirectlyImplementingCloseable(),start of procedure CloseableAsResourceExample$MyResource(...),return from a call to CloseableAsResourceExample$MyResource.(CloseableAsResourceExample)] codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.notClosingCloseable():void, 1, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure notClosingCloseable(),start of procedure SomeResource(),return from a call to SomeResource.()] codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.notClosingWrapper():void, 2, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure notClosingWrapper(),start of procedure Resource(),return from a call to Resource.(),start of procedure Sub(...),start of procedure Wrapper(...),return from a call to Wrapper.(Resource),return from a call to Sub.(Resource),start of procedure close(),return from a call to void Resource.close()] -codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.skippedVritualCallDoesNotCloseResourceOnReceiver():void, 2, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure skippedVritualCallDoesNotCloseResourceOnReceiver(),start of procedure SomeResource(),return from a call to SomeResource.(),Skipping foo(...): method has no implementation,Definition of foo(...)] +codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.skippedVritualCallDoesNotCloseResourceOnReceiver():void, 2, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure skippedVritualCallDoesNotCloseResourceOnReceiver(),start of procedure SomeResource(),return from a call to SomeResource.(),Skipping foo(...): unknown method,Definition of foo(...)] codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.sourceOfNullWithResourceLeak():codetoanalyze.java.infer.T, 1, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure sourceOfNullWithResourceLeak(),start of procedure SomeResource(),return from a call to SomeResource.()] -codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.withException():void, 4, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure withException(),start of procedure SomeResource(),return from a call to SomeResource.(),start of procedure doSomething(),Skipping star(): method has no implementation,Definition of star(),Taking true branch,start of procedure LocalException(),return from a call to LocalException.(),exception codetoanalyze.java.infer.LocalException,return from a call to void SomeResource.doSomething()] +codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.withException():void, 4, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure withException(),start of procedure SomeResource(),return from a call to SomeResource.(),start of procedure doSomething(),Skipping star(): unknown method,Definition of star(),Taking true branch,start of procedure LocalException(),return from a call to LocalException.(),exception codetoanalyze.java.infer.LocalException,return from a call to void SomeResource.doSomething()] codetoanalyze/java/infer/CursorLeaks.java, codetoanalyze.java.infer.CursorLeaks.completeDownloadNotClosed(android.app.DownloadManager):int, 8, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure completeDownloadNotClosed(...),Taking false branch,Skipping getColumnIndex(...): unknown method] codetoanalyze/java/infer/CursorLeaks.java, codetoanalyze.java.infer.CursorLeaks.cursorClosedCheckNullCheckClosed_FP(android.database.sqlite.SQLiteDatabase):java.lang.Object, 11, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure cursorClosedCheckNullCheckClosed_FP(...),Taking false branch,Skipping getString(...): unknown method,Taking true branch,Taking false branch] codetoanalyze/java/infer/CursorLeaks.java, codetoanalyze.java.infer.CursorLeaks.cursorNotClosed(android.database.sqlite.SQLiteDatabase):int, 2, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure cursorNotClosed(...),Skipping getCount(): unknown method] @@ -104,19 +104,19 @@ codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.Nu codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions$E.dereferenceNullableInterfaceFieldBad():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure dereferenceNullableInterfaceFieldBad()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.NPEvalueOfFromHashmapBad(java.util.HashMap,int):int, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure NPEvalueOfFromHashmapBad(...)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.addNullToImmutableListBuilderBad():void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure addNullToImmutableListBuilderBad(),Skipping builder(): unknown method,start of procedure getObject(),return from a call to Object NullPointerExceptions.getObject()] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.badCheckShouldCauseNPE():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure badCheckShouldCauseNPE(),start of procedure getBool(),Skipping test(): method has no implementation,Definition of test(),Taking true branch,return from a call to Boolean NullPointerExceptions.getBool(),Taking true branch,start of procedure getObj(),Skipping test(): method has no implementation,Definition of test(),Taking false branch,return from a call to Object NullPointerExceptions.getObj()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.badCheckShouldCauseNPE():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure badCheckShouldCauseNPE(),start of procedure getBool(),Skipping test(): unknown method,Definition of test(),Taking true branch,return from a call to Boolean NullPointerExceptions.getBool(),Taking true branch,start of procedure getObj(),Skipping test(): unknown method,Definition of test(),Taking false branch,return from a call to Object NullPointerExceptions.getObj()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.cursorFromContentResolverNPE(java.lang.String):void, 5, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure cursorFromContentResolverNPE(...)] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.deferenceNullableMethodCallingSkippedMethodBad():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure deferenceNullableMethodCallingSkippedMethodBad(),start of procedure wrapUnknownFuncWithNullable(),Skipping unknownFunc(): method has no implementation,Definition of unknownFunc(),return from a call to Object NullPointerExceptions.wrapUnknownFuncWithNullable()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.deferenceNullableMethodCallingSkippedMethodBad():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure deferenceNullableMethodCallingSkippedMethodBad(),start of procedure wrapUnknownFuncWithNullable(),Skipping unknownFunc(): unknown method,Definition of unknownFunc(),return from a call to Object NullPointerExceptions.wrapUnknownFuncWithNullable()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNull():void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefNull(),start of procedure derefUndefinedCallee(),start of procedure retUndefined(),return from a call to Object NullPointerExceptions.retUndefined(),Skipping toString(): unknown method,return from a call to Object NullPointerExceptions.derefUndefinedCallee()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNullableGetter():void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefNullableGetter(),start of procedure nullableGetter(),return from a call to Object NullPointerExceptions.nullableGetter()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNullableRet(boolean):void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefNullableRet(...),start of procedure nullableRet(...),Taking true branch,return from a call to Object NullPointerExceptions.nullableRet(boolean)] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRet():void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefUndefNullableRet(),Skipping undefNullableRet(): method has no implementation,Definition of undefNullableRet()] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRetWrapper():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),Skipping undefNullableRet(): method has no implementation,Definition of undefNullableRet(),return from a call to Object NullPointerExceptions.undefNullableWrapper()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRet():void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefUndefNullableRet(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRetWrapper():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet(),return from a call to Object NullPointerExceptions.undefNullableWrapper()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterLoopOnList(codetoanalyze.java.infer.NullPointerExceptions$L):void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure dereferenceAfterLoopOnList(...),start of procedure returnsNullAfterLoopOnList(...),Taking true branch,Taking true branch,Taking false branch,return from a call to Object NullPointerExceptions.returnsNullAfterLoopOnList(NullPointerExceptions$L)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterUnlock1(java.util.concurrent.locks.Lock):void, 4, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure dereferenceAfterUnlock1(...),Skipping toString(): unknown method] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterUnlock2(java.util.concurrent.locks.Lock):void, 6, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure dereferenceAfterUnlock2(...),Skipping toString(): unknown method] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.hashmapNPE(java.util.HashMap,java.lang.Object):java.lang.String, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure hashmapNPE(...)] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullDerefernceReturnOfSkippedFunctionBad():void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure nullDerefernceReturnOfSkippedFunctionBad(),Skipping unknownFunc(): method has no implementation,Definition of unknownFunc(),Taking true branch] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullDerefernceReturnOfSkippedFunctionBad():void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure nullDerefernceReturnOfSkippedFunctionBad(),Skipping unknownFunc(): unknown method,Definition of unknownFunc(),Taking true branch] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullListFiles(java.lang.String):int, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure nullListFiles(...),Skipping File(...): unknown method] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullPointerException():int, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure nullPointerException()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullPointerExceptionArrayLength():void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure nullPointerExceptionArrayLength()] @@ -132,7 +132,7 @@ codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.Nu codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullTryLock(java.nio.channels.FileChannel):java.lang.String, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure nullTryLock(...)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullableFieldNPE():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure nullableFieldNPE()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullableParamNPE(java.lang.Object):void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure nullableParamNPE(...)] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.optionalNPE(com.google.common.base.Optional):void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure optionalNPE(...),Skipping orNull(): abstract method,Definition of orNull()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.optionalNPE(com.google.common.base.Optional):void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure optionalNPE(...)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.otherSinkWithNeverNullSource():void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure otherSinkWithNeverNullSource(),start of procedure SomeLibrary(),return from a call to SomeLibrary.(),start of procedure get(),Taking true branch,return from a call to T SomeLibrary.get()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.sinkWithNeverNullSource():void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure sinkWithNeverNullSource(),start of procedure NeverNullSource(),return from a call to NeverNullSource.(),start of procedure get(),Taking true branch,return from a call to T NeverNullSource.get()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.someNPEAfterResourceLeak():void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure someNPEAfterResourceLeak(),start of procedure sourceOfNullWithResourceLeak(),start of procedure SomeResource(),return from a call to SomeResource.(),return from a call to T CloseableAsResourceExample.sourceOfNullWithResourceLeak()] diff --git a/infer/tests/codetoanalyze/java/infer/issues.exp b/infer/tests/codetoanalyze/java/infer/issues.exp index c9739bfe6..86a53a926 100644 --- a/infer/tests/codetoanalyze/java/infer/issues.exp +++ b/infer/tests/codetoanalyze/java/infer/issues.exp @@ -1,34 +1,34 @@ -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.accessPathInCalleeMayCauseFalseNegative():void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure accessPathInCalleeMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure accessPathOnParam(...),Skipping toString(): unknown method] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.callOnCastUndefinedObjMayCauseFalseNegative():void, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure callOnCastUndefinedObjMayCauseFalseNegative(),start of procedure castExternalPreventsSpecInference(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),return from a call to String AnalysisStops.castExternalPreventsSpecInference(),Skipping toString(): unknown method] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.callOnUndefinedObjMayCauseFalseNegative():void, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure callOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure retZero(),return from a call to int AnalysisStops$MyObj.retZero()] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.castFailureOnUndefinedObjMayCauseFalseNegative():void, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure castFailureOnUndefinedObjMayCauseFalseNegative(),start of procedure castExternalPreventsSpecInference(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),return from a call to String AnalysisStops.castExternalPreventsSpecInference()] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.accessPathInCalleeMayCauseFalseNegative():void, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure accessPathInCalleeMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure accessPathOnParam(...),Skipping toString(): unknown method] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.callOnCastUndefinedObjMayCauseFalseNegative():void, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure callOnCastUndefinedObjMayCauseFalseNegative(),start of procedure castExternalPreventsSpecInference(),Skipping externalFunc(): unknown method,Definition of externalFunc(),return from a call to String AnalysisStops.castExternalPreventsSpecInference(),Skipping toString(): unknown method] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.callOnUndefinedObjMayCauseFalseNegative():void, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure callOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure retZero(),return from a call to int AnalysisStops$MyObj.retZero()] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.castFailureOnUndefinedObjMayCauseFalseNegative():void, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure castFailureOnUndefinedObjMayCauseFalseNegative(),start of procedure castExternalPreventsSpecInference(),Skipping externalFunc(): unknown method,Definition of externalFunc(),return from a call to String AnalysisStops.castExternalPreventsSpecInference()] codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadAferCastMayCauseFalseNegative(java.util.Iterator):void, 6, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure fieldReadAferCastMayCauseFalseNegative(...),Skipping toString(): unknown method,Taking true branch] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadInCalleeMayCauseFalseNegative():void, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure fieldReadInCalleeMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadInCalleeWithAngelicObjFieldMayCauseFalseNegative():void, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure fieldReadInCalleeWithAngelicObjFieldMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadOnUndefinedObjMayCauseFalseNegative():void, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure fieldReadOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2()] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldWriteOnUndefinedObjMayCauseFalseNegative():void, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure fieldWriteOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2()] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.heapFieldOfAngelicObjMayCauseFalseNegative():void, 4, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure heapFieldOfAngelicObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Taking true branch] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.infiniteMaterializationMayCauseFalseNegative(boolean):void, 5, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure infiniteMaterializationMayCauseFalseNegative(...),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Taking false branch] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.primitiveFieldOfAngelicObjMayCauseFalseNegative():void, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure primitiveFieldOfAngelicObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Taking true branch] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.primitiveFieldOfAngelicObjMayCauseFalseNegative():void, 5, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure primitiveFieldOfAngelicObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Taking false branch] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.recursiveAngelicTypesMayCauseFalseNegative():void, 4, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure recursiveAngelicTypesMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2()] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.skipFunctionInLoopMayCauseFalseNegative():void, 5, NULL_DEREFERENCE, B1, ERROR, [start of procedure skipFunctionInLoopMayCauseFalseNegative(),Taking true branch,Skipping externalFunc(): method has no implementation,Definition of externalFunc(),Taking false branch] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.skipPointerDerefMayCauseCalleeFalseNegative():void, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure skipPointerDerefMayCauseCalleeFalseNegative(),start of procedure skipPointerDerefPreventsSpecInferenceRetZero(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to int AnalysisStops.skipPointerDerefPreventsSpecInferenceRetZero()] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.skipPointerDerefMayCauseInterprocFalseNegative():void, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure skipPointerDerefMayCauseInterprocFalseNegative(),start of procedure skipPointerDerefPreventsSpecInferenceRetZero(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to int AnalysisStops.skipPointerDerefPreventsSpecInferenceRetZero(),start of procedure divideByParam(...)] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.skipPointerDerefMayCauseLocalFalseNegative():void, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure skipPointerDerefMayCauseLocalFalseNegative(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),Skipping toString(): unknown method] -codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.specInferenceMayFailAndCauseFalseNegative(boolean,java.util.Iterator):void, 26, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure specInferenceMayFailAndCauseFalseNegative(...),start of procedure skipPointerDerefMayCauseLocalFalseNegative(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to void AnalysisStops.skipPointerDerefMayCauseLocalFalseNegative(),start of procedure skipPointerDerefPreventsSpecInferenceRetObj(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to Object AnalysisStops.skipPointerDerefPreventsSpecInferenceRetObj(),start of procedure skipPointerDerefPreventsSpecInferenceRetZero(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to int AnalysisStops.skipPointerDerefPreventsSpecInferenceRetZero(),start of procedure skipPointerDerefMayCauseCalleeFalseNegative(),start of procedure skipPointerDerefPreventsSpecInferenceRetZero(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to int AnalysisStops.skipPointerDerefPreventsSpecInferenceRetZero(),return from a call to void AnalysisStops.skipPointerDerefMayCauseCalleeFalseNegative(),start of procedure skipPointerDerefMayCauseInterprocFalseNegative(),start of procedure skipPointerDerefPreventsSpecInferenceRetZero(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to int AnalysisStops.skipPointerDerefPreventsSpecInferenceRetZero(),start of procedure divideByParam(...),return from a call to void AnalysisStops.divideByParam(int),return from a call to void AnalysisStops.skipPointerDerefMayCauseInterprocFalseNegative(),start of procedure castFailureOnUndefinedObjMayCauseFalseNegative(),start of procedure castExternalPreventsSpecInference(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),return from a call to String AnalysisStops.castExternalPreventsSpecInference(),return from a call to void AnalysisStops.castFailureOnUndefinedObjMayCauseFalseNegative(),start of procedure callOnCastUndefinedObjMayCauseFalseNegative(),start of procedure castExternalPreventsSpecInference(),Skipping externalFunc(): method has no implementation,Definition of externalFunc(),return from a call to String AnalysisStops.castExternalPreventsSpecInference(),Skipping toString(): unknown method,return from a call to void AnalysisStops.callOnCastUndefinedObjMayCauseFalseNegative(),start of procedure callOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure retZero(),return from a call to int AnalysisStops$MyObj.retZero(),return from a call to void AnalysisStops.callOnUndefinedObjMayCauseFalseNegative(),start of procedure callOnUndefinedObjMayCauseFalsePositive(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure retOne(),return from a call to int AnalysisStops$MyObj.retOne(),return from a call to void AnalysisStops.callOnUndefinedObjMayCauseFalsePositive(),start of procedure fieldWriteOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),return from a call to void AnalysisStops.fieldWriteOnUndefinedObjMayCauseFalseNegative(),start of procedure fieldWriteOnUndefinedObjMayCauseFalsePositive(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Skipping toString(): unknown method,return from a call to void AnalysisStops.fieldWriteOnUndefinedObjMayCauseFalsePositive(),start of procedure fieldReadOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),return from a call to void AnalysisStops.fieldReadOnUndefinedObjMayCauseFalseNegative(),start of procedure fieldReadOnUndefinedObjMayCauseFalsePositive(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Skipping toString(): unknown method,return from a call to void AnalysisStops.fieldReadOnUndefinedObjMayCauseFalsePositive(),start of procedure recursiveAngelicTypesMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),return from a call to void AnalysisStops.recursiveAngelicTypesMayCauseFalseNegative(),Skipping recursiveAngelicTypesMayCauseFalsePositive(): empty list of specs,Definition of recursiveAngelicTypesMayCauseFalsePositive(),start of procedure infiniteMaterializationMayCauseFalseNegative(...),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Taking false branch,return from a call to void AnalysisStops.infiniteMaterializationMayCauseFalseNegative(boolean),start of procedure infiniteMaterializationMayCauseFalsePositive(...),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Taking false branch,Skipping toString(): unknown method,return from a call to void AnalysisStops.infiniteMaterializationMayCauseFalsePositive(boolean),start of procedure primitiveFieldOfAngelicObjMayCauseFalsePositive(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Taking true branch,return from a call to void AnalysisStops.primitiveFieldOfAngelicObjMayCauseFalsePositive(),start of procedure primitiveFieldOfAngelicObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Taking false branch,return from a call to void AnalysisStops.primitiveFieldOfAngelicObjMayCauseFalseNegative(),start of procedure heapFieldOfAngelicObjMayCauseFalsePositive(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Taking false branch,return from a call to void AnalysisStops.heapFieldOfAngelicObjMayCauseFalsePositive(),start of procedure heapFieldOfAngelicObjMayCauseFalseNegative(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),Taking true branch,return from a call to void AnalysisStops.heapFieldOfAngelicObjMayCauseFalseNegative(),Skipping fieldReadAferCastMayCauseFalseNegative(...): empty list of specs,Definition of fieldReadAferCastMayCauseFalseNegative(...),start of procedure fieldReadInCalleeMayCauseFalsePositive(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method,return from a call to void AnalysisStops.derefParam(AnalysisStops$MyObj),return from a call to void AnalysisStops.fieldReadInCalleeMayCauseFalsePositive(),start of procedure fieldReadInCalleeWithAngelicObjFieldMayCauseFalsePositive(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method,return from a call to void AnalysisStops.derefParam(AnalysisStops$MyObj),return from a call to void AnalysisStops.fieldReadInCalleeWithAngelicObjFieldMayCauseFalsePositive(),start of procedure accessPathInCalleeMayCauseFalsePositive(),Skipping externalFunc2(): method has no implementation,Definition of externalFunc2(),start of procedure accessPathOnParam(...),Skipping toString(): unknown method,return from a call to void AnalysisStops.accessPathOnParam(AnalysisStops$MyObj),return from a call to void AnalysisStops.accessPathInCalleeMayCauseFalsePositive()] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadInCalleeMayCauseFalseNegative():void, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure fieldReadInCalleeMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadInCalleeWithAngelicObjFieldMayCauseFalseNegative():void, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure fieldReadInCalleeWithAngelicObjFieldMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldReadOnUndefinedObjMayCauseFalseNegative():void, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure fieldReadOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2()] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.fieldWriteOnUndefinedObjMayCauseFalseNegative():void, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure fieldWriteOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2()] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.heapFieldOfAngelicObjMayCauseFalseNegative():void, 4, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure heapFieldOfAngelicObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Taking true branch] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.infiniteMaterializationMayCauseFalseNegative(boolean):void, 5, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure infiniteMaterializationMayCauseFalseNegative(...),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Taking false branch] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.primitiveFieldOfAngelicObjMayCauseFalseNegative():void, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure primitiveFieldOfAngelicObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Taking true branch] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.primitiveFieldOfAngelicObjMayCauseFalseNegative():void, 5, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure primitiveFieldOfAngelicObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Taking false branch] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.recursiveAngelicTypesMayCauseFalseNegative():void, 4, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure recursiveAngelicTypesMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2()] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.skipFunctionInLoopMayCauseFalseNegative():void, 5, NULL_DEREFERENCE, B1, ERROR, [start of procedure skipFunctionInLoopMayCauseFalseNegative(),Taking true branch,Skipping externalFunc(): unknown method,Definition of externalFunc(),Taking false branch] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.skipPointerDerefMayCauseCalleeFalseNegative():void, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure skipPointerDerefMayCauseCalleeFalseNegative(),start of procedure skipPointerDerefPreventsSpecInferenceRetZero(),Skipping externalFunc(): unknown method,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to int AnalysisStops.skipPointerDerefPreventsSpecInferenceRetZero()] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.skipPointerDerefMayCauseInterprocFalseNegative():void, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure skipPointerDerefMayCauseInterprocFalseNegative(),start of procedure skipPointerDerefPreventsSpecInferenceRetZero(),Skipping externalFunc(): unknown method,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to int AnalysisStops.skipPointerDerefPreventsSpecInferenceRetZero(),start of procedure divideByParam(...)] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.skipPointerDerefMayCauseLocalFalseNegative():void, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure skipPointerDerefMayCauseLocalFalseNegative(),Skipping externalFunc(): unknown method,Definition of externalFunc(),Skipping toString(): unknown method] +codetoanalyze/java/infer/AnalysisStops.java, codetoanalyze.java.infer.AnalysisStops.specInferenceMayFailAndCauseFalseNegative(boolean,java.util.Iterator):void, 26, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure specInferenceMayFailAndCauseFalseNegative(...),start of procedure skipPointerDerefMayCauseLocalFalseNegative(),Skipping externalFunc(): unknown method,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to void AnalysisStops.skipPointerDerefMayCauseLocalFalseNegative(),start of procedure skipPointerDerefPreventsSpecInferenceRetObj(),Skipping externalFunc(): unknown method,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to Object AnalysisStops.skipPointerDerefPreventsSpecInferenceRetObj(),start of procedure skipPointerDerefPreventsSpecInferenceRetZero(),Skipping externalFunc(): unknown method,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to int AnalysisStops.skipPointerDerefPreventsSpecInferenceRetZero(),start of procedure skipPointerDerefMayCauseCalleeFalseNegative(),start of procedure skipPointerDerefPreventsSpecInferenceRetZero(),Skipping externalFunc(): unknown method,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to int AnalysisStops.skipPointerDerefPreventsSpecInferenceRetZero(),return from a call to void AnalysisStops.skipPointerDerefMayCauseCalleeFalseNegative(),start of procedure skipPointerDerefMayCauseInterprocFalseNegative(),start of procedure skipPointerDerefPreventsSpecInferenceRetZero(),Skipping externalFunc(): unknown method,Definition of externalFunc(),Skipping toString(): unknown method,return from a call to int AnalysisStops.skipPointerDerefPreventsSpecInferenceRetZero(),start of procedure divideByParam(...),return from a call to void AnalysisStops.divideByParam(int),return from a call to void AnalysisStops.skipPointerDerefMayCauseInterprocFalseNegative(),start of procedure castFailureOnUndefinedObjMayCauseFalseNegative(),start of procedure castExternalPreventsSpecInference(),Skipping externalFunc(): unknown method,Definition of externalFunc(),return from a call to String AnalysisStops.castExternalPreventsSpecInference(),return from a call to void AnalysisStops.castFailureOnUndefinedObjMayCauseFalseNegative(),start of procedure callOnCastUndefinedObjMayCauseFalseNegative(),start of procedure castExternalPreventsSpecInference(),Skipping externalFunc(): unknown method,Definition of externalFunc(),return from a call to String AnalysisStops.castExternalPreventsSpecInference(),Skipping toString(): unknown method,return from a call to void AnalysisStops.callOnCastUndefinedObjMayCauseFalseNegative(),start of procedure callOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure retZero(),return from a call to int AnalysisStops$MyObj.retZero(),return from a call to void AnalysisStops.callOnUndefinedObjMayCauseFalseNegative(),start of procedure callOnUndefinedObjMayCauseFalsePositive(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure retOne(),return from a call to int AnalysisStops$MyObj.retOne(),return from a call to void AnalysisStops.callOnUndefinedObjMayCauseFalsePositive(),start of procedure fieldWriteOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),return from a call to void AnalysisStops.fieldWriteOnUndefinedObjMayCauseFalseNegative(),start of procedure fieldWriteOnUndefinedObjMayCauseFalsePositive(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Skipping toString(): unknown method,return from a call to void AnalysisStops.fieldWriteOnUndefinedObjMayCauseFalsePositive(),start of procedure fieldReadOnUndefinedObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),return from a call to void AnalysisStops.fieldReadOnUndefinedObjMayCauseFalseNegative(),start of procedure fieldReadOnUndefinedObjMayCauseFalsePositive(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Skipping toString(): unknown method,return from a call to void AnalysisStops.fieldReadOnUndefinedObjMayCauseFalsePositive(),start of procedure recursiveAngelicTypesMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),return from a call to void AnalysisStops.recursiveAngelicTypesMayCauseFalseNegative(),Skipping recursiveAngelicTypesMayCauseFalsePositive(): empty list of specs,Definition of recursiveAngelicTypesMayCauseFalsePositive(),start of procedure infiniteMaterializationMayCauseFalseNegative(...),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Taking false branch,return from a call to void AnalysisStops.infiniteMaterializationMayCauseFalseNegative(boolean),start of procedure infiniteMaterializationMayCauseFalsePositive(...),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Taking false branch,Skipping toString(): unknown method,return from a call to void AnalysisStops.infiniteMaterializationMayCauseFalsePositive(boolean),start of procedure primitiveFieldOfAngelicObjMayCauseFalsePositive(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Taking true branch,return from a call to void AnalysisStops.primitiveFieldOfAngelicObjMayCauseFalsePositive(),start of procedure primitiveFieldOfAngelicObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Taking false branch,return from a call to void AnalysisStops.primitiveFieldOfAngelicObjMayCauseFalseNegative(),start of procedure heapFieldOfAngelicObjMayCauseFalsePositive(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Taking false branch,return from a call to void AnalysisStops.heapFieldOfAngelicObjMayCauseFalsePositive(),start of procedure heapFieldOfAngelicObjMayCauseFalseNegative(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),Taking true branch,return from a call to void AnalysisStops.heapFieldOfAngelicObjMayCauseFalseNegative(),Skipping fieldReadAferCastMayCauseFalseNegative(...): empty list of specs,Definition of fieldReadAferCastMayCauseFalseNegative(...),start of procedure fieldReadInCalleeMayCauseFalsePositive(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method,return from a call to void AnalysisStops.derefParam(AnalysisStops$MyObj),return from a call to void AnalysisStops.fieldReadInCalleeMayCauseFalsePositive(),start of procedure fieldReadInCalleeWithAngelicObjFieldMayCauseFalsePositive(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure derefParam(...),Skipping toString(): unknown method,return from a call to void AnalysisStops.derefParam(AnalysisStops$MyObj),return from a call to void AnalysisStops.fieldReadInCalleeWithAngelicObjFieldMayCauseFalsePositive(),start of procedure accessPathInCalleeMayCauseFalsePositive(),Skipping externalFunc2(): unknown method,Definition of externalFunc2(),start of procedure accessPathOnParam(...),Skipping toString(): unknown method,return from a call to void AnalysisStops.accessPathOnParam(AnalysisStops$MyObj),return from a call to void AnalysisStops.accessPathInCalleeMayCauseFalsePositive()] codetoanalyze/java/infer/ArrayOutOfBounds.java, codetoanalyze.java.infer.ArrayOutOfBounds.arrayOutOfBounds():int, 2, ARRAY_OUT_OF_BOUNDS_L1, no_bucket, ERROR, [start of procedure arrayOutOfBounds()] codetoanalyze/java/infer/Builtins.java, codetoanalyze.java.infer.Builtins.causeError(java.lang.Object):void, 2, NULL_DEREFERENCE, B5, ERROR, [start of procedure causeError(...),Taking true branch] codetoanalyze/java/infer/Builtins.java, codetoanalyze.java.infer.Builtins.doNotBlockError(java.lang.Object):void, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure doNotBlockError(...),Taking true branch] codetoanalyze/java/infer/ClassCastExceptions.java, codetoanalyze.java.infer.ClassCastExceptions.classCastException():void, 2, CLASS_CAST_EXCEPTION, no_bucket, ERROR, [start of procedure classCastException(),start of procedure SubClassA(),start of procedure SuperClass(),return from a call to SuperClass.(),return from a call to SubClassA.()] codetoanalyze/java/infer/ClassCastExceptions.java, codetoanalyze.java.infer.ClassCastExceptions.classCastExceptionImplementsInterface():int, 0, CLASS_CAST_EXCEPTION, no_bucket, ERROR, [start of procedure classCastExceptionImplementsInterface(),start of procedure AnotherImplementationOfInterface(),return from a call to AnotherImplementationOfInterface.()] -codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.failToCloseWithCloseQuietly():void, 5, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure failToCloseWithCloseQuietly(),start of procedure SomeResource(),return from a call to SomeResource.(),start of procedure doSomething(),Skipping star(): method has no implementation,Definition of star(),Taking true branch,start of procedure LocalException(),return from a call to LocalException.(),exception codetoanalyze.java.infer.LocalException,return from a call to void SomeResource.doSomething()] +codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.failToCloseWithCloseQuietly():void, 5, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure failToCloseWithCloseQuietly(),start of procedure SomeResource(),return from a call to SomeResource.(),start of procedure doSomething(),Skipping star(): unknown method,Definition of star(),Taking true branch,start of procedure LocalException(),return from a call to LocalException.(),exception codetoanalyze.java.infer.LocalException,return from a call to void SomeResource.doSomething()] codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.leakFoundWhenIndirectlyImplementingCloseable():void, 1, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure leakFoundWhenIndirectlyImplementingCloseable(),start of procedure CloseableAsResourceExample$MyResource(...),return from a call to CloseableAsResourceExample$MyResource.(CloseableAsResourceExample)] codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.notClosingCloseable():void, 1, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure notClosingCloseable(),start of procedure SomeResource(),return from a call to SomeResource.()] codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.notClosingWrapper():void, 2, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure notClosingWrapper(),start of procedure Resource(),return from a call to Resource.(),start of procedure Sub(...),start of procedure Wrapper(...),return from a call to Wrapper.(Resource),return from a call to Sub.(Resource),start of procedure close(),return from a call to void Resource.close()] -codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.skippedVritualCallDoesNotCloseResourceOnReceiver():void, 2, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure skippedVritualCallDoesNotCloseResourceOnReceiver(),start of procedure SomeResource(),return from a call to SomeResource.(),Skipping foo(...): method has no implementation,Definition of foo(...)] +codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.skippedVritualCallDoesNotCloseResourceOnReceiver():void, 2, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure skippedVritualCallDoesNotCloseResourceOnReceiver(),start of procedure SomeResource(),return from a call to SomeResource.(),Skipping foo(...): unknown method,Definition of foo(...)] codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.sourceOfNullWithResourceLeak():codetoanalyze.java.infer.T, 1, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure sourceOfNullWithResourceLeak(),start of procedure SomeResource(),return from a call to SomeResource.()] -codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.withException():void, 4, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure withException(),start of procedure SomeResource(),return from a call to SomeResource.(),start of procedure doSomething(),Skipping star(): method has no implementation,Definition of star(),Taking true branch,start of procedure LocalException(),return from a call to LocalException.(),exception codetoanalyze.java.infer.LocalException,return from a call to void SomeResource.doSomething()] +codetoanalyze/java/infer/CloseableAsResourceExample.java, codetoanalyze.java.infer.CloseableAsResourceExample.withException():void, 4, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure withException(),start of procedure SomeResource(),return from a call to SomeResource.(),start of procedure doSomething(),Skipping star(): unknown method,Definition of star(),Taking true branch,start of procedure LocalException(),return from a call to LocalException.(),exception codetoanalyze.java.infer.LocalException,return from a call to void SomeResource.doSomething()] codetoanalyze/java/infer/CursorLeaks.java, codetoanalyze.java.infer.CursorLeaks.completeDownloadNotClosed(android.app.DownloadManager):int, 8, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure completeDownloadNotClosed(...),Taking false branch,Skipping getColumnIndex(...): unknown method] codetoanalyze/java/infer/CursorLeaks.java, codetoanalyze.java.infer.CursorLeaks.cursorClosedCheckNullCheckClosed_FP(android.database.sqlite.SQLiteDatabase):java.lang.Object, 11, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure cursorClosedCheckNullCheckClosed_FP(...),Taking false branch,Skipping getString(...): unknown method,Taking true branch,Taking false branch] codetoanalyze/java/infer/CursorLeaks.java, codetoanalyze.java.infer.CursorLeaks.cursorNotClosed(android.database.sqlite.SQLiteDatabase):int, 2, RESOURCE_LEAK, no_bucket, ERROR, [start of procedure cursorNotClosed(...),Skipping getCount(): unknown method] @@ -109,19 +109,19 @@ codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.Nu codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.FP_noNullPointerExceptionAfterSkipFunction():void, 4, NULL_DEREFERENCE, B5, ERROR, [start of procedure FP_noNullPointerExceptionAfterSkipFunction(),Skipping String(...): unknown method,Skipping toString(): unknown method,start of procedure genericMethodSomewhereCheckingForNull(...),Taking true branch,return from a call to void NullPointerExceptions.genericMethodSomewhereCheckingForNull(String)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.NPEvalueOfFromHashmapBad(java.util.HashMap,int):int, 1, NULL_DEREFERENCE, B2, ERROR, [start of procedure NPEvalueOfFromHashmapBad(...)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.addNullToImmutableListBuilderBad():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure addNullToImmutableListBuilderBad(),Skipping builder(): unknown method,start of procedure getObject(),return from a call to Object NullPointerExceptions.getObject()] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.badCheckShouldCauseNPE():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure badCheckShouldCauseNPE(),start of procedure getBool(),Skipping test(): method has no implementation,Definition of test(),Taking true branch,return from a call to Boolean NullPointerExceptions.getBool(),Taking true branch,start of procedure getObj(),Skipping test(): method has no implementation,Definition of test(),Taking false branch,return from a call to Object NullPointerExceptions.getObj()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.badCheckShouldCauseNPE():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure badCheckShouldCauseNPE(),start of procedure getBool(),Skipping test(): unknown method,Definition of test(),Taking true branch,return from a call to Boolean NullPointerExceptions.getBool(),Taking true branch,start of procedure getObj(),Skipping test(): unknown method,Definition of test(),Taking false branch,return from a call to Object NullPointerExceptions.getObj()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.cursorFromContentResolverNPE(java.lang.String):void, 5, NULL_DEREFERENCE, B1, ERROR, [start of procedure cursorFromContentResolverNPE(...)] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.deferenceNullableMethodCallingSkippedMethodBad():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure deferenceNullableMethodCallingSkippedMethodBad(),start of procedure wrapUnknownFuncWithNullable(),Skipping unknownFunc(): method has no implementation,Definition of unknownFunc(),return from a call to Object NullPointerExceptions.wrapUnknownFuncWithNullable()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.deferenceNullableMethodCallingSkippedMethodBad():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure deferenceNullableMethodCallingSkippedMethodBad(),start of procedure wrapUnknownFuncWithNullable(),Skipping unknownFunc(): unknown method,Definition of unknownFunc(),return from a call to Object NullPointerExceptions.wrapUnknownFuncWithNullable()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNull():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefNull(),start of procedure derefUndefinedCallee(),start of procedure retUndefined(),return from a call to Object NullPointerExceptions.retUndefined(),Skipping toString(): unknown method,return from a call to Object NullPointerExceptions.derefUndefinedCallee()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNullableGetter():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefNullableGetter(),start of procedure nullableGetter(),return from a call to Object NullPointerExceptions.nullableGetter()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNullableRet(boolean):void, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure derefNullableRet(...),start of procedure nullableRet(...),Taking true branch,return from a call to Object NullPointerExceptions.nullableRet(boolean)] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRet():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefUndefNullableRet(),Skipping undefNullableRet(): method has no implementation,Definition of undefNullableRet()] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRetWrapper():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),Skipping undefNullableRet(): method has no implementation,Definition of undefNullableRet(),return from a call to Object NullPointerExceptions.undefNullableWrapper()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRet():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefUndefNullableRet(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRetWrapper():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet(),return from a call to Object NullPointerExceptions.undefNullableWrapper()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterLoopOnList(codetoanalyze.java.infer.NullPointerExceptions$L):void, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure dereferenceAfterLoopOnList(...),start of procedure returnsNullAfterLoopOnList(...),Taking true branch,Taking true branch,Taking false branch,return from a call to Object NullPointerExceptions.returnsNullAfterLoopOnList(NullPointerExceptions$L)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterUnlock1(java.util.concurrent.locks.Lock):void, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure dereferenceAfterUnlock1(...),Skipping toString(): unknown method] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterUnlock2(java.util.concurrent.locks.Lock):void, 6, NULL_DEREFERENCE, B1, ERROR, [start of procedure dereferenceAfterUnlock2(...),Skipping toString(): unknown method] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.hashmapNPE(java.util.HashMap,java.lang.Object):java.lang.String, 1, NULL_DEREFERENCE, B2, ERROR, [start of procedure hashmapNPE(...)] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullDerefernceReturnOfSkippedFunctionBad():void, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure nullDerefernceReturnOfSkippedFunctionBad(),Skipping unknownFunc(): method has no implementation,Definition of unknownFunc(),Taking true branch] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullDerefernceReturnOfSkippedFunctionBad():void, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure nullDerefernceReturnOfSkippedFunctionBad(),Skipping unknownFunc(): unknown method,Definition of unknownFunc(),Taking true branch] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullListFiles(java.lang.String):int, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure nullListFiles(...),Skipping File(...): unknown method] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullPointerException():int, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure nullPointerException()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullPointerExceptionArrayLength():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure nullPointerExceptionArrayLength()] @@ -139,7 +139,7 @@ codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.Nu codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullTryLock(java.nio.channels.FileChannel):java.lang.String, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure nullTryLock(...)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullableFieldNPE():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure nullableFieldNPE()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullableParamNPE(java.lang.Object):void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure nullableParamNPE(...)] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.optionalNPE(com.google.common.base.Optional):void, 1, NULL_DEREFERENCE, B2, ERROR, [start of procedure optionalNPE(...),Skipping orNull(): abstract method,Definition of orNull()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.optionalNPE(com.google.common.base.Optional):void, 1, NULL_DEREFERENCE, B2, ERROR, [start of procedure optionalNPE(...)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.preconditionCheckStateTest(codetoanalyze.java.infer.NullPointerExceptions$D):int, 1, PRECONDITION_NOT_MET, no_bucket, WARNING, [start of procedure preconditionCheckStateTest(...),Taking false branch] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.someNPEAfterResourceLeak():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure someNPEAfterResourceLeak(),start of procedure sourceOfNullWithResourceLeak(),start of procedure SomeResource(),return from a call to SomeResource.(),return from a call to T CloseableAsResourceExample.sourceOfNullWithResourceLeak()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.stringConstantEqualsFalseNotNPE_FP():void, 10, NULL_DEREFERENCE, B1, ERROR, [start of procedure stringConstantEqualsFalseNotNPE_FP(),Taking false branch] diff --git a/infer/tests/codetoanalyze/java/tracing/issues.exp b/infer/tests/codetoanalyze/java/tracing/issues.exp index 8470a3958..6682f1032 100644 --- a/infer/tests/codetoanalyze/java/tracing/issues.exp +++ b/infer/tests/codetoanalyze/java/tracing/issues.exp @@ -5,11 +5,11 @@ codetoanalyze/java/infer/ClassCastExceptions.java, codetoanalyze.java.infer.Clas codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions$$$Class$Name$With$Dollars.npeWithDollars():void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure npeWithDollars(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions$$$Class$Name$With$Dollars.npeWithDollars()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.addNullToImmutableListBuilderBad():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure addNullToImmutableListBuilderBad(),Skipping builder(): unknown method,start of procedure getObject(),return from a call to Object NullPointerExceptions.getObject(),Taking true branch] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.addNullToImmutableListBuilderBad():void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure addNullToImmutableListBuilderBad(),Skipping builder(): unknown method,start of procedure getObject(),return from a call to Object NullPointerExceptions.getObject(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.addNullToImmutableListBuilderBad()] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.badCheckShouldCauseNPE():void, 2, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure badCheckShouldCauseNPE(),start of procedure getBool(),Skipping test(): method has no implementation,Definition of test(),Taking true branch,return from a call to Boolean NullPointerExceptions.getBool(),Taking true branch,start of procedure getObj(),Skipping test(): method has no implementation,Definition of test(),Taking true branch,return from a call to Object NullPointerExceptions.getObj(),Taking true branch,return from a call to void NullPointerExceptions.badCheckShouldCauseNPE()] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.deferenceNullableMethodCallingSkippedMethodBad():void, 2, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure deferenceNullableMethodCallingSkippedMethodBad(),start of procedure wrapUnknownFuncWithNullable(),Skipping unknownFunc(): method has no implementation,Definition of unknownFunc(),return from a call to Object NullPointerExceptions.wrapUnknownFuncWithNullable(),Taking true branch,return from a call to void NullPointerExceptions.deferenceNullableMethodCallingSkippedMethodBad()] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNonThisGetterAfterCheckShouldNotCauseNPE():void, 5, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure derefNonThisGetterAfterCheckShouldNotCauseNPE(),start of procedure NullPointerExceptions(),return from a call to NullPointerExceptions.(),Taking true branch,start of procedure getObj(),Skipping test(): method has no implementation,Definition of test(),Taking true branch,return from a call to Object NullPointerExceptions.getObj(),Taking true branch,Taking true branch,start of procedure getObj(),Skipping test(): method has no implementation,Definition of test(),Taking true branch,return from a call to Object NullPointerExceptions.getObj(),Taking true branch,return from a call to void NullPointerExceptions.derefNonThisGetterAfterCheckShouldNotCauseNPE()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.badCheckShouldCauseNPE():void, 2, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure badCheckShouldCauseNPE(),start of procedure getBool(),Skipping test(): unknown method,Definition of test(),Taking true branch,return from a call to Boolean NullPointerExceptions.getBool(),Taking true branch,start of procedure getObj(),Skipping test(): unknown method,Definition of test(),Taking true branch,return from a call to Object NullPointerExceptions.getObj(),Taking true branch,return from a call to void NullPointerExceptions.badCheckShouldCauseNPE()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.deferenceNullableMethodCallingSkippedMethodBad():void, 2, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure deferenceNullableMethodCallingSkippedMethodBad(),start of procedure wrapUnknownFuncWithNullable(),Skipping unknownFunc(): unknown method,Definition of unknownFunc(),return from a call to Object NullPointerExceptions.wrapUnknownFuncWithNullable(),Taking true branch,return from a call to void NullPointerExceptions.deferenceNullableMethodCallingSkippedMethodBad()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNonThisGetterAfterCheckShouldNotCauseNPE():void, 5, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure derefNonThisGetterAfterCheckShouldNotCauseNPE(),start of procedure NullPointerExceptions(),return from a call to NullPointerExceptions.(),Taking true branch,start of procedure getObj(),Skipping test(): unknown method,Definition of test(),Taking true branch,return from a call to Object NullPointerExceptions.getObj(),Taking true branch,Taking true branch,start of procedure getObj(),Skipping test(): unknown method,Definition of test(),Taking true branch,return from a call to Object NullPointerExceptions.getObj(),Taking true branch,return from a call to void NullPointerExceptions.derefNonThisGetterAfterCheckShouldNotCauseNPE()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNull():void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure derefNull(),start of procedure derefUndefinedCallee(),start of procedure retUndefined(),Taking true branch,return from a call to Object NullPointerExceptions.retUndefined(),exception java.lang.NullPointerException,return from a call to Object NullPointerExceptions.derefUndefinedCallee(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.derefNull()] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRetWrapper():void, 2, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),Skipping undefNullableRet(): method has no implementation,Definition of undefNullableRet(),return from a call to Object NullPointerExceptions.undefNullableWrapper(),Taking true branch,return from a call to void NullPointerExceptions.derefUndefNullableRetWrapper()] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRetWrapper():void, 2, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet(),return from a call to Object NullPointerExceptions.undefNullableWrapper(),Taking true branch,return from a call to void NullPointerExceptions.derefUndefNullableRetWrapper()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefinedCallee():java.lang.Object, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure derefUndefinedCallee(),start of procedure retUndefined(),Taking true branch,return from a call to Object NullPointerExceptions.retUndefined(),Taking true branch,return from a call to Object NullPointerExceptions.derefUndefinedCallee()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterLoopOnList(codetoanalyze.java.infer.NullPointerExceptions$L):void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure dereferenceAfterLoopOnList(...),start of procedure returnsNullAfterLoopOnList(...),Taking false branch,return from a call to Object NullPointerExceptions.returnsNullAfterLoopOnList(NullPointerExceptions$L),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.dereferenceAfterLoopOnList(NullPointerExceptions$L)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterLoopOnList(codetoanalyze.java.infer.NullPointerExceptions$L):void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure dereferenceAfterLoopOnList(...),start of procedure returnsNullAfterLoopOnList(...),Taking false branch,return from a call to Object NullPointerExceptions.returnsNullAfterLoopOnList(NullPointerExceptions$L),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.dereferenceAfterLoopOnList(NullPointerExceptions$L)] @@ -17,7 +17,7 @@ codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.Nu codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterUnlock1(java.util.concurrent.locks.Lock):void, 5, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure dereferenceAfterUnlock1(...),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.dereferenceAfterUnlock1(Lock)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterUnlock2(java.util.concurrent.locks.Lock):void, 7, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure dereferenceAfterUnlock2(...),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.dereferenceAfterUnlock2(Lock)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterUnlock2(java.util.concurrent.locks.Lock):void, 7, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure dereferenceAfterUnlock2(...),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.dereferenceAfterUnlock2(Lock)] -codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dontReportOnNullableIndirectReassignmentToUnknown(java.lang.Object):void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure dontReportOnNullableIndirectReassignmentToUnknown(...),start of procedure callUnknownFunc(),Skipping unknownFunc(): method has no implementation,Definition of unknownFunc(),return from a call to Object NullPointerExceptions.callUnknownFunc(),Taking true branch,return from a call to void NullPointerExceptions.dontReportOnNullableIndirectReassignmentToUnknown(Object)] +codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dontReportOnNullableIndirectReassignmentToUnknown(java.lang.Object):void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure dontReportOnNullableIndirectReassignmentToUnknown(...),start of procedure callUnknownFunc(),Skipping unknownFunc(): unknown method,Definition of unknownFunc(),return from a call to Object NullPointerExceptions.callUnknownFunc(),Taking true branch,return from a call to void NullPointerExceptions.dontReportOnNullableIndirectReassignmentToUnknown(Object)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullListFiles(java.lang.String):int, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure nullListFiles(...),Skipping File(...): unknown method,Taking true branch,exception java.lang.NullPointerException,return from a call to int NullPointerExceptions.nullListFiles(String)] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullPointerException():int, 2, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure nullPointerException(),exception java.lang.NullPointerException,return from a call to int NullPointerExceptions.nullPointerException()] codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.nullPointerExceptionArrayLength():void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure nullPointerExceptionArrayLength(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionArrayLength()] @@ -51,7 +51,7 @@ codetoanalyze/java/tracing/NullPointerExceptionExample.java, codetoanalyze.java. codetoanalyze/java/tracing/NullPointerExceptionExample.java, codetoanalyze.java.tracing.NullPointerExceptionExample.callLeadToNpe():void, 2, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure callLeadToNpe(),start of procedure callDeref(...),Taking true branch,start of procedure deref(...),exception java.lang.NullPointerException,return from a call to void NullPointerExceptionExample.deref(T2),exception java.lang.NullPointerException,return from a call to void NullPointerExceptionExample.callDeref(T2,boolean),exception java.lang.NullPointerException,return from a call to void NullPointerExceptionExample.callLeadToNpe()] codetoanalyze/java/tracing/NullPointerExceptionExample.java, codetoanalyze.java.tracing.NullPointerExceptionExample.npeOnBothBranches(int):void, 6, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure npeOnBothBranches(...),Taking true branch,Taking true branch,Taking true branch,start of procedure callDeref(...),Taking true branch,start of procedure deref(...),exception java.lang.NullPointerException,return from a call to void NullPointerExceptionExample.deref(T2),exception java.lang.NullPointerException,return from a call to void NullPointerExceptionExample.callDeref(T2,boolean),exception java.lang.NullPointerException,return from a call to void NullPointerExceptionExample.npeOnBothBranches(int)] codetoanalyze/java/tracing/NullPointerExceptionExample.java, codetoanalyze.java.tracing.NullPointerExceptionExample.npeOnBothBranches(int):void, 6, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure npeOnBothBranches(...),Taking true branch,Taking true branch,Taking true branch,start of procedure callDeref(...),Taking true branch,start of procedure deref(...),exception java.lang.NullPointerException,return from a call to void NullPointerExceptionExample.deref(T2),exception java.lang.NullPointerException,return from a call to void NullPointerExceptionExample.callDeref(T2,boolean),exception java.lang.NullPointerException,return from a call to void NullPointerExceptionExample.npeOnBothBranches(int)] -codetoanalyze/java/tracing/ReportOnMainExample.java, codetoanalyze.java.tracing.ReportOnMainExample.main(java.lang.String[]):void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure main(...),start of procedure ReportOnMainExample(),return from a call to ReportOnMainExample.(),Taking true branch,start of procedure foo(),Skipping test(): method has no implementation,Definition of test(),Taking true branch,Taking true branch,return from a call to void ReportOnMainExample.foo(),return from a call to void ReportOnMainExample.main(java.lang.String[])] +codetoanalyze/java/tracing/ReportOnMainExample.java, codetoanalyze.java.tracing.ReportOnMainExample.main(java.lang.String[]):void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure main(...),start of procedure ReportOnMainExample(),return from a call to ReportOnMainExample.(),Taking true branch,start of procedure foo(),Skipping test(): unknown method,Definition of test(),Taking true branch,Taking true branch,return from a call to void ReportOnMainExample.foo(),return from a call to void ReportOnMainExample.main(java.lang.String[])] codetoanalyze/java/tracing/UnavoidableExceptionExample.java, codetoanalyze.java.tracing.UnavoidableExceptionExample.cannotAvoidNPE():void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure cannotAvoidNPE(),start of procedure create(),return from a call to T2 UnavoidableExceptionExample.create(),exception java.lang.NullPointerException,return from a call to void UnavoidableExceptionExample.cannotAvoidNPE()] codetoanalyze/java/tracing/UnavoidableExceptionExample.java, codetoanalyze.java.tracing.UnavoidableExceptionExample.unavoidableNPEWithParameter(boolean):void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure unavoidableNPEWithParameter(...),start of procedure create(),return from a call to T2 UnavoidableExceptionExample.create(),exception java.lang.NullPointerException,return from a call to void UnavoidableExceptionExample.unavoidableNPEWithParameter(boolean)] codetoanalyze/java/tracing/UnavoidableExceptionExample.java, codetoanalyze.java.tracing.UnavoidableExceptionExample.virtualMethodWithUnavoidableNPE(boolean):void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure virtualMethodWithUnavoidableNPE(...),start of procedure create(),return from a call to T2 UnavoidableExceptionExample.create(),exception java.lang.NullPointerException,return from a call to void UnavoidableExceptionExample.virtualMethodWithUnavoidableNPE(boolean)]