Program: 113080
Project: 113080
Buggy source:
@Override protected CloseableIterator<GeoWaveData<SimpleFeature>> toGeoWaveDataInternal(final WholeFile hfile,final Collection<ByteArrayId> primaryIndexIds,final String globalVisibility){
  final List<GeoWaveData<SimpleFeature>> featureData=new ArrayList<GeoWaveData<SimpleFeature>>();
  final InputStream in=new ByteArrayInputStream(hfile.getOriginalFile().array());
  final ZipInputStream zip=new ZipInputStream(in);
  try {
    zip.getNextEntry();
  }
 catch (  final IOException e) {
    LOGGER.error("String_Node_Str" + hfile.getOriginalFilePath(),e);
  }
  final InputStreamReader isr=new InputStreamReader(zip,StringUtils.UTF8_CHAR_SET);
  final BufferedReader br=new BufferedReader(isr);
  final GeometryFactory geometryFactory=new GeometryFactory();
  Date timeStamp=null;
  String timestring="String_Node_Str";
  String eventId="String_Node_Str";
  int actionGeoType;
  final double lat=0;
  final double lon=0;
  String actor1Name="String_Node_Str";
  String actor2Name="String_Node_Str";
  String countryCode="String_Node_Str";
  String sourceUrl="String_Node_Str";
  String actor1CC="String_Node_Str";
  String actor2CC="String_Node_Str";
  String numMentions="String_Node_Str";
  String numSources="String_Node_Str";
  String numArticles="String_Node_Str";
  String avgTone="String_Node_Str";
  String line;
  int lineNumber=0;
  try {
    while ((line=br.readLine()) != null) {
      lineNumber++;
      final String[] vals=line.split("String_Node_Str");
      if ((vals.length < GDELTUtils.GDELT_MIN_COLUMNS) || (vals.length > GDELTUtils.GDELT_MAX_COLUMNS)) {
        LOGGER.warn("String_Node_Str" + vals.length + "String_Node_Str"+ lineNumber+ "String_Node_Str"+ hfile.getOriginalFilePath());
        continue;
      }
      actionGeoType=Integer.parseInt(vals[GDELTUtils.GDELT_ACTION_GEO_TYPE_COLUMN_ID]);
      if (actionGeoType == 0) {
        continue;
      }
      eventId=vals[GDELTUtils.GDELT_EVENT_ID_COLUMN_ID];
      try {
        GDELTUtils.parseLatLon(vals,crs);
      }
 catch (      final Exception e) {
        LOGGER.warn("String_Node_Str" + lineNumber + "String_Node_Str"+ hfile.getOriginalFilePath());
        continue;
      }
      final Coordinate cord=new Coordinate(lat,lon);
      gdeltEventBuilder.set(GDELTUtils.GDELT_GEOMETRY_ATTRIBUTE,geometryFactory.createPoint(cord));
      gdeltEventBuilder.set(GDELTUtils.GDELT_EVENT_ID_ATTRIBUTE,eventId);
      timestring=vals[GDELTUtils.GDELT_TIMESTAMP_COLUMN_ID];
      timeStamp=GDELTUtils.parseDate(timestring);
      gdeltEventBuilder.set(GDELTUtils.GDELT_TIMESTAMP_ATTRIBUTE,timeStamp);
      gdeltEventBuilder.set(GDELTUtils.GDELT_LATITUDE_ATTRIBUTE,lat);
      gdeltEventBuilder.set(GDELTUtils.GDELT_LONGITUDE_ATTRIBUTE,lon);
      actor1Name=vals[GDELTUtils.ACTOR_1_NAME_COLUMN_ID];
      if ((actor1Name != null) && !actor1Name.isEmpty()) {
        gdeltEventBuilder.set(GDELTUtils.ACTOR_1_NAME_ATTRIBUTE,actor1Name);
      }
      actor2Name=vals[GDELTUtils.ACTOR_2_NAME_COLUMN_ID];
      if ((actor2Name != null) && !actor2Name.isEmpty()) {
        gdeltEventBuilder.set(GDELTUtils.ACTOR_2_NAME_ATTRIBUTE,actor2Name);
      }
      countryCode=vals[GDELTUtils.ACTION_COUNTRY_CODE_COLUMN_ID];
      if ((countryCode != null) && !countryCode.isEmpty()) {
        gdeltEventBuilder.set(GDELTUtils.ACTION_COUNTRY_CODE_ATTRIBUTE,countryCode);
      }
      sourceUrl=vals[GDELTUtils.SOURCE_URL_COLUMN_ID];
      if ((sourceUrl != null) && !sourceUrl.isEmpty()) {
        gdeltEventBuilder.set(GDELTUtils.SOURCE_URL_ATTRIBUTE,sourceUrl);
      }
      if (includeSupplementalFields) {
        actor1CC=vals[GDELTUtils.ACTOR_1_COUNTRY_CODE_COLUMN_ID];
        if ((actor1CC != null) && !actor1CC.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.ACTOR_1_COUNTRY_CODE_ATTRIBUTE,actor1CC);
        }
        actor2CC=vals[GDELTUtils.ACTOR_2_COUNTRY_CODE_COLUMN_ID];
        if ((actor2CC != null) && !actor2CC.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.ACTOR_2_COUNTRY_CODE_ATTRIBUTE,actor2CC);
        }
        numMentions=vals[GDELTUtils.NUM_MENTIONS_COLUMN_ID];
        if ((numMentions != null) && !numMentions.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.NUM_MENTIONS_ATTRIBUTE,Integer.parseInt(numMentions));
        }
        numSources=vals[GDELTUtils.NUM_SOURCES_COLUMN_ID];
        if ((numSources != null) && !numSources.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.NUM_SOURCES_ATTRIBUTE,Integer.parseInt(numSources));
        }
        numArticles=vals[GDELTUtils.NUM_ARTICLES_COLUMN_ID];
        if ((numArticles != null) && !numArticles.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.NUM_ARTICLES_ATTRIBUTE,Integer.parseInt(numArticles));
        }
        avgTone=vals[GDELTUtils.AVG_TONE_COLUMN_ID];
        if ((avgTone != null) && !avgTone.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.AVG_TONE_ATTRIBUTE,Double.parseDouble(avgTone));
        }
      }
      featureData.add(new GeoWaveData<SimpleFeature>(eventKey,primaryIndexIds,gdeltEventBuilder.buildFeature(eventId)));
    }
  }
 catch (  final IOException e) {
    LOGGER.warn("String_Node_Str" + hfile.getOriginalFilePath(),e);
  }
