Program: 179637
Project: 179637
Buggy source:
@Override protected List<?> doInBackground(String... params){
  List<Annotation> messages=new ArrayList<Annotation>();
  XmlPullParser pull=Xml.newPullParser();
  Annotation annotation=null;
  try {
    try {
      URL url=new URL(params[0]);
      HttpURLConnection conn=(HttpURLConnection)url.openConnection();
      if (params.length > 1) {
        conn.setRequestProperty("String_Node_Str",params[1]);
      }
      InputStream is=conn.getInputStream();
      try {
        int s=Integer.parseInt(conn.getHeaderField("String_Node_Str"));
        if (s < 150) {
          resultCode=1;
        }
      }
 catch (      NumberFormatException e) {
      }
      pull.setInput(is,null);
    }
 catch (    Exception ex) {
      throw new XMLProccessException("String_Node_Str",ex);
    }
    int eventType;
    this.publishProgress(-1);
    try {
      eventType=pull.getEventType();
    }
 catch (    XmlPullParserException e) {
      resultCode=-1;
      throw new XMLProccessException("String_Node_Str",e);
    }
    try {
      int counter=0;
      while (eventType != XmlPullParser.END_DOCUMENT) {
        if (this.isCancelled()) {
          Log.d("String_Node_Str","String_Node_Str");
          return null;
        }
switch (eventType) {
case XmlPullParser.START_DOCUMENT:
          break;
case XmlPullParser.START_TAG:
        String name=pull.getName();
      if (name.equalsIgnoreCase("String_Node_Str")) {
        if (pull.getAttributeCount() > 0) {
          for (int i=0; i < pull.getAttributeCount(); i++) {
            if (pull.getAttributeName(i).equalsIgnoreCase("String_Node_Str")) {
              try {
                int x=Integer.parseInt(pull.getAttributeValue(i));
                if (x > 0)                 this.publishProgress(0,x);
              }
 catch (              NumberFormatException e) {
              }
            }
            if (pull.getAttributeName(i).equalsIgnoreCase("String_Node_Str")) {
              SimpleDateFormat format=new SimpleDateFormat("String_Node_Str");
              try {
                DataProvider.getInstance(parentActivity).getCon().setLastUpdate(format.parse(pull.getAttributeValue(i).trim()));
              }
 catch (              ParseException e) {
                Log.e("String_Node_Str","String_Node_Str",e);
              }
            }
          }
        }
      }
    if (name.equalsIgnoreCase("String_Node_Str")) {
      annotation=new Annotation();
    }
 else {
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setPid(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setAuthor(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setTitle(Html.fromHtml(pull.nextText().trim()).toString());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setType(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setProgramLine(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setLocation(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setAnnotation(Html.fromHtml(pull.nextText().trim()).toString());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setStartTime(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setEndTime(pull.nextText().trim());
      }
    }
  break;
case XmlPullParser.END_TAG:
name=pull.getName();
if (name.equalsIgnoreCase("String_Node_Str") && annotation != null) {
messages.add(annotation);
this.publishProgress(counter++);
}
break;
default :
break;
}
eventType=pull.next();
}
}
 catch (Exception e) {
resultCode=-1;
throw new XMLProccessException("String_Node_Str",e);
}
}
 catch (XMLProccessException e) {
resultCode=-1;
Log.e("String_Node_Str","String_Node_Str",e);
throw e;
}
return messages;
}

Fixed version (ground truth):
@Override protected List<?> doInBackground(String... params){
  List<Annotation> messages=new ArrayList<Annotation>();
  XmlPullParser pull=Xml.newPullParser();
  Annotation annotation=null;
  try {
    try {
      URL url=new URL(params[0]);
      HttpURLConnection conn=(HttpURLConnection)url.openConnection();
      if (params.length > 1) {
        conn.setRequestProperty("String_Node_Str",params[1]);
      }
      InputStream is=conn.getInputStream();
      try {
        int s=Integer.parseInt(conn.getHeaderField("String_Node_Str"));
        if (s < 150) {
          resultCode=1;
        }
      }
 catch (      NumberFormatException e) {
      }
      pull.setInput(is,null);
    }
 catch (    Exception ex) {
      throw new XMLProccessException("String_Node_Str",ex);
    }
    int eventType;
    this.publishProgress(-1);
    try {
      eventType=pull.getEventType();
    }
 catch (    XmlPullParserException e) {
      resultCode=-1;
      throw new XMLProccessException("String_Node_Str",e);
    }
    try {
      int counter=0;
      while (eventType != XmlPullParser.END_DOCUMENT) {
        if (this.isCancelled()) {
          Log.d("String_Node_Str","String_Node_Str");
          return null;
        }
switch (eventType) {
case XmlPullParser.START_DOCUMENT:
          break;
case XmlPullParser.START_TAG:
        String name=pull.getName();
      if (name.equalsIgnoreCase("String_Node_Str")) {
        if (pull.getAttributeCount() > 0) {
          for (int i=0; i < pull.getAttributeCount(); i++) {
            if (pull.getAttributeName(i).equalsIgnoreCase("String_Node_Str")) {
              try {
                int x=Integer.parseInt(pull.getAttributeValue(i));
                if (x > 0)                 this.publishProgress(0,x);
              }
 catch (              NumberFormatException e) {
              }
            }
            if (pull.getAttributeName(i).equalsIgnoreCase("String_Node_Str")) {
              DateTimeFormatter format=ISODateTimeFormat.dateTimeNoMillis();
              try {
                DataProvider.getInstance(parentActivity).getCon().setLastUpdate(format.parseDateTime(pull.getAttributeValue(i).trim()).toDate());
              }
 catch (              Exception e) {
                Log.e("String_Node_Str","String_Node_Str",e);
              }
            }
          }
        }
      }
    if (name.equalsIgnoreCase("String_Node_Str")) {
      annotation=new Annotation();
    }
 else {
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setPid(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setAuthor(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setTitle(Html.fromHtml(pull.nextText().trim()).toString());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setType(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setProgramLine(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setLocation(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setAnnotation(Html.fromHtml(pull.nextText().trim()).toString());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setStartTime(pull.nextText().trim());
      }
      if (name.equalsIgnoreCase("String_Node_Str")) {
        annotation.setEndTime(pull.nextText().trim());
      }
    }
  break;
case XmlPullParser.END_TAG:
name=pull.getName();
if (name.equalsIgnoreCase("String_Node_Str") && annotation != null) {
messages.add(annotation);
this.publishProgress(counter++);
}
break;
default :
break;
}
eventType=pull.next();
}
}
 catch (Exception e) {
resultCode=-1;
throw new XMLProccessException("String_Node_Str",e);
}
}
 catch (XMLProccessException e) {
resultCode=-1;
Log.e("String_Node_Str","String_Node_Str",e);
throw e;
}
return messages;
}