nus-yam/ex-repair huggingface dataset:
Program: 15707
Project: 15707
Buggy source:
/** 
 * Same as   {@link #getInstance(Version)}, but you can specify more settings of the desired instance.
 * @param settings The settings that you want to be set in the returned instance.
 * @since 2.3.21
 */
public static BeansWrapper getInstance(Version incompatibleImprovements,SettingAssignments settings){
  DefaultObjectWrapper res;
  if (!settings.equals(SettingAssignments.DEFAULT)) {
    return new DefaultObjectWrapper(incompatibleImprovements,settings);
  }
  incompatibleImprovements=normalizeIncompatibleImprovementsVersion(incompatibleImprovements);
  int iciInt=incompatibleImprovements.intValue();
  if (iciInt == 2003000) {
    WeakReference rw=singleton2003000;
    if (rw != null) {
      res=(DefaultObjectWrapper)rw.get();
      if (res != null)       return res;
    }
  }
 else   if (iciInt == 2003021) {
    WeakReference rw=singleton2003021;
    if (rw != null) {
      res=(DefaultObjectWrapper)rw.get();
      if (res != null)       return res;
    }
  }
 else {
    throw new RuntimeException();
  }
  res=new DefaultObjectWrapper(incompatibleImprovements,settings);
  if (iciInt == 2003000) {
    singleton2003000=new WeakReference(res);
  }
 else   if (iciInt == 2003021) {
    singleton2003021=new WeakReference(res);
  }
 else {
    throw new RuntimeException();
  }
  return res;
}

Fixed version (ground truth):
/** 
 * Same as   {@link #getInstance(Version)}, but you can specify more settings of the desired instance.
 * @param settings The settings that you want to be set in the returned instance.
 * @since 2.3.21
 */
public static BeansWrapper getInstance(Version incompatibleImprovements,SettingAssignments settings){
  DefaultObjectWrapper res;
  if (!settings.equals(SettingAssignments.DEFAULT)) {
    return new DefaultObjectWrapper(incompatibleImprovements,settings);
  }
  incompatibleImprovements=normalizeIncompatibleImprovementsVersion(incompatibleImprovements);
  int iciInt=incompatibleImprovements.intValue();
  if (iciInt == 2003000) {
    WeakReference rw=singleton2003000;
    if (rw != null) {
      res=(DefaultObjectWrapper)rw.get();
      if (res != null) {
        if (res._preJava5Sync != null) {
synchronized (res._preJava5Sync) {
          }
        }
        return res;
      }
    }
  }
 else   if (iciInt == 2003021) {
    WeakReference rw=singleton2003021;
    if (rw != null) {
      res=(DefaultObjectWrapper)rw.get();
      if (res != null) {
        if (res._preJava5Sync != null) {
synchronized (res._preJava5Sync) {
          }
        }
        return res;
      }
    }
  }
 else {
    throw new RuntimeException();
  }
  res=new DefaultObjectWrapper(incompatibleImprovements,settings);
  if (res._preJava5Sync != null) {
synchronized (res._preJava5Sync) {
    }
  }
  if (iciInt == 2003000) {
    singleton2003000=new WeakReference(res);
  }
 else   if (iciInt == 2003021) {
    singleton2003021=new WeakReference(res);
  }
 else {
    throw new RuntimeException();
  }
  return res;
}
Program: 15708
Project: 15708
Buggy source:
private void calculateIntValue(){
  intValue=intValueFor(major,minor,micro);
}

Fixed version (ground truth):
private int calculateIntValue(){
  return intValueFor(major,minor,micro);
}
Program: 15709
Project: 15709
Buggy source:
public Version(int major,int minor,int micro,String extraInfo,Boolean gaeCompatible,Date buildDate){
  this.major=major;
  this.minor=minor;
  this.micro=micro;
  this.extraInfo=extraInfo;
  this.gaeCompliant=gaeCompatible;
  this.buildDate=buildDate;
  calculateIntValue();
}

Fixed version (ground truth):
public Version(int major,int minor,int micro,String extraInfo,Boolean gaeCompatible,Date buildDate){
  this.major=major;
  this.minor=minor;
  this.micro=micro;
  this.extraInfo=extraInfo;
  this.gaeCompliant=gaeCompatible;
  this.buildDate=buildDate;
  intValue=calculateIntValue();
  originalStringValue=null;
}
Program: 15710
Project: 15710
Buggy source:
public int hashCode(){
  if (hashCode == null) {
    final int prime=31;
    int result=1;
    result=prime * result + ((buildDate == null) ? 0 : buildDate.hashCode());
    result=prime * result + ((extraInfo == null) ? 0 : extraInfo.hashCode());
    result=prime * result + ((gaeCompliant == null) ? 0 : gaeCompliant.hashCode());
    result=prime * result + ((hashCode == null) ? 0 : hashCode.hashCode());
    result=prime * result + intValue;
    result=prime * result + ((stringValue == null) ? 0 : stringValue.hashCode());
    hashCode=new Integer(result);
  }
  return hashCode.intValue();
}

Fixed version (ground truth):
public int hashCode(){
synchronized (this) {
    if (hashCode == null) {
      final int prime=31;
      int result=1;
      result=prime * result + (buildDate == null ? 0 : buildDate.hashCode());
      result=prime * result + (extraInfo == null ? 0 : extraInfo.hashCode());
      result=prime * result + (gaeCompliant == null ? 0 : gaeCompliant.hashCode());
      result=prime * result + (hashCode == null ? 0 : hashCode.hashCode());
      result=prime * result + intValue;
      String stringValue=getStringValue();
      result=prime * result + (stringValue == null ? 0 : stringValue.hashCode());
      hashCode=new Integer(result);
    }
    return hashCode.intValue();
  }
}
Program: 15711
Project: 15711
Buggy source:
/** 
 * Contains the major.minor.micor numbers and the extraInfo part, not the other information.
 */
public synchronized String toString(){
  if (stringValue == null) {
    stringValue=major + "String_Node_Str" + minor+ "String_Node_Str"+ micro;
    if (extraInfo != null)     stringValue+="String_Node_Str" + extraInfo;
  }
  return stringValue;
}

Fixed version (ground truth):
/** 
 * Contains the major.minor.micor numbers and the extraInfo part, not the other information.
 */
public String toString(){
  return getStringValue();
}
Program: 15712
Project: 15712
Buggy source:
/** 
 * @return Possibly {@link EmptyCallableMemberDescriptor#NO_SUCH_METHOD} or {@link EmptyCallableMemberDescriptor#AMBIGUOUS_METHOD}. 
 */
