PsiMethodCallExpression (@NotNull PsiForeachStatement statement) { PsiExpressionStatement putStatement = ObjectUtils.tryCast(ControlFlowUtils.stripBraces(statement.getBody()), PsiExpressionStatement.class); if (putStatement == null) return null; PsiMethodCallExpression putCall = extractMapMethodCall(putStatement.getExpression(), "put"); if (putCall == null || !isMapRef(putCall.getMethodExpression().getQualifierExpression())) return null; return putCall; }