nus-yam/ex-repair huggingface dataset:
Program: 53798
Project: 53798
Buggy source:
/** 
 * Best effort resymbolization of a a single stack trace element.
 * @param ste the stack trace element to resymbolize
 * @param strongName the GWT permutation strong name
 * @return the best effort resymbolized stack trace element
 */
public StackTraceElement resymbolize(StackTraceElement ste,String strongName){
  SymbolMap map=loadSymbolMap(strongName);
  String symbolData=map == null ? null : map.get(ste.getMethodName());
  if (symbolData != null) {
    String[] parts=symbolData.split("String_Node_Str");
    if (parts.length == 5) {
      String[] ref=parse(parts[0].substring(0,parts[0].lastIndexOf(')') + 1));
      String declaringClass;
      String methodName;
      if (ref != null) {
        declaringClass=ref[0];
        methodName=ref[1];
      }
 else {
        declaringClass=ste.getClassName();
        methodName=ste.getMethodName();
      }
      String filename="String_Node_Str".equals(parts[3]) ? null : parts[3].substring(parts[3].lastIndexOf('/') + 1);
      int lineNumber=ste.getLineNumber();
      if (lineNumber == 0) {
        lineNumber=Integer.parseInt(parts[4]);
      }
      return new StackTraceElement(declaringClass,methodName,filename,lineNumber);
    }
  }
  return ste;
}

Fixed version (ground truth):
/** 
 * Best effort resymbolization of a a single stack trace element.
 * @param ste the stack trace element to resymbolize
 * @param strongName the GWT permutation strong name
 * @return the best effort resymbolized stack trace element
 */
public StackTraceElement resymbolize(StackTraceElement ste,String strongName){
  SymbolMap map=loadSymbolMap(strongName);
  String symbolData=map == null ? null : map.get(ste.getMethodName());
  if (symbolData != null) {
    String[] parts=symbolData.split("String_Node_Str");
    if (parts.length == 5) {
      String[] ref=parse(parts[0].substring(0,parts[0].lastIndexOf(')') + 1));
      String declaringClass;
      String methodName;
      if (ref != null) {
        declaringClass=ref[0];
        methodName=ref[1];
      }
 else {
        declaringClass=ste.getClassName();
        methodName=ste.getMethodName();
      }
      String filename="String_Node_Str".equals(parts[3]) ? null : parts[3].substring(parts[3].lastIndexOf('/') + 1);
      int lineNumber=ste.getLineNumber();
      if (lineNumber == LINE_NUMBER_UNKNOWN) {
        lineNumber=Integer.parseInt(parts[4]);
      }
      return new StackTraceElement(declaringClass,methodName,filename,lineNumber);
    }
  }
  return ste;
}
Program: 53799
Project: 53799
Buggy source:
@Override public String getReadableDeclaration(){
  String[] names=TypeOracle.modifierBitsToNames(getModifierBits());
  StringBuilder sb=new StringBuilder();
  for (  String name : names) {
    sb.append(name);
    sb.append("String_Node_Str");
  }
  if (getTypeParameters().length > 0) {
    toStringTypeParams(sb);
    sb.append("String_Node_Str");
  }
  sb.append(getName());
  toStringParamsAndThrows(sb);
  return sb.toString();
}

Fixed version (ground truth):
@Override public String getReadableDeclaration(){
  String[] names=TypeOracle.modifierBitsToNamesForMethod(getModifierBits());
  StringBuilder sb=new StringBuilder();
  for (  String name : names) {
    sb.append(name);
    sb.append("String_Node_Str");
  }
  if (getTypeParameters().length > 0) {
    toStringTypeParams(sb);
    sb.append("String_Node_Str");
  }
  sb.append(getName());
  toStringParamsAndThrows(sb);
  return sb.toString();
}
Program: 53800
Project: 53800
Buggy source:
@Override public String toString(){
  String[] names=TypeOracle.modifierBitsToNames(modifierBits);
  StringBuffer sb=new StringBuffer();
  for (int i=0; i < names.length; i++) {
    if (i > 0) {
      sb.append("String_Node_Str");
    }
    sb.append(names[i]);
  }
  if (names.length > 0) {
    sb.append("String_Node_Str");
  }
  sb.append(type.getParameterizedQualifiedSourceName());
  sb.append("String_Node_Str");
  sb.append(getName());
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  String[] names=TypeOracle.modifierBitsToNamesForField(modifierBits);
  StringBuffer sb=new StringBuffer();
  for (int i=0; i < names.length; i++) {
    if (i > 0) {
      sb.append("String_Node_Str");
    }
    sb.append(names[i]);
  }
  if (names.length > 0) {
    sb.append("String_Node_Str");
  }
  sb.append(type.getParameterizedQualifiedSourceName());
  sb.append("String_Node_Str");
  sb.append(getName());
  return sb.toString();
}
Program: 53801
Project: 53801
Buggy source:
String getReadableDeclaration(int modifierBits){
  String[] names=TypeOracle.modifierBitsToNames(modifierBits);
  StringBuilder sb=new StringBuilder();
  for (  String name : names) {
    sb.append(name);
    sb.append("String_Node_Str");
  }
  if (getTypeParameters().length > 0) {
    toStringTypeParams(sb);
    sb.append("String_Node_Str");
  }
  sb.append(returnType.getParameterizedQualifiedSourceName());
  sb.append("String_Node_Str");
  sb.append(getName());
  toStringParamsAndThrows(sb);
  return sb.toString();
}

Fixed version (ground truth):
String getReadableDeclaration(int modifierBits){
  String[] names=TypeOracle.modifierBitsToNamesForMethod(modifierBits);
  StringBuilder sb=new StringBuilder();
  for (  String name : names) {
    sb.append(name);
    sb.append("String_Node_Str");
  }
  if (getTypeParameters().length > 0) {
    toStringTypeParams(sb);
    sb.append("String_Node_Str");
  }
  sb.append(returnType.getParameterizedQualifiedSourceName());
  sb.append("String_Node_Str");
  sb.append(getName());
  toStringParamsAndThrows(sb);
  return sb.toString();
}
Program: 53802
Project: 53802
Buggy source:
public JClassType(SourceInfo info,String name,boolean isAbstract,boolean isFinal){
  super(info,name);
  this.isAbstract=isAbstract;
  this.isFinal=isFinal;
}

Fixed version (ground truth):
/** 
 * Construct a bare-bones deserialized external class.
 */
