Program: 86642
Project: 86642
Buggy source:
private Vector2f refreshButtons(){
  Rectangle bounds=getBounds();
  Vector2f pos=new Vector2f();
  pos.x=bounds.x + 120;
  pos.y=bounds.y + 70;
  int yInc=80;
  for (int i=0; i < weaponClasses.length; i++) {
    if (this.weaponClasses[i] != null) {
      removeWidget(weaponClasses[i]);
      this.weaponClasses[i].destroy();
      this.weaponClasses[i]=null;
      removeWidget(this.weaponClassDescriptions[i]);
      this.weaponClassDescriptions[i].destroy();
      this.weaponClassDescriptions[i]=null;
    }
  }
switch (team) {
case AXIS:
    this.weaponClasses[0]=setupButton(pos,Type.MP40);
  this.weaponClassDescriptions[0]=setupLabel(pos,Type.MP40);
pos.y+=yInc;
this.weaponClasses[1]=setupButton(pos,Type.MP44);
this.weaponClassDescriptions[1]=setupLabel(pos,Type.MP44);
pos.y+=yInc;
this.weaponClasses[2]=setupButton(pos,Type.KAR98);
this.weaponClassDescriptions[2]=setupLabel(pos,Type.KAR98);
pos.y+=yInc;
break;
case ALLIES:
default :
this.weaponClasses[0]=setupButton(pos,Type.THOMPSON);
this.weaponClassDescriptions[0]=setupLabel(pos,Type.THOMPSON);
pos.y+=yInc;
this.weaponClasses[1]=setupButton(pos,Type.M1_GARAND);
this.weaponClassDescriptions[1]=setupLabel(pos,Type.M1_GARAND);
pos.y+=yInc;
this.weaponClasses[2]=setupButton(pos,Type.SPRINGFIELD);
this.weaponClassDescriptions[2]=setupLabel(pos,Type.SPRINGFIELD);
pos.y+=yInc;
break;
}
this.weaponClasses[3]=setupButton(pos,Type.RISKER);
this.weaponClassDescriptions[3]=setupLabel(pos,Type.RISKER);
pos.y+=yInc;
this.weaponClasses[4]=setupButton(pos,Type.SHOTGUN);
this.weaponClassDescriptions[4]=setupLabel(pos,Type.SHOTGUN);
pos.y+=yInc;
this.weaponClasses[5]=setupButton(pos,Type.ROCKET_LAUNCHER);
this.weaponClassDescriptions[5]=setupLabel(pos,Type.ROCKET_LAUNCHER);
pos.y+=yInc;
this.weaponClasses[6]=setupButton(pos,Type.FLAME_THROWER);
this.weaponClassDescriptions[6]=setupLabel(pos,Type.FLAME_THROWER);
return pos;
}

Fixed version (ground truth):
private Vector2f refreshButtons(){
  Rectangle bounds=getBounds();
  Vector2f pos=new Vector2f();
  pos.x=bounds.x + 120;
  pos.y=bounds.y + 50;
  int yInc=50;
  for (int i=0; i < weaponClasses.length; i++) {
    if (this.weaponClasses[i] != null) {
      removeWidget(weaponClasses[i]);
      this.weaponClasses[i].destroy();
      this.weaponClasses[i]=null;
      removeWidget(this.weaponClassDescriptions[i]);
      this.weaponClassDescriptions[i].destroy();
      this.weaponClassDescriptions[i]=null;
    }
  }
switch (team) {
case AXIS:
    this.weaponClasses[0]=setupButton(pos,Type.MP40);
  this.weaponClassDescriptions[0]=setupLabel(pos,Type.MP40);
pos.y+=yInc;
this.weaponClasses[1]=setupButton(pos,Type.MP44);
this.weaponClassDescriptions[1]=setupLabel(pos,Type.MP44);
pos.y+=yInc;
this.weaponClasses[2]=setupButton(pos,Type.KAR98);
this.weaponClassDescriptions[2]=setupLabel(pos,Type.KAR98);
pos.y+=yInc;
break;
case ALLIES:
default :
this.weaponClasses[0]=setupButton(pos,Type.THOMPSON);
this.weaponClassDescriptions[0]=setupLabel(pos,Type.THOMPSON);
pos.y+=yInc;
this.weaponClasses[1]=setupButton(pos,Type.M1_GARAND);
this.weaponClassDescriptions[1]=setupLabel(pos,Type.M1_GARAND);
pos.y+=yInc;
this.weaponClasses[2]=setupButton(pos,Type.SPRINGFIELD);
this.weaponClassDescriptions[2]=setupLabel(pos,Type.SPRINGFIELD);
pos.y+=yInc;
break;
}
this.weaponClasses[3]=setupButton(pos,Type.RISKER);
this.weaponClassDescriptions[3]=setupLabel(pos,Type.RISKER);
pos.y+=yInc;
this.weaponClasses[4]=setupButton(pos,Type.SHOTGUN);
this.weaponClassDescriptions[4]=setupLabel(pos,Type.SHOTGUN);
pos.y+=yInc;
this.weaponClasses[5]=setupButton(pos,Type.ROCKET_LAUNCHER);
this.weaponClassDescriptions[5]=setupLabel(pos,Type.ROCKET_LAUNCHER);
pos.y+=yInc;
this.weaponClasses[6]=setupButton(pos,Type.FLAME_THROWER);
this.weaponClassDescriptions[6]=setupLabel(pos,Type.FLAME_THROWER);
return pos;
}