Program: 61534
Project: 61534
Buggy source:
private void visitCode(Set<Integer> visited,TranslateStack stack,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);
  localData.localRegs.put(0,new NullAVM2Item(null));
  int instructionsProcessed=0;
  try {
    while (true) {
      if (idx > endIdx) {
        break;
      }
      if (visited.contains(idx)) {
        break;
      }
      visited.add(idx);
      AVM2Instruction action=code.code.get(idx);
      instructionsProcessed++;
      action.translate(localData,stack,output,Graph.SOP_USE_STATIC,"String_Node_Str");
      InstructionDefinition def=action.definition;
      if (def instanceof SetLocalTypeIns) {
        SetLocalTypeIns slt=(SetLocalTypeIns)def;
        int regId=slt.getRegisterId(action);
        if (!result.assignCount.containsKey(regId)) {
          result.assignCount.put(regId,0);
        }
        result.assignCount.put(regId,result.assignCount.get(regId) + 1);
        GraphTargetItem regVal=localData.localRegs.get(regId);
        if (regVal == null || !regVal.getNotCoerced().isCompileTime()) {
          result.assignCount.put(regId,Integer.MAX_VALUE);
        }
 else {
          result.lastAssigned.put(regId,regVal.getNotCoerced());
        }
      }
      idx++;
      if (action.definition 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);
        }
      }
      if (action.isBranch()) {
        List<Integer> branches=action.getBranches(new GraphSource(){
          @Override public int size(){
            throw new UnsupportedOperationException("String_Node_Str");
          }
          @Override public GraphSourceItem get(          int pos){
            throw new UnsupportedOperationException("String_Node_Str");
          }
          @Override public boolean isEmpty(){
            throw new UnsupportedOperationException("String_Node_Str");
          }
          @Override public List<GraphTargetItem> translatePart(          GraphPart part,          BaseLocalData localData,          TranslateStack stack,          int start,          int end,          int staticOperation,          String path) throws InterruptedException {
            throw new UnsupportedOperationException("String_Node_Str");
          }
          @Override public int adr2pos(          long adr){
            return code.adr2pos(adr);
          }
          @Override public long pos2adr(          int pos){
            return code.pos2adr(pos);
          }
        }
);
        idx=branches.get(0);
        for (int n=1; n < branches.size(); n++) {
          visitCode(visited,(TranslateStack)stack.clone(),classIndex,isStatic,body,scriptIndex,abc,code,branches.get(n),endIdx,result);
        }
      }
      if (action.definition instanceof ReturnValueIns) {
        break;
      }
      if (action.definition instanceof ThrowIns) {
        break;
      }
      if (action.definition instanceof ReturnVoidIns) {
        break;
      }
    }
  }
 catch (  Exception ex) {
  }
}

Fixed version (ground truth):
private void visitCode(Set<Integer> visited,TranslateStack stack,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);
  localData.localRegs.put(0,new NullAVM2Item(null));
  int instructionsProcessed=0;
  List<Integer> toVisit=new ArrayList<>();
  toVisit.add(idx);
  List<TranslateStack> toVisitStacks=new ArrayList<>();
  toVisitStacks.add(stack);
  while (!toVisit.isEmpty()) {
    idx=toVisit.remove(0);
    stack=toVisitStacks.remove(0);
    try {
      while (true) {
        if (idx > endIdx) {
          break;
        }
        if (visited.contains(idx)) {
          break;
        }
        visited.add(idx);
        AVM2Instruction action=code.code.get(idx);
        instructionsProcessed++;
        action.translate(localData,stack,output,Graph.SOP_USE_STATIC,"String_Node_Str");
        InstructionDefinition def=action.definition;
        if (def instanceof SetLocalTypeIns) {
          SetLocalTypeIns slt=(SetLocalTypeIns)def;
          int regId=slt.getRegisterId(action);
          if (!result.assignCount.containsKey(regId)) {
            result.assignCount.put(regId,0);
          }
          result.assignCount.put(regId,result.assignCount.get(regId) + 1);
          GraphTargetItem regVal=localData.localRegs.get(regId);
          if (regVal == null || !regVal.getNotCoerced().isCompileTime()) {
            result.assignCount.put(regId,Integer.MAX_VALUE);
          }
 else {
            result.lastAssigned.put(regId,regVal.getNotCoerced());
          }
        }
        idx++;
        if (action.definition 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);
          }
        }
        if (action.isBranch()) {
          List<Integer> branches=action.getBranches(new GraphSource(){
            @Override public int size(){
              throw new UnsupportedOperationException("String_Node_Str");
            }
            @Override public GraphSourceItem get(            int pos){
              throw new UnsupportedOperationException("String_Node_Str");
            }
            @Override public boolean isEmpty(){
              throw new UnsupportedOperationException("String_Node_Str");
            }
            @Override public List<GraphTargetItem> translatePart(            GraphPart part,            BaseLocalData localData,            TranslateStack stack,            int start,            int end,            int staticOperation,            String path) throws InterruptedException {
              throw new UnsupportedOperationException("String_Node_Str");
            }
            @Override public int adr2pos(            long adr){
              return code.adr2pos(adr);
            }
            @Override public long pos2adr(            int pos){
              return code.pos2adr(pos);
            }
          }
);
          idx=branches.get(0);
          for (int n=1; n < branches.size(); n++) {
            int nidx=branches.get(n);
            if (visited.contains(nidx)) {
              continue;
            }
            toVisit.add(nidx);
            toVisitStacks.add((TranslateStack)stack.clone());
          }
        }
        if (action.definition instanceof ReturnValueIns) {
          break;
        }
        if (action.definition instanceof ThrowIns) {
          break;
        }
        if (action.definition instanceof ReturnVoidIns) {
          break;
        }
      }
    }
 catch (    Exception ex) {
    }
  }
}