MaybeEmptyCallableMemberDescriptor getMostSpecific(List memberDescs,boolean varArg){
  LinkedList applicables=getApplicables(memberDescs,varArg);
  if (applicables.isEmpty()) {
    return EmptyCallableMemberDescriptor.NO_SUCH_METHOD;
  }
  if (applicables.size() == 1) {
    return (CallableMemberDescriptor)applicables.getFirst();
  }
  LinkedList maximals=new LinkedList();
  for (Iterator it=applicables.iterator(); it.hasNext(); ) {
    CallableMemberDescriptor applicable=(CallableMemberDescriptor)it.next();
    Class[] appParamTypes=applicable.paramTypes;
    boolean lessSpecific=false;
    for (Iterator maximal=maximals.iterator(); maximal.hasNext(); ) {
      CallableMemberDescriptor max=(CallableMemberDescriptor)maximal.next();
      Class[] maxParamTypes=max.paramTypes;
switch (moreSpecific(appParamTypes,maxParamTypes,varArg)) {
case MORE_SPECIFIC:
{
          maximal.remove();
          break;
        }
case LESS_SPECIFIC:
{
        lessSpecific=true;
        break;
      }
  }
}
if (!lessSpecific) {
  maximals.addLast(applicable);
}
}
if (maximals.size() > 1) {
return EmptyCallableMemberDescriptor.AMBIGUOUS_METHOD;
}
return (CallableMemberDescriptor)maximals.getFirst();
}

Fixed version (ground truth):
/** 
 * @return Possibly {@link EmptyCallableMemberDescriptor#NO_SUCH_METHOD} or {@link EmptyCallableMemberDescriptor#AMBIGUOUS_METHOD}. 
 */
MaybeEmptyCallableMemberDescriptor getMostSpecific(List memberDescs,boolean varArg){
  LinkedList applicables=getApplicables(memberDescs,varArg);
  if (applicables.isEmpty()) {
    return EmptyCallableMemberDescriptor.NO_SUCH_METHOD;
  }
  if (applicables.size() == 1) {
    return (CallableMemberDescriptor)applicables.getFirst();
  }
  LinkedList maximals=new LinkedList();
  for (Iterator applicablesIter=applicables.iterator(); applicablesIter.hasNext(); ) {
    CallableMemberDescriptor applicable=(CallableMemberDescriptor)applicablesIter.next();
    boolean lessSpecific=false;
    for (Iterator maximalsIter=maximals.iterator(); maximalsIter.hasNext(); ) {
      CallableMemberDescriptor maximal=(CallableMemberDescriptor)maximalsIter.next();
switch (compareParameterTypesSpecificity(applicable.paramTypes,maximal.paramTypes,varArg)) {
case 1:
{
          maximalsIter.remove();
          break;
        }
case -1:
{
        lessSpecific=true;
        break;
      }
  }
}
if (!lessSpecific) {
  maximals.addLast(applicable);
}
}
if (maximals.size() > 1) {
return EmptyCallableMemberDescriptor.AMBIGUOUS_METHOD;
}
return (CallableMemberDescriptor)maximals.getFirst();
}
Program: 15713
Project: 15713
Buggy source:
ClassString(Object[] objects){
  int l=objects.length;
  classes=new Class[l];
  for (int i=0; i < l; ++i) {
    Object obj=objects[i];
    classes[i]=obj == null ? MethodUtilities.OBJECT_CLASS : obj.getClass();
  }
}

Fixed version (ground truth):
ClassString(Object[] objects,int incompatibleImprovements){
  int l=objects.length;
  classes=new Class[l];
  for (int i=0; i < l; ++i) {
    Object obj=objects[i];
    classes[i]=obj == null ? (incompatibleImprovements > 2003020 ? Null.class : Object.class) : obj.getClass();
  }
  this.incompatibleImprovements=incompatibleImprovements;
}
Program: 15715
Project: 15715
Buggy source:
static Class getMostSpecificCommonType(Class c1,Class c2){
  if (c1 == c2) {
    return c1;
  }
  if (c2.isPrimitive()) {
    if (c2 == Byte.TYPE)     c2=Byte.class;
 else     if (c2 == Short.TYPE)     c2=Short.class;
 else     if (c2 == Character.TYPE)     c2=Character.class;
 else     if (c2 == Integer.TYPE)     c2=Integer.class;
 else     if (c2 == Float.TYPE)     c2=Float.class;
 else     if (c2 == Long.TYPE)     c2=Long.class;
 else     if (c2 == Double.TYPE)     c2=Double.class;
  }
  Set a1=getAssignables(c1,c2);
  Set a2=getAssignables(c2,c1);
  a1.retainAll(a2);
  if (a1.isEmpty()) {
    return Object.class;
  }
  List max=new ArrayList();
  outer:   for (Iterator it=a1.iterator(); it.hasNext(); ) {
    Class clazz=(Class)it.next();
    for (Iterator maxiter=max.iterator(); maxiter.hasNext(); ) {
      Class maxClazz=(Class)maxiter.next();
      if (isMoreSpecific(maxClazz,clazz)) {
        continue outer;
      }
      if (isMoreSpecific(clazz,maxClazz)) {
        maxiter.remove();
      }
    }
    max.add(clazz);
  }
  if (max.size() > 1) {
    return OBJECT_CLASS;
  }
  return (Class)max.get(0);
}

Fixed version (ground truth):
static Class getMostSpecificCommonType(Class c1,Class c2){
  if (c1 == c2) {
    return c1;
  }
  if (c2.isPrimitive()) {
    if (c2 == Byte.TYPE)     c2=Byte.class;
 else     if (c2 == Short.TYPE)     c2=Short.class;
 else     if (c2 == Character.TYPE)     c2=Character.class;
 else     if (c2 == Integer.TYPE)     c2=Integer.class;
 else     if (c2 == Float.TYPE)     c2=Float.class;
 else     if (c2 == Long.TYPE)     c2=Long.class;
 else     if (c2 == Double.TYPE)     c2=Double.class;
  }
  Set a1=getAssignables(c1,c2);
  Set a2=getAssignables(c2,c1);
  a1.retainAll(a2);
  if (a1.isEmpty()) {
    return Object.class;
  }
  List max=new ArrayList();
  outer:   for (Iterator it=a1.iterator(); it.hasNext(); ) {
    Class clazz=(Class)it.next();
    for (Iterator maxiter=max.iterator(); maxiter.hasNext(); ) {
      Class maxClazz=(Class)maxiter.next();
      if (isMoreSpecific(maxClazz,clazz)) {
        continue outer;
      }
      if (isMoreSpecific(clazz,maxClazz)) {
        maxiter.remove();
      }
    }
    max.add(clazz);
  }
  if (max.size() > 1) {
    return Object.class;
  }
  return (Class)max.get(0);
}
Program: 15716
Project: 15716
Buggy source:
MaybeEmptyMemberAndArguments getMemberAndArguments(List tmArgs,BeansWrapper w) throws TemplateModelException {
  if (tmArgs == null) {
    tmArgs=Collections.EMPTY_LIST;
  }
  final int argCount=tmArgs.size();
  final Class[][] unwrappingHintsByParamCount=getUnwrappingHintsByParamCount();
  if (unwrappingHintsByParamCount.length <= argCount) {
    return EmptyMemberAndArguments.NO_SUCH_METHOD;
  }
  Class[] unwarppingArgumentTypes=unwrappingHintsByParamCount[argCount];
  if (unwarppingArgumentTypes == null) {
    return EmptyMemberAndArguments.NO_SUCH_METHOD;
  }
  Object[] pojoArgs=new Object[argCount];
  Iterator it=tmArgs.iterator();
  for (int i=0; i < argCount; ++i) {
    Object pojo=w.unwrapInternal((TemplateModel)it.next(),unwarppingArgumentTypes[i]);
    if (pojo == BeansWrapper.CAN_NOT_UNWRAP) {
      return EmptyMemberAndArguments.NO_SUCH_METHOD;
    }
    pojoArgs[i]=pojo;
  }
  MaybeEmptyCallableMemberDescriptor maybeEmtpyMemberDesc=getMemberForArgs(pojoArgs,false);
  if (maybeEmtpyMemberDesc instanceof CallableMemberDescriptor) {
    CallableMemberDescriptor memberDesc=(CallableMemberDescriptor)maybeEmtpyMemberDesc;
    BeansWrapper.coerceBigDecimals(memberDesc.paramTypes,pojoArgs);
    return new MemberAndArguments(memberDesc.member,pojoArgs);
  }
 else {
    return EmptyMemberAndArguments.from((EmptyCallableMemberDescriptor)maybeEmtpyMemberDesc);
  }
}

