Program: 19245
Project: 19245
Buggy source:
/** 
 * SOS get obs request handler
 * @param netCDFDataset dataset for which the get observation request is being made
 * @param stationName collection of offerings from the request
 * @param variableNames collection of observed properties from the request
 * @param eventTime event time range from the request
 * @param outputFormat response format from the request
 * @param latLonRequest map of the latitudes and longitude (points or ranges) from the request
 * @throws IOException 
 */
public SOSGetObservationRequestHandler(NetcdfDataset netCDFDataset,String[] stationName,String[] variableNames,String[] eventTime,String outputFormat,Map<String,String> latLonRequest) throws IOException {
  super(netCDFDataset);
  for (  String vars : variableNames) {
    boolean isInDataset=false;
    for (    Variable dVar : netCDFDataset.getVariables()) {
      if (dVar.getFullName().equalsIgnoreCase(vars)) {
        isInDataset=true;
        break;
      }
    }
    if (!isInDataset) {
      _log.error("String_Node_Str" + vars + "String_Node_Str");
      output=new GetCapsOutputter();
      output.setupExceptionOutput("String_Node_Str" + vars + "String_Node_Str");
      CDMDataSet=null;
      return;
    }
  }
  CoordinateAxis heightAxis=netCDFDataset.findCoordinateAxis(AxisType.Height);
  this.variableNames=checkNetcdfFileForAxis(heightAxis,variableNames);
  if (stationName.length == 1 && stationName[0].equalsIgnoreCase("String_Node_Str")) {
    stationName=getStationNames().values().toArray(new String[getStationNames().values().size()]);
  }
  for (  String str : stationName) {
    System.out.println("String_Node_Str" + str);
  }
  setCDMDatasetForStations(netCDFDataset,stationName,eventTime,latLonRequest);
  if (outputFormat.equalsIgnoreCase("String_Node_Str")) {
    contentType="String_Node_Str";
    output=new OosTethysSwe(this.variableNames,getFeatureDataset(),CDMDataSet,netCDFDataset);
  }
 else {
    _log.error("String_Node_Str" + outputFormat);
    output=new GetCapsOutputter();
    output.setupExceptionOutput("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * SOS get obs request handler
 * @param netCDFDataset dataset for which the get observation request is being made
 * @param stationName collection of offerings from the request
 * @param variableNames collection of observed properties from the request
 * @param eventTime event time range from the request
 * @param outputFormat response format from the request
 * @param latLonRequest map of the latitudes and longitude (points or ranges) from the request
 * @throws IOException 
 */
public SOSGetObservationRequestHandler(NetcdfDataset netCDFDataset,String[] stationName,String[] variableNames,String[] eventTime,String outputFormat,Map<String,String> latLonRequest) throws IOException {
  super(netCDFDataset);
  for (  String vars : variableNames) {
    boolean isInDataset=false;
    for (    Variable dVar : netCDFDataset.getVariables()) {
      if (dVar.getFullName().equalsIgnoreCase(vars)) {
        isInDataset=true;
        break;
      }
    }
    if (!isInDataset) {
      _log.error("String_Node_Str" + vars + "String_Node_Str");
      output=new GetCapsOutputter();
      output.setupExceptionOutput("String_Node_Str" + vars + "String_Node_Str");
      CDMDataSet=null;
      return;
    }
  }
  CoordinateAxis heightAxis=netCDFDataset.findCoordinateAxis(AxisType.Height);
  this.variableNames=checkNetcdfFileForAxis(heightAxis,variableNames);
  if (stationName.length == 1 && stationName[0].equalsIgnoreCase("String_Node_Str")) {
    stationName=getStationNames().values().toArray(new String[getStationNames().values().size()]);
  }
  setCDMDatasetForStations(netCDFDataset,stationName,eventTime,latLonRequest);
  if (outputFormat.equalsIgnoreCase("String_Node_Str")) {
    contentType="String_Node_Str";
    output=new OosTethysSwe(this.variableNames,getFeatureDataset(),CDMDataSet,netCDFDataset);
  }
 else {
    _log.error("String_Node_Str" + outputFormat);
    output=new GetCapsOutputter();
    output.setupExceptionOutput("String_Node_Str");
  }
}