Program: 112930
Project: 112930
Buggy source:
private void init(final File scenesDir,final boolean onlyScenesSinceLastRun,final boolean useCachedScenes,final boolean nBestScenesByPathRow,final int nBestScenes,final WRS2GeometryStore geometryStore,final Filter cqlFilter) throws IOException {
  if (!scenesDir.exists() && !scenesDir.mkdirs()) {
    LOGGER.warn("String_Node_Str" + scenesDir.getAbsolutePath() + "String_Node_Str");
  }
  final File csvFile=new File(scenesDir,CSV_FILE_NAME);
  long startLine=0;
  if (!csvFile.exists() || !useCachedScenes) {
    final File compressedFile=new File(scenesDir,COMPRESSED_FILE_NAME);
    final File tempCsvFile=new File(scenesDir,TEMP_CSV_FILE_NAME);
    if (compressedFile.exists()) {
      if (!compressedFile.delete()) {
        LOGGER.warn("String_Node_Str" + compressedFile.getAbsolutePath() + "String_Node_Str");
      }
    }
    if (tempCsvFile.exists()) {
      if (!tempCsvFile.delete()) {
        LOGGER.warn("String_Node_Str" + tempCsvFile.getAbsolutePath() + "String_Node_Str");
      }
    }
    InputStream in=null;
    try {
      in=new URL(SCENES_GZ_URL).openStream();
      final FileOutputStream outStream=new FileOutputStream(compressedFile);
      IOUtils.copyLarge(in,outStream);
      outStream.close();
    }
 catch (    final IOException e) {
      LOGGER.warn("String_Node_Str",e);
      throw e;
    }
 finally {
      if (in != null) {
        IOUtils.closeQuietly(in);
      }
    }
    GzipCompressorInputStream gzIn=null;
    FileOutputStream out=null;
    FileInputStream fin=null;
    BufferedInputStream bin=null;
    try {
      fin=new FileInputStream(compressedFile);
      bin=new BufferedInputStream(fin);
      out=new FileOutputStream(tempCsvFile);
      gzIn=new GzipCompressorInputStream(bin);
      final byte[] buffer=new byte[1024];
      int n=0;
      while (-1 != (n=gzIn.read(buffer))) {
        out.write(buffer,0,n);
      }
      fin.close();
      if (!compressedFile.delete()) {
        LOGGER.warn("String_Node_Str" + compressedFile.getAbsolutePath() + "String_Node_Str");
      }
      out.close();
    }
 catch (    final IOException e) {
      LOGGER.warn("String_Node_Str",e);
      throw e;
    }
 finally {
      if (out != null) {
        IOUtils.closeQuietly(out);
      }
      if (gzIn != null) {
        IOUtils.closeQuietly(gzIn);
      }
      if (fin != null) {
        IOUtils.closeQuietly(fin);
      }
      if (bin != null) {
        IOUtils.closeQuietly(bin);
      }
    }
    if (onlyScenesSinceLastRun && csvFile.exists()) {
      try (final FileInputStream is=new FileInputStream(csvFile)){
        final LineReader lines=new LineReader(new InputStreamReader(is,StringUtils.UTF8_CHAR_SET));
        while (lines.readLine() != null) {
          startLine++;
        }
      }
     }
    if (csvFile.exists()) {
      if (!csvFile.delete()) {
        LOGGER.warn("String_Node_Str" + csvFile.getAbsolutePath() + "String_Node_Str");
      }
    }
    if (!tempCsvFile.renameTo(csvFile)) {
      LOGGER.warn("String_Node_Str" + tempCsvFile.getAbsolutePath() + "String_Node_Str"+ csvFile.getAbsolutePath()+ "String_Node_Str");
    }
  }
  type=createFeatureType();
  setupCsvToFeatureIterator(csvFile,startLine,geometryStore,cqlFilter);
  if (nBestScenes > 0) {
    nBestScenes(nBestScenesByPathRow,nBestScenes);
  }
}

