nus-yam/ex-repair huggingface dataset:
Program: 61892
Project: 61892
Buggy source:
protected void finalizePath(){
  final int maxRepeat=10;
  if (path != null) {
    if (fillPaint != null) {
      if (fillPaint instanceof MultipleGradientPaint) {
        AffineTransform oldAf=graphics.getTransform();
        if (fillPathPaint != null) {
          graphics.setPaint(fillPathPaint);
        }
        graphics.fill(path);
        graphics.setClip(path);
        graphics.setTransform(fillTransform);
        graphics.setPaint(fillPaint);
        graphics.fill(new java.awt.Rectangle(-16384 * maxRepeat,-16384 * maxRepeat,16384 * 2 * maxRepeat,16384 * 2 * maxRepeat));
        graphics.setTransform(oldAf);
        graphics.setClip(null);
      }
 else       if (fillPaint instanceof TexturePaint) {
        AffineTransform oldAf=graphics.getTransform();
        graphics.setClip(path);
        graphics.setTransform(fillTransform);
        graphics.setPaint(fillPaint);
        graphics.fill(new java.awt.Rectangle(-16384 * maxRepeat,-16384 * maxRepeat,16384 * 2 * maxRepeat,16384 * 2 * maxRepeat));
        graphics.setTransform(oldAf);
        graphics.setClip(null);
      }
 else {
        graphics.setPaint(fillPaint);
        graphics.fill(path);
      }
    }
    if (lineColor != null) {
      graphics.setColor(lineColor);
      graphics.setStroke(lineStroke == null ? defaultStroke : lineStroke);
      graphics.draw(path);
    }
  }
  path=new GeneralPath();
}

Fixed version (ground truth):
protected void finalizePath(){
  final int maxRepeat=10;
  if (path != null) {
    if (fillPaint != null) {
      if (fillPaint instanceof MultipleGradientPaint) {
        AffineTransform oldAf=graphics.getTransform();
        if (fillPathPaint != null) {
          graphics.setPaint(fillPathPaint);
        }
        graphics.fill(path);
        graphics.setClip(path);
        graphics.setTransform(fillTransform);
        graphics.setPaint(fillPaint);
        graphics.fill(new java.awt.Rectangle(-16384 * maxRepeat,-16384 * maxRepeat,16384 * 2 * maxRepeat,16384 * 2 * maxRepeat));
        graphics.setTransform(oldAf);
        graphics.setClip(null);
      }
 else       if (fillPaint instanceof TexturePaint) {
        AffineTransform oldAf=graphics.getTransform();
        graphics.setClip(path);
        graphics.setTransform(fillTransform);
        graphics.setPaint(fillPaint);
        graphics.fill(new java.awt.Rectangle(-16384 * maxRepeat,-16384 * maxRepeat,16384 * 2 * maxRepeat,16384 * 2 * maxRepeat));
        graphics.setTransform(oldAf);
        graphics.setClip(null);
      }
 else {
        graphics.setPaint(fillPaint);
        graphics.fill(path);
      }
    }
    if (lineColor != null) {
      graphics.setColor(lineColor);
      graphics.setStroke(lineStroke == null ? defaultStroke : lineStroke);
      graphics.draw(path);
    }
  }
  path=new GeneralPath();
  lineStroke=null;
  lineColor=null;
  fillPaint=null;
}
Program: 61893
Project: 61893
Buggy source:
@Override public void beginBitmapFill(int bitmapId,Matrix matrix,boolean repeat,boolean smooth){
  finalizePath();
  ImageTag image=null;
  for (  Tag t : swf.tags) {
    if (t instanceof ImageTag) {
      ImageTag i=(ImageTag)t;
      if (i.getCharacterId() == bitmapId) {
        image=i;
        break;
      }
    }
  }
  if (image != null) {
    BufferedImage img=image.getImage(swf.tags);
    if (img != null) {
      fillPaint=new TexturePaint(img,new java.awt.Rectangle(img.getWidth(),img.getHeight()));
      matrix.translateX-=xMin;
      matrix.translateY-=yMin;
      fillTransform=matrixToTransform(matrix);
    }
  }
}

Fixed version (ground truth):
@Override public void beginBitmapFill(int bitmapId,Matrix matrix,boolean repeat,boolean smooth){
  finalizePath();
  ImageTag image=null;
  for (  Tag t : swf.tags) {
    if (t instanceof ImageTag) {
      ImageTag i=(ImageTag)t;
      if (i.getCharacterId() == bitmapId) {
        image=i;
        break;
      }
    }
  }
  if (image != null) {
    SerializableImage img=image.getImage(swf.tags);
    if (img != null) {
      fillPaint=new TexturePaint(img.getBufferedImage(),new java.awt.Rectangle(img.getWidth(),img.getHeight()));
      matrix.translateX-=deltaX;
      matrix.translateY-=deltaY;
      fillTransform=matrix.toTransform();
    }
  }
}
Program: 61894
Project: 61894
Buggy source:
@Override public void curveTo(double controlX,double controlY,double anchorX,double anchorY){
  path.quadTo(controlX - xMin,controlY - yMin,anchorX - xMin,anchorY - yMin);
}

Fixed version (ground truth):
@Override public void curveTo(double controlX,double controlY,double anchorX,double anchorY){
  path.quadTo(controlX - deltaX,controlY - deltaY,anchorX - deltaX,anchorY - deltaY);
}
Program: 61896
Project: 61896
Buggy source:
@Override public void lineTo(double x,double y){
  path.lineTo(x - xMin,y - yMin);
}

Fixed version (ground truth):
@Override public void lineTo(double x,double y){
  path.lineTo(x - deltaX,y - deltaY);
}
Program: 61898
Project: 61898
Buggy source:
public BufferedImage getImage(){
  return image;
}

Fixed version (ground truth):
public SerializableImage getImage(){
  return image;
}
Program: 61899
Project: 61899
Buggy source:
@Override public void moveTo(double x,double y){
  path.moveTo(x - xMin,y - yMin);
}

