Program: 142115
Project: 142115
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.hierarchy_layout);
  addActionBarBackArrow();
  mStartIndex=FormEntryActivity.mFormController.getFormIndex();
  setTitle(Localization.get("String_Node_Str"));
  mPath=(TextView)findViewById(R.id.pathtext);
  jumpPreviousButton=(Button)findViewById(R.id.jumpPreviousButton);
  jumpPreviousButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      goUpLevel();
    }
  }
);
  Button jumpBeginningButton=(Button)findViewById(R.id.jumpBeginningButton);
  jumpBeginningButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      FormEntryActivity.mFormController.jumpToIndex(FormIndex.createBeginningOfFormIndex());
      setResult(RESULT_OK);
      finish();
    }
  }
);
  Button jumpEndButton=(Button)findViewById(R.id.jumpEndButton);
  jumpEndButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      FormEntryActivity.mFormController.jumpToIndex(FormIndex.createEndOfFormIndex());
      setResult(RESULT_OK);
      finish();
    }
  }
);
  getListView().post(new Runnable(){
    @Override public void run(){
      int position=0;
      ListAdapter adapter=getListAdapter();
      if (adapter != null) {
        for (int i=0; i < adapter.getCount(); i++) {
          HierarchyElement he=(HierarchyElement)getListAdapter().getItem(i);
          if (mStartIndex.equals(he.getFormIndex())) {
            position=i;
            break;
          }
        }
        getListView().setSelection(position);
      }
    }
  }
);
  refreshView();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.hierarchy_layout);
  addActionBarBackArrow();
  setTitle(Localization.get("String_Node_Str"));
  mPath=(TextView)findViewById(R.id.pathtext);
  jumpPreviousButton=(Button)findViewById(R.id.jumpPreviousButton);
  jumpPreviousButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      goUpLevel();
    }
  }
);
  Button jumpBeginningButton=(Button)findViewById(R.id.jumpBeginningButton);
  jumpBeginningButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      FormEntryActivity.mFormController.jumpToIndex(FormIndex.createBeginningOfFormIndex());
      setResult(RESULT_OK);
      finish();
    }
  }
);
  Button jumpEndButton=(Button)findViewById(R.id.jumpEndButton);
  jumpEndButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      FormEntryActivity.mFormController.jumpToIndex(FormIndex.createEndOfFormIndex());
      setResult(RESULT_OK);
      finish();
    }
  }
);
  final FormIndex mStartIndex=FormEntryActivity.mFormController.getFormIndex();
  getListView().post(new Runnable(){
    @Override public void run(){
      int position=0;
      ListAdapter adapter=getListAdapter();
      if (adapter != null) {
        for (int i=0; i < adapter.getCount(); i++) {
          HierarchyElement he=(HierarchyElement)getListAdapter().getItem(i);
          if (mStartIndex.equals(he.getFormIndex())) {
            position=i;
            break;
          }
        }
        getListView().setSelection(position);
      }
    }
  }
);
  refreshView();
}