Program: 165907
Project: 165907
Buggy source:
@Override public void initGui(){
  super.initGui();
  int k=(this.width - this.xSize) / 2;
  int l=(this.height - this.ySize) / 2;
  shapeLabel=new ChoiceLabel(mc,this).setDesiredWidth(100).setDesiredHeight(16).addChoices(ShapeCardItem.Shape.SHAPE_BOX.getDescription(),ShapeCardItem.Shape.SHAPE_TOPDOME.getDescription(),ShapeCardItem.Shape.SHAPE_BOTTOMDOME.getDescription(),ShapeCardItem.Shape.SHAPE_SPHERE.getDescription(),ShapeCardItem.Shape.SHAPE_CYLINDER.getDescription(),ShapeCardItem.Shape.SHAPE_CAPPEDCYLINDER.getDescription(),ShapeCardItem.Shape.SHAPE_PRISM.getDescription(),ShapeCardItem.Shape.SHAPE_TORUS.getDescription(),ShapeCardItem.Shape.SHAPE_SOLIDBOX.getDescription(),ShapeCardItem.Shape.SHAPE_SOLIDSPHERE.getDescription(),ShapeCardItem.Shape.SHAPE_SOLIDCYLINDER.getDescription(),ShapeCardItem.Shape.SHAPE_SOLIDTORUS.getDescription()).addChoiceEvent(new ChoiceEvent(){
    @Override public void choiceChanged(    Widget parent,    String newChoice){
      updateShape();
    }
  }
);
  ItemStack heldItem=mc.thePlayer.getHeldItem();
  if (heldItem == null) {
    return;
  }
  ShapeCardItem.Shape shape=ShapeCardItem.getShape(heldItem);
  shapeLabel.setChoice(shape.getDescription());
  blocksLabel=new Label(mc,this).setText("String_Node_Str").setHorizontalAlignment(HorizontalAlignment.ALIGH_LEFT);
  blocksLabel.setDesiredWidth(100).setDesiredHeight(16);
  Panel modePanel=new Panel(mc,this).setLayout(new VerticalLayout()).addChild(shapeLabel).addChild(blocksLabel);
  Coordinate dim=ShapeCardItem.getDimension(heldItem);
  Coordinate offset=ShapeCardItem.getOffset(heldItem);
  dimX=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      if (isTorus()) {
        dimZ.setText(newText);
      }
      updateSettings();
    }
  }
).setText(String.valueOf(dim.getX()));
  dimY=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      updateSettings();
    }
  }
).setText(String.valueOf(dim.getY()));
  dimZ=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      updateSettings();
    }
  }
).setText(String.valueOf(dim.getZ()));
  Panel dimPanel=new Panel(mc,this).setLayout(new HorizontalLayout()).addChild(dimX).addChild(dimY).addChild(dimZ);
  offsetX=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      updateSettings();
    }
  }
).setText(String.valueOf(offset.getX()));
  offsetY=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      updateSettings();
    }
  }
).setText(String.valueOf(offset.getY()));
  offsetZ=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      updateSettings();
    }
  }
).setText(String.valueOf(offset.getZ()));
  Panel offsetPanel=new Panel(mc,this).setLayout(new HorizontalLayout()).addChild(offsetX).addChild(offsetY).addChild(offsetZ);
  Panel settingsPanel=new Panel(mc,this).setLayout(new VerticalLayout()).addChild(dimPanel).addChild(offsetPanel);
  Widget toplevel=new Panel(mc,this).setFilledRectThickness(2).setLayout(new HorizontalLayout()).addChild(modePanel).addChild(settingsPanel);
  toplevel.setBounds(new Rectangle(k,l,xSize,ySize));
  window=new Window(this,toplevel);
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  int k=(this.width - this.xSize) / 2;
  int l=(this.height - this.ySize) / 2;
  shapeLabel=new ChoiceLabel(mc,this).setDesiredWidth(100).setDesiredHeight(16).addChoices(ShapeCardItem.Shape.SHAPE_BOX.getDescription(),ShapeCardItem.Shape.SHAPE_TOPDOME.getDescription(),ShapeCardItem.Shape.SHAPE_BOTTOMDOME.getDescription(),ShapeCardItem.Shape.SHAPE_SPHERE.getDescription(),ShapeCardItem.Shape.SHAPE_CYLINDER.getDescription(),ShapeCardItem.Shape.SHAPE_CAPPEDCYLINDER.getDescription(),ShapeCardItem.Shape.SHAPE_PRISM.getDescription(),ShapeCardItem.Shape.SHAPE_TORUS.getDescription(),ShapeCardItem.Shape.SHAPE_SOLIDBOX.getDescription(),ShapeCardItem.Shape.SHAPE_SOLIDSPHERE.getDescription(),ShapeCardItem.Shape.SHAPE_SOLIDCYLINDER.getDescription(),ShapeCardItem.Shape.SHAPE_SOLIDTORUS.getDescription()).addChoiceEvent(new ChoiceEvent(){
    @Override public void choiceChanged(    Widget parent,    String newChoice){
      updateSettings();
    }
  }
);
  ItemStack heldItem=mc.thePlayer.getHeldItem();
  if (heldItem == null) {
    return;
  }
  ShapeCardItem.Shape shape=ShapeCardItem.getShape(heldItem);
  shapeLabel.setChoice(shape.getDescription());
  blocksLabel=new Label(mc,this).setText("String_Node_Str").setHorizontalAlignment(HorizontalAlignment.ALIGH_LEFT);
  blocksLabel.setDesiredWidth(100).setDesiredHeight(16);
  Panel modePanel=new Panel(mc,this).setLayout(new VerticalLayout()).addChild(shapeLabel).addChild(blocksLabel);
  Coordinate dim=ShapeCardItem.getDimension(heldItem);
  Coordinate offset=ShapeCardItem.getOffset(heldItem);
  dimX=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      if (isTorus()) {
        dimZ.setText(newText);
      }
      updateSettings();
    }
  }
).setText(String.valueOf(dim.getX()));
  dimY=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      updateSettings();
    }
  }
).setText(String.valueOf(dim.getY()));
  dimZ=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      updateSettings();
    }
  }
).setText(String.valueOf(dim.getZ()));
  Panel dimPanel=new Panel(mc,this).setLayout(new HorizontalLayout()).addChild(new TextField(mc,this).setText("String_Node_Str")).addChild(dimX).addChild(dimY).addChild(dimZ);
  offsetX=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      updateSettings();
    }
  }
).setText(String.valueOf(offset.getX()));
  offsetY=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      updateSettings();
    }
  }
).setText(String.valueOf(offset.getY()));
  offsetZ=new TextField(mc,this).addTextEvent(new TextEvent(){
    @Override public void textChanged(    Widget parent,    String newText){
      updateSettings();
    }
  }
).setText(String.valueOf(offset.getZ()));
  Panel offsetPanel=new Panel(mc,this).setLayout(new HorizontalLayout()).addChild(new TextField(mc,this).setText("String_Node_Str")).addChild(offsetX).addChild(offsetY).addChild(offsetZ);
  Panel settingsPanel=new Panel(mc,this).setLayout(new VerticalLayout()).addChild(dimPanel).addChild(offsetPanel);
  Widget toplevel=new Panel(mc,this).setFilledRectThickness(2).setLayout(new HorizontalLayout()).addChild(modePanel).addChild(settingsPanel);
  toplevel.setBounds(new Rectangle(k,l,xSize,ySize));
  window=new Window(this,toplevel);
}