Program: 86334
Project: 86334
Buggy source:
protected void reservationStart(){
  AccountDataSource data=new AccountDataSource(this);
  data.open();
  final List<Account> accounts=data.getAccountsWithPassword(app.getLibrary().getIdent());
  data.close();
  if (accounts.size() == 0) {
    dialog_no_user();
    return;
  }
 else   if (accounts.size() > 1) {
    AlertDialog.Builder builder=new AlertDialog.Builder(this);
    LayoutInflater inflater=getLayoutInflater();
    View view=inflater.inflate(R.layout.simple_list_dialog,null);
    ListView lv=(ListView)view.findViewById(R.id.lvBibs);
    AccountListAdapter adapter=new AccountListAdapter(this,accounts);
    lv.setAdapter(adapter);
    lv.setOnItemClickListener(new OnItemClickListener(){
      @Override public void onItemClick(      AdapterView<?> parent,      View view,      int position,      long id){
        if (accounts.get(position).getId() != app.getAccount().getId() || account_switched) {
          app.setAccount(accounts.get(position).getId());
          new RestoreSessionTask().execute();
        }
 else {
          reservationDo();
        }
        adialog.dismiss();
      }
    }
);
    builder.setTitle(R.string.account_select).setView(view).setNegativeButton(R.string.cancel,new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int id){
        adialog.cancel();
      }
    }
).setNeutralButton(R.string.accounts_edit,new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int id){
        adialog.dismiss();
        Intent intent=new Intent(SearchResultDetailsActivity.this,AccountListActivity.class);
        startActivity(intent);
      }
    }
);
    adialog=builder.create();
    adialog.show();
  }
 else {
    reservationDo();
  }
}

Fixed version (ground truth):
protected void reservationStart(){
  AccountDataSource data=new AccountDataSource(this);
  data.open();
  final List<Account> accounts=data.getAccountsWithPassword(app.getLibrary().getIdent());
  data.close();
  if (accounts.size() == 0) {
    dialog_no_user();
    return;
  }
 else   if (accounts.size() > 1) {
    AlertDialog.Builder builder=new AlertDialog.Builder(this);
    LayoutInflater inflater=getLayoutInflater();
    View view=inflater.inflate(R.layout.simple_list_dialog,null);
    ListView lv=(ListView)view.findViewById(R.id.lvBibs);
    AccountListAdapter adapter=new AccountListAdapter(this,accounts);
    lv.setAdapter(adapter);
    lv.setOnItemClickListener(new OnItemClickListener(){
      @Override public void onItemClick(      AdapterView<?> parent,      View view,      int position,      long id){
        if (accounts.get(position).getId() != app.getAccount().getId() || account_switched) {
          app.setAccount(accounts.get(position).getId());
          dialog=ProgressDialog.show(SearchResultDetailsActivity.this,"String_Node_Str",getString(R.string.doing_res),true);
          dialog.show();
          new RestoreSessionTask().execute();
        }
 else {
          reservationDo();
        }
        adialog.dismiss();
      }
    }
);
    builder.setTitle(R.string.account_select).setView(view).setNegativeButton(R.string.cancel,new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int id){
        adialog.cancel();
      }
    }
).setNeutralButton(R.string.accounts_edit,new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int id){
        adialog.dismiss();
        Intent intent=new Intent(SearchResultDetailsActivity.this,AccountListActivity.class);
        startActivity(intent);
      }
    }
);
    adialog=builder.create();
    adialog.show();
  }
 else {
    reservationDo();
  }
}