anchor.diff:  import 'package:analyzer/dart/ast/ast.dart';
   import 'package:analyzer/dart/ast/visitor.dart';
   import 'package:analyzer/dart/element/element.dart';
  -import 'package:analyzer/error/listener.dart';
  -import 'package:analyzer/src/generated/resolver.dart'; // ignore: implementation_imports
   
   import '../analyzer.dart';
  -import '../util/dart_type_utilities.dart';
   
   const _desc = r"Don't access members with `this` unless avoiding shadowing.";
   
  
positive.code:   @override
    void visitThisExpression(ThisExpression node) {
      final parent = node.parent;
      Element lookUpElement;
      Element localElement;
      if (parent is PropertyAccess) {
        lookUpElement = DartTypeUtilities.getCanonicalElement(
            nameScope.lookup(parent.propertyName, definingLibrary));
        localElement = DartTypeUtilities.getCanonicalElement(
            parent.propertyName.staticElement);
      } else if (parent is MethodInvocation) {
        lookUpElement = DartTypeUtilities.getCanonicalElement(
            nameScope.lookup(parent.methodName, definingLibrary));
        localElement = parent.methodName.staticElement;
      }
  
      // Error in code
      if (localElement == null) {
        return null;
      }
      // If localElement was resolved, but lookUpElement was not, that means
      // the element is defined in an ancestor class.
      if (lookUpElement == localElement || lookUpElement == null) {
        rule.reportLint(parent);
      }
      return null;
    }
  }
  
  class _Visitor extends SimpleAstVisitor<void> {
    final LintRule rule;
  
    final LinterContext context;
  
    _Visitor(this.rule, this.context);
  
    @override
    void visitCompilationUnit(CompilationUnit node) {
      _UnnecessaryThisVisitor(rule, context, node).visitCompilationUnit(node);
    }
  }
  
negative.code:   void registerNodeProcessors(
        NodeLintRegistry registry, LinterContext context) {
      var visitor = _Visitor(this, context);
      registry.addConstructorFieldInitializer(this, visitor);
      registry.addThisExpression(this, visitor);
    }
  }
  
  class _Visitor extends SimpleAstVisitor<void> {
    final LintRule rule;
  
    final LinterContext context;
  
    _Visitor(this.rule, this.context);
  
    @override
    void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
  