nus-yam/ex-repair huggingface dataset:
Program: 61952
Project: 61952
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 {
  path=path + "String_Node_Str" + getName(abc).getName(abc.constants,fullyQualifiedNames);
  convertHeader(parent,path,abcTags,abc,isStatic,exportMode,scriptIndex,classIndex,writer,fullyQualifiedNames,parallel);
  int bodyIndex=abc.findBodyIndex(method_info);
  if (!(classIndex != -1 && abc.instance_info[classIndex].isInterface() || bodyIndex == -1)) {
    if (bodyIndex != -1) {
      abc.bodies[bodyIndex].convert(path,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 {
  path=path + "String_Node_Str" + getName(abc).getName(abc.constants,fullyQualifiedNames);
  convertHeader(parent,path,abcTags,abc,isStatic,exportMode,scriptIndex,classIndex,writer,fullyQualifiedNames,parallel);
  int bodyIndex=abc.findBodyIndex(method_info);
  if (!(classIndex != -1 && abc.instance_info[classIndex].isInterface() || bodyIndex == -1)) {
    if (bodyIndex != -1) {
      abc.bodies[bodyIndex].convert(path,exportMode,isStatic,scriptIndex,classIndex,abc,this,abc.constants,abc.method_info,new Stack<GraphTargetItem>(),false,writer,fullyQualifiedNames,null,true);
    }
  }
}
Program: 61953
Project: 61953
Buggy source:
@Override public void addCharacter(List<Tag> tags,char character,String fontName){
  int fontStyle=getFontStyle();
  SHAPE shp=SHAPERECORD.systemFontCharacterToSHAPE(fontName,fontStyle,getDivider() * 1024,character);
  int code=(int)character;
  int pos=-1;
  boolean exists=false;
  for (int i=0; i < codeTable.size(); i++) {
    if (codeTable.get(i) >= code) {
      if (codeTable.get(i) == code) {
        exists=true;
      }
      pos=i;
      break;
    }
  }
  if (pos == -1) {
    pos=codeTable.size();
  }
  if (!exists) {
    FontTag.shiftGlyphIndices(fontId,pos,tags);
    glyphShapeTable.add(pos,shp);
    codeTable.add(pos,(int)character);
  }
 else {
    glyphShapeTable.set(pos,shp);
  }
  if (fontFlagsHasLayout) {
    Font fnt=new Font(fontName,fontStyle,getDivider() * 1024);
    if (!exists) {
      fontBoundsTable.add(pos,shp.getBounds());
      fontAdvanceTable.add(pos,(int)Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX()));
    }
 else {
      fontBoundsTable.set(pos,shp.getBounds());
      fontAdvanceTable.set(pos,(int)Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX()));
    }
  }
  if (!exists) {
    numGlyphs++;
  }
}

Fixed version (ground truth):
@Override public void addCharacter(List<Tag> tags,char character,String fontName){
  int fontStyle=getFontStyle();
  SHAPE shp=SHAPERECORD.systemFontCharacterToSHAPE(fontName,fontStyle,getDivider() * 1024,character);
  int code=(int)character;
  int pos=-1;
  boolean exists=false;
  for (int i=0; i < codeTable.size(); i++) {
    if (codeTable.get(i) >= code) {
      if (codeTable.get(i) == code) {
        exists=true;
      }
      pos=i;
      break;
    }
  }
  if (pos == -1) {
    pos=codeTable.size();
  }
  if (!exists) {
    FontTag.shiftGlyphIndices(fontId,pos,tags);
    glyphShapeTable.add(pos,shp);
    codeTable.add(pos,(int)character);
  }
 else {
    glyphShapeTable.set(pos,shp);
  }
  if (fontFlagsHasLayout) {
    Font fnt=new Font(fontName,fontStyle,1024);
    if (!exists) {
      fontBoundsTable.add(pos,shp.getBounds());
      fontAdvanceTable.add(pos,(int)getDivider() * Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX()));
    }
 else {
      fontBoundsTable.set(pos,shp.getBounds());
      fontAdvanceTable.set(pos,(int)getDivider() * Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX()));
    }
  }
  if (!exists) {
    numGlyphs++;
  }
}
Program: 61957
Project: 61957
Buggy source:
public String getModifiers(List<ABCContainerTag> abcTags,ABC abc,boolean isStatic){
  String ret="String_Node_Str";
  if ((kindFlags & ATTR_Override) > 0) {
    ret+="String_Node_Str";
  }
  Multiname m=getName(abc);
  if (m != null) {
    String nsname="String_Node_Str";
{
      for (      ABCContainerTag abcTag : abcTags) {
        nsname=abcTag.getABC().nsValueToName(abc.constants.constant_namespace[m.namespace_index].getName(abc.constants));
        if (nsname.equals("String_Node_Str")) {
          break;
        }
        if (nsname.contains("String_Node_Str")) {
          nsname=nsname.substring(nsname.lastIndexOf('.') + 1);
        }
        if (!nsname.isEmpty()) {
          break;
        }
      }
    }
    Namespace ns=m.getNamespace(abc.constants);
    if (nsname.contains("String_Node_Str")) {
      nsname="String_Node_Str";
    }
    if ((!nsname.isEmpty()) && (!nsname.equals("String_Node_Str"))) {
    }
 else {
      if (ns != null) {
        if (ns.kind == Namespace.KIND_NAMESPACE) {
          nsname=ns.getName(abc.constants);
        }
      }
    }
    if ((!nsname.contains("String_Node_Str")) && (!nsname.isEmpty())) {
      ret+="String_Node_Str" + nsname;
    }
    if (ns != null) {
      ret+="String_Node_Str" + ns.getPrefix(abc);
    }
  }
  if (isStatic) {
    ret+="String_Node_Str";
  }
  if ((kindFlags & ATTR_Final) > 0) {
    if (!isStatic) {
      ret+="String_Node_Str";
    }
  }
  return ret.trim();
}

