Program: 86338
Project: 86338
Buggy source:
public AccountData getCachedAccountData(Account account){
  AccountData adata=new AccountData();
  List<ContentValues> lent=new ArrayList<ContentValues>();
  String[] selectionArgs={"String_Node_Str" + account.getId()};
  Cursor cursor=database.query(AccountDatabase.TABLENAME_LENT,(String[])AccountDatabase.COLUMNS_LENT.values().toArray(),"String_Node_Str",selectionArgs,null,null,null);
  cursor.moveToFirst();
  if (!cursor.isAfterLast()) {
    ContentValues entry=new ContentValues();
    for (    Object o : AccountDatabase.COLUMNS_LENT.entrySet()) {
      Map.Entry<String,String> field=(Map.Entry<String,String>)o;
      entry.put(field.getKey(),cursor.getString(cursor.getColumnIndex(field.getValue())));
    }
    lent.add(entry);
    cursor.moveToNext();
  }
  cursor.close();
  adata.setLent(lent);
  List<ContentValues> res=new ArrayList<ContentValues>();
  cursor=database.query(AccountDatabase.TABLENAME_RESERVATION,(String[])AccountDatabase.COLUMNS_RESERVATIONS.values().toArray(),"String_Node_Str",selectionArgs,null,null,null);
  cursor.moveToFirst();
  if (!cursor.isAfterLast()) {
    ContentValues entry=new ContentValues();
    for (    Object o : AccountDatabase.COLUMNS_RESERVATIONS.entrySet()) {
      Map.Entry<String,String> field=(Map.Entry<String,String>)o;
      entry.put(field.getKey(),cursor.getString(cursor.getColumnIndex(field.getValue())));
    }
    res.add(entry);
    cursor.moveToNext();
  }
  cursor.close();
  adata.setReservations(res);
  return adata;
}

Fixed version (ground truth):
public AccountData getCachedAccountData(Account account){
  AccountData adata=new AccountData();
  List<ContentValues> lent=new ArrayList<ContentValues>();
  String[] selectionArgs={"String_Node_Str" + account.getId()};
  Cursor cursor=database.query(AccountDatabase.TABLENAME_LENT,AccountDatabase.COLUMNS_LENT.values().toArray(new String[]{}),"String_Node_Str",selectionArgs,null,null,null);
  cursor.moveToFirst();
  while (!cursor.isAfterLast()) {
    ContentValues entry=new ContentValues();
    for (    Object o : AccountDatabase.COLUMNS_LENT.entrySet()) {
      Map.Entry<String,String> field=(Map.Entry<String,String>)o;
      String value=cursor.getString(cursor.getColumnIndex(field.getValue()));
      if (value != null) {
        if (!value.equals("String_Node_Str")) {
          entry.put(field.getKey(),value);
        }
      }
    }
    lent.add(entry);
    cursor.moveToNext();
  }
  cursor.close();
  adata.setLent(lent);
  List<ContentValues> res=new ArrayList<ContentValues>();
  cursor=database.query(AccountDatabase.TABLENAME_RESERVATION,(String[])AccountDatabase.COLUMNS_RESERVATIONS.values().toArray(new String[]{}),"String_Node_Str",selectionArgs,null,null,null);
  cursor.moveToFirst();
  while (!cursor.isAfterLast()) {
    ContentValues entry=new ContentValues();
    for (    Object o : AccountDatabase.COLUMNS_RESERVATIONS.entrySet()) {
      Map.Entry<String,String> field=(Map.Entry<String,String>)o;
      String value=cursor.getString(cursor.getColumnIndex(field.getValue()));
      if (value != null) {
        if (!value.equals("String_Node_Str")) {
          entry.put(field.getKey(),value);
        }
      }
    }
    res.add(entry);
    cursor.moveToNext();
  }
  cursor.close();
  adata.setReservations(res);
  return adata;
}