Program: 165473
Project: 165473
Buggy source:
protected void readMovieFromNfoFile(File nfoFile){
  FileInputStream fisTargetFile=null;
  try {
    fisTargetFile=new FileInputStream(nfoFile);
    String targetFileStr=IOUtils.toString(fisTargetFile,"String_Node_Str");
    if (targetFileStr.contains("String_Node_Str")) {
      while (targetFileStr.length() > 0 && !targetFileStr.startsWith("String_Node_Str")) {
        if (targetFileStr.length() > 1) {
          targetFileStr=targetFileStr.substring(1,targetFileStr.length());
        }
 else         break;
      }
    }
    XbmcXmlMovieBean xmlMovieBean=XbmcXmlMovieBean.makeFromXML(targetFileStr);
    if (xmlMovieBean != null) {
      Movie movieFromNfo=xmlMovieBean.toMovie();
      guiMain.movieToWriteToDiskList.add(movieFromNfo);
      if (guiMain.getCurrentlySelectedPosterFileList().get(0).exists()) {
        Thumb[] currentPosters=guiMain.movieToWriteToDiskList.get(0).getPosters();
        Thumb fileFromDisk;
        if (currentPosters.length > 0 && currentPosters[0] != null && currentPosters[0].getThumbURL() != null)         fileFromDisk=new Thumb(guiMain.getCurrentlySelectedPosterFileList().get(0),currentPosters[0].getThumbURL().toString());
 else {
          fileFromDisk=new Thumb(guiMain.getCurrentlySelectedPosterFileList().get(0));
          currentPosters=new Thumb[1];
        }
        currentPosters[0]=fileFromDisk;
      }
 else       if (guiMain.movieToWriteToDiskList.get(0).hasPoster()) {
      }
    }
  }
 catch (  FileNotFoundException e) {
    JOptionPane.showMessageDialog(null,ExceptionUtils.getStackTrace(e),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(null,ExceptionUtils.getStackTrace(e),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
 finally {
    try {
      fisTargetFile.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
 finally {
      guiMain.updateAllFieldsOfFileDetailPanel(false,false);
    }
  }
}

Fixed version (ground truth):
protected void readMovieFromNfoFile(File nfoFile){
  FileInputStream fisTargetFile=null;
  try {
    fisTargetFile=new FileInputStream(nfoFile);
    String targetFileStr=IOUtils.toString(fisTargetFile,"String_Node_Str");
    if (targetFileStr.contains("String_Node_Str")) {
      while (targetFileStr.length() > 0 && !targetFileStr.startsWith("String_Node_Str")) {
        if (targetFileStr.length() > 1) {
          targetFileStr=targetFileStr.substring(1,targetFileStr.length());
        }
 else         break;
      }
    }
    XbmcXmlMovieBean xmlMovieBean=XbmcXmlMovieBean.makeFromXML(targetFileStr);
    if (xmlMovieBean != null) {
      Movie movieFromNfo=xmlMovieBean.toMovie();
      guiMain.movieToWriteToDiskList.add(movieFromNfo);
      if (guiMain.getCurrentlySelectedPosterFileList().get(0).exists()) {
        Thumb[] currentPosters=guiMain.movieToWriteToDiskList.get(0).getPosters();
        File currentPosterFile=guiMain.getCurrentlySelectedPosterFileList().get(0);
        Thumb thumbFromDisk;
        if (currentPosterFile != null) {
          if (currentPosters.length > 0 && guiMain.getCurrentlySelectedPosterFileList().size() > 0 && currentPosters[0] != null && currentPosters[0].getThumbURL() != null)           thumbFromDisk=new Thumb(guiMain.getCurrentlySelectedPosterFileList().get(0),currentPosters[0].getThumbURL().toString());
 else {
            thumbFromDisk=new Thumb(guiMain.getCurrentlySelectedPosterFileList().get(0));
            currentPosters=new Thumb[1];
          }
          currentPosters[0]=thumbFromDisk;
        }
      }
 else       if (guiMain.movieToWriteToDiskList.get(0).hasPoster()) {
      }
    }
  }
 catch (  FileNotFoundException e) {
    JOptionPane.showMessageDialog(null,ExceptionUtils.getStackTrace(e),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(null,ExceptionUtils.getStackTrace(e),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
 finally {
    try {
      fisTargetFile.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
 finally {
      guiMain.updateAllFieldsOfFileDetailPanel(false,false);
    }
  }
}