Fixed version (ground truth):
public String getModifiers(List<ABCContainerTag> abcTags,ABC abc,boolean isStatic){
  String ret="String_Node_Str";
  if ((kindFlags & ATTR_Override) > 0) {
    ret+="String_Node_Str";
  }
  Multiname m=getName(abc);
  if (m != null) {
    String nsname="String_Node_Str";
{
      for (      ABCContainerTag abcTag : abcTags) {
        if (m.namespace_index == -1) {
          break;
        }
        nsname=abcTag.getABC().nsValueToName(abc.constants.constant_namespace[m.namespace_index].getName(abc.constants));
        if (nsname.equals("String_Node_Str")) {
          break;
        }
        if (nsname.contains("String_Node_Str")) {
          nsname=nsname.substring(nsname.lastIndexOf('.') + 1);
        }
        if (!nsname.isEmpty()) {
          break;
        }
      }
    }
    Namespace ns=m.getNamespace(abc.constants);
    if (nsname.contains("String_Node_Str")) {
      nsname="String_Node_Str";
    }
    if ((!nsname.isEmpty()) && (!nsname.equals("String_Node_Str"))) {
    }
 else {
      if (ns != null) {
        if (ns.kind == Namespace.KIND_NAMESPACE) {
          nsname=ns.getName(abc.constants);
        }
      }
    }
    if ((!nsname.contains("String_Node_Str")) && (!nsname.isEmpty())) {
      ret+="String_Node_Str" + nsname;
    }
    if (ns != null) {
      ret+="String_Node_Str" + ns.getPrefix(abc);
    }
  }
  if (isStatic) {
    ret+="String_Node_Str";
  }
  if ((kindFlags & ATTR_Final) > 0) {
    if (!isStatic) {
      ret+="String_Node_Str";
    }
  }
  return ret.trim();
}
Program: 61958
Project: 61958
Buggy source:
public ConfigurationItem(String name,T defaultValue,T value){
  hasValue=true;
  this.defaultValue=defaultValue;
  this.value=value;
}

Fixed version (ground truth):
public ConfigurationItem(String name,T defaultValue,T value){
  this.name=name;
  hasValue=true;
  this.defaultValue=defaultValue;
  this.value=value;
}
Program: 61959
Project: 61959
Buggy source:
private static void setConfigurations(String cfgStr){
  String[] cfgs;
  if (cfgStr.contains("String_Node_Str")) {
    cfgs=cfgStr.split("String_Node_Str");
  }
 else {
    cfgs=new String[]{cfgStr};
  }
  for (  String c : cfgs) {
    String[] cp;
    if (c.contains("String_Node_Str")) {
      cp=c.split("String_Node_Str");
    }
 else {
      cp=new String[]{c,"String_Node_Str"};
    }
    String key=cp[0];
    String value=cp[1];
    if (key.toLowerCase().equals("String_Node_Str".toLowerCase())) {
      key="String_Node_Str";
    }
    for (    ConfigurationItem<Boolean> item : commandlineConfigBoolean) {
      if (key.toLowerCase().equals(item.getName().toLowerCase())) {
        Boolean bValue=parseBooleanConfigValue(value);
        if (bValue != null) {
          System.out.println("String_Node_Str" + item + "String_Node_Str"+ bValue);
          item.set(bValue);
        }
      }
    }
  }
}

Fixed version (ground truth):
private static void setConfigurations(String cfgStr){
  String[] cfgs;
  if (cfgStr.contains("String_Node_Str")) {
    cfgs=cfgStr.split("String_Node_Str");
  }
 else {
    cfgs=new String[]{cfgStr};
  }
  for (  String c : cfgs) {
    String[] cp;
    if (c.contains("String_Node_Str")) {
      cp=c.split("String_Node_Str");
    }
 else {
      cp=new String[]{c,"String_Node_Str"};
    }
    String key=cp[0];
    String value=cp[1];
    if (key.toLowerCase().equals("String_Node_Str".toLowerCase())) {
      key="String_Node_Str";
    }
    for (    ConfigurationItem<Boolean> item : commandlineConfigBoolean) {
      if (key.toLowerCase().equals(item.getName().toLowerCase())) {
        Boolean bValue=parseBooleanConfigValue(value);
        if (bValue != null) {
          System.out.println("String_Node_Str" + item.getName() + "String_Node_Str"+ bValue);
          item.set(bValue);
        }
      }
    }
  }
}
Program: 61961
Project: 61961
Buggy source:
@Override public void call(AsyncResult<Void> arg1){
  setSourceTask=null;
  Main.stopWork();
}

Fixed version (ground truth):
@Override public void call(AsyncResult<Void> result){
  setSourceTask=null;
  if (result.error != null) {
    abcPanel.decompiledTextArea.setText("String_Node_Str" + result.error);
  }
  Main.stopWork();
}
Program: 61962
Project: 61962
Buggy source:
@Override public HilightedTextWriter toString(HilightedTextWriter writer,ConstantPool constants,HashMap<Integer,String> localRegNames,List<String> fullyQualifiedNames){
  hilight("String_Node_Str",writer);
  int idx=writer.getLength();
  object.toString(writer,constants,localRegNames,fullyQualifiedNames);
  if (idx > writer.getLength()) {
    hilight("String_Node_Str",writer);
  }
  propertyName.toString(writer,constants,localRegNames,fullyQualifiedNames);
  hilight("String_Node_Str",writer);
  for (int a=0; a < args.size(); a++) {
    if (a > 0) {
      hilight("String_Node_Str",writer);
    }
    args.get(a).toString(writer,constants,localRegNames,fullyQualifiedNames);
  }
  return hilight("String_Node_Str",writer);
}

