Program: 19238
Project: 19238
Buggy source:
/** 
 * iStationData Methods 
 */
@Override public void setData(Object profilePeatureCollection) throws IOException {
  this.profileData=(ProfileFeatureCollection)profilePeatureCollection;
  profileList=new HashMap<Integer,ProfileFeature>();
  boolean firstSet=true;
  DateTime dtStart=null;
  DateTime dtEnd=null;
  DateTime dtStartt=null;
  DateTime dtEndt=null;
  String profileID=null;
  while (profileData.hasNext()) {
    ProfileFeature pFeature=profileData.next();
    pFeature.calcBounds();
    PointFeatureIterator pp=pFeature.getPointFeatureIterator(-1);
    while (pp.hasNext()) {
      PointFeature pointFeature=pp.next();
      profileID=getProfileIDFromProfile(pointFeature);
      break;
    }
    DateTime eventStart=(eventTimes.size() >= 1) ? new DateTime(df.getISODate(eventTimes.get(0)),chrono) : null;
    DateTime eventEnd=(eventTimes.size() > 1) ? new DateTime(df.getISODate(eventTimes.get(1)),chrono) : null;
    if (profileID != null && reqStationNames.contains(profileID)) {
      if (eventStart != null) {
        System.out.println("String_Node_Str" + pFeature.getTime().toGMTString() + "String_Node_Str"+ eventStart.toDate().toGMTString());
        if (pFeature.getTime().before(eventStart.toDate()))         continue;
        if (eventEnd != null) {
          System.out.println("String_Node_Str" + pFeature.getTime().toGMTString() + "String_Node_Str"+ eventEnd.toDate().toGMTString());
          if (pFeature.getTime().after(eventEnd.toDate()))           continue;
        }
      }
      Integer stNum=0;
      for (int sti=0; sti < reqStationNames.size(); sti++) {
        if (reqStationNames.get(sti).equalsIgnoreCase(profileID))         stNum=sti;
      }
      profileList.put(stNum,pFeature);
      double altmin=Double.POSITIVE_INFINITY;
      double altmax=Double.NEGATIVE_INFINITY;
      for (pFeature.resetIteration(); pFeature.hasNext(); ) {
        PointFeature point=pFeature.next();
        double alt=point.getLocation().getAltitude();
        if (alt < altmin)         altmin=alt;
        if (alt > altmax)         altmax=alt;
      }
      if (altmin < lowerAlt)       lowerAlt=altmin;
      if (altmax > upperAlt)       upperAlt=altmax;
      if (firstSet) {
        upperLat=pFeature.getLatLon().getLatitude();
        lowerLat=pFeature.getLatLon().getLatitude();
        upperLon=pFeature.getLatLon().getLongitude();
        lowerLon=pFeature.getLatLon().getLongitude();
        dtStart=new DateTime(pFeature.getTime(),chrono);
        dtEnd=new DateTime(pFeature.getTime(),chrono);
        firstSet=false;
      }
 else {
        dtStartt=new DateTime(pFeature.getTime(),chrono);
        dtEndt=new DateTime(pFeature.getTime(),chrono);
        if (dtStartt.isBefore(dtStart)) {
          dtStart=dtStartt;
        }
        if (dtEndt.isAfter(dtEnd)) {
          dtEnd=dtEndt;
        }
        if (pFeature.getLatLon().getLatitude() > upperLat) {
          upperLat=pFeature.getLatLon().getLatitude();
        }
        if (pFeature.getLatLon().getLatitude() < lowerLat) {
          lowerLat=pFeature.getLatLon().getLatitude();
        }
        if (pFeature.getLatLon().getLongitude() > upperLon) {
          upperLon=pFeature.getLatLon().getLongitude();
        }
        if (pFeature.getLatLon().getLongitude() < lowerLon) {
          lowerLon=pFeature.getLatLon().getLongitude();
        }
      }
    }
 else {
    }
  }
  setStartDate(df.toDateTimeStringISO(dtStart.toDate()));
  setEndDate(df.toDateTimeStringISO(dtEnd.toDate()));
  if (reqStationNames != null) {
    setNumberOfStations(reqStationNames.size());
  }
}

