boolean (@NotNull CFGBuilder builder, @NotNull PsiMethodCallExpression call) { if (COLLECTION_REMOVEIF.test(call)) { PsiExpression qualifier = call.getMethodExpression().getQualifierExpression(); if (qualifier == null) return false; PsiType elementType = PsiUtil.substituteTypeParameter(qualifier.getType(), CommonClassNames.JAVA_UTIL_COLLECTION, 0, true); DfType elementDfType = DfTypes.typedObject(elementType, DfaPsiUtil.getTypeNullability(elementType)); PsiExpression predicate = call.getArgumentList().getExpressions()[0]; DfaVariableValue result = builder.createTempVariable(PsiTypes.booleanType()); builder .assignAndPop(result, DfTypes.FALSE) .pushExpression(qualifier) // stack: qualifier .ensure(RelationType.IS, Mutability.MUTABLE.asDfType(), new MutabilityProblem(call, true), null) .evaluateFunction(predicate) .unwrap(SpecialField.COLLECTION_SIZE) // stack: qualifier.size .dup() // stack: qualifier.size qualifier.size .push(DfTypes.intValue(0)) // stack: qualifier.size qualifier.size 0 .ifCondition(RelationType.GT) .doWhileUnknown() .push(elementDfType) .invokeFunction(1, predicate) .ifConditionIs(true) .pushUnknown() .assign() .assignAndPop(result, DfTypes.TRUE) .end() .end() .end() .pop() .push(result); return true; } return false; }