Fixed version (ground truth):
@Override public HilightedTextWriter toString(HilightedTextWriter writer,ConstantPool constants,HashMap<Integer,String> localRegNames,List<String> fullyQualifiedNames){
  hilight("String_Node_Str",writer);
  int idx=writer.getLength();
  object.toString(writer,constants,localRegNames,fullyQualifiedNames);
  if (idx < writer.getLength()) {
    hilight("String_Node_Str",writer);
  }
  propertyName.toString(writer,constants,localRegNames,fullyQualifiedNames);
  hilight("String_Node_Str",writer);
  for (int a=0; a < args.size(); a++) {
    if (a > 0) {
      hilight("String_Node_Str",writer);
    }
    args.get(a).toString(writer,constants,localRegNames,fullyQualifiedNames);
  }
  return hilight("String_Node_Str",writer);
}
Program: 61963
Project: 61963
Buggy source:
@Override public HilightedTextWriter toString(HilightedTextWriter writer,List<Object> localData){
  GraphTargetItem expr=expression;
  List<GraphTargetItem> ifBranch=onTrue;
  List<GraphTargetItem> elseBranch=onFalse;
  if (onTrue.isEmpty()) {
    if (onFalse.isEmpty()) {
      if (expr instanceof NotItem) {
        expr=((NotItem)expr).getOriginal();
      }
    }
 else {
      if (expr instanceof LogicalOpItem) {
        expr=((LogicalOpItem)expr).invert();
      }
 else {
        expr=new NotItem(null,expr);
      }
      ifBranch=onFalse;
      elseBranch=onTrue;
    }
  }
  hilight("String_Node_Str",writer);
  expr.toString(writer,localData);
  hilight("String_Node_Str",writer).appendNewLine();
  hilight("String_Node_Str",writer).appendNewLine();
  hilight(Graph.INDENTOPEN,writer).appendNewLine();
  for (  GraphTargetItem ti : ifBranch) {
    if (!ti.isEmpty()) {
      ti.toStringSemicoloned(writer,localData).appendNewLine();
    }
  }
  hilight(Graph.INDENTCLOSE + "String_Node_Str",writer);
  hilight("String_Node_Str",writer);
  if (elseBranch.size() > 0) {
    hilight("String_Node_Str",writer);
    hilight("String_Node_Str" + Graph.INDENTOPEN + "String_Node_Str",writer);
    for (    GraphTargetItem ti : elseBranch) {
      if (!ti.isEmpty()) {
        ti.toStringSemicoloned(writer,localData);
        hilight("String_Node_Str",writer);
      }
    }
    hilight(Graph.INDENTCLOSE + "String_Node_Str",writer);
  }
  return writer;
}

