Program: 171325
Project: 171325
Buggy source:
public void restoreSavedContent(){
  positionAnchor=initialPositionAnchor;
  dialogueTitle=UtilText.parse(savedDialogueNode.getLabel());
  currentDialogueNode=savedDialogueNode;
  if (currentDialogueNode.reloadOnRestore()) {
    String headerContent=currentDialogueNode.getHeaderContent();
    String content=currentDialogueNode.getContent();
    currentDialogue="String_Node_Str" + "String_Node_Str" + "String_Node_Str" + (positionAnchor) + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ getTitleDiv(dialogueTitle)+ "String_Node_Str"+ positionAnchor+ "String_Node_Str"+ "String_Node_Str"+ getMapDiv()+ (headerContent != null ? "String_Node_Str" + Main.getProperties().fontSize + "String_Node_Str"+ (Main.getProperties().fontSize + 6)+ "String_Node_Str"+ (currentDialogueNode.disableHeaderParsing() ? headerContent : UtilText.parse(headerContent))+ "String_Node_Str" : "String_Node_Str")+ (content != null ? "String_Node_Str" + (Main.getProperties().fadeInText ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Main.getProperties().fontSize+ "String_Node_Str"+ (Main.getProperties().fontSize + 6)+ "String_Node_Str"+ content+ "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ getResponsesDiv(currentDialogueNode)+ "String_Node_Str";
  }
 else {
    currentDialogue=savedDialogue;
  }
  pastDialogueSB.setLength(0);
  pastDialogueSB.append(previousPastDialogueSBContents);
  if (Main.getProperties().fontSize == FONT_SIZE_NORMAL) {
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_LARGE + "String_Node_Str"+ (FONT_SIZE_LARGE + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_NORMAL + "String_Node_Str"+ (FONT_SIZE_NORMAL + 6)+ "String_Node_Str");
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_HUGE + "String_Node_Str"+ (FONT_SIZE_HUGE + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_NORMAL + "String_Node_Str"+ (FONT_SIZE_NORMAL + 6)+ "String_Node_Str");
  }
 else   if (Main.getProperties().fontSize == FONT_SIZE_LARGE) {
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_NORMAL + "String_Node_Str"+ (FONT_SIZE_NORMAL + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_LARGE + "String_Node_Str"+ (FONT_SIZE_LARGE + 6)+ "String_Node_Str");
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_HUGE + "String_Node_Str"+ (FONT_SIZE_HUGE + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_LARGE + "String_Node_Str"+ (FONT_SIZE_LARGE + 6)+ "String_Node_Str");
  }
 else   if (Main.getProperties().fontSize == FONT_SIZE_HUGE) {
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_NORMAL + "String_Node_Str"+ (FONT_SIZE_NORMAL + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_HUGE + "String_Node_Str"+ (FONT_SIZE_HUGE + 6)+ "String_Node_Str");
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_LARGE + "String_Node_Str"+ (FONT_SIZE_LARGE + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_HUGE + "String_Node_Str"+ (FONT_SIZE_HUGE + 6)+ "String_Node_Str");
  }
  Main.mainController.setMainContent(currentDialogue);
  textEndStringBuilder.setLength(0);
  textStartStringBuilder.setLength(0);
  Main.game.endTurn(0);
}

Fixed version (ground truth):
public void restoreSavedContent(){
  positionAnchor=initialPositionAnchor;
  dialogueTitle=UtilText.parse(savedDialogueNode.getLabel());
  currentDialogueNode=savedDialogueNode;
  if (Main.game.isInSex()) {
    Sex.recalculateSexActions();
  }
  if (currentDialogueNode.reloadOnRestore()) {
    String headerContent=currentDialogueNode.getHeaderContent();
    String content=currentDialogueNode.getContent();
    currentDialogue="String_Node_Str" + "String_Node_Str" + (positionAnchor) + "String_Node_Str"+ "String_Node_Str"+ getTitleDiv(dialogueTitle)+ "String_Node_Str"+ getMapDiv()+ (headerContent != null ? "String_Node_Str" + Main.getProperties().fontSize + "String_Node_Str"+ (Main.getProperties().fontSize + 6)+ "String_Node_Str"+ (currentDialogueNode.disableHeaderParsing() ? headerContent : UtilText.parse(headerContent))+ "String_Node_Str" : "String_Node_Str")+ (content != null ? "String_Node_Str" + (Main.getProperties().fadeInText ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Main.getProperties().fontSize+ "String_Node_Str"+ (Main.getProperties().fontSize + 6)+ "String_Node_Str"+ content+ "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ "String_Node_Str"+ getResponsesDiv(currentDialogueNode)+ "String_Node_Str"+ "String_Node_Str";
  }
 else {
    currentDialogue=savedDialogue;
  }
  pastDialogueSB.setLength(0);
  pastDialogueSB.append(previousPastDialogueSBContents);
  if (Main.getProperties().fontSize == FONT_SIZE_NORMAL) {
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_LARGE + "String_Node_Str"+ (FONT_SIZE_LARGE + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_NORMAL + "String_Node_Str"+ (FONT_SIZE_NORMAL + 6)+ "String_Node_Str");
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_HUGE + "String_Node_Str"+ (FONT_SIZE_HUGE + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_NORMAL + "String_Node_Str"+ (FONT_SIZE_NORMAL + 6)+ "String_Node_Str");
  }
 else   if (Main.getProperties().fontSize == FONT_SIZE_LARGE) {
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_NORMAL + "String_Node_Str"+ (FONT_SIZE_NORMAL + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_LARGE + "String_Node_Str"+ (FONT_SIZE_LARGE + 6)+ "String_Node_Str");
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_HUGE + "String_Node_Str"+ (FONT_SIZE_HUGE + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_LARGE + "String_Node_Str"+ (FONT_SIZE_LARGE + 6)+ "String_Node_Str");
  }
 else   if (Main.getProperties().fontSize == FONT_SIZE_HUGE) {
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_NORMAL + "String_Node_Str"+ (FONT_SIZE_NORMAL + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_HUGE + "String_Node_Str"+ (FONT_SIZE_HUGE + 6)+ "String_Node_Str");
    currentDialogue=currentDialogue.replaceFirst("String_Node_Str" + FONT_SIZE_LARGE + "String_Node_Str"+ (FONT_SIZE_LARGE + 6)+ "String_Node_Str","String_Node_Str" + FONT_SIZE_HUGE + "String_Node_Str"+ (FONT_SIZE_HUGE + 6)+ "String_Node_Str");
  }
  Main.mainController.setMainContent(currentDialogue);
  textEndStringBuilder.setLength(0);
  textStartStringBuilder.setLength(0);
  Main.game.endTurn(0);
}