Fixed version (ground truth):
@Override public void moveTo(double x,double y){
  path.moveTo(x - deltaX,y - deltaY);
}
Program: 61904
Project: 61904
Buggy source:
public void setScript(ScriptPack scriptLeaf,List<ABCContainerTag> abcList){
  abcPanel.scriptNameLabel.setText(scriptLeaf.getPath().toString());
  int scriptIndex=scriptLeaf.scriptIndex;
  ScriptInfo script=null;
  ABC abc=scriptLeaf.abc;
  if (scriptIndex > -1) {
    script=abc.script_info[scriptIndex];
  }
  if (script == null) {
    highlights=new ArrayList<>();
    specialHighlights=new ArrayList<>();
    traitHighlights=new ArrayList<>();
    methodHighlights=new ArrayList<>();
    this.script=scriptLeaf;
    return;
  }
  setText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str");
  this.abc=abc;
  this.abcList=abcList;
  this.script=scriptLeaf;
  CachedDecompilation cd=null;
  try {
    cacheScriptPack(scriptLeaf,abcList);
    cd=getCached(scriptLeaf);
  }
 catch (  InterruptedException ex) {
  }
  if (cd != null) {
    final String hilightedCode=cd.text;
    highlights=cd.getInstructionHighlights();
    specialHighlights=cd.getSpecialHighligths();
    traitHighlights=cd.getTraitHighlights();
    methodHighlights=cd.getMethodHighlights();
    classHighlights=cd.getClassHighlights();
    if (hilightedCode.length() > 1024 * 1024 * 2) {
      setContentType("String_Node_Str");
    }
 else {
      setContentType("String_Node_Str");
    }
    setText(hilightedCode);
  }
}

Fixed version (ground truth):
public void setScript(ScriptPack scriptLeaf,List<ABCContainerTag> abcList){
  abcPanel.scriptNameLabel.setText(scriptLeaf.getPath().toString());
  int scriptIndex=scriptLeaf.scriptIndex;
  ScriptInfo script=null;
  ABC abc=scriptLeaf.abc;
  if (scriptIndex > -1) {
    script=abc.script_info[scriptIndex];
  }
  if (script == null) {
    highlights=new ArrayList<>();
    specialHighlights=new ArrayList<>();
    traitHighlights=new ArrayList<>();
    methodHighlights=new ArrayList<>();
    this.script=scriptLeaf;
    return;
  }
  setText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str");
  this.abc=abc;
  this.abcList=abcList;
  this.script=scriptLeaf;
  CachedDecompilation cd=null;
  try {
    cacheScriptPack(scriptLeaf,abcList);
    cd=getCached(scriptLeaf);
  }
 catch (  InterruptedException ex) {
  }
  if (cd != null) {
    final String hilightedCode=cd.text;
    highlights=cd.getInstructionHighlights();
    specialHighlights=cd.getSpecialHighligths();
    traitHighlights=cd.getTraitHighlights();
    methodHighlights=cd.getMethodHighlights();
    classHighlights=cd.getClassHighlights();
    setContentType("String_Node_Str");
    setText(hilightedCode);
  }
}
Program: 61905
Project: 61905
Buggy source:
@Override public void setText(String t){
  lastLine=-1;
  super.setText(t);
}

Fixed version (ground truth):
@Override public void setText(String t,String contentType){
  lastLine=-1;
  super.setText(t,contentType);
}
Program: 61906
Project: 61906
Buggy source:
@Override public void setText(String t){
  super.setText(t);
  clearUndos();
}

Fixed version (ground truth):
public void setText(String t,String contentType){
  if (getText() != t) {
    super.setText(null);
    if (t.length() > Configuration.syntaxHighlightLimit.get()) {
      setContentType("String_Node_Str");
    }
 else {
      if (!getContentType().equals(contentType)) {
        setContentType(contentType);
      }
    }
    super.setText(t);
    clearUndos();
  }
}
Program: 61908
Project: 61908
Buggy source:
public void setEditMode(boolean val){
  boolean rawEdit=hexOnlyButton.isSelected();
  if (val) {
    if (rawEdit) {
      editor.setContentType("String_Node_Str");
      setText(srcHexOnly);
    }
 else {
      editor.setContentType("String_Node_Str");
      setText(srcNoHex);
    }
    editor.setEditable(true);
    saveButton.setVisible(true);
    editButton.setVisible(false);
    cancelButton.setVisible(true);
    editor.getCaret().setVisible(true);
    asmLabel.setIcon(View.getIcon("String_Node_Str"));
  }
 else {
    setHex(getExportMode());
    editor.setEditable(false);
    saveButton.setVisible(false);
    editButton.setVisible(true);
    cancelButton.setVisible(false);
    editor.getCaret().setVisible(true);
    asmLabel.setIcon(null);
  }
  topButtonsPan.setVisible(!val);
  editMode=val;
  editor.requestFocusInWindow();
}

Fixed version (ground truth):
public void setEditMode(boolean val){
  boolean rawEdit=hexOnlyButton.isSelected();
  if (val) {
    if (rawEdit) {
      setText(srcHexOnly,"String_Node_Str");
    }
 else {
      setText(srcNoHex,"String_Node_Str");
    }
    editor.setEditable(true);
    saveButton.setVisible(true);
    editButton.setVisible(false);
    cancelButton.setVisible(true);
    editor.getCaret().setVisible(true);
    asmLabel.setIcon(View.getIcon("String_Node_Str"));
  }
 else {
    setHex(getExportMode());
    editor.setEditable(false);
    saveButton.setVisible(false);
    editButton.setVisible(true);
    cancelButton.setVisible(false);
    editor.getCaret().setVisible(true);
    asmLabel.setIcon(null);
  }
  topButtonsPan.setVisible(!val);
  editMode=val;
  editor.requestFocusInWindow();
}
Program: 61909
Project: 61909
Buggy source:
@Override protected Void doInBackground() throws Exception {
  editor.setText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str");
  if (Configuration.decompile.get()) {
    decompiledEditor.setText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str");
  }
  DisassemblyListener listener=getDisassemblyListener();
  asm.addDisassemblyListener(listener);
  List<Action> actions=asm.getActions(SWF.DEFAULT_VERSION);
  lastCode=actions;
  asm.removeDisassemblyListener(listener);
  srcWithHex=null;
  srcNoHex=null;
  srcHexOnly=null;
  setHex(getExportMode());
  if (Configuration.decompile.get()) {
    decompiledEditor.setText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str");
    if (!useCache) {
      uncache(asm);
    }
    cacheScript(asm,actions);
    CachedScript sc=getCached(asm);
    decompiledHilights=sc.hilights;
    lastDecompiled=sc.text;
    lastASM=asm;
    decompiledEditor.setText(lastDecompiled);
  }
  setEditMode(false);
  setDecompiledEditMode(false);
  return null;
}