Fixed version (ground truth):
@Override public HilightedTextWriter toString(HilightedTextWriter writer,List<Object> localData){
  GraphTargetItem expr=expression;
  List<GraphTargetItem> ifBranch=onTrue;
  List<GraphTargetItem> elseBranch=onFalse;
  if (onTrue.isEmpty()) {
    if (onFalse.isEmpty()) {
      if (expr instanceof NotItem) {
        expr=((NotItem)expr).getOriginal();
      }
    }
 else {
      if (expr instanceof LogicalOpItem) {
        expr=((LogicalOpItem)expr).invert();
      }
 else {
        expr=new NotItem(null,expr);
      }
      ifBranch=onFalse;
      elseBranch=onTrue;
    }
  }
  hilight("String_Node_Str",writer);
  expr.toString(writer,localData);
  hilight("String_Node_Str",writer).appendNewLine();
  hilight("String_Node_Str",writer).appendNewLine();
  hilight(Graph.INDENTOPEN,writer).appendNewLine();
  for (  GraphTargetItem ti : ifBranch) {
    if (!ti.isEmpty()) {
      ti.toStringSemicoloned(writer,localData).appendNewLine();
    }
  }
  hilight(Graph.INDENTCLOSE,writer).appendNewLine();
  hilight("String_Node_Str",writer);
  if (elseBranch.size() > 0) {
    writer.appendNewLine();
    hilight("String_Node_Str",writer).appendNewLine();
    hilight("String_Node_Str",writer).appendNewLine();
    hilight(Graph.INDENTOPEN,writer).appendNewLine();
    for (    GraphTargetItem ti : elseBranch) {
      if (!ti.isEmpty()) {
        ti.toStringSemicoloned(writer,localData).appendNewLine();
      }
    }
    hilight(Graph.INDENTCLOSE,writer).appendNewLine();
    hilight("String_Node_Str",writer);
  }
  return writer;
}
Program: 61966
Project: 61966
Buggy source:
public void setSource(final ASMSource src,final boolean useCache){
  this.src=src;
  Main.startWork(translate("String_Node_Str") + "String_Node_Str");
  final ASMSource asm=(ASMSource)src;
  (new Thread(){
    @Override public void run(){
      editor.setText("String_Node_Str" + translate("String_Node_Str") + "String_Node_Str");
      if (Configuration.getConfig("String_Node_Str",true)) {
        decompiledEditor.setText("String_Node_Str" + 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.getConfig("String_Node_Str",true)) {
        decompiledEditor.setText("String_Node_Str" + translate("String_Node_Str") + "String_Node_Str");
        String stripped="String_Node_Str";
        if (!useCache) {
          uncache(asm);
        }
        cacheScript(asm,actions);
        CachedScript sc=getCached(asm);
        decompiledHilights=sc.hilights;
        lastDecompiled=sc.text;
        lastASM=asm;
        stripped=lastDecompiled;
        decompiledEditor.setText(asm.getActionSourcePrefix() + Helper.indentRows(asm.getActionSourceIndent(),lastDecompiled,HilightedTextWriter.INDENT_STRING) + asm.getActionSourceSuffix());
      }
      setEditMode(false);
      setDecompiledEditMode(false);
      Main.stopWork();
    }
  }
).start();
}

Fixed version (ground truth):
public void setSource(final ASMSource src,final boolean useCache){
  this.src=src;
  Main.startWork(translate("String_Node_Str") + "String_Node_Str");
  final ASMSource asm=(ASMSource)src;
  (new Thread(){
    @Override public void run(){
      editor.setText("String_Node_Str" + translate("String_Node_Str") + "String_Node_Str");
      if (Configuration.getConfig("String_Node_Str",true)) {
        decompiledEditor.setText("String_Node_Str" + 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.getConfig("String_Node_Str",true)) {
        decompiledEditor.setText("String_Node_Str" + 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);
      Main.stopWork();
    }
  }
).start();
}
Program: 61967
Project: 61967
Buggy source:
@Override public void caretUpdate(CaretEvent e){
  if (ignoreCarret) {
    return;
  }
  if (editMode || editDecompiledMode) {
    return;
  }
  decompiledEditor.getCaret().setVisible(true);
  int pos=decompiledEditor.getCaretPosition();
  System.out.println("String_Node_Str" + pos);
  Highlighting h=Highlighting.search(decompiledHilights,pos);
  if (h != null) {
    Highlighting h2=Highlighting.search(disassembledHilights,"String_Node_Str",h.getPropertyString("String_Node_Str"));
    if (h2 != null) {
      ignoreCarret=true;
      if (h2.startPos > 0 && h2.startPos < editor.getText().length()) {
        editor.setCaretPosition(h2.startPos);
      }
      editor.getCaret().setVisible(true);
      ignoreCarret=false;
    }
  }
}

Fixed version (ground truth):
@Override public void caretUpdate(CaretEvent e){
  if (ignoreCarret) {
    return;
  }
  if (editMode || editDecompiledMode) {
    return;
  }
  decompiledEditor.getCaret().setVisible(true);
  int pos=decompiledEditor.getCaretPosition();
  Highlighting h=Highlighting.search(decompiledHilights,pos);
  if (h != null) {
    Highlighting h2=Highlighting.search(disassembledHilights,"String_Node_Str",h.getPropertyString("String_Node_Str"));
    if (h2 != null) {
      ignoreCarret=true;
      if (h2.startPos > 0 && h2.startPos < editor.getText().length()) {
        editor.setCaretPosition(h2.startPos);
      }
      editor.getCaret().setVisible(true);
      ignoreCarret=false;
    }
  }
}
Program: 61968
Project: 61968
Buggy source:
public void setDecompiledEditMode(boolean val){
  if (lastASM == null) {
    return;
  }
  String pref=lastASM.getActionSourcePrefix();
  int lastPos=decompiledEditor.getCaretPosition();
  int lastLine=decompiledEditor.getLine();
  int prefLines=Helper.getLineCount(pref);
  if (val) {
    String newText=lastDecompiled;
    decompiledEditor.setText(newText);
    if (lastLine > -1) {
      int newpos=lastPos - pref.length();
      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=pref + Helper.indentRows(lastASM.getActionSourceIndent(),lastDecompiled,HilightedTextWriter.INDENT_STRING) + lastASM.getActionSourceSuffix();
    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);
    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();
}
Program: 61969
Project: 61969
Buggy source:
private void cacheScript(ASMSource src,List<Action> actions){
  if (!cache.contains(src)) {
    if (actions == null) {
      actions=src.getActions(SWF.DEFAULT_VERSION);
    }
    HilightedText text=Action.actionsToSource(actions,SWF.DEFAULT_VERSION,src.toString(),true,0);
    List<Highlighting> hilights=text.instructionHilights;
    String srcNoHex=text.text;
    cache.put(src,new CachedScript(srcNoHex,hilights));
  }
}

Fixed version (ground truth):
private void cacheScript(ASMSource src,List<Action> actions){
  if (!cache.contains(src)) {
    if (actions == null) {
      actions=src.getActions(SWF.DEFAULT_VERSION);
    }
    HilightedTextWriter writer=new HilightedTextWriter(true);
    src.getActionSourcePrefix(writer);
    Action.actionsToSource(actions,SWF.DEFAULT_VERSION,src.toString(),writer);
    src.getActionSourceSuffix(writer);
    List<Highlighting> hilights=writer.instructionHilights;
    String srcNoHex=writer.toString();
    cache.put(src,new CachedScript(srcNoHex,hilights));
  }
}
Program: 61971
Project: 61971
Buggy source:
@Override public HilightedTextWriter newLine(){
  appendToSb("String_Node_Str");
  newLine=true;
  newLineCount++;
  return this;
}

Fixed version (ground truth):
@Override public HilightedTextWriter newLine(){
  appendToSb(NEW_LINE);
  newLine=true;
  newLineCount++;
  return this;
}
Program: 61972
Project: 61972
Buggy source:
@Override public String getActionSourceSuffix(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public GraphTextWriter getActionSourceSuffix(GraphTextWriter writer){
  return writer;
}
Program: 61973
Project: 61973
Buggy source:
@Override public String getActionSourcePrefix(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public GraphTextWriter getActionSourcePrefix(GraphTextWriter writer){
  return writer;
}
Program: 61974
Project: 61974
Buggy source:
@Override public String getActionSourceSuffix(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public GraphTextWriter getActionSourceSuffix(GraphTextWriter writer){
  return writer;
}
Program: 61975
Project: 61975
Buggy source:
@Override public String getActionSourcePrefix(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public GraphTextWriter getActionSourcePrefix(GraphTextWriter writer){
  return writer;
}
Program: 61976
Project: 61976
Buggy source:
@Override public String getActionSourceSuffix(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public GraphTextWriter getActionSourceSuffix(GraphTextWriter writer){
  return writer;
}
Program: 61977
Project: 61977
Buggy source:
@Override public String getActionSourcePrefix(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public GraphTextWriter getActionSourcePrefix(GraphTextWriter writer){
  return writer;
}
Program: 61978
Project: 61978
Buggy source:
public String getActionSourceSuffix();

Fixed version (ground truth):
public GraphTextWriter getActionSourceSuffix(GraphTextWriter writer);
Program: 61979
Project: 61979
Buggy source:
public String getActionSourcePrefix();

Fixed version (ground truth):
public GraphTextWriter getActionSourcePrefix(GraphTextWriter writer);
Program: 61980
Project: 61980
Buggy source:
@Override public String getActionSourceSuffix(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public GraphTextWriter getActionSourceSuffix(GraphTextWriter writer){
  writer.unindent();
  return writer.appendNoHilight("String_Node_Str").newLine();
}
Program: 61981
Project: 61981
Buggy source:
@Override public String getActionSourcePrefix(){
  return getHeader(false) + "String_Node_Str";
}

Fixed version (ground truth):
@Override public GraphTextWriter getActionSourcePrefix(GraphTextWriter writer){
  writer.appendNoHilight(getHeader(false));
  writer.appendNoHilight("String_Node_Str").newLine();
  return writer.indent();
}
Program: 61982
Project: 61982
Buggy source:
@Override public String getActionSourceSuffix(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public GraphTextWriter getActionSourceSuffix(GraphTextWriter writer){
  writer.unindent();
  return writer.appendNoHilight("String_Node_Str").newLine();
}
Program: 61983
Project: 61983
Buggy source:
@Override public String getActionSourcePrefix(){
  return eventFlags.getHeader(keyCode,false) + "String_Node_Str";
}

Fixed version (ground truth):
@Override public GraphTextWriter getActionSourcePrefix(GraphTextWriter writer){
  writer.appendNoHilight(eventFlags.getHeader(keyCode,false));
  writer.appendNoHilight("String_Node_Str").newLine();
  return writer.indent();
}
Program: 61984
Project: 61984
Buggy source:
private static String convertActionScript(ASMSource as){
  HilightedText decompiledAS=Action.actionsToSource(as.getActions(SWF.DEFAULT_VERSION),SWF.DEFAULT_VERSION,as.toString(),false,as.getActionSourceIndent());
  return as.getActionSourcePrefix() + decompiledAS.text + as.getActionSourceSuffix();
}

Fixed version (ground truth):
private static String convertActionScript(ASMSource as){
  HilightedTextWriter writer=new HilightedTextWriter(false);
  as.getActionSourcePrefix(writer);
  Action.actionsToSource(as.getActions(SWF.DEFAULT_VERSION),SWF.DEFAULT_VERSION,as.toString(),writer);
  as.getActionSourceSuffix(writer);
  return writer.toString();
}
Program: 61987
Project: 61987
Buggy source:
/** 
 * Highlights specified text as class by adding special tags
 * @param text Text to highlight
 * @param offset Offset of trait
 * @return Highlighted text
 */
public static String hilighClass(String text,long index){
  return hilight(text,"String_Node_Str" + index);
}

Fixed version (ground truth):
/** 
 * Highlights specified text as class by adding special tags
 * @param text Text to highlight
 * @param index Class index
 * @return Highlighted text
 */
public static String hilighClass(String text,long index){
  return hilight(text,"String_Node_Str" + index);
}
Program: 61988
Project: 61988
Buggy source:
/** 
 * Highlights specified text as trait by adding special tags
 * @param text Text to highlight
 * @param offset Offset of trait
 * @return Highlighted text
 */
public static String hilighTrait(String text,long index){
  return hilight(text,"String_Node_Str" + index);
}

Fixed version (ground truth):
/** 
 * Highlights specified text as trait by adding special tags
 * @param text Text to highlight
 * @param index Trait index
 * @return Highlighted text
 */
public static String hilighTrait(String text,long index){
  return hilight(text,"String_Node_Str" + index);
}
Program: 61989
Project: 61989
Buggy source:
public int addMethodBody(MethodBody body){
  bodies=Arrays.copyOf(bodies,bodies.length + 1);
  bodies[bodies.length - 1]=body;
  bodyIdxFromMethodIdx=Arrays.copyOf(bodyIdxFromMethodIdx,bodyIdxFromMethodIdx.length + 1);
  bodyIdxFromMethodIdx[bodyIdxFromMethodIdx.length - 1]=body.method_info;
  return bodies.length - 1;
}

Fixed version (ground truth):
public int addMethodBody(MethodBody body){
  bodies=Arrays.copyOf(bodies,bodies.length + 1);
  bodies[bodies.length - 1]=body;
  if (body.method_info >= bodyIdxFromMethodIdx.length) {
    int newlen=body.method_info + 1;
    int oldlen=bodyIdxFromMethodIdx.length;
    bodyIdxFromMethodIdx=Arrays.copyOf(bodyIdxFromMethodIdx,newlen);
    for (int i=oldlen; i < newlen; i++) {
      bodyIdxFromMethodIdx[i]=-1;
    }
    bodyIdxFromMethodIdx[body.method_info]=bodies.length - 1;
  }
  return bodies.length - 1;
}
Program: 61993
Project: 61993
Buggy source:
@Override public void addCharacter(List<Tag> tags,char character,String fontName){
  int fontStyle=getFontStyle();
  FontType font=fonts.get(0);
  SHAPE shp=SHAPERECORD.systemFontCharacterToSHAPE(fontName,fontStyle,20 * font.nominalSize,character);
  int code=(int)character;
  int pos=-1;
  boolean exists=false;
  for (int i=0; i < font.glyphInfo.size(); i++) {
    if (font.glyphInfo.get(i).glyphCode >= code) {
      if (font.glyphInfo.get(i).glyphCode == code) {
        exists=true;
      }
      pos=i;
      break;
    }
  }
  if (pos == -1) {
    pos=font.glyphInfo.size();
  }
  if (!exists) {
    FontTag.shiftGlyphIndices(fontId,pos,tags);
  }
  Font fnt=new Font(fontName,fontStyle,20 * font.nominalSize);
  int advance=(int)Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX());
  if (!exists) {
    font.glyphInfo.add(pos,new GlyphInfoType(code,advance,0));
    font.glyphs.add(pos,new GlyphType(shp.shapeRecords));
    shapeCache.add(pos,font.glyphs.get(pos).toSHAPE());
  }
 else {
    font.glyphInfo.set(pos,new GlyphInfoType(code,advance,0));
    font.glyphs.set(pos,new GlyphType(shp.shapeRecords));
    shapeCache.set(pos,font.glyphs.get(pos).toSHAPE());
  }
  imageCache.remove("String_Node_Str" + fontId);
}

Fixed version (ground truth):
@Override public void addCharacter(List<Tag> tags,char character,String fontName){
  int fontStyle=getFontStyle();
  FontType font=fonts.get(0);
  SHAPE shp=SHAPERECORD.systemFontCharacterToSHAPE(fontName,fontStyle,20 * font.nominalSize,character);
  int code=(int)character;
  int pos=-1;
  boolean exists=false;
  for (int i=0; i < font.glyphInfo.size(); i++) {
    if (font.glyphInfo.get(i).glyphCode >= code) {
      if (font.glyphInfo.get(i).glyphCode == code) {
        exists=true;
      }
      pos=i;
      break;
    }
  }
  if (pos == -1) {
    pos=font.glyphInfo.size();
  }
  if (!exists) {
    FontTag.shiftGlyphIndices(fontId,pos,tags);
  }
  Font fnt=new Font(fontName,fontStyle,font.nominalSize);
  int advance=(int)Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX());
  if (!exists) {
    font.glyphInfo.add(pos,new GlyphInfoType(code,advance,0));
    font.glyphs.add(pos,new GlyphType(shp.shapeRecords));
    shapeCache.add(pos,font.glyphs.get(pos).toSHAPE());
  }
 else {
    font.glyphInfo.set(pos,new GlyphInfoType(code,advance,0));
    font.glyphs.set(pos,new GlyphType(shp.shapeRecords));
    shapeCache.set(pos,font.glyphs.get(pos).toSHAPE());
  }
  imageCache.remove("String_Node_Str" + fontId);
}
Program: 61994
Project: 61994
Buggy source:
private void fontAddChars(FontTag ft,Set<Integer> selChars,String selFont){
  FontTag f=(FontTag)oldValue;
  String oldchars=f.getCharacters(swf.tags);
  for (  int ic : selChars) {
    char c=(char)ic;
    if (oldchars.indexOf((int)c) == -1) {
      Font font=new Font(selFont,f.getFontStyle(),1024);
      if (!font.canDisplay(c)) {
        View.showMessageDialog(null,translate("String_Node_Str").replace("String_Node_Str","String_Node_Str" + c),translate("String_Node_Str"),JOptionPane.ERROR_MESSAGE);
        return;
      }
    }
  }
  String[] yesno=new String[]{translate("String_Node_Str"),translate("String_Node_Str"),translate("String_Node_Str"),translate("String_Node_Str")};
  boolean yestoall=false;
  boolean notoall=false;
  for (  int ic : selChars) {
    char c=(char)ic;
    if (oldchars.indexOf((int)c) > -1) {
      int opt;
      if (!(yestoall || notoall)) {
        opt=View.showOptionDialog(null,translate("String_Node_Str").replace("String_Node_Str","String_Node_Str" + c),translate("String_Node_Str"),JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE,null,yesno,translate("String_Node_Str"));
        if (opt == 2) {
          yestoall=true;
        }
        if (opt == 3) {
          notoall=true;
        }
      }
 else       if (yestoall) {
        opt=0;
      }
 else       if (notoall) {
        opt=1;
      }
 else {
        opt=1;
      }
      if (opt == 1) {
        continue;
      }
    }
    f.addCharacter(swf.tags,c,fontSelection.getSelectedItem().toString());
    oldchars+=c;
  }
}

Fixed version (ground truth):
private void fontAddChars(FontTag ft,Set<Integer> selChars,String selFont){
  FontTag f=(FontTag)oldValue;
  String oldchars=f.getCharacters(swf.tags);
  for (  int ic : selChars) {
    char c=(char)ic;
    if (oldchars.indexOf((int)c) == -1) {
      Font font=new Font(selFont,f.getFontStyle(),1024);
      if (!font.canDisplay(c)) {
        View.showMessageDialog(null,translate("String_Node_Str").replace("String_Node_Str","String_Node_Str" + c),translate("String_Node_Str"),JOptionPane.ERROR_MESSAGE);
        return;
      }
    }
  }
  String[] yesno=new String[]{translate("String_Node_Str"),translate("String_Node_Str"),translate("String_Node_Str"),translate("String_Node_Str")};
  boolean yestoall=false;
  boolean notoall=false;
  for (  int ic : selChars) {
    char c=(char)ic;
    if (oldchars.indexOf((int)c) > -1) {
      int opt;
      if (!(yestoall || notoall)) {
        opt=View.showOptionDialog(null,translate("String_Node_Str").replace("String_Node_Str","String_Node_Str" + c),translate("String_Node_Str"),JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE,null,yesno,translate("String_Node_Str"));
        if (opt == 2) {
          yestoall=true;
        }
        if (opt == 3) {
          notoall=true;
        }
      }
      if (yestoall) {
        opt=0;
      }
 else       if (notoall) {
        opt=1;
      }
 else {
        opt=1;
      }
      if (opt == 1) {
        continue;
      }
    }
    f.addCharacter(swf.tags,c,fontSelection.getSelectedItem().toString());
    oldchars+=c;
  }
}
Program: 61995
Project: 61995
Buggy source:
@Override public void addCharacter(List<Tag> tags,char character,String fontName){
  int fontStyle=getFontStyle();
  FontType font=fonts.get(0);
  SHAPE shp=SHAPERECORD.systemFontCharacterToSHAPE(fontName,fontStyle,20 * font.nominalSize,character);
  int code=(int)character;
  int pos=-1;
  for (int i=0; i < font.glyphInfo.size(); i++) {
    if (font.glyphInfo.get(i).glyphCode > code) {
      pos=i;
      break;
    }
  }
  if (pos == -1) {
    pos=font.glyphInfo.size();
  }
  FontTag.shiftGlyphIndices(fontId,pos,tags);
  Font fnt=new Font(fontName,fontStyle,20 * font.nominalSize);
  int advance=(int)Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX());
  font.glyphInfo.add(pos,new GlyphInfoType(code,advance,0));
  font.glyphs.add(pos,new GlyphType(shp.shapeRecords));
  shapeCache.add(pos,font.glyphs.get(pos).toSHAPE());
  imageCache.remove("String_Node_Str" + fontId);
}

Fixed version (ground truth):
@Override public void addCharacter(List<Tag> tags,char character,String fontName){
  int fontStyle=getFontStyle();
  FontType font=fonts.get(0);
  SHAPE shp=SHAPERECORD.systemFontCharacterToSHAPE(fontName,fontStyle,20 * font.nominalSize,character);
  int code=(int)character;
  int pos=-1;
  boolean exists=false;
  for (int i=0; i < font.glyphInfo.size(); i++) {
    if (font.glyphInfo.get(i).glyphCode >= code) {
      if (font.glyphInfo.get(i).glyphCode == code) {
        exists=true;
      }
      pos=i;
      break;
    }
  }
  if (pos == -1) {
    pos=font.glyphInfo.size();
  }
  if (!exists) {
    FontTag.shiftGlyphIndices(fontId,pos,tags);
  }
  Font fnt=new Font(fontName,fontStyle,20 * font.nominalSize);
  int advance=(int)Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(),"String_Node_Str" + character).getGlyphMetrics(0).getAdvanceX());
  if (!exists) {
    font.glyphInfo.add(pos,new GlyphInfoType(code,advance,0));
    font.glyphs.add(pos,new GlyphType(shp.shapeRecords));
    shapeCache.add(pos,font.glyphs.get(pos).toSHAPE());
  }
 else {
    font.glyphInfo.set(pos,new GlyphInfoType(code,advance,0));
    font.glyphs.set(pos,new GlyphType(shp.shapeRecords));
    shapeCache.set(pos,font.glyphs.get(pos).toSHAPE());
  }
  imageCache.remove("String_Node_Str" + fontId);
}
Program: 61996
Project: 61996
Buggy source:
public static byte[] getTagHeader(Tag tag,byte[] data,int version){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  try {
    SWFOutputStream sos=new SWFOutputStream(baos,version);
    int tagLength=data.length;
    int tagID=tag.getId();
    int tagIDLength=(tagID << 6);
    if ((tagLength < 0x3f) && (!tag.forceWriteAsLong)) {
      tagIDLength+=tagLength;
      sos.writeUI16(tagIDLength);
    }
 else {
      tagIDLength+=0x3f;
      sos.writeUI16(tagIDLength);
      sos.writeSI32(tagLength);
    }
  }
 catch (  IOException iex) {
  }
  return baos.toByteArray();
}

Fixed version (ground truth):
public static byte[] getTagHeader(Tag tag,byte[] data,int version){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  try {
    SWFOutputStream sos=new SWFOutputStream(baos,version);
    int tagLength=data.length;
    int tagID=tag.getId();
    int tagIDLength=(tagID << 6);
    if ((tagLength <= 62) && (!tag.forceWriteAsLong)) {
      tagIDLength+=tagLength;
      sos.writeUI16(tagIDLength);
    }
 else {
      tagIDLength+=0x3f;
      sos.writeUI16(tagIDLength);
      sos.writeSI32(tagLength);
    }
  }
 catch (  IOException iex) {
  }
  return baos.toByteArray();
}
Program: 61997
Project: 61997
Buggy source:
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param version SWF version
 * @param pos
 * @throws IOException
 */
public GFxDefineExternalImage2(SWF swf,byte[] data,int version,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),version);
  characterId=sis.readUI32();
  bitmapFormat=sis.readUI16();
  targetWidth=sis.readUI16();
  targetHeight=sis.readUI16();
  int fileNameLen=sis.readUI8();
  fileName=new String(sis.readBytes(fileNameLen));
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param version SWF version
 * @param pos
 * @throws IOException
 */
public GFxDefineExternalImage2(SWF swf,byte[] data,int version,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),version);
  characterId=sis.readUI32();
  bitmapFormat=sis.readUI16();
  targetWidth=sis.readUI16();
  targetHeight=sis.readUI16();
  int fileNameLen=sis.readUI8();
  fileName=new String(sis.readBytes(fileNameLen));
  if (sis.available() > 0) {
    extraData=sis.readBytes(sis.available());
  }
}
Program: 61998
Project: 61998
Buggy source:
/** 
 * Gets data bytes
 * @param version SWF version
 * @return Bytes of data
 */
@Override public byte[] getData(int version){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  OutputStream os=baos;
  SWFOutputStream sos=new SWFOutputStream(os,version);
  try {
    sos.writeUI32(characterId);
    sos.writeUI16(bitmapFormat);
    sos.writeUI16(targetWidth);
    sos.writeUI16(targetHeight);
    byte fileNameBytes[]=fileName.getBytes();
    sos.writeUI8(fileNameBytes.length);
    sos.write(fileNameBytes);
  }
 catch (  IOException e) {
  }
  return baos.toByteArray();
}

Fixed version (ground truth):
/** 
 * Gets data bytes
 * @param version SWF version
 * @return Bytes of data
 */
@Override public byte[] getData(int version){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  OutputStream os=baos;
  SWFOutputStream sos=new SWFOutputStream(os,version);
  try {
    sos.writeUI32(characterId);
    sos.writeUI16(bitmapFormat);
    sos.writeUI16(targetWidth);
    sos.writeUI16(targetHeight);
    byte fileNameBytes[]=fileName.getBytes();
    sos.writeUI8(fileNameBytes.length);
    sos.write(fileNameBytes);
    if (extraData != null) {
      sos.write(extraData);
    }
  }
 catch (  IOException e) {
  }
  return baos.toByteArray();
}
Program: 61999
Project: 61999
Buggy source:
/** 
 * Gets data bytes
 * @param version SWF version
 * @return Bytes of data
 */
@Override public byte[] getData(int version){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  OutputStream os=baos;
  SWFOutputStream sos=new SWFOutputStream(os,version);
  try {
    sos.writeUI16(version);
    if (version >= 0x10a) {
      sos.writeUI32(flags);
    }
    sos.writeUI16(bitmapFormat);
    sos.writeUI8(prefix.length);
    sos.write(prefix);
    byte swfNameBytes[]=swfName.getBytes();
    sos.writeUI8(swfNameBytes.length);
    sos.write(swfNameBytes);
  }
 catch (  IOException e) {
  }
  return baos.toByteArray();
}

Fixed version (ground truth):
/** 
 * Gets data bytes
 * @param version SWF version
 * @return Bytes of data
 */
@Override public byte[] getData(int version){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  OutputStream os=baos;
  SWFOutputStream sos=new SWFOutputStream(os,version);
  try {
    sos.writeUI16(this.version);
    if (this.version >= 0x10a) {
      sos.writeUI32(flags);
    }
    sos.writeUI16(bitmapFormat);
    sos.writeUI8(prefix.length);
    sos.write(prefix);
    byte swfNameBytes[]=swfName.getBytes();
    sos.writeUI8(swfNameBytes.length);
    sos.write(swfNameBytes);
    if (codeOffsets != null) {
      sos.writeUI16(codeOffsets.size());
      for (      long l : codeOffsets) {
        sos.writeUI32(l);
      }
    }
  }
 catch (  IOException e) {
  }
  return baos.toByteArray();
}
Program: 62000
Project: 62000
Buggy source:
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param version SWF version
 * @param pos
 * @throws IOException
 */
public GFxExporterInfoTag(SWF swf,byte[] data,int version,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),version);
  version=sis.readUI16();
  if (version >= 0x10a) {
    flags=sis.readUI32();
  }
  bitmapFormat=sis.readUI16();
  int prefixLen=sis.readUI8();
  prefix=sis.readBytes(prefixLen);
  int swfNameLen=sis.readUI8();
  swfName=new String(sis.readBytes(swfNameLen));
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param version SWF version
 * @param pos
 * @throws IOException
 */
public GFxExporterInfoTag(SWF swf,byte[] data,int version,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),version);
  this.version=sis.readUI16();
  if (this.version >= 0x10a) {
    flags=sis.readUI32();
  }
  bitmapFormat=sis.readUI16();
  int prefixLen=sis.readUI8();
  prefix=sis.readBytes(prefixLen);
  int swfNameLen=sis.readUI8();
  swfName=new String(sis.readBytes(swfNameLen));
  if (sis.available() > 0) {
    codeOffsets=new ArrayList<>();
    int numCodeOffsets=sis.readUI16();
    for (int i=0; i < numCodeOffsets; i++) {
      codeOffsets.add(sis.readUI32());
    }
  }
}
Program: 62001
Project: 62001
Buggy source:
public static File getCacheDirectory(){
  File profileDir=getProfileDirectory();
  File cacheDir=null;
  if (profileDir != null) {
    cacheDir=new File(profileDir,"String_Node_Str");
  }
  if (!cacheDir.exists()) {
    return null;
  }
  return cacheDir;
}

Fixed version (ground truth):
public static File getCacheDirectory(){
  File profileDir=getProfileDirectory();
  File cacheDir=null;
  if (profileDir != null) {
    cacheDir=new File(profileDir,"String_Node_Str");
  }
  if (cacheDir == null) {
    return null;
  }
  if (!cacheDir.exists()) {
    return null;
  }
  return cacheDir;
}
Program: 62006
Project: 62006
Buggy source:
public static List<Action> removeNops(long address,List<Action> actions,int version,long swfPos,String path){
  List<Action> ret=actions;
  if (true) {
  }
  String s=null;
  try {
    s=Action.actionsToString(new ArrayList<DisassemblyListener>(),address,ret,null,version,false,false,swfPos,path);
    ret=ASMParser.parse(address,swfPos,true,new StringReader(s),SWF.DEFAULT_VERSION);
  }
 catch (  Exception ex) {
    Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE,"String_Node_Str",ex);
  }
  return ret;
}