Fixed version (ground truth):
MaybeEmptyMemberAndArguments getMemberAndArguments(List tmArgs,BeansWrapper w) throws TemplateModelException {
  if (tmArgs == null) {
    tmArgs=Collections.EMPTY_LIST;
  }
  final int argCount=tmArgs.size();
  final Class[][] unwrappingHintsByParamCount=getUnwrappingHintsByParamCount();
  if (unwrappingHintsByParamCount.length <= argCount) {
    return EmptyMemberAndArguments.NO_SUCH_METHOD;
  }
  Class[] unwarppingArgumentTypes=unwrappingHintsByParamCount[argCount];
  if (unwarppingArgumentTypes == null) {
    return EmptyMemberAndArguments.NO_SUCH_METHOD;
  }
  Object[] pojoArgs=new Object[argCount];
  Iterator it=tmArgs.iterator();
  for (int i=0; i < argCount; ++i) {
    Object pojo=w.unwrapInternal((TemplateModel)it.next(),unwarppingArgumentTypes[i]);
    if (pojo == BeansWrapper.CAN_NOT_UNWRAP) {
      return EmptyMemberAndArguments.NO_SUCH_METHOD;
    }
    pojoArgs[i]=pojo;
  }
  MaybeEmptyCallableMemberDescriptor maybeEmtpyMemberDesc=getMemberDescriptorForArgs(pojoArgs,false);
  if (maybeEmtpyMemberDesc instanceof CallableMemberDescriptor) {
    CallableMemberDescriptor memberDesc=(CallableMemberDescriptor)maybeEmtpyMemberDesc;
    BeansWrapper.coerceBigDecimals(memberDesc.paramTypes,pojoArgs);
    return new MemberAndArguments(memberDesc.member,pojoArgs);
  }
 else {
    return EmptyMemberAndArguments.from((EmptyCallableMemberDescriptor)maybeEmtpyMemberDesc);
  }
}
Program: 15717
Project: 15717
Buggy source:
void addCallableMemberDescriptor(CallableMemberDescriptor memberDesc){
  final int paramCount=memberDesc.paramTypes.length;
  memberDescs.add(memberDesc);
  final Class[] preprocessedParamTypes=preprocessParameterTypes(memberDesc);
  final Class[] unwrappingHints=(Class[])preprocessedParamTypes.clone();
  if (unwrappingHintsByParamCount == null) {
    unwrappingHintsByParamCount=new Class[paramCount + 1][];
    unwrappingHintsByParamCount[paramCount]=unwrappingHints;
  }
 else   if (unwrappingHintsByParamCount.length <= paramCount) {
    Class[][] newUnwrappingHintsByParamCount=new Class[paramCount + 1][];
    System.arraycopy(unwrappingHintsByParamCount,0,newUnwrappingHintsByParamCount,0,unwrappingHintsByParamCount.length);
    unwrappingHintsByParamCount=newUnwrappingHintsByParamCount;
    unwrappingHintsByParamCount[paramCount]=unwrappingHints;
  }
 else {
    Class[] prevUnwrappingHints=unwrappingHintsByParamCount[paramCount];
    if (prevUnwrappingHints == null) {
      unwrappingHintsByParamCount[paramCount]=unwrappingHints;
    }
 else {
      for (int i=0; i < prevUnwrappingHints.length; ++i) {
        prevUnwrappingHints[i]=MethodUtilities.getMostSpecificCommonType(prevUnwrappingHints[i],unwrappingHints[i]);
      }
    }
  }
  afterWideningUnwrappingHints(beansWrapperVersion >= 2003021 ? preprocessedParamTypes : unwrappingHints);
}

Fixed version (ground truth):
void addCallableMemberDescriptor(CallableMemberDescriptor memberDesc){
  final int paramCount=memberDesc.paramTypes.length;
  memberDescs.add(memberDesc);
  final Class[] preprocessedParamTypes=preprocessParameterTypes(memberDesc);
  final Class[] unwrappingHints=(Class[])preprocessedParamTypes.clone();
  if (unwrappingHintsByParamCount == null) {
    unwrappingHintsByParamCount=new Class[paramCount + 1][];
    unwrappingHintsByParamCount[paramCount]=unwrappingHints;
  }
 else   if (unwrappingHintsByParamCount.length <= paramCount) {
    Class[][] newUnwrappingHintsByParamCount=new Class[paramCount + 1][];
    System.arraycopy(unwrappingHintsByParamCount,0,newUnwrappingHintsByParamCount,0,unwrappingHintsByParamCount.length);
    unwrappingHintsByParamCount=newUnwrappingHintsByParamCount;
    unwrappingHintsByParamCount[paramCount]=unwrappingHints;
  }
 else {
    Class[] prevUnwrappingHints=unwrappingHintsByParamCount[paramCount];
    if (prevUnwrappingHints == null) {
      unwrappingHintsByParamCount[paramCount]=unwrappingHints;
    }
 else {
      for (int i=0; i < prevUnwrappingHints.length; ++i) {
        prevUnwrappingHints[i]=MethodUtilities.getMostSpecificCommonType(prevUnwrappingHints[i],unwrappingHints[i]);
      }
    }
  }
  afterWideningUnwrappingHints(incompatibleImprovements >= 2003021 ? preprocessedParamTypes : unwrappingHints);
}
Program: 15718
Project: 15718
Buggy source:
OverloadedMethodsSubset(BeansWrapper beansWrapper){
  beansWrapperVersion=beansWrapper.getIncompatibleImprovements().intValue();
}

