Program: 62183
Project: 62183
Buggy source:
@Override public void translate(boolean isStatic,int scriptIndex,int classIndex,java.util.HashMap<Integer,GraphTargetItem> localRegs,Stack<GraphTargetItem> stack,java.util.Stack<GraphTargetItem> scopeStack,ConstantPool constants,AVM2Instruction ins,MethodInfo[] method_info,List<GraphTargetItem> output,com.jpexs.decompiler.flash.abc.types.MethodBody body,com.jpexs.decompiler.flash.abc.ABC abc,HashMap<Integer,String> localRegNames,List<String> fullyQualifiedNames){
  int slotIndex=ins.operands[0];
  GraphTargetItem value=(GraphTargetItem)stack.pop();
  GraphTargetItem obj=(GraphTargetItem)stack.pop();
  obj=obj.getThroughRegister();
  Multiname slotname=null;
  if (obj instanceof NewActivationTreeItem) {
    ((NewActivationTreeItem)obj).slots.put(slotIndex,value);
  }
  if (obj instanceof ExceptionTreeItem) {
    slotname=constants.constant_multiname[((ExceptionTreeItem)obj).exception.name_index];
  }
 else   if (obj instanceof ClassTreeItem) {
    slotname=((ClassTreeItem)obj).className;
  }
 else   if (obj instanceof ThisTreeItem) {
    slotname=((ThisTreeItem)obj).className;
  }
 else   if (obj instanceof ScriptTreeItem) {
    for (int t=0; t < abc.script_info[((ScriptTreeItem)obj).scriptIndex].traits.traits.length; t++) {
      Trait tr=abc.script_info[((ScriptTreeItem)obj).scriptIndex].traits.traits[t];
      if (tr instanceof TraitWithSlot) {
        if (((TraitWithSlot)tr).getSlotIndex() == slotIndex) {
          slotname=tr.getName(abc);
        }
      }
    }
  }
 else   if (obj instanceof NewActivationTreeItem) {
    for (int t=0; t < body.traits.traits.length; t++) {
      if (body.traits.traits[t] instanceof TraitWithSlot) {
        if (((TraitWithSlot)body.traits.traits[t]).getSlotIndex() == slotIndex) {
          slotname=body.traits.traits[t].getName(abc);
        }
      }
    }
  }
  if (slotname != null) {
    if (localRegNames.containsValue(slotname.getName(constants,fullyQualifiedNames))) {
      return;
    }
    ;
  }
  if (value.getNotCoerced().getThroughDuplicate() instanceof IncrementTreeItem) {
    GraphTargetItem inside=((IncrementTreeItem)value.getNotCoerced()).object.getThroughRegister().getNotCoerced().getThroughDuplicate();
    if (inside instanceof GetSlotTreeItem) {
      GetSlotTreeItem slotItem=(GetSlotTreeItem)inside;
      if ((slotItem.scope.getThroughRegister() == obj.getThroughRegister()) && (slotItem.slotName == slotname)) {
        if (stack.size() > 0) {
          GraphTargetItem top=stack.peek().getNotCoerced().getThroughDuplicate();
          if (top == inside) {
            stack.pop();
            stack.push(new PostIncrementTreeItem(ins,inside));
          }
 else           if ((top instanceof IncrementTreeItem) && (((IncrementTreeItem)top).object == inside)) {
            stack.pop();
            stack.push(new PreIncrementTreeItem(ins,inside));
          }
 else {
            output.add(new PostIncrementTreeItem(ins,inside));
          }
        }
 else {
          output.add(new PostIncrementTreeItem(ins,inside));
        }
        return;
      }
    }
  }
  if (value.getNotCoerced().getThroughDuplicate() instanceof DecrementTreeItem) {
    GraphTargetItem inside=((DecrementTreeItem)value.getNotCoerced()).object.getThroughRegister().getNotCoerced().getThroughDuplicate();
    if (inside instanceof GetSlotTreeItem) {
      GetSlotTreeItem slotItem=(GetSlotTreeItem)inside;
      if ((slotItem.scope.getThroughRegister() == obj.getThroughRegister()) && (slotItem.slotName == slotname)) {
        if (stack.size() > 0) {
          GraphTargetItem top=stack.peek().getNotCoerced().getThroughDuplicate();
          if (top == inside) {
            stack.pop();
            stack.push(new PostDecrementTreeItem(ins,inside));
          }
 else           if ((top instanceof DecrementTreeItem) && (((DecrementTreeItem)top).object == inside)) {
            stack.pop();
            stack.push(new PreDecrementTreeItem(ins,inside));
          }
 else {
            output.add(new PostDecrementTreeItem(ins,inside));
          }
        }
 else {
          output.add(new PostDecrementTreeItem(ins,inside));
        }
        return;
      }
    }
  }
  output.add(new SetSlotTreeItem(ins,obj,slotname,value));
}

