Program: 47344
Project: 47344
Buggy source:
/** 
 * for each locale stored in in Jcr create a .locale file with the stored node properties
 * @param zos
 * @param repositoryFile
 * @param filePath
 * @throws IOException
 */
private void createLocales(RepositoryFile repositoryFile,String filePath,boolean isFolder,OutputStream outputStrean) throws IOException {
  ZipEntry entry;
  String zipName;
  String name;
  String localeName;
  Properties properties;
  ZipOutputStream zos=(ZipOutputStream)outputStrean;
  if (supportedLocaleFileExt(repositoryFile)) {
    List<LocaleMapDto> locales=getAvailableLocales(repositoryFile.getId());
    zipName=ExportFileNameEncoder.encodeZipPathName(getZipEntryName(repositoryFile,filePath));
    name=repositoryFile.getName();
    for (    LocaleMapDto locale : locales) {
      localeName=locale.getLocale().equalsIgnoreCase("String_Node_Str") ? "String_Node_Str" : "String_Node_Str" + locale.getLocale();
      if (isFolder) {
        zipName=ExportFileNameEncoder.encodeZipPathName(getZipEntryName(repositoryFile,filePath) + "String_Node_Str");
        name="String_Node_Str";
      }
      properties=unifiedRepository.getLocalePropertiesForFileById(repositoryFile.getId(),locale.getLocale());
      if (properties != null) {
        properties.remove("String_Node_Str");
        InputStream is=createLocaleFile(name + localeName,properties,locale.getLocale());
        if (is != null) {
          entry=new ZipEntry(zipName + localeName + LOCALE_EXT);
          zos.putNextEntry(entry);
          IOUtils.copy(is,outputStrean);
          zos.closeEntry();
          is.close();
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * for each locale stored in in Jcr create a .locale file with the stored node properties
 * @param zos
 * @param repositoryFile
 * @param filePath
 * @throws IOException
 */
private void createLocales(RepositoryFile repositoryFile,String filePath,boolean isFolder,OutputStream outputStrean) throws IOException {
  ZipEntry entry;
  String zipEntryName;
  String name;
  String localeName;
  Properties properties;
  ZipOutputStream zos=(ZipOutputStream)outputStrean;
  if (supportedLocaleFileExt(repositoryFile)) {
    List<LocaleMapDto> locales=getAvailableLocales(repositoryFile.getId());
    zipEntryName=getFixedZipEntryName(repositoryFile,filePath);
    name=repositoryFile.getName();
    for (    LocaleMapDto locale : locales) {
      localeName=locale.getLocale().equalsIgnoreCase("String_Node_Str") ? "String_Node_Str" : "String_Node_Str" + locale.getLocale();
      if (isFolder) {
        zipEntryName=getFixedZipEntryName(repositoryFile,filePath) + "String_Node_Str";
        name="String_Node_Str";
      }
      properties=unifiedRepository.getLocalePropertiesForFileById(repositoryFile.getId(),locale.getLocale());
      if (properties != null) {
        properties.remove("String_Node_Str");
        InputStream is=createLocaleFile(name + localeName,properties,locale.getLocale());
        if (is != null) {
          entry=new ZipEntry(zipEntryName + localeName + LOCALE_EXT);
          zos.putNextEntry(entry);
          IOUtils.copy(is,outputStrean);
          zos.closeEntry();
          is.close();
        }
      }
    }
  }
}