nus-yam/ex-repair huggingface dataset:
Program: 144756
Project: 144756
Buggy source:
private void syncState(){
  this.data.clear();
  this.currentCmd=null;
  this.currentXmlns=null;
  this.popped=null;
  for (  StackFrameStep step : frame.getSteps()) {
    if (SessionFrame.STATE_DATUM_VAL.equals(step.getType())) {
      String key=step.getId();
      String value=step.getValue();
      data.put(key,value);
    }
 else     if (SessionFrame.STATE_COMMAND_ID.equals(step.getType())) {
      this.currentCmd=step.getId();
    }
 else     if (SessionFrame.STATE_FORM_XMLNS.equals(step.getType())) {
      this.currentXmlns=step.getId();
    }
  }
}

Fixed version (ground truth):
private void syncState(){
  this.data.clear();
  this.currentCmd=null;
  this.currentXmlns=null;
  this.popped=null;
  for (  StackFrameStep step : frame.getSteps()) {
    if (SessionFrame.STATE_DATUM_VAL.equals(step.getType())) {
      String key=step.getId();
      String value=step.getValue();
      if (key != null && value != null) {
        data.put(key,value);
      }
    }
 else     if (SessionFrame.STATE_COMMAND_ID.equals(step.getType())) {
      this.currentCmd=step.getId();
    }
 else     if (SessionFrame.STATE_FORM_XMLNS.equals(step.getType())) {
      this.currentXmlns=step.getId();
    }
  }
}
Program: 144757
Project: 144757
Buggy source:
public DisplayData evaluate(EvaluationContext ec){
  return new DisplayData(name.evaluate(ec),imageReference.evaluate(ec),audioReference.evaluate(ec));
}

Fixed version (ground truth):
public DisplayData evaluate(EvaluationContext ec){
  String imageRef=imageReference == null ? null : imageReference.evaluate(ec);
  String audioRef=audioReference == null ? null : audioReference.evaluate(ec);
  return new DisplayData(name.evaluate(ec),imageRef,audioRef);
}
Program: 144758
Project: 144758
Buggy source:
private void syncState(){
  this.data.clear();
  this.currentCmd=null;
  this.currentXmlns=null;
  this.popped=null;
  for (  StackFrameStep step : frame.getSteps()) {
    if (SessionFrame.STATE_DATUM_VAL.equals(step.getType())) {
      String key=step.getId();
      String value=step.getValue();
      data.put(key,value);
    }
 else     if (SessionFrame.STATE_COMMAND_ID.equals(step.getType())) {
      this.currentCmd=step.getId();
    }
 else     if (SessionFrame.STATE_FORM_XMLNS.equals(step.getType())) {
      this.currentXmlns=step.getId();
    }
  }
}

Fixed version (ground truth):
private void syncState(){
  this.data.clear();
  this.currentCmd=null;
  this.currentXmlns=null;
  this.popped=null;
  for (  StackFrameStep step : frame.getSteps()) {
    if (SessionFrame.STATE_DATUM_VAL.equals(step.getType())) {
      String key=step.getId();
      String value=step.getValue();
      if (key != null && value != null) {
        data.put(key,value);
      }
    }
 else     if (SessionFrame.STATE_COMMAND_ID.equals(step.getType())) {
      this.currentCmd=step.getId();
    }
 else     if (SessionFrame.STATE_FORM_XMLNS.equals(step.getType())) {
      this.currentXmlns=step.getId();
    }
  }
}
Program: 144759
Project: 144759
Buggy source:
/** 
 * Join this reference with the base reference argument.
 * @param baseRef an absolute reference or a relative reference with only'../'s
 * @return a join of this reference with the base reference argument.Returns a clone of this reference if it is absolute, and null if this reference has '../'s but baseRef argument a non-empty relative reference.
 */
public TreeReference parent(TreeReference baseRef){
  if (isAbsolute()) {
    return this.clone();
  }
 else {
    TreeReference newRef=baseRef.clone();
    if (refLevel > 0) {
      if (!baseRef.isAbsolute() && baseRef.size() == 0) {
        newRef.refLevel+=refLevel;
      }
 else {
        return null;
      }
    }
    for (    TreeReferenceLevel l : this.data) {
      newRef.add(l);
    }
    return newRef;
  }
}

Fixed version (ground truth):
/** 
 * Join this reference with the base reference argument.
 * @param baseRef an absolute reference or a relative reference with only'../'s
 * @return a join of this reference with the base reference argument.Returns a clone of this reference if it is absolute, and null if this reference has '../'s but baseRef argument a non-empty relative reference.
 */
public TreeReference parent(TreeReference baseRef){
  if (isAbsolute()) {
    return this.clone();
  }
 else {
    TreeReference newRef=baseRef.clone();
    if (refLevel > 0) {
      if (!baseRef.isAbsolute() && baseRef.size() == 0) {
        newRef.refLevel+=refLevel;
      }
 else {
        return null;
      }
    }
    for (    TreeReferenceLevel l : this.data) {
      newRef.add(l.shallowCopy());
    }
    return newRef;
  }
}
Program: 144760
Project: 144760
Buggy source:
/** 
 * Evaluate this reference in terms of a base absolute reference. For instance, anchoring ../../d/e/f to /a/b/c, results in  /a/d/e/f. NOTE: This function works when baseRef contains INDEX_UNBOUND multiplicites. Conditions depend on this behavior, but it is def slightly icky
 * @param baseRef an absolute reference to be anchored to.
 * @return null if base reference isn't absolute or there are too many'../'.
 */
public TreeReference anchor(TreeReference baseRef){
  if (isAbsolute()) {
    return this.clone();
  }
 else   if (!baseRef.isAbsolute() || (refLevel > baseRef.size())) {
    return null;
  }
 else {
    TreeReference newRef=baseRef.clone();
    for (int i=0; i < refLevel; i++) {
      newRef.removeLastLevel();
    }
    for (int i=0; i < size(); i++) {
      newRef.add(this.data.elementAt(i));
    }
    return newRef;
  }
}

