src/main/resources/repairability_test_files/ground_truth/Cardumen/patch2-Closure-10-Cardumen/Cardumen/0087/Cardumen_0087_t.java
/**
   * Given a node tree, finds all the VAR declarations in that tree that are
   * not in an inner scope. Then adds a new VAR node at the top of the current
   * scope that redeclares them, if necessary.
   */
Given a node tree, finds all the VAR declarations in that tree that are
not in an inner scope. Then adds a new VAR node at the top of the current
scope that redeclares them, if necessary.
Given a node tree finds all the VAR declarations in that tree that are not in an inner scope . Then adds a new VAR node at the top of the current scope that redeclares them if necessary .
static void redeclareVarsInsideBranch(Node branch) {
    Collection<Node> vars = getVarsDeclaredInBranch(branch);
    if (vars.isEmpty()) {
      return;
    }
    Node parent = getAddingRoot(branch);
    for (Node nameNode : vars) {
      Node var = IR.var(
          IR.name(nameNode.getString())
              .srcref(nameNode))
          .srcref(nameNode);
      copyNameAnnotations(nameNode, var.getFirstChild());
      parent.addChildToFront(var);
    }
  }
static void redeclareVarsInsideBranch ( Node branch ) { Collection < Node > vars = getVarsDeclaredInBranch ( branch ) ; if ( vars . isEmpty ( ) ) { return ; } Node parent = getAddingRoot ( branch ) ; for ( Node nameNode : vars ) { Node var = IR . var ( IR . name ( nameNode . getString ( ) ) . srcref ( nameNode ) ) . srcref ( nameNode ) ; copyNameAnnotations ( nameNode , var . getFirstChild ( ) ) ; parent . addChildToFront ( var ) ; } }
Given a node tree, finds all the VAR declarations in that tree that are
 not in an inner scope.
Given a node tree finds all the VAR declarations in that tree that are not in an inner scope .