nus-yam/ex-repair huggingface dataset:
Program: 82372
Project: 82372
Buggy source:
/** 
 * This method checks the host to see if it is in the supplied set of regexes.
 * @param hostUnderConsideration the host to be checked
 * @param hosts the set of regexes to be checked against
 * @return true if the host matches
 */
public static String checkHost(String hostUnderConsideration,Set<String> hosts){
  hostUnderConsideration=hostUnderConsideration.toLowerCase();
  for (  String rule : hosts) {
    rule=rule.toLowerCase();
    if (hostUnderConsideration.matches("String_Node_Str" + rule + "String_Node_Str")) {
      return rule;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * This method checks the host to see if it is in the supplied set of regexes.
 * @param hostUnderConsideration the host to be checked
 * @param hosts the set of regexes to be checked against
 * @return true if the host matches
 */
public static String checkHost(String hostUnderConsideration,Set<String> hosts){
  hostUnderConsideration=hostUnderConsideration.toLowerCase(Locale.ENGLISH);
  for (  String rule : hosts) {
    rule=rule.toLowerCase(Locale.ENGLISH);
    if (hostUnderConsideration.matches("String_Node_Str" + rule + "String_Node_Str")) {
      return rule;
    }
  }
  return null;
}
Program: 82373
Project: 82373
Buggy source:
public static CheckForUpdates createUpdateChecker(TreeLogger logger,String entryPoint){
  if (System.getProperty("String_Node_Str").toLowerCase().contains("String_Node_Str")) {
    return new CheckForUpdatesIE6(logger,entryPoint);
  }
 else {
    return new CheckForUpdates(logger,entryPoint);
  }
}

Fixed version (ground truth):
public static CheckForUpdates createUpdateChecker(TreeLogger logger,String entryPoint){
  if (System.getProperty("String_Node_Str").toLowerCase(Locale.ENGLISH).contains("String_Node_Str")) {
    return new CheckForUpdatesIE6(logger,entryPoint);
  }
 else {
    return new CheckForUpdates(logger,entryPoint);
  }
}
Program: 82374
Project: 82374
Buggy source:
/** 
 * Retrieve a short name, suitable for use in a tab or filename, for a given user agent.
 * @param userAgent
 * @return short name of user agent
 */
public static String getShortName(String userAgent){
  String lcAgent=userAgent.toLowerCase();
  if (lcAgent.contains("String_Node_Str")) {
    return IE;
  }
 else   if (lcAgent.contains("String_Node_Str")) {
    return CHROME;
  }
 else   if (lcAgent.contains("String_Node_Str")) {
    return OPERA;
  }
 else   if (lcAgent.contains("String_Node_Str") || lcAgent.contains("String_Node_Str")) {
    return SAFARI;
  }
 else   if (lcAgent.contains("String_Node_Str")) {
    return FIREFOX;
  }
  return UNKNOWN;
}

Fixed version (ground truth):
/** 
 * Retrieve a short name, suitable for use in a tab or filename, for a given user agent.
 * @param userAgent
 * @return short name of user agent
 */
public static String getShortName(String userAgent){
  String lcAgent=userAgent.toLowerCase(Locale.ENGLISH);
  if (lcAgent.contains("String_Node_Str")) {
    return IE;
  }
 else   if (lcAgent.contains("String_Node_Str")) {
    return CHROME;
  }
 else   if (lcAgent.contains("String_Node_Str")) {
    return OPERA;
  }
 else   if (lcAgent.contains("String_Node_Str") || lcAgent.contains("String_Node_Str")) {
    return SAFARI;
  }
 else   if (lcAgent.contains("String_Node_Str")) {
    return FIREFOX;
  }
  return UNKNOWN;
}
Program: 82375
Project: 82375
Buggy source:
public int handle(String[] args,int startIndex){
  if (startIndex + 1 < args.length) {
    String style=args[startIndex + 1].toLowerCase();
    if (style.startsWith("String_Node_Str")) {
      option.setOutput(JsOutputOption.OBFUSCATED);
      return 1;
    }
 else     if ("String_Node_Str".equals(style)) {
      option.setOutput(JsOutputOption.PRETTY);
      return 1;
    }
 else     if ("String_Node_Str".equals(style)) {
      option.setOutput(JsOutputOption.DETAILED);
      return 1;
    }
  }
  System.err.println(getTag() + "String_Node_Str");
  System.err.println("String_Node_Str");
  return -1;
}

Fixed version (ground truth):
public int handle(String[] args,int startIndex){
  if (startIndex + 1 < args.length) {
    String style=args[startIndex + 1].toLowerCase(Locale.ENGLISH);
    if (style.startsWith("String_Node_Str")) {
      option.setOutput(JsOutputOption.OBFUSCATED);
      return 1;
    }
 else     if ("String_Node_Str".equals(style)) {
      option.setOutput(JsOutputOption.PRETTY);
      return 1;
    }
 else     if ("String_Node_Str".equals(style)) {
      option.setOutput(JsOutputOption.DETAILED);
      return 1;
    }
  }
  System.err.println(getTag() + "String_Node_Str");
  System.err.println("String_Node_Str");
  return -1;
}
Program: 82376
Project: 82376
Buggy source:
public void testNonOverlappingPrefixesNonEmptyFilter(){
  PathPrefixSet pps=new PathPrefixSet();
  ResourceFilter allowsGifs=new ResourceFilter(){
    public boolean allows(    String path){
      return path.toLowerCase().endsWith("String_Node_Str");
    }
  }
;
  PathPrefix pp1=new PathPrefix("String_Node_Str",allowsGifs);
  PathPrefix pp2=new PathPrefix("String_Node_Str",allowsGifs);
  pps.add(pp1);
  pps.add(pp2);
  assertEquals(pp1,pps.includesResource("String_Node_Str"));
  assertEquals(pp2,pps.includesResource("String_Node_Str"));
  assertNull(pps.includesResource("String_Node_Str"));
  assertNull(pps.includesResource("String_Node_Str"));
  assertNull(pps.includesResource("String_Node_Str"));
  assertNull(pps.includesResource("String_Node_Str"));
  assertNull(pps.includesResource("String_Node_Str"));
}

Fixed version (ground truth):
public void testNonOverlappingPrefixesNonEmptyFilter(){
  PathPrefixSet pps=new PathPrefixSet();
  ResourceFilter allowsGifs=new ResourceFilter(){
    public boolean allows(    String path){
      return path.toLowerCase(Locale.ENGLISH).endsWith("String_Node_Str");
    }
  }
;
  PathPrefix pp1=new PathPrefix("String_Node_Str",allowsGifs);
  PathPrefix pp2=new PathPrefix("String_Node_Str",allowsGifs);
  pps.add(pp1);
  pps.add(pp2);
  assertEquals(pp1,pps.includesResource("String_Node_Str"));
  assertEquals(pp2,pps.includesResource("String_Node_Str"));
  assertNull(pps.includesResource("String_Node_Str"));
  assertNull(pps.includesResource("String_Node_Str"));
  assertNull(pps.includesResource("String_Node_Str"));
  assertNull(pps.includesResource("String_Node_Str"));
  assertNull(pps.includesResource("String_Node_Str"));
}
Program: 82378
Project: 82378
Buggy source:
/** 
 * Collects data about a class which only needs the bytecode and no TypeOracle data structures. This is used to make the initial shallow identity pass for creating JRealClassType/JGenericType objects.
 */
private CollectClassData processClass(CompiledClass compiledClass){
  byte[] classBytes=compiledClass.getBytes();
  ClassReader reader=new ClassReader(classBytes);
  CollectClassData mcv=new CollectClassData(classBytes);
  ClassVisitor cv=mcv;
  if (false) {
    cv=new TraceClassVisitor(cv,new PrintWriter(System.out));
  }
  reader.accept(cv,0);
  return mcv;
}

Fixed version (ground truth):
/** 
 * Collects data about a class which only needs the bytecode and no TypeOracle data structures. This is used to make the initial shallow identity pass for creating JRealClassType/JGenericType objects.
 */
private CollectClassData processClass(CompiledClass compiledClass){
  byte[] classBytes=compiledClass.getBytes();
  ClassReader reader=new ClassReader(classBytes);
  CollectClassData mcv=new CollectClassData();
  ClassVisitor cv=mcv;
  if (false) {
    cv=new TraceClassVisitor(cv,new PrintWriter(System.out));
  }
  reader.accept(cv,0);
  return mcv;
}
Program: 82379
Project: 82379
Buggy source:
/** 
 * Returns the binary name of a type. This is the same name that would be returned by   {@link Class#getName()} for this type.
 */
public static String computeBinaryClassName(JType type){
  JPrimitiveType primitiveType=type.isPrimitive();
  if (primitiveType != null) {
    return primitiveType.getJNISignature();
  }
  JArrayType arrayType=type.isArray();
  if (arrayType != null) {
    JType component=arrayType.getComponentType();
    if (component.isClassOrInterface() != null) {
      return "String_Node_Str" + computeBinaryClassName(arrayType.getComponentType()) + "String_Node_Str";
    }
 else {
      return "String_Node_Str" + computeBinaryClassName(arrayType.getComponentType());
    }
  }
  JParameterizedType parameterizedType=type.isParameterized();
  if (parameterizedType != null) {
    return computeBinaryClassName(parameterizedType.getBaseType());
  }
  JClassType classType=type.isClassOrInterface();
  assert(classType != null);
  JClassType enclosingType=classType.getEnclosingType();
  if (enclosingType != null) {
    return computeBinaryClassName(enclosingType) + "String_Node_Str" + classType.getSimpleSourceName();
  }
  return classType.getQualifiedSourceName();
}

Fixed version (ground truth):
/** 
 * Returns the binary name of a type. This is the same name that would be returned by   {@link Class#getName()} for this type.
 * @param type TypeOracle type to get the name for
 * @return binary name for a type 
 */
public static String computeBinaryClassName(JType type){
  JPrimitiveType primitiveType=type.isPrimitive();
  if (primitiveType != null) {
    return primitiveType.getJNISignature();
  }
  JArrayType arrayType=type.isArray();
  if (arrayType != null) {
    JType component=arrayType.getComponentType();
    if (component.isClassOrInterface() != null) {
      return "String_Node_Str" + computeBinaryClassName(arrayType.getComponentType()) + "String_Node_Str";
    }
 else {
      return "String_Node_Str" + computeBinaryClassName(arrayType.getComponentType());
    }
  }
  JParameterizedType parameterizedType=type.isParameterized();
  if (parameterizedType != null) {
    return computeBinaryClassName(parameterizedType.getBaseType());
  }
  JClassType classType=type.isClassOrInterface();
  assert(classType != null);
  JClassType enclosingType=classType.getEnclosingType();
  if (enclosingType != null) {
    return computeBinaryClassName(enclosingType) + "String_Node_Str" + classType.getSimpleSourceName();
  }
  return classType.getQualifiedSourceName();
}
Program: 82380
Project: 82380
Buggy source:
public Map<String,JRealClassType> getBinaryMapper(){
  return binaryMapper;
}

Fixed version (ground truth):
/** 
 * @return a map from binary class names to JRealClassType.
 */
public Map<String,JRealClassType> getBinaryMapper(){
  return binaryMapper;
}
Program: 82381
Project: 82381
Buggy source:
public TypeOracleMediator(TypeOracle typeOracle){
  if (typeOracle == null) {
    typeOracle=new TypeOracle();
  }
  this.typeOracle=typeOracle;
  resolver=new Resolver(){
    public Map<String,JRealClassType> getBinaryMapper(){
      return TypeOracleMediator.this.binaryMapper;
    }
    public TypeOracle getTypeOracle(){
      return TypeOracleMediator.this.typeOracle;
    }
    public boolean resolveAnnotation(    TreeLogger logger,    CollectAnnotationData annotVisitor,    Map<Class<? extends Annotation>,Annotation> declaredAnnotations){
      return TypeOracleMediator.this.resolveAnnotation(logger,annotVisitor,declaredAnnotations);
    }
    public boolean resolveAnnotations(    TreeLogger logger,    List<CollectAnnotationData> annotations,    Map<Class<? extends Annotation>,Annotation> declaredAnnotations){
      return TypeOracleMediator.this.resolveAnnotations(logger,annotations,declaredAnnotations);
    }
    public boolean resolveClass(    TreeLogger logger,    JRealClassType type){
      return TypeOracleMediator.this.resolveClass(logger,type);
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Construct a TypeOracleMediator.
 * @param typeOracle TypeOracle instance to use, or null to create a new one
 */
public TypeOracleMediator(TypeOracle typeOracle){
  if (typeOracle == null) {
    typeOracle=new TypeOracle();
  }
  this.typeOracle=typeOracle;
  resolver=new Resolver(){
    public Map<String,JRealClassType> getBinaryMapper(){
      return TypeOracleMediator.this.binaryMapper;
    }
    public TypeOracle getTypeOracle(){
      return TypeOracleMediator.this.typeOracle;
    }
    public boolean resolveAnnotation(    TreeLogger logger,    CollectAnnotationData annotVisitor,    Map<Class<? extends Annotation>,Annotation> declaredAnnotations){
      return TypeOracleMediator.this.resolveAnnotation(logger,annotVisitor,declaredAnnotations);
    }
    public boolean resolveAnnotations(    TreeLogger logger,    List<CollectAnnotationData> annotations,    Map<Class<? extends Annotation>,Annotation> declaredAnnotations){
      return TypeOracleMediator.this.resolveAnnotations(logger,annotations,declaredAnnotations);
    }
    public boolean resolveClass(    TreeLogger logger,    JRealClassType type){
      return TypeOracleMediator.this.resolveClass(logger,type);
    }
  }
;
}
Program: 82382
Project: 82382
Buggy source:
public TypeOracle getTypeOracle(){
  return typeOracle;
}

Fixed version (ground truth):
/** 
 * @return the TypeOracle managed by the mediator.
 */
public TypeOracle getTypeOracle(){
  return typeOracle;
}
Program: 82383
Project: 82383
Buggy source:
public AnnotationEnum(String desc,String value){
  this.desc=desc;
  this.value=value;
}

Fixed version (ground truth):
/** 
 * Construct the value of an Enum-valued annotation.
 * @param desc type descriptor of this enum
 * @param value actual value in this enum
 */
public AnnotationEnum(String desc,String value){
  this.desc=desc;
  this.value=value;
}
Program: 82384
Project: 82384
Buggy source:
public void CollectClassData(byte[] bytes){
  this.bytes=bytes;
}

Fixed version (ground truth):
/** 
 * Construct a visitor that will collect data about a class.
 */
public void CollectClassData(){
}
Program: 82385
Project: 82385
Buggy source:
/** 
 * @return the access
 */
public int getAccess(){
  return access;
}

Fixed version (ground truth):
/** 
 * @return the access flags for this class (ie, bitwise or of Opcodes.ACC_*).
 */
public int getAccess(){
  return access;
}
Program: 82386
Project: 82386
Buggy source:
/** 
 * @return the interfaces
 */
public String[] getInterfaces(){
  return interfaces;
}

Fixed version (ground truth):
/** 
 * @return an array of internal names of interfaces implemented by this class.
 */
public String[] getInterfaces(){
  return interfaces;
}
Program: 82387
Project: 82387
Buggy source:
/** 
 * @return annotations on this class
 */
public List<CollectAnnotationData> getAnnotations(){
  return annotations;
}

Fixed version (ground truth):
/** 
 * @return a list of annotations on this class.
 */
public List<CollectAnnotationData> getAnnotations(){
  return annotations;
}
Program: 82388
Project: 82388
Buggy source:
/** 
 * @return the value
 */
public String getValue(){
  return value;
}

Fixed version (ground truth):
/** 
 * @return the annotation value.
 */
public String getValue(){
  return value;
}
Program: 82389
Project: 82389
Buggy source:
public boolean isAnonymous(){
  return classType == ClassType.Anonymous;
}

Fixed version (ground truth):
/** 
 * @return true if this class has no source name at all.
 */
public boolean isAnonymous(){
  return classType == ClassType.Anonymous;
}
Program: 82390
Project: 82390
Buggy source:
/** 
 * @return the fields
 */
public List<CollectFieldData> getFields(){
  return fields;
}

Fixed version (ground truth):
/** 
 * @return a list of fields in this class.
 */
public List<CollectFieldData> getFields(){
  return fields;
}
Program: 82391
Project: 82391
Buggy source:
/** 
 * @return the descriptor
 */
public String getDesc(){
  return desc;
}

Fixed version (ground truth):
/** 
 * @return the type descriptor of the enum type.
 */
public String getDesc(){
  return desc;
}
Program: 82392
Project: 82392
Buggy source:
public boolean hasNoExternalName(){
  return classType == ClassType.Anonymous || classType == ClassType.Local;
}

Fixed version (ground truth):
/** 
 * @return true if this class has no external name (ie, is defined insidea method).
 */
public boolean hasNoExternalName(){
  return classType.hasNoExternalName();
}
Program: 82393
Project: 82393
Buggy source:
public boolean hasHiddenConstructorArg(){
  return false;
}

Fixed version (ground truth):
/** 
 * @return true if this class type has a hidden constructor argumentfor the containing instance (ie, this$0).
 */
public boolean hasHiddenConstructorArg(){
  return false;
}
Program: 82394
Project: 82394
Buggy source:
@SuppressWarnings("String_Node_Str") public CollectMethodData(CollectClassData.ClassType classType,int access,String name,String desc,String signature,String[] exceptions){
  this.access=access;
  this.name=name;
  this.desc=desc;
  this.signature=signature;
  this.exceptions=exceptions;
  syntheticArgs=0;
  argTypes=Type.getArgumentTypes(desc);
  if (classType.hasHiddenConstructorArg() && "String_Node_Str".equals(name)) {
    syntheticArgs=1;
    int n=argTypes.length - syntheticArgs;
    Type[] newArgTypes=new Type[n];
    System.arraycopy(argTypes,syntheticArgs,newArgTypes,0,n);
    argTypes=newArgTypes;
  }
  argNames=new String[argTypes.length];
  paramAnnots=new List[argTypes.length];
  for (int i=0; i < argNames.length; ++i) {
    argNames[i]="String_Node_Str" + i;
    paramAnnots[i]=new ArrayList<CollectAnnotationData>();
  }
}

Fixed version (ground truth):
/** 
 * Prepare to collect data for a method from bytecode.
 * @param classType
 * @param access
 * @param name
 * @param desc
 * @param signature
 * @param exceptions
 */
@SuppressWarnings("String_Node_Str") public CollectMethodData(CollectClassData.ClassType classType,int access,String name,String desc,String signature,String[] exceptions){
  this.access=access;
  this.name=name;
  this.desc=desc;
  this.signature=signature;
  this.exceptions=exceptions;
  syntheticArgs=0;
  argTypes=Type.getArgumentTypes(desc);
  if (classType.hasHiddenConstructorArg() && "String_Node_Str".equals(name)) {
    if (argTypes.length < 1) {
      throw new IllegalStateException("String_Node_Str");
    }
    syntheticArgs=1;
    int n=argTypes.length - syntheticArgs;
    Type[] newArgTypes=new Type[n];
    System.arraycopy(argTypes,syntheticArgs,newArgTypes,0,n);
    argTypes=newArgTypes;
  }
  argNames=new String[argTypes.length];
  paramAnnots=new List[argTypes.length];
  for (int i=0; i < argNames.length; ++i) {
    argNames[i]="String_Node_Str" + i;
    paramAnnots[i]=new ArrayList<CollectAnnotationData>();
  }
}
Program: 82396
Project: 82396
Buggy source:
public ResolveMethodSignature(Resolver resolver,TreeLogger logger,JAbstractMethod method,TypeParameterLookup typeParamLookup,boolean hasReturnType,CollectMethodData methodData,Type[] argTypes,String[] argNames){
  this.resolver=resolver;
  this.logger=logger;
  this.method=method;
  this.typeParamLookup=typeParamLookup;
  this.hasReturnType=hasReturnType;
  this.methodData=methodData;
  this.argTypes=argTypes;
  this.argNames=argNames;
}

Fixed version (ground truth):
/** 
 * Resolve a method signature.
 * @param resolver
 * @param logger
 * @param method
 * @param typeParamLookup
 * @param hasReturnType
 * @param methodData
 * @param argTypes
 * @param argNames
 * @param argNamesAreReal
 */
public ResolveMethodSignature(Resolver resolver,TreeLogger logger,JAbstractMethod method,TypeParameterLookup typeParamLookup,boolean hasReturnType,CollectMethodData methodData,Type[] argTypes,String[] argNames,boolean argNamesAreReal){
  this.resolver=resolver;
  this.logger=logger;
  this.method=method;
  this.typeParamLookup=typeParamLookup;
  this.hasReturnType=hasReturnType;
  this.methodData=methodData;
  this.argTypes=argTypes;
  this.argNames=argNames;
  this.argNamesAreReal=argNamesAreReal;
}
Program: 82397
Project: 82397
Buggy source:
/** 
 * @return true if resolution succeeded.
 */
public boolean finish(){
  boolean failed=false;
  finishBound();
  if (hasReturnType) {
    failed|=(returnType[0] == null);
    ((JMethod)method).setReturnType(returnType[0]);
  }
  List<CollectAnnotationData>[] argAnnotations=methodData.getArgAnnotations();
  if (argTypes.length != params.size()) {
    throw new IllegalStateException("String_Node_Str" + methodData.getDesc() + "String_Node_Str"+ methodData.getSignature()+ "String_Node_Str");
  }
  for (int i=0; i < argTypes.length; ++i) {
    JType argType=params.get(i)[0];
    if (argType == null) {
      failed=true;
      continue;
    }
    Map<Class<? extends Annotation>,Annotation> declaredAnnotations=new HashMap<Class<? extends Annotation>,Annotation>();
    resolver.resolveAnnotations(logger,argAnnotations[i],declaredAnnotations);
    new JParameter(method,argType,argNames[i],declaredAnnotations);
  }
  for (  JType[] exc : exceptions) {
    if (exc[0] == null) {
      failed=true;
      continue;
    }
    method.addThrows(exc[0]);
  }
  return !failed;
}

Fixed version (ground truth):
/** 
 * @return true if resolution succeeded.
 */
public boolean finish(){
  boolean failed=false;
  finishBound();
  if (hasReturnType) {
    failed|=(returnType[0] == null);
    ((JMethod)method).setReturnType(returnType[0]);
  }
  List<CollectAnnotationData>[] argAnnotations=methodData.getArgAnnotations();
  if (argTypes.length != params.size()) {
    throw new IllegalStateException("String_Node_Str" + methodData.getDesc() + "String_Node_Str"+ methodData.getSignature()+ "String_Node_Str");
  }
  for (int i=0; i < argTypes.length; ++i) {
    JType argType=params.get(i)[0];
    if (argType == null) {
      failed=true;
      continue;
    }
    Map<Class<? extends Annotation>,Annotation> declaredAnnotations=new HashMap<Class<? extends Annotation>,Annotation>();
    resolver.resolveAnnotations(logger,argAnnotations[i],declaredAnnotations);
    new JParameter(method,argType,argNames[i],declaredAnnotations,argNamesAreReal);
  }
  for (  JType[] exc : exceptions) {
    if (exc[0] == null) {
      failed=true;
      continue;
    }
    method.addThrows(exc[0]);
  }
  return !failed;
}
Program: 82398
Project: 82398
Buggy source:
private void resolveMethodSignature(ReflectedMethod method,String signature){
  TypeParameterLookup lookup=new TypeParameterLookup();
  lookup.pushEnclosingScopes(method.getEnclosingType());
  lookup.pushScope(method.getTypeParameters());
  int access=Opcodes.ACC_PUBLIC;
  String desc=Type.getMethodDescriptor(method.getMethod());
  CollectMethodData methodData=new CollectMethodData(ClassType.TopLevel,access,method.getName(),desc,signature,null);
  Class<?>[] paramTypes=method.getMethod().getParameterTypes();
  int n=paramTypes.length;
  Type[] argTypes=new Type[n];
  String[] argNames=new String[n];
  for (int i=0; i < n; ++i) {
    argNames[i]="String_Node_Str" + i;
    argTypes[i]=Type.getType(paramTypes[i]);
  }
  ResolveMethodSignature methodResolver=new ResolveMethodSignature(resolver,failTreeLogger,method,lookup,true,methodData,argTypes,argNames);
  new SignatureReader(signature).accept(methodResolver);
  methodResolver.finish();
}

Fixed version (ground truth):
private void resolveMethodSignature(ReflectedMethod method,String signature){
  TypeParameterLookup lookup=new TypeParameterLookup();
  lookup.pushEnclosingScopes(method.getEnclosingType());
  lookup.pushScope(method.getTypeParameters());
  int access=Opcodes.ACC_PUBLIC;
  String desc=Type.getMethodDescriptor(method.getMethod());
  CollectMethodData methodData=new CollectMethodData(ClassType.TopLevel,access,method.getName(),desc,signature,null);
  Class<?>[] paramTypes=method.getMethod().getParameterTypes();
  int n=paramTypes.length;
  Type[] argTypes=new Type[n];
  String[] argNames=new String[n];
  for (int i=0; i < n; ++i) {
    argNames[i]="String_Node_Str" + i;
    argTypes[i]=Type.getType(paramTypes[i]);
  }
  ResolveMethodSignature methodResolver=new ResolveMethodSignature(resolver,failTreeLogger,method,lookup,true,methodData,argTypes,argNames,false);
  new SignatureReader(signature).accept(methodResolver);
  methodResolver.finish();
}
Program: 82399
Project: 82399
Buggy source:
private void writeClassSerializationStatements(){
  if (typesSentToBrowser.maybeEnhanced(serializableClass) && typesSentFromBrowser.maybeEnhanced(serializableClass)) {
    sourceWriter.println("String_Node_Str" + WEAK_MAPPING_CLASS_NAME + "String_Node_Str");
  }
  for (  JField serializableField : serializableFields) {
    JType fieldType=serializableField.getType();
    String writeMethodName=Shared.getStreamWriteMethodNameFor(fieldType);
    sourceWriter.print("String_Node_Str");
    sourceWriter.print(writeMethodName);
    sourceWriter.print("String_Node_Str");
    if (needsAccessorMethods(serializableField)) {
      sourceWriter.print("String_Node_Str");
      sourceWriter.print(Shared.capitalize(serializableField.getName()));
      sourceWriter.println("String_Node_Str");
    }
 else {
      sourceWriter.print("String_Node_Str");
      sourceWriter.print(serializableField.getName());
      sourceWriter.println("String_Node_Str");
    }
  }
  sourceWriter.println();
  JClassType superClass=serializableClass.getSuperclass();
  if (superClass != null && (typesSentFromBrowser.isSerializable(superClass) || typesSentToBrowser.isSerializable(superClass))) {
    String fieldSerializerName=SerializationUtils.getFieldSerializerName(typeOracle,superClass);
    sourceWriter.print(fieldSerializerName);
    sourceWriter.println("String_Node_Str");
  }
}

Fixed version (ground truth):
private void writeClassSerializationStatements(){
  if (serializableClass.isEnhanced()) {
    sourceWriter.println("String_Node_Str" + WEAK_MAPPING_CLASS_NAME + "String_Node_Str");
  }
  for (  JField serializableField : serializableFields) {
    JType fieldType=serializableField.getType();
    String writeMethodName=Shared.getStreamWriteMethodNameFor(fieldType);
    sourceWriter.print("String_Node_Str");
    sourceWriter.print(writeMethodName);
    sourceWriter.print("String_Node_Str");
    if (needsAccessorMethods(serializableField)) {
      sourceWriter.print("String_Node_Str");
      sourceWriter.print(Shared.capitalize(serializableField.getName()));
      sourceWriter.println("String_Node_Str");
    }
 else {
      sourceWriter.print("String_Node_Str");
      sourceWriter.print(serializableField.getName());
      sourceWriter.println("String_Node_Str");
    }
  }
  sourceWriter.println();
  JClassType superClass=serializableClass.getSuperclass();
  if (superClass != null && (typesSentFromBrowser.isSerializable(superClass) || typesSentToBrowser.isSerializable(superClass))) {
    String fieldSerializerName=SerializationUtils.getFieldSerializerName(typeOracle,superClass);
    sourceWriter.print(fieldSerializerName);
    sourceWriter.println("String_Node_Str");
  }
}
Program: 82403
Project: 82403
Buggy source:
public SerializableTypeOracleImpl(Set<JClassType> serializableTypes,Set<JClassType> possiblyInstantiatedTypes,Set<JClassType> possiblyEnhancedTypes){
  serializableTypesSet=serializableTypes;
  this.possiblyInstantiatedTypes=possiblyInstantiatedTypes;
  this.possiblyEnhancedTypes=possiblyEnhancedTypes;
}

Fixed version (ground truth):
public SerializableTypeOracleImpl(Set<JClassType> serializableTypes,Set<JClassType> possiblyInstantiatedTypes){
  serializableTypesSet=serializableTypes;
  this.possiblyInstantiatedTypes=possiblyInstantiatedTypes;
}
Program: 82404
Project: 82404
Buggy source:
/** 
 * Set any created BrowserChannelServers to ignore remote deaths. <p>This is most commonly wanted by JUnitShell.
 * @param ignoreRemoteDeath
 */
public void setIgnoreRemoteDeath(boolean ignoreRemoteDeath){
  this.ignoreRemoteDeath=ignoreRemoteDeath;
}

Fixed version (ground truth):
/** 
 * Set any created BrowserChannelServers to ignore remote deaths. <p> This is most commonly wanted by JUnitShell.
 * @param ignoreRemoteDeath
 */
public void setIgnoreRemoteDeath(boolean ignoreRemoteDeath){
  this.ignoreRemoteDeath=ignoreRemoteDeath;
}
Program: 82406
Project: 82406
Buggy source:
private void terminateDueToException(Exception e){
  pendingRequestMap.blockAdds(e);
}

Fixed version (ground truth):
private void terminateDueToException(Exception e){
  pendingRequestMap.blockAdds(e);
  if (terminationCallback != null) {
    terminationCallback.onTermination(e);
  }
}
Program: 82407
Project: 82407
Buggy source:
public RemoteUI(String host,int port,String clientId,int webServerPort,int browserChannelPort){
  try {
    this.clientId=clientId;
    this.browserChannelPort=browserChannelPort;
    this.webServerPort=webServerPort;
    Socket socket=new Socket(host,port);
    devModeRequestProcessor=new DevModeServiceRequestProcessor(this);
    transport=new MessageTransport(socket.getInputStream(),socket.getOutputStream(),devModeRequestProcessor);
  }
 catch (  UnknownHostException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public RemoteUI(String host,int port,String clientId,int webServerPort,int browserChannelPort){
  try {
    this.clientId=clientId;
    this.browserChannelPort=browserChannelPort;
    this.webServerPort=webServerPort;
    Socket socket=new Socket(host,port);
    socket.setKeepAlive(true);
    socket.setTcpNoDelay(true);
    devModeRequestProcessor=new DevModeServiceRequestProcessor(this);
    transport=new MessageTransport(socket.getInputStream(),socket.getOutputStream(),devModeRequestProcessor,this);
  }
 catch (  UnknownHostException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 82409
Project: 82409
Buggy source:
@Override protected void doCommitBranch(AbstractTreeLogger childBeingCommitted,Type type,String msg,Throwable caught,HelpInfo helpInfo){
  SwingTreeLogger commitChild=(SwingTreeLogger)childBeingCommitted;
  LogEvent logEvent=new LogEvent(commitChild,true,commitChild.getBranchedIndex(),type,msg,caught,helpInfo);
  commitChild.treeNode=new DefaultMutableTreeNode(logEvent);
  addUpdate(logEvent);
}

Fixed version (ground truth):
@Override protected void doCommitBranch(AbstractTreeLogger childBeingCommitted,Type type,String msg,Throwable caught,HelpInfo helpInfo){
}
Program: 82410
Project: 82410
Buggy source:
/** 
 * Constructs the top-level TreeItemLogger.
 * @param panel
 */
public SwingTreeLogger(SwingLoggerPanel panel){
  this.panel=panel;
  treeNode=(DefaultMutableTreeNode)panel.treeModel.getRoot();
}

Fixed version (ground truth):
/** 
 * Used to create a branch treelogger, supplying a tree node to use rather than the panel's.
 * @param panel
 * @param treeNode
 */
private SwingTreeLogger(SwingLoggerPanel panel,DefaultMutableTreeNode treeNode){
  this.panel=panel;
  this.treeNode=treeNode;
}
Program: 82411
Project: 82411
Buggy source:
private int findInsertionPoint(DefaultMutableTreeNode parent,int index){
  int high=parent.getChildCount() - 1;
  if (high < 0) {
    return 0;
  }
  int low=0;
  while (low <= high) {
    final int mid=low + ((high - low) >> 1);
    DefaultMutableTreeNode midChild=(DefaultMutableTreeNode)parent.getChildAt(mid);
    final Object userObject=midChild.getUserObject();
    int compIdx=-1;
    if (userObject instanceof LogEvent) {
      LogEvent event=(LogEvent)userObject;
      compIdx=event.index;
    }
    if (compIdx < index) {
      low=mid + 1;
    }
 else     if (compIdx > index) {
      high=mid - 1;
    }
 else {
      return mid;
    }
  }
  return low;
}

Fixed version (ground truth):
private int findInsertionPoint(DefaultMutableTreeNode parentNode,int index){
  int high=parentNode.getChildCount() - 1;
  if (high < 0) {
    return 0;
  }
  int low=0;
  while (low <= high) {
    final int mid=low + ((high - low) >> 1);
    DefaultMutableTreeNode midChild=(DefaultMutableTreeNode)parentNode.getChildAt(mid);
    final Object userObject=midChild.getUserObject();
    int compIdx=-1;
    if (userObject instanceof LogEvent) {
      LogEvent event=(LogEvent)userObject;
      compIdx=event.index;
    }
    if (compIdx < index) {
      low=mid + 1;
    }
 else     if (compIdx > index) {
      high=mid - 1;
    }
 else {
      return mid;
    }
  }
  return low;
}
Program: 82412
Project: 82412
Buggy source:
/** 
 * Update this log event's inherited priority, which is the highest priority of this event and any child events.
 * @param inheritedPriority
 * @return true if the priority was upgraded
 */
public boolean updateInheritedPriority(Type inheritedPriority){
  if (this.inheritedPriority.isLowerPriorityThan(inheritedPriority)) {
    this.inheritedPriority=inheritedPriority;
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Update this log event's inherited priority, which is the highest priority of this event and any child events.
 * @param childPriority
 * @return true if the priority was upgraded
 */
public boolean updateInheritedPriority(Type childPriority){
  if (this.inheritedPriority.isLowerPriorityThan(childPriority)) {
    this.inheritedPriority=childPriority;
    return true;
  }
  return false;
}
Program: 82413
Project: 82413
Buggy source:
public LogEvent(SwingTreeLogger logger,boolean isBranchCommit,int index,Type type,String message,Throwable caught,HelpInfo helpInfo){
  this.childLogger=logger;
  this.isBranchCommit=isBranchCommit;
  this.index=index;
  this.type=type;
  this.inheritedPriority=type;
  this.message=message;
  this.helpInfo=helpInfo;
  this.timestamp=new Date();
  this.exceptionDetail=AbstractTreeLogger.getStackTraceAsString(caught);
  this.exceptionName=AbstractTreeLogger.getExceptionName(caught);
}

Fixed version (ground truth):
/** 
 * Create a log event.
 * @param logger
 * @param isBranchCommit
 * @param index
 * @param type
 * @param message
 * @param caught
 * @param helpInfo
 */
public LogEvent(SwingTreeLogger logger,boolean isBranchCommit,int index,Type type,String message,Throwable caught,HelpInfo helpInfo){
  this.childLogger=logger;
  this.isBranchCommit=isBranchCommit;
  this.index=index;
  this.type=type;
  this.inheritedPriority=type;
  this.message=message;
  this.helpInfo=helpInfo;
  this.timestamp=new Date();
  this.exceptionDetail=AbstractTreeLogger.getStackTraceAsString(caught);
  this.exceptionName=AbstractTreeLogger.getExceptionName(caught);
}
Program: 82414
Project: 82414
Buggy source:
public Type getInheritedPriority(){
  return inheritedPriority;
}

Fixed version (ground truth):
/** 
 * @return the inherited priority, which will be the highest priority ofthis event or any child.
 */
public Type getInheritedPriority(){
  return inheritedPriority;
}
Program: 82415
Project: 82415
Buggy source:
@Override protected AbstractTreeLogger doBranch(){
  SwingTreeLogger newLogger=new SwingTreeLogger(panel);
  return newLogger;
}

Fixed version (ground truth):
@Override protected AbstractTreeLogger doBranch(){
  SwingTreeLogger newLogger=new SwingTreeLogger(panel,new DefaultMutableTreeNode(null));
  return newLogger;
}
Program: 82417
Project: 82417
Buggy source:
public void animate(int duration,final Layout.AnimationCallback callback){
  animCmd.schedule(duration,callback);
}

Fixed version (ground truth):
public void animate(int duration,final Layout.AnimationCallback callback){
  layoutCmd.schedule(duration,callback);
}
Program: 82418
Project: 82418
Buggy source:
public void forceLayout(){
  animCmd.cancel();
  doLayout();
  layout.layout();
  onResize();
}

Fixed version (ground truth):
public void forceLayout(){
  layoutCmd.cancel();
  doLayout();
  layout.layout();
  onResize();
}
Program: 82419
Project: 82419
Buggy source:
/** 
 * Creates an empty dock panel.
 * @param unit the unit to be used for layout
 */
public DockLayoutPanel(Unit unit){
  this.unit=unit;
  setElement(Document.get().createDivElement());
  layout=new Layout(getElement());
  animCmd=new DockAnimateCommand(layout);
}

Fixed version (ground truth):
/** 
 * Creates an empty dock panel.
 * @param unit the unit to be used for layout
 */
public DockLayoutPanel(Unit unit){
  this.unit=unit;
  setElement(Document.get().createDivElement());
  layout=new Layout(getElement());
  layoutCmd=new DockAnimateCommand(layout);
}
Program: 82420
Project: 82420
Buggy source:
/** 
 * Creates a new command for the given layout object
 * @param layout
 */
public LayoutCommand(Layout layout){
  this.layout=layout;
}

Fixed version (ground truth):
/** 
 * Creates a new command for the given layout object.
 * @param layout
 */
public LayoutCommand(Layout layout){
  this.layout=layout;
}
Program: 82421
Project: 82421
Buggy source:
public void animate(final int duration,final AnimationCallback callback){
  animCmd.schedule(duration,callback);
}

Fixed version (ground truth):
public void animate(final int duration,final AnimationCallback callback){
  layoutCmd.schedule(duration,callback);
}
Program: 82422
Project: 82422
Buggy source:
/** 
 * Creates an empty layout panel.
 */
public LayoutPanel(){
  setElement(Document.get().createDivElement());
  layout=new Layout(getElement());
  animCmd=new LayoutCommand(layout);
}

Fixed version (ground truth):
/** 
 * Creates an empty layout panel.
 */
public LayoutPanel(){
  setElement(Document.get().createDivElement());
  layout=new Layout(getElement());
  layoutCmd=new LayoutCommand(layout);
}
Program: 82423
Project: 82423
Buggy source:
public void forceLayout(){
  animCmd.cancel();
  layout.layout();
  onResize();
}

Fixed version (ground truth):
public void forceLayout(){
  layoutCmd.cancel();
  layout.layout();
  onResize();
}
Program: 82424
Project: 82424
Buggy source:
/** 
 * Removes the given handler from the specified event type. Normally, applications should call   {@link HandlerRegistration#removeHandler()}instead.
 * @param < H > handler type
 * @param type the event type
 * @param handler the handler
 * @deprecated This method is likely to be removed along with "listener"interfaces in a future release. If you have a reason it should be retained beyond that time, please add your comments to GWT <a href="http://code.google.com/p/google-web-toolkit/issues/detail?id=3102">issue 3102</a>
 */
@Deprecated public <H extends EventHandler>void removeHandler(GwtEvent.Type<H> type,final H handler){
  if (firingDepth > 0) {
    enqueueRemove(type,handler);
  }
 else {
    doRemove(type,handler);
  }
}

Fixed version (ground truth):
/** 
 * Removes the given handler from the specified event type. Normally, applications should call   {@link HandlerRegistration#removeHandler()}instead.
 * @param < H > handler type
 * @param type the event type
 * @param handler the handler
 */
public <H extends EventHandler>void removeHandler(GwtEvent.Type<H> type,final H handler){
  if (firingDepth > 0) {
    enqueueRemove(type,handler);
  }
 else {
    doRemove(type,handler);
  }
}
Program: 82425
Project: 82425
Buggy source:
@SuppressWarnings("String_Node_Str") public void testRemoveHandlers(){
  HandlerManager manager=new HandlerManager("String_Node_Str");
  addHandlers(manager);
  manager.removeHandler(MouseDownEvent.getType(),adaptor1);
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(mouse1,mouse2,mouse3,adaptor1);
  assertNotFired(click1,click2);
  manager.removeHandler(MouseDownEvent.getType(),adaptor1);
  reset();
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(mouse1,mouse2,mouse3);
  assertNotFired(adaptor1,click1,click2);
  reset();
  manager.fireEvent(new ClickEvent(){
  }
);
  assertNotFired(mouse1,mouse2,mouse3);
  assertFired(click1,click2,adaptor1);
}

Fixed version (ground truth):
public void testRemoveHandlers(){
  HandlerManager manager=new HandlerManager("String_Node_Str");
  addHandlers(manager);
  manager.removeHandler(MouseDownEvent.getType(),adaptor1);
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(mouse1,mouse2,mouse3,adaptor1);
  assertNotFired(click1,click2);
  manager.removeHandler(MouseDownEvent.getType(),adaptor1);
  reset();
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(mouse1,mouse2,mouse3);
  assertNotFired(adaptor1,click1,click2);
  reset();
  manager.fireEvent(new ClickEvent(){
  }
);
  assertNotFired(mouse1,mouse2,mouse3);
  assertFired(click1,click2,adaptor1);
}
Program: 82426
Project: 82426
Buggy source:
@SuppressWarnings("String_Node_Str") public void testConcurrentAddAfterRemoveIsNotClobbered(){
  final HandlerManager manager=new HandlerManager("String_Node_Str");
  MouseDownHandler one=new MouseDownHandler(){
    public void onMouseDown(    MouseDownEvent event){
      manager.removeHandler(MouseDownEvent.getType(),mouse1);
      manager.addHandler(MouseDownEvent.getType(),mouse1);
      add(this);
    }
  }
;
  manager.addHandler(MouseDownEvent.getType(),one);
  if (!GWT.isScript()) {
    try {
      manager.fireEvent(new MouseDownEvent(){
      }
);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
    return;
  }
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one);
  reset();
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one,mouse1);
}

Fixed version (ground truth):
public void testConcurrentAddAfterRemoveIsNotClobbered(){
  final HandlerManager manager=new HandlerManager("String_Node_Str");
  MouseDownHandler one=new MouseDownHandler(){
    public void onMouseDown(    MouseDownEvent event){
      manager.removeHandler(MouseDownEvent.getType(),mouse1);
      manager.addHandler(MouseDownEvent.getType(),mouse1);
      add(this);
    }
  }
;
  manager.addHandler(MouseDownEvent.getType(),one);
  if (!GWT.isScript()) {
    try {
      manager.fireEvent(new MouseDownEvent(){
      }
);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
    return;
  }
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one);
  reset();
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one,mouse1);
}
Program: 82427
Project: 82427
Buggy source:
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger, LinkerContext, CompilationResult).}
 */
@Override protected String getModulePrefix(TreeLogger logger,LinkerContext context,String strongName) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}

Fixed version (ground truth):
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger,LinkerContext,CompilationResult)}.
 */
@Override protected String getModulePrefix(TreeLogger logger,LinkerContext context,String strongName) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}
Program: 82428
Project: 82428
Buggy source:
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger, LinkerContext, CompilationResult).}
 */
@Override protected String getCompilationExtension(TreeLogger logger,LinkerContext context) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}

Fixed version (ground truth):
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger,LinkerContext,CompilationResult)}.
 */
