BaseInspectionVisitor () { return new BaseInspectionVisitor() { @Override public void visitCodeReferenceElement(@NotNull GrCodeReferenceElement refElement) { super.visitCodeReferenceElement(refElement); if (canBeSimplified(refElement)) { registerError(refElement); } } @Override public void visitReferenceExpression(@NotNull GrReferenceExpression referenceExpression) { super.visitReferenceExpression(referenceExpression); if (canBeSimplified(referenceExpression) || isQualifiedStaticMethodWithUnnecessaryQualifier(referenceExpression)) { registerError(referenceExpression); } } }; }