Fixed version (ground truth):
OverloadedMethodsSubset(BeansWrapper beansWrapper){
  incompatibleImprovements=beansWrapper.getIncompatibleImprovements().intValue();
}
Program: 15720
Project: 15720
Buggy source:
private static int compareParameterTypesSpecificity(Class[] paramTypes1,Class[] paramTypes2,boolean varArg){
  boolean paramTypes1HasAMoreSpecific=false;
  boolean paramTypes2HasAMoreSpecific=false;
  final int paramTypes1Len=paramTypes1.length;
  final int paramTypes2Len=paramTypes2.length;
  for (int i=0; i < paramTypes1Len; ++i) {
    Class paramType1=getParamType(paramTypes1,paramTypes1Len,i,varArg);
    Class paramType2=getParamType(paramTypes2,paramTypes2Len,i,varArg);
    if (paramType1 != paramType2) {
      paramTypes1HasAMoreSpecific=paramTypes1HasAMoreSpecific || MethodUtilities.isMoreSpecific(paramType1,paramType2);
      paramTypes2HasAMoreSpecific=paramTypes2HasAMoreSpecific || MethodUtilities.isMoreSpecific(paramType2,paramType1);
    }
  }
  if (paramTypes1HasAMoreSpecific) {
    return paramTypes2HasAMoreSpecific ? 0 : 1;
  }
 else   if (paramTypes2HasAMoreSpecific) {
    return -1;
  }
 else {
    return 0;
  }
}

Fixed version (ground truth):
private int compareParameterTypesSpecificity(Class[] paramTypes1,Class[] paramTypes2,boolean varArg){
  boolean paramTypes1HasAMoreSpecific=false;
  boolean paramTypes2HasAMoreSpecific=false;
  final int paramTypes1Len=paramTypes1.length;
  final int paramTypes2Len=paramTypes2.length;
  for (int i=0; i < paramTypes1Len; ++i) {
    Class paramType1=getParamType(paramTypes1,paramTypes1Len,i,varArg);
    Class paramType2=getParamType(paramTypes2,paramTypes2Len,i,varArg);
    if (paramType1 != paramType2) {
      paramTypes1HasAMoreSpecific=paramTypes1HasAMoreSpecific || MethodUtilities.isMoreSpecificOrTheSame(paramType1,paramType2,bugfixed);
      paramTypes2HasAMoreSpecific=paramTypes2HasAMoreSpecific || MethodUtilities.isMoreSpecificOrTheSame(paramType2,paramType1,bugfixed);
    }
  }
  if (paramTypes1HasAMoreSpecific) {
    return paramTypes2HasAMoreSpecific ? 0 : 1;
  }
 else   if (paramTypes2HasAMoreSpecific) {
    return -1;
  }
 else {
    return 0;
  }
}
Program: 15721
Project: 15721
Buggy source:
ClassString(Object[] objects,int incompatibleImprovements){
  int l=objects.length;
  classes=new Class[l];
  for (int i=0; i < l; ++i) {
    Object obj=objects[i];
    classes[i]=obj == null ? (incompatibleImprovements > 2003020 ? Null.class : Object.class) : obj.getClass();
  }
  this.incompatibleImprovements=incompatibleImprovements;
}

Fixed version (ground truth):
ClassString(Object[] objects,boolean bugfixed){
  int l=objects.length;
  classes=new Class[l];
  for (int i=0; i < l; ++i) {
    Object obj=objects[i];
    classes[i]=obj == null ? (bugfixed ? Null.class : Object.class) : obj.getClass();
  }
  this.bugfixed=bugfixed;
}
Program: 15723
Project: 15723
Buggy source:
private static Set getAssignables(Class c1,Class c2){
  Set s=new HashSet();
  collectAssignables(c1,c2,s);
  return s;
}

Fixed version (ground truth):
/** 
 * Attention, this doesn't handle primitive classes correctly, nor numerical conversions.
 */
static Set getAssignables(Class c1,Class c2){
  Set s=new HashSet();
  collectAssignables(c1,c2,s);
  return s;
}
Program: 15724
Project: 15724
Buggy source:
MaybeEmptyCallableMemberDescriptor getMemberDescriptorForArgs(Object[] args,boolean varArg){
  ClassString argTypes=new ClassString(args,incompatibleImprovements);
  MaybeEmptyCallableMemberDescriptor memberDesc;
synchronized (argTypesToMemberDescCache) {
    memberDesc=(MaybeEmptyCallableMemberDescriptor)argTypesToMemberDescCache.get(argTypes);
    if (memberDesc == null) {
      memberDesc=argTypes.getMostSpecific(memberDescs,varArg);
      argTypesToMemberDescCache.put(argTypes,memberDesc);
    }
  }
  return memberDesc;
}

Fixed version (ground truth):
MaybeEmptyCallableMemberDescriptor getMemberDescriptorForArgs(Object[] args,boolean varArg){
  ClassString argTypes=new ClassString(args,bugfixed);
  MaybeEmptyCallableMemberDescriptor memberDesc;
synchronized (argTypesToMemberDescCache) {
    memberDesc=(MaybeEmptyCallableMemberDescriptor)argTypesToMemberDescCache.get(argTypes);
    if (memberDesc == null) {
      memberDesc=argTypes.getMostSpecific(memberDescs,varArg);
      argTypesToMemberDescCache.put(argTypes,memberDesc);
    }
  }
  return memberDesc;
}
Program: 15725
Project: 15725
Buggy source:
void addCallableMemberDescriptor(CallableMemberDescriptor memberDesc){
  final int paramCount=memberDesc.paramTypes.length;
  memberDescs.add(memberDesc);
  final Class[] preprocessedParamTypes=preprocessParameterTypes(memberDesc);
  final Class[] unwrappingHints=(Class[])preprocessedParamTypes.clone();
  if (unwrappingHintsByParamCount == null) {
    unwrappingHintsByParamCount=new Class[paramCount + 1][];
    unwrappingHintsByParamCount[paramCount]=unwrappingHints;
  }
 else   if (unwrappingHintsByParamCount.length <= paramCount) {
    Class[][] newUnwrappingHintsByParamCount=new Class[paramCount + 1][];
    System.arraycopy(unwrappingHintsByParamCount,0,newUnwrappingHintsByParamCount,0,unwrappingHintsByParamCount.length);
    unwrappingHintsByParamCount=newUnwrappingHintsByParamCount;
    unwrappingHintsByParamCount[paramCount]=unwrappingHints;
  }
 else {
    Class[] prevUnwrappingHints=unwrappingHintsByParamCount[paramCount];
    if (prevUnwrappingHints == null) {
      unwrappingHintsByParamCount[paramCount]=unwrappingHints;
    }
 else {
      for (int i=0; i < prevUnwrappingHints.length; ++i) {
        prevUnwrappingHints[i]=MethodUtilities.getMostSpecificCommonType(prevUnwrappingHints[i],unwrappingHints[i]);
      }
    }
  }
  afterWideningUnwrappingHints(incompatibleImprovements >= 2003021 ? preprocessedParamTypes : unwrappingHints);
}

