Program: 40529
Project: 40529
Buggy source:
/** 
 * Updates the GUI based on data read from Map Some child code derived from http://discourse.mapeditor.org/t/loading-tmx-map-and-displaying-with-javafx/1189
 */
private void updateGameGUI(){
  if (_map == null) {
    LOGGER.fatal("String_Node_Str");
    return;
  }
  String overlay=null;
switch (_engine.getGameState()) {
case INACTIVE:
    return;
case WON:
  overlay="String_Node_Str";
break;
case LOST:
overlay="String_Node_Str";
break;
case STALEMATE:
overlay="String_Node_Str";
break;
}
if (overlay != null) {
if (!hasDisplayedResultScreen) {
URL img=getClass().getResource(overlay);
displayResultScreen(img);
}
return;
}
ArrayList<MapLayer> layerList=new ArrayList<>(this._map.getLayers());
redrawCoords=new ArrayList<>();
Collections.reverse(layerList);
identifyDeltas(layerList);
Collections.reverse(layerList);
updateDeltas(layerList);
if (this.userHealth == null) {
this.userHealth=new ProgressBar();
this.opponentHealth=new ProgressBar();
this.opponentHealth.setTranslateX(700);
}
 else {
_imagePane.getChildren().remove(this.userHealth);
_imagePane.getChildren().remove(this.opponentHealth);
}
double userHealth=_engine.game.getPlayer(Game.PLAYER_ID).getHealth();
double opponentHealth=_engine.game.getPlayer(Game.OPPONENT_ID).getHealth();
double max=Game.HEALTH_MAX;
double userRatio=userHealth / max;
this.userHealth.setProgress(userRatio);
double opponentRatio=opponentHealth / max;
System.out.println("String_Node_Str" + opponentHealth);
System.out.println("String_Node_Str" + Double.toString(opponentRatio));
this.opponentHealth.setProgress(opponentHealth / max);
_imagePane.getChildren().add(this.opponentHealth);
_imagePane.getChildren().add(this.userHealth);
}

Fixed version (ground truth):
/** 
 * Updates the GUI based on data read from Map Some child code derived from http://discourse.mapeditor.org/t/loading-tmx-map-and-displaying-with-javafx/1189
 */
private void updateGameGUI(){
  if (_map == null) {
    LOGGER.fatal("String_Node_Str");
    return;
  }
  String overlay=null;
switch (_engine.getGameState()) {
case INACTIVE:
    return;
case WON:
  if (this._victoryConditionTickCounter < 3) {
    this._victoryConditionTickCounter++;
  }
 else {
    overlay="String_Node_Str";
  }
break;
case LOST:
if (this._victoryConditionTickCounter < 3) {
this._victoryConditionTickCounter++;
}
 else {
overlay="String_Node_Str";
}
break;
case STALEMATE:
if (this._victoryConditionTickCounter < 3) {
this._victoryConditionTickCounter++;
}
 else {
overlay="String_Node_Str";
}
break;
}
if (overlay != null) {
if (!hasDisplayedResultScreen) {
URL img=getClass().getResource(overlay);
displayResultScreen(img);
}
return;
}
ArrayList<MapLayer> layerList=new ArrayList<>(this._map.getLayers());
redrawCoords=new ArrayList<>();
Collections.reverse(layerList);
identifyDeltas(layerList);
Collections.reverse(layerList);
updateDeltas(layerList);
if (this.userHealth == null) {
this.userHealth=new ProgressBar();
this.opponentHealth=new ProgressBar();
this.opponentHealth.setTranslateX(700);
}
 else {
_imagePane.getChildren().remove(this.userHealth);
_imagePane.getChildren().remove(this.opponentHealth);
}
double userHealth=_engine.game.getPlayer(Game.PLAYER_ID).getHealth();
double opponentHealth=_engine.game.getPlayer(Game.OPPONENT_ID).getHealth();
double max=Game.HEALTH_MAX;
double userRatio=userHealth / max;
this.userHealth.setProgress(userRatio);
double opponentRatio=opponentHealth / max;
System.out.println("String_Node_Str" + opponentHealth);
System.out.println("String_Node_Str" + Double.toString(opponentRatio));
this.opponentHealth.setProgress(opponentHealth / max);
_imagePane.getChildren().add(this.opponentHealth);
_imagePane.getChildren().add(this.userHealth);
}