Fixed version (ground truth):
@Override protected Void doInBackground() throws Exception {
  setEditorText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str","String_Node_Str");
  if (Configuration.decompile.get()) {
    setDecompiledText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str");
  }
  DisassemblyListener listener=getDisassemblyListener();
  asm.addDisassemblyListener(listener);
  List<Action> actions=asm.getActions(SWF.DEFAULT_VERSION);
  lastCode=actions;
  asm.removeDisassemblyListener(listener);
  srcWithHex=null;
  srcNoHex=null;
  srcHexOnly=null;
  setHex(getExportMode());
  if (Configuration.decompile.get()) {
    setDecompiledText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str");
    if (!useCache) {
      uncache(asm);
    }
    cacheScript(asm,actions);
    CachedScript sc=getCached(asm);
    decompiledHilights=sc.hilights;
    lastDecompiled=sc.text;
    lastASM=asm;
    setDecompiledText(lastDecompiled);
  }
  setEditMode(false);
  setDecompiledEditMode(false);
  return null;
}
Program: 61910
Project: 61910
Buggy source:
public void setHex(ExportMode exportMode){
  if (exportMode != ExportMode.HEX) {
    editor.setContentType("String_Node_Str");
    if (exportMode == ExportMode.PCODE) {
      if (srcNoHex == null) {
        srcNoHex=getHilightedText(exportMode);
      }
      setText(srcNoHex);
    }
 else {
      if (srcWithHex == null) {
        srcWithHex=getHilightedText(exportMode);
      }
      setText(srcWithHex);
    }
  }
 else {
    editor.setContentType("String_Node_Str");
    if (srcHexOnly == null) {
      HilightedTextWriter writer=new HilightedTextWriter(true);
      Helper.byteArrayToHexWithHeader(writer,src.getActionBytes());
      srcHexOnly=new HilightedText(writer);
    }
    setText(srcHexOnly);
  }
}

Fixed version (ground truth):
public void setHex(ExportMode exportMode){
  if (exportMode != ExportMode.HEX) {
    if (exportMode == ExportMode.PCODE) {
      if (srcNoHex == null) {
        srcNoHex=getHilightedText(exportMode);
      }
      setText(srcNoHex,"String_Node_Str");
    }
 else {
      if (srcWithHex == null) {
        srcWithHex=getHilightedText(exportMode);
      }
      setText(srcWithHex,"String_Node_Str");
    }
  }
 else {
    if (srcHexOnly == null) {
      HilightedTextWriter writer=new HilightedTextWriter(true);
      Helper.byteArrayToHexWithHeader(writer,src.getActionBytes());
      srcHexOnly=new HilightedText(writer);
    }
    setText(srcHexOnly,"String_Node_Str");
  }
}
Program: 61911
Project: 61911
Buggy source:
@Override protected void done(){
  setSourceWorker=null;
  Main.stopWork();
  View.execInEventDispatch(new Runnable(){
    @Override public void run(){
      try {
        get();
      }
 catch (      CancellationException ex) {
        editor.setText("String_Node_Str" + AppStrings.translate("String_Node_Str"));
      }
catch (      Exception ex) {
        decompiledEditor.setText("String_Node_Str" + ex);
      }
    }
  }
);
}

Fixed version (ground truth):
@Override protected void done(){
  setSourceWorker=null;
  Main.stopWork();
  View.execInEventDispatch(new Runnable(){
    @Override public void run(){
      try {
        get();
      }
 catch (      CancellationException ex) {
        setEditorText("String_Node_Str" + AppStrings.translate("String_Node_Str"),"String_Node_Str");
      }
catch (      Exception ex) {
        setDecompiledText("String_Node_Str" + ex);
      }
    }
  }
);
}
Program: 61912
Project: 61912
Buggy source:
private DisassemblyListener getDisassemblyListener(){
  DisassemblyListener listener=new DisassemblyListener(){
    int percent=0;
    String phase="String_Node_Str";
    @Override public void progress(    String phase,    long pos,    long total){
      if (total < 1) {
        return;
      }
      int newpercent=(int)(pos * 100 / total);
      if (((newpercent > percent) || (!this.phase.equals(phase))) && newpercent <= 100) {
        percent=newpercent;
        this.phase=phase;
        editor.setText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str"+ phase+ "String_Node_Str"+ percent+ "String_Node_Str");
      }
    }
  }
;
  return listener;
}

