Returns a fix that adds a {@code @SuppressWarnings(warningToSuppress)} to the closest
suppressible element to the node pointed at by {@code state.getPath()}.

@see #addSuppressWarnings(VisitorState, String, String)
349756
@Nullable
  public static Fix addSuppressWarnings(VisitorState state, String warningToSuppress) {
    return addSuppressWarnings(state, warningToSuppress, null);
  }
1093092
public static Optional<SuggestedFix> addModifiers(
      Tree tree, VisitorState state, Modifier... modifiers) {
    ModifiersTree originalModifiers = getModifiers(tree);
    if (originalModifiers == null) {
      return Optional.empty();
    }
    return addModifiers(tree, originalModifiers, state, new TreeSet<>(Arrays.asList(modifiers)));
  }
140728
protected void addFrameWarning(Content contentTree) {
        Content noframes = new HtmlTree(HtmlTag.NOFRAMES);
        Content noScript = HtmlTree.NOSCRIPT(
                HtmlTree.DIV(getResource("doclet.No_Script_Message")));
        noframes.addContent(noScript);
        Content noframesHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
                getResource("doclet.Frame_Alert"));
        noframes.addContent(noframesHead);
        Content p = HtmlTree.P(getResource("doclet.Frame_Warning_Message",
                getHyperLink(configuration.topFile,
                configuration.getText("doclet.Non_Frame_Version"))));
        noframes.addContent(p);
        contentTree.addContent(noframes);
    }
336441
@Override
  public Void scan(Tree tree, VisitorState state) {
    if (tree == null) {
      return null;
    }

    SuppressionInfo prevSuppressionInfo = updateSuppressions(tree, state);
    try {
      return super.scan(tree, state);
    } finally {
      // Restore old suppression state.
      currentSuppressions = prevSuppressionInfo;
    }
  }
683494
function adjustPath(builder, path) {
  if (builder.protection) {
    var pathAndNode = utils.pathAndNode(path);
    var nodeName = getProtectedPrefix(builder.protectedId) + pathAndNode.node;
    path = utils.join(pathAndNode.path, nodeName);
  }
  return path;
}
809830
@Override
    protected void closeStartElement(boolean emptyElem)
        throws XMLStreamException
    {
        mStartElementOpen = false;
        if (mAttrNames != null) {
            mAttrNames.clear();
        }

        try {
            if (emptyElem) {
                mWriter.writeStartTagEmptyEnd();
            } else {
                mWriter.writeStartTagEnd();
            }
        } catch (IOException ioe) {
            throwFromIOE(ioe);
        }

        if (mValidator != null) {
            mVldContent = mValidator.validateElementAndAttributes();
        }

        // Need bit more special handling for empty elements...
        if (emptyElem) {
            String localName = mElements.removeLast();
            if (mElements.isEmpty()) {
                mState = STATE_EPILOG;
            }
            if (mValidator != null) {
                mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);
            }
        }
    }
392320
public UrlStringBuilder addPath(String element) {
        Validate.notNull(element, "element cannot be null");
        this.path.add(element);
        return this;
    }
153718
function fixMessage( node ) {
      var textContent = node.textContent;

      var match =
         processToEqual( textContent ) ||
         processToHaveBeenCalledWith( textContent );

      if( !match ) {
         return;
      }

      node.setAttribute( 'title', textContent );

      var left = parse( match.left );
      var right = parse( match.right );

      const pre = document.createElement( 'pre' );
      pre.innerText = [
         match.prefix,
         format( left ),
         match.relationText,
         format( right )
      ].join( '\n\n' );
      node.innerHTML = '';
      node.appendChild( pre );

      var diffContainer;
      if( left.length !== right.length || jsondiffpatch.diff( left[ 0 ], right[ 0 ] ) ) {
         node.className = 'webpack-jasmine-fixup-json-message';
         node.addEventListener( 'click', function() {
            if( diffContainer ) {
               diffContainer.parentNode.removeChild( diffContainer );
               diffContainer = null;
               return;
            }
            diffContainer = document.createElement( 'DIV' );
            diffContainer.innerHTML = '<h3>diff:</h3>';
            // multiple right values occur e.g. when using toHaveBeenCalledWith
            right.forEach( function( rightItem ) {
               var delta = jsondiffpatch.diff( left[ 0 ], rightItem );
               diffContainer.innerHTML += '<br>' + jsondiffpatch.formatters.html
                  .format( delta, left )
                  .replace( NEWLINE_MATCHER, '\n' );
            } );
            node.appendChild( diffContainer );
         } );
      }
   }
