nus-yam/ex-repair huggingface dataset:
Program: 88727
Project: 88727
Buggy source:
protected String varNode(String dirPrefix,VarNode vv){
  StringBuffer ret=new StringBuffer();
  ret.append("String_Node_Str" + dirPrefix + "String_Node_Str"+ vv.getNumber()+ "String_Node_Str");
  ret.append("String_Node_Str" + htmlify(vv.getVariable().toString()));
  ret.append("String_Node_Str");
  ret.append("String_Node_Str");
  ret.append("String_Node_Str" + (vv.context() == null ? "String_Node_Str" : htmlify(vv.context().toString())));
  ret.append("String_Node_Str");
  if (vv instanceof LocalVarNode) {
    LocalVarNode lvn=(LocalVarNode)vv;
    ret.append("String_Node_Str" + toFileName(lvn.getMethod().toString()) + "String_Node_Str");
    ret.append(htmlify(lvn.getMethod().toString()) + "String_Node_Str");
  }
  ret.append(htmlify(vv.getType().toString()) + "String_Node_Str");
  return ret.toString();
}

Fixed version (ground truth):
protected String varNode(String dirPrefix,VarNode vv){
  StringBuffer ret=new StringBuffer();
  ret.append("String_Node_Str" + dirPrefix + "String_Node_Str"+ vv.getNumber()+ "String_Node_Str");
  ret.append("String_Node_Str" + htmlify(vv.getVariable().toString()));
  ret.append("String_Node_Str");
  ret.append("String_Node_Str");
  ret.append("String_Node_Str" + (vv.context() == null ? "String_Node_Str" : htmlify(vv.context().toString())));
  ret.append("String_Node_Str");
  if (vv instanceof LocalVarNode) {
    LocalVarNode lvn=(LocalVarNode)vv;
    SootMethod m=lvn.getMethod();
    if (m != null) {
      ret.append("String_Node_Str" + toFileName(m.toString()) + "String_Node_Str");
      ret.append(htmlify(m.toString()) + "String_Node_Str");
    }
  }
  ret.append(htmlify(vv.getType().toString()) + "String_Node_Str");
  return ret.toString();
}
Program: 88728
Project: 88728
Buggy source:
public void dump(){
  for (Iterator vIt=pag.getVarNodeNumberer().iterator(); vIt.hasNext(); ) {
    final VarNode v=(VarNode)vIt.next();
    mergedNodes.put(v.getReplacement(),v);
    if (v instanceof LocalVarNode) {
      methodToNodes.put(((LocalVarNode)v).getMethod(),v);
    }
  }
  try {
    JarOutputStream jarOut=new JarOutputStream(new FileOutputStream(new File(output_dir,"String_Node_Str")));
    for (Iterator vIt=mergedNodes.keySet().iterator(); vIt.hasNext(); ) {
      final VarNode v=(VarNode)vIt.next();
      dumpVarNode(v,jarOut);
    }
    for (Iterator mIt=methodToNodes.keySet().iterator(); mIt.hasNext(); ) {
      final SootMethod m=(SootMethod)mIt.next();
      dumpMethod(m,jarOut);
    }
    addSymLinks(pag.getVarNodeNumberer().iterator(),jarOut);
    jarOut.close();
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
public void dump(){
  for (Iterator vIt=pag.getVarNodeNumberer().iterator(); vIt.hasNext(); ) {
    final VarNode v=(VarNode)vIt.next();
    mergedNodes.put(v.getReplacement(),v);
    if (v instanceof LocalVarNode) {
      SootMethod m=((LocalVarNode)v).getMethod();
      if (m != null) {
        methodToNodes.put(m,v);
      }
    }
  }
  try {
    JarOutputStream jarOut=new JarOutputStream(new FileOutputStream(new File(output_dir,"String_Node_Str")));
    for (Iterator vIt=mergedNodes.keySet().iterator(); vIt.hasNext(); ) {
      final VarNode v=(VarNode)vIt.next();
      dumpVarNode(v,jarOut);
    }
    for (Iterator mIt=methodToNodes.keySet().iterator(); mIt.hasNext(); ) {
      final SootMethod m=(SootMethod)mIt.next();
      dumpMethod(m,jarOut);
    }
    addSymLinks(pag.getVarNodeNumberer().iterator(),jarOut);
    jarOut.close();
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str" + e);
  }
}
Program: 88729
Project: 88729
Buggy source:
private int addJimpleLnTags(int lnNum,SootMethod meth){
  meth.addTag(new JimpleLineNumberTag(lnNum));
  lnNum++;
  return lnNum;
}

Fixed version (ground truth):
private int addJimpleLnTags(int lnNum,SootField f){
  f.addTag(new JimpleLineNumberTag(lnNum));
  lnNum++;
  return lnNum;
}
Program: 88730
Project: 88730
Buggy source:
public void collectTags(SootClass sc){
  Iterator fit=sc.getFields().iterator();
  while (fit.hasNext()) {
    SootField sf=(SootField)fit.next();
    collectFieldTags(sf);
  }
  Iterator it=sc.getMethods().iterator();
  while (it.hasNext()) {
    SootMethod sm=(SootMethod)it.next();
    collectMethodTags(sm);
    Body b=sm.getActiveBody();
    collectBodyTags(b);
  }
}

Fixed version (ground truth):
public void collectTags(SootClass sc){
  Iterator fit=sc.getFields().iterator();
  while (fit.hasNext()) {
    SootField sf=(SootField)fit.next();
    collectFieldTags(sf);
  }
  Iterator it=sc.getMethods().iterator();
  while (it.hasNext()) {
    SootMethod sm=(SootMethod)it.next();
    collectMethodTags(sm);
    if (!sm.hasActiveBody())     continue;
    Body b=sm.getActiveBody();
    collectBodyTags(b);
  }
}
Program: 88731
Project: 88731
Buggy source:
private void clearPres(){
  if (getEditorPart() == null)   return;
  if (getEditorPart().getEditorInput() != null) {
    getDisplay().asyncExec(new Runnable(){
      public void run(){
        ((AbstractTextEditor)getEditorPart()).setInput(getEditorPart().getEditorInput());
      }
    }
);
  }
}

Fixed version (ground truth):
private void clearPres(){
  if (getEditorPart() == null)   return;
  if (getEditorPart().getEditorInput() != null) {
    getDisplay().syncExec(new Runnable(){
      public void run(){
        ((AbstractTextEditor)getEditorPart()).setInput(getEditorPart().getEditorInput());
      }
    }
);
  }
}
Program: 88732
Project: 88732
Buggy source:
public void runFinish(){
  getFileHandler().refreshFolder();
  getFileHandler().refreshAll(getSootSelection().getProject());
  SootPlugin.getDefault().getManager().updateSootRanFlag();
  IEditorPart activeEdPart=SootPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
  SootPlugin.getDefault().getPartManager().updatePart(activeEdPart);
}

Fixed version (ground truth):
public void runFinish(){
  getFileHandler().refreshFolder();
  getFileHandler().refreshAll(getSootSelection().getProject());
  SootPlugin.getDefault().getManager().updateSootRanFlag();
  final IEditorPart activeEdPart=SootPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
  SootPlugin.getDefault().getPartManager().updatePart(activeEdPart);
}
Program: 88733
Project: 88733
Buggy source:
public ArrayList toRunArray(){
  addEclipseDefsToArray();
  if (getRunArray() == null) {
    setRunArray(new ArrayList());
  }
  Iterator it=getSaveArray().iterator();
  String lastKey="String_Node_Str";
  while (it.hasNext()) {
    String test=(String)it.next();
    String spliter="String_Node_Str";
    if (test.indexOf("String_Node_Str") != -1) {
      spliter="String_Node_Str";
    }
 else     if (test.indexOf('\n') != -1) {
      spliter="String_Node_Str";
    }
    System.out.println("String_Node_Str" + test);
    if (test.equals("String_Node_Str")) {
    }
 else     if (test.indexOf(spliter) != -1) {
      System.out.println("String_Node_Str");
      String[] tokens=test.split(spliter);
      getRunArray().add(tokens[0]);
      System.out.println("String_Node_Str" + tokens[0]);
      for (int i=1; i < tokens.length; i++) {
        getRunArray().add(lastKey);
        getRunArray().add(tokens[i]);
        System.out.println("String_Node_Str" + tokens[i]);
      }
    }
 else {
      getRunArray().add(test);
    }
    lastKey=test;
  }
  return getRunArray();
}

Fixed version (ground truth):
public ArrayList toRunArray(){
  addEclipseDefsToArray();
  if (getRunArray() == null) {
    setRunArray(new ArrayList());
  }
  Iterator it=getSaveArray().iterator();
  String lastKey="String_Node_Str";
  while (it.hasNext()) {
    String test=(String)it.next();
    String spliter="String_Node_Str";
    if (test.indexOf("String_Node_Str") != -1) {
      spliter="String_Node_Str";
    }
 else     if (test.indexOf('\n') != -1) {
      spliter="String_Node_Str";
    }
    System.out.println("String_Node_Str" + test);
    if (test.equals("String_Node_Str")) {
    }
 else     if (test.equals("String_Node_Str")) {
      int index=getRunArray().size() - 1;
      getRunArray().remove(index);
    }
 else     if (test.indexOf(spliter) != -1) {
      System.out.println("String_Node_Str");
      String[] tokens=test.split(spliter);
      getRunArray().add(tokens[0]);
      System.out.println("String_Node_Str" + tokens[0]);
      for (int i=1; i < tokens.length; i++) {
        getRunArray().add(lastKey);
        getRunArray().add(tokens[i]);
        System.out.println("String_Node_Str" + tokens[i]);
      }
    }
 else {
      getRunArray().add(test);
    }
    lastKey=test;
  }
  return getRunArray();
}
Program: 88736
Project: 88736
Buggy source:
public BPrimitiveCastInst(Type fromType,Type toType){
  this.fromType=fromType;
  this.toType=toType;
}

Fixed version (ground truth):
public BPrimitiveCastInst(Type fromType,Type toType){
  if (fromType instanceof NullType)   throw new RuntimeException("String_Node_Str" + fromType);
  this.fromType=fromType;
  this.toType=toType;
}
Program: 88738
Project: 88738
Buggy source:
public void run(){
  for (int i=0; i < srs.length; i++) {
    try {
      System.out.println("String_Node_Str" + srs[i]);
      getViewer().getTextWidget().setStyleRange(srs[i]);
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + e.getMessage());
    }
  }
}

Fixed version (ground truth):
public void run(){
  for (int i=0; i < srs.length; i++) {
    try {
      getViewer().getTextWidget().setStyleRange(srs[i]);
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + e.getMessage());
    }
  }
}
Program: 88739
Project: 88739
Buggy source:
protected void changeStyles(){
  final StyleRange[] srs=new StyleRange[styleList.size()];
  styleList.toArray(srs);
  getDisplay().asyncExec(new Runnable(){
    public void run(){
      for (int i=0; i < srs.length; i++) {
        try {
          System.out.println("String_Node_Str" + srs[i]);
          getViewer().getTextWidget().setStyleRange(srs[i]);
        }
 catch (        Exception e) {
          System.out.println("String_Node_Str" + e.getMessage());
        }
      }
    }
  }
);
}