Fixed version (ground truth):
void addCallableMemberDescriptor(CallableMemberDescriptor memberDesc){
  final int paramCount=memberDesc.paramTypes.length;
  memberDescs.add(memberDesc);
  final Class[] preprocessedParamTypes=preprocessParameterTypes(memberDesc);
  final Class[] unwrappingHints=(Class[])preprocessedParamTypes.clone();
  if (unwrappingHintsByParamCount == null) {
    unwrappingHintsByParamCount=new Class[paramCount + 1][];
    unwrappingHintsByParamCount[paramCount]=unwrappingHints;
  }
 else   if (unwrappingHintsByParamCount.length <= paramCount) {
    Class[][] newUnwrappingHintsByParamCount=new Class[paramCount + 1][];
    System.arraycopy(unwrappingHintsByParamCount,0,newUnwrappingHintsByParamCount,0,unwrappingHintsByParamCount.length);
    unwrappingHintsByParamCount=newUnwrappingHintsByParamCount;
    unwrappingHintsByParamCount[paramCount]=unwrappingHints;
  }
 else {
    Class[] prevUnwrappingHints=unwrappingHintsByParamCount[paramCount];
    if (prevUnwrappingHints == null) {
      unwrappingHintsByParamCount[paramCount]=unwrappingHints;
    }
 else {
      for (int i=0; i < prevUnwrappingHints.length; ++i) {
        prevUnwrappingHints[i]=getCommonSupertypeForUnwrappingHint(prevUnwrappingHints[i],unwrappingHints[i]);
      }
    }
  }
  afterWideningUnwrappingHints(bugfixed ? preprocessedParamTypes : unwrappingHints);
}
Program: 15726
Project: 15726
Buggy source:
OverloadedMethodsSubset(BeansWrapper beansWrapper){
  incompatibleImprovements=beansWrapper.getIncompatibleImprovements().intValue();
}

Fixed version (ground truth):
OverloadedMethodsSubset(BeansWrapper beansWrapper){
  bugfixed=beansWrapper.getIncompatibleImprovements().intValue() >= 2003021;
}
Program: 15727
Project: 15727
Buggy source:
/** 
 * @param incompatibleImprovements Sets which of the non-backward-compatible bugfixes/improvements should be enabled. This is like {@link Configuration#setIncompatibleEnhancements(String)}, except that it applies to the object wrapper only, and the actual effects are as listed below. (As   {@link ObjectWrapper} objects are often shared among multiple{@link Configuration}-s, they can't use   {@link Configuration#getIncompatibleEnhancements()} to decidetheir own incompatible improvements setting.) <ul> <li> </li> </ul>
 * @since 2.3.21
 */
public BeansWrapper(Version incompatibleImprovements){
  NullArgumentException.check("String_Node_Str",incompatibleImprovements);
  this.incompatibleImprovements=incompatibleImprovements;
  staticModels=new StaticModels(this);
  enumModels=createEnumModels(this);
  modelCache=new BeansModelCache(this);
  FALSE=new BooleanModel(Boolean.FALSE,this);
  TRUE=new BooleanModel(Boolean.TRUE,this);
  if (javaRebelAvailable) {
    JavaRebelIntegration.registerWrapper(this);
  }
}

Fixed version (ground truth):
/** 
 * @param incompatibleImprovements Sets which of the non-backward-compatible bugfixes/improvements should be enabled. This is like {@link Configuration#setIncompatibleEnhancements(String)}, except that it applies to the object wrapper only, and the actual effects are as listed below. (As   {@link ObjectWrapper} objects are often shared among multiple{@link Configuration}-s, they can't use   {@link Configuration#getIncompatibleEnhancements()} to decidetheir own incompatible improvements setting.) <ul> <li> 2.3.21 (or higher): <ul> <li>Overloaded methods use more specific type hinting when unwrapping varargs in some rare cases. (For example, for m(File, String...) and m(String...), sometimes (unpredictably) it has unwrapped arguments with the hints [Object, Object, Object, etc.] instead of with  [Object, String, String, ...].)</li> </ul>  </li> </ul>
 * @since 2.3.21
 */
public BeansWrapper(Version incompatibleImprovements){
  NullArgumentException.check("String_Node_Str",incompatibleImprovements);
  this.incompatibleImprovements=incompatibleImprovements;
  staticModels=new StaticModels(this);
  enumModels=createEnumModels(this);
  modelCache=new BeansModelCache(this);
  FALSE=new BooleanModel(Boolean.FALSE,this);
  TRUE=new BooleanModel(Boolean.TRUE,this);
  if (javaRebelAvailable) {
    JavaRebelIntegration.registerWrapper(this);
  }
}
Program: 15729
Project: 15729
Buggy source:
void afterWideningUnwrappingHints(int paramCount){
}

Fixed version (ground truth):
void afterWideningUnwrappingHints(Class[] paramTypes){
}
Program: 15730
Project: 15730
Buggy source:
void addMember(Member member){
  fixArgMethods.addMember(member);
  if (MethodUtilities.isVarArgs(member)) {
    if (varargMethods == null) {
      varargMethods=new OverloadedVarArgsMethods();
    }
    varargMethods.addMember(member);
  }
}

Fixed version (ground truth):
void addMember(Member member){
  fixArgMethods.addMember(member);
  if (MethodUtilities.isVarArgs(member)) {
    if (varargMethods == null) {
      varargMethods=new OverloadedVarArgsMethods(wrapper);
    }
    varargMethods.addMember(member);
  }
}
Program: 15731
Project: 15731
Buggy source:
OverloadedMethods(BeansWrapper wrapper){
  this.wrapper=wrapper;
}

Fixed version (ground truth):
OverloadedMethods(BeansWrapper wrapper){
  this.wrapper=wrapper;
  fixArgMethods=new OverloadedFixArgsMethods(wrapper);
}
Program: 15732
Project: 15732
Buggy source:
void addMember(Member member){
  members.add(member);
  Class[] paramTypes=MethodUtilities.getParameterTypes(member);
  final int paramCount=paramTypes.length;
  signatures.put(member,paramTypes.clone());
  beforeWideningUnwrappingHints(member,paramTypes);
  if (unwrappingHintsByParamCount == null) {
    unwrappingHintsByParamCount=new Class[paramCount + 1][];
    unwrappingHintsByParamCount[paramCount]=paramTypes;
  }
 else   if (unwrappingHintsByParamCount.length <= paramCount) {
    Class[][] newUnwrappingHintsByParamCount=new Class[paramCount + 1][];
    System.arraycopy(unwrappingHintsByParamCount,0,newUnwrappingHintsByParamCount,0,unwrappingHintsByParamCount.length);
    unwrappingHintsByParamCount=newUnwrappingHintsByParamCount;
    unwrappingHintsByParamCount[paramCount]=paramTypes;
  }
 else {
    Class[] unwrappingHints=unwrappingHintsByParamCount[paramCount];
    if (unwrappingHints == null) {
      unwrappingHintsByParamCount[paramCount]=paramTypes;
    }
 else {
      for (int i=0; i < unwrappingHints.length; ++i) {
        unwrappingHints[i]=MethodUtilities.getMostSpecificCommonType(unwrappingHints[i],paramTypes[i]);
      }
    }
  }
  afterWideningUnwrappingHints(paramCount);
}

