CauseItem (MemoryStateChange history, PsiMethodCallExpression call, PsiExpression target) { PsiExpression[] args = call.getArgumentList().getExpressions(); for (int i = 0; i < args.length; i++) { if (EquivalenceChecker.getCanonicalPsiEquivalence().expressionsAreEquivalent(args[i], target)) { return fromCallContract(history, call, ContractReturnValue.returnParameter(i)); } } PsiExpression qualifier = call.getMethodExpression().getQualifierExpression(); if (EquivalenceChecker.getCanonicalPsiEquivalence().expressionsAreEquivalent(qualifier, target)) { return fromCallContract(history, call, ContractReturnValue.returnThis()); } return null; }