Package crypto.analysis.errors
Class IncompleteOperationError
- java.lang.Object
-
- crypto.analysis.errors.AbstractError
-
- crypto.analysis.errors.IncompleteOperationError
-
public class IncompleteOperationError extends AbstractError
This class defines-IncompleteOperationError:
Found when the usage of an object may be incomplete. If there are multiple paths, and at least one path introduces an incomplete operation, the analysis indicates that there is a potential path with missing calls.
For example a Cipher object may be initialized but never been used for encryption or decryption, this may render the code dead. This error heavily depends on the computed call graph (CHA by default).
-
-
Constructor Summary
Constructors Constructor Description IncompleteOperationError(IAnalysisSeed seed, boomerang.scene.Statement errorStmt, CrySLRule rule, Collection<CrySLMethod> expectedMethodsToBeCalled)Create an IncompleteOperationError, if there is only one dataflow path, where the incomplete operation occurs.IncompleteOperationError(IAnalysisSeed seed, boomerang.scene.Statement errorStmt, CrySLRule rule, Collection<CrySLMethod> expectedMethodsToBeCalled, boolean multiplePaths)Create an IncompleteOperationError, if there is at least one dataflow path, where an incomplete operation occurs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Collection<CrySLMethod>getExpectedMethodCalls()inthashCode()booleanisMultiplePaths()StringtoErrorMarkerString()StringtoString()-
Methods inherited from class crypto.analysis.errors.AbstractError
addCausingError, addCausingError, addSubsequentError, formatMethodName, formatMethodNames, getErrorStatement, getLineNumber, getMethod, getObjectType, getRootErrors, getRule, getSeed, getSubsequentErrors
-
-
-
-
Constructor Detail
-
IncompleteOperationError
public IncompleteOperationError(IAnalysisSeed seed, boomerang.scene.Statement errorStmt, CrySLRule rule, Collection<CrySLMethod> expectedMethodsToBeCalled)
Create an IncompleteOperationError, if there is only one dataflow path, where the incomplete operation occurs.- Parameters:
seed- the seed for the incomplete operationerrorStmt- the statement of the last usage of the seedrule- the CrySL rule for the seedexpectedMethodsToBeCalled- the methods that are expected to be called
-
IncompleteOperationError
public IncompleteOperationError(IAnalysisSeed seed, boomerang.scene.Statement errorStmt, CrySLRule rule, Collection<CrySLMethod> expectedMethodsToBeCalled, boolean multiplePaths)
Create an IncompleteOperationError, if there is at least one dataflow path, where an incomplete operation occurs.- Parameters:
seed- the seed for the incomplete operationerrorStmt- the statement of the last usage of the seedrule- the CrySL rule for the seedexpectedMethodsToBeCalled- the methods that are expected to be calledmultiplePaths- set to true, if there are multiple paths (default: false)
-
-
Method Detail
-
getExpectedMethodCalls
public Collection<CrySLMethod> getExpectedMethodCalls()
-
isMultiplePaths
public boolean isMultiplePaths()
-
toErrorMarkerString
public String toErrorMarkerString()
- Specified by:
toErrorMarkerStringin classAbstractError
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractError
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractError
-
toString
public String toString()
- Overrides:
toStringin classAbstractError
-
-