Fixed version (ground truth):
/** 
 * iStationData Methods 
 */
@Override public void setData(Object profilePeatureCollection) throws IOException {
  this.profileData=(ProfileFeatureCollection)profilePeatureCollection;
  profileList=new HashMap<Integer,ProfileFeature>();
  boolean firstSet=true;
  DateTime dtStart=null;
  DateTime dtEnd=null;
  DateTime dtStartt=null;
  DateTime dtEndt=null;
  String profileID=null;
  while (profileData.hasNext()) {
    ProfileFeature pFeature=profileData.next();
    pFeature.calcBounds();
    PointFeatureIterator pp=pFeature.getPointFeatureIterator(-1);
    while (pp.hasNext()) {
      PointFeature pointFeature=pp.next();
      profileID=getProfileIDFromProfile(pointFeature);
      break;
    }
    DateTime eventStart=(eventTimes.size() >= 1) ? new DateTime(df.getISODate(eventTimes.get(0)),chrono) : null;
    DateTime eventEnd=(eventTimes.size() > 1) ? new DateTime(df.getISODate(eventTimes.get(1)),chrono) : null;
    if (profileID != null && reqStationNames.contains(profileID)) {
      if (eventStart != null) {
        if (pFeature.getTime().before(eventStart.toDate()))         continue;
        if (eventEnd != null) {
          if (pFeature.getTime().after(eventEnd.toDate()))           continue;
        }
      }
      Integer stNum=0;
      for (int sti=0; sti < reqStationNames.size(); sti++) {
        if (reqStationNames.get(sti).equalsIgnoreCase(profileID))         stNum=sti;
      }
      profileList.put(stNum,pFeature);
      double altmin=Double.POSITIVE_INFINITY;
      double altmax=Double.NEGATIVE_INFINITY;
      for (pFeature.resetIteration(); pFeature.hasNext(); ) {
        PointFeature point=pFeature.next();
        double alt=point.getLocation().getAltitude();
        if (alt < altmin)         altmin=alt;
        if (alt > altmax)         altmax=alt;
      }
      if (altmin < lowerAlt)       lowerAlt=altmin;
      if (altmax > upperAlt)       upperAlt=altmax;
      if (firstSet) {
        upperLat=pFeature.getLatLon().getLatitude();
        lowerLat=pFeature.getLatLon().getLatitude();
        upperLon=pFeature.getLatLon().getLongitude();
        lowerLon=pFeature.getLatLon().getLongitude();
        dtStart=new DateTime(pFeature.getTime(),chrono);
        dtEnd=new DateTime(pFeature.getTime(),chrono);
        firstSet=false;
      }
 else {
        dtStartt=new DateTime(pFeature.getTime(),chrono);
        dtEndt=new DateTime(pFeature.getTime(),chrono);
        if (dtStartt.isBefore(dtStart)) {
          dtStart=dtStartt;
        }
        if (dtEndt.isAfter(dtEnd)) {
          dtEnd=dtEndt;
        }
        if (pFeature.getLatLon().getLatitude() > upperLat) {
          upperLat=pFeature.getLatLon().getLatitude();
        }
        if (pFeature.getLatLon().getLatitude() < lowerLat) {
          lowerLat=pFeature.getLatLon().getLatitude();
        }
        if (pFeature.getLatLon().getLongitude() > upperLon) {
          upperLon=pFeature.getLatLon().getLongitude();
        }
        if (pFeature.getLatLon().getLongitude() < lowerLon) {
          lowerLon=pFeature.getLatLon().getLongitude();
        }
      }
    }
 else {
    }
  }
  setStartDate(df.toDateTimeStringISO(dtStart.toDate()));
  setEndDate(df.toDateTimeStringISO(dtEnd.toDate()));
  if (reqStationNames != null) {
    setNumberOfStations(reqStationNames.size());
  }
}