Fixed version (ground truth):
void addMember(Member member){
  members.add(member);
  final Class[] paramTypes=MethodUtilities.getParameterTypes(member);
  final int paramCount=paramTypes.length;
  signatures.put(member,paramTypes);
  final Class[] preprocessedParamTypes=preprocessParameterTypes(member,paramTypes);
  final Class[] unwrappingHints=(Class[])preprocessedParamTypes.clone();
  if (unwrappingHintsByParamCount == null) {
    unwrappingHintsByParamCount=new Class[paramCount + 1][];
    unwrappingHintsByParamCount[paramCount]=unwrappingHints;
  }
 else   if (unwrappingHintsByParamCount.length <= paramCount) {
    Class[][] newUnwrappingHintsByParamCount=new Class[paramCount + 1][];
    System.arraycopy(unwrappingHintsByParamCount,0,newUnwrappingHintsByParamCount,0,unwrappingHintsByParamCount.length);
    unwrappingHintsByParamCount=newUnwrappingHintsByParamCount;
    unwrappingHintsByParamCount[paramCount]=unwrappingHints;
  }
 else {
    Class[] prevUnwrappingHints=unwrappingHintsByParamCount[paramCount];
    if (prevUnwrappingHints == null) {
      unwrappingHintsByParamCount[paramCount]=unwrappingHints;
    }
 else {
      for (int i=0; i < prevUnwrappingHints.length; ++i) {
        prevUnwrappingHints[i]=MethodUtilities.getMostSpecificCommonType(prevUnwrappingHints[i],unwrappingHints[i]);
      }
    }
  }
  afterWideningUnwrappingHints(beansWrapperVersion >= 2003021 ? preprocessedParamTypes : unwrappingHints);
}
Program: 15733
Project: 15733
Buggy source:
abstract void afterWideningUnwrappingHints(int paramCount);

Fixed version (ground truth):
abstract void afterWideningUnwrappingHints(Class[] paramTypes);
Program: 15734
Project: 15734
Buggy source:
Object[] packArgs(Object[] args,List modelArgs,BeansWrapper w) throws TemplateModelException {
  final int totalArgCount=args.length;
  final int fixArgCount=paramCount - 1;
  if (args.length != paramCount) {
    Object[] packedArgs=new Object[paramCount];
    System.arraycopy(args,0,packedArgs,0,fixArgCount);
    Object varargs=Array.newInstance(varArgsParamCompType,totalArgCount - fixArgCount);
    for (int i=fixArgCount; i < totalArgCount; ++i) {
      Object val=w.unwrapInternal((TemplateModel)modelArgs.get(i),varArgsParamCompType);
      if (val == BeansWrapper.CAN_NOT_UNWRAP) {
        return null;
      }
      Array.set(varargs,i - fixArgCount,val);
    }
    packedArgs[fixArgCount]=varargs;
    return packedArgs;
  }
 else {
    Object val=w.unwrapInternal((TemplateModel)modelArgs.get(fixArgCount),varArgsParamCompType);
    if (val == BeansWrapper.CAN_NOT_UNWRAP) {
      return null;
    }
    Object array=Array.newInstance(varArgsParamCompType,1);
    Array.set(array,0,val);
    args[fixArgCount]=array;
    return args;
  }
}

Fixed version (ground truth):
Object[] packArgs(Object[] args,List modelArgs,BeansWrapper w) throws TemplateModelException {
  final int totalArgCount=args.length;
  final int fixArgCount=paramCount - 1;
  if (args.length != paramCount) {
    Object[] packedArgs=new Object[paramCount];
    System.arraycopy(args,0,packedArgs,0,fixArgCount);
    Object varargs=Array.newInstance(varArgsCompType,totalArgCount - fixArgCount);
    for (int i=fixArgCount; i < totalArgCount; ++i) {
      Object val=w.unwrapInternal((TemplateModel)modelArgs.get(i),varArgsCompType);
      if (val == BeansWrapper.CAN_NOT_UNWRAP) {
        return null;
      }
      Array.set(varargs,i - fixArgCount,val);
    }
    packedArgs[fixArgCount]=varargs;
    return packedArgs;
  }
 else {
    Object val=w.unwrapInternal((TemplateModel)modelArgs.get(fixArgCount),varArgsCompType);
    if (val == BeansWrapper.CAN_NOT_UNWRAP) {
      return null;
    }
    Object array=Array.newInstance(varArgsCompType,1);
    Array.set(array,0,val);
    args[fixArgCount]=array;
    return args;
  }
}
Program: 15735
Project: 15735
Buggy source:
public int hashCode(){
  return paramCount ^ varArgsParamCompType.hashCode();
}

Fixed version (ground truth):
public int hashCode(){
  return paramCount ^ varArgsCompType.hashCode();
}
Program: 15736
Project: 15736
Buggy source:
public boolean equals(Object obj){
  if (obj instanceof ArgumentPacker) {
    ArgumentPacker p=(ArgumentPacker)obj;
    return paramCount == p.paramCount && varArgsParamCompType == p.varArgsParamCompType;
  }
  return false;
}

Fixed version (ground truth):
public boolean equals(Object obj){
  if (obj instanceof ArgumentPacker) {
    ArgumentPacker p=(ArgumentPacker)obj;
    return paramCount == p.paramCount && varArgsCompType == p.varArgsCompType;
  }
  return false;
}
Program: 15737
Project: 15737
Buggy source:
ArgumentPacker(Class[] paramTypes){
  paramCount=paramTypes.length;
  varArgsParamCompType=paramTypes[paramCount - 1].getComponentType();
}