catch (  final ParseException e) {
    LOGGER.error("String_Node_Str" + timestring,e);
  }
 finally {
    IOUtils.closeQuietly(br);
    IOUtils.closeQuietly(isr);
    IOUtils.closeQuietly(in);
  }
  return new CloseableIterator.Wrapper<GeoWaveData<SimpleFeature>>(featureData.iterator());
}

Fixed version (ground truth):
@Override protected CloseableIterator<GeoWaveData<SimpleFeature>> toGeoWaveDataInternal(final WholeFile hfile,final Collection<ByteArrayId> primaryIndexIds,final String globalVisibility){
  final List<GeoWaveData<SimpleFeature>> featureData=new ArrayList<GeoWaveData<SimpleFeature>>();
  final InputStream in=new ByteArrayInputStream(hfile.getOriginalFile().array());
  final ZipInputStream zip=new ZipInputStream(in);
  try {
    zip.getNextEntry();
  }
 catch (  final IOException e) {
    LOGGER.error("String_Node_Str" + hfile.getOriginalFilePath(),e);
  }
  final InputStreamReader isr=new InputStreamReader(zip,StringUtils.UTF8_CHAR_SET);
  final BufferedReader br=new BufferedReader(isr);
  final GeometryFactory geometryFactory=new GeometryFactory();
  Date timeStamp=null;
  String timestring="String_Node_Str";
  String eventId="String_Node_Str";
  int actionGeoType;
  double lat=0;
  double lon=0;
  String actor1Name="String_Node_Str";
  String actor2Name="String_Node_Str";
  String countryCode="String_Node_Str";
  String sourceUrl="String_Node_Str";
  String actor1CC="String_Node_Str";
  String actor2CC="String_Node_Str";
  String numMentions="String_Node_Str";
  String numSources="String_Node_Str";
  String numArticles="String_Node_Str";
  String avgTone="String_Node_Str";
  String line;
  int lineNumber=0;
  try {
    while ((line=br.readLine()) != null) {
      lineNumber++;
      final String[] vals=line.split("String_Node_Str");
      if ((vals.length < GDELTUtils.GDELT_MIN_COLUMNS) || (vals.length > GDELTUtils.GDELT_MAX_COLUMNS)) {
        LOGGER.warn("String_Node_Str" + vals.length + "String_Node_Str"+ lineNumber+ "String_Node_Str"+ hfile.getOriginalFilePath());
        continue;
      }
      actionGeoType=Integer.parseInt(vals[GDELTUtils.GDELT_ACTION_GEO_TYPE_COLUMN_ID]);
      if (actionGeoType == 0) {
        continue;
      }
      eventId=vals[GDELTUtils.GDELT_EVENT_ID_COLUMN_ID];
      try {
        final Pair<Double,Double> latLon=GDELTUtils.parseLatLon(vals);
        if (latLon == null) {
          LOGGER.warn("String_Node_Str" + lineNumber + "String_Node_Str"+ hfile.getOriginalFilePath());
          continue;
        }
        lat=latLon.getLeft();
        lon=latLon.getRight();
      }
 catch (      final Exception e) {
        LOGGER.warn("String_Node_Str" + lineNumber + "String_Node_Str"+ hfile.getOriginalFilePath(),e);
        continue;
      }
      final Coordinate cord=new Coordinate(lon,lat);
      gdeltEventBuilder.set(GDELTUtils.GDELT_GEOMETRY_ATTRIBUTE,geometryFactory.createPoint(cord));
      gdeltEventBuilder.set(GDELTUtils.GDELT_EVENT_ID_ATTRIBUTE,eventId);
      timestring=vals[GDELTUtils.GDELT_TIMESTAMP_COLUMN_ID];
      timeStamp=GDELTUtils.parseDate(timestring);
      gdeltEventBuilder.set(GDELTUtils.GDELT_TIMESTAMP_ATTRIBUTE,timeStamp);
      gdeltEventBuilder.set(GDELTUtils.GDELT_LATITUDE_ATTRIBUTE,lat);
      gdeltEventBuilder.set(GDELTUtils.GDELT_LONGITUDE_ATTRIBUTE,lon);
      actor1Name=vals[GDELTUtils.ACTOR_1_NAME_COLUMN_ID];
      if ((actor1Name != null) && !actor1Name.isEmpty()) {
        gdeltEventBuilder.set(GDELTUtils.ACTOR_1_NAME_ATTRIBUTE,actor1Name);
      }
      actor2Name=vals[GDELTUtils.ACTOR_2_NAME_COLUMN_ID];
      if ((actor2Name != null) && !actor2Name.isEmpty()) {
        gdeltEventBuilder.set(GDELTUtils.ACTOR_2_NAME_ATTRIBUTE,actor2Name);
      }
      countryCode=vals[GDELTUtils.ACTION_COUNTRY_CODE_COLUMN_ID];
      if ((countryCode != null) && !countryCode.isEmpty()) {
        gdeltEventBuilder.set(GDELTUtils.ACTION_COUNTRY_CODE_ATTRIBUTE,countryCode);
      }
      if (vals.length > GDELTUtils.SOURCE_URL_COLUMN_ID) {
        sourceUrl=vals[GDELTUtils.SOURCE_URL_COLUMN_ID];
      }
      if ((sourceUrl != null) && !sourceUrl.isEmpty()) {
        gdeltEventBuilder.set(GDELTUtils.SOURCE_URL_ATTRIBUTE,sourceUrl);
      }
      if (includeSupplementalFields) {
        actor1CC=vals[GDELTUtils.ACTOR_1_COUNTRY_CODE_COLUMN_ID];
        if ((actor1CC != null) && !actor1CC.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.ACTOR_1_COUNTRY_CODE_ATTRIBUTE,actor1CC);
        }
        actor2CC=vals[GDELTUtils.ACTOR_2_COUNTRY_CODE_COLUMN_ID];
        if ((actor2CC != null) && !actor2CC.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.ACTOR_2_COUNTRY_CODE_ATTRIBUTE,actor2CC);
        }
        numMentions=vals[GDELTUtils.NUM_MENTIONS_COLUMN_ID];
        if ((numMentions != null) && !numMentions.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.NUM_MENTIONS_ATTRIBUTE,Integer.parseInt(numMentions));
        }
        numSources=vals[GDELTUtils.NUM_SOURCES_COLUMN_ID];
        if ((numSources != null) && !numSources.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.NUM_SOURCES_ATTRIBUTE,Integer.parseInt(numSources));
        }
        numArticles=vals[GDELTUtils.NUM_ARTICLES_COLUMN_ID];
        if ((numArticles != null) && !numArticles.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.NUM_ARTICLES_ATTRIBUTE,Integer.parseInt(numArticles));
        }
        avgTone=vals[GDELTUtils.AVG_TONE_COLUMN_ID];
        if ((avgTone != null) && !avgTone.isEmpty()) {
          gdeltEventBuilder.set(GDELTUtils.AVG_TONE_ATTRIBUTE,Double.parseDouble(avgTone));
        }
      }
      featureData.add(new GeoWaveData<SimpleFeature>(eventKey,primaryIndexIds,gdeltEventBuilder.buildFeature(eventId)));
    }
  }
 catch (  final IOException e) {
    LOGGER.warn("String_Node_Str" + hfile.getOriginalFilePath(),e);
  }
catch (  final ParseException e) {
    LOGGER.error("String_Node_Str" + timestring,e);
  }
 finally {
    IOUtils.closeQuietly(br);
    IOUtils.closeQuietly(isr);
    IOUtils.closeQuietly(in);
  }
  return new CloseableIterator.Wrapper<GeoWaveData<SimpleFeature>>(featureData.iterator());
}