Program: 19879
Project: 19879
Buggy source:
@Override public View getView(int position,View convertView,ViewGroup parent){
  View v=convertView;
  if (v == null) {
    LayoutInflater vi=(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    v=vi.inflate(R.layout.gamerow,null);
  }
  Game o=null;
  if (position < gameList.size())   o=gameList.get(position);
  if (o != null) {
    TextView console=(TextView)v.findViewById(R.id.console);
    if (console != null) {
      if (o.getConsoleAbbv().length() > 0)       console.setText(o.getConsoleAbbv());
 else {
        Log.w(TAG,o.getRFGID() + "String_Node_Str");
        Cursor cursor=db.query("String_Node_Str",new String[]{"String_Node_Str"},_ID + "String_Node_Str",new String[]{Integer.toString(o.getConsoleId())},null,null,null);
        startManagingCursor(cursor);
        while (cursor.moveToNext()) {
          o.setConsoleAbbv(cursor.getString(0));
          console.setText(cursor.getString(0));
        }
      }
    }
    TextView title=(TextView)v.findViewById(R.id.title);
    if (title != null) {
      Matcher matcher=variantRegex.matcher(o.getTitle());
      if (matcher.find()) {
        String variationTitle=matcher.group().substring(2,matcher.group().length() - 1);
        String mainTitle=o.getTitle().substring(0,o.getTitle().length() - variationTitle.length() - 3);
        title.setText(Html.fromHtml("String_Node_Str" + mainTitle + "String_Node_Str"+ Integer.toHexString(getResources().getColor(R.drawable.textlight)).substring(2)+ "String_Node_Str"+ variationTitle+ "String_Node_Str"));
      }
 else {
        title.setText(Html.fromHtml("String_Node_Str" + o.getTitle() + "String_Node_Str"));
      }
    }
    TextView publisher=(TextView)v.findViewById(R.id.publisher);
    if (publisher != null) {
      if (o.getType().equals("String_Node_Str"))       publisher.setText(o.getPublisher());
 else       publisher.setText("String_Node_Str" + o.getType() + "String_Node_Str"+ o.getPublisher());
      if (o.getYear() > 0 && !o.getPublisher().equals("String_Node_Str"))       publisher.setText(publisher.getText() + "String_Node_Str" + o.getYear());
 else       if (o.getYear() > 0)       publisher.setText(publisher.getText() + "String_Node_Str" + o.getYear());
    }
    RelativeLayout regionLayout=(RelativeLayout)v.findViewById(R.id.regionLayout);
    if (regionLayout != null) {
      if (regionLayout.getChildCount() > 0)       regionLayout.removeViews(0,regionLayout.getChildCount());
      if (!o.getRegion().contains("String_Node_Str") && !o.getRegion().contains("String_Node_Str")) {
        ImageView region=new ImageView(v.getContext());
        region.setImageDrawable(o.getRegionDrawable(v.getContext()));
        RelativeLayout.LayoutParams layoutParams=new RelativeLayout.LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL,RelativeLayout.TRUE);
        regionLayout.addView(region,layoutParams);
      }
 else {
        AnimatedImageView regionAnim=new AnimatedImageView(v.getContext());
        regionAnim.setImageDrawable(o.getRegionAnimation(v.getContext()));
        RelativeLayout.LayoutParams layoutParams=new RelativeLayout.LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL,RelativeLayout.TRUE);
        regionLayout.addView(regionAnim,layoutParams);
      }
    }
    TableLayout folderLayout=(TableLayout)v.findViewById(R.id.folders);
    if (folderLayout.getChildCount() > 0)     folderLayout.removeViews(0,folderLayout.getChildCount());
    if (position < collectionGames.size()) {
      if (o.getCollections().size() == 0) {
        Log.w(TAG,o.getRFGID() + "String_Node_Str");
        Cursor cursor=db.rawQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str",new String[]{Long.toString(o.getId())});
        startManagingCursor(cursor);
        List<Collection> collections=new ArrayList<Collection>();
        while (cursor.moveToNext()) {
          Folder newFolder=new Folder(cursor.getString(0));
          newFolder.setForSale(cursor.getInt(2) == 1);
          newFolder.setPrivate(cursor.getInt(1) == 1);
          Collection newCollection=new Collection();
          newCollection.setGameQuantity(cursor.getInt(3));
          newCollection.setBoxQuantity(cursor.getInt(4));
          newCollection.setManualQuantity(cursor.getInt(5));
          newCollection.setFolder(newFolder);
          collections.add(newCollection);
        }
        o.setCollections(collections);
      }
      for (int i=0; i < o.getCollections().size(); i++) {
        TableRow folderRow=new TableRow(v.getContext());
        folderRow.setLayoutParams(new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT));
        ImageView folderImage=new ImageView(v.getContext());
        if (o.getCollections().get(i).getFolder().isForSale())         folderImage.setImageResource(R.drawable.folder_for_sale);
 else         if (o.getCollections().get(i).getFolder().isPrivate())         folderImage.setImageResource(R.drawable.folder_private);
 else         folderImage.setImageResource(R.drawable.folder);
        LayoutParams folderImageLayout=new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        folderImageLayout.setMargins(0,0,paddingUnit,0);
        folderImageLayout.gravity=Gravity.CENTER_VERTICAL;
        folderImage.setLayoutParams(folderImageLayout);
        folderRow.addView(folderImage);
        TextView folderName=new TextView(v.getContext());
        folderName.setText(o.getCollections().get(i).getFolder().getName());
        folderName.setTextColor(getResources().getColor(R.drawable.text));
        LayoutParams folderNameLayout=new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        folderNameLayout.gravity=Gravity.CENTER_VERTICAL;
        folderName.setLayoutParams(folderNameLayout);
        folderRow.addView(folderName);
        TextView folderQty=new TextView(v.getContext());
        folderQty.setText(Html.fromHtml("String_Node_Str" + Integer.toHexString(getResources().getColor(R.drawable.qty)).substring(2) + "String_Node_Str"+ "String_Node_Str"+ o.getCollections().get(i).getGameQuantity()+ "String_Node_Str"+ Integer.toHexString(getResources().getColor(R.drawable.box)).substring(2)+ "String_Node_Str"+ "String_Node_Str"+ o.getCollections().get(i).getBoxQuantity()+ "String_Node_Str"+ Integer.toHexString(getResources().getColor(R.drawable.man)).substring(2)+ "String_Node_Str"+ "String_Node_Str"+ o.getCollections().get(i).getManualQuantity()+ "String_Node_Str"));
        folderQty.setTextColor(getResources().getColor(R.drawable.text));
        LayoutParams folderQtyLayout=new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        folderQtyLayout.setMargins(0,0,paddingUnit * 2,0);
        folderQtyLayout.gravity=Gravity.CENTER_VERTICAL;
        folderQty.setLayoutParams(folderQtyLayout);
        folderRow.addView(folderQty);
        folderLayout.addView(folderRow);
      }
    }
  }
 else {
    v=super.getView(position,convertView,parent);
  }
  if (position % 2 == 0) {
    v.setBackgroundResource(R.drawable.alterselector1);
  }
 else {
    v.setBackgroundResource(R.drawable.alterselector2);
  }
  return v;
}

