nus-yam/ex-repair huggingface dataset:
Program: 54595
Project: 54595
Buggy source:
/** 
 * Returns the   {@link Class} which can serialize the given instance type. Notethat arrays never have custom field serializers.
 */
public static Class<?> hasCustomFieldSerializer(Class<?> instanceType){
  assert(instanceType != null);
  if (instanceType.isArray()) {
    return null;
  }
  Class<?> result=getCachedSerializerForClass(instanceType);
  if (result != null) {
    return result;
  }
  if (containsCachedSerializerForClass(instanceType)) {
    if (instanceType.getName().equals("String_Node_Str")) {
      System.out.println("String_Node_Str");
      System.err.println("String_Node_Str");
    }
    return null;
  }
  result=computeHasCustomFieldSerializer(instanceType);
  putCachedSerializerForClass(instanceType,result);
  return result;
}

Fixed version (ground truth):
/** 
 * Returns the   {@link Class} which can serialize the given instance type, or<code>null</code> if this class has no custom field serializer. Note that arrays never have custom field serializers.
 */
public static Class<?> hasCustomFieldSerializer(Class<?> instanceType){
  assert(instanceType != null);
  if (instanceType.isArray()) {
    return null;
  }
  Class<?> result;
synchronized (classCustomSerializerCache) {
    result=classCustomSerializerCache.get(instanceType);
    if (result == null) {
      result=computeHasCustomFieldSerializer(instanceType);
      if (result == null) {
        result=instanceType;
      }
      classCustomSerializerCache.put(instanceType,result);
    }
  }
  return (result == instanceType) ? null : result;
}
Program: 54596
Project: 54596
Buggy source:
public static Field[] applyFieldSerializationPolicy(Class<?> clazz){
  Field[] serializableFields=getCachedSerializableFieldsForClass(clazz);
  if (serializableFields == null) {
    ArrayList<Field> fieldList=new ArrayList<Field>();
    Field[] fields=clazz.getDeclaredFields();
    for (    Field field : fields) {
      if (fieldQualifiesForSerialization(field)) {
        fieldList.add(field);
      }
    }
    serializableFields=fieldList.toArray(new Field[fieldList.size()]);
    Arrays.sort(serializableFields,0,serializableFields.length,FIELD_COMPARATOR);
    putCachedSerializableFieldsForClass(clazz,serializableFields);
  }
  return serializableFields;
}

Fixed version (ground truth):
/** 
 * Returns the fields of a particular class that can be considered for serialization. The returned list will be sorted into a canonical order to ensure consistent answers. TODO: this method needs a better name, I think.
 */