private JClassType(String name){
  super(SourceOrigin.UNKNOWN,name);
  isAbstract=false;
  setExternal(true);
}
Program: 53803
Project: 53803
Buggy source:
private Object readResolve(){
  JClassType result=new JClassType(SourceOrigin.UNKNOWN,name,false,false);
  result.setExternal(true);
  return result;
}

Fixed version (ground truth):
private Object readResolve(){
  return new JClassType(name);
}
Program: 53804
Project: 53804
Buggy source:
@Override protected Object writeReplace(){
  if (getEnclosingType() != null && getEnclosingType().isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else {
    return this;
  }
}

Fixed version (ground truth):
@Override protected Object writeReplace(){
  if (isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else {
    return this;
  }
}
Program: 53805
Project: 53805
Buggy source:
protected Object writeReplace(){
  if (enclosingType != null && enclosingType.isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else   if (this == NULL_FIELD) {
    return ExternalSerializedNullField.INSTANCE;
  }
 else {
    return this;
  }
}

Fixed version (ground truth):
protected Object writeReplace(){
  if (isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else   if (this == NULL_FIELD) {
    return ExternalSerializedNullField.INSTANCE;
  }
 else {
    return this;
  }
}
Program: 53806
Project: 53806
Buggy source:
public boolean hasClinit(){
  if (!field.isStatic()) {
    return false;
  }
  if (field.isFinal() && field.isCompileTimeConstant()) {
    return false;
  }
  return getEnclosingType().checkClinitTo(field.getEnclosingType());
}

Fixed version (ground truth):
public boolean hasClinit(){
  JField field=getField();
  if (!field.isStatic()) {
    return false;
  }
  if (field.isFinal() && field.isCompileTimeConstant()) {
    return false;
  }
  return getEnclosingType().checkClinitTo(field.getEnclosingType());
}
Program: 53807
Project: 53807
Buggy source:
public JFieldRef(SourceInfo info,JExpression instance,JField field,JDeclaredType enclosingType,JType overriddenType){
  super(info,field);
  assert(instance != null || field.isStatic());
  assert(enclosingType != null);
  this.instance=instance;
  this.field=field;
  this.enclosingType=enclosingType;
  this.overriddenType=overriddenType;
}

Fixed version (ground truth):
public JFieldRef(SourceInfo info,JExpression instance,JField field,JDeclaredType enclosingType,JType overriddenType){
  super(info,field);
  assert(instance != null || field.isStatic());
  assert(enclosingType != null);
  this.instance=instance;
  this.enclosingType=enclosingType;
  this.overriddenType=overriddenType;
}
Program: 53808
Project: 53808
Buggy source:
public JField getField(){
  return field;
}

Fixed version (ground truth):
public JField getField(){
  return (JField)getTarget();
}
Program: 53809
Project: 53809
Buggy source:
public static JExpression createInstantiationExpression(SourceInfo info,JClassType classType,JDeclaredType enclosingType){
  JConstructor noArgCtor=null;
  for (  JMethod ctor : classType.getMethods()) {
    if (ctor instanceof JConstructor) {
      if (ctor.getParams().size() == 0) {
        noArgCtor=(JConstructor)ctor;
        break;
      }
    }
  }
  if (noArgCtor == null) {
    return null;
  }
  return new JNewInstance(info,noArgCtor,enclosingType);
}

Fixed version (ground truth):
public static JExpression createInstantiationExpression(SourceInfo info,JClassType classType,JDeclaredType enclosingType){
  JConstructor noArgCtor=null;
  for (  JMethod ctor : classType.getMethods()) {
    if (ctor instanceof JConstructor) {
      if (ctor.getOriginalParamTypes().size() == 0) {
        noArgCtor=(JConstructor)ctor;
        break;
      }
    }
  }
  if (noArgCtor == null) {
    return null;
  }
  return new JNewInstance(info,noArgCtor,enclosingType);
}
Program: 53810
Project: 53810
Buggy source:
private Object readResolve(){
  JInterfaceType result=new JInterfaceType(SourceOrigin.UNKNOWN,name);
  result.setExternal(true);
  return result;
}

Fixed version (ground truth):
private Object readResolve(){
  return new JInterfaceType(name);
}
Program: 53811
Project: 53811
Buggy source:
public JInterfaceType(SourceInfo info,String name){
  super(info,name);
}

Fixed version (ground truth):
/** 
 * Construct a bare-bones deserialized external interface.
 */
private JInterfaceType(String name){
  super(SourceOrigin.UNKNOWN,name);
  setExternal(true);
}
Program: 53812
Project: 53812
Buggy source:
protected Object writeReplace(){
  if (enclosingType != null && enclosingType.isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else   if (this == NULL_METHOD) {
    return ExternalSerializedNullMethod.INSTANCE;
  }
 else {
    return this;
  }
}

Fixed version (ground truth):
protected Object writeReplace(){
  if (isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else   if (this == NULL_METHOD) {
    return ExternalSerializedNullMethod.INSTANCE;
  }
 else {
    return this;
  }
}
Program: 53813
Project: 53813
Buggy source:
/** 
 * These are only supposed to be constructed by JProgram.
 */
public JMethod(SourceInfo info,String name,JDeclaredType enclosingType,JType returnType,boolean isAbstract,boolean isStatic,boolean isFinal,boolean isPrivate){
  super(info);
  this.name=StringInterner.get().intern(name);
  this.enclosingType=enclosingType;
  this.returnType=returnType;
  this.isAbstract=isAbstract;
  this.isStatic=isStatic;
  this.isFinal=isFinal;
  this.isPrivate=isPrivate;
}

Fixed version (ground truth):
/** 
 * Construct a bare-bones deserialized external method.
 */
private JMethod(String signature,JDeclaredType enclosingType){
  super(SourceOrigin.UNKNOWN);
  this.name=signature.substring(0,signature.indexOf('('));
  this.enclosingType=enclosingType;
  this.signature=signature;
  this.isAbstract=false;
  this.isStatic=false;
  this.isPrivate=false;
}
Program: 53814
Project: 53814
Buggy source:
public JStringLiteral(SourceInfo sourceInfo,String value,JClassType stringType){
  super(sourceInfo);
  this.value=value;
  this.stringType=stringType;
}

Fixed version (ground truth):
public JStringLiteral(SourceInfo sourceInfo,String value,JClassType stringType){
}
Program: 53815
Project: 53815
Buggy source:
private ImplementClassLiteralsAsFields(JProgram program){
  this.program=program;
  this.typeClassLiteralHolder=program.getTypeClassLiteralHolder();
  this.classLiteralHolderClinitBody=(JMethodBody)typeClassLiteralHolder.getMethods().get(0).getBody();
}

Fixed version (ground truth):
private ImplementClassLiteralsAsFields(JProgram program){
}
Program: 53816
Project: 53816
Buggy source:
public void testUiTextWithSafeHtml(){
  assertEquals(widgetUi.htmlWithComputedSafeHtml.getHTML().toLowerCase(),"String_Node_Str");
  assertEquals(widgetUi.htmlWithComputedText.getHTML().toLowerCase(),"String_Node_Str");
  assertEquals(widgetUi.labelWithComputedText.getText().toLowerCase(),"String_Node_Str");
}

Fixed version (ground truth):
public void testUiTextWithSafeHtml(){
  assertEquals(widgetUi.htmlWithComputedSafeHtml.getHTML().toLowerCase(),"String_Node_Str");
  assertEquals(widgetUi.htmlWithComputedText.getHTML().toLowerCase().replaceAll("String_Node_Str","String_Node_Str"),"String_Node_Str");
  assertEquals(widgetUi.labelWithComputedText.getText().toLowerCase(),"String_Node_Str");
}
Program: 53817
Project: 53817
Buggy source:
private void checkName(JsName name){
  if (!toEvaluate.contains(name)) {
    return;
  }
  if (unevaluated.size() == 0 || !unevaluated.remove(0).equals(name)) {
    maintainsOrder=false;
  }
}

Fixed version (ground truth):
/** 
 * Check to see if the evaluation of this JsName will break program order assumptions given the parameters left to be substituted. The cases are as follows: 1) JsName is a function parameter name which has side effects or is affected by side effects (hereafter called 'volatile'), so it will be in 'toEvaluate' 2) JsName is a function parameter which is not volatile (not in toEvaluate) 3) JsName is a reference to a global variable 4) JsName is a reference to a local variable A reference to a global while there are still parameters left to evaluate / substitute implies an order violation. A reference to a volatile parameter is ok if it is the next parameter in sequence to be evaluated (beginning of unevaluated list). Else, it is either being evaluated out of order with respect to other parameters, or it is being evaluated more than once.
 */
private void checkName(JsName name){
  if (!toEvaluate.contains(name)) {
    if (!paramsOrLocals.contains(name) && unevaluated.size() > 0) {
      maintainsOrder=false;
    }
    return;
  }
  if (unevaluated.size() == 0 || !unevaluated.remove(0).equals(name)) {
    maintainsOrder=false;
  }
}
Program: 53818
Project: 53818
Buggy source:
public EvaluationOrderVisitor(List<JsName> toEvaluate){
  this.toEvaluate=toEvaluate;
  this.unevaluated=new ArrayList<JsName>(toEvaluate);
}

Fixed version (ground truth):
public EvaluationOrderVisitor(List<JsName> toEvaluate,JsFunction callee){
  this.toEvaluate=toEvaluate;
  this.unevaluated=new ArrayList<JsName>(toEvaluate);
  new JsVisitor(){
    @Override public void endVisit(    JsParameter x,    JsContext ctx){
      paramsOrLocals.add(x.getName());
    }
    @Override public boolean visit(    JsVar x,    JsContext ctx){
      paramsOrLocals.add(x.getName());
      return true;
    }
  }
.accept(callee);
}
Program: 53819
Project: 53819
Buggy source:
@Override public void wrapElement(Element element){
  if (!isFullyInitialized()) {
    element.getParentNode().replaceChild(getElement(),element);
  }
 else {
    setElement(element);
    html=null;
  }
  if (wrapInitializationCallback != null) {
    wrapInitializationCallback.execute();
    wrapInitializationCallback=null;
  }
}

Fixed version (ground truth):
@Override public void wrapElement(Element element){
  if (isFullyInitialized()) {
    throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
  setElement(element);
  html=null;
  if (wrapInitializationCallback != null) {
    wrapInitializationCallback.execute();
    wrapInitializationCallback=null;
  }
}
Program: 53820
Project: 53820
Buggy source:
@Override public boolean visit(JMethod x,Context ctx){
  currentMethod=x;
  return true;
}

Fixed version (ground truth):
@Override public boolean visit(JMethod x,Context ctx){
  currentMethod=x;
  if (program.getStaticImpl(x) != null) {
    return false;
  }
  return true;
}
Program: 53821
Project: 53821
Buggy source:
@Override public boolean visit(JMethod x,Context ctx){
  Set<JMethod> overrides=program.typeOracle.getAllOverrides(x);
  if (!overrides.isEmpty()) {
    for (    JMethod m : overrides) {
      rescuedMethods.add(m);
    }
    rescuedMethods.add(x);
  }
 else {
    JMethod staticImpl=program.staticImplFor(x);
    if (staticImpl != null && staticImpl.getEnclosingType().getMethods().contains(staticImpl)) {
      rescuedMethods.add(x);
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean visit(JMethod x,Context ctx){
  Set<JMethod> overrides=program.typeOracle.getAllOverrides(x);
  if (!overrides.isEmpty()) {
    for (    JMethod m : overrides) {
      rescuedMethods.add(m);
    }
    rescuedMethods.add(x);
  }
  return true;
}
Program: 53822
Project: 53822
Buggy source:
/** 
 * Synchronize the scroll positions of the scrollbars with the actual scroll position of the content.
 */
private void maybeUpdateScrollbarPositions(){
  if (!isAttached()) {
    return;
  }
  if (hScrollbar != null) {
    int hPos=getHorizontalScrollPosition();
    if (hScrollbar.getHorizontalScrollPosition() != hPos) {
      hScrollbar.setHorizontalScrollPosition(hPos);
    }
  }
  if (vScrollbar != null) {
    int vPos=getVerticalScrollPosition();
    if (vScrollbar.getVerticalScrollPosition() != vPos) {
      vScrollbar.setVerticalScrollPosition(vPos);
    }
  }
  getElement().setScrollLeft(0);
  getElement().setScrollTop(0);
}

Fixed version (ground truth):
/** 
 * Synchronize the scroll positions of the scrollbars with the actual scroll position of the content.
 */
private void maybeUpdateScrollbarPositions(){
  if (!isAttached()) {
    return;
  }
  if (hScrollbar != null) {
    int hPos=getHorizontalScrollPosition();
    if (hScrollbar.getHorizontalScrollPosition() != hPos) {
      hScrollbar.setHorizontalScrollPosition(hPos);
    }
  }
  if (vScrollbar != null) {
    int vPos=getVerticalScrollPosition();
    if (vScrollbar.getVerticalScrollPosition() != vPos) {
      vScrollbar.setVerticalScrollPosition(vPos);
    }
  }
  if (getElement().getScrollLeft() != 0) {
    getElement().setScrollLeft(0);
  }
  if (getElement().getScrollTop() != 0) {
    getElement().setScrollTop(0);
  }
}
Program: 53823
Project: 53823
Buggy source:
/** 
 * Declare a field that will hold an Element instance. Returns a token that the caller must set as the id attribute of that element in whatever innerHTML expression will reproduce it at runtime. <P> In the generated code, this token will be replaced by an expression to generate a unique dom id at runtime. Further code will be generated to be run after widgets are instantiated, to use that dom id in a getElementById call and assign the Element instance to its field.
 * @param fieldName The name of the field being declared
 * @param ancestorField The name of fieldName parent
 */
public String declareDomField(String fieldName,String ancestorField) throws UnableToCompleteException {
  ensureAttached();
  String name=declareDomIdHolder();
  if (useLazyWidgetBuilders) {
    FieldWriter field=fieldManager.require(fieldName);
    field.setInitializer(formatCode("String_Node_Str",fieldManager.convertFieldToGetter(name)));
    field.addStatement("String_Node_Str",fieldName);
    fieldManager.require(ancestorField).addAttachStatement(fieldManager.convertFieldToGetter(fieldName) + "String_Node_Str");
  }
 else {
    setFieldInitializer(fieldName,"String_Node_Str");
    addInitStatement("String_Node_Str",fieldName,name);
    addInitStatement("String_Node_Str",fieldName);
  }
  return tokenForStringExpression(fieldManager.convertFieldToGetter(name));
}

Fixed version (ground truth):
/** 
 * Declare a field that will hold an Element instance. Returns a token that the caller must set as the id attribute of that element in whatever innerHTML expression will reproduce it at runtime. <P> In the generated code, this token will be replaced by an expression to generate a unique dom id at runtime. Further code will be generated to be run after widgets are instantiated, to use that dom id in a getElementById call and assign the Element instance to its field.
 * @param fieldName The name of the field being declared
 * @param ancestorField The name of fieldName parent
 */
public String declareDomField(String fieldName,String ancestorField) throws UnableToCompleteException {
  ensureAttached();
  String name=declareDomIdHolder();
  if (useLazyWidgetBuilders) {
    FieldWriter field=fieldManager.require(fieldName);
    field.setInitializer(formatCode("String_Node_Str",LazyDomElement.class.getCanonicalName(),fieldManager.convertFieldToGetter(name)));
    fieldManager.require(ancestorField).addAttachStatement(fieldManager.convertFieldToGetter(fieldName) + "String_Node_Str");
  }
 else {
    setFieldInitializer(fieldName,"String_Node_Str");
    addInitStatement("String_Node_Str",fieldName,name);
    addInitStatement("String_Node_Str",fieldName);
  }
  return tokenForStringExpression(fieldManager.convertFieldToGetter(name));
}
Program: 53825
Project: 53825
Buggy source:
@Override public void onBrowserEvent(Event event){
  if (event.getTypeInt() == Event.ONLOAD) {
    clearUnhandledEvent();
  }
  super.onBrowserEvent(event);
}

Fixed version (ground truth):
@Override public void onBrowserEvent(Event event){
  if (event.getTypeInt() == Event.ONLOAD) {
    clearUnhandledEvent();
    state.onLoadEvent(this);
  }
  super.onBrowserEvent(event);
}
Program: 53826
Project: 53826
Buggy source:
public void execute(){
  NativeEvent evt=Document.get().createLoadEvent();
  getImageElement(image).dispatchEvent(evt);
}

Fixed version (ground truth):
public void execute(){
  if (image.state != State.this || this != syntheticEventCommand) {
    return;
  }
  syntheticEventCommand=null;
  if (!image.isAttached()) {
    getImageElement(image).setPropertyString(UNHANDLED_EVENT_ATTR,"String_Node_Str");
    return;
  }
  NativeEvent evt=Document.get().createLoadEvent();
  getImageElement(image).dispatchEvent(evt);
}
Program: 53827
Project: 53827
Buggy source:
/** 
 * We need to synthesize a load event in case the image loads synchronously, before our handlers can be attached.
 * @param image the image on which to dispatch the event
 */
protected void fireSyntheticLoadEvent(final Image image){
  DeferredCommand.addCommand(new Command(){
    public void execute(){
      NativeEvent evt=Document.get().createLoadEvent();
      getImageElement(image).dispatchEvent(evt);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * We need to synthesize a load event in case the image loads synchronously, before our handlers can be attached.
 * @param image the image on which to dispatch the event
 */
protected void fireSyntheticLoadEvent(final Image image){
  syntheticEventCommand=new ScheduledCommand(){
    public void execute(){
      if (image.state != State.this || this != syntheticEventCommand) {
        return;
      }
      syntheticEventCommand=null;
      if (!image.isAttached()) {
        getImageElement(image).setPropertyString(UNHANDLED_EVENT_ATTR,"String_Node_Str");
        return;
      }
      NativeEvent evt=Document.get().createLoadEvent();
      getImageElement(image).dispatchEvent(evt);
    }
  }
;
  Scheduler.get().scheduleDeferred(syntheticEventCommand);
}
Program: 53828
Project: 53828
Buggy source:
@Override public int getAbsoluteLeft(Element elem){
  Document doc=elem.getOwnerDocument();
  return getBoundingClientRectLeft(elem) + doc.getScrollLeft();
}

Fixed version (ground truth):
@Override public int getAbsoluteLeft(Element elem){
  int left=getBoundingClientRectLeft(elem) + getDocumentScrollLeftImpl();
  if (isRTL(elem)) {
    left+=getParentOffsetDelta(elem);
  }
  return left;
}
Program: 53829
Project: 53829
Buggy source:
@Override public int getAbsoluteTop(Element elem){
  Document doc=elem.getOwnerDocument();
  return getBoundingClientRectTop(elem) + doc.getScrollTop();
}

Fixed version (ground truth):
@Override public int getAbsoluteTop(Element elem){
  return getBoundingClientRectTop(elem) + getDocumentScrollTopImpl();
}
Program: 53830
Project: 53830
Buggy source:
private native boolean isRTL(Element elem);

Fixed version (ground truth):
protected native boolean isRTL(Element elem);
Program: 53831
Project: 53831
Buggy source:
/** 
 * Creates an &lt;input type='checkbox'&gt; element.
 * @return the newly created element
 */
public final InputElement createCheckInputElement(){
  return DOMImpl.impl.createInputElement(this,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Creates an &lt;input type='checkbox'&gt; element.
 * @return the newly created element
 */
public final InputElement createCheckInputElement(){
  return DOMImpl.impl.createCheckInputElement(this);
}
Program: 53833
Project: 53833
Buggy source:
@Override public Object createServiceInstance(Method contextMethod,Method domainMethod){
  Class<? extends ServiceLocator> locatorType=getTop().resolveServiceLocator(contextMethod,domainMethod);
  ServiceLocator locator=newInstance(locatorType,ServiceLocator.class);
  return locator.getInstance(domainMethod.getDeclaringClass());
}

Fixed version (ground truth):
@Override public Object createServiceInstance(Method contextMethod,Method domainMethod){
  Class<? extends ServiceLocator> locatorType=getTop().resolveServiceLocator(contextMethod,domainMethod);
  ServiceLocator locator=newInstance(locatorType,ServiceLocator.class);
  Class<?> declaringClass=contextMethod.getDeclaringClass();
  Class<?> serviceClass=getTop().resolveServiceClass(declaringClass.asSubclass(RequestContext.class));
  return locator.getInstance(serviceClass);
}
Program: 53834
Project: 53834
Buggy source:
@Override public Method resolveDomainMethod(Method requestContextMethod){
  Class<?> enclosing=requestContextMethod.getDeclaringClass();
  Class<?> searchIn=null;
  Service s=enclosing.getAnnotation(Service.class);
  if (s != null) {
    searchIn=s.value();
  }
  ServiceName sn=enclosing.getAnnotation(ServiceName.class);
  if (sn != null) {
    searchIn=forName(sn.value());
  }
  if (searchIn == null) {
    die(null,"String_Node_Str",RequestContext.class.getSimpleName(),enclosing.getCanonicalName());
  }
  Class<?>[] parameterTypes=requestContextMethod.getParameterTypes();
  Class<?>[] domainArgs=new Class<?>[parameterTypes.length];
  for (int i=0, j=domainArgs.length; i < j; i++) {
    if (BaseProxy.class.isAssignableFrom(parameterTypes[i])) {
      domainArgs[i]=getTop().resolveDomainClass(parameterTypes[i].asSubclass(BaseProxy.class));
    }
 else     if (EntityProxyId.class.isAssignableFrom(parameterTypes[i])) {
      domainArgs[i]=TypeUtils.ensureBaseType(TypeUtils.getSingleParameterization(EntityProxyId.class,requestContextMethod.getGenericParameterTypes()[i]));
    }
 else {
      domainArgs[i]=parameterTypes[i];
    }
  }
  Throwable ex;
  try {
    return searchIn.getMethod(requestContextMethod.getName(),domainArgs);
  }
 catch (  SecurityException e) {
    ex=e;
  }
catch (  NoSuchMethodException e) {
    return report("String_Node_Str",requestContextMethod.getName());
  }
  return die(ex,"String_Node_Str",requestContextMethod.getName(),searchIn.getCanonicalName());
}

Fixed version (ground truth):
@Override public Method resolveDomainMethod(Method requestContextMethod){
  Class<?> declaringClass=requestContextMethod.getDeclaringClass();
  Class<?> searchIn=getTop().resolveServiceClass(declaringClass.asSubclass(RequestContext.class));
  Class<?>[] parameterTypes=requestContextMethod.getParameterTypes();
  Class<?>[] domainArgs=new Class<?>[parameterTypes.length];
  for (int i=0, j=domainArgs.length; i < j; i++) {
    if (BaseProxy.class.isAssignableFrom(parameterTypes[i])) {
      domainArgs[i]=getTop().resolveDomainClass(parameterTypes[i].asSubclass(BaseProxy.class));
    }
 else     if (EntityProxyId.class.isAssignableFrom(parameterTypes[i])) {
      domainArgs[i]=TypeUtils.ensureBaseType(TypeUtils.getSingleParameterization(EntityProxyId.class,requestContextMethod.getGenericParameterTypes()[i]));
    }
 else {
      domainArgs[i]=parameterTypes[i];
    }
  }
  Throwable ex;
  try {
    return searchIn.getMethod(requestContextMethod.getName(),domainArgs);
  }
 catch (  SecurityException e) {
    ex=e;
  }
catch (  NoSuchMethodException e) {
    return report("String_Node_Str",requestContextMethod.getName());
  }
  return die(ex,"String_Node_Str",requestContextMethod.getName(),searchIn.getCanonicalName());
}
Program: 53835
Project: 53835
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(BoxesAndPrimitivesJreTest.class);
  suite.addTestSuite(ComplexKeysJreTest.class);
  suite.addTestSuite(FindServiceJreTest.class);
  suite.addTestSuite(LocatorJreTest.class);
  suite.addTestSuite(RequestFactoryExceptionPropagationJreTest.class);
  suite.addTestSuite(RequestFactoryInterfaceValidatorTest.class);
  suite.addTestSuite(RequestFactoryJreTest.class);
  suite.addTestSuite(RequestFactoryModelTest.class);
  suite.addTestSuite(RequestFactoryUnicodeEscapingJreTest.class);
  suite.addTestSuite(SimpleEntityProxyIdTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(BoxesAndPrimitivesJreTest.class);
  suite.addTestSuite(ComplexKeysJreTest.class);
  suite.addTestSuite(FindServiceJreTest.class);
  suite.addTestSuite(LocatorJreTest.class);
  suite.addTestSuite(RequestFactoryExceptionPropagationJreTest.class);
  suite.addTestSuite(RequestFactoryInterfaceValidatorTest.class);
  suite.addTestSuite(RequestFactoryJreTest.class);
  suite.addTestSuite(RequestFactoryModelTest.class);
  suite.addTestSuite(RequestFactoryUnicodeEscapingJreTest.class);
  suite.addTestSuite(ServiceInheritanceJreTest.class);
  suite.addTestSuite(SimpleEntityProxyIdTest.class);
  return suite;
}
Program: 53836
Project: 53836
Buggy source:
public static Test suite(){
  GWTTestSuite suite=new GWTTestSuite("String_Node_Str");
  suite.addTestSuite(BoxesAndPrimitivesTest.class);
  suite.addTestSuite(ComplexKeysTest.class);
  suite.addTestSuite(EditorTest.class);
  suite.addTestSuite(FindServiceTest.class);
  suite.addTestSuite(LocatorTest.class);
  suite.addTestSuite(RequestFactoryTest.class);
  suite.addTestSuite(RequestFactoryExceptionHandlerTest.class);
  suite.addTestSuite(RequestFactoryExceptionPropagationTest.class);
  suite.addTestSuite(RequestFactoryPolymorphicTest.class);
  suite.addTestSuite(RequestFactoryUnicodeEscapingTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  GWTTestSuite suite=new GWTTestSuite("String_Node_Str");
  suite.addTestSuite(BoxesAndPrimitivesTest.class);
  suite.addTestSuite(ComplexKeysTest.class);
  suite.addTestSuite(EditorTest.class);
  suite.addTestSuite(FindServiceTest.class);
  suite.addTestSuite(LocatorTest.class);
  suite.addTestSuite(RequestFactoryTest.class);
  suite.addTestSuite(RequestFactoryExceptionHandlerTest.class);
  suite.addTestSuite(RequestFactoryExceptionPropagationTest.class);
  suite.addTestSuite(RequestFactoryPolymorphicTest.class);
  suite.addTestSuite(RequestFactoryUnicodeEscapingTest.class);
  suite.addTestSuite(ServiceInheritanceTest.class);
  return suite;
}
Program: 53838
Project: 53838
Buggy source:
@Override public void generateSelectMatchStart(SourceWriter out,TreeLogger logger,String value) throws UnableToCompleteException {
  missingPluralForms.remove(value);
  if (value.startsWith("String_Node_Str")) {
    try {
      long val=Long.parseLong(value.substring(1));
      out.println("String_Node_Str" + val + "String_Node_Str"+ value);
    }
 catch (    NumberFormatException e) {
      throw error(logger,"String_Node_Str" + value + "String_Node_Str",e);
    }
    out.indent();
    return;
  }
  if (inExactMatches) {
    inExactMatches=false;
    out.println("String_Node_Str");
    out.indent();
    out.println("String_Node_Str" + argNumber + "String_Node_Str");
    out.indent();
  }
  if ("String_Node_Str".equals(value)) {
    out.println("String_Node_Str");
    out.indent();
    return;
  }
  PluralForm[] pluralForms=pluralRule.pluralForms();
  for (int i=0; i < pluralForms.length; ++i) {
    if (pluralForms[i].getName().equals(value)) {
      out.println("String_Node_Str" + i + "String_Node_Str"+ value);
      out.indent();
      return;
    }
  }
  logger.log(TreeLogger.WARN,"String_Node_Str" + value + "String_Node_Str"+ pluralRule.getClass().getCanonicalName()+ "String_Node_Str");
  out.println("String_Node_Str" + (bogusCaseValue++) + "String_Node_Str"+ value+ "String_Node_Str");
  out.indent();
}

Fixed version (ground truth):
@Override public void generateSelectMatchStart(SourceWriter out,TreeLogger logger,String value) throws UnableToCompleteException {
  missingPluralForms.remove(value);
  if (value.startsWith("String_Node_Str")) {
    try {
      long val=Long.parseLong(value.substring(1));
      out.println("String_Node_Str" + val + "String_Node_Str"+ value);
    }
 catch (    NumberFormatException e) {
      throw error(logger,"String_Node_Str" + value + "String_Node_Str",e);
    }
    out.indent();
    return;
  }
  if (inExactMatches) {
    inExactMatches=false;
    out.println("String_Node_Str");
    out.indent();
    out.println("String_Node_Str" + argNumber + "String_Node_Str");
    out.indent();
  }
  if (AlternateMessageSelector.OTHER_FORM_NAME.equals(value)) {
    out.println("String_Node_Str");
    out.indent();
    return;
  }
  PluralForm[] pluralForms=pluralRule.pluralForms();
  for (int i=0; i < pluralForms.length; ++i) {
    if (pluralForms[i].getName().equals(value)) {
      out.println("String_Node_Str" + i + "String_Node_Str"+ value);
      out.indent();
      return;
    }
  }
  logger.log(TreeLogger.WARN,"String_Node_Str" + value + "String_Node_Str"+ pluralRule.getClass().getCanonicalName()+ "String_Node_Str");
  out.println("String_Node_Str" + (bogusCaseValue++) + "String_Node_Str"+ value+ "String_Node_Str");
  out.indent();
}
Program: 53843
Project: 53843
Buggy source:
protected void addMapping(List<AlternateFormMapping> mapping,int numSelectors,String joinedForms,String msg){
  String[] formNames=joinedForms.split("String_Node_Str");
  if (formNames.length != numSelectors) {
    return;
  }
  List<AlternateForm> forms=new ArrayList<AlternateForm>();
  boolean nonOther=false;
  for (int selIdx=0; selIdx < numSelectors; ++selIdx) {
    String formName=formNames[selIdx];
    if (!selectors[selIdx].isFormAcceptable(formName)) {
      nonOther=false;
      break;
    }
    if (isStringMap || !"String_Node_Str".equals(formName)) {
      nonOther=true;
    }
    forms.add(new AlternateForm(formName,formName));
  }
  if (!nonOther) {
  }
 else {
    mapping.add(new AlternateFormMapping(forms,msg));
  }
}

Fixed version (ground truth):
protected void addMapping(List<AlternateFormMapping> mapping,int numSelectors,String joinedForms,String msg){
  String[] formNames=joinedForms.split("String_Node_Str");
  if (formNames.length != numSelectors) {
    return;
  }
  List<AlternateForm> forms=new ArrayList<AlternateForm>();
  boolean nonOther=false;
  for (int selIdx=0; selIdx < numSelectors; ++selIdx) {
    String formName=formNames[selIdx];
    if (!selectors[selIdx].isFormAcceptable(formName)) {
      nonOther=false;
      break;
    }
    if (isStringMap || !AlternateMessageSelector.OTHER_FORM_NAME.equals(formName)) {
      nonOther=true;
    }
    forms.add(new AlternateForm(formName,formName));
  }
  if (!nonOther) {
  }
 else {
    mapping.add(new AlternateFormMapping(forms,msg));
  }
}
Program: 53845
Project: 53845
Buggy source:
public void accept(MessageVisitor mv,GwtLocale locale) throws MessageProcessingException {
  ensureSelectorParams();
  List<Parameter> params=getParameters();
  int numSelectors=selectorParams.length;
  String[] lastForm=new String[numSelectors];
  MessageTranslation trans=null;
  if (locale != null) {
    for (    GwtLocale search : locale.getCompleteSearchList()) {
      trans=getTranslation(search);
      if (trans != null) {
        break;
      }
    }
  }
  if (trans == null) {
    trans=this;
  }
  for (  AlternateFormMapping mapping : trans.getAllMessageForms()) {
    List<AlternateForm> forms=mapping.getForms();
    boolean allOther=true;
    for (int i=0; i < forms.size(); ++i) {
      lastForm[i]=forms.get(i).getName();
      if (!"String_Node_Str".equals(lastForm[i])) {
        allOther=false;
      }
    }
    mv.visitTranslation(lastForm,allOther,messageStyle,mapping.getMessage());
  }
  mv.endMessage(this,trans);
}

Fixed version (ground truth):
public void accept(MessageVisitor mv,GwtLocale locale) throws MessageProcessingException {
  ensureSelectorParams();
  List<Parameter> params=getParameters();
  int numSelectors=selectorParams.length;
  String[] lastForm=new String[numSelectors];
  MessageTranslation trans=null;
  if (locale != null) {
    for (    GwtLocale search : locale.getCompleteSearchList()) {
      trans=getTranslation(search);
      if (trans != null) {
        break;
      }
    }
  }
  if (trans == null) {
    trans=this;
  }
  for (  AlternateFormMapping mapping : trans.getAllMessageForms()) {
    List<AlternateForm> forms=mapping.getForms();
    boolean allOther=true;
    for (int i=0; i < forms.size(); ++i) {
      lastForm[i]=forms.get(i).getName();
      if (!AlternateMessageSelector.OTHER_FORM_NAME.equals(lastForm[i])) {
        allOther=false;
      }
    }
    mv.visitTranslation(lastForm,allOther,messageStyle,mapping.getMessage());
  }
  mv.endMessage(this,trans);
}
Program: 53846
Project: 53846
Buggy source:
private AlternateMessageSelector computeAlternateMessageSelector(){
  PluralCount pluralAnnot=getAnnotation(PluralCount.class);
  if (pluralAnnot != null) {
    Class<? extends PluralRule> pluralClass=pluralAnnot.value();
    DefaultLocale defLocaleAnnot=getAnnotation(DefaultLocale.class);
    String defaultLocale=null;
    if (defLocaleAnnot != null) {
      defaultLocale=defLocaleAnnot.value();
    }
 else {
      defaultLocale=DefaultLocale.DEFAULT_LOCALE;
    }
    PluralRule pluralRule=getLocalizedPluralRule(pluralClass,localeFactory.fromString(defaultLocale));
    return new PluralRuleAdapter(pluralRule);
  }
  Select selectAnnot=getAnnotation(Select.class);
  if (selectAnnot != null) {
    final String[] validValues=type.getEnumValues();
    return new AlternateMessageSelector(){
      public boolean isFormAcceptable(      String form){
        if (validValues == null) {
          return true;
        }
        for (        String value : validValues) {
          if (value.equals(form)) {
            return true;
          }
        }
        return false;
      }
    }
;
  }
  return null;
}

Fixed version (ground truth):
private AlternateMessageSelector computeAlternateMessageSelector(){
  PluralCount pluralAnnot=getAnnotation(PluralCount.class);
  if (pluralAnnot != null) {
    Class<? extends PluralRule> pluralClass=pluralAnnot.value();
    DefaultLocale defLocaleAnnot=getAnnotation(DefaultLocale.class);
    String defaultLocale=null;
    if (defLocaleAnnot != null) {
      defaultLocale=defLocaleAnnot.value();
    }
 else {
      defaultLocale=DefaultLocale.DEFAULT_LOCALE;
    }
    PluralRule pluralRule=getLocalizedPluralRule(pluralClass,localeFactory.fromString(defaultLocale));
    return new PluralRuleAdapter(pluralRule);
  }
  Select selectAnnot=getAnnotation(Select.class);
  if (selectAnnot != null) {
    final String[] validValues=type.getEnumValues();
    return new AlternateMessageSelector(){
      public boolean isFormAcceptable(      String form){
        if (validValues == null || AlternateMessageSelector.OTHER_FORM_NAME.equals(form)) {
          return true;
        }
        for (        String value : validValues) {
          if (value.equals(form)) {
            return true;
          }
        }
        return false;
      }
    }
;
  }
  return null;
}
Program: 53847
Project: 53847
Buggy source:
public boolean isFormAcceptable(String form){
  if (validValues == null) {
    return true;
  }
  for (  String value : validValues) {
    if (value.equals(form)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean isFormAcceptable(String form){
  if (validValues == null || AlternateMessageSelector.OTHER_FORM_NAME.equals(form)) {
    return true;
  }
  for (  String value : validValues) {
    if (value.equals(form)) {
      return true;
    }
  }
  return false;
}
Program: 53848
Project: 53848
Buggy source:
public static Test suite(){
  GWTTestSuite suite=new GWTTestSuite("String_Node_Str");
  suite.addTestSuite(DocumentTest.class);
  suite.addTestSuite(NodeTest.class);
  suite.addTestSuite(ElementTest.class);
  suite.addTestSuite(FormTests.class);
  suite.addTestSuite(MapTests.class);
  suite.addTestSuite(SelectTests.class);
  suite.addTestSuite(StyleInjectorTest.class);
  suite.addTestSuite(TableTests.class);
  suite.addTestSuite(TextTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  GWTTestSuite suite=new GWTTestSuite("String_Node_Str");
  suite.addTestSuite(DocumentTest.class);
  suite.addTestSuite(NodeTest.class);
  suite.addTestSuite(ElementTest.class);
  suite.addTestSuite(FormTests.class);
  suite.addTestSuite(FrameTests.class);
  suite.addTestSuite(MapTests.class);
  suite.addTestSuite(SelectTests.class);
  suite.addTestSuite(StyleInjectorTest.class);
  suite.addTestSuite(TableTests.class);
  suite.addTestSuite(TextTest.class);
  return suite;
}
Program: 53849
Project: 53849
Buggy source:
@Override public Object createServiceInstance(Method contextMethod,Method domainMethod){
  Class<? extends ServiceLocator> locatorType=getTop().resolveServiceLocator(contextMethod,domainMethod);
  ServiceLocator locator=newInstance(locatorType,ServiceLocator.class);
  return locator.getInstance(domainMethod.getDeclaringClass());
}

Fixed version (ground truth):
@Override public Object createServiceInstance(Method contextMethod,Method domainMethod){
  Class<? extends ServiceLocator> locatorType=getTop().resolveServiceLocator(contextMethod,domainMethod);
  ServiceLocator locator=newInstance(locatorType,ServiceLocator.class);
  Class<?> declaringClass=contextMethod.getDeclaringClass();
  Class<?> serviceClass=getTop().resolveServiceClass((Class<? extends RequestContext>)declaringClass);
  return locator.getInstance(serviceClass);
}
Program: 53850
Project: 53850
Buggy source:
@Override public Method resolveDomainMethod(Method requestContextMethod){
  Class<?> enclosing=requestContextMethod.getDeclaringClass();
  Class<?> searchIn=null;
  Service s=enclosing.getAnnotation(Service.class);
  if (s != null) {
    searchIn=s.value();
  }
  ServiceName sn=enclosing.getAnnotation(ServiceName.class);
  if (sn != null) {
    searchIn=forName(sn.value());
  }
  if (searchIn == null) {
    die(null,"String_Node_Str",RequestContext.class.getSimpleName(),enclosing.getCanonicalName());
  }
  Class<?>[] parameterTypes=requestContextMethod.getParameterTypes();
  Class<?>[] domainArgs=new Class<?>[parameterTypes.length];
  for (int i=0, j=domainArgs.length; i < j; i++) {
    if (BaseProxy.class.isAssignableFrom(parameterTypes[i])) {
      domainArgs[i]=getTop().resolveDomainClass(parameterTypes[i].asSubclass(BaseProxy.class));
    }
 else     if (EntityProxyId.class.isAssignableFrom(parameterTypes[i])) {
      domainArgs[i]=TypeUtils.ensureBaseType(TypeUtils.getSingleParameterization(EntityProxyId.class,requestContextMethod.getGenericParameterTypes()[i]));
    }
 else {
      domainArgs[i]=parameterTypes[i];
    }
  }
  Throwable ex;
  try {
    return searchIn.getMethod(requestContextMethod.getName(),domainArgs);
  }
 catch (  SecurityException e) {
    ex=e;
  }
catch (  NoSuchMethodException e) {
    return report("String_Node_Str",requestContextMethod.getName());
  }
  return die(ex,"String_Node_Str",requestContextMethod.getName(),searchIn.getCanonicalName());
}

Fixed version (ground truth):
@Override public Method resolveDomainMethod(Method requestContextMethod){
  Class<?> declaringClass=requestContextMethod.getDeclaringClass();
  Class<?> searchIn=getTop().resolveServiceClass((Class<? extends RequestContext>)declaringClass);
  Class<?>[] parameterTypes=requestContextMethod.getParameterTypes();
  Class<?>[] domainArgs=new Class<?>[parameterTypes.length];
  for (int i=0, j=domainArgs.length; i < j; i++) {
    if (BaseProxy.class.isAssignableFrom(parameterTypes[i])) {
      domainArgs[i]=getTop().resolveDomainClass(parameterTypes[i].asSubclass(BaseProxy.class));
    }
 else     if (EntityProxyId.class.isAssignableFrom(parameterTypes[i])) {
      domainArgs[i]=TypeUtils.ensureBaseType(TypeUtils.getSingleParameterization(EntityProxyId.class,requestContextMethod.getGenericParameterTypes()[i]));
    }
 else {
      domainArgs[i]=parameterTypes[i];
    }
  }
  Throwable ex;
  try {
    return searchIn.getMethod(requestContextMethod.getName(),domainArgs);
  }
 catch (  SecurityException e) {
    ex=e;
  }
catch (  NoSuchMethodException e) {
    return report("String_Node_Str",requestContextMethod.getName());
  }
  return die(ex,"String_Node_Str",requestContextMethod.getName(),searchIn.getCanonicalName());
}
Program: 53851
Project: 53851
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(BoxesAndPrimitivesJreTest.class);
  suite.addTestSuite(ComplexKeysJreTest.class);
  suite.addTestSuite(FindServiceJreTest.class);
  suite.addTestSuite(LocatorJreTest.class);
  suite.addTestSuite(RequestFactoryExceptionPropagationJreTest.class);
  suite.addTestSuite(RequestFactoryInterfaceValidatorTest.class);
  suite.addTestSuite(RequestFactoryJreTest.class);
  suite.addTestSuite(RequestFactoryModelTest.class);
  suite.addTestSuite(RequestFactoryUnicodeEscapingJreTest.class);
  suite.addTestSuite(SimpleEntityProxyIdTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(BoxesAndPrimitivesJreTest.class);
  suite.addTestSuite(ComplexKeysJreTest.class);
  suite.addTestSuite(FindServiceJreTest.class);
  suite.addTestSuite(LocatorJreTest.class);
  suite.addTestSuite(RequestFactoryExceptionPropagationJreTest.class);
  suite.addTestSuite(RequestFactoryInterfaceValidatorTest.class);
  suite.addTestSuite(RequestFactoryJreTest.class);
  suite.addTestSuite(RequestFactoryModelTest.class);
  suite.addTestSuite(RequestFactoryUnicodeEscapingJreTest.class);
  suite.addTestSuite(ServiceInheritanceJreTest.class);
  suite.addTestSuite(SimpleEntityProxyIdTest.class);
  return suite;
}
Program: 53852
Project: 53852
Buggy source:
@SuppressWarnings("String_Node_Str") public V next(){
  if (!hasNext()) {
    throw new NoSuchElementException();
  }
  last=index;
  Object toReturn=values[index++];
  advanceToItem();
  return (V)toReturn;
}

Fixed version (ground truth):
public E next(){
  if (!hasNext()) {
    throw new NoSuchElementException();
  }
  last=index;
  return iteratorItem(index++);
}
Program: 53853
Project: 53853
Buggy source:
public HashMap(Map<? extends K,? extends V> m){
  int newCapacity=INITIAL_TABLE_SIZE;
  int expectedSize=m.size();
  while (newCapacity * 3 < expectedSize * 4) {
    newCapacity<<=1;
  }
  initTable(newCapacity);
  internalPutAll(m);
}

Fixed version (ground truth):
public HashMap(Map<? extends K,? extends V> m){
  int newCapacity=INITIAL_TABLE_SIZE;
  int expectedSize=m.size();
  while (newCapacity * 3 < expectedSize * 4) {
    newCapacity<<=1;
  }
  initTable(newCapacity);
  putAll(m);
}
Program: 53854
Project: 53854
Buggy source:
@SuppressWarnings("String_Node_Str") public V put(K key,V value){
  ensureSizeFor(size + 1);
  int index=findKeyOrEmpty(key);
  if (keys[index] == null) {
    ++size;
    keys[index]=maskNullKey(key);
    values[index]=value;
    return null;
  }
 else {
    Object previousValue=values[index];
    values[index]=value;
    return (V)previousValue;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public V put(K key,V value){
  int index=findKeyOrEmpty(key);
  if (keys[index] == null) {
    if (ensureSizeFor(++size)) {
      index=findKeyOrEmpty(key);
    }
    keys[index]=maskNullKey(key);
    values[index]=value;
    return null;
  }
 else {
    Object previousValue=values[index];
    values[index]=value;
    return (V)previousValue;
  }
}