Fixed version (ground truth):
/** 
 * Evaluate this reference in terms of a base absolute reference. For instance, anchoring ../../d/e/f to /a/b/c, results in  /a/d/e/f. NOTE: This function works when baseRef contains INDEX_UNBOUND multiplicites. Conditions depend on this behavior, but it is def slightly icky
 * @param baseRef an absolute reference to be anchored to.
 * @return null if base reference isn't absolute or there are too many'../'.
 */
public TreeReference anchor(TreeReference baseRef){
  if (isAbsolute()) {
    return this.clone();
  }
 else   if (!baseRef.isAbsolute() || (refLevel > baseRef.size())) {
    return null;
  }
 else {
    TreeReference newRef=baseRef.clone();
    for (int i=0; i < refLevel; i++) {
      newRef.removeLastLevel();
    }
    for (int i=0; i < size(); i++) {
      newRef.add(this.data.elementAt(i).shallowCopy());
    }
    return newRef;
  }
}
Program: 144761
Project: 144761
Buggy source:
/** 
 * Return a copy of the reference
 */
public TreeReference clone(){
  TreeReference newRef=new TreeReference();
  newRef.setRefLevel(this.refLevel);
  for (  TreeReferenceLevel l : data) {
    newRef.add(l);
  }
  if (instanceName != null) {
    newRef.setInstanceName(instanceName);
  }
  newRef.contextType=this.contextType;
  return newRef;
}

Fixed version (ground truth):
/** 
 * Return a copy of the reference
 */
public TreeReference clone(){
  TreeReference newRef=new TreeReference();
  newRef.setRefLevel(this.refLevel);
  for (  TreeReferenceLevel l : data) {
    newRef.add(l.shallowCopy());
  }
  if (instanceName != null) {
    newRef.setInstanceName(instanceName);
  }
  newRef.contextType=this.contextType;
  return newRef;
}
Program: 144763
Project: 144763
Buggy source:
public Vector getChildrenWithName(String name){
  return cache().getChildrenWithName(name);
}

Fixed version (ground truth):
public Vector getChildrenWithName(String name){
  Vector children=super.getChildrenWithName(CaseChildElement.this.parent.intern(name));
  if (done[0] == false) {
    return children;
  }
  if (children.size() == 0) {
    TreeElement emptyNode=new TreeElement(name);
    emptyNode.setAttribute(null,"String_Node_Str","String_Node_Str");
    this.addChild(emptyNode);
    emptyNode.setParent(this);
    children.add(emptyNode);
  }
  return children;
}
Program: 144766
Project: 144766
Buggy source:
public EvaluationContext getEvaluationContext(InstanceInitializationFactory iif){
  if (getCommand() == null) {
    return new EvaluationContext(null);
  }
  Entry entry=getEntriesForCommand(getCommand()).elementAt(0);
  Hashtable<String,DataInstance> instances=entry.getInstances();
  for (Enumeration en=instances.keys(); en.hasMoreElements(); ) {
    String key=(String)en.nextElement();
    instances.get(key).initialize(iif,key);
  }
  return new EvaluationContext(null,instances);
}

Fixed version (ground truth):
/** 
 * Retrieve an evaluation context in which to evaluate expressions in the context of a given command in the installed app
 * @param iif the instance initializer for the current platform
 * @return Evaluation context for a command in the installed app
 */
public EvaluationContext getEvaluationContext(InstanceInitializationFactory iif,String command){
  if (command == null) {
    return new EvaluationContext(null);
  }
  Entry entry=getEntriesForCommand(command).elementAt(0);
  Hashtable<String,DataInstance> instances=entry.getInstances();
  for (Enumeration en=instances.keys(); en.hasMoreElements(); ) {
    String key=(String)en.nextElement();
    instances.get(key).initialize(iif,key);
  }
  return new EvaluationContext(null,instances);
}
Program: 144767
Project: 144767
Buggy source:
private int getDataType(String type){
  int dataType=Constants.DATATYPE_NULL;
  if (type != null) {
    if (type.indexOf("String_Node_Str") != -1) {
      type=type.substring(type.indexOf("String_Node_Str") + 1);
    }
    if (typeMappings.containsKey(type)) {
      dataType=((Integer)typeMappings.get(type)).intValue();
    }
 else {
      dataType=Constants.DATATYPE_UNSUPPORTED;
      reporter.warning(XFormParserReporter.TYPE_ERROR_PRONE,"String_Node_Str" + type + "String_Node_Str",null);
    }
  }
  return dataType;
}

Fixed version (ground truth):
/** 
 * Gets the datatype id corresponding to type string passed it. Undefined types result in returning the unsupported datatype id and raising a warning.
 * @param type is the String value of a elements's type attribute.
 * @return int representing datatype id
 */
