code: private void inlineConstReturn(Node parent, Node call, Node returnedValue) {
      Node retValue = returnedValue.cloneTree();
      parent.replaceChild(call, retValue);
      compiler.reportChangeToEnclosingScope(retValue);
    }
docs: Replace the provided object and its method call with the tree specified
  in returnedValue. Should be called only if the object reference has
  no side effects.