Program: 86350
Project: 86350
Buggy source:
public List<List<String[]>> account(String ausw,String pwd) throws IOException, NotReachableException, JSONException, AccountUnsupportedException {
  if (!initialised)   init();
  HttpGet httpget;
  HttpPost httppost=new HttpPost(opac_url + "String_Node_Str");
  List<NameValuePair> nameValuePairs=new ArrayList<NameValuePair>(2);
  nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  HttpResponse response=ahc.execute(httppost);
  Log.i("String_Node_Str","String_Node_Str" + response.getStatusLine().getStatusCode());
  if (response.getStatusLine().getStatusCode() == 200) {
    response.getEntity().consumeContent();
    httppost=new HttpPost(opac_url + "String_Node_Str");
    nameValuePairs=new ArrayList<NameValuePair>(2);
    nameValuePairs.add(new BasicNameValuePair("String_Node_Str",ausw));
    nameValuePairs.add(new BasicNameValuePair("String_Node_Str",pwd));
    nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
    nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
    nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
    httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
    response=ahc.execute(httppost);
  }
 else   if (response.getStatusLine().getStatusCode() == 302) {
    response.getEntity().consumeContent();
    httpget=new HttpGet(opac_url + "String_Node_Str");
    response=ahc.execute(httpget);
  }
 else   if (response.getStatusLine().getStatusCode() == 500) {
    throw new NotReachableException();
  }
  String html=convertStreamToString(response.getEntity().getContent());
  Document doc=Jsoup.parse(html);
  response.getEntity().consumeContent();
  if (doc.getElementsByClass("String_Node_Str").size() == 1) {
    last_error=doc.getElementsByClass("String_Node_Str").get(0).text();
    return null;
  }
  JSONArray copymap=null;
  try {
    copymap=bib.getJSONArray(2);
  }
 catch (  JSONException e) {
    throw new AccountUnsupportedException(html);
  }
  List<String[]> medien=new ArrayList<String[]>();
  Elements exemplartrs=doc.select("String_Node_Str").get(0).select("String_Node_Str");
  for (int i=0; i < exemplartrs.size(); i++) {
    Element tr=exemplartrs.get(i);
    String[] e=new String[8];
    for (int j=0; j < 8; j++) {
      if (copymap.getInt(j) > -1) {
        if (j == 7) {
          if (tr.child(copymap.getInt(j)).children().size() > 0) {
            e[j]=tr.child(copymap.getInt(j)).child(0).attr("String_Node_Str");
          }
 else {
            e[j]=null;
          }
        }
 else {
          e[j]=tr.child(copymap.getInt(j)).text();
        }
      }
 else {
        e[j]="String_Node_Str";
      }
    }
    medien.add(e);
  }
  try {
    copymap=bib.getJSONArray(3);
  }
 catch (  JSONException e) {
    throw new AccountUnsupportedException(html);
  }
  List<String[]> reservations=new ArrayList<String[]>();
  exemplartrs=doc.select("String_Node_Str").get(1).select("String_Node_Str");
  for (int i=0; i < exemplartrs.size(); i++) {
    Element tr=exemplartrs.get(i);
    String[] e=new String[5];
    for (int j=0; j < 5; j++) {
      int k=copymap.getInt(j);
      if (k > -1) {
        if (j == 4) {
          if (tr.child(k).children().size() > 0) {
            e[j]=tr.child(k).child(0).attr("String_Node_Str");
          }
 else {
            e[j]=null;
          }
        }
 else {
          e[j]=tr.child(k).text();
        }
      }
 else {
        e[j]="String_Node_Str";
      }
    }
    reservations.add(e);
  }
  List<List<String[]>> res=new ArrayList<List<String[]>>();
  res.add(medien);
  res.add(reservations);
  return res;
}

Fixed version (ground truth):
public List<List<String[]>> account(String ausw,String pwd) throws IOException, NotReachableException, JSONException, AccountUnsupportedException, SocketException {
  if (!initialised)   init();
  HttpGet httpget;
  HttpPost httppost=new HttpPost(opac_url + "String_Node_Str");
  List<NameValuePair> nameValuePairs=new ArrayList<NameValuePair>(2);
  nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  HttpResponse response=ahc.execute(httppost);
  Log.i("String_Node_Str","String_Node_Str" + response.getStatusLine().getStatusCode());
  if (response.getStatusLine().getStatusCode() == 200) {
    response.getEntity().consumeContent();
    httppost=new HttpPost(opac_url + "String_Node_Str");
    nameValuePairs=new ArrayList<NameValuePair>(2);
    nameValuePairs.add(new BasicNameValuePair("String_Node_Str",ausw));
    nameValuePairs.add(new BasicNameValuePair("String_Node_Str",pwd));
    nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
    nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
    nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
    httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
    response=ahc.execute(httppost);
  }
 else   if (response.getStatusLine().getStatusCode() == 302) {
    response.getEntity().consumeContent();
    httpget=new HttpGet(opac_url + "String_Node_Str");
    response=ahc.execute(httpget);
  }
 else   if (response.getStatusLine().getStatusCode() == 500) {
    throw new NotReachableException();
  }
  String html=convertStreamToString(response.getEntity().getContent());
  Document doc=Jsoup.parse(html);
  response.getEntity().consumeContent();
  if (doc.getElementsByClass("String_Node_Str").size() == 1) {
    last_error=doc.getElementsByClass("String_Node_Str").get(0).text();
    return null;
  }
  JSONArray copymap=null;
  try {
    copymap=bib.getJSONArray(2);
  }
 catch (  JSONException e) {
    throw new AccountUnsupportedException(html);
  }
  List<String[]> medien=new ArrayList<String[]>();
  Elements exemplartrs=doc.select("String_Node_Str").get(0).select("String_Node_Str");
  for (int i=0; i < exemplartrs.size(); i++) {
    Element tr=exemplartrs.get(i);
    String[] e=new String[8];
    for (int j=0; j < 8; j++) {
      if (copymap.getInt(j) > -1) {
        if (j == 7) {
          if (tr.child(copymap.getInt(j)).children().size() > 0) {
            e[j]=tr.child(copymap.getInt(j)).child(0).attr("String_Node_Str");
          }
 else {
            e[j]=null;
          }
        }
 else {
          e[j]=tr.child(copymap.getInt(j)).text();
        }
      }
 else {
        e[j]="String_Node_Str";
      }
    }
    medien.add(e);
  }
  try {
    copymap=bib.getJSONArray(3);
  }
 catch (  JSONException e) {
    throw new AccountUnsupportedException(html);
  }
  List<String[]> reservations=new ArrayList<String[]>();
  exemplartrs=doc.select("String_Node_Str").get(1).select("String_Node_Str");
  for (int i=0; i < exemplartrs.size(); i++) {
    Element tr=exemplartrs.get(i);
    String[] e=new String[5];
    for (int j=0; j < 5; j++) {
      int k=copymap.getInt(j);
      if (k > -1) {
        if (j == 4) {
          if (tr.child(k).children().size() > 0) {
            e[j]=tr.child(k).child(0).attr("String_Node_Str");
          }
 else {
            e[j]=null;
          }
        }
 else {
          e[j]=tr.child(k).text();
        }
      }
 else {
        e[j]="String_Node_Str";
      }
    }
    reservations.add(e);
  }
  List<List<String[]>> res=new ArrayList<List<String[]>>();
  res.add(medien);
  res.add(reservations);
  return res;
}