private int getDataType(String type){
  int dataType=Constants.DATATYPE_NULL;
  if (type != null) {
    if (type.indexOf("String_Node_Str") != -1) {
      type=type.substring(type.indexOf("String_Node_Str") + 1);
    }
    if (typeMappings.containsKey(type)) {
      dataType=((Integer)typeMappings.get(type)).intValue();
    }
 else {
      dataType=Constants.DATATYPE_UNSUPPORTED;
      reporter.warning(XFormParserReporter.TYPE_ERROR_PRONE,"String_Node_Str" + type + "String_Node_Str",null);
    }
  }
  return dataType;
}
Program: 144769
Project: 144769
Buggy source:
private void parseElement(Element e,Object parent,Hashtable<String,IElementHandler> handlers){
  String name=e.getName();
  String[] suppressWarningArr={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  Vector<String> suppressWarning=new Vector<String>();
  for (int i=0; i < suppressWarningArr.length; i++) {
    suppressWarning.addElement(suppressWarningArr[i]);
  }
  IElementHandler eh=handlers.get(name);
  if (eh != null) {
    eh.handle(this,e,parent);
  }
 else {
    if (!suppressWarning.contains(name)) {
      reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP,"String_Node_Str" + name + "String_Node_Str",getVagueLocation(e));
    }
    for (int i=0; i < e.getChildCount(); i++) {
      if (e.getType(i) == Element.ELEMENT) {
        parseElement(e.getElement(i),parent,handlers);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @param element  is the current element we are parsing
 * @param parent   is the parent to the element we are parsing
 * @param handlers maps tags to IElementHandlers, used to perform parsing of that tag
 */
private void parseElement(Element e,Object parent,Hashtable<String,IElementHandler> handlers){
  String name=e.getName();
  String namespace=e.getNamespace();
  String[] suppressWarningArr={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  Vector<String> suppressWarning=new Vector<String>();
  for (int i=0; i < suppressWarningArr.length; i++) {
    suppressWarning.addElement(suppressWarningArr[i]);
  }
  IElementHandler eh=handlers.get(name);
  if (eh != null) {
    eh.handle(this,e,parent);
  }
 else {
    if (inSpecExtension(namespace,name)) {
      parseUnregisteredSpecExtension(namespace,name,e,parent,handlers);
    }
 else {
      if (!suppressWarning.contains(name)) {
        reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP,"String_Node_Str" + name + "String_Node_Str",getVagueLocation(e));
      }
      for (int i=0; i < e.getChildCount(); i++) {
        if (e.getType(i) == Element.ELEMENT) {
          parseElement(e.getElement(i),parent,handlers);
        }
      }
    }
  }
}
Program: 144770
Project: 144770
Buggy source:
public static void addDataType(String type,int dataType){
  typeMappings.put(type,DataUtil.integer(dataType));
}

Fixed version (ground truth):
/** 
 * Register a type to datatype id mapping
 * @param type is the String value of a elements's type attribute.
 * @param int  representing datatype id defined in Constants
 */
public static void addDataType(String type,int dataType){
  typeMappings.put(type,DataUtil.integer(dataType));
}
Program: 144771
Project: 144771
Buggy source:
public void doTests(){
  TreeElement root=null;
  EvaluationContext ec=new EvaluationContext(null);
  TreeElementParser parser;
  try {
    InputStream is=System.class.getResourceAsStream(formPath);
    parser=new TreeElementParser(ElementParser.instantiateParser(is),0,"String_Node_Str");
  }
 catch (  IOException e) {
    fail("String_Node_Str" + formPath);
    return;
  }
  try {
    root=parser.parse();
  }
 catch (  Exception e) {
    fail("String_Node_Str" + formPath);
    return;
  }
  FormInstance instance=null;
  try {
    instance=new FormInstance(root,"String_Node_Str");
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
  testEval("String_Node_Str",instance,null,new Double(2));
}

Fixed version (ground truth):
public void doTests(){
  TreeElement root=null;
  EvaluationContext ec=new EvaluationContext(null);
  TreeElementParser parser;
  try {
    InputStream is=System.class.getResourceAsStream(formPath);
    parser=new TreeElementParser(ElementParser.instantiateParser(is),0,"String_Node_Str");
  }
 catch (  IOException e) {
    fail("String_Node_Str" + formPath);
    return;
  }
  try {
    root=parser.parse();
  }
 catch (  Exception e) {
    fail("String_Node_Str" + formPath);
    return;
  }
  FormInstance instance=null;
  try {
    instance=new FormInstance(root,"String_Node_Str");
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
  testEval("String_Node_Str",instance,null,"String_Node_Str");
  testEval("String_Node_Str",instance,null,"String_Node_Str");
}
Program: 144773
Project: 144773
Buggy source:
public static Vector<Integer> union(Vector<Integer> a,Vector<Integer> b){
  Vector<Integer> u=new Vector<Integer>();
  for (  Integer i : a) {
    if (b.contains(i)) {
      u.addElement(i);
    }
  }
  return u;
}

Fixed version (ground truth):
public <T>Vector<T> union(Vector<T> a,Vector<T> b){
  Vector<T> u=new Vector<T>();
  for (  T i : a) {
    if (b.contains(i)) {
      u.addElement(i);
    }
  }
  return u;
}
Program: 144775
Project: 144775
Buggy source:
public static Vector<Integer> union(Vector<Integer> a,Vector<Integer> b){
  Vector<Integer> u=new Vector<Integer>();
  for (  Integer i : a) {
    if (b.contains(i)) {
      u.addElement(i);
    }
  }
  return u;
}

Fixed version (ground truth):
public <T>Vector<T> union(Vector<T> a,Vector<T> b){
  Vector<T> u=new Vector<T>();
  for (  T i : a) {
    if (b.contains(i)) {
      u.addElement(i);
    }
  }
  return u;
}
Program: 144776
Project: 144776
Buggy source:
/** 
 * Returns the subreference of this reference up to the level specified. Used to identify the reference context for a predicate at the same level Must be an absolute reference, otherwise will throw IllegalArgumentException
 * @param i
 * @return
 */
public TreeReference getSubReference(int level){
  if (!this.isAbsolute()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  TreeReference ret=new TreeReference();
  ret.refLevel=this.refLevel;
  ret.contextType=this.contextType;
  ret.instanceName=this.instanceName;
  ret.data=new Vector<TreeReferenceLevel>();
  for (int i=0; i <= level; ++i) {
    ret.data.addElement(this.data.elementAt(i));
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Returns the subreference of this reference up to the level specified. For instance, for the reference: (/data/path/to/node).getSubreference(2) => /data/path/to Used to identify the reference context for a predicate at the same level Must be an absolute reference, otherwise will throw IllegalArgumentException
 * @param i
 * @return
 */
public TreeReference getSubReference(int level){
  if (!this.isAbsolute()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  TreeReference ret=new TreeReference();
  ret.refLevel=this.refLevel;
  ret.contextType=this.contextType;
  ret.instanceName=this.instanceName;
  ret.data=new Vector<TreeReferenceLevel>();
  for (int i=0; i <= level; ++i) {
    ret.data.addElement(this.data.elementAt(i));
  }
  return ret;
}
Program: 144778
Project: 144778
Buggy source:
public void doTest(int i){
switch (i) {
case 1:
    testClones();
  break;
case 2:
testSerialization();
break;
case 3:
testParentage();
break;
case 4:
testIntersection();
break;
case 5:
contextualization();
break;
case 6:
testPredicates();
break;
case 7:
testGenericize();
break;
}
}

Fixed version (ground truth):
public void doTest(int i){
switch (i) {
case 1:
    testClones();
  break;
case 2:
testSerialization();
break;
case 3:
testParentage();
break;
case 4:
testIntersection();
break;
case 5:
contextualization();
break;
case 6:
testPredicates();
break;
case 7:
testGenericize();
break;
case 8:
testSubreferences();
break;
}
}
Program: 144779
Project: 144779
Buggy source:
private void testEval(String expr,FormInstance model,EvaluationContext ec,Object expected,double tolerance){
  XPathExpression xpe=null;
  boolean exceptionExpected=(expected instanceof XPathException);
  if (ec == null) {
    ec=new EvaluationContext(model);
  }
  try {
    xpe=XPathParseTool.parseXPath(expr);
  }
 catch (  XPathSyntaxException xpse) {
  }
  if (xpe == null) {
    fail("String_Node_Str" + expr);
  }
  try {
    Object result=xpe.eval(model,ec);
    if (tolerance != XPathFuncExpr.DOUBLE_TOLERANCE) {
      System.out.println(expr + "String_Node_Str" + result);
    }
    if (exceptionExpected) {
      fail("String_Node_Str" + expr);
    }
 else     if ((result instanceof Double && expected instanceof Double)) {
      Double o=((Double)result).doubleValue();
      Double t=((Double)expected).doubleValue();
      if (Math.abs(o - t) > tolerance) {
        fail("String_Node_Str" + o + "String_Node_Str"+ t+ "String_Node_Str");
      }
    }
 else     if (!expected.equals(result)) {
      fail("String_Node_Str" + expected + "String_Node_Str"+ result);
    }
  }
 catch (  XPathException xpex) {
    if (!exceptionExpected) {
      fail("String_Node_Str" + xpex.getClass() + "String_Node_Str");
    }
 else     if (xpex.getClass() != expected.getClass()) {
      fail("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void testEval(String expr,FormInstance model,EvaluationContext ec,Object expected,double tolerance){
  XPathExpression xpe=null;
  boolean exceptionExpected=(expected instanceof XPathException);
  if (ec == null) {
    ec=new EvaluationContext(model);
  }
  try {
    xpe=XPathParseTool.parseXPath(expr);
  }
 catch (  XPathSyntaxException xpse) {
  }
  if (xpe == null) {
    fail("String_Node_Str" + expr);
  }
  try {
    Object result=XPathFuncExpr.unpack(xpe.eval(model,ec));
    if (tolerance != XPathFuncExpr.DOUBLE_TOLERANCE) {
      System.out.println(expr + "String_Node_Str" + result);
    }
    if (exceptionExpected) {
      fail("String_Node_Str" + expr);
    }
 else     if ((result instanceof Double && expected instanceof Double)) {
      Double o=((Double)result).doubleValue();
      Double t=((Double)expected).doubleValue();
      if (Math.abs(o - t) > tolerance) {
        fail("String_Node_Str" + o + "String_Node_Str"+ t+ "String_Node_Str");
      }
    }
 else     if (!expected.equals(result)) {
      fail("String_Node_Str" + expected + "String_Node_Str"+ result);
    }
  }
 catch (  XPathException xpex) {
    if (!exceptionExpected) {
      fail("String_Node_Str" + xpex.getClass() + "String_Node_Str");
    }
 else     if (xpex.getClass() != expected.getClass()) {
      fail("String_Node_Str");
    }
  }
}
Program: 144782
Project: 144782
Buggy source:
public DataInstance(String instanceid){
  this.instanceid=instanceid;
  referenceCache=new CacheTable<TreeReference,T>();
}

Fixed version (ground truth):
public DataInstance(String instanceid){
  this.instanceid=instanceid;
}
Program: 144783
Project: 144783
Buggy source:
public void writeExternal(DataOutputStream out) throws IOException {
  ExtUtil.writeString(out,id);
  ExtUtil.write(out,title);
  ExtUtil.writeString(out,titleForm);
  ExtUtil.write(out,new ExtWrapList(ArrayUtilities.toVector(details)));
  ExtUtil.write(out,new ExtWrapList(ArrayUtilities.toVector(fields)));
  ExtUtil.write(out,new ExtWrapMap(variables));
  ExtUtil.write(out,new ExtWrapNullable(action));
}

Fixed version (ground truth):
public void writeExternal(DataOutputStream out) throws IOException {
  ExtUtil.writeString(out,id);
  ExtUtil.write(out,title);
  ExtUtil.write(out,new ExtWrapNullable(titleForm));
  ExtUtil.write(out,new ExtWrapList(ArrayUtilities.toVector(details)));
  ExtUtil.write(out,new ExtWrapList(ArrayUtilities.toVector(fields)));
  ExtUtil.write(out,new ExtWrapMap(variables));
  ExtUtil.write(out,new ExtWrapNullable(action));
}
Program: 144784
Project: 144784
Buggy source:
public void readExternal(DataInputStream in,PrototypeFactory pf) throws IOException, DeserializationException {
  id=ExtUtil.readString(in);
  title=(Text)ExtUtil.read(in,Text.class,pf);
  titleForm=ExtUtil.readString(in);
  Vector<Detail> theDetails=(Vector<Detail>)ExtUtil.read(in,new ExtWrapList(Detail.class),pf);
  details=new Detail[theDetails.size()];
  ArrayUtilities.copyIntoArray(theDetails,details);
  Vector<DetailField> theFields=(Vector<DetailField>)ExtUtil.read(in,new ExtWrapList(DetailField.class),pf);
  fields=new DetailField[theFields.size()];
  ArrayUtilities.copyIntoArray(theFields,fields);
  variables=(OrderedHashtable<String,String>)ExtUtil.read(in,new ExtWrapMap(String.class,String.class,ExtWrapMap.TYPE_SLOW_READ_ONLY));
  action=(Action)ExtUtil.read(in,new ExtWrapNullable(Action.class),pf);
}

Fixed version (ground truth):
public void readExternal(DataInputStream in,PrototypeFactory pf) throws IOException, DeserializationException {
  id=ExtUtil.readString(in);
  title=(Text)ExtUtil.read(in,Text.class,pf);
  titleForm=(String)ExtUtil.read(in,new ExtWrapNullable(String.class));
  Vector<Detail> theDetails=(Vector<Detail>)ExtUtil.read(in,new ExtWrapList(Detail.class),pf);
  details=new Detail[theDetails.size()];
  ArrayUtilities.copyIntoArray(theDetails,details);
  Vector<DetailField> theFields=(Vector<DetailField>)ExtUtil.read(in,new ExtWrapList(DetailField.class),pf);
  fields=new DetailField[theFields.size()];
  ArrayUtilities.copyIntoArray(theFields,fields);
  variables=(OrderedHashtable<String,String>)ExtUtil.read(in,new ExtWrapMap(String.class,String.class,ExtWrapMap.TYPE_SLOW_READ_ONLY));
  action=(Action)ExtUtil.read(in,new ExtWrapNullable(Action.class),pf);
}
Program: 144785
Project: 144785
Buggy source:
public TreeElement getChild(String name,int multiplicity){
  if (this.children == null) {
    return null;
  }
  if (name.equals(TreeReference.NAME_WILDCARD)) {
    if (multiplicity == TreeReference.INDEX_TEMPLATE || this.children.size() < multiplicity + 1) {
      return null;
    }
    return (TreeElement)this.children.elementAt(multiplicity);
  }
 else {
    for (int i=0; i < this.children.size(); i++) {
      TreeElement child=(TreeElement)this.children.elementAt(i);
      if ((name.hashCode() == child.getName().hashCode()) || name.equals(child.getName()) && child.getMult() == multiplicity) {
        return child;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public TreeElement getChild(String name,int multiplicity){
  if (this.children == null) {
    return null;
  }
  if (name.equals(TreeReference.NAME_WILDCARD)) {
    if (multiplicity == TreeReference.INDEX_TEMPLATE || this.children.size() < multiplicity + 1) {
      return null;
    }
    return (TreeElement)this.children.elementAt(multiplicity);
  }
 else {
    for (int i=0; i < this.children.size(); i++) {
      TreeElement child=(TreeElement)this.children.elementAt(i);
      if (((name.hashCode() == child.getName().hashCode()) || name.equals(child.getName())) && child.getMult() == multiplicity) {
        return child;
      }
    }
  }
  return null;
}
Program: 144787
Project: 144787
Buggy source:
private void saveInstanceNode(Element instance){
  Element instanceNode=null;
  String instanceId=instance.getAttributeValue("String_Node_Str","String_Node_Str");
  for (int i=0; i < instance.getChildCount(); i++) {
    if (instance.getType(i) == Node.ELEMENT) {
      if (instanceNode != null) {
        throw new XFormParseException("String_Node_Str",instance);
      }
 else {
        instanceNode=instance.getElement(i);
      }
    }
  }
  if (instanceNode == null) {
    instanceNode=instance;
  }
  if (mainInstanceNode == null) {
    mainInstanceNode=instanceNode;
  }
  instanceNodes.addElement(instanceNode);
  instanceNodeIdStrs.addElement(instanceId);
}

Fixed version (ground truth):
private void saveInstanceNode(Element instance){
  Element instanceNode=null;
  String instanceId=instance.getAttributeValue("String_Node_Str","String_Node_Str");
  for (int i=0; i < instance.getChildCount(); i++) {
    if (instance.getType(i) == Node.ELEMENT) {
      if (instanceNode != null) {
        throw new XFormParseException("String_Node_Str",instance);
      }
 else {
        instanceNode=instance.getElement(i);
      }
    }
  }
  if (instanceNode == null) {
    instanceNode=instance;
  }
  if (mainInstanceNode == null) {
    mainInstanceNode=instanceNode;
  }
 else   if (instanceId == null) {
    throw new XFormParseException("String_Node_Str",instance);
  }
  instanceNodes.addElement(instanceNode);
  instanceNodeIdStrs.addElement(instanceId);
}
Program: 144788
Project: 144788
Buggy source:
private void parseDoc(){
  _f=new FormDef();
  initState();
  defaultNamespace=_xmldoc.getRootElement().getNamespaceUri(null);
  parseElement(_xmldoc.getRootElement(),_f,topLevelHandlers);
  collapseRepeatGroups(_f);
  if (instanceNodes.size() > 1) {
    for (int i=1; i < instanceNodes.size(); i++) {
      Element e=instanceNodes.elementAt(i);
      String srcLocation=e.getAttributeValue(null,"String_Node_Str");
      DataInstance di;
      if (e.getChildCount() == 0 && srcLocation != null) {
        di=new ExternalDataInstance(srcLocation,instanceNodeIdStrs.elementAt(i));
      }
 else {
        FormInstance fi=parseInstance(e,false);
        loadInstanceData(e,fi.getRoot(),_f);
        di=fi;
      }
      _f.addNonMainInstance(di);
    }
  }
  if (mainInstanceNode != null) {
    FormInstance fi=parseInstance(mainInstanceNode,true);
    addMainInstanceToFormDef(mainInstanceNode,fi);
    _f.setInstance(fi);
  }
}

Fixed version (ground truth):
private void parseDoc(){
  _f=new FormDef();
  initState();
  defaultNamespace=_xmldoc.getRootElement().getNamespaceUri(null);
  parseElement(_xmldoc.getRootElement(),_f,topLevelHandlers);
  collapseRepeatGroups(_f);
  if (instanceNodes.size() > 1) {
    for (int i=1; i < instanceNodes.size(); i++) {
      Element e=instanceNodes.elementAt(i);
      String srcLocation=e.getAttributeValue(null,"String_Node_Str");
      String instanceid=instanceNodeIdStrs.elementAt(i);
      DataInstance di;
      if (srcLocation != null) {
        if (e.getChildCount() > 0) {
          for (int k=0; k < e.getChildCount(); ++k) {
switch (e.getType(k)) {
case Element.TEXT:
              if ("String_Node_Str".equals(e.getText(i).trim())) {
                continue;
              }
case Element.IGNORABLE_WHITESPACE:
            continue;
case Element.ELEMENT:
          throw new XFormParseException("String_Node_Str" + instanceid + "String_Node_Str",e);
      }
    }
  }
  di=new ExternalDataInstance(srcLocation,instanceid);
}
 else {
  FormInstance fi=parseInstance(e,false);
  loadInstanceData(e,fi.getRoot(),_f);
  di=fi;
}
_f.addNonMainInstance(di);
}
}
if (mainInstanceNode != null) {
FormInstance fi=parseInstance(mainInstanceNode,true);
addMainInstanceToFormDef(mainInstanceNode,fi);
_f.setInstance(fi);
}
}
Program: 144789
Project: 144789
Buggy source:
public SendNowSendLaterForm(CommandListener activity,ItemStateListener itemListener,boolean cacheAutomatically){
  super(cacheAutomatically ? Localization.get("String_Node_Str") : Localization.get("String_Node_Str"));
  setCommandListener(activity);
  setItemStateListener(itemListener);
  if (!cacheAutomatically) {
    this.cg=new ChoiceGroup(Localization.get("String_Node_Str"),Choice.EXCLUSIVE);
    this.cg.append(Localization.get("String_Node_Str"),null);
    this.cg.append(Localization.get("String_Node_Str"),null);
    append(this.cg);
  }
 else {
    StringItem message=new StringItem(null,Localization.get("String_Node_Str"));
    this.append(message);
    this.addCommand(commandOk);
  }
  append(new Spacer(80,0));
}

Fixed version (ground truth):
public SendNowSendLaterForm(CommandListener activity,ItemStateListener itemListener,boolean cacheAutomatically){
  super(cacheAutomatically ? Localization.get("String_Node_Str") : Localization.get("String_Node_Str"));
  setCommandListener(activity);
  if (!cacheAutomatically) {
    this.cg=new ChoiceGroup(Localization.get("String_Node_Str"),Choice.EXCLUSIVE);
    setItemStateListener(itemListener);
    this.cg.append(Localization.get("String_Node_Str"),null);
    this.cg.append(Localization.get("String_Node_Str"),null);
    append(this.cg);
  }
 else {
    StringItem message=new StringItem(null,Localization.get("String_Node_Str"));
    this.append(message);
    this.addCommand(commandOk);
  }
  append(new Spacer(80,0));
}
Program: 144790
Project: 144790
Buggy source:
public boolean initialize(CommCareInstance instance) throws ResourceInitializationException {
  if (cache == null) {
    Localization.registerLanguageReference(locale,localReference);
  }
 else {
    Localization.getGlobalLocalizerAdvanced().registerLocaleResource(locale,new TableLocaleSource(cache));
  }
  return true;
}

Fixed version (ground truth):
public boolean initialize(CommCareInstance instance) throws ResourceInitializationException {
  if (cache == null) {
    Localization.registerLanguageReference(locale,localReference);
  }
 else {
    Localization.getGlobalLocalizerAdvanced().addAvailableLocale(locale);
    Localization.getGlobalLocalizerAdvanced().registerLocaleResource(locale,new TableLocaleSource(cache));
  }
  return true;
}
Program: 144791
Project: 144791
Buggy source:
private static int extractNextIndex(String text,String[] args){
  int start=text.indexOf("String_Node_Str");
  int end=text.indexOf("String_Node_Str");
  if (start != -1 && end != -1) {
    String val=text.substring(start + "String_Node_Str".length(),end);
    try {
      int index=Integer.parseInt(val);
      if (index >= 0 && index < args.length) {
        return index;
      }
    }
 catch (    NumberFormatException nfe) {
      return -1;
    }
  }
  return -1;
}

Fixed version (ground truth):
private static int extractNextIndex(String text,String[] args){
  int start=text.indexOf("String_Node_Str");
  int end=text.indexOf("String_Node_Str",start);
  if (start != -1 && end != -1) {
    String val=text.substring(start + "String_Node_Str".length(),end);
    try {
      int index=Integer.parseInt(val);
      if (index >= 0 && index < args.length) {
        return index;
      }
    }
 catch (    NumberFormatException nfe) {
      return -1;
    }
  }
  return -1;
}
Program: 144792
Project: 144792
Buggy source:
private static String[] replaceFirstValue(String text,String value){
  int start=text.indexOf("String_Node_Str");
  int end=text.indexOf("String_Node_Str");
  return new String[]{text.substring(0,start) + value,text.substring(end + 1,text.length())};
}

Fixed version (ground truth):
private static String[] replaceFirstValue(String text,String value){
  int start=text.indexOf("String_Node_Str");
  int end=text.indexOf("String_Node_Str",start);
  return new String[]{text.substring(0,start) + value,text.substring(end + 1,text.length())};
}
Program: 144793
Project: 144793
Buggy source:
public void run(){
  holder[0]=Localizer.processArguments(holder[0],res);
}

Fixed version (ground truth):
public void run(){
  holder[0]=Localizer.processArguments("String_Node_Str",res);
}
Program: 144794
Project: 144794
Buggy source:
public void testLinearSub(){
  final String F="String_Node_Str";
  final String S="String_Node_Str";
  final String C="String_Node_Str";
  final String D="String_Node_Str";
  final String[] res=new String[]{"String_Node_Str","String_Node_Str"};
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),F);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F,S}),F + "String_Node_Str" + S);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),"String_Node_Str" + F);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),"String_Node_Str" + F + "String_Node_Str");
  final String[] holder=new String[1];
  runAsync(new Runnable(){
    public void run(){
      holder[0]=Localizer.processArguments("String_Node_Str",new String[]{C});
    }
  }
);
  assertEquals(holder[0],C);
  runAsync(new Runnable(){
    public void run(){
      holder[0]=Localizer.processArguments("String_Node_Str",new String[]{D});
    }
  }
);
  assertEquals(holder[0],D);
  runAsync(new Runnable(){
    public void run(){
      holder[0]=Localizer.processArguments(holder[0],res);
    }
  }
);
  assertEquals(holder[0],res[1] + res[0]);
}

Fixed version (ground truth):
public void testLinearSub(){
  final String F="String_Node_Str";
  final String S="String_Node_Str";
  final String C="String_Node_Str";
  final String D="String_Node_Str";
  final String[] res=new String[]{"String_Node_Str","String_Node_Str"};
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),F);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F,S}),F + "String_Node_Str" + S);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),"String_Node_Str" + F);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),"String_Node_Str" + F + "String_Node_Str");
  final String[] holder=new String[1];
  runAsync(new Runnable(){
    public void run(){
      holder[0]=Localizer.processArguments("String_Node_Str",new String[]{C});
    }
  }
);
  assertEquals(holder[0],C);
  runAsync(new Runnable(){
    public void run(){
      holder[0]=Localizer.processArguments("String_Node_Str",new String[]{D});
    }
  }
);
  assertEquals(holder[0],D);
  runAsync(new Runnable(){
    public void run(){
      holder[0]=Localizer.processArguments(holder[0],res);
    }
  }
);
  assertEquals(holder[0],res[1] + res[0]);
  runAsync(new Runnable(){
    public void run(){
      holder[0]=Localizer.processArguments("String_Node_Str",res);
    }
  }
);
  assertEquals(holder[0],"String_Node_Str" + res[1]);
}
Program: 144795
Project: 144795
Buggy source:
protected void checkNode(String[] names) throws InvalidStructureException {
  boolean checksOut=false;
  for (  String name : names) {
    if (parser.getName().toLowerCase().equals(name)) {
      checksOut=true;
    }
  }
  if (!checksOut) {
    int eventType=-1;
    try {
      eventType=parser.getEventType();
    }
 catch (    XmlPullParserException xppe) {
    }
    String oneOf=null;
    if (names.length == 1) {
      oneOf="String_Node_Str" + names[0] + "String_Node_Str";
    }
 else {
      oneOf="String_Node_Str";
      for (      String name : names) {
        oneOf+="String_Node_Str" + name + "String_Node_Str";
      }
      oneOf+="String_Node_Str";
    }
    throw new InvalidStructureException("String_Node_Str" + oneOf + (eventType == KXmlParser.END_TAG ? "String_Node_Str" : "String_Node_Str")+ parser.getName()+ "String_Node_Str",parser);
  }
}

