Program: 187924
Project: 187924
Buggy source:
/** 
 * Called when the activity is first created.
 */
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  setContentView(R.layout.shopping);
  Shopping.mContentResolver=getContentResolver();
  mGTalkSender=new GTalkSender(this);
  mUpdateInterval=2000;
  mUpdating=false;
  mListUri=Shopping.Lists.CONTENT_URI;
  mItemUri=Shopping.Items.CONTENT_URI;
  int defaultShoppingList=(int)Shopping.getDefaultList();
  final Intent intent=getIntent();
  final String type=intent.resolveType(this);
  final String action=intent.getAction();
  if (action.equals(Intent.MAIN_ACTION)) {
    mState=STATE_MAIN;
    mListUri=Uri.withAppendedPath(Shopping.Lists.CONTENT_URI,"String_Node_Str" + defaultShoppingList);
    intent.setData(mListUri);
  }
 else   if (action.equals(Intent.VIEW_ACTION)) {
    mState=STATE_VIEW_LIST;
    if (Shopping.ITEM_TYPE.equals(type)) {
      mListUri=Shopping.getListForItem(intent.getData().getLastPathSegment());
    }
 else {
      mListUri=intent.getData();
    }
  }
 else   if (action.equals(Intent.PICK_ACTION)) {
    mState=STATE_PICK_ITEM;
    mListUri=Uri.withAppendedPath(Shopping.Lists.CONTENT_URI,"String_Node_Str" + defaultShoppingList);
  }
 else   if (action.equals(Intent.GET_CONTENT_ACTION)) {
    mState=STATE_GET_CONTENT_ITEM;
    mListUri=Uri.withAppendedPath(Shopping.Lists.CONTENT_URI,"String_Node_Str" + defaultShoppingList);
  }
 else {
    Log.e(TAG,"String_Node_Str");
    finish();
    return;
  }
  mTypefaceHandwriting=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  mTypefaceDigital=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  mTypeface=null;
  mTypeface=mTypefaceHandwriting;
  createView();
  setListTheme(1);
  fillListFilter();
  int selectList;
  try {
    selectList=Integer.parseInt(mListUri.getLastPathSegment());
  }
 catch (  NumberFormatException e) {
    selectList=defaultShoppingList;
  }
  setSelectedListId(selectList);
  fillItems();
  setListTheme(loadListTheme());
  bindGTalkIfNeeded();
  if (icicle != null) {
    String prevText=icicle.getString(ORIGINAL_ITEM);
    if (prevText != null) {
      mEditText.setText(prevText);
    }
  }
  mEditText.requestFocus();
  mIntentReceiver=new ListIntentReceiver();
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created.
 */
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  Log.i(TAG,"String_Node_Str");
  setContentView(R.layout.shopping);
  Shopping.mContentResolver=getContentResolver();
  mGTalkSender=new GTalkSender(this);
  mUpdateInterval=2000;
  mUpdating=false;
  mListUri=Shopping.Lists.CONTENT_URI;
  mItemUri=Shopping.Items.CONTENT_URI;
  int defaultShoppingList=(int)Shopping.getDefaultList();
  final Intent intent=getIntent();
  final String type=intent.resolveType(this);
  final String action=intent.getAction();
  if (action.equals(Intent.MAIN_ACTION)) {
    mState=STATE_MAIN;
    mListUri=Uri.withAppendedPath(Shopping.Lists.CONTENT_URI,"String_Node_Str" + defaultShoppingList);
    intent.setData(mListUri);
  }
 else   if (action.equals(Intent.VIEW_ACTION)) {
    mState=STATE_VIEW_LIST;
    if (Shopping.ITEM_TYPE.equals(type)) {
      mListUri=Shopping.getListForItem(intent.getData().getLastPathSegment());
    }
 else {
      mListUri=intent.getData();
    }
  }
 else   if (action.equals(Intent.PICK_ACTION)) {
    mState=STATE_PICK_ITEM;
    mListUri=Uri.withAppendedPath(Shopping.Lists.CONTENT_URI,"String_Node_Str" + defaultShoppingList);
  }
 else   if (action.equals(Intent.GET_CONTENT_ACTION)) {
    mState=STATE_GET_CONTENT_ITEM;
    mListUri=Uri.withAppendedPath(Shopping.Lists.CONTENT_URI,"String_Node_Str" + defaultShoppingList);
  }
 else {
    Log.e(TAG,"String_Node_Str");
    finish();
    return;
  }
  mTypefaceHandwriting=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  mTypefaceDigital=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  mTypeface=null;
  mTypeface=mTypefaceHandwriting;
  createView();
  setListTheme(1);
  fillListFilter();
  int selectList;
  try {
    selectList=Integer.parseInt(mListUri.getLastPathSegment());
  }
 catch (  NumberFormatException e) {
    selectList=defaultShoppingList;
  }
  setSelectedListId(selectList);
  fillItems();
  setListTheme(loadListTheme());
  bindGTalkIfNeeded();
  if (icicle != null) {
    String prevText=icicle.getString(ORIGINAL_ITEM);
    if (prevText != null) {
      mEditText.setText(prevText);
    }
  }
  mEditText.requestFocus();
  mIntentReceiver=new ListIntentReceiver();
}