Fixed version (ground truth):
protected void changeStyles(){
  final StyleRange[] srs=new StyleRange[styleList.size()];
  styleList.toArray(srs);
  getDisplay().asyncExec(new Runnable(){
    public void run(){
      for (int i=0; i < srs.length; i++) {
        try {
          getViewer().getTextWidget().setStyleRange(srs[i]);
        }
 catch (        Exception e) {
          System.out.println("String_Node_Str" + e.getMessage());
        }
      }
    }
  }
);
}
Program: 88740
Project: 88740
Buggy source:
public Color getColor(RGB rgb){
  System.out.println("String_Node_Str" + rgb.red + "String_Node_Str"+ rgb.green+ "String_Node_Str"+ rgb.blue);
  Color color=(Color)fColorTable.get(rgb);
  if (color == null) {
    color=new Color(Display.getCurrent(),rgb);
    System.out.println("String_Node_Str");
    fColorTable.put(rgb,color);
  }
  return color;
}

Fixed version (ground truth):
public Color getColor(RGB rgb){
  Color color=(Color)fColorTable.get(rgb);
  if (color == null) {
    color=new Color(Display.getCurrent(),rgb);
    fColorTable.put(rgb,color);
  }
  return color;
}
Program: 88741
Project: 88741
Buggy source:
public void dispose(){
  System.out.println("String_Node_Str");
  if (fColorTable.values() == null)   return;
  Iterator e=fColorTable.values().iterator();
  while (e.hasNext())   ((Color)e.next()).dispose();
}

