void (@NotNull PsiMethodCallExpression call) { if(SET_OF.test(call)) { findDuplicates(call.getArgumentList().getExpressions(), JavaBundle.message("inspection.overwritten.key.set.message")); } else if (MAP_OF.test(call)) { PsiExpression[] args = call.getArgumentList().getExpressions(); findDuplicates(IntStreamEx.range(0, args.length, 2).elements(args).toArray(PsiExpression[]::new), JavaBundle.message("inspection.overwritten.key.map.message")); } else if (MAP_OF_ENTRIES.test(call)) { PsiExpression[] keys = StreamEx.of(call.getArgumentList().getExpressions()).map(PsiUtil::skipParenthesizedExprDown) .select(PsiMethodCallExpression.class).filter(MAP_ENTRY).map(entryCall -> entryCall.getArgumentList().getExpressions()[0]) .toArray(PsiExpression[]::new); findDuplicates(keys, JavaBundle.message("inspection.overwritten.key.map.message")); } }