Program: 187892
Project: 187892
Buggy source:
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  setContentView(R.layout.filelist);
  getListView().setOnCreateContextMenuListener(this);
  getListView().setEmptyView(findViewById(R.id.empty));
  mDirectoryButtons=(LinearLayout)findViewById(R.id.directory_buttons);
  mEditFilename=(EditText)findViewById(R.id.filename);
  mButtonPick=(Button)findViewById(R.id.button_pick);
  mButtonPick.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View arg0){
      pickFile();
    }
  }
);
  mDirectoryInput=null;
  getMimeTypes();
  getSdCardPath();
  mState=STATE_BROWSE;
  Intent intent=getIntent();
  String action=intent.getAction();
  File browseto=new File("String_Node_Str");
  if (!TextUtils.isEmpty(mSdCardPath)) {
    browseto=new File(mSdCardPath);
  }
  if (action != null && action.equals(FileManagerIntents.ACTION_PICK_FILE)) {
    mState=STATE_PICK;
    File file=FileUtils.getFile(intent.getData());
    if (file != null) {
      browseto=FileUtils.getPathWithoutFilename(file);
      mEditFilename.setText(file.getName());
    }
 else {
    }
    String title=intent.getStringExtra(FileManagerIntents.EXTRA_TITLE);
    if (title != null) {
      setTitle(title);
    }
    String buttontext=intent.getStringExtra(FileManagerIntents.EXTRA_BUTTON_TEXT);
    if (buttontext != null) {
      mButtonPick.setText(buttontext);
    }
  }
 else {
    mState=STATE_BROWSE;
    mEditFilename.setVisibility(View.GONE);
    mButtonPick.setVisibility(View.GONE);
  }
  if (icicle != null) {
    browseto=new File(icicle.getString(BUNDLE_CURRENT_DIRECTORY));
    mContextFile=new File(icicle.getString(BUNDLE_CONTEXT_FILE));
    mContextText=icicle.getString(BUNDLE_CONTEXT_TEXT);
    boolean show=icicle.getBoolean(BUNDLE_SHOW_DIRECTORY_INPUT);
    showDirectoryInput(show);
  }
  browseTo(browseto);
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  setContentView(R.layout.filelist);
  getListView().setOnCreateContextMenuListener(this);
  getListView().setEmptyView(findViewById(R.id.empty));
  mDirectoryButtons=(LinearLayout)findViewById(R.id.directory_buttons);
  mEditFilename=(EditText)findViewById(R.id.filename);
  mButtonPick=(Button)findViewById(R.id.button_pick);
  mButtonPick.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View arg0){
      pickFile();
    }
  }
);
  mDirectoryInput=null;
  getMimeTypes();
  getSdCardPath();
  mState=STATE_BROWSE;
  Intent intent=getIntent();
  String action=intent.getAction();
  File browseto=new File("String_Node_Str");
  if (!TextUtils.isEmpty(mSdCardPath)) {
    browseto=new File(mSdCardPath);
  }
  if (action != null && action.equals(FileManagerIntents.ACTION_PICK_FILE)) {
    mState=STATE_PICK;
    File file=FileUtils.getFile(intent.getData());
    if (file != null) {
      File dir=FileUtils.getPathWithoutFilename(file);
      if (file.isDirectory()) {
        browseto=dir;
      }
      mEditFilename.setText(file.getName());
    }
 else {
    }
    String title=intent.getStringExtra(FileManagerIntents.EXTRA_TITLE);
    if (title != null) {
      setTitle(title);
    }
    String buttontext=intent.getStringExtra(FileManagerIntents.EXTRA_BUTTON_TEXT);
    if (buttontext != null) {
      mButtonPick.setText(buttontext);
    }
  }
 else {
    mState=STATE_BROWSE;
    mEditFilename.setVisibility(View.GONE);
    mButtonPick.setVisibility(View.GONE);
  }
  if (icicle != null) {
    browseto=new File(icicle.getString(BUNDLE_CURRENT_DIRECTORY));
    mContextFile=new File(icicle.getString(BUNDLE_CONTEXT_FILE));
    mContextText=icicle.getString(BUNDLE_CONTEXT_TEXT);
    boolean show=icicle.getBoolean(BUNDLE_SHOW_DIRECTORY_INPUT);
    showDirectoryInput(show);
  }
  browseTo(browseto);
}