nus-yam/ex-repair huggingface dataset:
Program: 61765
Project: 61765
Buggy source:
@Override public GraphTextWriter appendTo(GraphTextWriter writer,LocalData localData) throws InterruptedException {
  if (writer instanceof NulWriter) {
    ((NulWriter)writer).startLoop(loop.id,LoopWithType.LOOP_TYPE_LOOP);
  }
  if (labelUsed) {
    writer.append("String_Node_Str" + loop.id + "String_Node_Str").newLine();
  }
  writer.append("String_Node_Str");
  for (int i=0; i < expression.size(); i++) {
    if (expression.get(i).isEmpty()) {
      continue;
    }
    if (i != 0) {
      writer.append("String_Node_Str");
    }
    expression.get(i).toString(writer,localData);
  }
  writer.append("String_Node_Str");
  writer.startBlock();
  for (  GraphTargetItem ti : commands) {
    if (!ti.isEmpty()) {
      ti.toStringSemicoloned(writer,localData).newLine();
    }
  }
  writer.endBlock();
  if (writer instanceof NulWriter) {
    LoopWithType loopOjb=((NulWriter)writer).endLoop(loop.id);
    labelUsed=loopOjb.used;
  }
  return writer;
}

Fixed version (ground truth):
@Override public GraphTextWriter appendTo(GraphTextWriter writer,LocalData localData) throws InterruptedException {
  if (writer instanceof NulWriter) {
    ((NulWriter)writer).startLoop(loop.id,LoopWithType.LOOP_TYPE_LOOP);
  }
  if (labelUsed) {
    writer.append("String_Node_Str" + loop.id + "String_Node_Str").newLine();
  }
  writer.append("String_Node_Str");
  if (writer.getFormatting().spaceBeforeParenthesesWhileParentheses) {
    writer.append("String_Node_Str");
  }
  writer.append("String_Node_Str");
  for (int i=0; i < expression.size(); i++) {
    if (expression.get(i).isEmpty()) {
      continue;
    }
    if (i != 0) {
      writer.append("String_Node_Str");
    }
    expression.get(i).toString(writer,localData);
  }
  writer.append("String_Node_Str");
  writer.startBlock();
  for (  GraphTargetItem ti : commands) {
    if (!ti.isEmpty()) {
      ti.toStringSemicoloned(writer,localData).newLine();
    }
  }
  writer.endBlock();
  if (writer instanceof NulWriter) {
    LoopWithType loopOjb=((NulWriter)writer).endLoop(loop.id);
    labelUsed=loopOjb.used;
  }
  return writer;
}
Program: 61766
Project: 61766
Buggy source:
@Override protected Object doInBackground() throws Exception {
  boolean first=true;
  for (  final SWFSourceInfo sourceInfo : sourceInfos) {
    SWFList swfs=null;
    try {
      Main.startWork(AppStrings.translate("String_Node_Str") + "String_Node_Str");
      swfs=parseSWF(sourceInfo);
    }
 catch (    OutOfMemoryError ex) {
      logger.log(Level.SEVERE,null,ex);
      View.showMessageDialog(null,"String_Node_Str");
    }
catch (    Exception ex) {
      logger.log(Level.SEVERE,null,ex);
      View.showMessageDialog(null,"String_Node_Str");
    }
    final SWFList swfs1=swfs;
    final boolean first1=first;
    first=false;
    try {
      Main.startWork(AppStrings.translate("String_Node_Str") + "String_Node_Str");
      View.execInEventDispatch(new Runnable(){
        @Override public void run(){
          ensureMainFrame();
          mainFrame.getPanel().load(swfs1,first1);
        }
      }
);
    }
 catch (    Exception ex) {
      logger.log(Level.SEVERE,null,ex);
    }
  }
  loadingDialog.setVisible(false);
  View.execInEventDispatch(new Runnable(){
    @Override public void run(){
      if (mainFrame != null) {
        mainFrame.setVisible(true);
      }
      Main.stopWork();
    }
  }
);
  return true;
}

Fixed version (ground truth):
@Override protected Object doInBackground() throws Exception {
  boolean first=true;
  SWF firstSWF=null;
  for (  final SWFSourceInfo sourceInfo : sourceInfos) {
    SWFList swfs=null;
    try {
      Main.startWork(AppStrings.translate("String_Node_Str") + "String_Node_Str");
      swfs=parseSWF(sourceInfo);
    }
 catch (    OutOfMemoryError ex) {
      logger.log(Level.SEVERE,null,ex);
      View.showMessageDialog(null,"String_Node_Str");
    }
catch (    Exception ex) {
      logger.log(Level.SEVERE,null,ex);
      View.showMessageDialog(null,"String_Node_Str");
    }
    final SWFList swfs1=swfs;
    final boolean first1=first;
    first=false;
    if (firstSWF == null) {
      firstSWF=swfs1.get(0);
    }
    try {
      Main.startWork(AppStrings.translate("String_Node_Str") + "String_Node_Str");
      View.execInEventDispatch(new Runnable(){
        @Override public void run(){
          ensureMainFrame();
          mainFrame.getPanel().load(swfs1,first1);
        }
      }
);
    }
 catch (    Exception ex) {
      logger.log(Level.SEVERE,null,ex);
    }
  }
  loadingDialog.setVisible(false);
  final SWF fswf=firstSWF;
  View.execInEventDispatch(new Runnable(){
    @Override public void run(){
      if (mainFrame != null) {
        mainFrame.setVisible(true);
      }
      Main.stopWork();
      if (mainFrame != null && Configuration.gotoMainClassOnStartup.get()) {
        mainFrame.getPanel().gotoDocumentClass(fswf);
      }
    }
  }
);
  return true;
}
Program: 61767
Project: 61767
Buggy source:
public void convertPackaged(Trait parent,String path,List<ABCContainerTag> abcTags,ABC abc,boolean isStatic,ScriptExportMode exportMode,int scriptIndex,int classIndex,NulWriter writer,List<String> fullyQualifiedNames,boolean parallel) throws InterruptedException {
  Namespace ns=abc.constants.getMultiname(name_index).getNamespace(abc.constants);
  if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) {
    String nsname=ns.getName(abc.constants);
    convert(parent,path,abcTags,abc,isStatic,exportMode,scriptIndex,classIndex,writer,fullyQualifiedNames,parallel);
  }
}