Fixed version (ground truth):
ArgumentPacker(int paramCount,Class varArgsCompType){
  this.paramCount=paramCount;
  this.varArgsCompType=varArgsCompType;
}
Program: 15738
Project: 15738
Buggy source:
void afterWideningUnwrappingHints(int paramCount){
  final Class[][] unwrappingHintsByParamCount=getUnwrappingHintsByParamCount();
  final Class[] newTypes=unwrappingHintsByParamCount[paramCount];
  for (int i=paramCount - 1; i >= 0; i--) {
    Class[] previousTypes=unwrappingHintsByParamCount[i];
    if (previousTypes != null) {
      widenToCommonSupertypes(newTypes,previousTypes);
      break;
    }
  }
  if (paramCount + 1 < unwrappingHintsByParamCount.length) {
    Class[] oneLongerHints=unwrappingHintsByParamCount[paramCount + 1];
    if (oneLongerHints != null) {
      widenToCommonSupertypes(newTypes,oneLongerHints);
    }
  }
  for (int i=paramCount + 1; i < unwrappingHintsByParamCount.length; ++i) {
    Class[] longerUnwrappingHints=unwrappingHintsByParamCount[i];
    if (longerUnwrappingHints != null) {
      widenToCommonSupertypes(longerUnwrappingHints,newTypes);
    }
  }
  if (paramCount > 0) {
    Class[] oneShorterUnwrappingHints=unwrappingHintsByParamCount[paramCount - 1];
    if (oneShorterUnwrappingHints != null) {
      widenToCommonSupertypes(oneShorterUnwrappingHints,newTypes);
    }
  }
}

Fixed version (ground truth):
void afterWideningUnwrappingHints(Class[] paramTypes){
  final int paramCount=paramTypes.length;
  final Class[][] unwrappingHintsByParamCount=getUnwrappingHintsByParamCount();
  final Class[] hints=unwrappingHintsByParamCount[paramCount];
  for (int i=paramCount - 1; i >= 0; i--) {
    Class[] previousHints=unwrappingHintsByParamCount[i];
    if (previousHints != null) {
      widenToCommonSupertypes(hints,previousHints);
      break;
    }
  }
  if (paramCount + 1 < unwrappingHintsByParamCount.length) {
    Class[] oneLongerHints=unwrappingHintsByParamCount[paramCount + 1];
    if (oneLongerHints != null) {
      widenToCommonSupertypes(hints,oneLongerHints);
    }
  }
  for (int i=paramCount + 1; i < unwrappingHintsByParamCount.length; ++i) {
    Class[] longerHints=unwrappingHintsByParamCount[i];
    if (longerHints != null) {
      widenToCommonSupertypes(longerHints,paramTypes);
    }
  }
  if (paramCount > 0) {
    Class[] oneShorterUnwrappingHints=unwrappingHintsByParamCount[paramCount - 1];
    if (oneShorterUnwrappingHints != null) {
      widenToCommonSupertypes(oneShorterUnwrappingHints,paramTypes);
    }
  }
}
Program: 15743
Project: 15743
Buggy source:
/** 
 * @return the DOM Parser implementation that is used when building NodeModel objects from XML files.
 */
static public DocumentBuilderFactory getDocumentBuilderFactory(){
  if (docBuilderFactory == null) {
    docBuilderFactory=DocumentBuilderFactory.newInstance();
    docBuilderFactory.setNamespaceAware(true);
    docBuilderFactory.setIgnoringElementContentWhitespace(true);
  }
  return docBuilderFactory;
}

Fixed version (ground truth):
/** 
 * @return the DOM Parser implementation that is used when building NodeModel objects from XML files.
 */
static public DocumentBuilderFactory getDocumentBuilderFactory(){
  if (docBuilderFactory == null) {
    DocumentBuilderFactory newFactory=DocumentBuilderFactory.newInstance();
    newFactory.setNamespaceAware(true);
    newFactory.setIgnoringElementContentWhitespace(true);
    docBuilderFactory=newFactory;
  }
  return docBuilderFactory;
}
Program: 15744
Project: 15744
Buggy source:
public String toString(){
  if (stringValue == NOT_SET) {
synchronized (this) {
      if (stringValue == NOT_SET) {
        stringValue=doConversion(object);
        this.object=null;
      }
    }
  }
  return stringValue;
}

Fixed version (ground truth):
public synchronized String toString(){
  if (stringValue == NOT_SET) {
    stringValue=doConversion(object);
    this.object=null;
  }
  return stringValue;
}
Program: 15745
Project: 15745
Buggy source:
public String getMessage(){
  if (messageWasAlreadyPrintedForThisTrace != null && messageWasAlreadyPrintedForThisTrace.get() == Boolean.TRUE) {
    return "String_Node_Str";
  }
 else {
    if (message == null) {
synchronized (lock) {
        if (message == null)         renderMessages();
      }
    }
    return message;
  }
}

Fixed version (ground truth):
public String getMessage(){
  if (messageWasAlreadyPrintedForThisTrace != null && messageWasAlreadyPrintedForThisTrace.get() == Boolean.TRUE) {
    return "String_Node_Str";
  }
 else {
synchronized (lock) {
      if (message == null)       renderMessages();
      return message;
    }
  }
}
Program: 15746
Project: 15746
Buggy source:
/** 
 * Similar to   {@link #getMessage()}, but it doesn't contain the position of the failing instruction at then end of the text. It might contains the position of the failing <em>expression</em> though as part of the expression quotation, as that's the part of the description. 
 */
public String getMessageWithoutStackTop(){
  if (messageWithoutStackTop == null) {
synchronized (lock) {
      if (messageWithoutStackTop == null)       renderMessages();
    }
  }
  return messageWithoutStackTop;
}

Fixed version (ground truth):
/** 
 * Similar to   {@link #getMessage()}, but it doesn't contain the position of the failing instruction at then end of the text. It might contains the position of the failing <em>expression</em> though as part of the expression quotation, as that's the part of the description. 
 */
public String getMessageWithoutStackTop(){
synchronized (lock) {
    if (messageWithoutStackTop == null)     renderMessages();
    return messageWithoutStackTop;
  }
}
Program: 15747
Project: 15747
Buggy source:
private String getDescription(){
  if (description == null) {
synchronized (lock) {
      if (description == null && descriptionBuilder != null) {
        description=descriptionBuilder.toString(getFailingInstruction());
        descriptionBuilder=null;
      }
    }
  }
  return description;
}

Fixed version (ground truth):
private String getDescription(){
synchronized (lock) {
    if (description == null) {
      if (description == null && descriptionBuilder != null) {
        description=descriptionBuilder.toString(getFailingInstruction());
        descriptionBuilder=null;
      }
    }
    return description;
  }
}
Program: 15748
Project: 15748
Buggy source:
/** 
 * Returns the snapshot of the FTL stack strace at the time this exception was created.
 */