Fixed version (ground truth):
public void dispose(){
  if (fColorTable.values() == null)   return;
  Iterator e=fColorTable.values().iterator();
  while (e.hasNext())   ((Color)e.next()).dispose();
}
Program: 88743
Project: 88743
Buggy source:
/** 
 * Applies the transformations corresponding to the given options. 
 */
private void applyPhaseOptions(JimpleBody b,Map opts){
  JBOptions options=new JBOptions(opts);
  if (options.use_original_names())   PhaseOptions.v().setPhaseOptionIfUnset("String_Node_Str","String_Node_Str");
  if (Options.v().time())   Timers.v().splitTimer.start();
  PackManager.v().getTransform("String_Node_Str").apply(b);
  if (Options.v().time())   Timers.v().splitTimer.end();
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  if (Options.v().time())   Timers.v().assignTimer.start();
  PackManager.v().getTransform("String_Node_Str").apply(b);
  if (Options.v().time())   Timers.v().assignTimer.end();
  if (typingFailed(b))   throw new RuntimeException("String_Node_Str");
  if (options.use_original_names()) {
    PackManager.v().getTransform("String_Node_Str").apply(b);
  }
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  if (Options.v().time())   Timers.v().stmtCount+=b.getUnits().size();
}

Fixed version (ground truth):
/** 
 * Applies the transformations corresponding to the given options. 
 */
private void applyPhaseOptions(JimpleBody b,Map opts){
  JBOptions options=new JBOptions(opts);
  if (options.use_original_names())   PhaseOptions.v().setPhaseOptionIfUnset("String_Node_Str","String_Node_Str");
  if (Options.v().time())   Timers.v().splitTimer.start();
  PackManager.v().getTransform("String_Node_Str").apply(b);
  if (Options.v().time())   Timers.v().splitTimer.end();
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  if (Options.v().time())   Timers.v().assignTimer.start();
  PackManager.v().getTransform("String_Node_Str").apply(b);
  if (Options.v().time())   Timers.v().assignTimer.end();
  if (options.use_original_names()) {
    PackManager.v().getTransform("String_Node_Str").apply(b);
  }
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  PackManager.v().getTransform("String_Node_Str").apply(b);
  if (Options.v().time())   Timers.v().stmtCount+=b.getUnits().size();
}
Program: 88744
Project: 88744
Buggy source:
/** 
 * Assign types to local variables. 
 */
