code: private void tryRemoveRepeatedStatements(Node n) {
      // Only run this if variable names are guaranteed to be unique. Otherwise bad things can happen:
      // see PeepholeMinimizeConditionsTest#testDontRemoveDuplicateStatementsWithoutNormalization
      if (!isASTNormalized()) {
        return;
      }
      checkState(n.isIf(), n);
  
      Node parent = n.getParent();
      if (!NodeUtil.isStatementBlock(parent)) {
        // If the immediate parent is something like a label, we
        // can't move the statement, so bail.
        return;
      }
  
      Node cond = n.getFirstChild();
      Node trueBranch = cond.getNext();
      Node falseBranch = trueBranch.getNext();
      checkNotNull(trueBranch);
      checkNotNull(falseBranch);
  
      while (true) {
        Node lastTrue = trueBranch.getLastChild();
        Node lastFalse = falseBranch.getLastChild();
        if (lastTrue == null || lastFalse == null
            || !areNodesEqualForInlining(lastTrue, lastFalse)) {
          break;
        }
        lastTrue.detach();
        lastFalse.detach();
        parent.addChildAfter(lastTrue, n);
        reportChangeToEnclosingScope(parent);
      }
    }
docs: Try to remove duplicate statements from IF blocks. For example:
  
  if (a) {
  x = 1;
  return true;
  } else {
  x = 2;
  return true;
  }
  
  becomes:
  
  if (a) {
  x = 1;
  } else {
  x = 2;
  }
  return true;
  
  @param n The IF node to examine.