public String getFTLInstructionStack(){
  if (ftlInstructionStackSnapshot != null || renderedFtlInstructionStackSnapshot != null) {
    if (renderedFtlInstructionStackSnapshot == null) {
      StringWriter sw=new StringWriter();
      PrintWriter pw=new PrintWriter(sw);
      _CoreAPI.outputInstructionStack(ftlInstructionStackSnapshot,pw);
      pw.close();
synchronized (lock) {
        if (renderedFtlInstructionStackSnapshot == null) {
          renderedFtlInstructionStackSnapshot=sw.toString();
          deleteFTLInstructionStackSnapshotIfNotNeeded();
        }
      }
    }
    return renderedFtlInstructionStackSnapshot;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Returns the snapshot of the FTL stack strace at the time this exception was created.
 */
public String getFTLInstructionStack(){
synchronized (lock) {
    if (ftlInstructionStackSnapshot != null || renderedFtlInstructionStackSnapshot != null) {
      if (renderedFtlInstructionStackSnapshot == null) {
        StringWriter sw=new StringWriter();
        PrintWriter pw=new PrintWriter(sw);
        _CoreAPI.outputInstructionStack(ftlInstructionStackSnapshot,pw);
        pw.close();
        if (renderedFtlInstructionStackSnapshot == null) {
          renderedFtlInstructionStackSnapshot=sw.toString();
          deleteFTLInstructionStackSnapshotIfNotNeeded();
        }
      }
      return renderedFtlInstructionStackSnapshot;
    }
 else {
      return null;
    }
  }
}
Program: 15749
Project: 15749
Buggy source:
private String getFTLInstructionStackTop(){
  if (ftlInstructionStackSnapshot != null || renderedFtlInstructionStackSnapshotTop != null) {
    if (renderedFtlInstructionStackSnapshotTop == null) {
      int stackSize=ftlInstructionStackSnapshot.length;
      String s;
      if (stackSize == 0) {
        s="String_Node_Str";
      }
 else {
        s=(stackSize > 1 ? "String_Node_Str" + (stackSize - 1) + "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + _CoreAPI.instructionStackItemToString(ftlInstructionStackSnapshot[0]);
      }
synchronized (lock) {
        if (renderedFtlInstructionStackSnapshotTop == null) {
          renderedFtlInstructionStackSnapshotTop=s;
          deleteFTLInstructionStackSnapshotIfNotNeeded();
        }
      }
    }
    return renderedFtlInstructionStackSnapshotTop.length() != 0 ? renderedFtlInstructionStackSnapshotTop : null;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
private String getFTLInstructionStackTop(){
synchronized (lock) {
    if (ftlInstructionStackSnapshot != null || renderedFtlInstructionStackSnapshotTop != null) {
      if (renderedFtlInstructionStackSnapshotTop == null) {
        int stackSize=ftlInstructionStackSnapshot.length;
        String s;
        if (stackSize == 0) {
          s="String_Node_Str";
        }
 else {
          s=(stackSize > 1 ? "String_Node_Str" + (stackSize - 1) + "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + _CoreAPI.instructionStackItemToString(ftlInstructionStackSnapshot[0]);
        }
        if (renderedFtlInstructionStackSnapshotTop == null) {
          renderedFtlInstructionStackSnapshotTop=s;
          deleteFTLInstructionStackSnapshotIfNotNeeded();
        }
      }
      return renderedFtlInstructionStackSnapshotTop.length() != 0 ? renderedFtlInstructionStackSnapshotTop : null;
    }
 else {
      return null;
    }
  }
}
Program: 15750
Project: 15750
Buggy source:
public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  Version other=(Version)obj;
  if (intValue != other.intValue)   return false;
  if (other.hashCode() != hashCode())   return false;
  if (buildDate == null) {
    if (other.buildDate != null)     return false;
  }
 else   if (!buildDate.equals(other.buildDate)) {
    return false;
  }
  if (extraInfo == null) {
    if (other.extraInfo != null)     return false;
  }
 else   if (!extraInfo.equals(other.extraInfo)) {
    return false;
  }
  if (gaeCompliant == null) {
    if (other.gaeCompliant != null)     return false;
  }
 else   if (!gaeCompliant.equals(other.gaeCompliant)) {
    return false;
  }
  if (stringValue == null) {
    if (other.stringValue != null)     return false;
  }
 else   if (!stringValue.equals(other.stringValue)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  Version other=(Version)obj;
  if (intValue != other.intValue)   return false;
  if (other.hashCode() != hashCode())   return false;
  if (buildDate == null) {
    if (other.buildDate != null)     return false;
  }
 else   if (!buildDate.equals(other.buildDate)) {
    return false;
  }
  if (extraInfo == null) {
    if (other.extraInfo != null)     return false;
  }
 else   if (!extraInfo.equals(other.extraInfo)) {
    return false;
  }
  if (gaeCompliant == null) {
    if (other.gaeCompliant != null)     return false;
  }
 else   if (!gaeCompliant.equals(other.gaeCompliant)) {
    return false;
  }
  return true;
}
Program: 15751
Project: 15751
Buggy source:
/** 
 * Contains the major.minor.micor numbers and the extraInfo part, not the other information.
 */
public String toString(){
  if (stringValue == null) {
synchronized (this) {
      if (stringValue == null) {
        stringValue=major + "String_Node_Str" + minor+ "String_Node_Str"+ micro;
        if (extraInfo != null)         stringValue+="String_Node_Str" + extraInfo;
      }
    }
  }
  return stringValue;
}

Fixed version (ground truth):
/** 
 * Contains the major.minor.micor numbers and the extraInfo part, not the other information.
 */
public synchronized String toString(){
  if (stringValue == null) {
    stringValue=major + "String_Node_Str" + minor+ "String_Node_Str"+ micro;
    if (extraInfo != null)     stringValue+="String_Node_Str" + extraInfo;
  }
  return stringValue;
}
Program: 15752
Project: 15752
Buggy source:
Object getParameterValue(int idx){
  if (idx == 0) {
    return name;
  }
 else {
    final int argDescsEnd=paramNames.length * 2 + 1;
    if (idx < argDescsEnd) {
      String paramName=paramNames[(idx - 1) / 2];
      if (idx % 2 == 1) {
        return paramName;
      }
 else {
        return paramDefaults.get(paramName);
      }
    }
 else     if (idx == argDescsEnd) {
      return catchAllParamName;
    }
 else     if (idx == argDescsEnd + 1) {
      return new Integer(isFunction ? TYPE_FUNCTION : TYPE_MACRO);
    }
 else {
      throw new IndexOutOfBoundsException();
    }
  }
}

Fixed version (ground truth):
Object getParameterValue(int idx){
  if (idx == 0) {
    return name;
  }
 else {
    final int argDescsEnd=paramNames.length * 2 + 1;
    if (idx < argDescsEnd) {
      String paramName=paramNames[(idx - 1) / 2];
      if (idx % 2 != 0) {
        return paramName;
      }
 else {
        return paramDefaults.get(paramName);
      }
    }
 else     if (idx == argDescsEnd) {
      return catchAllParamName;
    }
 else     if (idx == argDescsEnd + 1) {
      return new Integer(isFunction ? TYPE_FUNCTION : TYPE_MACRO);
    }
 else {
      throw new IndexOutOfBoundsException();
    }
  }
}