@Override protected String getCompilationExtension(TreeLogger logger,LinkerContext context) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}
Program: 82429
Project: 82429
Buggy source:
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger, LinkerContext, CompilationResult).}
 */
@Override protected String getModuleSuffix(TreeLogger logger,LinkerContext context) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}

Fixed version (ground truth):
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger,LinkerContext,CompilationResult)}.
 */
@Override protected String getModuleSuffix(TreeLogger logger,LinkerContext context) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}
Program: 82431
Project: 82431
Buggy source:
public void parse(XMLElement elem,String fieldName,JClassType type,UiBinderWriter writer) throws UnableToCompleteException {
  for (  XMLElement child : elem.consumeChildElements()) {
    String ns=child.getNamespaceUri();
    String tagName=child.getLocalName();
    if (ns.equals(elem.getNamespaceUri()) && localTagNameIsCell(tagName)) {
      XMLElement widget=child.consumeSingleChildElement();
      String childFieldName=writer.parseElementToField(widget);
      writer.addStatement("String_Node_Str",fieldName,childFieldName);
      parseCellAttributes(child,fieldName,childFieldName,writer);
    }
 else {
      String childFieldName=writer.parseElementToField(child);
      writer.addStatement("String_Node_Str",fieldName,childFieldName);
    }
  }
}