public static Field[] applyFieldSerializationPolicy(Class<?> clazz){
  Field[] serializableFields;
synchronized (classSerializableFieldsCache) {
    serializableFields=classSerializableFieldsCache.get(clazz);
    if (serializableFields == null) {
      ArrayList<Field> fieldList=new ArrayList<Field>();
      Field[] fields=clazz.getDeclaredFields();
      for (      Field field : fields) {
        if (fieldQualifiesForSerialization(field)) {
          fieldList.add(field);
        }
      }
      serializableFields=fieldList.toArray(new Field[fieldList.size()]);
      Arrays.sort(serializableFields,0,serializableFields.length,FIELD_COMPARATOR);
      classSerializableFieldsCache.put(clazz,serializableFields);
    }
  }
  return serializableFields;
}
Program: 54597
Project: 54597
Buggy source:
public static String getSerializationSignature(Class<?> instanceType){
  String result=getCachedCRCForClass(instanceType);
  if (result == null) {
    CRC32 crc=new CRC32();
    try {
      generateSerializationSignature(instanceType,crc);
    }
 catch (    UnsupportedEncodingException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
    result=Long.toString(crc.getValue());
    putCachedCRCForClass(instanceType,result);
  }
  return result;
}

Fixed version (ground truth):
public static String getSerializationSignature(Class<?> instanceType){
  String result;
synchronized (classCRC32Cache) {
    result=classCRC32Cache.get(instanceType);
    if (result == null) {
      CRC32 crc=new CRC32();
      try {
        generateSerializationSignature(instanceType,crc);
      }
 catch (      UnsupportedEncodingException e) {
        throw new RuntimeException("String_Node_Str",e);
      }
      result=Long.toString(crc.getValue());
      classCRC32Cache.put(instanceType,result);
    }
  }
  return result;
}
Program: 54598
Project: 54598
Buggy source:
/** 
 * Method subParseMonth parses Month field.
 * @param text the time text to be parsed
 * @param pos Parse position
 * @param cal DateRecord object that will hold parsed value
 * @param value numeric value if this field is expressed using numbericpattern
 * @param start from where parse start
 * @return <code>true</code> if parsing successful
 */
private boolean subParseMonth(String text,int[] pos,DateRecord cal,int value,int start){
  if (value < 0) {
    value=matchString(text,start,dateTimeConstants.months(),pos);
    if (value < 0) {
      value=matchString(text,start,dateTimeConstants.shortMonths(),pos);
    }
    if (value < 0) {
      return false;
    }
    cal.setMonth(value);
    return true;
  }
 else {
    cal.setMonth(value - 1);
    return true;
  }
}

Fixed version (ground truth):
/** 
 * Method subParseMonth parses Month field.
 * @param text the time text to be parsed
 * @param pos Parse position
 * @param cal DateRecord object that will hold parsed value
 * @param value numeric value if this field is expressed using numbericpattern
 * @param start from where parse start
 * @return <code>true</code> if parsing successful
 */
private boolean subParseMonth(String text,int[] pos,DateRecord cal,int value,int start){
  if (value < 0) {
    value=matchString(text,start,dateTimeConstants.months(),pos);
    if (value < 0) {
      value=matchString(text,start,dateTimeConstants.shortMonths(),pos);
    }
    if (value < 0) {
      return false;
    }
    cal.setMonth(value);
    return true;
  }
 else   if (value > 0) {
    cal.setMonth(value - 1);
    return true;
  }
  return false;
}
Program: 54600
Project: 54600
Buggy source:
/** 
 * Sets a cookie.
 * @param name the cookie's name
 * @param value the cookie's value
 * @param expires when the cookie expires
 * @param domain the domain to be associated with this cookie
 * @param path the path to be associated with this cookie
 * @param secure <code>true</code> to make this a secure cookie
 */
public static void setCookie(String name,String value,Date expires,String domain,String path,boolean secure){
  setCookieImpl(name,value,(expires == null) ? 0 : expires.getTime(),domain,path,secure);
}

Fixed version (ground truth):
/** 
 * Sets a cookie.
 * @param name the cookie's name
 * @param value the cookie's value
 * @param expires when the cookie expires
 * @param domain the domain to be associated with this cookie
 * @param path the path to be associated with this cookie
 * @param secure <code>true</code> to make this a secure cookie (that is,only accessible over an SSL connection)
 */
public static void setCookie(String name,String value,Date expires,String domain,String path,boolean secure){
  setCookieImpl(name,value,(expires == null) ? 0 : expires.getTime(),domain,path,secure);
}
Program: 54601
Project: 54601
Buggy source:
/** 
 * Find all Artifacts assignable to some base type. The returned value will be a snapshot of the values in the ArtifactSet. The following two examples result in an equivalent set: <pre> SortedSet&lt;EmittedArtifact&gt; search = artifactSet.find(PublicResource.class); search.addAll(artifactSet.find(GeneratedResource.class); </pre> or <pre> SortedSet&lt;EmittedArtifact&gt; search = artifactSet.find(EmittedArtifact.class); </pre>
 * @param < A > a type bound possibly wider than the desired type of artifact
 * @param < T > the desired type of Artifact
 * @param artifactType the desired type of Artifact
 * @return all Artifacts in the ArtifactSet assignable to the desired type
 */
public <A extends Artifact<?>,T extends A>SortedSet<A> find(Class<T> artifactType){
  SortedSet<A> toReturn=new TreeSet<A>();
  for (  Artifact<?> artifact : this) {
    if (artifactType.isInstance(artifact)) {
      toReturn.add(artifactType.cast(artifact));
    }
  }
  return toReturn;
}

Fixed version (ground truth):
/** 
 * Find all Artifacts assignable to some base type. The returned value will be a snapshot of the values in the ArtifactSet. An example of how this could be used: <pre> for (EmittedArtifact ea : artifactSet.find(EmittedArtifact.class)) { ... } </pre>
 * @param < T > the desired type of Artifact
 * @param artifactType the desired type of Artifact
 * @return all Artifacts in the ArtifactSet assignable to the desired type
 */
public <T extends Artifact<? super T>>SortedSet<T> find(Class<T> artifactType){
  SortedSet<T> toReturn=new TreeSet<T>();
  for (  Artifact<?> artifact : this) {
    if (artifactType.isInstance(artifact)) {
      toReturn.add(artifactType.cast(artifact));
    }
  }
  return toReturn;
}
Program: 54602
Project: 54602
Buggy source:
public int hashCode(){
  return treeSet.hashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  return treeSet.hashCode();
}
Program: 54603
Project: 54603
Buggy source:
public boolean equals(Object o){
  return treeSet.equals(o);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  return treeSet.equals(o);
}
Program: 54604
Project: 54604
Buggy source:
String mangleNameForPolyImpl(JMethod x){
  String s=getNameString(x) + "String_Node_Str";
  for (int i=0; i < x.getOriginalParamTypes().size(); ++i) {
    JType type=x.getOriginalParamTypes().get(i);
    s+=type.getJavahSignatureName();
  }
  s+=x.getOriginalReturnType().getJavahSignatureName();
  return s;
}

Fixed version (ground truth):
String mangleNameForPolyImpl(JMethod x){
  StringBuffer sb=new StringBuffer();
  if (x.isPrivate() && !x.isStatic()) {
    sb.append("String_Node_Str");
    sb.append(getNameString(x.getEnclosingType()));
    sb.append("String_Node_Str");
  }
  sb.append(getNameString(x));
  sb.append("String_Node_Str");
  for (int i=0; i < x.getOriginalParamTypes().size(); ++i) {
    JType type=x.getOriginalParamTypes().get(i);
    sb.append(type.getJavahSignatureName());
  }
  sb.append(x.getOriginalReturnType().getJavahSignatureName());
  return sb.toString();
}
Program: 54606
Project: 54606
Buggy source:
public void onPreviewNativeEvent(NativePreviewEvent event){
  NativeEvent nativeEvent=event.getNativeEvent();
  Element target=nativeEvent.getTarget();
  if (!sandbox.getElement().isOrHasChild(target) && !positioner.getElement().isOrHasChild(target)) {
    positioner.removeFromParent();
    return;
  }
switch (Event.as(nativeEvent).getTypeInt()) {
case Event.ONMOUSEMOVE:
    int absX=nativeEvent.getClientX() + Window.getScrollLeft();
  int absY=nativeEvent.getClientY() + Window.getScrollTop();
RootPanel.get().add(positioner,absX,absY);
echo.setHTML("String_Node_Str" + nativeEvent.getClientX() + "String_Node_Str"+ "String_Node_Str"+ nativeEvent.getClientY()+ "String_Node_Str"+ "String_Node_Str"+ positioner.getAbsoluteLeft()+ "String_Node_Str"+ "String_Node_Str"+ positioner.getAbsoluteTop());
break;
}
}

Fixed version (ground truth):
public void onPreviewNativeEvent(NativePreviewEvent event){
  NativeEvent nativeEvent=event.getNativeEvent();
  Element target=Element.as(nativeEvent.getEventTarget());
  if (!sandbox.getElement().isOrHasChild(target) && !positioner.getElement().isOrHasChild(target)) {
    positioner.removeFromParent();
    return;
  }
switch (Event.as(nativeEvent).getTypeInt()) {
case Event.ONMOUSEMOVE:
    int absX=nativeEvent.getClientX() + Window.getScrollLeft();
  int absY=nativeEvent.getClientY() + Window.getScrollTop();
RootPanel.get().add(positioner,absX,absY);
echo.setHTML("String_Node_Str" + nativeEvent.getClientX() + "String_Node_Str"+ "String_Node_Str"+ nativeEvent.getClientY()+ "String_Node_Str"+ "String_Node_Str"+ positioner.getAbsoluteLeft()+ "String_Node_Str"+ "String_Node_Str"+ positioner.getAbsoluteTop());
break;
}
}
Program: 54608
Project: 54608
Buggy source:
private String getBinaryOrPrimitiveName(JType type){
  JClassType asClass=type.isClassOrInterface();
  JPrimitiveType asPrimitive=type.isPrimitive();
  if (asClass != null) {
    return getBinaryName(asClass);
  }
 else   if (asPrimitive != null) {
    return asPrimitive.getQualifiedSourceName();
  }
 else {
    throw new InternalCompilerException("String_Node_Str" + type.getQualifiedSourceName());
  }
}

Fixed version (ground truth):
private String getBinaryOrPrimitiveName(JType type){
  JArrayType asArray=type.isArray();
  JClassType asClass=type.isClassOrInterface();
  JPrimitiveType asPrimitive=type.isPrimitive();
  if (asClass != null) {
    return getBinaryName(asClass);
  }
 else   if (asPrimitive != null) {
    return asPrimitive.getQualifiedSourceName();
  }
 else   if (asArray != null) {
    JType componentType=asArray.getComponentType();
    return getBinaryOrPrimitiveName(componentType) + "String_Node_Str";
  }
 else {
    throw new InternalCompilerException("String_Node_Str" + type.getQualifiedSourceName());
  }
}
Program: 54609
Project: 54609
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for short date format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getShortDateFormat(){
  if (cachedShortDateFormat == null) {
    String pattern=defaultDateTimeConstants.dateFormats()[SHORT_DATE_FORMAT];
    cachedShortDateFormat=new DateTimeFormat(pattern);
  }
  return cachedShortDateFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for short date format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getShortDateFormat(){
  if (cachedShortDateFormat == null) {
    String pattern=getDefaultDateTimeConstants().dateFormats()[SHORT_DATE_FORMAT];
    cachedShortDateFormat=new DateTimeFormat(pattern);
  }
  return cachedShortDateFormat;
}
Program: 54610
Project: 54610
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for medium date format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getMediumDateFormat(){
  if (cachedMediumDateFormat == null) {
    String pattern=defaultDateTimeConstants.dateFormats()[MEDIUM_DATE_FORMAT];
    cachedMediumDateFormat=new DateTimeFormat(pattern);
  }
  return cachedMediumDateFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for medium date format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getMediumDateFormat(){
  if (cachedMediumDateFormat == null) {
    String pattern=getDefaultDateTimeConstants().dateFormats()[MEDIUM_DATE_FORMAT];
    cachedMediumDateFormat=new DateTimeFormat(pattern);
  }
  return cachedMediumDateFormat;
}
Program: 54611
Project: 54611
Buggy source:
/** 
 * Returns a DateTimeFormat object using the specified pattern. If you need to format or parse repeatedly using the same pattern, it is highly recommended that you cache the returned <code>DateTimeFormat</code> object and reuse it rather than calling this method repeatedly.
 * @param pattern string to specify how the date should be formatted
 * @return a <code>DateTimeFormat</code> object that can be used for format orparse date/time values matching the specified pattern
 * @throws IllegalArgumentException if the specified pattern could not beparsed
 */
public static DateTimeFormat getFormat(String pattern){
  return new DateTimeFormat(pattern,defaultDateTimeConstants);
}

Fixed version (ground truth):
/** 
 * Returns a DateTimeFormat object using the specified pattern. If you need to format or parse repeatedly using the same pattern, it is highly recommended that you cache the returned <code>DateTimeFormat</code> object and reuse it rather than calling this method repeatedly.
 * @param pattern string to specify how the date should be formatted
 * @return a <code>DateTimeFormat</code> object that can be used for format orparse date/time values matching the specified pattern
 * @throws IllegalArgumentException if the specified pattern could not beparsed
 */
public static DateTimeFormat getFormat(String pattern){
  return new DateTimeFormat(pattern,getDefaultDateTimeConstants());
}
Program: 54612
Project: 54612
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for medium date and time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getMediumDateTimeFormat(){
  if (cachedMediumDateTimeFormat == null) {
    String pattern=defaultDateTimeConstants.dateFormats()[MEDIUM_DATE_FORMAT] + "String_Node_Str" + defaultDateTimeConstants.timeFormats()[MEDIUM_TIME_FORMAT];
    cachedMediumDateTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedMediumDateTimeFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for medium date and time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getMediumDateTimeFormat(){
  if (cachedMediumDateTimeFormat == null) {
    String pattern=getDefaultDateTimeConstants().dateFormats()[MEDIUM_DATE_FORMAT] + "String_Node_Str" + getDefaultDateTimeConstants().timeFormats()[MEDIUM_TIME_FORMAT];
    cachedMediumDateTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedMediumDateTimeFormat;
}
Program: 54613
Project: 54613
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for short date and time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getShortDateTimeFormat(){
  if (cachedShortDateTimeFormat == null) {
    String pattern=defaultDateTimeConstants.dateFormats()[SHORT_DATE_FORMAT] + "String_Node_Str" + defaultDateTimeConstants.timeFormats()[SHORT_TIME_FORMAT];
    cachedShortDateTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedShortDateTimeFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for short date and time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getShortDateTimeFormat(){
  if (cachedShortDateTimeFormat == null) {
    String pattern=getDefaultDateTimeConstants().dateFormats()[SHORT_DATE_FORMAT] + "String_Node_Str" + getDefaultDateTimeConstants().timeFormats()[SHORT_TIME_FORMAT];
    cachedShortDateTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedShortDateTimeFormat;
}
Program: 54614
Project: 54614
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for long date format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getLongDateFormat(){
  if (cachedLongDateFormat == null) {
    String pattern=defaultDateTimeConstants.dateFormats()[LONG_DATE_FORMAT];
    cachedLongDateFormat=new DateTimeFormat(pattern);
  }
  return cachedLongDateFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for long date format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getLongDateFormat(){
  if (cachedLongDateFormat == null) {
    String pattern=getDefaultDateTimeConstants().dateFormats()[LONG_DATE_FORMAT];
    cachedLongDateFormat=new DateTimeFormat(pattern);
  }
  return cachedLongDateFormat;
}
Program: 54615
Project: 54615
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for short time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getShortTimeFormat(){
  if (cachedShortTimeFormat == null) {
    String pattern=defaultDateTimeConstants.timeFormats()[SHORT_TIME_FORMAT];
    cachedShortTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedShortTimeFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for short time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getShortTimeFormat(){
  if (cachedShortTimeFormat == null) {
    String pattern=getDefaultDateTimeConstants().timeFormats()[SHORT_TIME_FORMAT];
    cachedShortTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedShortTimeFormat;
}
Program: 54616
Project: 54616
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for long time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getLongTimeFormat(){
  if (cachedLongTimeFormat == null) {
    String pattern=defaultDateTimeConstants.timeFormats()[LONG_TIME_FORMAT];
    cachedLongTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedLongTimeFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for long time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getLongTimeFormat(){
  if (cachedLongTimeFormat == null) {
    String pattern=getDefaultDateTimeConstants().timeFormats()[LONG_TIME_FORMAT];
    cachedLongTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedLongTimeFormat;
}
Program: 54617
Project: 54617
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for full time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getFullTimeFormat(){
  if (cachedFullTimeFormat == null) {
    String pattern=defaultDateTimeConstants.timeFormats()[FULL_TIME_FORMAT];
    cachedFullTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedFullTimeFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for full time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getFullTimeFormat(){
  if (cachedFullTimeFormat == null) {
    String pattern=getDefaultDateTimeConstants().timeFormats()[FULL_TIME_FORMAT];
    cachedFullTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedFullTimeFormat;
}
Program: 54618
Project: 54618
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for full date and time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getFullDateTimeFormat(){
  if (cachedFullDateTimeFormat == null) {
    String pattern=defaultDateTimeConstants.dateFormats()[FULL_DATE_FORMAT] + "String_Node_Str" + defaultDateTimeConstants.timeFormats()[FULL_TIME_FORMAT];
    cachedFullDateTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedFullDateTimeFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for full date and time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getFullDateTimeFormat(){
  if (cachedFullDateTimeFormat == null) {
    String pattern=getDefaultDateTimeConstants().dateFormats()[FULL_DATE_FORMAT] + "String_Node_Str" + getDefaultDateTimeConstants().timeFormats()[FULL_TIME_FORMAT];
    cachedFullDateTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedFullDateTimeFormat;
}
Program: 54619
Project: 54619
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for long date and time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getLongDateTimeFormat(){
  if (cachedLongDateTimeFormat == null) {
    String pattern=defaultDateTimeConstants.dateFormats()[LONG_DATE_FORMAT] + "String_Node_Str" + defaultDateTimeConstants.timeFormats()[LONG_TIME_FORMAT];
    cachedLongDateTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedLongDateTimeFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for long date and time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getLongDateTimeFormat(){
  if (cachedLongDateTimeFormat == null) {
    String pattern=getDefaultDateTimeConstants().dateFormats()[LONG_DATE_FORMAT] + "String_Node_Str" + getDefaultDateTimeConstants().timeFormats()[LONG_TIME_FORMAT];
    cachedLongDateTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedLongDateTimeFormat;
}
Program: 54620
Project: 54620
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for medium time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getMediumTimeFormat(){
  if (cachedMediumTimeFormat == null) {
    String pattern=defaultDateTimeConstants.timeFormats()[MEDIUM_TIME_FORMAT];
    cachedMediumTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedMediumTimeFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for medium time format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getMediumTimeFormat(){
  if (cachedMediumTimeFormat == null) {
    String pattern=getDefaultDateTimeConstants().timeFormats()[MEDIUM_TIME_FORMAT];
    cachedMediumTimeFormat=new DateTimeFormat(pattern);
  }
  return cachedMediumTimeFormat;
}
Program: 54621
Project: 54621
Buggy source:
/** 
 * Retrieve the DateTimeFormat object for full date format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getFullDateFormat(){
  if (cachedFullDateFormat == null) {
    String pattern=defaultDateTimeConstants.dateFormats()[FULL_DATE_FORMAT];
    cachedFullDateFormat=new DateTimeFormat(pattern);
  }
  return cachedFullDateFormat;
}

Fixed version (ground truth):
/** 
 * Retrieve the DateTimeFormat object for full date format. The pattern for this format is predefined for each locale.
 * @return A DateTimeFormat object.
 */
public static DateTimeFormat getFullDateFormat(){
  if (cachedFullDateFormat == null) {
    String pattern=getDefaultDateTimeConstants().dateFormats()[FULL_DATE_FORMAT];
    cachedFullDateFormat=new DateTimeFormat(pattern);
  }
  return cachedFullDateFormat;
}
Program: 54622
Project: 54622
Buggy source:
/** 
 * Gets the day of week formatter.
 * @return the day of week formatter
 */
protected DateTimeFormat getDayOfWeekFormatter(){
  return dayOfWeekFormatter;
}

Fixed version (ground truth):
/** 
 * Gets the day of week formatter.
 * @return the day of week formatter
 */
protected DateTimeFormat getDayOfWeekFormatter(){
  return DateTimeFormat.getFormat("String_Node_Str");
}
Program: 54623
Project: 54623
Buggy source:
/** 
 * Gets the month and year formatter.
 * @return the month and year formatter
 */
protected DateTimeFormat getMonthAndYearFormatter(){
  return monthAndYearFormatter;
}

Fixed version (ground truth):
/** 
 * Gets the month and year formatter.
 * @return the month and year formatter
 */
protected DateTimeFormat getMonthAndYearFormatter(){
  return DateTimeFormat.getFormat("String_Node_Str");
}
Program: 54624
Project: 54624
Buggy source:
/** 
 * Gets the date of month formatter.
 * @return the day of month formatter
 */
protected DateTimeFormat getDayOfMonthFormatter(){
  return dayOfMonthFormatter;
}

Fixed version (ground truth):
/** 
 * Gets the date of month formatter.
 * @return the day of month formatter
 */
protected DateTimeFormat getDayOfMonthFormatter(){
  return DateTimeFormat.getFormat("String_Node_Str");
}
Program: 54626
Project: 54626
Buggy source:
public Date getValue(){
  return CalendarUtil.copyDate(super.getValue());
}

Fixed version (ground truth):
@Override public Date getValue(){
  return CalendarUtil.copyDate(super.getValue());
}
Program: 54627
Project: 54627
Buggy source:
/** 
 * Creates a new date value change event.
 * @param value the value
 */
protected DateChangeEvent(Date value){
  super(value);
}

Fixed version (ground truth):
/** 
 * Creates a new date value change event.
 * @param value the value
 */
protected DateChangeEvent(Date value){
  super(CalendarUtil.copyDate(value));
}
Program: 54628
Project: 54628
Buggy source:
/** 
 * Test that   {@link Event#fireNativePreviewEvent(Event)} returns the correctvalue if no handlers are present.
 */
public void testFireNativePreviewEventWithoutHandlers(){
  assertTrue(Event.fireNativePreviewEvent(null));
}

Fixed version (ground truth):
/** 
 * Test that   {@link Event#fireNativePreviewEvent(NativeEvent)} returns thecorrect value if no handlers are present.
 */
public void testFireNativePreviewEventWithoutHandlers(){
  assertTrue(Event.fireNativePreviewEvent(null));
}
Program: 54629
Project: 54629
Buggy source:
/** 
 * Test that   {@link Event#fireNativePreviewEvent(Event)} returns the correctvalue if the native event is not canceled.
 */
public void testFireNativePreviewEventWithoutCancel(){
  TestNativePreviewHandler handler0=new TestNativePreviewHandler(false,false);
  TestNativePreviewHandler handler1=new TestNativePreviewHandler(false,false);
  HandlerRegistration reg0=Event.addNativePreviewHandler(handler0);
  HandlerRegistration reg1=Event.addNativePreviewHandler(handler1);
  assertTrue(Event.fireNativePreviewEvent(null));
  handler0.assertIsFired(true);
  handler1.assertIsFired(true);
  reg0.removeHandler();
  reg1.removeHandler();
}

Fixed version (ground truth):
/** 
 * Test that   {@link Event#fireNativePreviewEvent(NativeEvent)} returns thecorrect value if the native event is not canceled.
 */
public void testFireNativePreviewEventWithoutCancel(){
  TestNativePreviewHandler handler0=new TestNativePreviewHandler(false,false);
  TestNativePreviewHandler handler1=new TestNativePreviewHandler(false,false);
  HandlerRegistration reg0=Event.addNativePreviewHandler(handler0);
  HandlerRegistration reg1=Event.addNativePreviewHandler(handler1);
  assertTrue(Event.fireNativePreviewEvent(null));
  handler0.assertIsFired(true);
  handler1.assertIsFired(true);
  reg0.removeHandler();
  reg1.removeHandler();
}
Program: 54630
Project: 54630
Buggy source:
/** 
 * Test that   {@link Event#fireNativePreviewEvent(Event)} returns the correctvalue if the native event is prevented from being canceled, even if another handler cancels the event.
 */
public void testFireNativePreviewEventPreventCancel(){
  TestNativePreviewHandler handler0=new TestNativePreviewHandler(false,true);
  TestNativePreviewHandler handler1=new TestNativePreviewHandler(true,false);
  HandlerRegistration reg0=Event.addNativePreviewHandler(handler0);
  HandlerRegistration reg1=Event.addNativePreviewHandler(handler1);
  assertTrue(Event.fireNativePreviewEvent(null));
  handler0.assertIsFired(true);
  handler1.assertIsFired(true);
  reg0.removeHandler();
  reg1.removeHandler();
}

Fixed version (ground truth):
/** 
 * Test that   {@link Event#fireNativePreviewEvent(NativeEvent)} returns thecorrect value if the native event is prevented from being canceled, even if another handler cancels the event.
 */
public void testFireNativePreviewEventPreventCancel(){
  TestNativePreviewHandler handler0=new TestNativePreviewHandler(false,true);
  TestNativePreviewHandler handler1=new TestNativePreviewHandler(true,false);
  HandlerRegistration reg0=Event.addNativePreviewHandler(handler0);
  HandlerRegistration reg1=Event.addNativePreviewHandler(handler1);
  assertTrue(Event.fireNativePreviewEvent(null));
  handler0.assertIsFired(true);
  handler1.assertIsFired(true);
  reg0.removeHandler();
  reg1.removeHandler();
}
Program: 54632
Project: 54632
Buggy source:
/** 
 * Test that   {@link Event#fireNativePreviewEvent(Event)} returns the correctvalue if the native event is canceled.
 */
public void testFireNativePreviewEventCancel(){
  TestNativePreviewHandler handler0=new TestNativePreviewHandler(true,false);
  TestNativePreviewHandler handler1=new TestNativePreviewHandler(true,false);
  HandlerRegistration reg0=Event.addNativePreviewHandler(handler0);
  HandlerRegistration reg1=Event.addNativePreviewHandler(handler1);
  assertFalse(Event.fireNativePreviewEvent(null));
  handler0.assertIsFired(true);
  handler1.assertIsFired(true);
  reg0.removeHandler();
  reg1.removeHandler();
}

Fixed version (ground truth):
/** 
 * Test that   {@link Event#fireNativePreviewEvent(NativeEvent)} returns thecorrect value if the native event is canceled.
 */
public void testFireNativePreviewEventCancel(){
  TestNativePreviewHandler handler0=new TestNativePreviewHandler(true,false);
  TestNativePreviewHandler handler1=new TestNativePreviewHandler(true,false);
  HandlerRegistration reg0=Event.addNativePreviewHandler(handler0);
  HandlerRegistration reg1=Event.addNativePreviewHandler(handler1);
  assertFalse(Event.fireNativePreviewEvent(null));
  handler0.assertIsFired(true);
  handler1.assertIsFired(true);
  reg0.removeHandler();
  reg1.removeHandler();
}
Program: 54634
Project: 54634
Buggy source:
public void onValueChange(ValueChangeEvent<Date> event){
  setValue(event.getValue());
  hideDatePicker();
  preventDatePickerPopup();
  box.setFocus(true);
}

Fixed version (ground truth):
public void onValueChange(ValueChangeEvent<Date> event){
  setValue(parseDate(false),event.getValue(),true);
  hideDatePicker();
  preventDatePickerPopup();
  box.setFocus(true);
}
Program: 54635
Project: 54635
Buggy source:
private void updateDateFromTextBox(){
  Date parsedDate=parseDate(true);
  if (parsedDate != null) {
    setValue(parsedDate);
  }
}

Fixed version (ground truth):
private void updateDateFromTextBox(){
  Date parsedDate=parseDate(true);
  if (parsedDate != null) {
    setValue(picker.getValue(),parsedDate,true);
  }
}
Program: 54636
Project: 54636
Buggy source:
public void setValue(Date date,boolean fireEvents){
  Date oldDate=parseDate(false);
  if (date != null) {
    picker.setCurrentMonth(date);
  }
  picker.setValue(date,false);
  setDate(date);
  if (fireEvents) {
    DateChangeEvent.fireIfNotEqualDates(this,oldDate,date);
  }
}

Fixed version (ground truth):
private void setValue(Date oldDate,Date date,boolean fireEvents){
  if (date != null) {
    picker.setCurrentMonth(date);
  }
  picker.setValue(date,false);
  format.reset(this,false);
  box.setText(getFormat().format(this,date));
  if (fireEvents) {
    DateChangeEvent.fireIfNotEqualDates(this,oldDate,date);
  }
}
Program: 54637
Project: 54637
Buggy source:
public void testValueChangeEvent(){
  DateBox db=new DateBox();
  RootPanel.get().add(db);
  new DateValueChangeTester(db).run();
}

Fixed version (ground truth):
public void testValueChangeEvent(){
  DateBox db=new DateBox();
  RootPanel.get().add(db);
  new DateValueChangeTester(db).run();
  final DateBox db2=new DateBox();
  RootPanel.get().add(db2);
  new DateValueChangeTester(db2){
    @Override protected void fire(    java.util.Date d){
      db2.getTextBox().setText(d.toString());
      NativeEvent e=Document.get().createBlurEvent();
      db2.getTextBox().getElement().dispatchEvent(e);
    }
  }
.run();
  final DateBox db3=new DateBox();
  RootPanel.get().add(db3);
  new DateValueChangeTester(db3){
    @Override protected void fire(    java.util.Date d){
      db3.getDatePicker().setValue(d,true);
    }
  }
.run();
}
Program: 54638
Project: 54638
Buggy source:
/** 
 * Asserts that the default value is null, checks that value change events do and don't fire when appropriate, and that getValue() always returns what was handed to getValue().
 */
@SuppressWarnings("String_Node_Str") public void run(){
  TestCase.assertNull(subject.getValue());
  DateValueChangeTester.Handler h=new Handler();
  subject.addValueChangeHandler(h);
  subject.setValue(null);
  TestCase.assertNull(subject.getValue());
  TestCase.assertNull(h.received);
  Date able=new Date(1999,5,15);
  subject.setValue(able);
  TestCase.assertEquals(able,subject.getValue());
  TestCase.assertNull(h.received);
  subject.setValue(able);
  TestCase.assertNull(h.received);
  Date baker=new Date(1965,12,7);
  subject.setValue(baker);
  TestCase.assertNull(h.received);
  subject.setValue(baker,true);
  TestCase.assertNull(h.received);
  subject.setValue(able,true);
  TestCase.assertEquals(able,h.received);
  TestCase.assertNotSame(able,h.received);
  subject.setValue(baker,true);
  TestCase.assertEquals(baker,h.received);
  TestCase.assertNotSame(baker,h.received);
  h.received=null;
  subject.setValue(baker,false);
  TestCase.assertNull(h.received);
}

Fixed version (ground truth):
/** 
 * Asserts that the default value is null, checks that value change events do and don't fire when appropriate, and that getValue() always returns what was handed to getValue().
 */
@SuppressWarnings("String_Node_Str") public void run(){
  TestCase.assertNull(subject.getValue());
  DateValueChangeTester.Handler h=new Handler();
  subject.addValueChangeHandler(h);
  subject.setValue(null);
  TestCase.assertNull(subject.getValue());
  TestCase.assertNull(h.received);
  Date able=new Date(1999,5,15);
  subject.setValue(able);
  TestCase.assertEquals(able,subject.getValue());
  TestCase.assertNull(h.received);
  subject.setValue(able);
  TestCase.assertNull(h.received);
  Date baker=new Date(1965,12,7);
  subject.setValue(baker);
  TestCase.assertNull(h.received);
  fire(baker);
  TestCase.assertNull(h.received);
  fire(able);
  TestCase.assertEquals(able,h.received);
  TestCase.assertNotSame(able,h.received);
  fire(baker);
  TestCase.assertEquals(baker,h.received);
  TestCase.assertNotSame(baker,h.received);
  h.received=null;
  subject.setValue(baker,false);
  TestCase.assertNull(h.received);
}
Program: 54640
Project: 54640
Buggy source:
/** 
 * Sets whether this list allows multiple selections. <em>NOTE: The preferred way of enabling multiple selections in a list box is by using the  {@link #ListBox(boolean)} constructor. Using this method can spuriouslyfail on Internet Explorer 6.0.</em>
 * @param multiple <code>true</code> to allow multiple selections
 */
public void setMultipleSelect(boolean multiple){
  getSelectElement().setMultiple(multiple);
}

Fixed version (ground truth):
/** 
 * Sets whether this list allows multiple selections. <em>NOTE: The preferred way of enabling multiple selections in a list box is by using the  {@link #ListBox(boolean)} constructor. Using this method can spuriouslyfail on Internet Explorer 6.0.</em>
 * @param multiple <code>true</code> to allow multiple selections
 * @deprecated use {@link #ListBox(boolean) instead}
 */
@Deprecated public void setMultipleSelect(boolean multiple){
  getSelectElement().setMultiple(multiple);
}
Program: 54641
Project: 54641
Buggy source:
/** 
 * Validates the given module can be compiled.
 * @param logger a logger to use
 * @param jjsOptions a set of compiler options
 * @param module the module to compile
 * @param genDir optional directory to dump generated source, may be<code>null</code>
 * @param generatorResourcesDir required directory to dump generator resources
 */
public static boolean validate(TreeLogger logger,JJSOptions jjsOptions,ModuleDef module,File genDir,File generatorResourcesDir){
  try {
    CompilationState compilationState=module.getCompilationState(logger);
    String[] declEntryPts=module.getEntryPointTypeNames();
    if (declEntryPts.length == 0) {
      Set<CompilationUnit> compilationUnits=compilationState.getCompilationUnits();
      declEntryPts=new String[compilationUnits.size()];
      int i=0;
      for (      CompilationUnit unit : compilationUnits) {
        declEntryPts[i++]=unit.getTypeName();
      }
    }
    ArtifactSet generatorArtifacts=new ArtifactSet();
    DistillerRebindPermutationOracle rpo=new DistillerRebindPermutationOracle(module,compilationState,generatorArtifacts,new PropertyPermutations(module.getProperties()),genDir,generatorResourcesDir);
    WebModeCompilerFrontEnd frontEnd=new WebModeCompilerFrontEnd(compilationState,rpo);
    JavaToJavaScriptCompiler.precompile(logger,frontEnd,declEntryPts,jjsOptions,true);
    return true;
  }
 catch (  UnableToCompleteException e) {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Validates the given module can be compiled.
 * @param logger a logger to use
 * @param jjsOptions a set of compiler options
 * @param module the module to compile
 * @param genDir optional directory to dump generated source, may be<code>null</code>
 * @param generatorResourcesDir required directory to dump generator resources
 */
public static boolean validate(TreeLogger logger,JJSOptions jjsOptions,ModuleDef module,File genDir,File generatorResourcesDir){
  try {
    CompilationState compilationState=module.getCompilationState(logger);
    String[] declEntryPts=module.getEntryPointTypeNames();
    String[] additionalRootTypes=null;
    if (declEntryPts.length == 0) {
      Set<CompilationUnit> compilationUnits=compilationState.getCompilationUnits();
      additionalRootTypes=new String[compilationUnits.size()];
      int i=0;
      for (      CompilationUnit unit : compilationUnits) {
        additionalRootTypes[i++]=unit.getTypeName();
      }
    }
    ArtifactSet generatorArtifacts=new ArtifactSet();
    DistillerRebindPermutationOracle rpo=new DistillerRebindPermutationOracle(module,compilationState,generatorArtifacts,new PropertyPermutations(module.getProperties()),genDir,generatorResourcesDir);
    WebModeCompilerFrontEnd frontEnd=new WebModeCompilerFrontEnd(compilationState,rpo);
    JavaToJavaScriptCompiler.precompile(logger,frontEnd,declEntryPts,additionalRootTypes,jjsOptions,true);
    return true;
  }
 catch (  UnableToCompleteException e) {
    return false;
  }
}
Program: 54645
Project: 54645
Buggy source:
private void generateOnLoadMethod(PrintWriter srcWriter){
  srcWriter.println("String_Node_Str");
  srcWriter.println(ASYNC_FRAGMENT_LOADER + "String_Node_Str" + entryNumber+ "String_Node_Str");
  srcWriter.println("String_Node_Str");
  srcWriter.println("String_Node_Str" + getLoaderSimpleName() + "String_Node_Str");
  srcWriter.println(ASYNC_FRAGMENT_LOADER + "String_Node_Str" + entryNumber+ "String_Node_Str");
  srcWriter.println("String_Node_Str");
  srcWriter.println("String_Node_Str");
}

Fixed version (ground truth):
private void generateOnLoadMethod(PrintWriter srcWriter){
  srcWriter.println("String_Node_Str");
  srcWriter.println("String_Node_Str");
  srcWriter.println("String_Node_Str" + getLoaderSimpleName() + "String_Node_Str");
  srcWriter.println(ASYNC_FRAGMENT_LOADER + "String_Node_Str" + entryNumber+ "String_Node_Str");
  srcWriter.println(ASYNC_FRAGMENT_LOADER + "String_Node_Str" + entryNumber+ "String_Node_Str");
  srcWriter.println("String_Node_Str");
  srcWriter.println(ASYNC_FRAGMENT_LOADER + "String_Node_Str" + entryNumber+ "String_Node_Str");
  srcWriter.println("String_Node_Str");
}
Program: 54646
Project: 54646
Buggy source:
/** 
 * Create an event object suitable for submitting to the lightweight metrics framework.
 */
private static native JavaScriptObject createStatsEvent(String eventGroup,String type);

Fixed version (ground truth):
private static native JavaScriptObject createStatsEvent(String eventGroup,String type,Integer fragment,Integer size);
Program: 54647
Project: 54647
Buggy source:
/** 
 * Logs an event with the GWT lightweight metrics framework.
 */
public static void logEventProgress(String eventGroup,String type){
  @SuppressWarnings("String_Node_Str") boolean toss=isStatsAvailable() && stats(createStatsEvent(eventGroup,type));
}

Fixed version (ground truth):
/** 
 * Log an event with the lightweight metrics framework. The <code>fragment</code> and <code>size</code> objects are allowed to be <code>null</code>.
 */
private static void logEventProgress(String eventGroup,String type,Integer fragment,Integer size){
  @SuppressWarnings("String_Node_Str") boolean toss=isStatsAvailable() && stats(createStatsEvent(eventGroup,type,fragment,size));
}
Program: 54648
Project: 54648
Buggy source:
/** 
 * Inform the loader that the "leftovers" fragment has loaded.
 */
public static void leftoversFragmentHasLoaded(){
  leftoversLoaded=true;
  leftoversLoading=false;
  while (!waitingForLeftovers.isEmpty()) {
    inject(waitingForLeftovers.remove());
  }
}

Fixed version (ground truth):
/** 
 * Inform the loader that the "leftovers" fragment has loaded.
 */
public static void leftoversFragmentHasLoaded(){
  leftoversLoaded=true;
  leftoversLoading=false;
  logEventProgress(LwmLabels.LEFTOVERS_DOWNLOAD,LwmLabels.END,leftoversFragmentNumber(),null);
  while (!waitingForLeftovers.isEmpty()) {
    inject(waitingForLeftovers.remove());
  }
}
Program: 54649
Project: 54649
Buggy source:
/** 
 * Inform the loader that the code for an entry point has now finished loading.
 * @param entry The entry whose code fragment is now loaded.
 */
public static void fragmentHasLoaded(int entry){
  if (base < 0) {
    base=entry;
    baseLoading=false;
    leftoversLoading=true;
    startLoadingFragment(numEntries + 2 * (entry - 1) + 1);
  }
}

Fixed version (ground truth):
/** 
 * Inform the loader that the code for an entry point has now finished loading.
 * @param entry The entry whose code fragment is now loaded.
 */
public static void fragmentHasLoaded(int entry){
  int fragment=base >= 0 ? entry : baseFragmentNumber(entry);
  logEventProgress(LwmLabels.downloadGroup(entry),LwmLabels.END,fragment,null);
  if (base < 0) {
    base=entry;
    baseLoading=false;
    leftoversLoading=true;
    logEventProgress(LwmLabels.LEFTOVERS_DOWNLOAD,LwmLabels.BEGIN,leftoversFragmentNumber(),null);
    startLoadingFragment(leftoversFragmentNumber());
  }
}
Program: 54650
Project: 54650
Buggy source:
/** 
 * Loads the specified split point.
 * @param splitPoint the fragment to load
 */
public static void inject(int splitPoint){
  if (leftoversLoaded) {
    startLoadingFragment(splitPoint);
    return;
  }
  if (baseLoading || leftoversLoading) {
    waitingForLeftovers.add(splitPoint);
    return;
  }
  baseLoading=true;
  startLoadingFragment(numEntries + 2 * (splitPoint - 1));
}

Fixed version (ground truth):
/** 
 * Loads the specified split point.
 * @param splitPoint the fragment to load
 */
public static void inject(int splitPoint){
  if (leftoversLoaded) {
    logEventProgress(LwmLabels.downloadGroup(splitPoint),LwmLabels.BEGIN,splitPoint,null);
    startLoadingFragment(splitPoint);
    return;
  }
  if (baseLoading || leftoversLoading) {
    waitingForLeftovers.add(splitPoint);
    return;
  }
  baseLoading=true;
  logEventProgress(LwmLabels.downloadGroup(splitPoint),LwmLabels.BEGIN,baseFragmentNumber(splitPoint),null);
  startLoadingFragment(baseFragmentNumber(splitPoint));
}
Program: 54651
Project: 54651
Buggy source:
private static void startLoadingFragment(int fragment){
  logEventProgress("String_Node_Str" + fragment,"String_Node_Str");
  gwtStartLoadingFragment(fragment);
}

Fixed version (ground truth):
private static void startLoadingFragment(int fragment){
  gwtStartLoadingFragment(fragment);
}
Program: 54652
Project: 54652
Buggy source:
private static void fireResizedImpl(){
  if (resizeHandlersInitialized) {
    ResizeEvent.fire(getHandlers(),getClientWidth(),getClientHeight());
  }
}

Fixed version (ground truth):
private static void fireResizedImpl(){
  if (resizeHandlersInitialized) {
    int width=getClientWidth();
    int height=getClientHeight();
    if (lastResizeWidth != width || lastResizeHeight != height) {
      lastResizeWidth=width;
      lastResizeHeight=height;
      ResizeEvent.fire(getHandlers(),width,height);
    }
  }
}
Program: 54653
Project: 54653
Buggy source:
/** 
 * Shows the popup and attach it to the page. It must have a child widget before this method is called.
 */
public void show(){
  if (showing) {
    return;
  }
  showing=true;
  nativePreviewHandlerRegistration=Event.addNativePreviewHandler(new NativePreviewHandler(){
    public void onPreviewNativeEvent(    NativePreviewEvent event){
      previewNativeEvent(event);
    }
  }
);
  resizeAnimation.setState(true);
}

Fixed version (ground truth):
/** 
 * Shows the popup and attach it to the page. It must have a child widget before this method is called.
 */
public void show(){
  if (showing) {
    return;
  }
  setState(true,true);
}
Program: 54654
Project: 54654
Buggy source:
@Override protected void onUnload(){
  cleanup();
}

Fixed version (ground truth):
@Override protected void onUnload(){
  if (isShowing()) {
    setState(false,false);
  }
}