void (@NotNull PsiCodeBlock block) { PsiExpressionStatement statement = PsiTreeUtil.getChildOfType(block, PsiExpressionStatement.class); while (statement != null) { PsiExpression expression = statement.getExpression(); PsiMethodCallExpression call = tryCast(expression, PsiMethodCallExpression.class); if (SET_ADD.test(call)) { statement = processCallSequence(call, statement, SET_ADD, JavaBundle.message("inspection.overwritten.key.set.message")); } else if (MAP_PUT.test(call)) { statement = processCallSequence(call, statement, MAP_PUT, JavaBundle.message("inspection.overwritten.key.map.message")); } if (expression instanceof PsiAssignmentExpression) { statement = processArraySequence((PsiAssignmentExpression)expression, statement, JavaBundle.message("inspection.overwritten.key.array.message")); } statement = PsiTreeUtil.getNextSiblingOfType(statement, PsiExpressionStatement.class); } }