Program: 61540
Project: 61540
Buggy source:
private void executeActions(int classIndex,boolean isStatic,MethodBody body,int scriptIndex,ABC abc,AVM2Code code,int idx,int endIdx,ExecutionResult result){
  List<GraphTargetItem> output=new ArrayList<>();
  AVM2LocalData localData=newLocalData(scriptIndex,abc,abc.constants,body,isStatic,classIndex);
  FixItemCounterTranslateStack stack=new FixItemCounterTranslateStack("String_Node_Str");
  int instructionsProcessed=0;
  try {
    while (true) {
      if (idx > endIdx) {
        break;
      }
      if (instructionsProcessed > executionLimit) {
        break;
      }
      AVM2Instruction action=code.code.get(idx);
      action.translate(localData,stack,output,Graph.SOP_USE_STATIC,"String_Node_Str");
      InstructionDefinition def=action.definition;
      Class allowedDefs[]=new Class[]{PushByteIns.class,PushShortIns.class,PushIntIns.class,PushDoubleIns.class,PushStringIns.class,PushNullIns.class,PushUndefinedIns.class,PushFalseIns.class,PushTrueIns.class,DupIns.class,SwapIns.class,AddIns.class,AddIIns.class,SubtractIns.class,SubtractIIns.class,ModuloIns.class,MultiplyIns.class,BitAndIns.class,BitXorIns.class,BitOrIns.class,LShiftIns.class,RShiftIns.class,URShiftIns.class,EqualsIns.class,NotIns.class,IfTypeIns.class,JumpIns.class,EqualsIns.class,LessEqualsIns.class,GreaterEqualsIns.class,GreaterThanIns.class,LessThanIns.class,StrictEqualsIns.class,PopIns.class};
      boolean ok=false;
      for (      Class<?> s : allowedDefs) {
        if (s.isAssignableFrom(def.getClass())) {
          ok=true;
          break;
        }
      }
      if (!ok) {
        break;
      }
      boolean ifed=false;
      if (def instanceof JumpIns) {
        long address=action.offset + action.getBytesLength() + action.operands[0];
        idx=code.adr2pos(address);
        if (idx == -1) {
          throw new TranslateException("String_Node_Str" + address);
        }
      }
 else       if (def instanceof IfTypeIns) {
        GraphTargetItem top=stack.pop();
        Object res=top.getResult();
        long address=action.offset + action.getBytesLength() + action.operands[0];
        int nidx=code.adr2pos(address);
        AVM2Instruction tarIns=code.code.get(nidx);
        if (EcmaScript.toBoolean(res)) {
          AVM2Instruction jumpIns=new AVM2Instruction(0,new JumpIns(),new int[]{0});
          code.replaceInstruction(idx,jumpIns,body);
          jumpIns.operands[0]=(int)(tarIns.offset - jumpIns.offset - jumpIns.getBytesLength());
          code.insertInstruction(idx,new AVM2Instruction(action.offset,new DeobfuscatePopIns(),new int[]{}),true,body);
          idx=code.adr2pos(jumpIns.offset + jumpIns.getBytesLength() + jumpIns.operands[0]);
        }
 else {
          code.replaceInstruction(idx,new AVM2Instruction(action.offset,new DeobfuscatePopIns(),new int[]{}),body);
          idx++;
        }
        ifed=true;
      }
 else {
        idx++;
      }
      instructionsProcessed++;
      if (stack.allItemsFixed()) {
        result.idx=idx == code.code.size() ? idx - 1 : idx;
        result.instructionsProcessed=instructionsProcessed;
        result.stack.clear();
        result.stack.addAll(stack);
      }
      if (ifed) {
        break;
      }
    }
  }
 catch (  EmptyStackException|TranslateException|InterruptedException ex) {
  }
}

Fixed version (ground truth):
private void executeActions(int classIndex,boolean isStatic,MethodBody body,int scriptIndex,ABC abc,AVM2Code code,int idx,int endIdx,ExecutionResult result){
  List<GraphTargetItem> output=new ArrayList<>();
  AVM2LocalData localData=newLocalData(scriptIndex,abc,abc.constants,body,isStatic,classIndex);
  FixItemCounterTranslateStack stack=new FixItemCounterTranslateStack("String_Node_Str");
  int instructionsProcessed=0;
  try {
    while (true) {
      if (idx > endIdx) {
        break;
      }
      if (instructionsProcessed > executionLimit) {
        break;
      }
      AVM2Instruction action=code.code.get(idx);
      action.translate(localData,stack,output,Graph.SOP_USE_STATIC,"String_Node_Str");
      InstructionDefinition def=action.definition;
      Class allowedDefs[]=new Class[]{PushByteIns.class,PushShortIns.class,PushIntIns.class,PushDoubleIns.class,PushStringIns.class,PushNullIns.class,PushUndefinedIns.class,PushFalseIns.class,PushTrueIns.class,DupIns.class,SwapIns.class,AddIns.class,AddIIns.class,SubtractIns.class,SubtractIIns.class,ModuloIns.class,MultiplyIns.class,BitAndIns.class,BitXorIns.class,BitOrIns.class,LShiftIns.class,RShiftIns.class,URShiftIns.class,EqualsIns.class,NotIns.class,IfTypeIns.class,JumpIns.class,EqualsIns.class,LessEqualsIns.class,GreaterEqualsIns.class,GreaterThanIns.class,LessThanIns.class,StrictEqualsIns.class,PopIns.class};
      boolean ok=false;
      for (      Class<?> s : allowedDefs) {
        if (s.isAssignableFrom(def.getClass())) {
          ok=true;
          break;
        }
      }
      if (!ok) {
        break;
      }
      boolean ifed=false;
      if (def instanceof JumpIns) {
        long address=action.offset + action.getBytesLength() + action.operands[0];
        idx=code.adr2pos(address);
        if (idx == -1) {
          throw new TranslateException("String_Node_Str" + address);
        }
      }
 else       if (def instanceof IfTypeIns) {
        GraphTargetItem top=stack.pop();
        Object res=top.getResult();
        long address=action.offset + action.getBytesLength() + action.operands[0];
        int nidx=code.adr2pos(address);
        AVM2Instruction tarIns=code.code.get(nidx);
        if (EcmaScript.toBoolean(res)) {
          AVM2Instruction jumpIns=new AVM2Instruction(0,new JumpIns(),new int[]{0});
          code.replaceInstruction(idx,jumpIns,body);
          jumpIns.operands[0]=(int)(tarIns.offset - jumpIns.offset - jumpIns.getBytesLength());
          code.insertInstruction(idx,new AVM2Instruction(action.offset,new DeobfuscatePopIns(),new int[]{}),true,body);
          idx=code.adr2pos(jumpIns.offset + jumpIns.getBytesLength() + jumpIns.operands[0]);
        }
 else {
          code.replaceInstruction(idx,new AVM2Instruction(action.offset,new DeobfuscatePopIns(),new int[]{}),body);
          idx++;
        }
        ifed=true;
      }
 else {
        idx++;
      }
      instructionsProcessed++;
      if (stack.allItemsFixed()) {
        result.idx=idx == code.code.size() ? idx - 1 : idx;
        result.instructionsProcessed=instructionsProcessed;
        result.stack.clear();
        result.stack.addAll(stack);
      }
      if (ifed) {
        break;
      }
    }
  }
 catch (  Exception ex) {
  }
}