code: private static void replaceThis(Node expectedGetprop, Node replacement) {
      Node leftChild = expectedGetprop.getFirstChild();
      if (leftChild.isThis()) {
        expectedGetprop.replaceChild(leftChild, replacement);
      } else {
        replaceThis(leftChild, replacement);
      }
    }
docs: Finds the occurrence of "this" in the provided property tree and replaces
  it with replacement