protected void internalTransform(Body b,String phaseName,Map options){
  if (b == null) {
    throw new NullPointerException();
  }
  Date start=new Date();
  if (Options.v().verbose())   G.v().out.println("String_Node_Str" + start);
  TypeResolver.resolve((JimpleBody)b,Scene.v());
  Date finish=new Date();
  if (Options.v().verbose()) {
    long runtime=finish.getTime() - start.getTime();
    long mins=runtime / 60000;
    long secs=(runtime % 60000) / 1000;
    G.v().out.println("String_Node_Str" + mins + "String_Node_Str"+ secs+ "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Assign types to local variables. 
 */
protected void internalTransform(Body b,String phaseName,Map options){
  if (b == null) {
    throw new NullPointerException();
  }
  Date start=new Date();
  if (Options.v().verbose())   G.v().out.println("String_Node_Str" + start);
  TypeResolver.resolve((JimpleBody)b,Scene.v());
  Date finish=new Date();
  if (Options.v().verbose()) {
    long runtime=finish.getTime() - start.getTime();
    long mins=runtime / 60000;
    long secs=(runtime % 60000) / 1000;
    G.v().out.println("String_Node_Str" + mins + "String_Node_Str"+ secs+ "String_Node_Str");
  }
  if (typingFailed((JimpleBody)b))   throw new RuntimeException("String_Node_Str");
}
Program: 88745
Project: 88745
Buggy source:
private void setAttributeTextColor(TextPresentation tp,int sline,int eline,int start,int end,RGB colorKey,boolean fg){
  System.out.println("String_Node_Str" + sline + "String_Node_Str"+ start+ "String_Node_Str"+ end);
  Display display=getEditorPart().getSite().getShell().getDisplay();
  ColorManager colorManager=new ColorManager();
  int sLineOffset=0;
  int eLineOffset=0;
  try {
    sLineOffset=getViewer().getDocument().getLineOffset((sline - 1));
    eLineOffset=getViewer().getDocument().getLineOffset((eline - 1));
  }
 catch (  Exception e) {
  }
  final boolean foreground=fg;
  final int s=sLineOffset + start - 1;
  int e=eLineOffset + end - 1;
  final int l=e - s;
  final Color ck=colorManager.getColor(colorKey);
  final Color oldBgC=colorManager.getColor(IJimpleColorConstants.JIMPLE_DEFAULT);
  display.asyncExec(new Runnable(){
    public void run(){
      TextPresentation tp=new TextPresentation();
      StyleRange sr;
      if (l != 0) {
        if (foreground) {
          sr=new StyleRange(s,l,ck,getBgColor());
        }
 else {
          sr=new StyleRange(s,l,oldBgC,ck);
        }
        tp.addStyleRange(sr);
      }
      getViewer().changeTextPresentation(tp,true);
    }
  }
);
}

Fixed version (ground truth):
private void setAttributeTextColor(TextPresentation tp,int sline,int eline,int start,int end,RGB colorKey,boolean fg){
  System.out.println("String_Node_Str" + sline + "String_Node_Str"+ start+ "String_Node_Str"+ end);
  Display display=getEditorPart().getSite().getShell().getDisplay();
  ColorManager colorManager=new ColorManager();
  int sLineOffset=0;
  int eLineOffset=0;
  try {
    sLineOffset=getViewer().getDocument().getLineOffset((sline - 1));
    eLineOffset=getViewer().getDocument().getLineOffset((eline - 1));
  }
 catch (  Exception e) {
    return;
  }
  final boolean foreground=fg;
  final int s=sLineOffset + start - 1;
  int e=eLineOffset + end - 1;
  final int l=e - s;
  final Color ck=colorManager.getColor(colorKey);
  final Color oldBgC=colorManager.getColor(IJimpleColorConstants.JIMPLE_DEFAULT);
  display.asyncExec(new Runnable(){
    public void run(){
      TextPresentation tp=new TextPresentation();
      StyleRange sr;
      if (l != 0) {
        if (foreground) {
          sr=new StyleRange(s,l,ck,getBgColor());
        }
 else {
          sr=new StyleRange(s,l,oldBgC,ck);
        }
        tp.addStyleRange(sr);
      }
      getViewer().changeTextPresentation(tp,true);
    }
  }
);
}
Program: 88746
Project: 88746
Buggy source:
/** 
 * @see org.eclipse.jface.text.ITextHover#getHoverRegion(ITextViewer,int)
 */
public org.eclipse.jface.text.IRegion getHoverRegion(ITextViewer textViewer,int offset){
  try {
    setLineNum(textViewer.getDocument().getLineOfOffset(offset) + 1);
    System.out.println("String_Node_Str");
    setViewer(textViewer);
    setDocument(textViewer.getDocument());
    return textViewer.getDocument().getLineInformationOfOffset(offset);
  }
 catch (  BadLocationException e) {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.jface.text.ITextHover#getHoverRegion(ITextViewer,int)
 */
public org.eclipse.jface.text.IRegion getHoverRegion(ITextViewer textViewer,int offset){
  try {
    setLineNum(textViewer.getDocument().getLineOfOffset(offset) + 1);
    System.out.println("String_Node_Str");
    handleViewer(textViewer);
    setDocument(textViewer.getDocument());
    return textViewer.getDocument().getLineInformationOfOffset(offset);
  }
 catch (  BadLocationException e) {
    return null;
  }
}
Program: 88747
Project: 88747
Buggy source:
/** 
 * Method setEditor.
 * @param ed
 */
public void setEditor(IEditorPart ed){
  System.out.println("String_Node_Str");
  editor=ed;
}

Fixed version (ground truth):
/** 
 * Method setEditor.
 * @param ed
 */
public void setEditor(IEditorPart ed){
  System.out.println("String_Node_Str");
  editor=ed;
  formTextViewer(editor);
}
Program: 88748
Project: 88748
Buggy source:
private void processVBNode(PosColAttribute vbAttr,Node node){
  if (node.getNodeType() == Node.ELEMENT_NODE) {
    NodeList children=node.getChildNodes();
    for (int i=0; i < children.getLength(); i++) {
      processVBNode(vbAttr,children.item(i));
    }
  }
 else   if (node.getNodeType() == Node.TEXT_NODE) {
    String type=node.getParentNode().getNodeName();
    if (type.equals("String_Node_Str")) {
      vbAttr.setStartOffset((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setEndOffset((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setSourceStartOffset((new Integer(node.getNodeValue()).intValue()));
      System.out.println("String_Node_Str" + vbAttr.getSourceStartOffset());
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setSourceEndOffset((new Integer(node.getNodeValue()).intValue()));
      System.out.println("String_Node_Str" + vbAttr.getSourceEndOffset());
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setRed((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setGreen((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setBlue((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setFg((new Integer(node.getNodeValue()).intValue()));
    }
  }
}

Fixed version (ground truth):
private void processVBNode(PosColAttribute vbAttr,Node node){
  if (node.getNodeType() == Node.ELEMENT_NODE) {
    NodeList children=node.getChildNodes();
    for (int i=0; i < children.getLength(); i++) {
      processVBNode(vbAttr,children.item(i));
    }
  }
 else   if (node.getNodeType() == Node.TEXT_NODE) {
    String type=node.getParentNode().getNodeName();
    if (type.equals("String_Node_Str")) {
      vbAttr.setStartOffset((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setEndOffset((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setSourceStartOffset((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setSourceEndOffset((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setRed((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setGreen((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setBlue((new Integer(node.getNodeValue()).intValue()));
    }
 else     if (type.equals("String_Node_Str")) {
      vbAttr.setFg((new Integer(node.getNodeValue()).intValue()));
    }
  }
}
Program: 88749
Project: 88749
Buggy source:
public boolean attrForJavaLn(int java_ln){
  System.out.println("String_Node_Str" + getJavaStartLn() + "String_Node_Str"+ java_ln);
  if (getJavaStartLn() == java_ln)   return true;
 else   return false;
}

Fixed version (ground truth):
public boolean attrForJavaLn(int java_ln){
  if (getJavaStartLn() == java_ln)   return true;
 else   return false;
}
Program: 88751
Project: 88751
Buggy source:
public void findClass(String className){
  String resource=removeExt(getResource(getEditor()).getName());
  String ext=getResource(getEditor()).getFileExtension();
  if (!resource.equals(className)) {
    IContainer parent=getResource(getEditor()).getParent();
    IResource file=parent.findMember(className + "String_Node_Str" + ext);
    if (file == null) {
      setLinkToEditor(getEditor());
    }
 else {
      try {
        setLinkToEditor((AbstractTextEditor)SootPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor((IFile)file));
      }
 catch (      PartInitException e) {
      }
    }
  }
 else {
    setLinkToEditor(getEditor());
  }
}

Fixed version (ground truth):
public void findClass(String className){
  setLinkToEditor(getEditor());
  String resource=removeExt(getResource(getEditor()).getName());
  String ext=getResource(getEditor()).getFileExtension();
  IProject proj=getResource(getEditor()).getProject();
  System.out.println("String_Node_Str" + proj);
  String slashedClassName=className.replaceAll("String_Node_Str",System.getProperty("String_Node_Str"));
  String classNameToFind=slashedClassName + "String_Node_Str" + ext;
  IJavaProject jProj=JavaCore.create(proj);
  try {
    IPackageFragmentRoot[] roots=jProj.getAllPackageFragmentRoots();
    for (int i=0; i < roots.length; i++) {
      System.out.println(roots[i].getResource());
      if (!(roots[i].getResource() instanceof IContainer))       continue;
      IResource fileToFind=((IContainer)roots[i].getResource()).findMember(classNameToFind);
      if (fileToFind == null)       continue;
      if (!fileToFind.equals(resource)) {
        try {
          setLinkToEditor((AbstractTextEditor)SootPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor((IFile)fileToFind));
        }
 catch (        PartInitException e) {
        }
      }
    }
  }
 catch (  JavaModelException e) {
    setLinkToEditor(getEditor());
  }
}
Program: 88752
Project: 88752
Buggy source:
private void setAttributeTextColor(int sline,int eline,int start,int end,RGB colorKey,boolean fg){
  System.out.println("String_Node_Str");
  Display display=getEditorPart().getSite().getShell().getDisplay();
  TextPresentation tp=new TextPresentation();
  if (getTextPresList() == null) {
    setTextPresList(new ArrayList());
  }
  getTextPresList().add(tp);
  ColorManager colorManager=new ColorManager();
  int sLineOffset=0;
  int eLineOffset=0;
  try {
    sLineOffset=getViewer().getDocument().getLineOffset((sline - 1));
    eLineOffset=getViewer().getDocument().getLineOffset((eline - 1));
    System.out.println("String_Node_Str" + sLineOffset);
  }
 catch (  Exception e) {
  }
  final boolean foreground=fg;
  final int s=sLineOffset + start - 1;
  System.out.println("String_Node_Str" + s);
  int e=eLineOffset + end - 1;
  System.out.println("String_Node_Str" + e);
  final int l=e - s;
  System.out.println("String_Node_Str" + l);
  final Color ck=colorManager.getColor(colorKey);
  final Color oldBgC=colorManager.getColor(IJimpleColorConstants.JIMPLE_DEFAULT);
  display.asyncExec(new Runnable(){
    public void run(){
      TextPresentation tp=new TextPresentation();
      StyleRange sr;
      if (foreground) {
        sr=new StyleRange(s,l,ck,getViewer().getTextWidget().getBackground());
      }
 else {
        sr=new StyleRange(s,l,oldBgC,ck);
      }
      tp.addStyleRange(sr);
      getViewer().changeTextPresentation(tp,true);
    }
  }
);
}

Fixed version (ground truth):
private void setAttributeTextColor(TextPresentation tp,int sline,int eline,int start,int end,RGB colorKey,boolean fg){
  System.out.println("String_Node_Str" + sline + "String_Node_Str"+ start+ "String_Node_Str"+ end);
  Display display=getEditorPart().getSite().getShell().getDisplay();
  ColorManager colorManager=new ColorManager();
  int sLineOffset=0;
  int eLineOffset=0;
  try {
    sLineOffset=getViewer().getDocument().getLineOffset((sline - 1));
    eLineOffset=getViewer().getDocument().getLineOffset((eline - 1));
  }
 catch (  Exception e) {
  }
  final boolean foreground=fg;
  final int s=sLineOffset + start - 1;
  int e=eLineOffset + end - 1;
  final int l=e - s;
  final Color ck=colorManager.getColor(colorKey);
  final Color oldBgC=colorManager.getColor(IJimpleColorConstants.JIMPLE_DEFAULT);
  display.asyncExec(new Runnable(){
    public void run(){
      TextPresentation tp=new TextPresentation();
      StyleRange sr;
      if (l != 0) {
        if (foreground) {
          sr=new StyleRange(s,l,ck,getBgColor());
        }
 else {
          sr=new StyleRange(s,l,oldBgC,ck);
        }
        tp.addStyleRange(sr);
      }
      getViewer().changeTextPresentation(tp,true);
    }
  }
);
}
Program: 88753
Project: 88753
Buggy source:
public void run(){
  TextPresentation tp=new TextPresentation();
  StyleRange sr;
  if (foreground) {
    sr=new StyleRange(s,l,ck,getViewer().getTextWidget().getBackground());
  }
 else {
    sr=new StyleRange(s,l,oldBgC,ck);
  }
  tp.addStyleRange(sr);
  getViewer().changeTextPresentation(tp,true);
}

Fixed version (ground truth):
public void run(){
  getViewer().changeTextPresentation(pres,true);
}
Program: 88754
Project: 88754
Buggy source:
public void computeColors(SootAttributesHandler handler,ITextViewer viewer,IEditorPart editorPart){
  setViewer(viewer);
  setEditorPart(editorPart);
  Iterator it=handler.getAttrList().iterator();
  while (it.hasNext()) {
    SootAttribute sa=(SootAttribute)it.next();
    if ((sa.getRed() == 0) && (sa.getGreen() == 0) && (sa.getBlue() == 0)) {
    }
 else {
      boolean fg=false;
      if (sa.getFg() == 1) {
        fg=true;
      }
      setAttributeTextColor(sa.getJavaStartLn(),sa.getJavaEndLn(),sa.getJavaOffsetStart() + 1,sa.getJavaOffsetEnd() + 1,sa.getRGBColor(),fg);
    }
    if (sa.getValueAttrs() != null) {
      Iterator valIt=sa.getValueAttrs().iterator();
      while (valIt.hasNext()) {
        PosColAttribute vba=(PosColAttribute)valIt.next();
        if ((vba.getRed() == 0) && (vba.getGreen() == 0) && (vba.getBlue() == 0)) {
        }
 else {
          boolean fg=false;
          if (vba.getFg() == 1) {
            fg=true;
          }
          setAttributeTextColor(sa.getJavaStartLn(),sa.getJavaEndLn(),vba.getSourceStartOffset() + 1,vba.getSourceEndOffset() + 1,vba.getRGBColor(),fg);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void computeColors(SootAttributesHandler handler,ITextViewer viewer,IEditorPart editorPart){
  setViewer(viewer);
  setEditorPart(editorPart);
  if ((handler == null) || (handler.getAttrList() == null))   return;
  Iterator it=handler.getAttrList().iterator();
  TextPresentation tp=new TextPresentation();
  Display display=getEditorPart().getSite().getShell().getDisplay();
  display.asyncExec(new Runnable(){
    public void run(){
      Color bgColor=getViewer().getTextWidget().getBackground();
      setBgColor(bgColor);
    }
  }
);
  while (it.hasNext()) {
    SootAttribute sa=(SootAttribute)it.next();
    if ((sa.getRed() == 0) && (sa.getGreen() == 0) && (sa.getBlue() == 0)) {
    }
 else {
      boolean fg=false;
      if (sa.getFg() == 1) {
        fg=true;
      }
      setAttributeTextColor(tp,sa.getJavaStartLn(),sa.getJavaEndLn(),sa.getJavaOffsetStart() + 1,sa.getJavaOffsetEnd() + 1,sa.getRGBColor(),fg);
    }
    if (sa.getValueAttrs() != null) {
      Iterator valIt=sa.getValueAttrs().iterator();
      while (valIt.hasNext()) {
        PosColAttribute vba=(PosColAttribute)valIt.next();
        if ((vba.getRed() == 0) && (vba.getGreen() == 0) && (vba.getBlue() == 0)) {
        }
 else {
          boolean fg=false;
          if (vba.getFg() == 1) {
            fg=true;
          }
          setAttributeTextColor(tp,sa.getJavaStartLn(),sa.getJavaEndLn(),vba.getSourceStartOffset() + 1,vba.getSourceEndOffset() + 1,vba.getRGBColor(),fg);
        }
      }
    }
  }
}
Program: 88755
Project: 88755
Buggy source:
public ArrayList getMarkerLinks(){
  SootAttributesHandler handler=SootPlugin.getDefault().getManager().getAttributesHandlerForFile((IFile)getResource(getEditor()));
  if (handler == null)   System.out.println("String_Node_Str");
  ArrayList links=handler.getJavaLinks(getLineNumber() + 1);
  return links;
}

Fixed version (ground truth):
public ArrayList getMarkerLinks(){
  SootAttributesHandler handler=SootPlugin.getDefault().getManager().getAttributesHandlerForFile((IFile)getResource(getEditor()));
  if (handler == null)   System.out.println("String_Node_Str");
  ArrayList links=handler.getJavaLinks(getLineNumber() + 1);
  Iterator it=links.iterator();
  while (it.hasNext()) {
    System.out.println("String_Node_Str" + (getLineNumber() + 1) + "String_Node_Str"+ it.next());
  }
  return links;
}
Program: 88756
Project: 88756
Buggy source:
public void findClass(String className){
  setLinkToEditor(getEditor());
  String resource=removeExt(getResource(getEditor()).getName());
  String ext=getResource(getEditor()).getFileExtension();
  IProject proj=getResource(getEditor()).getProject();
  System.out.println("String_Node_Str" + proj);
  String slashedClassName=className.replaceAll("String_Node_Str",System.getProperty("String_Node_Str"));
  String classNameToFind=slashedClassName + "String_Node_Str" + ext;
  IJavaProject jProj=JavaCore.create(proj);
  try {
    IPackageFragmentRoot[] roots=jProj.getAllPackageFragmentRoots();
    for (int i=0; i < roots.length; i++) {
      System.out.println(roots[i].getResource());
      if (!(roots[i].getResource() instanceof IContainer))       continue;
      IResource fileToFind=((IContainer)roots[i].getResource()).findMember(classNameToFind);
      if (fileToFind == null)       continue;
      if (!fileToFind.equals(resource)) {
        try {
          setLinkToEditor((AbstractTextEditor)SootPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor((IFile)fileToFind));
        }
 catch (        PartInitException e) {
        }
      }
    }
  }
 catch (  JavaModelException e) {
    setLinkToEditor(getEditor());
  }
}

Fixed version (ground truth):
public abstract void findClass(String className);
Program: 88757
Project: 88757
Buggy source:
public ArrayList getJavaLinks(int lnNum){
  Iterator it=getAttrList().iterator();
  ArrayList list=new ArrayList();
  while (it.hasNext()) {
    SootAttribute sa=(SootAttribute)it.next();
    System.out.println("String_Node_Str" + lnNum);
    if (sa.attrForJavaLn(lnNum)) {
      if (sa.getAllLinkAttrs() != null) {
        list=sa.getAllLinkAttrs();
      }
    }
  }
  return list;
}

Fixed version (ground truth):
public ArrayList getJavaLinks(int lnNum){
  Iterator it=getAttrList().iterator();
  ArrayList list=new ArrayList();
  while (it.hasNext()) {
    SootAttribute sa=(SootAttribute)it.next();
    System.out.println("String_Node_Str" + lnNum);
    if (sa.attrForJavaLn(lnNum)) {
      if (sa.getAllLinkAttrs() != null) {
        list.addAll(sa.getAllLinkAttrs());
      }
      System.out.println("String_Node_Str" + list.size());
    }
  }
  return list;
}
Program: 88759
Project: 88759
Buggy source:
/** 
 * @see org.eclipse.jface.text.ITextHover#getHoverRegion(ITextViewer,int)
 */
public org.eclipse.jface.text.IRegion getHoverRegion(ITextViewer textViewer,int offset){
  try {
    setLineNum(textViewer.getDocument().getLineOfOffset(offset) + 1);
    setViewer(textViewer);
    setDocument(textViewer.getDocument());
    return textViewer.getDocument().getLineInformationOfOffset(offset);
  }
 catch (  BadLocationException e) {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.jface.text.ITextHover#getHoverRegion(ITextViewer,int)
 */
public org.eclipse.jface.text.IRegion getHoverRegion(ITextViewer textViewer,int offset){
  try {
    setLineNum(textViewer.getDocument().getLineOfOffset(offset) + 1);
    System.out.println("String_Node_Str");
    setViewer(textViewer);
    setDocument(textViewer.getDocument());
    return textViewer.getDocument().getLineInformationOfOffset(offset);
  }
 catch (  BadLocationException e) {
    return null;
  }
}
Program: 88760
Project: 88760
Buggy source:
/** 
 * Method setEditor.
 * @param ed
 */
public void setEditor(IEditorPart ed){
  editor=ed;
}

Fixed version (ground truth):
/** 
 * Method setEditor.
 * @param ed
 */
public void setEditor(IEditorPart ed){
  System.out.println("String_Node_Str");
  editor=ed;
}
Program: 88761
Project: 88761
Buggy source:
public String toString(){
  return (getOpBox().getValue()).toString() + "String_Node_Str";
}

Fixed version (ground truth):
public String toString(){
  StringBuffer b=new StringBuffer();
  if (PrecedenceTest.needsBrackets(getOpBox(),this))   b.append("String_Node_Str");
  b.append(getOpBox().getValue().toString());
  if (PrecedenceTest.needsBrackets(getOpBox(),this))   b.append("String_Node_Str");
  b.append("String_Node_Str");
  return b.toString();
}
Program: 88762
Project: 88762
Buggy source:
public static boolean needsBracketsRight(ValueBox subExprBox,Value expr){
  Value sub=subExprBox.getValue();
  if (!(sub instanceof Precedence))   return false;
  Precedence subP=(Precedence)sub;
  Precedence exprP=(Precedence)expr;
  if (subP.getPrecedence() < exprP.getPrecedence())   return true;
  if (subP.getPrecedence() == exprP.getPrecedence()) {
    if (exprP instanceof SubExpr)     return true;
    if (exprP instanceof DivExpr)     return true;
    if (exprP instanceof CmpExpr)     return true;
    if (exprP instanceof CmpgExpr)     return true;
    if (exprP instanceof CmplExpr)     return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean needsBracketsRight(ValueBox subExprBox,Value expr){
  Value sub=subExprBox.getValue();
  if (!(sub instanceof Precedence))   return false;
  Precedence subP=(Precedence)sub;
  Precedence exprP=(Precedence)expr;
  if (subP.getPrecedence() < exprP.getPrecedence())   return true;
  if (subP.getPrecedence() == exprP.getPrecedence()) {
    if (subP instanceof SubExpr)     return true;
    if (subP instanceof DivExpr)     return true;
    if (subP instanceof CmpExpr)     return true;
    if (subP instanceof CmpgExpr)     return true;
    if (subP instanceof CmplExpr)     return true;
  }
  return false;
}
Program: 88763
Project: 88763
Buggy source:
private void javafy_ref(ValueBox vb){
  Ref r=(Ref)vb.getValue();
  if (r instanceof StaticFieldRef)   vb.setValue(new DStaticFieldRef(((StaticFieldRef)r).getField(),getMethod().getDeclaringClass().getName()));
 else   if (r instanceof ArrayRef) {
    ArrayRef ar=(ArrayRef)r;
    javafy(ar.getBaseBox());
    javafy(ar.getIndexBox());
  }
 else   if (r instanceof InstanceFieldRef) {
    InstanceFieldRef ifr=(InstanceFieldRef)r;
    javafy(ifr.getBaseBox());
    vb.setValue(new DInstanceFieldRef(ifr.getBase(),ifr.getField(),thisLocals));
  }
 else   if (r instanceof ThisRef) {
    ThisRef tr=(ThisRef)r;
    vb.setValue(new DThisRef((RefType)tr.getType()));
  }
}

Fixed version (ground truth):
private void javafy_ref(ValueBox vb){
  Ref r=(Ref)vb.getValue();
  if (r instanceof StaticFieldRef) {
    SootField field=((StaticFieldRef)r).getField();
    addPackage(field.getDeclaringClass().getJavaPackageName());
    vb.setValue(new DStaticFieldRef(field,getMethod().getDeclaringClass().getName()));
  }
 else   if (r instanceof ArrayRef) {
    ArrayRef ar=(ArrayRef)r;
    javafy(ar.getBaseBox());
    javafy(ar.getIndexBox());
  }
 else   if (r instanceof InstanceFieldRef) {
    InstanceFieldRef ifr=(InstanceFieldRef)r;
    javafy(ifr.getBaseBox());
    vb.setValue(new DInstanceFieldRef(ifr.getBase(),ifr.getField(),thisLocals));
  }
 else   if (r instanceof ThisRef) {
    ThisRef tr=(ThisRef)r;
    vb.setValue(new DThisRef((RefType)tr.getType()));
  }
}
Program: 88765
Project: 88765
Buggy source:
/** 
 * Draws a node.
 * @param name, the node to draw.
 * @return the {@link DotGraphNode} corresponding to the specified name.
 */
public DotGraphNode drawNode(String name){
  DotGraphNode node=(DotGraphNode)nodes.get(name);
  if (node == null) {
    node=new DotGraphNode(name);
    nodes.put(name,node);
    this.drawElements.add(node);
  }
  return node;
}

Fixed version (ground truth):
/** 
 * Draws a node.
 * @param name, the node to draw.
 * @return the {@link DotGraphNode} corresponding to the specified name.
 */
public DotGraphNode drawNode(String name){
  DotGraphNode node=getNode(name);
  if (node == null)   throw new RuntimeException("String_Node_Str");
  if (!this.drawElements.contains(node))   this.drawElements.add(node);
  return node;
}
Program: 88766
Project: 88766
Buggy source:
/** 
 * Gets the graph node by name.
 * @param name, unique name of the node.
 * @return the node with the specified name, or <code>null</code>if there is no such node.
 */
public DotGraphNode getNode(String name){
  return (DotGraphNode)nodes.get(name);
}

Fixed version (ground truth):
/** 
 * Gets the graph node by name.
 * @param name, unique name of the node.
 * @return the node with the specified name, or <code>null</code>if there is no such node.
 */
public DotGraphNode getNode(String name){
  DotGraphNode node=(DotGraphNode)nodes.get(name);
  if (node == null) {
    node=new DotGraphNode(name);
    nodes.put(name,node);
  }
  return node;
}
Program: 88767
Project: 88767
Buggy source:
final public void caseNewMultiArrayExpr(NewMultiArrayExpr nmae){
  ArrayType type=(ArrayType)nmae.getType();
  AllocNode prevAn=pag.makeAllocNode(new Pair(nmae,new Integer(type.numDimensions)),type,currentMethod);
  VarNode prevVn=pag.makeVarNode(prevAn,prevAn.getType(),currentMethod);
  setResult(prevAn);
  while (true) {
    Type t=type.getElementType();
    if (!(t instanceof ArrayType))     break;
    type=(ArrayType)t;
    AllocNode an=pag.makeAllocNode(new Pair(nmae,new Integer(type.numDimensions)),type,currentMethod);
    VarNode vn=pag.makeVarNode(an,an.getType(),currentMethod);
    addEdge(an,vn);
    addEdge(vn,pag.makeFieldRefNode(prevVn,ArrayElement.v()));
    prevAn=an;
    prevVn=vn;
  }
}

Fixed version (ground truth):
final public void caseNewMultiArrayExpr(NewMultiArrayExpr nmae){
  ArrayType type=(ArrayType)nmae.getType();
  AllocNode prevAn=pag.makeAllocNode(new Pair(nmae,new Integer(type.numDimensions)),type,currentMethod);
  VarNode prevVn=pag.makeVarNode(prevAn,prevAn.getType(),currentMethod);
  addEdge(prevAn,prevVn);
  setResult(prevAn);
  while (true) {
    Type t=type.getElementType();
    if (!(t instanceof ArrayType))     break;
    type=(ArrayType)t;
    AllocNode an=pag.makeAllocNode(new Pair(nmae,new Integer(type.numDimensions)),type,currentMethod);
    VarNode vn=pag.makeVarNode(an,an.getType(),currentMethod);
    addEdge(an,vn);
    addEdge(vn,pag.makeFieldRefNode(prevVn,ArrayElement.v()));
    prevAn=an;
    prevVn=vn;
  }
}
Program: 88768
Project: 88768
Buggy source:
public boolean passesParameters(){
  return isExplicit() || kind == THREAD || kind == EXIT || kind == FINALIZE || kind == PRIVILEGED;
}

Fixed version (ground truth):
public boolean passesParameters(){
  return isExplicit() || kind == THREAD || kind == EXIT || kind == FINALIZE || kind == PRIVILEGED || kind == NEWINSTANCE;
}
Program: 88769
Project: 88769
Buggy source:
private void initPaths(){
  sootClasspath.initialize();
  platform_location=Platform.getLocation().toOSString();
  external_jars_location=Platform.getLocation().removeLastSegments(2).toOSString();
  setOutputLocation(platform_location + getFileHandler().getSootOutputFolder().getFullPath().toOSString());
}

Fixed version (ground truth):
private void initPaths(){
  sootClasspath.initialize();
  platform_location=getSootSelection().getJavaProject().getProject().getLocation().toOSString();
  System.out.println("String_Node_Str" + platform_location);
  platform_location=platform_location.substring(0,platform_location.lastIndexOf(System.getProperty("String_Node_Str")));
  System.out.println("String_Node_Str" + platform_location);
  external_jars_location=Platform.getLocation().removeLastSegments(2).toOSString();
  setOutputLocation(platform_location + getFileHandler().getSootOutputFolder().getFullPath().toOSString());
}
Program: 88771
Project: 88771
Buggy source:
public int length(){
  int i;
  for (i=bits.length - 1; i >= 0; i++) {
    if (bits[i] != 0L)     break;
  }
  if (i < 0)   return 0;
  long j=bits[i];
  i++;
  i<<=6;
  for (long k=1L << 63; (k & j) == 0L; k>>=1, i--)   ;
  return i;
}

Fixed version (ground truth):
public int length(){
  int i;
  for (i=bits.length - 1; i >= 0; i--) {
    if (bits[i] != 0L)     break;
  }
  if (i < 0)   return 0;
  long j=bits[i];
  i++;
  i<<=6;
  for (long k=1L << 63; (k & j) == 0L; k>>=1, i--)   ;
  return i;
}
Program: 88772
Project: 88772
Buggy source:
public boolean equals(Object o){
  if (!(o instanceof BitVector))   return false;
  BitVector other=(BitVector)o;
  int min=bits.length;
  long[] longer=other.bits;
  if (other.bits.length < min) {
    min=other.bits.length;
    longer=bits;
  }
  int i;
  for (i=0; i < min; i++) {
    if (bits[i] != other.bits[i])     return false;
  }
  for (; i < longer.length; i++) {
    if (bits[i] != 0L)     return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean equals(Object o){
  if (!(o instanceof BitVector))   return false;
  BitVector other=(BitVector)o;
  int min=bits.length;
  long[] longer=other.bits;
  if (other.bits.length < min) {
    min=other.bits.length;
    longer=bits;
  }
  int i;
  for (i=0; i < min; i++) {
    if (bits[i] != other.bits[i])     return false;
  }
  for (; i < longer.length; i++) {
    if (longer[i] != 0L)     return false;
  }
  return true;
}
Program: 88773
Project: 88773
Buggy source:
public String toString(){
  StringBuffer ret=new StringBuffer();
  ret.append('{');
  boolean start=false;
  BitSetIterator it=new BitSetIterator(bits);
  while (it.hasNext()) {
    int bit=it.next();
    if (!start)     ret.append("String_Node_Str");
    start=false;
    ret.append(bit);
  }
  ret.append('}');
  return ret.toString();
}

Fixed version (ground truth):
public String toString(){
  StringBuffer ret=new StringBuffer();
  ret.append('{');
  boolean start=true;
  BitSetIterator it=new BitSetIterator(bits);
  while (it.hasNext()) {
    int bit=it.next();
    if (!start)     ret.append("String_Node_Str");
    start=false;
    ret.append(bit);
  }
  ret.append('}');
  return ret.toString();
}
Program: 88779
Project: 88779
Buggy source:
public Object next(){
  return next;
}

Fixed version (ground truth):
public Object next(){
  Object ret=next;
  advance();
  return ret;
}
Program: 88782
Project: 88782
Buggy source:
/** 
 * Prints out the method corresponding to b Body, (declaration and body), in the textual format corresponding to the IR used to encode b body.
 * @param out a PrintWriter instance to print to.
 */
private void printTo(Body b,PrintWriter out){
  b.validate();
  String decl=b.getMethod().getDeclaration();
{
    out.println("String_Node_Str" + decl);
    for (Iterator tIt=b.getMethod().getTags().iterator(); tIt.hasNext(); ) {
      final Tag t=(Tag)tIt.next();
      out.println(t);
    }
    out.println("String_Node_Str");
    printLocalsInBody(b,out);
  }
  printStatementsInBody(b,out);
  out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Prints out the method corresponding to b Body, (declaration and body), in the textual format corresponding to the IR used to encode b body.
 * @param out a PrintWriter instance to print to.
 */
private void printTo(Body b,PrintWriter out){
  b.validate();
  String decl=b.getMethod().getDavaDeclaration();
{
    out.println("String_Node_Str" + decl);
    for (Iterator tIt=b.getMethod().getTags().iterator(); tIt.hasNext(); ) {
      final Tag t=(Tag)tIt.next();
      out.println(t);
    }
    out.println("String_Node_Str");
    printLocalsInBody(b,out);
  }
  printStatementsInBody(b,out);
  out.println("String_Node_Str");
}