[infer] remove the special case to always create summaries for the Java methods

Reviewed By: ngorogiannis

Differential Revision: D10188301

fbshipit-source-id: 2f5c33454
master
Jeremy Dubreil 6 years ago committed by Facebook Github Bot
parent 8521d7590a
commit fd29aff3a7

@ -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 =
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 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 ;

@ -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.<init>(),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.<init>(),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.<init>(),start of procedure doSomething(),Skipping star(): unknown method,Definition of star(),Taking true branch,start of procedure LocalException(),return from a call to LocalException.<init>(),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.<init>(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.<init>()]
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.<init>(),start of procedure Sub(...),start of procedure Wrapper(...),return from a call to Wrapper.<init>(Resource),return from a call to Sub.<init>(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.<init>(),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.<init>(),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.<init>()]
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.<init>(),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.<init>(),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.<init>(),start of procedure doSomething(),Skipping star(): unknown method,Definition of star(),Taking true branch,start of procedure LocalException(),return from a call to LocalException.<init>(),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.<init>(),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.<init>(),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.<init>(),return from a call to T CloseableAsResourceExample.sourceOfNullWithResourceLeak()]

File diff suppressed because one or more lines are too long

@ -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.<init>(),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.<init>(),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.<init>(),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.<init>(),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)]

Loading…
Cancel
Save