Fixed version (ground truth):
protected void checkNode(String[] names) throws InvalidStructureException {
  boolean checksOut=false;
  if (parser.getName() == null) {
  }
 else {
    for (    String name : names) {
      if (parser.getName().toLowerCase().equals(name)) {
        checksOut=true;
      }
    }
  }
  if (!checksOut) {
    int eventType=-1;
    try {
      eventType=parser.getEventType();
    }
 catch (    XmlPullParserException xppe) {
    }
    String oneOf=null;
    if (names.length == 1) {
      oneOf="String_Node_Str" + names[0] + "String_Node_Str";
    }
 else {
      oneOf="String_Node_Str";
      for (      String name : names) {
        oneOf+="String_Node_Str" + name + "String_Node_Str";
      }
      oneOf+="String_Node_Str";
    }
    String foundInstead="String_Node_Str";
    if (eventType == KXmlParser.END_TAG) {
      foundInstead="String_Node_Str" + parser.getName() + "String_Node_Str";
    }
 else     if (eventType == KXmlParser.START_TAG) {
      foundInstead="String_Node_Str" + parser.getName() + "String_Node_Str";
    }
 else     if (eventType == KXmlParser.TEXT) {
      foundInstead="String_Node_Str" + parser.getText() + "String_Node_Str";
    }
 else {
      foundInstead="String_Node_Str";
    }
    throw new InvalidStructureException("String_Node_Str" + oneOf + foundInstead+ "String_Node_Str",parser);
  }
}
Program: 144797
Project: 144797
Buggy source:
private TreeElement cache(){
  if (recordId == TreeReference.INDEX_TEMPLATE) {
    return empty;
  }
synchronized (parent.treeCache) {
    TreeElement element=parent.treeCache.retrieve(recordId);
    if (element != null) {
      return element;
    }
    TreeElement cacheBuilder=new TreeElement("String_Node_Str");
    Stock s=parent.storage.read(recordId);
    entityId=s.getEntiyId();
    cacheBuilder=new TreeElement("String_Node_Str");
    cacheBuilder.setMult(this.mult);
    cacheBuilder.setAttribute(null,"String_Node_Str",s.getEntiyId());
    TreeElement product;
    String[] productList=s.getProductList();
    for (int i=0; i < productList.length; ++i) {
      product=new TreeElement("String_Node_Str");
      product.setAttribute(null,"String_Node_Str",productList[i]);
      product.setValue(new IntegerData(s.getProductValue(productList[i])));
      cacheBuilder.addChild(product);
    }
    cacheBuilder.setParent(this.parent);
    parent.treeCache.register(recordId,cacheBuilder);
    return cacheBuilder;
  }
}

