nus-yam/ex-repair huggingface dataset:
Program: 61507
Project: 61507
Buggy source:
public GraphTextWriter getModifiers(ABC abc,boolean isStatic,GraphTextWriter writer){
  if ((kindFlags & ATTR_Override) > 0) {
    writer.appendNoHilight("String_Node_Str");
  }
  Multiname m=getName(abc);
  if (m != null) {
    DottedChain dc=findCustomNs(m.namespace_index,abc);
    String nsname=dc != null ? dc.getLast() : null;
    Namespace ns=m.getNamespace(abc.constants);
    if (nsname != null) {
      String identifier=IdentifiersDeobfuscation.printIdentifier(true,nsname);
      if (identifier != null && !identifier.isEmpty()) {
        writer.appendNoHilight(identifier).appendNoHilight("String_Node_Str");
      }
    }
    if (ns != null) {
      String nsPrefix=ns.getPrefix(abc);
      if (nsPrefix != null && !nsPrefix.isEmpty()) {
        writer.appendNoHilight(nsPrefix).appendNoHilight("String_Node_Str");
      }
    }
  }
  if (isStatic) {
    if ((this instanceof TraitSlotConst) && ((TraitSlotConst)this).isNamespace()) {
    }
 else {
      writer.appendNoHilight("String_Node_Str");
    }
  }
  if ((kindFlags & ATTR_Final) > 0) {
    if (!isStatic) {
      writer.appendNoHilight("String_Node_Str");
    }
  }
  return writer;
}

Fixed version (ground truth):
public final GraphTextWriter getModifiers(ABC abc,boolean isStatic,GraphTextWriter writer){
  if ((kindFlags & ATTR_Override) > 0) {
    writer.appendNoHilight("String_Node_Str");
  }
  Multiname m=getName(abc);
  if (m != null) {
    DottedChain dc=findCustomNs(m.namespace_index,abc);
    String nsname=dc != null ? dc.getLast() : null;
    Namespace ns=m.getNamespace(abc.constants);
    if (nsname != null) {
      String identifier=IdentifiersDeobfuscation.printIdentifier(true,nsname);
      if (identifier != null && !identifier.isEmpty()) {
        writer.appendNoHilight(identifier).appendNoHilight("String_Node_Str");
      }
    }
    if (ns != null) {
      String nsPrefix=ns.getPrefix(abc);
      if (nsPrefix != null && !nsPrefix.isEmpty()) {
        writer.appendNoHilight(nsPrefix).appendNoHilight("String_Node_Str");
      }
    }
  }
  if (isStatic) {
    if ((this instanceof TraitSlotConst) && ((TraitSlotConst)this).isNamespace()) {
    }
 else {
      writer.appendNoHilight("String_Node_Str");
    }
  }
  if ((kindFlags & ATTR_Final) > 0) {
    if (!isStatic) {
      writer.appendNoHilight("String_Node_Str");
    }
  }
  return writer;
}
Program: 61508
Project: 61508
Buggy source:
public GraphTextWriter getMetaData(ABC abc,GraphTextWriter writer){
  List<Entry<String,Map<String,String>>> md=getMetaDataTable(abc);
  for (  Entry<String,Map<String,String>> en : md) {
    String name=en.getKey();
    if (METADATA_DEFINITION.equals(name) || METADATA_CTOR_DEFINITION.equals(name)) {
      continue;
    }
    writer.append("String_Node_Str").append(name);
    if (!en.getValue().isEmpty()) {
      writer.append("String_Node_Str");
      boolean first=true;
      for (      String key : en.getValue().keySet()) {
        if (!first) {
          writer.append("String_Node_Str");
        }
        first=false;
        if (!key.isEmpty()) {
          writer.append(IdentifiersDeobfuscation.printIdentifier(true,key)).append("String_Node_Str");
        }
        writer.append("String_Node_Str");
        String val=en.getValue().get(key);
        writer.append(Helper.escapeString(val));
        writer.append("String_Node_Str");
      }
      writer.append("String_Node_Str");
    }
    writer.append("String_Node_Str");
    writer.newLine();
  }
  return writer;
}

