Program: 8876
Project: 8876
Buggy source:
@Override public void onStartScreen(){
  bind(nifty,nifty.getCurrentScreen());
switch (nifty.getCurrentScreen().getScreenId()) {
case "String_Node_Str":
    mapSelector.reset();
  initSkirmishPlayers();
break;
case "String_Node_Str":
inputManager.addRawInputListener(listener);
break;
case "String_Node_Str":
Label levelTitle=screen.findNiftyControl("String_Node_Str",Label.class);
levelTitle.setText(getLevelTitle());
Label mainObjective=screen.findNiftyControl("String_Node_Str",Label.class);
mainObjective.setText(getLevelResourceBundle().getString("String_Node_Str"));
Element mainObjectiveImage=screen.findElementById("String_Node_Str");
NiftyImage img=nifty.createImage("String_Node_Str" + selectedLevel.getFullName() + "String_Node_Str",false);
mainObjectiveImage.getRenderer(ImageRenderer.class).setImage(img);
mainObjectiveImage.setWidth(img.getWidth());
mainObjectiveImage.setHeight(img.getHeight());
String subText1=getLevelResourceBundle().getString("String_Node_Str");
String subText2=getLevelResourceBundle().getString("String_Node_Str");
String subText3=getLevelResourceBundle().getString("String_Node_Str");
Element subObjectivePanel=screen.findElementById("String_Node_Str");
subObjectivePanel.hide();
if (!(subText1.isEmpty() && subText2.isEmpty() && subText3.isEmpty())) {
subObjectivePanel.show();
setupSubObjectiveLabel("String_Node_Str",subText1);
setupSubObjectiveLabel("String_Node_Str",subText2);
Label subObjective=setupSubObjectiveLabel("String_Node_Str",subText3);
subObjective.getElement().getParent().layoutElements();
Element subObjectiveImage=screen.findElementById("String_Node_Str");
subObjectiveImage.hide();
if (selectedLevel.getType().equals(Level.LevelType.Level)) {
subObjectiveImage.show();
img=nifty.createImage("String_Node_Str" + selectedLevel.getFullName() + "String_Node_Str",false);
subObjectiveImage.getRenderer(ImageRenderer.class).setImage(img);
subObjectiveImage.setWidth(img.getWidth());
subObjectiveImage.setHeight(img.getHeight());
levelBriefing=new AudioNode(assetManager,"String_Node_Str" + String.format("String_Node_Str",selectedLevel.getLevel()) + "String_Node_Str",false);
levelBriefing.setLooping(false);
levelBriefing.setDirectional(false);
levelBriefing.setPositional(false);
levelBriefing.play();
}
}
break;
case "String_Node_Str":
generateHiscoreList();
break;
case "String_Node_Str":
setGraphicsSettingsToGUI();
break;
case "String_Node_Str":
setControlSettingsToGUI();
break;
case "String_Node_Str":
generateMovieList();
break;
case "String_Node_Str":
mapSelector.setSkirmish(true);
populateSelectedMap(mapSelector.getMap());
populateSkirmishPlayerTable();
break;
case "String_Node_Str":
mapSelector.reset();
break;
case "String_Node_Str":
mapSelector.setSkirmish(false);
populateSelectedMap(mapSelector.getMap());
if (client != null) {
ListBox<TableRow> players=screen.findNiftyControl("String_Node_Str",ListBox.class);
if (players != null) {
players.addItem(new TableRow(players.itemCount(),client.getPlayer()));
}
client.setChat(MainMenuState.this.screen.findNiftyControl("String_Node_Str",Chat.class));
Label title=screen.findNiftyControl("String_Node_Str",Label.class);
if (title != null) {
title.setText(client.getClient().getGameName());
}
if (client.getRole() == NetworkClient.Role.SLAVE) {
Element element=screen.findElementById("String_Node_Str");
if (element != null) {
element.hide();
}
element=screen.findElementById("String_Node_Str");
if (element != null) {
element.hide();
}
}
}
break;
case "String_Node_Str":
mapSelector.reset();
break;
case "String_Node_Str":
{
populateMapSelection();
}
}
}