Fixed version (ground truth):
private void init(final File scenesDir,final boolean onlyScenesSinceLastRun,final boolean useCachedScenes,final boolean nBestScenesByPathRow,final int nBestScenes,final WRS2GeometryStore geometryStore,final Filter cqlFilter) throws IOException {
  if (!scenesDir.exists() && !scenesDir.mkdirs()) {
    LOGGER.warn("String_Node_Str" + scenesDir.getAbsolutePath() + "String_Node_Str");
  }
  final File csvFile=new File(scenesDir,CSV_FILE_NAME);
  long startLine=0;
  if (!csvFile.exists() || !useCachedScenes) {
    final File compressedFile=new File(scenesDir,COMPRESSED_FILE_NAME);
    final File tempCsvFile=new File(scenesDir,TEMP_CSV_FILE_NAME);
    if (compressedFile.exists()) {
      if (!compressedFile.delete()) {
        LOGGER.warn("String_Node_Str" + compressedFile.getAbsolutePath() + "String_Node_Str");
      }
    }
    if (tempCsvFile.exists()) {
      if (!tempCsvFile.delete()) {
        LOGGER.warn("String_Node_Str" + tempCsvFile.getAbsolutePath() + "String_Node_Str");
      }
    }
    InputStream in=null;
    final FileOutputStream outStream=new FileOutputStream(compressedFile);
    try {
      in=new URL(SCENES_GZ_URL).openStream();
      IOUtils.copyLarge(in,outStream);
    }
 catch (    final IOException e) {
      LOGGER.warn("String_Node_Str",e);
      throw e;
    }
 finally {
      if (outStream != null) {
        outStream.close();
      }
      if (in != null) {
        IOUtils.closeQuietly(in);
      }
    }
    GzipCompressorInputStream gzIn=null;
    FileOutputStream out=null;
    FileInputStream fin=null;
    BufferedInputStream bin=null;
    try {
      fin=new FileInputStream(compressedFile);
      bin=new BufferedInputStream(fin);
      out=new FileOutputStream(tempCsvFile);
      gzIn=new GzipCompressorInputStream(bin);
      final byte[] buffer=new byte[1024];
      int n=0;
      while (-1 != (n=gzIn.read(buffer))) {
        out.write(buffer,0,n);
      }
      fin.close();
      if (!compressedFile.delete()) {
        LOGGER.warn("String_Node_Str" + compressedFile.getAbsolutePath() + "String_Node_Str");
      }
      out.close();
    }
 catch (    final IOException e) {
      LOGGER.warn("String_Node_Str",e);
      throw e;
    }
 finally {
      if (out != null) {
        IOUtils.closeQuietly(out);
      }
      if (gzIn != null) {
        IOUtils.closeQuietly(gzIn);
      }
      if (fin != null) {
        IOUtils.closeQuietly(fin);
      }
      if (bin != null) {
        IOUtils.closeQuietly(bin);
      }
    }
    if (onlyScenesSinceLastRun && csvFile.exists()) {
      try (final FileInputStream is=new FileInputStream(csvFile)){
        final LineReader lines=new LineReader(new InputStreamReader(is,StringUtils.UTF8_CHAR_SET));
        while (lines.readLine() != null) {
          startLine++;
        }
      }
     }
    if (csvFile.exists()) {
      if (!csvFile.delete()) {
        LOGGER.warn("String_Node_Str" + csvFile.getAbsolutePath() + "String_Node_Str");
      }
    }
    if (!tempCsvFile.renameTo(csvFile)) {
      LOGGER.warn("String_Node_Str" + tempCsvFile.getAbsolutePath() + "String_Node_Str"+ csvFile.getAbsolutePath()+ "String_Node_Str");
    }
  }
  type=createFeatureType();
  setupCsvToFeatureIterator(csvFile,startLine,geometryStore,cqlFilter);
  if (nBestScenes > 0) {
    nBestScenes(nBestScenesByPathRow,nBestScenes);
  }
}