void (PsiExpression expression) { if (ComplexityCalculator.isDefinitelySimple(expression) || SideEffectCalculator.isDefinitelyWithSideEffect(expression) || expression instanceof PsiLambdaExpression || ExpressionUtils.isVoidContext(expression)) { return; } DuplicateExpressionsContext context = DuplicateExpressionsContext.getOrCreateContext(expression, session); if (context == null || context.mayHaveSideEffect(expression)) { return; } if (context.getComplexity(expression) > complexityThreshold) { context.addOccurrence(expression); } }