Program: 19862
Project: 19862
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  variantRegex=Pattern.compile("String_Node_Str");
  paddingUnit=(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,5,getResources().getDisplayMetrics());
  collections=new HashMap<Long,List<Collection>>();
  rfgData=new RFGenerationData(getActivity());
  db=rfgData.getReadableDatabase();
  if (folderId <= 0) {
    StringBuilder query=new StringBuilder();
    query.append("String_Node_Str");
    query.append("String_Node_Str");
    if (folderId == 0)     query.append("String_Node_Str");
    query.append("String_Node_Str");
    Cursor collection=db.rawQuery(query.toString(),null);
    getActivity().startManagingCursor(collection);
    long previousGameId=-1;
    List<Collection> gameCollections=new ArrayList<Collection>();
    while (collection.moveToNext()) {
      if (previousGameId == -1) {
        previousGameId=collection.getLong(0);
      }
 else       if (previousGameId != collection.getLong(0)) {
        collections.put(previousGameId,gameCollections);
        previousGameId=collection.getLong(0);
        gameCollections=new ArrayList<Collection>();
      }
      Folder newFolder=new Folder(collection.getString(1));
      newFolder.setForSale(collection.getInt(3) == 1);
      newFolder.setPrivate(collection.getInt(2) == 1);
      Collection newCollection=new Collection();
      newCollection.setGameQuantity(collection.getInt(4));
      newCollection.setBoxQuantity(collection.getInt(5));
      newCollection.setManualQuantity(collection.getInt(6));
      newCollection.setFolder(newFolder);
      gameCollections.add(newCollection);
    }
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  variantRegex=Pattern.compile("String_Node_Str");
  paddingUnit=(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,5,getResources().getDisplayMetrics());
  collections=new HashMap<Long,List<Collection>>();
  rfgData=new RFGenerationData(getActivity());
  db=rfgData.getReadableDatabase();
  if (folderId <= 0) {
    StringBuilder query=new StringBuilder();
    query.append("String_Node_Str");
    query.append("String_Node_Str");
    if (folderId == 0)     query.append("String_Node_Str");
    query.append("String_Node_Str");
    Cursor collection=db.rawQuery(query.toString(),null);
    getActivity().startManagingCursor(collection);
    long previousGameId=-1;
    List<Collection> gameCollections=new ArrayList<Collection>();
    while (collection.moveToNext()) {
      if (previousGameId == -1) {
        previousGameId=collection.getLong(0);
      }
 else       if (previousGameId != collection.getLong(0)) {
        collections.put(previousGameId,gameCollections);
        previousGameId=collection.getLong(0);
        gameCollections=new ArrayList<Collection>();
      }
      Folder newFolder=new Folder(collection.getString(1));
      newFolder.setForSale(collection.getInt(3) == 1);
      newFolder.setPrivate(collection.getInt(2) == 1);
      Collection newCollection=new Collection();
      newCollection.setGameQuantity(collection.getFloat(4));
      newCollection.setBoxQuantity(collection.getFloat(5));
      newCollection.setManualQuantity(collection.getFloat(6));
      newCollection.setFolder(newFolder);
      gameCollections.add(newCollection);
    }
  }
}