Fixed version (ground truth):
public void parse(XMLElement elem,String fieldName,JClassType type,UiBinderWriter writer) throws UnableToCompleteException {
  for (  XMLElement child : elem.consumeChildElements()) {
    String ns=child.getNamespaceUri();
    String tagName=child.getLocalName();
    if (ns != null && ns.equals(elem.getNamespaceUri()) && localTagNameIsCell(tagName)) {
      XMLElement widget=child.consumeSingleChildElement();
      String childFieldName=writer.parseElementToField(widget);
      writer.addStatement("String_Node_Str",fieldName,childFieldName);
      parseCellAttributes(child,fieldName,childFieldName,writer);
    }
 else {
      if (!writer.isWidgetElement(child)) {
        writer.die("String_Node_Str",elem,elem.getPrefix(),CELL_TAG.toLowerCase(),child);
      }
      String childFieldName=writer.parseElementToField(child);
      writer.addStatement("String_Node_Str",fieldName,childFieldName);
    }
  }
}
Program: 82432
Project: 82432
Buggy source:
/** 
 * Parses the root UiBinder element, and kicks off the parsing of the rest of the document.
 */
public String parse(XMLElement elem) throws UnableToCompleteException {
  findResources(elem);
  messagesWriter.findMessagesConfig(elem);
  XMLElement uiRoot=elem.consumeSingleChildElement();
  return writer.parseElementToField(uiRoot);
}

