Source:
<code>public View getView(int position, View convertView, ViewGroup parent) { if (DEBUG) { <START> Log_OC.d(String.format("getView: %s, reused: %s", position, convertView == null)); <END> } int numHeadersAndPlaceholders = getHeadersCount() * mNumColumns; if (position < numHeadersAndPlaceholders) { View headerViewContainer = mHeaderViewInfos .get(position / mNumColumns).viewContainer; if (position % mNumColumns == 0) { return headerViewContainer; } else { if (convertView == null) { convertView = new View(parent.getContext()); } convertView.setVisibility(View.INVISIBLE); convertView.setMinimumHeight(headerViewContainer.getHeight()); return convertView; } } final int adjPosition = position - numHeadersAndPlaceholders; int adapterCount = 0; if (mAdapter != null) { adapterCount = getAdapterAndPlaceHolderCount(); if (adjPosition < adapterCount) { if (adjPosition < mAdapter.getCount()) { return mAdapter.getView(adjPosition, convertView, parent); } else { if (convertView == null) { convertView = new View(parent.getContext()); } convertView.setVisibility(View.INVISIBLE); convertView.setMinimumHeight(mRowHeight); return convertView; } } } final int footerPosition = adjPosition - adapterCount; if (footerPosition < getCount()) { View footViewContainer = mFooterViewInfos .get(footerPosition / mNumColumns).viewContainer; if (position % mNumColumns == 0) { return footViewContainer; } else { if (convertView == null) { convertView = new View(parent.getContext()); } convertView.setVisibility(View.INVISIBLE); convertView.setMinimumHeight(footViewContainer.getHeight()); return convertView; } } throw new ArrayIndexOutOfBoundsException(position); }</code><technical_language>This complete logging is pointless public static boolean DEBUG = false; **never** switched on. Simply dead code ! title is "_Cleanup project_", I vote for remove this DEBUG **and** logging</technical_language>

Target:
public View getView(int position, View convertView, ViewGroup parent) { int numHeadersAndPlaceholders = getHeadersCount() * mNumColumns; if (position < numHeadersAndPlaceholders) { View headerViewContainer = mHeaderViewInfos .get(position / mNumColumns).viewContainer; if (position % mNumColumns == 0) { return headerViewContainer; } else { if (convertView == null) { convertView = new View(parent.getContext()); } convertView.setVisibility(View.INVISIBLE); convertView.setMinimumHeight(headerViewContainer.getHeight()); return convertView; } } final int adjPosition = position - numHeadersAndPlaceholders; int adapterCount = 0; if (mAdapter != null) { adapterCount = getAdapterAndPlaceHolderCount(); if (adjPosition < adapterCount) { if (adjPosition < mAdapter.getCount()) { return mAdapter.getView(adjPosition, convertView, parent); } else { if (convertView == null) { convertView = new View(parent.getContext()); } convertView.setVisibility(View.INVISIBLE); convertView.setMinimumHeight(mRowHeight); return convertView; } } } final int footerPosition = adjPosition - adapterCount; if (footerPosition < getCount()) { View footViewContainer = mFooterViewInfos .get(footerPosition / mNumColumns).viewContainer; if (position % mNumColumns == 0) { return footViewContainer; } else { if (convertView == null) { convertView = new View(parent.getContext()); } convertView.setVisibility(View.INVISIBLE); convertView.setMinimumHeight(footViewContainer.getHeight()); return convertView; } } throw new ArrayIndexOutOfBoundsException(position); }