Fixed version (ground truth):
@Override public void onStartScreen(){
  bind(nifty,nifty.getCurrentScreen());
switch (nifty.getCurrentScreen().getScreenId()) {
case "String_Node_Str":
    mapSelector.reset();
  initSkirmishPlayers();
break;
case "String_Node_Str":
inputManager.addRawInputListener(listener);
break;
case "String_Node_Str":
Label levelTitle=screen.findNiftyControl("String_Node_Str",Label.class);
levelTitle.setText(getLevelTitle());
Label mainObjective=screen.findNiftyControl("String_Node_Str",Label.class);
mainObjective.setText(getLevelResourceBundle().getString("String_Node_Str"));
Element mainObjectiveImage=screen.findElementById("String_Node_Str");
NiftyImage img=nifty.createImage("String_Node_Str" + selectedLevel.getFullName() + "String_Node_Str",false);
mainObjectiveImage.getRenderer(ImageRenderer.class).setImage(img);
mainObjectiveImage.setWidth(img.getWidth());
mainObjectiveImage.setHeight(img.getHeight());
String subText1=getLevelResourceBundle().getString("String_Node_Str");
String subText2=getLevelResourceBundle().getString("String_Node_Str");
String subText3=getLevelResourceBundle().getString("String_Node_Str");
Element subObjectivePanel=screen.findElementById("String_Node_Str");
subObjectivePanel.hide();
if (!(subText1.isEmpty() && subText2.isEmpty() && subText3.isEmpty())) {
subObjectivePanel.show();
setupSubObjectiveLabel("String_Node_Str",subText1);
setupSubObjectiveLabel("String_Node_Str",subText2);
Label subObjective=setupSubObjectiveLabel("String_Node_Str",subText3);
subObjective.getElement().getParent().layoutElements();
Element subObjectiveImage=screen.findElementById("String_Node_Str");
subObjectiveImage.hide();
if (selectedLevel.getType().equals(Level.LevelType.Level)) {
subObjectiveImage.show();
img=nifty.createImage("String_Node_Str" + selectedLevel.getFullName() + "String_Node_Str",false);
subObjectiveImage.getRenderer(ImageRenderer.class).setImage(img);
subObjectiveImage.setWidth(img.getWidth());
subObjectiveImage.setHeight(img.getHeight());
levelBriefing=new AudioNode(assetManager,ConversionUtils.getCanonicalAssetKey("String_Node_Str" + String.format("String_Node_Str",selectedLevel.getLevel()) + "String_Node_Str"),DataType.Stream);
levelBriefing.setLooping(false);
levelBriefing.setDirectional(false);
levelBriefing.setPositional(false);
levelBriefing.play();
}
}
break;
case "String_Node_Str":
generateHiscoreList();
break;
case "String_Node_Str":
setGraphicsSettingsToGUI();
break;
case "String_Node_Str":
setControlSettingsToGUI();
break;
case "String_Node_Str":
generateMovieList();
break;
case "String_Node_Str":
mapSelector.setSkirmish(true);
populateSelectedMap(mapSelector.getMap());
populateSkirmishPlayerTable();
break;
case "String_Node_Str":
mapSelector.reset();
break;
case "String_Node_Str":
mapSelector.setSkirmish(false);
populateSelectedMap(mapSelector.getMap());
if (client != null) {
ListBox<TableRow> players=screen.findNiftyControl("String_Node_Str",ListBox.class);
if (players != null) {
players.addItem(new TableRow(players.itemCount(),client.getPlayer()));
}
client.setChat(MainMenuState.this.screen.findNiftyControl("String_Node_Str",Chat.class));
Label title=screen.findNiftyControl("String_Node_Str",Label.class);
if (title != null) {
title.setText(client.getClient().getGameName());
}
if (client.getRole() == NetworkClient.Role.SLAVE) {
Element element=screen.findElementById("String_Node_Str");
if (element != null) {
element.hide();
}
element=screen.findElementById("String_Node_Str");
if (element != null) {
element.hide();
}
}
}
break;
case "String_Node_Str":
mapSelector.reset();
break;
case "String_Node_Str":
{
populateMapSelection();
}
}
}