Fixed version (ground truth):
private DisassemblyListener getDisassemblyListener(){
  DisassemblyListener listener=new DisassemblyListener(){
    int percent=0;
    String phase="String_Node_Str";
    @Override public void progress(    String phase,    long pos,    long total){
      if (total < 1) {
        return;
      }
      int newpercent=(int)(pos * 100 / total);
      if (((newpercent > percent) || (!this.phase.equals(phase))) && newpercent <= 100) {
        percent=newpercent;
        this.phase=phase;
        setEditorText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str"+ phase+ "String_Node_Str"+ percent+ "String_Node_Str","String_Node_Str");
      }
    }
  }
;
  return listener;
}
Program: 61913
Project: 61913
Buggy source:
@Override public void progress(String phase,long pos,long total){
  if (total < 1) {
    return;
  }
  int newpercent=(int)(pos * 100 / total);
  if (((newpercent > percent) || (!this.phase.equals(phase))) && newpercent <= 100) {
    percent=newpercent;
    this.phase=phase;
    editor.setText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str"+ phase+ "String_Node_Str"+ percent+ "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void progress(String phase,long pos,long total){
  if (total < 1) {
    return;
  }
  int newpercent=(int)(pos * 100 / total);
  if (((newpercent > percent) || (!this.phase.equals(phase))) && newpercent <= 100) {
    percent=newpercent;
    this.phase=phase;
    setEditorText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str"+ phase+ "String_Node_Str"+ percent+ "String_Node_Str","String_Node_Str");
  }
}
Program: 61914
Project: 61914
Buggy source:
public void setDecompiledEditMode(boolean val){
  if (lastASM == null) {
    return;
  }
  int lastLine=decompiledEditor.getLine();
  int prefLines=lastASM.getPrefixLineCount();
  if (val) {
    String newText=lastASM.removePrefixAndSuffix(lastDecompiled);
    decompiledEditor.setText(newText);
    if (lastLine > -1) {
      if (lastLine - prefLines >= 0) {
        decompiledEditor.gotoLine(lastLine - prefLines + 1);
      }
    }
    decompiledEditor.setEditable(true);
    saveDecompiledButton.setVisible(true);
    editDecompiledButton.setVisible(false);
    experimentalLabel.setVisible(false);
    cancelDecompiledButton.setVisible(true);
    decompiledEditor.getCaret().setVisible(true);
    decLabel.setIcon(View.getIcon("String_Node_Str"));
  }
 else {
    String newText=lastDecompiled;
    decompiledEditor.setText(newText);
    if (lastLine > -1) {
      decompiledEditor.gotoLine(lastLine + prefLines + 1);
    }
    decompiledEditor.setEditable(false);
    saveDecompiledButton.setVisible(false);
    editDecompiledButton.setVisible(true);
    experimentalLabel.setVisible(true);
    cancelDecompiledButton.setVisible(false);
    decompiledEditor.getCaret().setVisible(true);
    decLabel.setIcon(null);
  }
  editDecompiledMode=val;
  decompiledEditor.requestFocusInWindow();
}

Fixed version (ground truth):
public void setDecompiledEditMode(boolean val){
  if (lastASM == null) {
    return;
  }
  int lastLine=decompiledEditor.getLine();
  int prefLines=lastASM.getPrefixLineCount();
  if (val) {
    String newText=lastASM.removePrefixAndSuffix(lastDecompiled);
    setDecompiledText(newText);
    if (lastLine > -1) {
      if (lastLine - prefLines >= 0) {
        decompiledEditor.gotoLine(lastLine - prefLines + 1);
      }
    }
    decompiledEditor.setEditable(true);
    saveDecompiledButton.setVisible(true);
    editDecompiledButton.setVisible(false);
    experimentalLabel.setVisible(false);
    cancelDecompiledButton.setVisible(true);
    decompiledEditor.getCaret().setVisible(true);
    decLabel.setIcon(View.getIcon("String_Node_Str"));
  }
 else {
    String newText=lastDecompiled;
    setDecompiledText(newText);
    if (lastLine > -1) {
      decompiledEditor.gotoLine(lastLine + prefLines + 1);
    }
    decompiledEditor.setEditable(false);
    saveDecompiledButton.setVisible(false);
    editDecompiledButton.setVisible(true);
    experimentalLabel.setVisible(true);
    cancelDecompiledButton.setVisible(false);
    decompiledEditor.getCaret().setVisible(true);
    decLabel.setIcon(null);
  }
  editDecompiledMode=val;
  decompiledEditor.requestFocusInWindow();
}
Program: 61916
Project: 61916
Buggy source:
public void setText(HilightedText text){
  int pos=editor.getCaretPosition();
  Highlighting lastH=null;
  for (  Highlighting h : disassembledHilights) {
    if (pos < h.startPos) {
      break;
    }
    lastH=h;
  }
  String offset=lastH == null ? "String_Node_Str" : lastH.getPropertyString("String_Node_Str");
  editor.setText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str");
  disassembledHilights=text.instructionHilights;
  String stripped=text.text;
  editor.setText(stripped);
  Highlighting h=Highlighting.search(disassembledHilights,"String_Node_Str",offset);
  if (h != null) {
    if (h.startPos <= editor.getText().length()) {
      editor.setCaretPosition(h.startPos);
    }
  }
}

Fixed version (ground truth):
private void setText(HilightedText text,String contentType){
  int pos=editor.getCaretPosition();
  Highlighting lastH=null;
  for (  Highlighting h : disassembledHilights) {
    if (pos < h.startPos) {
      break;
    }
    lastH=h;
  }
  String offset=lastH == null ? "String_Node_Str" : lastH.getPropertyString("String_Node_Str");
  disassembledHilights=text.instructionHilights;
  String stripped=text.text;
  setEditorText(stripped,contentType);
  Highlighting h=Highlighting.search(disassembledHilights,"String_Node_Str",offset);
  if (h != null) {
    if (h.startPos <= editor.getText().length()) {
      editor.setCaretPosition(h.startPos);
    }
  }
}
Program: 61920
Project: 61920
Buggy source:
private static void offerAssociation(){
  boolean offered=Configuration.offeredAssociation.get();
  if (!offered) {
    if (Platform.isWindows()) {
      if ((!ContextMenuTools.isAddedToContextMenu()) && View.showConfirmDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
        ContextMenuTools.addToContextMenu(true);
      }
    }
  }
  Configuration.offeredAssociation.set(true);
}

Fixed version (ground truth):
private static void offerAssociation(){
  boolean offered=Configuration.offeredAssociation.get();
  if (!offered) {
    if (Platform.isWindows()) {
      if ((!ContextMenuTools.isAddedToContextMenu()) && View.showConfirmDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
        ContextMenuTools.addToContextMenu(true,false);
      }
    }
  }
  Configuration.offeredAssociation.set(true);
}
Program: 61924
Project: 61924
Buggy source:
public void restoreControlFlow(final boolean all){
  Main.startWork(translate("String_Node_Str"));
  if ((!all) || confirmExperimental()) {
    new CancellableWorker(){
      @Override protected Object doInBackground() throws Exception {
        int cnt=0;
        if (all) {
          for (          ABCContainerTag tag : abcPanel.list) {
            tag.getABC().restoreControlFlow();
          }
        }
 else {
          int bi=abcPanel.detailPanel.methodTraitPanel.methodCodePanel.getBodyIndex();
          if (bi != -1) {
            abcPanel.abc.bodies[bi].restoreControlFlow(abcPanel.abc.constants,abcPanel.decompiledTextArea.getCurrentTrait(),abcPanel.abc.method_info[abcPanel.abc.bodies[bi].method_info]);
          }
          abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setBodyIndex(bi,abcPanel.abc,abcPanel.decompiledTextArea.getCurrentTrait());
        }
        return true;
      }
      @Override protected void done(){
        Main.stopWork();
        View.showMessageDialog(null,translate("String_Node_Str"));
        View.execInEventDispatch(new Runnable(){
          @Override public void run(){
            abcPanel.reload();
            updateClassesList();
          }
        }
);
      }
    }
.execute();
  }
}

Fixed version (ground truth):
public void restoreControlFlow(final boolean all){
  Main.startWork(translate("String_Node_Str"));
  if ((!all) || confirmExperimental()) {
    new CancellableWorker(){
      @Override protected Object doInBackground() throws Exception {
        int cnt=0;
        if (all) {
          for (          ABCContainerTag tag : abcPanel.swf.abcList) {
            tag.getABC().restoreControlFlow();
          }
        }
 else {
          int bi=abcPanel.detailPanel.methodTraitPanel.methodCodePanel.getBodyIndex();
          if (bi != -1) {
            abcPanel.abc.bodies[bi].restoreControlFlow(abcPanel.abc.constants,abcPanel.decompiledTextArea.getCurrentTrait(),abcPanel.abc.method_info[abcPanel.abc.bodies[bi].method_info]);
          }
          abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setBodyIndex(bi,abcPanel.abc,abcPanel.decompiledTextArea.getCurrentTrait());
        }
        return true;
      }
      @Override protected void done(){
        Main.stopWork();
        View.showMessageDialog(null,translate("String_Node_Str"));
        View.execInEventDispatch(new Runnable(){
          @Override public void run(){
            abcPanel.reload();
            updateClassesList();
          }
        }
);
      }
    }
.execute();
  }
}
Program: 61926
Project: 61926
Buggy source:
@Override public void setVisible(boolean b){
  super.setVisible(b);
  if (b) {
    if (abcPanel != null) {
      abcPanel.initSplits();
    }
    if (actionPanel != null) {
      actionPanel.initSplits();
    }
    final MainFramePanel t=this;
    SwingUtilities.invokeLater(new Runnable(){
      @Override public void run(){
        splitPane1.setDividerLocation(Configuration.guiSplitPane1DividerLocation.get(getWidth() / 3));
        int confDivLoc=Configuration.guiSplitPane2DividerLocation.get(splitPane2.getHeight() * 3 / 5);
        if (confDivLoc > splitPane2.getHeight() - 10) {
          confDivLoc=splitPane2.getHeight() * 3 / 5;
        }
        splitPane2.setDividerLocation(confDivLoc);
        splitPos=splitPane2.getDividerLocation();
        splitsInited=true;
        if (Configuration.gotoMainClassOnStartup.get()) {
          gotoDocumentClass(getCurrentSwf());
        }
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void setVisible(boolean b){
  super.setVisible(b);
  if (b) {
    if (abcPanel != null) {
      abcPanel.initSplits();
    }
    if (actionPanel != null) {
      actionPanel.initSplits();
    }
    final MainFramePanel t=this;
    SwingUtilities.invokeLater(new Runnable(){
      @Override public void run(){
        splitPane1.setDividerLocation(Configuration.guiSplitPane1DividerLocation.get(getWidth() / 3));
        int confDivLoc=Configuration.guiSplitPane2DividerLocation.get(splitPane2.getHeight() * 3 / 5);
        if (confDivLoc > splitPane2.getHeight() - 10) {
          confDivLoc=splitPane2.getHeight() * 3 / 5;
        }
        splitPane2.setDividerLocation(confDivLoc);
        splitPos=splitPane2.getDividerLocation();
        splitsInited=true;
      }
    }
);
  }
}
Program: 61927
Project: 61927
Buggy source:
public void gotoDocumentClass(SWF swf){
  if (swf == null) {
    return;
  }
  String documentClass=null;
  loopdc:   for (  Tag t : swf.tags) {
    if (t instanceof SymbolClassTag) {
      SymbolClassTag sc=(SymbolClassTag)t;
      for (int i=0; i < sc.tagIDs.length; i++) {
        if (sc.tagIDs[i] == 0) {
          documentClass=sc.classNames[i];
          break loopdc;
        }
      }
    }
  }
  if (documentClass != null) {
    showDetail(DETAILCARDAS3NAVIGATOR);
    showCard(CARDACTIONSCRIPT3PANEL);
    abcPanel.hilightScript(documentClass);
  }
}

Fixed version (ground truth):
public void gotoDocumentClass(SWF swf){
  if (swf == null) {
    return;
  }
  String documentClass=null;
  loopdc:   for (  Tag t : swf.tags) {
    if (t instanceof SymbolClassTag) {
      SymbolClassTag sc=(SymbolClassTag)t;
      for (int i=0; i < sc.tagIDs.length; i++) {
        if (sc.tagIDs[i] == 0) {
          documentClass=sc.classNames[i];
          break loopdc;
        }
      }
    }
  }
  if (documentClass != null) {
    showDetail(DETAILCARDAS3NAVIGATOR);
    showCard(CARDACTIONSCRIPT3PANEL);
    abcPanel.setSwf(swf);
    abcPanel.hilightScript(documentClass);
  }
}
Program: 61928
Project: 61928
Buggy source:
public void load(SWF swf){
  List<ContainerItem> objs=new ArrayList<>();
  if (swf != null) {
    objs.addAll(swf.tags);
  }
  ArrayList<ABCContainerTag> abcList=new ArrayList<>();
  getActionScript3(objs,abcList);
  swfs.add(swf);
  swf.abcList=abcList;
  boolean hasAbc=!abcList.isEmpty();
  if (hasAbc) {
    if (abcPanel == null) {
      abcPanel=new ABCPanel(this);
      displayPanel.add(abcPanel,CARDACTIONSCRIPT3PANEL);
      detailPanel.add(abcPanel.tabbedPane,DETAILCARDAS3NAVIGATOR);
    }
    abcPanel.setSwf(abcList,swf);
  }
 else {
    if (actionPanel == null) {
      actionPanel=new ActionPanel(this);
      displayPanel.add(actionPanel,CARDACTIONSCRIPTPANEL);
    }
  }
  tagTree.setModel(new TagTreeModel(mainFrame,swfs));
  expandSwfRoots();
  for (  Tag t : swf.tags) {
    if (t instanceof JPEGTablesTag) {
      swf.jtt=(JPEGTablesTag)t;
    }
  }
  List<ContainerItem> list2=new ArrayList<>();
  list2.addAll(swf.tags);
  swf.characters=new HashMap<>();
  parseCharacters(swf,list2);
  if (Configuration.autoRenameIdentifiers.get()) {
    try {
      swf.deobfuscateIdentifiers(RenameType.TYPENUMBER);
      swf.assignClassesToSymbols();
      clearCache();
      if (abcPanel != null) {
        abcPanel.reload();
      }
      updateClassesList();
    }
 catch (    InterruptedException ex) {
      Logger.getLogger(MainFramePanel.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
  showDetail(DETAILCARDEMPTYPANEL);
  showCard(CARDEMPTYPANEL);
  updateUi(swf);
}

Fixed version (ground truth):
public void load(SWF swf,boolean first){
  List<ContainerItem> objs=new ArrayList<>();
  objs.addAll(swf.tags);
  ArrayList<ABCContainerTag> abcList=new ArrayList<>();
  getActionScript3(objs,abcList);
  swfs.add(swf);
  swf.abcList=abcList;
  boolean hasAbc=!abcList.isEmpty();
  if (hasAbc) {
    if (abcPanel == null) {
      abcPanel=new ABCPanel(this);
      displayPanel.add(abcPanel,CARDACTIONSCRIPT3PANEL);
      detailPanel.add(abcPanel.tabbedPane,DETAILCARDAS3NAVIGATOR);
    }
    abcPanel.setSwf(swf);
  }
 else {
    if (actionPanel == null) {
      actionPanel=new ActionPanel(this);
      displayPanel.add(actionPanel,CARDACTIONSCRIPTPANEL);
    }
  }
  tagTree.setModel(new TagTreeModel(mainFrame,swfs));
  expandSwfRoots();
  for (  Tag t : swf.tags) {
    if (t instanceof JPEGTablesTag) {
      swf.jtt=(JPEGTablesTag)t;
    }
  }
  List<ContainerItem> list2=new ArrayList<>();
  list2.addAll(swf.tags);
  swf.characters=new HashMap<>();
  parseCharacters(swf,list2);
  if (Configuration.autoRenameIdentifiers.get()) {
    try {
      swf.deobfuscateIdentifiers(RenameType.TYPENUMBER);
      swf.assignClassesToSymbols();
      clearCache();
      if (abcPanel != null) {
        abcPanel.reload();
      }
      updateClassesList();
    }
 catch (    InterruptedException ex) {
      Logger.getLogger(MainFramePanel.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
  showDetail(DETAILCARDEMPTYPANEL);
  showCard(CARDEMPTYPANEL);
  updateUi(swf);
  if (first && Configuration.gotoMainClassOnStartup.get()) {
    gotoDocumentClass(swf);
  }
}
Program: 61929
Project: 61929
Buggy source:
private List<Object> searchTag(Object obj,Object parent,List<Object> path){
  List<Object> ret=null;
  int cnt=getChildCount(parent);
  for (int i=0; i < cnt; i++) {
    Object n=getChild(parent,i);
    List<Object> newPath=new ArrayList<>();
    newPath.addAll(path);
    newPath.add(n);
    if (n instanceof TreeElement) {
      TreeElement te=(TreeElement)n;
      Object it=te.getItem();
      if (obj == it) {
        return newPath;
      }
    }
    if (n instanceof TagNode) {
      TagNode nd=(TagNode)n;
      if (nd.tag == obj) {
        return newPath;
      }
    }
    ret=searchTag(obj,n,newPath);
    if (ret != null) {
      return ret;
    }
  }
  return ret;
}

Fixed version (ground truth):
private List<TreeNode> searchTag(TreeElementItem obj,TreeNode parent,List<TreeNode> path){
  List<TreeNode> ret=null;
  int cnt=getChildCount(parent);
  for (int i=0; i < cnt; i++) {
    TreeNode n=getChild(parent,i);
    List<TreeNode> newPath=new ArrayList<>();
    newPath.addAll(path);
    newPath.add(n);
    if (n instanceof TreeElement) {
      TreeElement te=(TreeElement)n;
      TreeElementItem it=te.getItem();
      if (obj == it) {
        return newPath;
      }
    }
    if (n instanceof TagNode) {
      TagNode nd=(TagNode)n;
      if (nd.tag == obj) {
        return newPath;
      }
    }
    ret=searchTag(obj,n,newPath);
    if (ret != null) {
      return ret;
    }
  }
  return ret;
}
Program: 61930
Project: 61930
Buggy source:
public TreePath getTagPath(Object obj){
  List<Object> path=new ArrayList<>();
  path.add(getRoot());
  path=searchTag(obj,getRoot(),path);
  TreePath tp=new TreePath(path.toArray(new Object[path.size()]));
  return tp;
}

Fixed version (ground truth):
public TreePath getTagPath(TreeElementItem obj){
  List<TreeNode> path=new ArrayList<>();
  path.add(getRoot());
  path=searchTag(obj,getRoot(),path);
  TreePath tp=new TreePath(path.toArray(new Object[path.size()]));
  return tp;
}
Program: 61931
Project: 61931
Buggy source:
@SuppressWarnings("String_Node_Str") public void setSwf(List<ABCContainerTag> list,SWF swf){
  this.list=list;
  this.swf=swf;
  listIndex=-1;
  switchAbc(0);
  abcComboBox.setModel(new ABCComboBoxModel(list));
  if (list.size() > 0) {
    this.abc=list.get(0).getABC();
  }
  navigator.setABC(list,abc);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void setSwf(SWF swf){
  if (this.swf != swf) {
    this.swf=swf;
    listIndex=-1;
    switchAbc(0);
    abcComboBox.setModel(new ABCComboBoxModel(swf.abcList));
    if (swf.abcList.size() > 0) {
      this.abc=swf.abcList.get(0).getABC();
    }
    navigator.setABC(swf.abcList,abc);
  }
}
Program: 61934
Project: 61934
Buggy source:
public void updateSearchPos(){
  searchPos.setText((foundPos + 1) + "String_Node_Str" + found.size());
  ScriptPack pack=found.get(foundPos);
  setAbc(pack.abc);
  decompiledTextArea.setScript(pack,list);
  hilightScript(found.get(foundPos));
  decompiledTextArea.setCaretPosition(0);
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      DocumentSearchData dsd=DocumentSearchData.getFromEditor(decompiledTextArea);
      dsd.setPattern(searchFor,searchRegexp,searchIgnoreCase);
      dsd.showQuickFindDialogEx(decompiledTextArea,searchIgnoreCase,searchRegexp);
    }
  }
);
}

Fixed version (ground truth):
public void updateSearchPos(){
  searchPos.setText((foundPos + 1) + "String_Node_Str" + found.size());
  ScriptPack pack=found.get(foundPos);
  setAbc(pack.abc);
  decompiledTextArea.setScript(pack,swf.abcList);
  hilightScript(found.get(foundPos));
  decompiledTextArea.setCaretPosition(0);
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      DocumentSearchData dsd=DocumentSearchData.getFromEditor(decompiledTextArea);
      dsd.setPattern(searchFor,searchRegexp,searchIgnoreCase);
      dsd.showQuickFindDialogEx(decompiledTextArea,searchIgnoreCase,searchRegexp);
    }
  }
);
}
Program: 61935
Project: 61935
Buggy source:
@Override public Void doInBackground() throws Exception {
  decompiledTextArea.cacheScriptPack(item.value,list);
  if (pat.matcher(decompiledTextArea.getCachedText(item.value)).find()) {
    found.add(item.value);
    foundPath.add(item.key);
  }
  return null;
}

Fixed version (ground truth):
@Override public Void doInBackground() throws Exception {
  decompiledTextArea.cacheScriptPack(item.value,swf.abcList);
  if (pat.matcher(decompiledTextArea.getCachedText(item.value)).find()) {
    found.add(item.value);
    foundPath.add(item.key);
  }
  return null;
}
Program: 61936
Project: 61936
Buggy source:
public void switchAbc(int index){
  listIndex=index;
  classTree.setSwf(swf);
  if (index != -1) {
    this.abc=list.get(index).getABC();
  }
  updateConstList();
}

Fixed version (ground truth):
public void switchAbc(int index){
  listIndex=index;
  classTree.setSwf(swf);
  if (index != -1) {
    this.abc=swf.abcList.get(index).getABC();
  }
  updateConstList();
}
Program: 61937
Project: 61937
Buggy source:
@SuppressWarnings("String_Node_Str") public void clearSwf(){
  this.list=null;
  this.swf=null;
  this.abc=null;
  constantTable.setModel(new DefaultTableModel());
  classTree.clearDoABCTags();
  abcComboBox.setModel(new ABCComboBoxModel(new ArrayList<ABCContainerTag>()));
  navigator.clearABC();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void clearSwf(){
  this.swf=null;
  this.abc=null;
  constantTable.setModel(new DefaultTableModel());
  classTree.clearDoABCTags();
  abcComboBox.setModel(new ABCComboBoxModel(new ArrayList<ABCContainerTag>()));
  navigator.clearABC();
}
Program: 61938
Project: 61938
Buggy source:
@Override public void mouseClicked(MouseEvent e){
  if (e.getClickCount() == 2) {
    if (constantTypeList.getSelectedIndex() == 7) {
      int rowIndex=constantTable.getSelectedRow();
      if (rowIndex == -1) {
        return;
      }
      int multinameIndex=constantTable.convertRowIndexToModel(rowIndex);
      if (multinameIndex > 0) {
        UsageFrame usageFrame=new UsageFrame(t.list,abc,multinameIndex,t);
        usageFrame.setVisible(true);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void mouseClicked(MouseEvent e){
  if (e.getClickCount() == 2) {
    if (constantTypeList.getSelectedIndex() == 7) {
      int rowIndex=constantTable.getSelectedRow();
      if (rowIndex == -1) {
        return;
      }
      int multinameIndex=constantTable.convertRowIndexToModel(rowIndex);
      if (multinameIndex > 0) {
        UsageFrame usageFrame=new UsageFrame(t.swf.abcList,abc,multinameIndex,t);
        usageFrame.setVisible(true);
      }
    }
  }
}
Program: 61939
Project: 61939
Buggy source:
public void setSwf(SWF swf){
  if (swf != this.swf) {
    this.swf=swf;
    ClassesListTreeModel model=new ClassesListTreeModel(swf);
    this.swf.classTreeModel=model;
    setModel(model);
  }
}

Fixed version (ground truth):
public void setSwf(SWF swf){
  if (swf != this.swf) {
    this.swf=swf;
    if (swf.classTreeModel == null) {
      swf.classTreeModel=new ClassesListTreeModel(swf);
    }
    setModel(swf.classTreeModel);
  }
}
Program: 61940
Project: 61940
Buggy source:
@Override public void actionPerformed(ActionEvent e){
  if (e.getActionCommand().equals("String_Node_Str")) {
    setEditMode(true);
    methodTraitPanel.methodCodePanel.focusEditor();
  }
  if (e.getActionCommand().equals("String_Node_Str")) {
    setEditMode(false);
    abcPanel.decompiledTextArea.resetEditing();
  }
  if (e.getActionCommand().equals("String_Node_Str")) {
    if (cardMap.get(selectedCard) instanceof TraitDetail) {
      if (((TraitDetail)cardMap.get(selectedCard)).save()) {
        int lasttrait=abcPanel.decompiledTextArea.lastTraitIndex;
        abcPanel.decompiledTextArea.reloadClass();
        abcPanel.decompiledTextArea.gotoTrait(lasttrait);
        View.showMessageDialog(this,AppStrings.translate("String_Node_Str"));
      }
    }
  }
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent e){
  if (e.getActionCommand().equals("String_Node_Str")) {
    setEditMode(true);
    methodTraitPanel.methodCodePanel.focusEditor();
  }
  if (e.getActionCommand().equals("String_Node_Str")) {
    setEditMode(false);
    abcPanel.decompiledTextArea.resetEditing();
  }
  if (e.getActionCommand().equals("String_Node_Str")) {
    if (cardMap.get(selectedCard) instanceof TraitDetail) {
      if (((TraitDetail)cardMap.get(selectedCard)).save()) {
        CancellableWorker worker=new CancellableWorker(){
          @Override public Void doInBackground() throws Exception {
            int lasttrait=abcPanel.decompiledTextArea.lastTraitIndex;
            abcPanel.decompiledTextArea.reloadClass();
            abcPanel.decompiledTextArea.gotoTrait(lasttrait);
            return null;
          }
          @Override protected void done(){
            View.showMessageDialog(null,AppStrings.translate("String_Node_Str"));
          }
        }
;
        worker.execute();
      }
    }
  }
}
Program: 61941
Project: 61941
Buggy source:
public static boolean reloadSWFs(){
  CancellableWorker.cancelBackgroundThreads();
  mainFrame.closeAll();
  if (Main.sourceInfos.isEmpty()) {
    Cache.clearAll();
    System.gc();
    showModeFrame();
    return true;
  }
 else {
    SWFSourceInfo[] sourceInfosCopy=new SWFSourceInfo[sourceInfos.size()];
    sourceInfos.toArray(sourceInfosCopy);
    sourceInfos.clear();
    openFile(sourceInfosCopy);
    return true;
  }
}

Fixed version (ground truth):
public static boolean reloadSWFs(){
  CancellableWorker.cancelBackgroundThreads();
  if (mainFrame != null) {
    mainFrame.closeAll();
  }
  if (Main.sourceInfos.isEmpty()) {
    Cache.clearAll();
    System.gc();
    showModeFrame();
    return true;
  }
 else {
    SWFSourceInfo[] sourceInfosCopy=new SWFSourceInfo[sourceInfos.size()];
    sourceInfos.toArray(sourceInfosCopy);
    sourceInfos.clear();
    openFile(sourceInfosCopy);
    return true;
  }
}
Program: 61943
Project: 61943
Buggy source:
public void close(SWF swf){
  swfs.remove(swf);
  if (abcPanel != null && abcPanel.swf == swf) {
    abcPanel.clearSwf();
  }
  actionPanel.clearSource();
  oldValue=null;
  updateUi();
  updateTagTree();
}

Fixed version (ground truth):
public void close(SWF swf){
  swfs.remove(swf);
  if (abcPanel != null && abcPanel.swf == swf) {
    abcPanel.clearSwf();
  }
  if (actionPanel != null) {
    actionPanel.clearSource();
  }
  oldValue=null;
  updateUi();
  updateTagTree();
}
Program: 61945
Project: 61945
Buggy source:
private void updateUi(){
  if (!isWelcomeScreen) {
    java.awt.Container cnt=getContentPane();
    cnt.remove(splitPane1);
    cnt.add(welcomePanel,BorderLayout.CENTER);
    isWelcomeScreen=true;
  }
  if (swfs.isEmpty()) {
    mainRibbon.updateComponets(null,null);
  }
 else {
    SWF swf=swfs.get(0);
    updateUi(swf);
  }
}

Fixed version (ground truth):
private void updateUi(){
  if (!isWelcomeScreen) {
    CardLayout cl=(CardLayout)(contentPanel.getLayout());
    cl.show(contentPanel,WELCOME_PANEL);
    isWelcomeScreen=true;
  }
  if (swfs.isEmpty()) {
    mainRibbon.updateComponets(null,null);
  }
 else {
    SWF swf=swfs.get(0);
    updateUi(swf);
  }
}
Program: 61946
Project: 61946
Buggy source:
@Override protected GraphTextWriter appendTo(GraphTextWriter writer,LocalData localData) throws InterruptedException {
  MethodBody body=abc.findBody(methodIndex);
  writer.append("String_Node_Str" + (!functionName.isEmpty() ? "String_Node_Str" + functionName : "String_Node_Str"));
  writer.startMethod(methodIndex);
  writer.appendNoHilight("String_Node_Str");
  methodInfo[methodIndex].getParamStr(writer,constants,body,abc,fullyQualifiedNames);
  writer.appendNoHilight("String_Node_Str");
  methodInfo[methodIndex].getReturnTypeStr(writer,constants,fullyQualifiedNames);
  writer.endMethod();
  writer.newLine();
  writer.append("String_Node_Str").newLine();
  if (body != null) {
    if (writer instanceof NulWriter) {
      body.convert(path + "String_Node_Str",ExportMode.SOURCE,isStatic,scriptIndex,classIndex,abc,null,constants,methodInfo,new Stack<GraphTargetItem>(),false,fullyQualifiedNames,null,false);
    }
 else {
      body.toString(path + "String_Node_Str",ExportMode.SOURCE,isStatic,scriptIndex,classIndex,abc,null,constants,methodInfo,new Stack<GraphTargetItem>(),false,writer,fullyQualifiedNames,null);
    }
  }
  writer.append("String_Node_Str");
  return writer;
}

Fixed version (ground truth):
@Override protected GraphTextWriter appendTo(GraphTextWriter writer,LocalData localData) throws InterruptedException {
  MethodBody body=abc.findBody(methodIndex);
  writer.append("String_Node_Str" + (!functionName.isEmpty() ? "String_Node_Str" + functionName : "String_Node_Str"));
  writer.startMethod(methodIndex);
  writer.appendNoHilight("String_Node_Str");
  methodInfo[methodIndex].getParamStr(writer,constants,body,abc,fullyQualifiedNames);
  writer.appendNoHilight("String_Node_Str");
  methodInfo[methodIndex].getReturnTypeStr(writer,constants,fullyQualifiedNames);
  writer.endMethod();
  writer.newLine();
  writer.append("String_Node_Str").newLine();
  if (body != null) {
    if (writer instanceof NulWriter) {
      body.convert(path + "String_Node_Str",ExportMode.SOURCE,isStatic,scriptIndex,classIndex,abc,null,constants,methodInfo,new Stack<GraphTargetItem>(),false,writer,fullyQualifiedNames,null,false);
    }
 else {
      body.toString(path + "String_Node_Str",ExportMode.SOURCE,isStatic,scriptIndex,classIndex,abc,null,constants,methodInfo,new Stack<GraphTargetItem>(),false,writer,fullyQualifiedNames,null);
    }
  }
  writer.append("String_Node_Str");
  return writer;
}
Program: 61947
Project: 61947
Buggy source:
@Override public Void call() throws InterruptedException {
  MethodBody converted=convertMethodBody(path,isStatic,scriptIndex,classIndex,abc,trait,constants,method_info,scopeStack,isStaticInitializer,fullyQualifiedNames,initTraits);
  HashMap<Integer,String> localRegNames=getLocalRegNames(abc);
  convertedItems=converted.code.toGraphTargetItems(path,isStatic,scriptIndex,classIndex,abc,constants,method_info,converted,localRegNames,scopeStack,isStaticInitializer,fullyQualifiedNames,initTraits,Graph.SOP_USE_STATIC,new HashMap<Integer,Integer>(),converted.code.visitCode(converted));
  Graph.graphToString(convertedItems,new NulWriter(),LocalData.create(constants,localRegNames,fullyQualifiedNames));
  return null;
}

Fixed version (ground truth):
@Override public Void call() throws InterruptedException {
  MethodBody converted=convertMethodBody(path,isStatic,scriptIndex,classIndex,abc,trait,constants,method_info,scopeStack,isStaticInitializer,fullyQualifiedNames,initTraits);
  HashMap<Integer,String> localRegNames=getLocalRegNames(abc);
  convertedItems=converted.code.toGraphTargetItems(path,isStatic,scriptIndex,classIndex,abc,constants,method_info,converted,localRegNames,scopeStack,isStaticInitializer,fullyQualifiedNames,initTraits,Graph.SOP_USE_STATIC,new HashMap<Integer,Integer>(),converted.code.visitCode(converted));
  Graph.graphToString(convertedItems,writer,LocalData.create(constants,localRegNames,fullyQualifiedNames));
  return null;
}
Program: 61951
Project: 61951
Buggy source:
@Override public void convert(Trait parent,String path,List<ABCContainerTag> abcTags,ABC abc,boolean isStatic,ExportMode exportMode,int scriptIndex,int classIndex,NulWriter writer,List<String> fullyQualifiedNames,boolean parallel) throws InterruptedException {
  convertHeader(parent,path,abcTags,abc,isStatic,exportMode,scriptIndex,classIndex,writer,fullyQualifiedNames,parallel);
  if (!abc.instance_info[classIndex].isInterface()) {
    int bodyIndex=abc.findBodyIndex(method_info);
    if (bodyIndex != -1) {
      abc.bodies[bodyIndex].convert(path + "String_Node_Str" + abc.constants.getMultiname(name_index).getName(abc.constants,fullyQualifiedNames),exportMode,isStatic,scriptIndex,classIndex,abc,this,abc.constants,abc.method_info,new Stack<GraphTargetItem>(),false,fullyQualifiedNames,null,true);
    }
  }
}

Fixed version (ground truth):
@Override public void convert(Trait parent,String path,List<ABCContainerTag> abcTags,ABC abc,boolean isStatic,ExportMode exportMode,int scriptIndex,int classIndex,NulWriter writer,List<String> fullyQualifiedNames,boolean parallel) throws InterruptedException {
  convertHeader(parent,path,abcTags,abc,isStatic,exportMode,scriptIndex,classIndex,writer,fullyQualifiedNames,parallel);
  if (!abc.instance_info[classIndex].isInterface()) {
    int bodyIndex=abc.findBodyIndex(method_info);
    if (bodyIndex != -1) {
      abc.bodies[bodyIndex].convert(path + "String_Node_Str" + abc.constants.getMultiname(name_index).getName(abc.constants,fullyQualifiedNames),exportMode,isStatic,scriptIndex,classIndex,abc,this,abc.constants,abc.method_info,new Stack<GraphTargetItem>(),false,writer,fullyQualifiedNames,null,true);
    }
  }
}