Fixed version (ground truth):
private TreeElement cache(){
  if (recordId == TreeReference.INDEX_TEMPLATE) {
    return empty;
  }
synchronized (parent.treeCache) {
    TreeElement element=parent.treeCache.retrieve(recordId);
    if (element != null) {
      return element;
    }
    TreeElement cacheBuilder=new TreeElement("String_Node_Str");
    Stock s=parent.storage.read(recordId);
    entityId=s.getEntiyId();
    cacheBuilder=new TreeElement("String_Node_Str");
    cacheBuilder.setMult(this.mult);
    cacheBuilder.setAttribute(null,"String_Node_Str",s.getEntiyId());
    TreeElement product;
    String[] productList=s.getProductList();
    for (int i=0; i < productList.length; ++i) {
      product=new TreeElement("String_Node_Str",i);
      product.setAttribute(null,"String_Node_Str",productList[i]);
      product.setValue(new IntegerData(s.getProductValue(productList[i])));
      cacheBuilder.addChild(product);
    }
    cacheBuilder.setParent(this.parent);
    parent.treeCache.register(recordId,cacheBuilder);
    return cacheBuilder;
  }
}
Program: 144798
Project: 144798
Buggy source:
public CommCareConfigEngine(OutputStream output){
  this.output=output;
  this.print=new PrintStream(output);
  suites=new Vector<Suite>();
  this.instance=new CommCareInstance(){
    public void registerSuite(    Suite s){
      CommCareConfigEngine.this.suites.add(s);
    }
    public void setProfile(    Profile p){
      CommCareConfigEngine.this.profile=p;
    }
    public int getMajorVersion(){
      return 2;
    }
    public int getMinorVersion(){
      return 9;
    }
  }
;
  setRoots();
  table=ResourceTable.RetrieveTable(new DummyIndexedStorageUtility());
  StorageManager.setStorageFactory(new IStorageFactory(){
    public IStorageUtility newStorage(    String name,    Class type){
      return new DummyIndexedStorageUtility();
    }
  }
);
  StorageManager.registerStorage(Profile.STORAGE_KEY,Profile.class);
  StorageManager.registerStorage(Suite.STORAGE_KEY,Suite.class);
  StorageManager.registerStorage(FormDef.STORAGE_KEY,Suite.class);
  StorageManager.registerStorage("String_Node_Str",FormInstance.class);
}