Fixed version (ground truth):
public final GraphTextWriter getMetaData(ABC abc,GraphTextWriter writer){
  List<Entry<String,Map<String,String>>> md=getMetaDataTable(abc);
  for (  Entry<String,Map<String,String>> en : md) {
    String name=en.getKey();
    if (METADATA_DEFINITION.equals(name) || METADATA_CTOR_DEFINITION.equals(name)) {
      continue;
    }
    writer.append("String_Node_Str").append(name);
    if (!en.getValue().isEmpty()) {
      writer.append("String_Node_Str");
      boolean first=true;
      for (      String key : en.getValue().keySet()) {
        if (!first) {
          writer.append("String_Node_Str");
        }
        first=false;
        if (!key.isEmpty()) {
          writer.append(IdentifiersDeobfuscation.printIdentifier(true,key)).append("String_Node_Str");
        }
        writer.append("String_Node_Str");
        String val=en.getValue().get(key);
        writer.append(Helper.escapeString(val));
        writer.append("String_Node_Str");
      }
      writer.append("String_Node_Str");
    }
    writer.append("String_Node_Str");
    writer.newLine();
  }
  return writer;
}
Program: 61509
Project: 61509
Buggy source:
public void setScript(ScriptPack scriptLeaf){
  abcPanel.scriptNameLabel.setText(scriptLeaf.getClassPath().toString());
  int scriptIndex=scriptLeaf.scriptIndex;
  ScriptInfo script=null;
  ABC abc=scriptLeaf.abc;
  if (scriptIndex > -1) {
    script=abc.script_info.get(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.script=scriptLeaf;
  CachedDecompilation cd=null;
  try {
    cd=SWF.getCached(scriptLeaf);
  }
 catch (  InterruptedException ex) {
  }
  if (cd != null) {
    String hilightedCode=cd.text;
    highlights=cd.getInstructionHighlights();
    specialHighlights=cd.getSpecialHighligths();
    traitHighlights=cd.getTraitHighlights();
    methodHighlights=cd.getMethodHighlights();
    classHighlights=cd.getClassHighlights();
    setText(hilightedCode);
    if (classHighlights.size() > 0) {
      setCaretPosition(classHighlights.get(0).startPos);
    }
  }
  fireScript();
}

Fixed version (ground truth):
public void setScript(ScriptPack scriptLeaf){
  abcPanel.scriptNameLabel.setText(scriptLeaf.getClassPath().toString());
  int scriptIndex=scriptLeaf.scriptIndex;
  ScriptInfo script=null;
  ABC abc=scriptLeaf.abc;
  if (scriptIndex > -1) {
    script=abc.script_info.get(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.script=scriptLeaf;
  CachedDecompilation cd=null;
  try {
    cd=SWF.getCached(scriptLeaf);
  }
 catch (  InterruptedException ex) {
  }
  if (cd != null) {
    String hilightedCode=cd.text;
    highlights=cd.getInstructionHighlights();
    specialHighlights=cd.getSpecialHighligths();
    traitHighlights=cd.getTraitHighlights();
    methodHighlights=cd.getMethodHighlights();
    classHighlights=cd.getClassHighlights();
    setText(hilightedCode);
    if (classHighlights.size() > 0) {
      try {
        setCaretPosition(classHighlights.get(0).startPos);
      }
 catch (      Exception ex) {
      }
    }
  }
  fireScript();
}
Program: 61511
Project: 61511
Buggy source:
public byte[] getBytes(){
  ByteArrayOutputStream bos=new ByteArrayOutputStream();
  try {
    ABCOutputStream aos=new ABCOutputStream(bos);
    aos.write(definition.instructionCode);
    for (int i=0; i < definition.operands.length; i++) {
      int opt=definition.operands[i] & 0xff00;
switch (opt) {
case AVM2Code.OPT_S24:
        aos.writeS24(operands[i]);
      break;
case AVM2Code.OPT_U30:
    aos.writeU30(operands[i]);
  break;
case AVM2Code.OPT_U8:
aos.writeU8(operands[i]);
break;
case AVM2Code.OPT_BYTE:
aos.writeU8(0xff & operands[i]);
break;
case AVM2Code.OPT_CASE_OFFSETS:
aos.writeU30(operands[i]);
for (int j=i + 1; j < operands.length; j++) {
aos.writeS24(operands[j]);
}
break;
}
}
}
 catch (IOException ex) {
}
return bos.toByteArray();
}

Fixed version (ground truth):
public byte[] getBytes(){
  ByteArrayOutputStream bos=new ByteArrayOutputStream();
  try {
    ABCOutputStream aos=new ABCOutputStream(bos);
    aos.write(definition.instructionCode);
    for (int i=0; i < definition.operands.length; i++) {
      int opt=definition.operands[i] & 0xff00;
switch (opt) {
case AVM2Code.OPT_S24:
        aos.writeS24(operands[i]);
      break;
case AVM2Code.OPT_U30:
case AVM2Code.OPT_U30_SHORT:
    aos.writeU30(operands[i]);
  break;
case AVM2Code.OPT_U8:
aos.writeU8(operands[i]);
break;
case AVM2Code.OPT_BYTE:
aos.writeU8(0xff & operands[i]);
break;
case AVM2Code.OPT_CASE_OFFSETS:
aos.writeU30(operands[i]);
for (int j=i + 1; j < operands.length; j++) {
aos.writeS24(operands[j]);
}
break;
}
}
}
 catch (IOException ex) {
}
return bos.toByteArray();
}
Program: 61512
Project: 61512
Buggy source:
public int getBytesLength(){
  int cnt=1;
  for (int i=0; i < definition.operands.length; i++) {
    int opt=definition.operands[i] & 0xff00;
switch (opt) {
case AVM2Code.OPT_S24:
      cnt+=3;
    break;
case AVM2Code.OPT_U30:
  cnt+=ABCOutputStream.getU30ByteLength(operands[i]);
break;
case AVM2Code.OPT_U8:
cnt++;
break;
case AVM2Code.OPT_BYTE:
cnt++;
break;
case AVM2Code.OPT_CASE_OFFSETS:
cnt+=ABCOutputStream.getU30ByteLength(operands[i]);
for (int j=i + 1; j < operands.length; j++) {
cnt+=3;
}
break;
}
}
return cnt;
}

Fixed version (ground truth):
public int getBytesLength(){
  int cnt=1;
  for (int i=0; i < definition.operands.length; i++) {
    int opt=definition.operands[i] & 0xff00;
switch (opt) {
case AVM2Code.OPT_S24:
      cnt+=3;
    break;
case AVM2Code.OPT_U30:
case AVM2Code.OPT_U30_SHORT:
  cnt+=ABCOutputStream.getU30ByteLength(operands[i]);
break;
case AVM2Code.OPT_U8:
cnt++;
break;
case AVM2Code.OPT_BYTE:
cnt++;
break;
case AVM2Code.OPT_CASE_OFFSETS:
cnt+=ABCOutputStream.getU30ByteLength(operands[i]);
for (int j=i + 1; j < operands.length; j++) {
cnt+=3;
}
break;
}
}
return cnt;
}
Program: 61513
Project: 61513
Buggy source:
@Override public String toString(){
  StringBuilder s=new StringBuilder();
  s.append(instructionName);
  for (int i=0; i < operands.length; i++) {
    if ((operands[i] & 0xff00) == AVM2Code.OPT_U30) {
      s.append("String_Node_Str");
    }
    if ((operands[i] & 0xff00) == AVM2Code.OPT_U8) {
      s.append("String_Node_Str");
    }
    if ((operands[i] & 0xff00) == AVM2Code.OPT_BYTE) {
      s.append("String_Node_Str");
    }
    if ((operands[i] & 0xff00) == AVM2Code.OPT_S24) {
      s.append("String_Node_Str");
    }
    if ((operands[i] & 0xff00) == AVM2Code.OPT_CASE_OFFSETS) {
      s.append("String_Node_Str");
    }
  }
  return s.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder s=new StringBuilder();
  s.append(instructionName);
  for (int i=0; i < operands.length; i++) {
    if ((operands[i] & 0xff00) == AVM2Code.OPT_U30) {
      s.append("String_Node_Str");
    }
    if ((operands[i] & 0xff00) == AVM2Code.OPT_U30_SHORT) {
      s.append("String_Node_Str");
    }
    if ((operands[i] & 0xff00) == AVM2Code.OPT_U8) {
      s.append("String_Node_Str");
    }
    if ((operands[i] & 0xff00) == AVM2Code.OPT_BYTE) {
      s.append("String_Node_Str");
    }
    if ((operands[i] & 0xff00) == AVM2Code.OPT_S24) {
      s.append("String_Node_Str");
    }
    if ((operands[i] & 0xff00) == AVM2Code.OPT_CASE_OFFSETS) {
      s.append("String_Node_Str");
    }
  }
  return s.toString();
}
Program: 61514
Project: 61514
Buggy source:
public PushShortIns(){
  super(0x25,"String_Node_Str",new int[]{AVM2Code.OPT_U30},false);
}

Fixed version (ground truth):
public PushShortIns(){
  super(0x25,"String_Node_Str",new int[]{AVM2Code.OPT_U30_SHORT},false);
}
Program: 61515
Project: 61515
Buggy source:
public GraphTextWriter getModifiers(ABC abc,boolean isStatic,GraphTextWriter writer){
  if ((kindFlags & ATTR_Override) > 0) {
    writer.appendNoHilight("String_Node_Str");
  }
  Multiname m=getName(abc);
  if (m != null) {
    String nsname="String_Node_Str";
    for (    ABCContainerTag abcTag : abc.getAbcTags()) {
      if (m.namespace_index == -1) {
        break;
      }
      DottedChain dc=abcTag.getABC().nsValueToName(abc.constants.getNamespace(m.namespace_index).getName(abc.constants));
      nsname=dc.getLast();
      if (nsname == null) {
        break;
      }
      if (!nsname.isEmpty()) {
        break;
      }
    }
    Namespace ns=m.getNamespace(abc.constants);
    if (nsname != null) {
      String identifier=IdentifiersDeobfuscation.printIdentifier(true,nsname);
      if (identifier != null && !identifier.isEmpty()) {
        writer.appendNoHilight(identifier).appendNoHilight("String_Node_Str");
      }
    }
    if (ns != null) {
      String nsPrefix=ns.getPrefix(abc);
      if (nsPrefix != null && !nsPrefix.isEmpty()) {
        writer.appendNoHilight(nsPrefix).appendNoHilight("String_Node_Str");
      }
    }
  }
  if (isStatic) {
    if ((this instanceof TraitSlotConst) && ((TraitSlotConst)this).isNamespace()) {
    }
 else {
      writer.appendNoHilight("String_Node_Str");
    }
  }
  if ((kindFlags & ATTR_Final) > 0) {
    if (!isStatic) {
      writer.appendNoHilight("String_Node_Str");
    }
  }
  return writer;
}

Fixed version (ground truth):
public GraphTextWriter getModifiers(ABC abc,boolean isStatic,GraphTextWriter writer){
  if ((kindFlags & ATTR_Override) > 0) {
    writer.appendNoHilight("String_Node_Str");
  }
  Multiname m=getName(abc);
  if (m != null) {
    DottedChain dc=findCustomNs(m.namespace_index,abc);
    String nsname=dc != null ? dc.getLast() : null;
    Namespace ns=m.getNamespace(abc.constants);
    if (nsname != null) {
      String identifier=IdentifiersDeobfuscation.printIdentifier(true,nsname);
      if (identifier != null && !identifier.isEmpty()) {
        writer.appendNoHilight(identifier).appendNoHilight("String_Node_Str");
      }
    }
    if (ns != null) {
      String nsPrefix=ns.getPrefix(abc);
      if (nsPrefix != null && !nsPrefix.isEmpty()) {
        writer.appendNoHilight(nsPrefix).appendNoHilight("String_Node_Str");
      }
    }
  }
  if (isStatic) {
    if ((this instanceof TraitSlotConst) && ((TraitSlotConst)this).isNamespace()) {
    }
 else {
      writer.appendNoHilight("String_Node_Str");
    }
  }
  if ((kindFlags & ATTR_Final) > 0) {
    if (!isStatic) {
      writer.appendNoHilight("String_Node_Str");
    }
  }
  return writer;
}
Program: 61517
Project: 61517
Buggy source:
@Override public void translate(AVM2LocalData localData,TranslateStack stack,AVM2Instruction ins,List<GraphTargetItem> output,String path) throws InterruptedException {
  int argCount=ins.operands[0];
  List<GraphTargetItem> args=new ArrayList<>();
  for (int a=0; a < argCount; a++) {
    args.add(0,stack.pop());
  }
  GraphTargetItem obj=stack.pop();
  FullMultinameAVM2Item xmlMult=null;
  boolean isXML=false;
  if (obj instanceof GetPropertyAVM2Item) {
    GetPropertyAVM2Item gpt=(GetPropertyAVM2Item)obj;
    if (gpt.object instanceof FindPropertyAVM2Item) {
      FindPropertyAVM2Item fpt=(FindPropertyAVM2Item)gpt.object;
      xmlMult=(FullMultinameAVM2Item)fpt.propertyName;
      isXML=xmlMult.isXML(localData.constants,localData.localRegNames,localData.fullyQualifiedNames) && xmlMult.isXML(localData.constants,localData.localRegNames,localData.fullyQualifiedNames);
    }
  }
  if (obj instanceof GetLexAVM2Item) {
    GetLexAVM2Item glt=(GetLexAVM2Item)obj;
    isXML=glt.propertyName.getName(localData.constants,localData.fullyQualifiedNames,true).equals("String_Node_Str");
  }
  if (isXML) {
    if (args.size() == 1) {
      GraphTargetItem arg=args.get(0);
      List<GraphTargetItem> xmlLines=new ArrayList<>();
      if (walkXML(arg,xmlLines)) {
        stack.push(new XMLAVM2Item(ins,xmlLines));
        return;
      }
    }
  }
  stack.push(new ConstructAVM2Item(ins,obj,args));
}

Fixed version (ground truth):
@Override public void translate(AVM2LocalData localData,TranslateStack stack,AVM2Instruction ins,List<GraphTargetItem> output,String path) throws InterruptedException {
  int argCount=ins.operands[0];
  List<GraphTargetItem> args=new ArrayList<>();
  for (int a=0; a < argCount; a++) {
    args.add(0,stack.pop());
  }
  GraphTargetItem obj=stack.pop();
  boolean isXML=false;
  if (obj instanceof GetPropertyAVM2Item) {
    GetPropertyAVM2Item gpt=(GetPropertyAVM2Item)obj;
    if (gpt.object instanceof FindPropertyAVM2Item) {
      FindPropertyAVM2Item fpt=(FindPropertyAVM2Item)gpt.object;
      FullMultinameAVM2Item fptXmlMult=(FullMultinameAVM2Item)fpt.propertyName;
      FullMultinameAVM2Item gptXmlMult=(FullMultinameAVM2Item)gpt.propertyName;
      isXML=fptXmlMult.isXML(localData.constants,localData.localRegNames,localData.fullyQualifiedNames) && gptXmlMult.isXML(localData.constants,localData.localRegNames,localData.fullyQualifiedNames);
    }
  }
  if (obj instanceof GetLexAVM2Item) {
    GetLexAVM2Item glt=(GetLexAVM2Item)obj;
    isXML=glt.propertyName.getName(localData.constants,localData.fullyQualifiedNames,true).equals("String_Node_Str");
  }
  if (isXML) {
    if (args.size() == 1) {
      GraphTargetItem arg=args.get(0);
      List<GraphTargetItem> xmlLines=new ArrayList<>();
      if (walkXML(arg,xmlLines)) {
        stack.push(new XMLAVM2Item(ins,xmlLines));
        return;
      }
    }
  }
  stack.push(new ConstructAVM2Item(ins,obj,args));
}
Program: 61519
Project: 61519
Buggy source:
@Override public SerializableImage getImage(){
  if (cachedImage != null) {
    return cachedImage;
  }
  try {
    int errorLength=hasErrorHeader(imageData) ? 4 : 0;
    ByteArrayInputStream bis=new ByteArrayInputStream(imageData.getArray(),imageData.getPos() + errorLength,imageData.getLength() - errorLength);
    BufferedImage image=ImageHelper.read(bis);
    if (image == null) {
      Logger.getLogger(DefineBitsJPEG3Tag.class.getName()).log(Level.SEVERE,"String_Node_Str");
      return null;
    }
    SerializableImage img=new SerializableImage(image);
    if (bitmapAlphaData.getLength() == 0) {
      if (Configuration.cacheImages.get()) {
        cachedImage=img;
      }
      return img;
    }
    byte[] alphaData=SWFInputStream.uncompressByteArray(bitmapAlphaData.getRangeData());
    int[] pixels=((DataBufferInt)img.getRaster().getDataBuffer()).getData();
    for (int i=0; i < pixels.length; i++) {
      int a=alphaData[i] & 0xff;
      pixels[i]=multiplyAlpha((pixels[i] & 0xffffff) | (a << 24));
    }
    if (Configuration.cacheImages.get()) {
      cachedImage=img;
    }
    return img;
  }
 catch (  IOException ex) {
    Logger.getLogger(DefineBitsJPEG3Tag.class.getName()).log(Level.SEVERE,"String_Node_Str",ex);
  }
  return null;
}

Fixed version (ground truth):
@Override public SerializableImage getImage(){
  if (cachedImage != null) {
    return cachedImage;
  }
  try {
    int errorLength=hasErrorHeader(imageData) ? 4 : 0;
    ByteArrayInputStream bis=new ByteArrayInputStream(imageData.getArray(),imageData.getPos() + errorLength,imageData.getLength() - errorLength);
    BufferedImage image=ImageHelper.read(bis);
    if (image == null) {
      Logger.getLogger(DefineBitsJPEG3Tag.class.getName()).log(Level.SEVERE,"String_Node_Str");
      return null;
    }
    SerializableImage img=new SerializableImage(image);
    if (bitmapAlphaData.getLength() == 0) {
      if (Configuration.cacheImages.get()) {
        cachedImage=img;
      }
      return img;
    }
    byte[] alphaData=getImageAlpha();
    int[] pixels=((DataBufferInt)img.getRaster().getDataBuffer()).getData();
    for (int i=0; i < pixels.length; i++) {
      int a=alphaData[i] & 0xff;
      pixels[i]=multiplyAlpha((pixels[i] & 0xffffff) | (a << 24));
    }
    if (Configuration.cacheImages.get()) {
      cachedImage=img;
    }
    return img;
  }
 catch (  IOException ex) {
    Logger.getLogger(DefineBitsJPEG3Tag.class.getName()).log(Level.SEVERE,"String_Node_Str",ex);
  }
  return null;
}
Program: 61520
Project: 61520
Buggy source:
@Override public SerializableImage getImage(){
  if (cachedImage != null) {
    return cachedImage;
  }
  try {
    BufferedImage image=ImageHelper.read(new ByteArrayInputStream(imageData.getArray(),imageData.getPos(),imageData.getLength()));
    if (image == null) {
      Logger.getLogger(DefineBitsJPEG4Tag.class.getName()).log(Level.SEVERE,"String_Node_Str");
      return null;
    }
    SerializableImage img=new SerializableImage(image);
    if (bitmapAlphaData.getLength() == 0) {
      if (Configuration.cacheImages.get()) {
        cachedImage=img;
      }
      return img;
    }
    byte[] alphaData=SWFInputStream.uncompressByteArray(bitmapAlphaData.getRangeData());
    int[] pixels=((DataBufferInt)img.getRaster().getDataBuffer()).getData();
    for (int i=0; i < pixels.length; i++) {
      int a=alphaData[i] & 0xff;
      pixels[i]=multiplyAlpha((pixels[i] & 0xffffff) | (a << 24));
    }
    if (Configuration.cacheImages.get()) {
      cachedImage=img;
    }
    return img;
  }
 catch (  IOException ex) {
    Logger.getLogger(DefineBitsJPEG4Tag.class.getName()).log(Level.SEVERE,"String_Node_Str",ex);
  }
  return null;
}

Fixed version (ground truth):
@Override public SerializableImage getImage(){
  if (cachedImage != null) {
    return cachedImage;
  }
  try {
    BufferedImage image=ImageHelper.read(new ByteArrayInputStream(imageData.getArray(),imageData.getPos(),imageData.getLength()));
    if (image == null) {
      Logger.getLogger(DefineBitsJPEG4Tag.class.getName()).log(Level.SEVERE,"String_Node_Str");
      return null;
    }
    SerializableImage img=new SerializableImage(image);
    if (bitmapAlphaData.getLength() == 0) {
      if (Configuration.cacheImages.get()) {
        cachedImage=img;
      }
      return img;
    }
    byte[] alphaData=getImageAlpha();
    int[] pixels=((DataBufferInt)img.getRaster().getDataBuffer()).getData();
    for (int i=0; i < pixels.length; i++) {
      int a=alphaData[i] & 0xff;
      pixels[i]=multiplyAlpha((pixels[i] & 0xffffff) | (a << 24));
    }
    if (Configuration.cacheImages.get()) {
      cachedImage=img;
    }
    return img;
  }
 catch (  IOException ex) {
    Logger.getLogger(DefineBitsJPEG4Tag.class.getName()).log(Level.SEVERE,"String_Node_Str",ex);
  }
  return null;
}
Program: 61521
Project: 61521
Buggy source:
@Override public void setText(String t){
  lastLine=-1;
  error=false;
  if (Configuration.debugMode.get() && t.length() > truncateLimit) {
    t=t.substring(0,truncateLimit) + "String_Node_Str" + AppStrings.translate("String_Node_Str").replace("String_Node_Str",Integer.toString(truncateLimit));
  }
  super.setText(t);
  setCaretPosition(0);
}

Fixed version (ground truth):
@Override public void setText(String t){
  lastLine=-1;
  error=false;
  if (Configuration.debugMode.get() && t != null && t.length() > truncateLimit) {
    t=t.substring(0,truncateLimit) + "String_Node_Str" + AppStrings.translate("String_Node_Str").replace("String_Node_Str",Integer.toString(truncateLimit));
  }
  super.setText(t);
  setCaretPosition(0);
}
Program: 61525
Project: 61525
Buggy source:
public MethodBody convertMethodBody(String path,boolean isStatic,int scriptIndex,int classIndex,ABC abc,Trait trait,AVM2ConstantPool constants,List<MethodInfo> method_info,ScopeStack scopeStack,boolean isStaticInitializer,List<String> fullyQualifiedNames,Traits initTraits) throws InterruptedException {
  MethodBody body=clone();
  AVM2Code code=body.getCode();
  code.markMappedOffsets();
  code.fixJumps(path,body);
  if (Configuration.autoDeobfuscate.get()) {
    try {
      code.removeTraps(constants,trait,method_info.get(this.method_info),body,abc,scriptIndex,classIndex,isStatic,path);
    }
 catch (    InterruptedException ex) {
      throw ex;
    }
catch (    Throwable ex) {
      return this;
    }
  }
  return body;
}

Fixed version (ground truth):
public MethodBody convertMethodBody(String path,boolean isStatic,int scriptIndex,int classIndex,ABC abc,Trait trait,AVM2ConstantPool constants,List<MethodInfo> method_info,ScopeStack scopeStack,boolean isStaticInitializer,List<String> fullyQualifiedNames,Traits initTraits) throws InterruptedException {
  MethodBody body=clone();
  AVM2Code code=body.getCode();
  code.markMappedOffsets();
  code.fixJumps(path,body);
  if (Configuration.autoDeobfuscate.get()) {
    try {
      code.removeTraps(constants,trait,method_info.get(this.method_info),body,abc,scriptIndex,classIndex,isStatic,path);
    }
 catch (    ThreadDeath|InterruptedException ex) {
      throw ex;
    }
catch (    Throwable ex) {
      return this;
    }
  }
  return body;
}
Program: 61527
Project: 61527
Buggy source:
private void getPrecontinues(String path,BaseLocalData localData,GraphPart parent,GraphPart part,List<GraphPart> allParts,List<Loop> loops,List<GraphPart> stopPart) throws InterruptedException {
  try {
    markLevels(path,localData,part,allParts,loops);
  }
 catch (  InterruptedException iex) {
    throw iex;
  }
catch (  Throwable ex) {
  }
  looploops:   for (  Loop l : loops) {
    if (l.loopContinue != null) {
      Set<GraphPart> uniqueRefs=new HashSet<>();
      uniqueRefs.addAll(l.loopContinue.refs);
      if (uniqueRefs.size() == 2) {
        List<GraphPart> uniqueRefsList=new ArrayList<>(uniqueRefs);
        if (uniqueRefsList.get(0).discoveredTime > uniqueRefsList.get(1).discoveredTime) {
          part=uniqueRefsList.get(0);
        }
 else {
          part=uniqueRefsList.get(1);
        }
        if (part == l.loopContinue) {
          continue looploops;
        }
        while (part.refs.size() == 1) {
          if (part.refs.get(0).nextParts.size() != 1) {
            continue looploops;
          }
          part=part.refs.get(0);
          if (part == l.loopContinue) {
            break;
          }
        }
        if (part.level == 0 && part != l.loopContinue) {
          l.loopPreContinue=part;
        }
      }
    }
  }
}

Fixed version (ground truth):
private void getPrecontinues(String path,BaseLocalData localData,GraphPart parent,GraphPart part,List<GraphPart> allParts,List<Loop> loops,List<GraphPart> stopPart) throws InterruptedException {
  try {
    markLevels(path,localData,part,allParts,loops);
  }
 catch (  ThreadDeath|InterruptedException iex) {
    throw iex;
  }
catch (  Throwable ex) {
  }
  looploops:   for (  Loop l : loops) {
    if (l.loopContinue != null) {
      Set<GraphPart> uniqueRefs=new HashSet<>();
      uniqueRefs.addAll(l.loopContinue.refs);
      if (uniqueRefs.size() == 2) {
        List<GraphPart> uniqueRefsList=new ArrayList<>(uniqueRefs);
        if (uniqueRefsList.get(0).discoveredTime > uniqueRefsList.get(1).discoveredTime) {
          part=uniqueRefsList.get(0);
        }
 else {
          part=uniqueRefsList.get(1);
        }
        if (part == l.loopContinue) {
          continue looploops;
        }
        while (part.refs.size() == 1) {
          if (part.refs.get(0).nextParts.size() != 1) {
            continue looploops;
          }
          part=part.refs.get(0);
          if (part == l.loopContinue) {
            break;
          }
        }
        if (part.level == 0 && part != l.loopContinue) {
          l.loopPreContinue=part;
        }
      }
    }
  }
}
Program: 61529
Project: 61529
Buggy source:
@Override protected int checkIp(int ip){
  int oldIp=ip;
  GraphSourceItem action=code.get(ip);
  if ((action instanceof ActionPush) && (((ActionPush)action).values.size() == 1) && (((ActionPush)action).values.get(0) instanceof Null)) {
    if (ip + 3 < code.size()) {
      if ((code.get(ip + 1) instanceof ActionEquals) || (code.get(ip + 1) instanceof ActionEquals2)) {
        if (code.get(ip + 2) instanceof ActionNot) {
          if (code.get(ip + 3) instanceof ActionIf) {
            ActionIf aif=(ActionIf)code.get(ip + 3);
            if (code.adr2pos(code.pos2adr(ip + 4) + aif.getJumpOffset()) == ip) {
              ip+=4;
            }
          }
        }
      }
    }
  }
  if (oldIp != ip) {
    return checkIp(ip);
  }
  return ip;
}

Fixed version (ground truth):
@Override protected int checkIp(int ip){
  int oldIp=ip;
  GraphSourceItem action=code.get(ip);
  if ((action instanceof ActionPush) && (((ActionPush)action).values.size() == 1) && (((ActionPush)action).values.get(0) instanceof Null)) {
    if (ip + 4 < code.size()) {
      if ((code.get(ip + 1) instanceof ActionEquals) || (code.get(ip + 1) instanceof ActionEquals2)) {
        if (code.get(ip + 2) instanceof ActionNot) {
          if (code.get(ip + 3) instanceof ActionIf) {
            ActionIf aif=(ActionIf)code.get(ip + 3);
            if (code.adr2pos(code.pos2adr(ip + 4) + aif.getJumpOffset()) == ip) {
              ip+=4;
            }
          }
        }
      }
    }
  }
  if (oldIp != ip) {
    return checkIp(ip);
  }
  return ip;
}
Program: 61530
Project: 61530
Buggy source:
private GraphTargetItem type(List<VariableActionItem> variables) throws IOException, ActionParseException {
  GraphTargetItem ret=null;
  ParsedSymbol s=lex();
  expected(s,lexer.yyline(),SymbolType.IDENTIFIER,SymbolType.STRING_OP);
  ret=new VariableActionItem(s.value.toString(),null,false);
  variables.add((VariableActionItem)ret);
  s=lex();
  while (s.type == SymbolType.DOT) {
    s=lex();
    expected(s,lexer.yyline(),SymbolType.IDENTIFIER,SymbolType.STRING_OP);
    ret=new GetMemberActionItem(null,ret,pushConst(s.value.toString()));
    s=lex();
  }
  lexer.pushback(s);
  return ret;
}

Fixed version (ground truth):
private GraphTargetItem type(List<VariableActionItem> variables) throws IOException, ActionParseException {
  GraphTargetItem ret=null;
  ParsedSymbol s=lex();
  expected(s,lexer.yyline(),SymbolType.IDENTIFIER,SymbolType.STRING_OP);
  ret=new VariableActionItem(s.value.toString(),null,false);
  variables.add((VariableActionItem)ret);
  s=lex();
  while (s.type == SymbolType.DOT) {
    s=lex();
    expected(s,lexer.yyline(),SymbolType.IDENTIFIER,SymbolType.STRING_OP,SymbolGroup.GLOBALFUNC);
    ret=new GetMemberActionItem(null,ret,pushConst(s.value.toString()));
    s=lex();
  }
  lexer.pushback(s);
  return ret;
}
Program: 61531
Project: 61531
Buggy source:
private GraphTargetItem memberOrCall(GraphTargetItem ret,boolean inFunction,boolean inMethod,List<VariableActionItem> variables) throws IOException, ActionParseException {
  ParsedSymbol op=lex();
  while (op.isType(SymbolType.PARENT_OPEN,SymbolType.BRACKET_OPEN,SymbolType.DOT)) {
    if (op.type == SymbolType.PARENT_OPEN) {
      List<GraphTargetItem> args=call(inFunction,inMethod,variables);
      if (ret instanceof GetMemberActionItem) {
        GetMemberActionItem mem=(GetMemberActionItem)ret;
        ret=new CallMethodActionItem(null,mem.object,mem.memberName,args);
      }
 else       if (ret instanceof VariableActionItem) {
        VariableActionItem var=(VariableActionItem)ret;
        ret=new CallFunctionActionItem(null,pushConst(var.getVariableName()),args);
      }
 else {
        ret=new CallFunctionActionItem(null,ret,args);
      }
    }
    if (op.type == SymbolType.BRACKET_OPEN) {
      GraphTargetItem rhs=expression(inFunction,inMethod,false,variables);
      ret=new GetMemberActionItem(null,ret,rhs);
      expectedType(SymbolType.BRACKET_CLOSE);
    }
    if (op.type == SymbolType.DOT) {
      ParsedSymbol s=lex();
      expected(s,lexer.yyline(),SymbolType.IDENTIFIER,SymbolType.THIS,SymbolType.SUPER,SymbolType.STRING_OP);
      ret=new GetMemberActionItem(null,ret,pushConst(s.value.toString()));
    }
    op=lex();
  }
  lexer.pushback(op);
  return ret;
}

Fixed version (ground truth):
private GraphTargetItem memberOrCall(GraphTargetItem ret,boolean inFunction,boolean inMethod,List<VariableActionItem> variables) throws IOException, ActionParseException {
  ParsedSymbol op=lex();
  while (op.isType(SymbolType.PARENT_OPEN,SymbolType.BRACKET_OPEN,SymbolType.DOT)) {
    if (op.type == SymbolType.PARENT_OPEN) {
      List<GraphTargetItem> args=call(inFunction,inMethod,variables);
      if (ret instanceof GetMemberActionItem) {
        GetMemberActionItem mem=(GetMemberActionItem)ret;
        ret=new CallMethodActionItem(null,mem.object,mem.memberName,args);
      }
 else       if (ret instanceof VariableActionItem) {
        VariableActionItem var=(VariableActionItem)ret;
        ret=new CallFunctionActionItem(null,pushConst(var.getVariableName()),args);
      }
 else {
        ret=new CallFunctionActionItem(null,ret,args);
      }
    }
    if (op.type == SymbolType.BRACKET_OPEN) {
      GraphTargetItem rhs=expression(inFunction,inMethod,false,variables);
      ret=new GetMemberActionItem(null,ret,rhs);
      expectedType(SymbolType.BRACKET_CLOSE);
    }
    if (op.type == SymbolType.DOT) {
      ParsedSymbol s=lex();
      expected(s,lexer.yyline(),SymbolType.IDENTIFIER,SymbolType.THIS,SymbolType.SUPER,SymbolType.STRING_OP,SymbolGroup.GLOBALFUNC);
      ret=new GetMemberActionItem(null,ret,pushConst(s.value.toString()));
    }
    op=lex();
  }
  lexer.pushback(op);
  return ret;
}
Program: 61536
Project: 61536
Buggy source:
private int readU30Internal() throws IOException {
  return (int)readU32Internal();
}

Fixed version (ground truth):
private int readU30Internal() throws IOException {
  long u32=readU32Internal();
  return (int)(u32 & 0x3FFFFFFF);
}
Program: 61537
Project: 61537
Buggy source:
public void fixJumps(MethodBody body){
  buildCache();
  AVM2Instruction lastInstuction=code.get(code.size() - 1);
  final long endOffset=lastInstuction.offset + lastInstuction.getBytesLength();
  updateOffsets(new OffsetUpdater(){
    @Override public long updateInstructionOffset(    long address){
      return address;
    }
    @Override public int updateOperandOffset(    long insAddr,    long targetAddress,    int offset){
      if (targetAddress > endOffset) {
        return (int)(offset - targetAddress + endOffset);
      }
      if (targetAddress < 0) {
        return (int)(offset - targetAddress);
      }
      int targetPos=posCache.indexOf(targetAddress);
      if (targetPos == -1) {
        return (int)(offset - targetAddress + endOffset);
      }
      return offset;
    }
  }
,body);
}

Fixed version (ground truth):
public void fixJumps(MethodBody body){
  buildCache();
  if (code.isEmpty()) {
    return;
  }
  AVM2Instruction lastInstuction=code.get(code.size() - 1);
  final long endOffset=lastInstuction.offset + lastInstuction.getBytesLength();
  updateOffsets(new OffsetUpdater(){
    @Override public long updateInstructionOffset(    long address){
      return address;
    }
    @Override public int updateOperandOffset(    long insAddr,    long targetAddress,    int offset){
      if (targetAddress > endOffset) {
        return (int)(offset - targetAddress + endOffset);
      }
      if (targetAddress < 0) {
        return (int)(offset - targetAddress);
      }
      int targetPos=posCache.indexOf(targetAddress);
      if (targetPos == -1) {
        return (int)(offset - targetAddress + endOffset);
      }
      return offset;
    }
  }
,body);
}
Program: 61541
Project: 61541
Buggy source:
protected FullMultinameAVM2Item resolveMultiname(TranslateStack stack,AVM2ConstantPool constants,int multinameIndex,AVM2Instruction ins){
  GraphTargetItem ns=null;
  GraphTargetItem name=null;
  if (constants.getMultiname(multinameIndex).needsName()) {
    name=stack.pop();
  }
  if (constants.getMultiname(multinameIndex).needsNs()) {
    ns=stack.pop();
  }
  return new FullMultinameAVM2Item(ins,multinameIndex,name,ns);
}

Fixed version (ground truth):
protected FullMultinameAVM2Item resolveMultiname(TranslateStack stack,AVM2ConstantPool constants,int multinameIndex,AVM2Instruction ins){
  GraphTargetItem ns=null;
  GraphTargetItem name=null;
  if (multinameIndex < constants.constant_multiname.size()) {
    if (constants.getMultiname(multinameIndex).needsName()) {
      name=stack.pop();
    }
    if (constants.getMultiname(multinameIndex).needsNs()) {
      ns=stack.pop();
    }
  }
  return new FullMultinameAVM2Item(ins,multinameIndex,name,ns);
}
Program: 61542
Project: 61542
Buggy source:
public MethodBody(Traits traits,byte[] codeBytes,ABCException[] exceptions){
  this.traits=traits;
  this.codeBytes=codeBytes;
  this.exceptions=exceptions;
}

Fixed version (ground truth):
public MethodBody(ABC abc,Traits traits,byte[] codeBytes,ABCException[] exceptions){
  this.traits=traits;
  this.codeBytes=codeBytes;
  this.exceptions=exceptions;
  this.abc=abc;
}
Program: 61543
Project: 61543
Buggy source:
public synchronized AVM2Code getCode(){
  if (code == null) {
    AVM2Code avm2Code;
    try {
      ABCInputStream ais=new ABCInputStream(new MemoryInputStream(codeBytes));
      avm2Code=new AVM2Code(ais);
    }
 catch (    UnknownInstructionCode|IOException ex) {
      avm2Code=new AVM2Code();
      logger.log(Level.SEVERE,null,ex);
    }
    avm2Code.compact();
    code=avm2Code;
  }
  return code;
}

Fixed version (ground truth):
public synchronized AVM2Code getCode(){
  if (code == null) {
    AVM2Code avm2Code;
    try {
      ABCInputStream ais=new ABCInputStream(new MemoryInputStream(codeBytes));
      avm2Code=new AVM2Code(ais);
      avm2Code.removeWrongIndices(abc.constants);
    }
 catch (    UnknownInstructionCode|IOException ex) {
      avm2Code=new AVM2Code();
      logger.log(Level.SEVERE,null,ex);
    }
    avm2Code.compact();
    code=avm2Code;
  }
  return code;
}
Program: 61545
Project: 61545
Buggy source:
private MethodBody compilePCode(String str) throws IOException, AVM2ParseException, InterruptedException {
  str="String_Node_Str" + "String_Node_Str" + "String_Node_Str" + str + "String_Node_Str";
  MethodBody b=new MethodBody();
  AVM2Code code=ASM3Parser.parse(new StringReader(str),getABC().constants,null,b,new MethodInfo());
  b.setCode(code);
  return b;
}

Fixed version (ground truth):
private MethodBody compilePCode(String str) throws IOException, AVM2ParseException, InterruptedException {
  str="String_Node_Str" + "String_Node_Str" + "String_Node_Str" + str + "String_Node_Str";
  MethodBody b=new MethodBody(getABC());
  AVM2Code code=ASM3Parser.parse(new StringReader(str),getABC().constants,null,b,new MethodInfo());
  b.setCode(code);
  return b;
}
Program: 61546
Project: 61546
Buggy source:
private String recompilePCode(String str) throws IOException, AVM2ParseException, InterruptedException {
  str="String_Node_Str" + "String_Node_Str" + "String_Node_Str" + str + "String_Node_Str";
  final ABC abc=new ABC(new ABCContainerTag(){
    @Override public ABC getABC(){
      return null;
    }
    @Override public SWF getSwf(){
      return swf;
    }
    @Override public int compareTo(    ABCContainerTag o){
      return 0;
    }
  }
);
  MethodBody b=new MethodBody();
  AVM2Code code=ASM3Parser.parse(new StringReader(str),abc.constants,null,b,new MethodInfo());
  b.setCode(code);
  new AVM2DeobfuscatorJumps().deobfuscate("String_Node_Str",0,true,0,abc,abc.constants,null,new MethodInfo(),b);
  HighlightedTextWriter writer=new HighlightedTextWriter(new CodeFormatting(),false);
  code.toASMSource(abc.constants,null,new MethodInfo(),new MethodBody(),ScriptExportMode.PCODE,writer);
  String ret=writer.toString();
  return ret.substring(ret.lastIndexOf("String_Node_Str") + 6);
}

Fixed version (ground truth):
private String recompilePCode(String str) throws IOException, AVM2ParseException, InterruptedException {
  str="String_Node_Str" + "String_Node_Str" + "String_Node_Str" + str + "String_Node_Str";
  final ABC abc=new ABC(new ABCContainerTag(){
    @Override public ABC getABC(){
      return null;
    }
    @Override public SWF getSwf(){
      return swf;
    }
    @Override public int compareTo(    ABCContainerTag o){
      return 0;
    }
  }
);
  MethodBody b=new MethodBody(abc);
  AVM2Code code=ASM3Parser.parse(new StringReader(str),abc.constants,null,b,new MethodInfo());
  b.setCode(code);
  new AVM2DeobfuscatorJumps().deobfuscate("String_Node_Str",0,true,0,abc,abc.constants,null,new MethodInfo(),b);
  HighlightedTextWriter writer=new HighlightedTextWriter(new CodeFormatting(),false);
  code.toASMSource(abc.constants,null,new MethodInfo(),new MethodBody(abc),ScriptExportMode.PCODE,writer);
  String ret=writer.toString();
  return ret.substring(ret.lastIndexOf("String_Node_Str") + 6);
}
Program: 61547
Project: 61547
Buggy source:
public static int getParallelThreadCount(){
  int count=parallelThreadCount.get();
  if (count < 2) {
    count=2;
  }
  return count;
}

Fixed version (ground truth):
public static int getParallelThreadCount(){
  int count=parallelSpeedUpThreadCount.get();
  if (count < 2) {
    count=2;
  }
  return count;
}
Program: 61548
Project: 61548
Buggy source:
public HTMLTextParser(List<Tag> tags,DefineEditTextTag det){
  if (det.hasFont) {
    String fontName=null;
    FontTag ft=null;
    for (    Tag u : tags) {
      if (u instanceof DefineFontNameTag) {
        if (((DefineFontNameTag)u).fontId == det.fontId) {
          fontName=((DefineFontNameTag)u).fontName;
        }
      }
      if (u instanceof FontTag) {
        if (((FontTag)u).getFontId() == det.fontId) {
          ft=(FontTag)u;
        }
      }
      if (fontName != null && ft != null) {
        break;
      }
    }
    if (ft != null) {
      if (fontName == null) {
        fontName=ft.getFontNameIntag();
      }
      italic=ft.isItalic();
      bold=ft.isBold();
      size=det.fontHeight;
      fontFace=new Font(fontName,(italic ? Font.ITALIC : 0) | (bold ? Font.BOLD : 0) | (!italic && !bold ? Font.PLAIN : 0),size < 0 ? 10 : size).getPSName();
    }
  }
  if (det.hasLayout) {
    leftMargin=det.leftMargin;
    rightMargin=det.rightMargin;
    indent=det.indent;
    lineSpacing=det.leading;
    String[] alignNames={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    if (det.align < alignNames.length) {
      alignment=alignNames[det.align];
    }
 else {
      alignment="String_Node_Str";
    }
  }
  this.tags=tags;
}

Fixed version (ground truth):
public HTMLTextParser(List<Tag> tags,DefineEditTextTag det){
  if (det.hasFont) {
    String fontName=null;
    FontTag ft=null;
    for (    Tag u : tags) {
      if (u instanceof DefineFontNameTag) {
        if (((DefineFontNameTag)u).fontId == det.fontId) {
          fontName=((DefineFontNameTag)u).fontName;
        }
      }
      if (u instanceof FontTag) {
        if (((FontTag)u).getFontId() == det.fontId) {
          ft=(FontTag)u;
        }
      }
      if (fontName != null && ft != null) {
        break;
      }
    }
    if (ft != null) {
      if (fontName == null) {
        fontName=ft.getFontNameIntag();
      }
      if (fontName == null) {
        fontName=FontTag.defaultFontName;
      }
      italic=ft.isItalic();
      bold=ft.isBold();
      size=det.fontHeight;
      fontFace=new Font(fontName,(italic ? Font.ITALIC : 0) | (bold ? Font.BOLD : 0) | (!italic && !bold ? Font.PLAIN : 0),size < 0 ? 10 : size).getPSName();
    }
  }
  if (det.hasLayout) {
    leftMargin=det.leftMargin;
    rightMargin=det.rightMargin;
    indent=det.indent;
    lineSpacing=det.leading;
    String[] alignNames={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    if (det.align < alignNames.length) {
      alignment=alignNames[det.align];
    }
 else {
      alignment="String_Node_Str";
    }
  }
  this.tags=tags;
}
Program: 61556
Project: 61556
Buggy source:
public boolean exportAS3Class(String className,String outdir,ScriptExportSettings exportSettings,boolean parallel,EventListener evl) throws Exception {
  boolean exported=false;
  List<ABCContainerTag> abcList=getAbcList();
  for (int i=0; i < abcList.size(); i++) {
    ABC abc=abcList.get(i).getABC();
    List<ScriptPack> scrs=abc.findScriptPacksByPath(className);
    for (int j=0; j < scrs.size(); j++) {
      ScriptPack scr=scrs.get(j);
      String cnt="String_Node_Str";
      if (scrs.size() > 1) {
        cnt="String_Node_Str" + (j + 1) + "String_Node_Str"+ scrs.size()+ "String_Node_Str";
      }
      String eventData=cnt + scr.getPath() + "String_Node_Str";
      evl.handleExportingEvent("String_Node_Str",i + 1,abcList.size(),eventData);
      scr.export(outdir,exportSettings,parallel);
      evl.handleExportedEvent("String_Node_Str",i + 1,abcList.size(),eventData);
      exported=true;
    }
  }
  return exported;
}

Fixed version (ground truth):
public boolean exportAS3Class(String className,String outdir,ScriptExportSettings exportSettings,boolean parallel,EventListener evl) throws Exception {
  boolean exported=false;
  List<ABCContainerTag> abcList=getAbcList();
  List<ABC> allAbcList=new ArrayList<>();
  for (int i=0; i < abcList.size(); i++) {
    allAbcList.add(abcList.get(i).getABC());
  }
  for (int i=0; i < abcList.size(); i++) {
    ABC abc=abcList.get(i).getABC();
    List<ScriptPack> scrs=abc.findScriptPacksByPath(className,allAbcList);
    for (int j=0; j < scrs.size(); j++) {
      ScriptPack scr=scrs.get(j);
      String cnt="String_Node_Str";
      if (scrs.size() > 1) {
        cnt="String_Node_Str" + (j + 1) + "String_Node_Str"+ scrs.size()+ "String_Node_Str";
      }
      String eventData=cnt + scr.getPath() + "String_Node_Str";
      evl.handleExportingEvent("String_Node_Str",i + 1,abcList.size(),eventData);
      scr.export(outdir,exportSettings,parallel);
      evl.handleExportedEvent("String_Node_Str",i + 1,abcList.size(),eventData);
      exported=true;
    }
  }
  return exported;
}
Program: 61557
Project: 61557
Buggy source:
public List<ScriptPack> getAS3Packs(){
  List<ScriptPack> packs=new ArrayList<>();
  for (  ABCContainerTag abcTag : getAbcList()) {
    packs.addAll(abcTag.getABC().getScriptPacks(null));
  }
  return uniqueAS3Packs(packs);
}

Fixed version (ground truth):
public List<ScriptPack> getAS3Packs(){
  List<ScriptPack> packs=new ArrayList<>();
  List<ABCContainerTag> abcList=getAbcList();
  List<ABC> allAbcList=new ArrayList<>();
  for (int i=0; i < abcList.size(); i++) {
    allAbcList.add(abcList.get(i).getABC());
  }
  for (  ABCContainerTag abcTag : abcList) {
    packs.addAll(abcTag.getABC().getScriptPacks(null,allAbcList));
  }
  return uniqueAS3Packs(packs);
}
Program: 61558
Project: 61558
Buggy source:
public List<ScriptPack> findScriptPacksByPath(String name){
  List<ScriptPack> ret=new ArrayList<>();
  List<ScriptPack> allPacks=getScriptPacks(null);
  if (name.endsWith("String_Node_Str") || name.equals("String_Node_Str") || name.endsWith("String_Node_Str")|| name.equals("String_Node_Str")) {
    name=name.substring(0,name.length() - 2);
    for (    ScriptPack en : allPacks) {
      if (en.getClassPath().toString().startsWith(name)) {
        ret.add(en);
      }
    }
  }
 else   if (name.endsWith("String_Node_Str") || name.equals("String_Node_Str") || name.endsWith("String_Node_Str")|| name.equals("String_Node_Str")) {
    name=name.substring(0,name.length() - 1);
    for (    ScriptPack en : allPacks) {
      String classPathStr=en.getClassPath().toString();
      if (classPathStr.startsWith(name)) {
        String rem=name.isEmpty() ? classPathStr : classPathStr.substring(name.length());
        if (!rem.contains("String_Node_Str")) {
          ret.add(en);
        }
      }
    }
  }
 else {
    ScriptPack p=findScriptPackByPath(name);
    if (p != null) {
      ret.add(p);
    }
  }
  return ret;
}

Fixed version (ground truth):
public List<ScriptPack> findScriptPacksByPath(String name,List<ABC> allAbcs){
  List<ScriptPack> ret=new ArrayList<>();
  List<ScriptPack> allPacks=getScriptPacks(null,allAbcs);
  if (name.endsWith("String_Node_Str") || name.equals("String_Node_Str") || name.endsWith("String_Node_Str")|| name.equals("String_Node_Str")) {
    name=name.substring(0,name.length() - 2);
    for (    ScriptPack en : allPacks) {
      if (en.getClassPath().toString().startsWith(name)) {
        ret.add(en);
      }
    }
  }
 else   if (name.endsWith("String_Node_Str") || name.equals("String_Node_Str") || name.endsWith("String_Node_Str")|| name.equals("String_Node_Str")) {
    name=name.substring(0,name.length() - 1);
    for (    ScriptPack en : allPacks) {
      String classPathStr=en.getClassPath().toString();
      if (classPathStr.startsWith(name)) {
        String rem=name.isEmpty() ? classPathStr : classPathStr.substring(name.length());
        if (!rem.contains("String_Node_Str")) {
          ret.add(en);
        }
      }
    }
  }
 else {
    ScriptPack p=findScriptPackByPath(name,allAbcs);
    if (p != null) {
      ret.add(p);
    }
  }
  return ret;
}
Program: 61559
Project: 61559
Buggy source:
public ScriptPack findScriptPackByPath(String name){
  List<ScriptPack> packs=getScriptPacks(null);
  for (  ScriptPack en : packs) {
    if (en.getClassPath().toString().equals(name)) {
      return en;
    }
  }
  return null;
}

Fixed version (ground truth):
public ScriptPack findScriptPackByPath(String name,List<ABC> allAbcs){
  List<ScriptPack> packs=getScriptPacks(null,allAbcs);
  for (  ScriptPack en : packs) {
    if (en.getClassPath().toString().equals(name)) {
      return en;
    }
  }
  return null;
}