Fixed version (ground truth):
@Override public View getView(int position,View convertView,ViewGroup parent){
  View v=convertView;
  if (v == null) {
    LayoutInflater vi=(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    v=vi.inflate(R.layout.gamerow,null);
  }
  Game o=null;
  if (position < gameList.size())   o=gameList.get(position);
  if (o != null) {
    TextView console=(TextView)v.findViewById(R.id.console);
    if (console != null) {
      if (o.getConsoleAbbv().length() > 0)       console.setText(o.getConsoleAbbv());
 else {
        Log.w(TAG,o.getRFGID() + "String_Node_Str");
        Cursor cursor=db.query("String_Node_Str",new String[]{"String_Node_Str"},_ID + "String_Node_Str",new String[]{Integer.toString(o.getConsoleId())},null,null,null);
        startManagingCursor(cursor);
        while (cursor.moveToNext()) {
          o.setConsoleAbbv(cursor.getString(0));
          console.setText(cursor.getString(0));
        }
      }
    }
    TextView title=(TextView)v.findViewById(R.id.title);
    if (title != null) {
      Matcher matcher=variantRegex.matcher(o.getTitle());
      if (matcher.find()) {
        String variationTitle=matcher.group().substring(2,matcher.group().length() - 1);
        String mainTitle=o.getTitle().substring(0,o.getTitle().length() - variationTitle.length() - 3);
        title.setText(Html.fromHtml("String_Node_Str" + mainTitle + "String_Node_Str"+ Integer.toHexString(getResources().getColor(R.drawable.textlight)).substring(2)+ "String_Node_Str"+ variationTitle+ "String_Node_Str"));
      }
 else {
        title.setText(Html.fromHtml("String_Node_Str" + o.getTitle() + "String_Node_Str"));
      }
    }
    TextView publisher=(TextView)v.findViewById(R.id.publisher);
    if (publisher != null) {
      if (o.getType().equals("String_Node_Str"))       publisher.setText(o.getPublisher());
 else       publisher.setText("String_Node_Str" + o.getType() + "String_Node_Str"+ o.getPublisher());
      if (o.getYear() > 0 && !o.getPublisher().equals("String_Node_Str"))       publisher.setText(publisher.getText() + "String_Node_Str" + o.getYear());
 else       if (o.getYear() > 0)       publisher.setText(publisher.getText() + "String_Node_Str" + o.getYear());
    }
    RelativeLayout regionLayout=(RelativeLayout)v.findViewById(R.id.regionLayout);
    if (regionLayout != null) {
      if (regionLayout.getChildCount() > 0)       regionLayout.removeViews(0,regionLayout.getChildCount());
      if (!o.getRegion().contains("String_Node_Str") && !o.getRegion().contains("String_Node_Str")) {
        ImageView region=new ImageView(v.getContext());
        region.setImageDrawable(o.getRegionDrawable(v.getContext()));
        RelativeLayout.LayoutParams layoutParams=new RelativeLayout.LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL,RelativeLayout.TRUE);
        regionLayout.addView(region,layoutParams);
      }
 else {
        AnimatedImageView regionAnim=new AnimatedImageView(v.getContext());
        regionAnim.setImageDrawable(o.getRegionAnimation(v.getContext()));
        RelativeLayout.LayoutParams layoutParams=new RelativeLayout.LayoutParams((int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,21,getResources().getDisplayMetrics()),(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,15,getResources().getDisplayMetrics()));
        layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL,RelativeLayout.TRUE);
        regionLayout.addView(regionAnim,layoutParams);
      }
    }
    TableLayout folderLayout=(TableLayout)v.findViewById(R.id.folders);
    if (folderLayout.getChildCount() > 0)     folderLayout.removeViews(0,folderLayout.getChildCount());
    if (position < collectionGames.size()) {
      if (o.getCollections().size() == 0) {
        Log.w(TAG,o.getRFGID() + "String_Node_Str");
        Cursor cursor=db.rawQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str",new String[]{Long.toString(o.getId())});
        startManagingCursor(cursor);
        List<Collection> collections=new ArrayList<Collection>();
        while (cursor.moveToNext()) {
          Folder newFolder=new Folder(cursor.getString(0));
          newFolder.setForSale(cursor.getInt(2) == 1);
          newFolder.setPrivate(cursor.getInt(1) == 1);
          Collection newCollection=new Collection();
          newCollection.setGameQuantity(cursor.getInt(3));
          newCollection.setBoxQuantity(cursor.getInt(4));
          newCollection.setManualQuantity(cursor.getInt(5));
          newCollection.setFolder(newFolder);
          collections.add(newCollection);
        }
        o.setCollections(collections);
      }
      for (int i=0; i < o.getCollections().size(); i++) {
        TableRow folderRow=new TableRow(v.getContext());
        folderRow.setLayoutParams(new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT));
        ImageView folderImage=new ImageView(v.getContext());
        if (o.getCollections().get(i).getFolder().isForSale())         folderImage.setImageResource(R.drawable.folder_for_sale);
 else         if (o.getCollections().get(i).getFolder().isPrivate())         folderImage.setImageResource(R.drawable.folder_private);
 else         folderImage.setImageResource(R.drawable.folder);
        LayoutParams folderImageLayout=new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        folderImageLayout.setMargins(0,0,paddingUnit,0);
        folderImageLayout.gravity=Gravity.CENTER_VERTICAL;
        folderImage.setLayoutParams(folderImageLayout);
        folderRow.addView(folderImage);
        TextView folderName=new TextView(v.getContext());
        folderName.setText(o.getCollections().get(i).getFolder().getName());
        folderName.setTextColor(getResources().getColor(R.drawable.text));
        LayoutParams folderNameLayout=new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        folderNameLayout.gravity=Gravity.CENTER_VERTICAL;
        folderName.setLayoutParams(folderNameLayout);
        folderRow.addView(folderName);
        TextView folderQty=new TextView(v.getContext());
        folderQty.setText(Html.fromHtml("String_Node_Str" + Integer.toHexString(getResources().getColor(R.drawable.qty)).substring(2) + "String_Node_Str"+ "String_Node_Str"+ o.getCollections().get(i).getGameQuantity()+ "String_Node_Str"+ Integer.toHexString(getResources().getColor(R.drawable.box)).substring(2)+ "String_Node_Str"+ "String_Node_Str"+ o.getCollections().get(i).getBoxQuantity()+ "String_Node_Str"+ Integer.toHexString(getResources().getColor(R.drawable.man)).substring(2)+ "String_Node_Str"+ "String_Node_Str"+ o.getCollections().get(i).getManualQuantity()+ "String_Node_Str"));
        folderQty.setTextColor(getResources().getColor(R.drawable.text));
        LayoutParams folderQtyLayout=new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        folderQtyLayout.setMargins(0,0,paddingUnit * 2,0);
        folderQtyLayout.gravity=Gravity.CENTER_VERTICAL;
        folderQty.setLayoutParams(folderQtyLayout);
        folderRow.addView(folderQty);
        folderLayout.addView(folderRow);
      }
    }
  }
 else {
    v=super.getView(position,convertView,parent);
  }
  if (position % 2 == 0) {
    v.setBackgroundResource(R.drawable.alterselector1);
  }
 else {
    v.setBackgroundResource(R.drawable.alterselector2);
  }
  return v;
}