Fixed version (ground truth):
@Override public void translate(boolean isStatic,int scriptIndex,int classIndex,java.util.HashMap<Integer,GraphTargetItem> localRegs,Stack<GraphTargetItem> stack,java.util.Stack<GraphTargetItem> scopeStack,ConstantPool constants,AVM2Instruction ins,MethodInfo[] method_info,List<GraphTargetItem> output,com.jpexs.decompiler.flash.abc.types.MethodBody body,com.jpexs.decompiler.flash.abc.ABC abc,HashMap<Integer,String> localRegNames,List<String> fullyQualifiedNames){
  int slotIndex=ins.operands[0];
  GraphTargetItem value=(GraphTargetItem)stack.pop();
  GraphTargetItem obj=(GraphTargetItem)stack.pop();
  obj=obj.getThroughRegister();
  Multiname slotname=null;
  if (obj instanceof NewActivationTreeItem) {
    ((NewActivationTreeItem)obj).slots.put(slotIndex,value);
  }
  if (obj instanceof ExceptionTreeItem) {
    slotname=constants.constant_multiname[((ExceptionTreeItem)obj).exception.name_index];
  }
 else   if (obj instanceof ClassTreeItem) {
    slotname=((ClassTreeItem)obj).className;
  }
 else   if (obj instanceof ThisTreeItem) {
    slotname=((ThisTreeItem)obj).className;
  }
 else   if (obj instanceof ScriptTreeItem) {
    for (int t=0; t < abc.script_info[((ScriptTreeItem)obj).scriptIndex].traits.traits.length; t++) {
      Trait tr=abc.script_info[((ScriptTreeItem)obj).scriptIndex].traits.traits[t];
      if (tr instanceof TraitWithSlot) {
        if (((TraitWithSlot)tr).getSlotIndex() == slotIndex) {
          slotname=tr.getName(abc);
        }
      }
    }
  }
 else   if (obj instanceof NewActivationTreeItem) {
    for (int t=0; t < body.traits.traits.length; t++) {
      if (body.traits.traits[t] instanceof TraitWithSlot) {
        if (((TraitWithSlot)body.traits.traits[t]).getSlotIndex() == slotIndex) {
          slotname=body.traits.traits[t].getName(abc);
        }
      }
    }
  }
  if (slotname != null) {
    if (value instanceof LocalRegTreeItem) {
      LocalRegTreeItem lr=(LocalRegTreeItem)value;
      String slotNameStr=slotname.getName(constants,fullyQualifiedNames);
      if (localRegNames.containsKey(lr.regIndex)) {
        if (localRegNames.get(lr.regIndex).equals(slotNameStr)) {
          return;
        }
      }
    }
  }
  if (value.getNotCoerced().getThroughDuplicate() instanceof IncrementTreeItem) {
    GraphTargetItem inside=((IncrementTreeItem)value.getNotCoerced()).object.getThroughRegister().getNotCoerced().getThroughDuplicate();
    if (inside instanceof GetSlotTreeItem) {
      GetSlotTreeItem slotItem=(GetSlotTreeItem)inside;
      if ((slotItem.scope.getThroughRegister() == obj.getThroughRegister()) && (slotItem.slotName == slotname)) {
        if (stack.size() > 0) {
          GraphTargetItem top=stack.peek().getNotCoerced().getThroughDuplicate();
          if (top == inside) {
            stack.pop();
            stack.push(new PostIncrementTreeItem(ins,inside));
          }
 else           if ((top instanceof IncrementTreeItem) && (((IncrementTreeItem)top).object == inside)) {
            stack.pop();
            stack.push(new PreIncrementTreeItem(ins,inside));
          }
 else {
            output.add(new PostIncrementTreeItem(ins,inside));
          }
        }
 else {
          output.add(new PostIncrementTreeItem(ins,inside));
        }
        return;
      }
    }
  }
  if (value.getNotCoerced().getThroughDuplicate() instanceof DecrementTreeItem) {
    GraphTargetItem inside=((DecrementTreeItem)value.getNotCoerced()).object.getThroughRegister().getNotCoerced().getThroughDuplicate();
    if (inside instanceof GetSlotTreeItem) {
      GetSlotTreeItem slotItem=(GetSlotTreeItem)inside;
      if ((slotItem.scope.getThroughRegister() == obj.getThroughRegister()) && (slotItem.slotName == slotname)) {
        if (stack.size() > 0) {
          GraphTargetItem top=stack.peek().getNotCoerced().getThroughDuplicate();
          if (top == inside) {
            stack.pop();
            stack.push(new PostDecrementTreeItem(ins,inside));
          }
 else           if ((top instanceof DecrementTreeItem) && (((DecrementTreeItem)top).object == inside)) {
            stack.pop();
            stack.push(new PreDecrementTreeItem(ins,inside));
          }
 else {
            output.add(new PostDecrementTreeItem(ins,inside));
          }
        }
 else {
          output.add(new PostDecrementTreeItem(ins,inside));
        }
        return;
      }
    }
  }
  output.add(new SetSlotTreeItem(ins,obj,slotname,value));
}