Fixed version (ground truth):
public CommCareConfigEngine(OutputStream output){
  this.output=output;
  this.print=new PrintStream(output);
  suites=new Vector<Suite>();
  this.instance=new CommCareInstance(){
    public void registerSuite(    Suite s){
      CommCareConfigEngine.this.suites.add(s);
    }
    public void setProfile(    Profile p){
      CommCareConfigEngine.this.profile=p;
    }
    public int getMajorVersion(){
      return 2;
    }
    public int getMinorVersion(){
      return 10;
    }
  }
;
  setRoots();
  table=ResourceTable.RetrieveTable(new DummyIndexedStorageUtility());
  StorageManager.setStorageFactory(new IStorageFactory(){
    public IStorageUtility newStorage(    String name,    Class type){
      return new DummyIndexedStorageUtility();
    }
  }
);
  StorageManager.registerStorage(Profile.STORAGE_KEY,Profile.class);
  StorageManager.registerStorage(Suite.STORAGE_KEY,Suite.class);
  StorageManager.registerStorage(FormDef.STORAGE_KEY,Suite.class);
  StorageManager.registerStorage("String_Node_Str",FormInstance.class);
}
Program: 144799
Project: 144799
Buggy source:
public int getMinorVersion(){
  return 9;
}

Fixed version (ground truth):
public int getMinorVersion(){
  return 10;
}
Program: 144800
Project: 144800
Buggy source:
public void serialize(DataInstance instance,TreeReference base) throws IOException {
  AbstractTreeElement root;
  if (base == null) {
    root=instance.getRoot();
  }
 else {
    root=instance.resolveReference(base);
  }
  serializer.startTag(root.getNamespace(),root.getName());
  for (int i=0; i < root.getNumChildren(); i++) {
    AbstractTreeElement childAt=root.getChildAt(i);
    serializeNode(childAt);
  }
  serializer.endTag(root.getNamespace(),root.getName());
}

