Program: 59407
Project: 59407
Buggy source:
/** 
 * Adds I18n properties to the specified message bundle file. The file is given by the language parameter. <p> Note that properties to add are taken from messages[_xx].properties files and added to messages[_xx].properties in the destination project. <p> <strong>This method doesn't check if messages[_xx].properties file exist in the add-on invoking it</strong>
 * @param language Language locale as string (en, es, ca, ...)
 * @param invokingClass Class of the Add-on invoking this method. It'sneeded in order to load local resources
 * @param propFileOperations
 * @param projectOperations
 * @param fileManager
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static void addPropertiesToMessageBundle(String language,Class invokingClass,PropFileOperations propFileOperations,ProjectOperations projectOperations,FileManager fileManager){
  Properties properties=new Properties();
  String propertiesFolderPath="String_Node_Str".concat(invokingClass.getPackage().getName()).replace('.','/');
  String messageBundleRelativeFilePath="String_Node_Str";
  String messageBundle=projectOperations.getPathResolver().getIdentifier(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),messageBundleRelativeFilePath);
  try {
    if (language == "String_Node_Str") {
      propertiesFolderPath=propertiesFolderPath.concat("String_Node_Str");
      properties.load(invokingClass.getResourceAsStream(propertiesFolderPath));
    }
 else {
      messageBundleRelativeFilePath="String_Node_Str".concat(language).concat("String_Node_Str");
      messageBundle=projectOperations.getPathResolver().getIdentifier(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),messageBundleRelativeFilePath);
      propertiesFolderPath=propertiesFolderPath.concat("String_Node_Str" + language + "String_Node_Str");
      properties.load(invokingClass.getResourceAsStream(propertiesFolderPath));
    }
    if (fileManager.exists(messageBundle)) {
      propFileOperations.addProperties(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),messageBundleRelativeFilePath,new HashMap<String,String>((Map)properties),true,true);
    }
 else {
      logger.warning(messageBundle.concat("String_Node_Str"));
    }
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,"String_Node_Str".concat(language).concat("String_Node_Str"));
  }
}

Fixed version (ground truth):
/** 
 * Copy properties associated with the given class to the message bundle of given language. <p/> Note that properties to add are taken from messages[_xx].properties files and added to messages[_xx].properties in the destination project. <p/> <strong>This method doesn't check if messages[_xx].properties file exist in the add-on invoking it</strong>
 * @param language Language locale as string (en, es, ca, ...)
 * @param invokingClass Class of the Add-on invoking this method. It'sneeded in order to load local resources
 * @param propFileOperations
 * @param projectOperations
 * @param fileManager
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static void addPropertiesToMessageBundle(String language,Class invokingClass,PropFileOperations propFileOperations,ProjectOperations projectOperations,FileManager fileManager){
  Properties properties=new Properties();
  LogicalPath webappPath=WebProjectUtils.getWebappPath(projectOperations);
  String sourcePropertyFile="String_Node_Str".concat(invokingClass.getPackage().getName()).replace('.','/');
  String targetFilePath="String_Node_Str";
  String targetFile=projectOperations.getPathResolver().getIdentifier(webappPath,targetFilePath);
  try {
    if (language == "String_Node_Str") {
      sourcePropertyFile=sourcePropertyFile.concat("String_Node_Str");
      properties.load(invokingClass.getResourceAsStream(sourcePropertyFile));
    }
 else {
      targetFilePath="String_Node_Str".concat(language).concat("String_Node_Str");
      targetFile=projectOperations.getPathResolver().getIdentifier(webappPath,targetFilePath);
      sourcePropertyFile=sourcePropertyFile.concat("String_Node_Str".concat(language).concat("String_Node_Str"));
      properties.load(invokingClass.getResourceAsStream(sourcePropertyFile));
    }
    if (fileManager.exists(targetFile)) {
      propFileOperations.addProperties(webappPath,targetFilePath,new HashMap<String,String>((Map)properties),true,true);
    }
 else {
      logger.warning(targetFile.concat("String_Node_Str"));
    }
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,"String_Node_Str".concat(language).concat("String_Node_Str"));
  }
}