Fixed version (ground truth):
public void convertPackaged(Trait parent,String path,List<ABCContainerTag> abcTags,ABC abc,boolean isStatic,ScriptExportMode exportMode,int scriptIndex,int classIndex,NulWriter writer,List<String> fullyQualifiedNames,boolean parallel) throws InterruptedException {
  Namespace ns=abc.constants.getMultiname(name_index).getNamespace(abc.constants);
  if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) {
    convert(parent,path,abcTags,abc,isStatic,exportMode,scriptIndex,classIndex,writer,fullyQualifiedNames,parallel);
  }
}
Program: 61768
Project: 61768
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) {
        if (m.namespace_index == -1) {
          break;
        }
        nsname=abcTag.getABC().nsValueToName(abc.constants.getNamespace(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.getNamespace(m.namespace_index).getName(abc.constants));
        if (nsname == null) {
          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 != null && (!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: 61769
Project: 61769
Buggy source:
private void parseImportsUsagesFromNS(List<ABCContainerTag> abcTags,ABC abc,List<String> imports,List<String> uses,int namespace_index,String ignorePackage,String name){
  Namespace ns=abc.constants.getNamespace(namespace_index);
  if (name.isEmpty()) {
    name="String_Node_Str";
  }
  String newimport=ns.getName(abc.constants);
  if (parseUsagesFromNS(abcTags,abc,imports,uses,namespace_index,ignorePackage,name)) {
    return;
  }
 else   if ((ns.kind != Namespace.KIND_PACKAGE) && (ns.kind != Namespace.KIND_PACKAGE_INTERNAL)) {
    return;
  }
  if (newimport.equals("String_Node_Str")) {
    newimport="String_Node_Str";
  }
  newimport+="String_Node_Str" + name;
  if (newimport.contains("String_Node_Str")) {
    return;
  }
  if (!imports.contains(newimport)) {
    String pkg=newimport.substring(0,newimport.lastIndexOf('.'));
    if (!pkg.equals(ignorePackage)) {
      imports.add(newimport);
    }
  }
}

Fixed version (ground truth):
private void parseImportsUsagesFromNS(List<ABCContainerTag> abcTags,ABC abc,List<String> imports,List<String> uses,int namespace_index,String ignorePackage,String name){
  Namespace ns=abc.constants.getNamespace(namespace_index);
  if (name.isEmpty()) {
    name="String_Node_Str";
  }
  String newimport=ns.getName(abc.constants);
  if (parseUsagesFromNS(abcTags,abc,imports,uses,namespace_index,ignorePackage,name)) {
    return;
  }
 else   if ((ns.kind != Namespace.KIND_PACKAGE) && (ns.kind != Namespace.KIND_PACKAGE_INTERNAL)) {
    return;
  }
  if (newimport == null) {
    newimport="String_Node_Str";
  }
  newimport+="String_Node_Str" + name;
  if (newimport.contains("String_Node_Str")) {
    return;
  }
  if (!imports.contains(newimport)) {
    String pkg=newimport.substring(0,newimport.lastIndexOf('.'));
    if (!pkg.equals(ignorePackage)) {
      imports.add(newimport);
    }
  }
}
Program: 61771
Project: 61771
Buggy source:
/** 
 * Returns the value for the cell at <code>columnIndex</code> and <code>rowIndex</code>.
 * @param rowIndex the row whose value is to be queried
 * @param columnIndex the column whose value is to be queried
 * @return the value Object at the specified cell
 */
@Override public Object getValueAt(int rowIndex,int columnIndex){
switch (columnIndex) {
case 0:
    return rowIndex;
case 1:
  if (rowIndex == 0) {
    return "String_Node_Str";
  }
return abc.constants.getNamespace(rowIndex).getKindStr();
case 2:
if (rowIndex == 0) {
return "String_Node_Str";
}
return abc.constants.getNamespace(rowIndex).getName(abc.constants);
default :
return null;
}
}

Fixed version (ground truth):
/** 
 * Returns the value for the cell at <code>columnIndex</code> and <code>rowIndex</code>.
 * @param rowIndex the row whose value is to be queried
 * @param columnIndex the column whose value is to be queried
 * @return the value Object at the specified cell
 */
@Override public Object getValueAt(int rowIndex,int columnIndex){
switch (columnIndex) {
case 0:
    return rowIndex;
case 1:
  if (rowIndex == 0) {
    return "String_Node_Str";
  }
return abc.constants.getNamespace(rowIndex).getKindStr();
case 2:
if (rowIndex == 0) {
return "String_Node_Str";
}
String val=abc.constants.getNamespace(rowIndex).getName(abc.constants);
if (val == null) {
val="String_Node_Str";
}
return val;
default :
return null;
}
}
Program: 61772
Project: 61772
Buggy source:
public int resolveClass(ABC abc){
  String name=fullTypeName;
  String pkg="String_Node_Str";
  if (name.contains("String_Node_Str")) {
    pkg=name.substring(0,name.lastIndexOf("String_Node_Str"));
    name=name.substring(name.lastIndexOf("String_Node_Str") + 1);
  }
  for (  InstanceInfo ii : abc.instance_info) {
    Multiname mname=abc.constants.constant_multiname.get(ii.name_index);
    if (mname.getName(abc.constants,new ArrayList<String>()).equals(name)) {
      if (mname.getNamespace(abc.constants).getName(abc.constants).equals(pkg)) {
        return ii.name_index;
      }
    }
  }
  for (int i=1; i < abc.constants.constant_multiname.size(); i++) {
    Multiname mname=abc.constants.constant_multiname.get(i);
    if (name.equals(mname.getName(abc.constants,new ArrayList<String>()))) {
      if (pkg.equals(mname.getNamespace(abc.constants).getName(abc.constants))) {
        return i;
      }
    }
  }
  return abc.constants.getMultinameId(new Multiname(Multiname.QNAME,abc.constants.getStringId(name,true),abc.constants.getNamespaceId(new Namespace(Namespace.KIND_PACKAGE,abc.constants.getStringId(pkg,true)),0,true),0,0,new ArrayList<Integer>()),true);
}

Fixed version (ground truth):
public int resolveClass(ABC abc){
  String name=fullTypeName;
  String pkg="String_Node_Str";
  if (name.contains("String_Node_Str")) {
    pkg=name.substring(0,name.lastIndexOf("String_Node_Str"));
    name=name.substring(name.lastIndexOf("String_Node_Str") + 1);
  }
  for (  InstanceInfo ii : abc.instance_info) {
    Multiname mname=abc.constants.constant_multiname.get(ii.name_index);
    if (mname.getName(abc.constants,new ArrayList<String>()).equals(name)) {
      if (mname.getNamespace(abc.constants).hasName(pkg,abc.constants)) {
        return ii.name_index;
      }
    }
  }
  for (int i=1; i < abc.constants.constant_multiname.size(); i++) {
    Multiname mname=abc.constants.constant_multiname.get(i);
    if (name.equals(mname.getName(abc.constants,new ArrayList<String>()))) {
      if (pkg.equals(mname.getNamespace(abc.constants).getName(abc.constants))) {
        return i;
      }
    }
  }
  return abc.constants.getMultinameId(new Multiname(Multiname.QNAME,abc.constants.getStringId(name,true),abc.constants.getNamespaceId(new Namespace(Namespace.KIND_PACKAGE,abc.constants.getStringId(pkg,true)),0,true),0,0,new ArrayList<Integer>()),true);
}
Program: 61773
Project: 61773
Buggy source:
public void init(BaseLocalData localData) throws InterruptedException {
  if (heads != null) {
    return;
  }
  heads=makeGraph(code,new ArrayList<GraphPart>(),alternateEntries);
  int time=1;
  List<GraphPart> ordered=new ArrayList<>();
  List<GraphPart> visited=new ArrayList<>();
  for (  GraphPart head : heads) {
    time=head.setTime(time,ordered,visited);
    fixGraph(localData,head);
    makeMulti(head,new ArrayList<GraphPart>());
  }
}

Fixed version (ground truth):
public void init(BaseLocalData localData) throws InterruptedException {
  if (heads != null) {
    return;
  }
  heads=makeGraph(code,new ArrayList<GraphPart>(),alternateEntries);
  int time=1;
  List<GraphPart> ordered=new ArrayList<>();
  List<GraphPart> visited=new ArrayList<>();
  for (  GraphPart head : heads) {
    time=head.setTime(time,ordered,visited);
  }
}
Program: 61774
Project: 61774
Buggy source:
private static void loadProperties(){
  Properties prop=new Properties();
  try {
    prop.load(ApplicationInfo.class.getResourceAsStream("String_Node_Str"));
    version=prop.getProperty("String_Node_Str");
    build=prop.getProperty("String_Node_Str");
    nightly=prop.getProperty("String_Node_Str");
    if (nightly.equals("String_Node_Str")) {
      version=version + "String_Node_Str" + build;
    }
  }
 catch (  IOException|NullPointerException ex) {
    version="String_Node_Str";
  }
  applicationVerName=APPLICATION_NAME + "String_Node_Str" + version;
  updatePage=updatePageStub + version;
  shortApplicationVerName=SHORT_APPLICATION_NAME + "String_Node_Str" + version;
}

Fixed version (ground truth):
private static void loadProperties(){
  Properties prop=new Properties();
  try {
    prop.load(ApplicationInfo.class.getResourceAsStream("String_Node_Str"));
    version=prop.getProperty("String_Node_Str");
    build=prop.getProperty("String_Node_Str");
    nightly=prop.getProperty("String_Node_Str").equals("String_Node_Str");
    if (nightly) {
      version=version + "String_Node_Str" + build;
    }
  }
 catch (  IOException|NullPointerException ex) {
    version="String_Node_Str";
  }
  applicationVerName=APPLICATION_NAME + "String_Node_Str" + version;
  updatePage=updatePageStub + version;
  shortApplicationVerName=SHORT_APPLICATION_NAME + "String_Node_Str" + version;
}
Program: 61776
Project: 61776
Buggy source:
public byte[] getDataOrOriginalData(){
  if (modified) {
    return getData();
  }
  return data;
}

Fixed version (ground truth):
public byte[] getDataOrOriginalData(){
  if (isModified()) {
    return getData();
  }
  return data;
}
Program: 61777
Project: 61777
Buggy source:
public String builtInNs(String ns){
  if (ns.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
  if (ns.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
  return null;
}

Fixed version (ground truth):
public String builtInNs(String ns){
  if (ns == null) {
    return null;
  }
  if (ns.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
  if (ns.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
  return null;
}
Program: 61778
Project: 61778
Buggy source:
@Override public void run(){
  int startPos=0;
synchronized (playLock) {
    startPos=actualPos * FRAME_DIVISOR;
    paused=false;
  }
  player.setPosition(startPos);
  player.play();
  boolean playAgain=false;
synchronized (playLock) {
    playAgain=!paused;
    paused=true;
    if (loops > 0) {
      loops--;
    }
  }
  if (playAgain && loops > 0) {
    gotoFrame(0);
    run();
    return;
  }
 else {
    fireFinished();
  }
synchronized (playLock) {
    playLock.notifyAll();
  }
}

Fixed version (ground truth):
@Override public void run(){
  boolean playAgain=true;
  while (playAgain) {
    int startPos=0;
synchronized (playLock) {
      startPos=actualPos * FRAME_DIVISOR;
    }
    player.setPosition(startPos);
    player.play();
synchronized (playLock) {
      playAgain=!paused && loops > 0;
      if (!paused) {
        if (loops == 0) {
          paused=true;
        }
 else         if (loops != Integer.MAX_VALUE) {
          loops--;
        }
      }
      if (playAgain) {
        actualPos=0;
      }
    }
  }
  fireFinished();
synchronized (playLock) {
    playLock.notifyAll();
  }
}
Program: 61779
Project: 61779
Buggy source:
@Override public synchronized void pause(){
  if (!isPlaying()) {
    paused=true;
    return;
  }
synchronized (playLock) {
    actualPos=(int)(player.getSamplePosition() / FRAME_DIVISOR);
    paused=true;
    player.stop();
    try {
      playLock.wait();
    }
 catch (    InterruptedException ex) {
      Logger.getLogger(SoundTagPlayer.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
}

Fixed version (ground truth):
@Override public synchronized void pause(){
  if (!isPlaying()) {
    paused=true;
    return;
  }
synchronized (playLock) {
    actualPos=(int)(player.getSamplePosition() / FRAME_DIVISOR);
  }
  waitStop();
}
Program: 61780
Project: 61780
Buggy source:
@Override public synchronized int getCurrentFrame(){
  if (!isPlaying()) {
    return actualPos;
  }
synchronized (playLock) {
    actualPos=(int)(player.getSamplePosition() / FRAME_DIVISOR);
  }
  return actualPos;
}

Fixed version (ground truth):
@Override public synchronized int getCurrentFrame(){
synchronized (playLock) {
    if (isPlaying()) {
      actualPos=(int)(player.getSamplePosition() / FRAME_DIVISOR);
    }
    return actualPos;
  }
}
Program: 61782
Project: 61782
Buggy source:
public int readU30() throws IOException {
  return readU32();
}

Fixed version (ground truth):
public int readU30() throws IOException {
  return (int)readU32();
}
Program: 61783
Project: 61783
Buggy source:
public int readU32() throws IOException {
  int i;
  int ret=0;
  int bytePos=0;
  int byteCount=0;
  boolean nextByte;
  do {
    i=read();
    nextByte=(i >> 7) == 1;
    i&=0x7f;
    ret+=(i << bytePos);
    byteCount++;
    bytePos+=7;
  }
 while (nextByte);
  return ret;
}

Fixed version (ground truth):
public long readU32() throws IOException {
  int i;
  long ret=0;
  int bytePos=0;
  int byteCount=0;
  boolean nextByte;
  do {
    i=read();
    nextByte=(i >> 7) == 1;
    i&=0x7f;
    ret+=(((long)i) << bytePos);
    byteCount++;
    bytePos+=7;
  }
 while (nextByte);
  return ret;
}
Program: 61785
Project: 61785
Buggy source:
/** 
 * Reads one CLIPACTIONS value from the stream
 * @param swf
 * @return CLIPACTIONS value
 * @throws IOException
 */
public CLIPACTIONS readCLIPACTIONS(SWF swf) throws IOException {
  CLIPACTIONS ret=new CLIPACTIONS();
  ret.reserved=readUI16();
  ret.allEventFlags=readCLIPEVENTFLAGS();
  CLIPACTIONRECORD cr;
  ret.clipActionRecords=new ArrayList<>();
  while ((cr=readCLIPACTIONRECORD(swf)) != null) {
    ret.clipActionRecords.add(cr);
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Reads one CLIPACTIONS value from the stream
 * @param swf
 * @return CLIPACTIONS value
 * @throws IOException
 */
public CLIPACTIONS readCLIPACTIONS(SWF swf,Tag tag) throws IOException {
  CLIPACTIONS ret=new CLIPACTIONS();
  ret.reserved=readUI16();
  ret.allEventFlags=readCLIPEVENTFLAGS();
  CLIPACTIONRECORD cr;
  ret.clipActionRecords=new ArrayList<>();
  while ((cr=readCLIPACTIONRECORD(swf,tag)) != null) {
    ret.clipActionRecords.add(cr);
  }
  return ret;
}
Program: 61786
Project: 61786
Buggy source:
/** 
 * Reads one CLIPACTIONRECORD value from the stream
 * @param swf
 * @return CLIPACTIONRECORD value
 * @throws IOException
 */
public CLIPACTIONRECORD readCLIPACTIONRECORD(SWF swf) throws IOException {
  CLIPACTIONRECORD ret=new CLIPACTIONRECORD(swf,this,getPos());
  if (ret.eventFlags.isClear()) {
    return null;
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Reads one CLIPACTIONRECORD value from the stream
 * @param swf
 * @return CLIPACTIONRECORD value
 * @throws IOException
 */
public CLIPACTIONRECORD readCLIPACTIONRECORD(SWF swf,Tag tag) throws IOException {
  CLIPACTIONRECORD ret=new CLIPACTIONRECORD(swf,this,getPos(),tag);
  if (ret.eventFlags.isClear()) {
    return null;
  }
  return ret;
}
Program: 61787
Project: 61787
Buggy source:
/** 
 * Reads one BUTTONCONDACTION value from the stream
 * @param swf
 * @return BUTTONCONDACTION value
 * @throws IOException
 */
public BUTTONCONDACTION readBUTTONCONDACTION(SWF swf) throws IOException {
  BUTTONCONDACTION ret=new BUTTONCONDACTION(swf,this,getPos());
  return ret;
}

Fixed version (ground truth):
/** 
 * Reads one BUTTONCONDACTION value from the stream
 * @param swf
 * @return BUTTONCONDACTION value
 * @throws IOException
 */
public BUTTONCONDACTION readBUTTONCONDACTION(SWF swf,Tag tag) throws IOException {
  BUTTONCONDACTION ret=new BUTTONCONDACTION(swf,this,getPos(),tag);
  return ret;
}
Program: 61788
Project: 61788
Buggy source:
/** 
 * Reads list of BUTTONCONDACTION values from the stream
 * @param swf
 * @return List of BUTTONCONDACTION values
 * @throws IOException
 */
public List<BUTTONCONDACTION> readBUTTONCONDACTIONList(SWF swf) throws IOException {
  List<BUTTONCONDACTION> ret=new ArrayList<>();
  BUTTONCONDACTION bc;
  while (!(bc=readBUTTONCONDACTION(swf)).isLast) {
    ret.add(bc);
  }
  ret.add(bc);
  return ret;
}

Fixed version (ground truth):
/** 
 * Reads list of BUTTONCONDACTION values from the stream
 * @param swf
 * @return List of BUTTONCONDACTION values
 * @throws IOException
 */
public List<BUTTONCONDACTION> readBUTTONCONDACTIONList(SWF swf,Tag tag) throws IOException {
  List<BUTTONCONDACTION> ret=new ArrayList<>();
  BUTTONCONDACTION bc;
  while (!(bc=readBUTTONCONDACTION(swf,tag)).isLast) {
    ret.add(bc);
  }
  ret.add(bc);
  return ret;
}
Program: 61789
Project: 61789
Buggy source:
/** 
 * Writes Tag value to the stream
 * @param tag Tag value
 * @throws IOException
 */
public void writeTag(Tag tag) throws IOException {
  byte[] data=tag.getData();
  write(getTagHeader(tag,data,version));
  write(data);
}

Fixed version (ground truth):
/** 
 * Writes Tag value to the stream
 * @param tag Tag value
 * @throws IOException
 */
public void writeTag(Tag tag) throws IOException {
  byte[] data=tag.getDataOrOriginalData();
  write(getTagHeader(tag,data,version));
  write(data);
}
Program: 61791
Project: 61791
Buggy source:
public boolean save(ConstantPool constants){
  try {
    String text=getText();
    if (text.trim().startsWith("String_Node_Str")) {
      byte[] data=Helper.getBytesFromHexaText(text);
      MethodBody mb=abc.bodies[bodyIndex];
      mb.codeBytes=data;
      try {
        mb.code=new AVM2Code(new ByteArrayInputStream(mb.codeBytes));
      }
 catch (      UnknownInstructionCode re) {
        mb.code=new AVM2Code();
        Logger.getLogger(ABC.class.getName()).log(Level.SEVERE,null,re);
      }
      mb.code.compact();
    }
 else {
      AVM2Code acode=ASM3Parser.parse(new StringReader(text),constants,trait,new MissingSymbolHandler(){
        @Override public boolean missingString(        String value){
          return true;
        }
        @Override public boolean missingInt(        long value){
          return true;
        }
        @Override public boolean missingUInt(        long value){
          return true;
        }
        @Override public boolean missingDouble(        double value){
          return true;
        }
      }
,abc.bodies[bodyIndex],abc.method_info[abc.bodies[bodyIndex].method_info]);
      acode.getBytes(abc.bodies[bodyIndex].codeBytes);
      abc.bodies[bodyIndex].code=acode;
    }
  }
 catch (  IOException ex) {
  }
catch (  InterruptedException ex) {
  }
catch (  ParseException ex) {
    View.showMessageDialog(this,(ex.text + "String_Node_Str" + ex.line));
    selectLine((int)ex.line);
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean save(ConstantPool constants){
  try {
    String text=getText();
    if (text.trim().startsWith("String_Node_Str")) {
      byte[] data=Helper.getBytesFromHexaText(text);
      MethodBody mb=abc.bodies[bodyIndex];
      mb.codeBytes=data;
      try {
        mb.code=new AVM2Code(new ByteArrayInputStream(mb.codeBytes));
      }
 catch (      UnknownInstructionCode re) {
        mb.code=new AVM2Code();
        Logger.getLogger(ABC.class.getName()).log(Level.SEVERE,null,re);
      }
      mb.code.compact();
    }
 else {
      AVM2Code acode=ASM3Parser.parse(new StringReader(text),constants,trait,new MissingSymbolHandler(){
        @Override public boolean missingString(        String value){
          return true;
        }
        @Override public boolean missingInt(        long value){
          return true;
        }
        @Override public boolean missingUInt(        long value){
          return true;
        }
        @Override public boolean missingDouble(        double value){
          return true;
        }
      }
,abc.bodies[bodyIndex],abc.method_info[abc.bodies[bodyIndex].method_info]);
      acode.getBytes(abc.bodies[bodyIndex].codeBytes);
      abc.bodies[bodyIndex].code=acode;
    }
    ((Tag)abc.parentTag).setModified(true);
  }
 catch (  IOException ex) {
  }
catch (  InterruptedException ex) {
  }
catch (  ParseException ex) {
    View.showMessageDialog(this,(ex.text + "String_Node_Str" + ex.line));
    selectLine((int)ex.line);
    return false;
  }
  return true;
}
Program: 61793
Project: 61793
Buggy source:
@Override public void setImage(byte[] data){
  imageData=data;
}

Fixed version (ground truth):
@Override public void setImage(byte[] data){
  imageData=data;
  setModified(true);
}
Program: 61794
Project: 61794
Buggy source:
@Override public void setImage(byte[] data) throws IOException {
  if (ImageTag.getImageFormat(data).equals("String_Node_Str")) {
    SerializableImage image=new SerializableImage(ImageIO.read(new ByteArrayInputStream(data)));
    byte[] ba=new byte[image.getWidth() * image.getHeight()];
    for (int i=0; i < ba.length; i++) {
      ba[i]=(byte)255;
    }
    bitmapAlphaData=ba;
  }
 else {
    bitmapAlphaData=new byte[0];
  }
  imageData=data;
}

Fixed version (ground truth):
@Override public void setImage(byte[] data) throws IOException {
  if (ImageTag.getImageFormat(data).equals("String_Node_Str")) {
    SerializableImage image=new SerializableImage(ImageIO.read(new ByteArrayInputStream(data)));
    byte[] ba=new byte[image.getWidth() * image.getHeight()];
    for (int i=0; i < ba.length; i++) {
      ba[i]=(byte)255;
    }
    bitmapAlphaData=ba;
  }
 else {
    bitmapAlphaData=new byte[0];
  }
  imageData=data;
  setModified(true);
}
Program: 61795
Project: 61795
Buggy source:
@Override public void setImage(byte[] data){
  imageData=data;
  if (ImageTag.getImageFormat(data).equals("String_Node_Str")) {
    SerializableImage image=getImage();
    byte[] ba=new byte[image.getWidth() * image.getHeight()];
    for (int i=0; i < ba.length; i++) {
      ba[i]=(byte)255;
    }
    bitmapAlphaData=ba;
  }
 else {
    bitmapAlphaData=new byte[0];
  }
}

Fixed version (ground truth):
@Override public void setImage(byte[] data){
  imageData=data;
  if (ImageTag.getImageFormat(data).equals("String_Node_Str")) {
    SerializableImage image=getImage();
    byte[] ba=new byte[image.getWidth() * image.getHeight()];
    for (int i=0; i < ba.length; i++) {
      ba[i]=(byte)255;
    }
    bitmapAlphaData=ba;
  }
 else {
    bitmapAlphaData=new byte[0];
  }
  setModified(true);
}
Program: 61796
Project: 61796
Buggy source:
@Override public void setImage(byte[] data) throws IOException {
  SerializableImage image=new SerializableImage(ImageIO.read(new ByteArrayInputStream(data)));
  ALPHABITMAPDATA bitmapData=new ALPHABITMAPDATA();
  bitmapFormat=DefineBitsLosslessTag.FORMAT_24BIT_RGB;
  bitmapWidth=image.getWidth();
  bitmapHeight=image.getHeight();
  bitmapData.bitmapPixelData=new ARGB[bitmapWidth * bitmapHeight];
  int pos=0;
  for (int y=0; y < bitmapHeight; y++) {
    for (int x=0; x < bitmapWidth; x++) {
      int argb=image.getRGB(x,y);
      int a=(argb >> 24) & 0xff;
      int r=(argb >> 16) & 0xff;
      int g=(argb >> 8) & 0xff;
      int b=(argb) & 0xff;
      r=r * a / 255;
      g=g * a / 255;
      b=b * a / 255;
      bitmapData.bitmapPixelData[pos]=new ARGB();
      bitmapData.bitmapPixelData[pos].alpha=a;
      bitmapData.bitmapPixelData[pos].red=r;
      bitmapData.bitmapPixelData[pos].green=g;
      bitmapData.bitmapPixelData[pos].blue=b;
      pos++;
    }
  }
  ByteArrayOutputStream bitmapDataOS=new ByteArrayOutputStream();
  SWFOutputStream sos=new SWFOutputStream(bitmapDataOS,getVersion());
  sos.writeALPHABITMAPDATA(bitmapData,bitmapFormat,bitmapWidth,bitmapHeight);
  ByteArrayOutputStream zlibOS=new ByteArrayOutputStream();
  SWFOutputStream sos2=new SWFOutputStream(zlibOS,getVersion());
  sos2.writeBytesZlib(bitmapDataOS.toByteArray());
  zlibBitmapData=zlibOS.toByteArray();
  decompressed=false;
}

Fixed version (ground truth):
@Override public void setImage(byte[] data) throws IOException {
  SerializableImage image=new SerializableImage(ImageIO.read(new ByteArrayInputStream(data)));
  ALPHABITMAPDATA bitmapData=new ALPHABITMAPDATA();
  bitmapFormat=DefineBitsLosslessTag.FORMAT_24BIT_RGB;
  bitmapWidth=image.getWidth();
  bitmapHeight=image.getHeight();
  bitmapData.bitmapPixelData=new ARGB[bitmapWidth * bitmapHeight];
  int pos=0;
  for (int y=0; y < bitmapHeight; y++) {
    for (int x=0; x < bitmapWidth; x++) {
      int argb=image.getRGB(x,y);
      int a=(argb >> 24) & 0xff;
      int r=(argb >> 16) & 0xff;
      int g=(argb >> 8) & 0xff;
      int b=(argb) & 0xff;
      r=r * a / 255;
      g=g * a / 255;
      b=b * a / 255;
      bitmapData.bitmapPixelData[pos]=new ARGB();
      bitmapData.bitmapPixelData[pos].alpha=a;
      bitmapData.bitmapPixelData[pos].red=r;
      bitmapData.bitmapPixelData[pos].green=g;
      bitmapData.bitmapPixelData[pos].blue=b;
      pos++;
    }
  }
  ByteArrayOutputStream bitmapDataOS=new ByteArrayOutputStream();
  SWFOutputStream sos=new SWFOutputStream(bitmapDataOS,getVersion());
  sos.writeALPHABITMAPDATA(bitmapData,bitmapFormat,bitmapWidth,bitmapHeight);
  ByteArrayOutputStream zlibOS=new ByteArrayOutputStream();
  SWFOutputStream sos2=new SWFOutputStream(zlibOS,getVersion());
  sos2.writeBytesZlib(bitmapDataOS.toByteArray());
  zlibBitmapData=zlibOS.toByteArray();
  decompressed=false;
  setModified(true);
}
Program: 61797
Project: 61797
Buggy source:
@Override public void setImage(byte[] data) throws IOException {
  SerializableImage image=new SerializableImage(ImageIO.read(new ByteArrayInputStream(data)));
  bitmapFormat=FORMAT_24BIT_RGB;
  bitmapWidth=image.getWidth();
  bitmapHeight=image.getHeight();
  bitmapData=new BITMAPDATA();
  bitmapData.bitmapPixelDataPix24=new PIX24[bitmapWidth * bitmapHeight];
  int pos=0;
  for (int y=0; y < bitmapHeight; y++) {
    for (int x=0; x < bitmapWidth; x++) {
      int argb=image.getRGB(x,y);
      int r=(argb >> 16) & 0xff;
      int g=(argb >> 8) & 0xff;
      int b=(argb) & 0xff;
      bitmapData.bitmapPixelDataPix24[pos]=new PIX24();
      bitmapData.bitmapPixelDataPix24[pos].red=r;
      bitmapData.bitmapPixelDataPix24[pos].green=g;
      bitmapData.bitmapPixelDataPix24[pos].blue=b;
      bitmapData.bitmapPixelDataPix24[pos].reserved=0xff;
      pos++;
    }
  }
  ByteArrayOutputStream bitmapDataOS=new ByteArrayOutputStream();
  SWFOutputStream sos=new SWFOutputStream(bitmapDataOS,getVersion());
  sos.writeBITMAPDATA(bitmapData,bitmapFormat,bitmapWidth,bitmapHeight);
  ByteArrayOutputStream zlibOS=new ByteArrayOutputStream();
  SWFOutputStream sos2=new SWFOutputStream(zlibOS,getVersion());
  sos2.writeBytesZlib(bitmapDataOS.toByteArray());
  zlibBitmapData=zlibOS.toByteArray();
  decompressed=false;
}

Fixed version (ground truth):
@Override public void setImage(byte[] data) throws IOException {
  SerializableImage image=new SerializableImage(ImageIO.read(new ByteArrayInputStream(data)));
  bitmapFormat=FORMAT_24BIT_RGB;
  bitmapWidth=image.getWidth();
  bitmapHeight=image.getHeight();
  bitmapData=new BITMAPDATA();
  bitmapData.bitmapPixelDataPix24=new PIX24[bitmapWidth * bitmapHeight];
  int pos=0;
  for (int y=0; y < bitmapHeight; y++) {
    for (int x=0; x < bitmapWidth; x++) {
      int argb=image.getRGB(x,y);
      int r=(argb >> 16) & 0xff;
      int g=(argb >> 8) & 0xff;
      int b=(argb) & 0xff;
      bitmapData.bitmapPixelDataPix24[pos]=new PIX24();
      bitmapData.bitmapPixelDataPix24[pos].red=r;
      bitmapData.bitmapPixelDataPix24[pos].green=g;
      bitmapData.bitmapPixelDataPix24[pos].blue=b;
      bitmapData.bitmapPixelDataPix24[pos].reserved=0xff;
      pos++;
    }
  }
  ByteArrayOutputStream bitmapDataOS=new ByteArrayOutputStream();
  SWFOutputStream sos=new SWFOutputStream(bitmapDataOS,getVersion());
  sos.writeBITMAPDATA(bitmapData,bitmapFormat,bitmapWidth,bitmapHeight);
  ByteArrayOutputStream zlibOS=new ByteArrayOutputStream();
  SWFOutputStream sos2=new SWFOutputStream(zlibOS,getVersion());
  sos2.writeBytesZlib(bitmapDataOS.toByteArray());
  zlibBitmapData=zlibOS.toByteArray();
  decompressed=false;
  setModified(true);
}
Program: 61798
Project: 61798
Buggy source:
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param pos
 * @throws IOException
 */
public DefineButton2Tag(SWF swf,byte[] data,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),swf.version);
  buttonId=sis.readUI16();
  reserved=(int)sis.readUB(7);
  trackAsMenu=sis.readUB(1) == 1;
  int actionOffset=sis.readUI16();
  characters=sis.readBUTTONRECORDList(true);
  if (actionOffset > 0) {
    actions=sis.readBUTTONCONDACTIONList(swf);
  }
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param pos
 * @throws IOException
 */
public DefineButton2Tag(SWF swf,byte[] data,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),swf.version);
  buttonId=sis.readUI16();
  reserved=(int)sis.readUB(7);
  trackAsMenu=sis.readUB(1) == 1;
  int actionOffset=sis.readUI16();
  characters=sis.readBUTTONRECORDList(true);
  if (actionOffset > 0) {
    actions=sis.readBUTTONCONDACTIONList(swf,this);
  }
}
Program: 61800
Project: 61800
Buggy source:
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param pos
 * @throws IOException
 */
public DoABCDefineTag(SWF swf,byte[] data,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  InputStream is=new ByteArrayInputStream(data);
  SWFInputStream sis=new SWFInputStream(is,swf.version);
  flags=sis.readUI32();
  name=sis.readString();
  abc=new ABC(is,swf);
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param pos
 * @throws IOException
 */
public DoABCDefineTag(SWF swf,byte[] data,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  InputStream is=new ByteArrayInputStream(data);
  SWFInputStream sis=new SWFInputStream(is,swf.version);
  flags=sis.readUI32();
  name=sis.readString();
  abc=new ABC(is,swf,this);
}
Program: 61801
Project: 61801
Buggy source:
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param pos
 * @throws IOException
 */
public DoABCTag(SWF swf,byte[] data,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  InputStream is=new ByteArrayInputStream(data);
  abc=new ABC(is,swf);
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param pos
 * @throws IOException
 */
public DoABCTag(SWF swf,byte[] data,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  InputStream is=new ByteArrayInputStream(data);
  abc=new ABC(is,swf,this);
}
Program: 61802
Project: 61802
Buggy source:
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param pos
 * @throws IOException
 */
public PlaceObject2Tag(SWF swf,byte[] data,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),swf.version);
  placeFlagHasClipActions=sis.readUB(1) == 1;
  placeFlagHasClipDepth=sis.readUB(1) == 1;
  placeFlagHasName=sis.readUB(1) == 1;
  placeFlagHasRatio=sis.readUB(1) == 1;
  placeFlagHasColorTransform=sis.readUB(1) == 1;
  placeFlagHasMatrix=sis.readUB(1) == 1;
  placeFlagHasCharacter=sis.readUB(1) == 1;
  placeFlagMove=sis.readUB(1) == 1;
  depth=sis.readUI16();
  if (placeFlagHasCharacter) {
    characterId=sis.readUI16();
  }
  if (placeFlagHasMatrix) {
    matrix=sis.readMatrix();
  }
  if (placeFlagHasColorTransform) {
    colorTransform=sis.readCXFORMWITHALPHA();
  }
  if (placeFlagHasRatio) {
    ratio=sis.readUI16();
  }
  if (placeFlagHasName) {
    name=sis.readString();
  }
  if (placeFlagHasClipDepth) {
    clipDepth=sis.readUI16();
  }
  if (placeFlagHasClipActions) {
    clipActions=sis.readCLIPACTIONS(swf);
  }
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param swf
 * @param data Data bytes
 * @param pos
 * @throws IOException
 */
public PlaceObject2Tag(SWF swf,byte[] data,long pos) throws IOException {
  super(swf,ID,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),swf.version);
  placeFlagHasClipActions=sis.readUB(1) == 1;
  placeFlagHasClipDepth=sis.readUB(1) == 1;
  placeFlagHasName=sis.readUB(1) == 1;
  placeFlagHasRatio=sis.readUB(1) == 1;
  placeFlagHasColorTransform=sis.readUB(1) == 1;
  placeFlagHasMatrix=sis.readUB(1) == 1;
  placeFlagHasCharacter=sis.readUB(1) == 1;
  placeFlagMove=sis.readUB(1) == 1;
  depth=sis.readUI16();
  if (placeFlagHasCharacter) {
    characterId=sis.readUI16();
  }
  if (placeFlagHasMatrix) {
    matrix=sis.readMatrix();
  }
  if (placeFlagHasColorTransform) {
    colorTransform=sis.readCXFORMWITHALPHA();
  }
  if (placeFlagHasRatio) {
    ratio=sis.readUI16();
  }
  if (placeFlagHasName) {
    name=sis.readString();
  }
  if (placeFlagHasClipDepth) {
    clipDepth=sis.readUI16();
  }
  if (placeFlagHasClipActions) {
    clipActions=sis.readCLIPACTIONS(swf,this);
  }
}
Program: 61805
Project: 61805
Buggy source:
public BUTTONCONDACTION(SWF swf,InputStream is,long containerOffset) throws IOException {
  this.swf=swf;
  SWFInputStream sis=new SWFInputStream(is,swf.version);
  pos=containerOffset;
  int condActionSize=sis.readUI16();
  isLast=condActionSize <= 0;
  condIdleToOverDown=sis.readUB(1) == 1;
  condOutDownToIdle=sis.readUB(1) == 1;
  condOutDownToOverDown=sis.readUB(1) == 1;
  condOverDownToOutDown=sis.readUB(1) == 1;
  condOverDownToOverUp=sis.readUB(1) == 1;
  condOverUpToOverDown=sis.readUB(1) == 1;
  condOverUpToIddle=sis.readUB(1) == 1;
  condIdleToOverUp=sis.readUB(1) == 1;
  condKeyPress=(int)sis.readUB(7);
  condOverDownToIddle=sis.readUB(1) == 1;
  if (condActionSize <= 0) {
    actionBytes=sis.readBytesEx(sis.available());
  }
 else {
    actionBytes=sis.readBytesEx(condActionSize - 4);
  }
}

Fixed version (ground truth):
public BUTTONCONDACTION(SWF swf,InputStream is,long containerOffset,Tag tag) throws IOException {
  this.swf=swf;
  this.tag=tag;
  SWFInputStream sis=new SWFInputStream(is,swf.version);
  pos=containerOffset;
  int condActionSize=sis.readUI16();
  isLast=condActionSize <= 0;
  condIdleToOverDown=sis.readUB(1) == 1;
  condOutDownToIdle=sis.readUB(1) == 1;
  condOutDownToOverDown=sis.readUB(1) == 1;
  condOverDownToOutDown=sis.readUB(1) == 1;
  condOverDownToOverUp=sis.readUB(1) == 1;
  condOverUpToOverDown=sis.readUB(1) == 1;
  condOverUpToIddle=sis.readUB(1) == 1;
  condIdleToOverUp=sis.readUB(1) == 1;
  condKeyPress=(int)sis.readUB(7);
  condOverDownToIddle=sis.readUB(1) == 1;
  if (condActionSize <= 0) {
    actionBytes=sis.readBytesEx(sis.available());
  }
 else {
    actionBytes=sis.readBytesEx(condActionSize - 4);
  }
}
Program: 61807
Project: 61807
Buggy source:
@Override public boolean hasReturnValue(){
  return false;
}

Fixed version (ground truth):
@Override public boolean hasReturnValue(){
  return true;
}
Program: 61808
Project: 61808
Buggy source:
@Override public void translate(Stack<GraphTargetItem> stack,List<GraphTargetItem> output,java.util.HashMap<Integer,String> regNames,HashMap<String,GraphTargetItem> variables,HashMap<String,GraphTargetItem> functions,int staticOperation,String path){
  GraphTargetItem propertyName=stack.pop();
  GraphTargetItem object=stack.pop();
  output.add(new DeleteActionItem(this,object,propertyName));
  stack.push(new DirectValueActionItem(this,-1,Boolean.TRUE,new ArrayList<String>()));
}

Fixed version (ground truth):
@Override public void translate(Stack<GraphTargetItem> stack,List<GraphTargetItem> output,java.util.HashMap<Integer,String> regNames,HashMap<String,GraphTargetItem> variables,HashMap<String,GraphTargetItem> functions,int staticOperation,String path){
  GraphTargetItem propertyName=stack.pop();
  GraphTargetItem object=stack.pop();
  stack.push(new DeleteActionItem(this,object,propertyName));
}
Program: 61809
Project: 61809
Buggy source:
@Override public void translate(Stack<GraphTargetItem> stack,List<GraphTargetItem> output,java.util.HashMap<Integer,String> regNames,HashMap<String,GraphTargetItem> variables,HashMap<String,GraphTargetItem> functions,int staticOperation,String path){
  GraphTargetItem propertyName=stack.pop();
  output.add(new DeleteActionItem(this,null,propertyName));
  stack.push(new DirectValueActionItem(this,-1,Boolean.TRUE,new ArrayList<String>()));
}

Fixed version (ground truth):
@Override public void translate(Stack<GraphTargetItem> stack,List<GraphTargetItem> output,java.util.HashMap<Integer,String> regNames,HashMap<String,GraphTargetItem> variables,HashMap<String,GraphTargetItem> functions,int staticOperation,String path){
  GraphTargetItem propertyName=stack.pop();
  stack.push(new DeleteActionItem(this,null,propertyName));
}
Program: 61810
Project: 61810
Buggy source:
@Override public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData,SourceGenerator generator){
  return toSourceMerge(localData,generator,object,propertyName,new ActionDelete());
}

Fixed version (ground truth):
@Override public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData,SourceGenerator generator){
  if (object == null) {
    return toSourceMerge(localData,generator,propertyName,new ActionDelete2());
  }
  return toSourceMerge(localData,generator,object,propertyName,new ActionDelete());
}
Program: 61811
Project: 61811
Buggy source:
@Override public GraphTextWriter appendTo(GraphTextWriter writer,LocalData localData) throws InterruptedException {
  writer.append("String_Node_Str");
  if (object == null) {
    return propertyName.toString(writer,localData);
  }
  object.toString(writer,localData);
  writer.append("String_Node_Str");
  return stripQuotes(propertyName,localData,writer);
}

Fixed version (ground truth):
@Override public GraphTextWriter appendTo(GraphTextWriter writer,LocalData localData) throws InterruptedException {
  writer.append("String_Node_Str");
  if (object == null) {
    return propertyName.toStringNoQuotes(writer,localData);
  }
  object.toStringNoQuotes(writer,localData);
  writer.append("String_Node_Str");
  return propertyName.toStringNoQuotes(writer,localData);
}
Program: 61813
Project: 61813
Buggy source:
private GraphTargetItem memberOrCall(GraphTargetItem newcmds,HashMap<String,Integer> registerVars,boolean inFunction,boolean inMethod,List<VariableActionItem> variables) throws IOException, ParseException {
  ParsedSymbol s=lex();
  GraphTargetItem ret=newcmds;
  while (s.isType(SymbolType.DOT,SymbolType.BRACKET_OPEN,SymbolType.PARENT_OPEN)) {
switch (s.type) {
case DOT:
case BRACKET_OPEN:
      lexer.pushback(s);
    ret=member(ret,registerVars,inFunction,inMethod,variables);
  break;
case PARENT_OPEN:
if (ret instanceof GetMemberActionItem) {
  GetMemberActionItem mem=(GetMemberActionItem)ret;
  ret=new CallMethodActionItem(null,mem.object,mem.memberName,call(registerVars,inFunction,inMethod,variables));
}
 else if (ret instanceof VariableActionItem) {
  VariableActionItem var=(VariableActionItem)ret;
  ret=new CallFunctionActionItem(null,var,call(registerVars,inFunction,inMethod,variables));
}
 else {
  ret=new CallFunctionActionItem(null,ret,call(registerVars,inFunction,inMethod,variables));
}
break;
}
s=lex();
}
lexer.pushback(s);
return ret;
}

Fixed version (ground truth):
private GraphTargetItem memberOrCall(GraphTargetItem newcmds,HashMap<String,Integer> registerVars,boolean inFunction,boolean inMethod,List<VariableActionItem> variables) throws IOException, ParseException {
  ParsedSymbol s=lex();
  GraphTargetItem ret=newcmds;
  while (s.isType(SymbolType.DOT,SymbolType.BRACKET_OPEN,SymbolType.PARENT_OPEN)) {
switch (s.type) {
case DOT:
case BRACKET_OPEN:
      lexer.pushback(s);
    ret=member(ret,registerVars,inFunction,inMethod,variables);
  break;
case PARENT_OPEN:
if (ret instanceof GetMemberActionItem) {
  GetMemberActionItem mem=(GetMemberActionItem)ret;
  ret=new CallMethodActionItem(null,mem.object,mem.memberName,call(registerVars,inFunction,inMethod,variables));
}
 else if (ret instanceof VariableActionItem) {
  VariableActionItem var=(VariableActionItem)ret;
  ret=new CallFunctionActionItem(null,pushConst(var.getVariableName()),call(registerVars,inFunction,inMethod,variables));
}
 else {
  ret=new CallFunctionActionItem(null,ret,call(registerVars,inFunction,inMethod,variables));
}
break;
}
s=lex();
}
lexer.pushback(s);
return ret;
}