code: private Node tryMinimizeNot(Node n) {
      checkArgument(n.isNot());
      Node parent = n.getParent();
  
      Node notChild = n.getFirstChild();
      // negative operator of the current one : == -> != for instance.
      Token complementOperator;
      switch (notChild.getToken()) {
        case EQ:
          complementOperator = Token.NE;
          break;
        case NE:
          complementOperator = Token.EQ;
          break;
        case SHEQ:
          complementOperator = Token.SHNE;
          break;
        case SHNE:
          complementOperator = Token.SHEQ;
          break;
        // GT, GE, LT, LE are not handled in this because !(x<NaN) != x>=NaN.
        default:
          return n;
      }
      Node newOperator = n.removeFirstChild();
      newOperator.setToken(complementOperator);
      parent.replaceChild(n, newOperator);
      reportChangeToEnclosingScope(parent);
      return newOperator;
    }
docs: Try to minimize NOT nodes such as !(x==y).
  
  Returns the replacement for n or the original if no change was made