Program: 8845
Project: 8845
Buggy source:
/** 
 * Extract and copy DK II models
 * @param dungeonKeeperFolder DK II main folder
 * @param destination Destination folder
 */
private void convertModels(String dungeonKeeperFolder,String destination,AssetManager assetManager){
  if (!ConvertProcess.MODELS.isOutdated()) {
    return;
  }
  logger.log(Level.INFO,"String_Node_Str",destination);
  updateStatus(null,null,ConvertProcess.MODELS);
  AssetUtils.deleteFolder(new File(destination));
  File materialFolder=new File(getAssetsFolder().concat(AssetsConverter.MATERIALS_FOLDER));
  AssetUtils.deleteFolder(materialFolder);
  materialFolder.mkdirs();
  EngineTexturesFile engineTexturesFile=getEngineTexturesFile(dungeonKeeperFolder);
  WadFile wad=new WadFile(new File(dungeonKeeperFolder + PathUtils.DKII_DATA_FOLDER + "String_Node_Str"));
  HashMap<String,KmfFile> kmfs=new HashMap<>();
  File tmpdir=new File(System.getProperty("String_Node_Str"));
  int i=0;
  int total=wad.getWadFileEntryCount();
  for (  final String entry : wad.getWadFileEntries()) {
    try {
      updateStatus(i,total,ConvertProcess.MODELS);
      if (!OVERWRITE_DATA && new File(destination.concat(entry.substring(0,entry.length() - 4)).concat("String_Node_Str")).exists()) {
        logger.log(Level.INFO,"String_Node_Str",entry);
        i++;
        continue;
      }
      File f=wad.extractFileData(entry,tmpdir.toString());
      f.deleteOnExit();
      final KmfFile kmfFile=new KmfFile(f);
      if (kmfFile.getType() == KmfFile.Type.MESH || kmfFile.getType() == KmfFile.Type.ANIM) {
        convertModel(assetManager,new Entry<String,KmfFile>(){
          @Override public String getKey(){
            return entry;
          }
          @Override public KmfFile getValue(){
            return kmfFile;
          }
          @Override public KmfFile setValue(          KmfFile value){
            throw new UnsupportedOperationException("String_Node_Str");
          }
        }
,destination,engineTexturesFile);
        f.delete();
        i++;
      }
 else {
        kmfs.put(entry,kmfFile);
      }
    }
 catch (    Exception ex) {
      logger.log(Level.SEVERE,"String_Node_Str" + entry + "String_Node_Str",ex);
      throw ex;
    }
  }
  for (  Entry<String,KmfFile> entry : kmfs.entrySet()) {
    updateStatus(i,total,ConvertProcess.MODELS);
    convertModel(assetManager,entry,destination,engineTexturesFile);
    i++;
  }
}

Fixed version (ground truth):
/** 
 * Extract and copy DK II models
 * @param dungeonKeeperFolder DK II main folder
 * @param destination Destination folder
 */
private void convertModels(String dungeonKeeperFolder,String destination,AssetManager assetManager){
  if (!ConvertProcess.MODELS.isOutdated()) {
    return;
  }
  LOGGER.log(Level.INFO,"String_Node_Str",destination);
  updateStatus(null,null,ConvertProcess.MODELS);
  AssetUtils.deleteFolder(new File(destination));
  File materialFolder=new File(getAssetsFolder().concat(AssetsConverter.MATERIALS_FOLDER));
  AssetUtils.deleteFolder(materialFolder);
  materialFolder.mkdirs();
  EngineTexturesFile engineTexturesFile=getEngineTexturesFile(dungeonKeeperFolder);
  WadFile wad=new WadFile(new File(dungeonKeeperFolder + PathUtils.DKII_DATA_FOLDER + "String_Node_Str"));
  HashMap<String,KmfFile> kmfs=new HashMap<>();
  File tmpdir=new File(System.getProperty("String_Node_Str"));
  int i=0;
  int total=wad.getWadFileEntryCount();
  for (  final String entry : wad.getWadFileEntries()) {
    try {
      updateStatus(i,total,ConvertProcess.MODELS);
      if (!OVERWRITE_DATA && new File(destination.concat(entry.substring(0,entry.length() - 4)).concat("String_Node_Str")).exists()) {
        LOGGER.log(Level.INFO,"String_Node_Str",entry);
        i++;
        continue;
      }
      File f=wad.extractFileData(entry,tmpdir.toString());
      f.deleteOnExit();
      final KmfFile kmfFile=new KmfFile(f);
      if (kmfFile.getType() == KmfFile.Type.MESH || kmfFile.getType() == KmfFile.Type.ANIM) {
        convertModel(assetManager,new Entry<String,KmfFile>(){
          @Override public String getKey(){
            return entry;
          }
          @Override public KmfFile getValue(){
            return kmfFile;
          }
          @Override public KmfFile setValue(          KmfFile value){
            throw new UnsupportedOperationException("String_Node_Str");
          }
        }
,destination,engineTexturesFile);
        f.delete();
        i++;
      }
 else {
        kmfs.put(entry,kmfFile);
      }
    }
 catch (    Exception ex) {
      LOGGER.log(Level.SEVERE,"String_Node_Str" + entry + "String_Node_Str",ex);
      throw ex;
    }
  }
  for (  Entry<String,KmfFile> entry : kmfs.entrySet()) {
    updateStatus(i,total,ConvertProcess.MODELS);
    convertModel(assetManager,entry,destination,engineTexturesFile);
    i++;
  }
}