Program: 20059
Project: 20059
Buggy source:
static void sendMessage(Player player,String message,String context){
  PlayerData data=SRPG.playerDataManager.get(player);
  ArrayList<String> messageList=(ArrayList<String>)Settings.localization.get(SRPG.playerDataManager.get(player).locale).getStringList("String_Node_Str" + message,new ArrayList<String>());
  if (messageList.isEmpty()) {
    messageList.add(Settings.localization.get(SRPG.playerDataManager.get(player).locale).getString("String_Node_Str" + message,"String_Node_Str" + message + "String_Node_Str"));
  }
  if (Settings.localization.get(SRPG.playerDataManager.get(player).locale).getStringList("String_Node_Str",(new ArrayList<String>())).contains(message)) {
    String choice=messageList.get(SRPG.generator.nextInt(messageList.size()));
    messageList.clear();
    messageList.add(choice);
  }
  for (  String line : messageList) {
    Pattern pattern=Pattern.compile("String_Node_Str");
    Matcher matcher=pattern.matcher(line);
    StringBuffer sb=new StringBuffer();
    while (matcher.find()) {
      String match=matcher.group();
      if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,Integer.toString(data.free + data.spent));
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,data.xp.toString());
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,PlayerData.xpToLevel.toString());
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,data.free.toString());
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,Settings.nameReplacements.get(data.locale).get("String_Node_Str" + context));
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,data.skillpoints.get(context).toString());
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,context);
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,Settings.nameReplacements.get(data.locale).get("String_Node_Str" + context));
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        ArrayList<String> milestones=data.getMilestones(context);
        matcher.appendReplacement(sb,Settings.nameReplacements.get(data.locale).get("String_Node_Str" + milestones.get(milestones.size() - 1)));
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,data.charges.get(context).toString());
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,data.chargeProgress.get(context).toString());
      }
 else       if (match.startsWith("String_Node_Str")) {
        matcher.appendReplacement(sb,Settings.advanced.getString(match.substring(2,match.length() - 1)));
      }
 else       if (match.startsWith("String_Node_Str")) {
        double value=Settings.advanced.getDouble(match.substring(2,match.length() - 1),0.0);
        String result="String_Node_Str";
        if (value < 0.01) {
          result="String_Node_Str" + Integer.toString((int)(value * 1000));
        }
 else {
          result=Integer.toString((int)(value * 100));
        }
        matcher.appendReplacement(sb,result + "String_Node_Str");
      }
 else       if (Settings.nameReplacements.get(data.locale).containsKey(match.substring(1,match.length() - 1))) {
        matcher.appendReplacement(sb,Settings.nameReplacements.get(data.locale).get(match.substring(1,match.length() - 1)));
      }
    }
    matcher.appendTail(sb);
    pattern=Pattern.compile("String_Node_Str");
    matcher=pattern.matcher(sb.toString());
    sb=new StringBuffer();
    while (matcher.find()) {
      if (Settings.colorMap.containsKey(matcher.group())) {
        matcher.appendReplacement(sb,Settings.colorMap.get(matcher.group()));
      }
    }
    matcher.appendTail(sb);
    player.sendMessage(sb.toString());
  }
}

Fixed version (ground truth):
static void sendMessage(Player player,String message,String context){
  PlayerData data=SRPG.playerDataManager.get(player);
  ArrayList<String> messageList=(ArrayList<String>)Settings.localization.get(SRPG.playerDataManager.get(player).locale).getStringList("String_Node_Str" + message,new ArrayList<String>());
  if (messageList.isEmpty()) {
    messageList.add(Settings.localization.get(SRPG.playerDataManager.get(player).locale).getString("String_Node_Str" + message,"String_Node_Str" + message + "String_Node_Str"));
  }
  if (Settings.localization.get(SRPG.playerDataManager.get(player).locale).getStringList("String_Node_Str",(new ArrayList<String>())).contains(message)) {
    String choice=messageList.get(SRPG.generator.nextInt(messageList.size()));
    messageList.clear();
    messageList.add(choice);
  }
  for (  String line : messageList) {
    Pattern pattern=Pattern.compile("String_Node_Str");
    Matcher matcher=pattern.matcher(line);
    StringBuffer sb=new StringBuffer();
    while (matcher.find()) {
      String match=matcher.group();
      if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,Integer.toString(data.free + data.spent));
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,Integer.toString(data.xp % PlayerData.xpToLevel));
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,PlayerData.xpToLevel.toString());
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,data.free.toString());
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,Settings.nameReplacements.get(data.locale).get("String_Node_Str" + context));
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,data.skillpoints.get(context).toString());
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,context);
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,Settings.nameReplacements.get(data.locale).get("String_Node_Str" + context));
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        ArrayList<String> milestones=data.getMilestones(context);
        matcher.appendReplacement(sb,Settings.nameReplacements.get(data.locale).get("String_Node_Str" + milestones.get(milestones.size() - 1)));
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,data.charges.get(context).toString());
      }
 else       if (match.equalsIgnoreCase("String_Node_Str")) {
        matcher.appendReplacement(sb,data.chargeProgress.get(context).toString());
      }
 else       if (match.startsWith("String_Node_Str")) {
        matcher.appendReplacement(sb,Settings.advanced.getString(match.substring(2,match.length() - 1)));
      }
 else       if (match.startsWith("String_Node_Str")) {
        double value=Settings.advanced.getDouble(match.substring(2,match.length() - 1),0.0);
        String result="String_Node_Str";
        if (value < 0.01) {
          result="String_Node_Str" + Integer.toString((int)(value * 1000));
        }
 else {
          result=Integer.toString((int)(value * 100));
        }
        matcher.appendReplacement(sb,result + "String_Node_Str");
      }
 else       if (Settings.nameReplacements.get(data.locale).containsKey(match.substring(1,match.length() - 1))) {
        matcher.appendReplacement(sb,Settings.nameReplacements.get(data.locale).get(match.substring(1,match.length() - 1)));
      }
    }
    matcher.appendTail(sb);
    pattern=Pattern.compile("String_Node_Str");
    matcher=pattern.matcher(sb.toString());
    sb=new StringBuffer();
    while (matcher.find()) {
      if (Settings.colorMap.containsKey(matcher.group())) {
        matcher.appendReplacement(sb,Settings.colorMap.get(matcher.group()));
      }
    }
    matcher.appendTail(sb);
    player.sendMessage(sb.toString());
  }
}