Fixed version (ground truth):
public void serialize(DataInstance instance,TreeReference base) throws IOException {
  AbstractTreeElement root;
  if (base == null) {
    root=instance.getRoot();
  }
 else {
    root=instance.resolveReference(base);
  }
  serializer.startTag(root.getNamespace(),root.getName());
  for (int i=0; i < root.getNumChildren(); i++) {
    AbstractTreeElement childAt=root.getChildAt(i);
    serializeNode(childAt);
  }
  serializer.endTag(root.getNamespace(),root.getName());
  serializer.flush();
}
Program: 144802
Project: 144802
Buggy source:
public String entityType(){
  return shortDetail.getTitle().evaluate(context);
}

Fixed version (ground truth):
public String entityType(){
  return Localizer.clearArguments(shortDetail.getTitle().evaluate(context));
}
Program: 144803
Project: 144803
Buggy source:
public static String processArguments(String text,String[] args){
  String working=text;
  int currentArg=0;
  while (working.indexOf("String_Node_Str") != -1 && args.length > currentArg) {
    int index=extractNextIndex(working,args);
    if (index == -1) {
      index=currentArg;
      currentArg++;
    }
    String value=args[index];
    working=replaceFirstValue(working,value);
  }
  return working;
}

Fixed version (ground truth):
public static String processArguments(String text,String[] args,int currentArg){
  String working=text;
  if (working.indexOf("String_Node_Str") != -1 && args.length > currentArg) {
    int index=extractNextIndex(working,args);
    if (index == -1) {
      index=currentArg;
      currentArg++;
    }
    String value=args[index];
    String[] replaced=replaceFirstValue(working,value);
    return replaced[0] + processArguments(replaced[1],args,currentArg);
  }
 else {
    return working;
  }
}
Program: 144804
Project: 144804
Buggy source:
private static String replaceFirstValue(String text,String value){
  int start=text.indexOf("String_Node_Str");
  int end=text.indexOf("String_Node_Str");
  return text.substring(0,start) + value + text.substring(end + 1,text.length());
}

