Program: 61986
Project: 61986
Buggy source:
/** 
 * Reads list of actions from the stream. Reading ends with ActionEndFlag(=0) or end of the stream.
 * @param listeners
 * @param address
 * @param ip
 * @param rri
 * @param version
 * @param containerSWFOffset
 * @param endip
 * @param path
 * @return List of actions
 * @throws IOException
 */
public static List<Action> deobfuscateActionList(List<DisassemblyListener> listeners,long containerSWFOffset,List<Action> actions,int version,int ip,String path) throws IOException {
  byte[] data=Action.actionsToBytes(actions,true,version);
  ReReadableInputStream rri=new ReReadableInputStream(new ByteArrayInputStream(data));
  int endIp=data.length;
  List<Action> retdups=new ArrayList<>();
  for (int i=0; i <= endIp; i++) {
    Action a=new ActionNop();
    a.setAddress(i,version);
    retdups.add(a);
  }
  ConstantPool cpool=new ConstantPool();
  Stack<GraphTargetItem> stack=new Stack<>();
  List<Object> localData=Helper.toList(new HashMap<Integer,String>(),new HashMap<String,GraphTargetItem>(),new HashMap<String,GraphTargetItem>());
  SWFInputStream sis=new SWFInputStream(rri,version);
  deobfustaceActionListAtPosRecursive(listeners,new ArrayList<GraphTargetItem>(),new HashMap<Long,List<GraphSourceItemContainer>>(),containerSWFOffset,localData,stack,cpool,sis,rri,ip,retdups,ip,endIp,path,new HashMap<Integer,Integer>(),false,new HashMap<Integer,HashMap<String,GraphTargetItem>>(),version);
  if (!retdups.isEmpty()) {
    for (int i=0; i < ip; i++) {
      retdups.remove(0);
    }
  }
  List<Action> ret=new ArrayList<>();
  Action last=null;
  for (  Action a : retdups) {
    if (a != last) {
      ret.add(a);
    }
    last=a;
  }
  for (int i=0; i < retdups.size(); i++) {
    Action a=retdups.get(i);
    if (a instanceof ActionEnd) {
      if (i < retdups.size() - 1) {
        ActionJump jmp=new ActionJump(0);
        jmp.setJumpOffset(retdups.size() - i - jmp.getBytes(version).length);
        a.replaceWith=jmp;
      }
    }
  }
  if (Configuration.getConfig("String_Node_Str",true)) {
    ret=Action.removeNops(0,ret,version,0,path);
  }
  List<Action> reta=new ArrayList<>();
  for (  Object o : ret) {
    if (o instanceof Action) {
      reta.add((Action)o);
    }
  }
  return reta;
}

Fixed version (ground truth):
/** 
 * Reads list of actions from the stream. Reading ends with ActionEndFlag(=0) or end of the stream.
 * @param listeners
 * @param containerSWFOffset
 * @param actions
 * @param version
 * @param ip
 * @param path
 * @return List of actions
 * @throws IOException
 */
public static List<Action> deobfuscateActionList(List<DisassemblyListener> listeners,long containerSWFOffset,List<Action> actions,int version,int ip,String path) throws IOException {
  byte[] data=Action.actionsToBytes(actions,true,version);
  ReReadableInputStream rri=new ReReadableInputStream(new ByteArrayInputStream(data));
  int endIp=data.length;
  List<Action> retdups=new ArrayList<>();
  for (int i=0; i <= endIp; i++) {
    Action a=new ActionNop();
    a.setAddress(i,version);
    retdups.add(a);
  }
  ConstantPool cpool=new ConstantPool();
  Stack<GraphTargetItem> stack=new Stack<>();
  List<Object> localData=Helper.toList(new HashMap<Integer,String>(),new HashMap<String,GraphTargetItem>(),new HashMap<String,GraphTargetItem>());
  SWFInputStream sis=new SWFInputStream(rri,version);
  deobfustaceActionListAtPosRecursive(listeners,new ArrayList<GraphTargetItem>(),new HashMap<Long,List<GraphSourceItemContainer>>(),containerSWFOffset,localData,stack,cpool,sis,rri,ip,retdups,ip,endIp,path,new HashMap<Integer,Integer>(),false,new HashMap<Integer,HashMap<String,GraphTargetItem>>(),version);
  if (!retdups.isEmpty()) {
    for (int i=0; i < ip; i++) {
      retdups.remove(0);
    }
  }
  List<Action> ret=new ArrayList<>();
  Action last=null;
  for (  Action a : retdups) {
    if (a != last) {
      ret.add(a);
    }
    last=a;
  }
  for (int i=0; i < retdups.size(); i++) {
    Action a=retdups.get(i);
    if (a instanceof ActionEnd) {
      if (i < retdups.size() - 1) {
        ActionJump jmp=new ActionJump(0);
        jmp.setJumpOffset(retdups.size() - i - jmp.getBytes(version).length);
        a.replaceWith=jmp;
      }
    }
  }
  if (Configuration.getConfig("String_Node_Str",true)) {
    ret=Action.removeNops(0,ret,version,0,path);
  }
  List<Action> reta=new ArrayList<>();
  for (  Object o : ret) {
    if (o instanceof Action) {
      reta.add((Action)o);
    }
  }
  return reta;
}