PsiExpression (Java8MigrationUtils.MapCheckCondition condition, PsiStatement statement) { if (!(statement instanceof PsiExpressionStatement)) return null; PsiMethodCallExpression putCall = extractMapMethodCall(((PsiExpressionStatement)statement).getExpression(), "put"); if (putCall == null) return null; PsiExpression[] putArguments = putCall.getArgumentList().getExpressions(); return putArguments.length == 2 && condition.isMap(putCall.getMethodExpression().getQualifierExpression()) && condition.isKey(putArguments[0]) ? putArguments[1] : null; }