Fixed version (ground truth):
private static String[] replaceFirstValue(String text,String value){
  int start=text.indexOf("String_Node_Str");
  int end=text.indexOf("String_Node_Str");
  return new String[]{text.substring(0,start) + value,text.substring(end + 1,text.length())};
}
Program: 144805
Project: 144805
Buggy source:
public void run(TestCase tc){
  ((LocalizerTest)tc).testMaster(testID);
}

Fixed version (ground truth):
public void run(){
  holder[0]=Localizer.processArguments(holder[0],res);
}
Program: 144806
Project: 144806
Buggy source:
public void testLinearSub(){
  final String F="String_Node_Str";
  final String S="String_Node_Str";
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),F);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F,S}),F + "String_Node_Str" + S);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),"String_Node_Str" + F);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),"String_Node_Str" + F + "String_Node_Str");
}

Fixed version (ground truth):
public void testLinearSub(){
  final String F="String_Node_Str";
  final String S="String_Node_Str";
  final String C="String_Node_Str";
  final String D="String_Node_Str";
  final String[] res=new String[]{"String_Node_Str","String_Node_Str"};
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),F);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F,S}),F + "String_Node_Str" + S);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),"String_Node_Str" + F);
  assertEquals(Localizer.processArguments("String_Node_Str",new String[]{F}),"String_Node_Str" + F + "String_Node_Str");
  final String[] holder=new String[1];
  runAsync(new Runnable(){
    public void run(){
      holder[0]=Localizer.processArguments("String_Node_Str",new String[]{C});
    }
  }
);
  assertEquals(holder[0],C);
  runAsync(new Runnable(){
    public void run(){
      holder[0]=Localizer.processArguments("String_Node_Str",new String[]{D});
    }
  }
);
  assertEquals(holder[0],D);
  runAsync(new Runnable(){
    public void run(){
      holder[0]=Localizer.processArguments(holder[0],res);
    }
  }
);
  assertEquals(holder[0],res[1] + res[0]);
}