Program: 78132
Project: 78132
Buggy source:
/** 
 * Return a message resource bundle list for the given locale. A message key should be look into the files in the sequence order from the first to the last. Content of the list is <code>java.util.PropertyResourceBundle</code> <p> If the given locale is <code>null</code>, locale of the current thread will be used.
 * @param locale locale to use when locating the bundles.
 * @return a message file list for the given locale.
 */
private List gatherMessageBundles(ULocale locale){
  if (locale == null)   locale=ThreadResources.getLocale();
  List bundleHierarchy=new ArrayList();
  if (this.baseName == null)   return bundleHierarchy;
  final String language=locale.getLanguage();
  final int languageLength=language.length();
  final String country=locale.getCountry();
  final int countryLength=country.length();
  if (languageLength > 0 && countryLength > 0) {
    StringBuffer temp=new StringBuffer(baseName);
    temp.append("String_Node_Str");
    temp.append(language);
    temp.append("String_Node_Str");
    temp.append(country);
    temp.append("String_Node_Str");
    PropertyResourceBundle bundle=populateBundle(new File(msgFolder,temp.toString()));
    if (bundle != null)     bundleHierarchy.add(bundle);
  }
  if (languageLength > 0) {
    StringBuffer temp=new StringBuffer(baseName);
    temp.append("String_Node_Str");
    temp.append(language);
    temp.append("String_Node_Str");
    PropertyResourceBundle bundle=populateBundle(new File(msgFolder,temp.toString()));
    if (bundle != null)     bundleHierarchy.add(bundle);
  }
  PropertyResourceBundle bundle=populateBundle(new File(msgFolder,baseName + "String_Node_Str"));
  if (bundle != null)   bundleHierarchy.add(bundle);
  return bundleHierarchy;
}

Fixed version (ground truth):
/** 
 * Return a message resource bundle list for the given locale. A message key should be look into the files in the sequence order from the first to the last. Content of the list is <code>java.util.PropertyResourceBundle</code> <p> If the given locale is <code>null</code>, locale of the current thread will be used.
 * @param locale locale to use when locating the bundles.
 * @return a message file list for the given locale.
 */
private List gatherMessageBundles(ULocale locale){
  if (locale == null)   locale=ThreadResources.getLocale();
  List bundleHierarchy=new ArrayList();
  if (this.baseName == null)   return bundleHierarchy;
  final String language=locale.getLanguage();
  final int languageLength=language.length();
  final String country=locale.getCountry();
  final int countryLength=country.length();
  if (languageLength > 0 && countryLength > 0) {
    StringBuffer temp=new StringBuffer(baseName);
    temp.append("String_Node_Str");
    temp.append(language);
    temp.append("String_Node_Str");
    temp.append(country);
    temp.append("String_Node_Str");
    PropertyResourceBundle bundle=populateBundle(temp.toString());
    if (bundle != null)     bundleHierarchy.add(bundle);
  }
  if (languageLength > 0) {
    StringBuffer temp=new StringBuffer(baseName);
    temp.append("String_Node_Str");
    temp.append(language);
    temp.append("String_Node_Str");
    PropertyResourceBundle bundle=populateBundle(temp.toString());
    if (bundle != null)     bundleHierarchy.add(bundle);
  }
  PropertyResourceBundle bundle=populateBundle(baseName + "String_Node_Str");
  if (bundle != null)   bundleHierarchy.add(bundle);
  return bundleHierarchy;
}