Program: 20162
Project: 20162
Buggy source:
@Override public CurrentWeather getCurrentCondition(String data) throws WeatherLibException {
  CurrentWeather weather=new CurrentWeather();
  try {
    XmlPullParser parser=XmlPullParserFactory.newInstance().newPullParser();
    parser.setInput(new StringReader(data));
    String tagName=null;
    String currentTag=null;
    int event=parser.getEventType();
    boolean isFirstDayForecast=true;
    while (event != XmlPullParser.END_DOCUMENT) {
      tagName=parser.getName();
      if (event == XmlPullParser.START_TAG) {
        if (tagName.equals("String_Node_Str")) {
          weather.wind.setChill(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
          weather.wind.setDeg(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
          weather.wind.setSpeed(WeatherUtility.string2Float(parser.getAttributeValue(null,"String_Node_Str")));
        }
 else         if (tagName.equals("String_Node_Str")) {
          weather.currentCondition.setHumidity(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
          weather.currentCondition.setVisibility(WeatherUtility.string2Float(parser.getAttributeValue(null,"String_Node_Str")));
          weather.currentCondition.setPressure(WeatherUtility.string2Float(parser.getAttributeValue(null,"String_Node_Str")));
          weather.currentCondition.setPressureTrend(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
        }
 else         if (tagName.equals("String_Node_Str")) {
          if (isFirstDayForecast) {
            weather.temperature.setMinTemp(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
            weather.temperature.setMaxTemp(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
            isFirstDayForecast=false;
          }
 else {
            DayForecast df=new DayForecast();
            df.forecastTemp.max=Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str"));
            df.forecastTemp.max=Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str"));
            df.weather.currentCondition.setWeatherId(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
            if (codeProvider != null)             df.weather.currentCondition.setWeatherCode(codeProvider.getWeatherCode(df.weather.currentCondition.getWeatherId()));
            df.weather.currentCondition.setDescr(parser.getAttributeValue(null,"String_Node_Str"));
            df.weather.currentCondition.setIcon("String_Node_Str" + df.weather.currentCondition.getWeatherId());
            forecast.addForecast(df);
          }
        }
 else         if (tagName.equals("String_Node_Str")) {
          weather.currentCondition.setWeatherId(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
          weather.currentCondition.setIcon("String_Node_Str" + weather.currentCondition.getWeatherId());
          if (codeProvider != null)           weather.currentCondition.setWeatherCode(codeProvider.getWeatherCode(weather.currentCondition.getWeatherId()));
          weather.currentCondition.setDescr(parser.getAttributeValue(null,"String_Node_Str"));
          weather.temperature.setTemp(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
        }
 else         if (tagName.equals("String_Node_Str")) {
          units.tempUnit="String_Node_Str" + parser.getAttributeValue(null,"String_Node_Str");
          units.pressureUnit=parser.getAttributeValue(null,"String_Node_Str");
          units.distanceUnit=parser.getAttributeValue(null,"String_Node_Str");
          units.speedUnit=parser.getAttributeValue(null,"String_Node_Str");
          forecast.setUnit(units);
        }
 else         if (tagName.equals("String_Node_Str")) {
          weather.location.setCity(parser.getAttributeValue(null,"String_Node_Str"));
          weather.location.setRegion(parser.getAttributeValue(null,"String_Node_Str"));
          weather.location.setCountry(parser.getAttributeValue(null,"String_Node_Str"));
        }
 else         if (tagName.equals("String_Node_Str"))         currentTag="String_Node_Str";
 else         if (tagName.equals("String_Node_Str")) {
          if (currentTag == null) {
          }
        }
 else         if (tagName.equals("String_Node_Str")) {
          currentTag="String_Node_Str";
        }
 else         if (tagName.equals("String_Node_Str")) {
          String val=parser.getAttributeValue(null,"String_Node_Str");
          SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
          if (val != null) {
            java.util.Date d=sdf.parse(val);
            weather.location.setSunrise(d.getTime());
          }
          val=parser.getAttributeValue(null,"String_Node_Str");
          if (val != null) {
            java.util.Date d=sdf.parse(val);
            weather.location.setSunset(d.getTime());
          }
        }
      }
 else       if (event == XmlPullParser.END_TAG) {
        if ("String_Node_Str".equals(currentTag)) {
          currentTag=null;
        }
      }
      event=parser.next();
    }
  }
 catch (  Throwable t) {
    t.printStackTrace();
    throw new WeatherLibException(t);
  }
  weather.setUnit(units);
  return weather;
}

Fixed version (ground truth):
@Override public CurrentWeather getCurrentCondition(String data) throws WeatherLibException {
  CurrentWeather weather=new CurrentWeather();
  try {
    XmlPullParser parser=XmlPullParserFactory.newInstance().newPullParser();
    parser.setInput(new StringReader(data));
    String tagName=null;
    String currentTag=null;
    int event=parser.getEventType();
    boolean isFirstDayForecast=true;
    while (event != XmlPullParser.END_DOCUMENT) {
      tagName=parser.getName();
      if (event == XmlPullParser.START_TAG) {
        if (tagName.equals("String_Node_Str")) {
          weather.wind.setChill(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
          weather.wind.setDeg(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
          weather.wind.setSpeed(WeatherUtility.string2Float(parser.getAttributeValue(null,"String_Node_Str")));
        }
 else         if (tagName.equals("String_Node_Str")) {
          weather.currentCondition.setHumidity(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
          weather.currentCondition.setVisibility(WeatherUtility.string2Float(parser.getAttributeValue(null,"String_Node_Str")));
          weather.currentCondition.setPressure(WeatherUtility.string2Float(parser.getAttributeValue(null,"String_Node_Str")));
          weather.currentCondition.setPressureTrend(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
        }
 else         if (tagName.equals("String_Node_Str")) {
          if (isFirstDayForecast) {
            weather.temperature.setMinTemp(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
            weather.temperature.setMaxTemp(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
            isFirstDayForecast=false;
          }
 else {
            DayForecast df=new DayForecast();
            df.forecastTemp.max=Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str"));
            df.forecastTemp.min=Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str"));
            df.weather.currentCondition.setWeatherId(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
            if (codeProvider != null)             df.weather.currentCondition.setWeatherCode(codeProvider.getWeatherCode(df.weather.currentCondition.getWeatherId()));
            df.weather.currentCondition.setDescr(parser.getAttributeValue(null,"String_Node_Str"));
            df.weather.currentCondition.setIcon("String_Node_Str" + df.weather.currentCondition.getWeatherId());
            forecast.addForecast(df);
          }
        }
 else         if (tagName.equals("String_Node_Str")) {
          weather.currentCondition.setWeatherId(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
          weather.currentCondition.setIcon("String_Node_Str" + weather.currentCondition.getWeatherId());
          if (codeProvider != null)           weather.currentCondition.setWeatherCode(codeProvider.getWeatherCode(weather.currentCondition.getWeatherId()));
          weather.currentCondition.setDescr(parser.getAttributeValue(null,"String_Node_Str"));
          weather.temperature.setTemp(Integer.parseInt(parser.getAttributeValue(null,"String_Node_Str")));
        }
 else         if (tagName.equals("String_Node_Str")) {
          units.tempUnit="String_Node_Str" + parser.getAttributeValue(null,"String_Node_Str");
          units.pressureUnit=parser.getAttributeValue(null,"String_Node_Str");
          units.distanceUnit=parser.getAttributeValue(null,"String_Node_Str");
          units.speedUnit=parser.getAttributeValue(null,"String_Node_Str");
          forecast.setUnit(units);
        }
 else         if (tagName.equals("String_Node_Str")) {
          weather.location.setCity(parser.getAttributeValue(null,"String_Node_Str"));
          weather.location.setRegion(parser.getAttributeValue(null,"String_Node_Str"));
          weather.location.setCountry(parser.getAttributeValue(null,"String_Node_Str"));
        }
 else         if (tagName.equals("String_Node_Str"))         currentTag="String_Node_Str";
 else         if (tagName.equals("String_Node_Str")) {
          if (currentTag == null) {
          }
        }
 else         if (tagName.equals("String_Node_Str")) {
          currentTag="String_Node_Str";
        }
 else         if (tagName.equals("String_Node_Str")) {
          String val=parser.getAttributeValue(null,"String_Node_Str");
          SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
          if (val != null) {
            java.util.Date d=sdf.parse(val);
            weather.location.setSunrise(d.getTime());
          }
          val=parser.getAttributeValue(null,"String_Node_Str");
          if (val != null) {
            java.util.Date d=sdf.parse(val);
            weather.location.setSunset(d.getTime());
          }
        }
      }
 else       if (event == XmlPullParser.END_TAG) {
        if ("String_Node_Str".equals(currentTag)) {
          currentTag=null;
        }
      }
      event=parser.next();
    }
  }
 catch (  Throwable t) {
    t.printStackTrace();
    throw new WeatherLibException(t);
  }
  weather.setUnit(units);
  return weather;
}