558625
public UrlStringBuilder setPath(String... elements) {
        Validate.noNullElements(elements, "elements cannot be null");

        this.path.clear();
        this.addPath(elements);
        return this;
    }
718747
public MetadataContext addSuppressionPaths(@NonNull final String suppressionPath,
                                               @NonNull final String... otherPaths) {
        addSuppressionPath(suppressionPath);
        for (final String otherPath : otherPaths) {
            addSuppressionPath(otherPath);
        }
        return this;
    }
186513
function addThisDotProps(path) {
  path.replaceWith(
    t.memberExpression(
      t.memberExpression(t.thisExpression(), t.identifier('props')),
      path.node
    )
  );
}
743412
public SuppressionInfo forCompilationUnit(CompilationUnitTree tree, VisitorState state) {
    AtomicBoolean generated = new AtomicBoolean(false);
    new SimpleTreeVisitor<Void, Void>() {
      @Override
      public Void visitClass(ClassTree node, Void unused) {
        ClassSymbol symbol = ASTHelpers.getSymbol(node);
        generated.compareAndSet(false, symbol != null && isGenerated(symbol, state));
        return null;
      }
    }.visit(tree.getTypeDecls(), null);
    return new SuppressionInfo(suppressWarningsStrings, customSuppressions, generated.get());
  }
522579
public void updateAfterInsert(Suffix<T, S> suffix) {
        if (activeNode == root && suffix.isEmpty()) {
            activeNode = root;
            activeEdge = null;
            activeLength = 0;
        } else if (activeNode == root) {
            Object item = suffix.getStart();
            activeEdge = root.getEdgeStarting(item);
            decrementLength();
            fixActiveEdgeAfterSuffixLink(suffix);
            if (activeLength == 0)
                activeEdge = null;
        } else if (activeNode.hasSuffixLink()) {
            activeNode = activeNode.getSuffixLink();
            findTrueActiveEdge();
            fixActiveEdgeAfterSuffixLink(suffix);
            if (activeLength == 0)
                activeEdge = null;
        } else {
            activeNode = root;
            findTrueActiveEdge();
            fixActiveEdgeAfterSuffixLink(suffix);
            if (activeLength == 0)
                activeEdge = null;
        }
    }
1005185
void addSuppression(String suppression) {
    lazyInitInfo();

    if (info.suppressions == null) {
      info.suppressions = ImmutableSet.of(suppression);
    } else {
      info.suppressions = new ImmutableSet.Builder<String>()
          .addAll(info.suppressions)
          .add(suppression)
          .build();
    }
  }
309432
public static AccessibilityNodeInfoRef unOwned(
        AccessibilityNodeInfoCompat node) {
        return node != null ? new AccessibilityNodeInfoRef(node, false) : null;
    }
1191353
private void addSubtreeToCheckingStateTracking(DefaultMutableTreeNode node) {
        TreeNode[] path = node.getPath();   
        TreePath tp = new TreePath(path);
        CheckedNode cn = new CheckedNode(false, node.getChildCount() > 0, false);
        nodesCheckingState.put(tp, cn);
        for (int i = 0 ; i < node.getChildCount() ; i++) {              
            addSubtreeToCheckingStateTracking((DefaultMutableTreeNode) tp.pathByAddingChild(node.getChildAt(i)).getLastPathComponent());
        }
    }
1275435
private void addSuperOuterPath(TypeDeclaration node) {
    TypeElement superclass = ElementUtil.getSuperclass(node.getTypeElement());
    if (superclass != null && captureInfo.needsOuterParam(superclass)) {
      node.setSuperOuter(getOuterPathInherited(ElementUtil.getDeclaringClass(superclass)));
    }
  }