Fixed version (ground truth):
public static List<Action> removeNops(long address,List<Action> actions,int version,long swfPos,String path){
  List<Action> ret=actions;
  if (true) {
  }
  String s=null;
  try {
    s=Action.actionsToString(new ArrayList<DisassemblyListener>(),address,ret,null,version,false,false,swfPos,path);
    ret=ASMParser.parse(address,swfPos,true,s,SWF.DEFAULT_VERSION);
  }
 catch (  Exception ex) {
    Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE,"String_Node_Str",ex);
  }
  return ret;
}
Program: 62008
Project: 62008
Buggy source:
@Override public boolean parseDivision(int pos,long addr,FlasmLexer lexer){
  codeSize=(int)(addr - getAddress() - getHeaderSize());
  return false;
}

Fixed version (ground truth):
@Override public boolean parseDivision(long size,FlasmLexer lexer){
  codeSize=(int)(size - getHeaderSize());
  return false;
}
Program: 62009
Project: 62009
Buggy source:
public ActionDefineFunction(long containerSWFPos,boolean ignoreNops,List<Label> labels,long address,FlasmLexer lexer,List<String> constantPool,int version) throws IOException, ParseException {
  super(0x9B,-1);
  functionName=lexString(lexer);
  int numParams=(int)lexLong(lexer);
  for (int i=0; i < numParams; i++) {
    paramNames.add(lexString(lexer));
  }
  lexBlockOpen(lexer);
}