Fixed version (ground truth):
/** 
 * Parses the root UiBinder element, and kicks off the parsing of the rest of the document.
 */
public String parse(XMLElement elem) throws UnableToCompleteException {
  if (!writer.isBinderElement(elem)) {
    writer.die("String_Node_Str" + "String_Node_Str" + "String_Node_Str",elem.getPrefix(),elem.getLocalName(),UiBinderWriter.BINDER_URI,elem.getPrefix());
  }
  if (!TAG.equals(elem.getLocalName())) {
    writer.die("String_Node_Str",elem.getPrefix(),TAG,elem);
  }
  findResources(elem);
  messagesWriter.findMessagesConfig(elem);
  XMLElement uiRoot=elem.consumeSingleChildElement();
  return writer.parseElementToField(uiRoot);
}
Program: 82433
Project: 82433
Buggy source:
/** 
 * Consumes a single child element, ignoring any text nodes and throwing an exception if no child is found, or more than one child element is found.
 * @throws UnableToCompleteException on no children, or too many
 */
public XMLElement consumeSingleChildElement() throws UnableToCompleteException {
  XMLElement ret=null;
  for (  XMLElement child : consumeChildElements()) {
    if (ret != null) {
      writer.die("String_Node_Str" + "String_Node_Str",getLocalName(),ret,child);
    }
    ret=child;
  }
  if (ret == null) {
    writer.die("String_Node_Str",this);
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Consumes a single child element, ignoring any text nodes and throwing an exception if no child is found, or more than one child element is found.
 * @throws UnableToCompleteException on no children, or too many
 */
public XMLElement consumeSingleChildElement() throws UnableToCompleteException {
  XMLElement ret=null;
  for (  XMLElement child : consumeChildElements()) {
    if (ret != null) {
      writer.die("String_Node_Str" + "String_Node_Str",this,ret,child);
    }
    ret=child;
  }
  if (ret == null) {
    writer.die("String_Node_Str",this);
  }
  return ret;
}