ToMapTerminal (TerminalBlock tb, PsiMethodCallExpression call) { if (tb.getCountExpression() != null || !isCallOf(call, JAVA_UTIL_MAP, "merge", "put", "putIfAbsent")) { return null; } PsiLocalVariable variable = extractQualifierVariable(tb, call); if (!hasLambdaCompatibleEmptyInitializer(variable)) return null; InitializerUsageStatus status = getInitializerUsageStatus(variable, tb.getStreamSourceStatement()); return new ToMapTerminal(call, tb.getVariable(), variable, tb.getStreamSourceStatement(), status); }