Fixed version (ground truth):
public ActionDefineFunction(FlasmLexer lexer) throws IOException, ParseException {
  super(0x9B,-1);
  functionName=lexString(lexer);
  int numParams=(int)lexLong(lexer);
  for (int i=0; i < numParams; i++) {
    paramNames.add(lexString(lexer));
  }
  lexBlockOpen(lexer);
}
Program: 62010
Project: 62010
Buggy source:
public ActionWith(long containerSWFPos,boolean ignoreNops,List<Label> labels,long address,FlasmLexer lexer,List<String> constantPool,int version) throws IOException, ParseException {
  super(0x94,2);
  lexBlockOpen(lexer);
}

Fixed version (ground truth):
public ActionWith(FlasmLexer lexer) throws IOException, ParseException {
  super(0x94,2);
  lexBlockOpen(lexer);
}
Program: 62011
Project: 62011
Buggy source:
@Override public boolean parseDivision(int pos,long addr,FlasmLexer lexer){
  codeSize=(int)(addr - getAddress() - getHeaderSize());
  return false;
}

Fixed version (ground truth):
@Override public boolean parseDivision(long size,FlasmLexer lexer){
  codeSize=(int)(size - getHeaderSize());
  return false;
}
Program: 62012
Project: 62012
Buggy source:
@Override public boolean parseDivision(int pos,long addr,FlasmLexer lexer){
  codeSize=(int)(addr - getAddress() - getHeaderSize());
  return false;
}

Fixed version (ground truth):
@Override public boolean parseDivision(long size,FlasmLexer lexer){
  codeSize=(int)(size - getHeaderSize());
  return false;
}