Program: 98406
Project: 98406
Buggy source:
private void setlist(ENSAdapter a){
  setListAdapter(a);
  ListView lv=getListView();
  lv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener(){
    public boolean onItemLongClick(    AdapterView<?> av,    View v,    int position,    long id){
      if (position >= offset) {
        ENSPopUp Menu=new ENSPopUp(con,ENSArray.get(position).getVon().getUsername(),ENSArray.get(position).getVon().getId(),ENSArray.get(position).getENS_id(),ENSArray.get(position).getBetreff(),typ,1);
        Menu.PopUp();
      }
      return true;
    }
  }
);
  lv.setOnItemClickListener(new OnItemClickListener(){
    public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      String i="String_Node_Str";
      i=ENSArray.get(position).getENS_id();
      if (ENSArray.get(position).getTyp() == 99) {
        Bundle bundle=new Bundle();
        bundle.putString("String_Node_Str",i);
        Intent newIntent=new Intent(getApplicationContext(),ENS.class);
        newIntent.putExtras(bundle);
        startActivity(newIntent);
      }
 else {
        i=ENSArray.get(position).getENS_id();
        Bundle bundle=new Bundle();
        bundle.putString("String_Node_Str",i);
        ENSsql SQL=new ENSsql(con);
        SQL.open();
        ENSObject t=SQL.getSingleENS(i);
        Log.i("String_Node_Str",t.getText() + "String_Node_Str");
        if (t != null && t.getText().equalsIgnoreCase("String_Node_Str") == false)         bundle.putBoolean("String_Node_Str",true);
        Intent newIntent=new Intent(getApplicationContext(),ENSSingle.class);
        newIntent.putExtras(bundle);
        SQL.close();
        startActivity(newIntent);
      }
    }
  }
);
  lv.setOnScrollListener(new OnScrollListener(){
    public void onScroll(    AbsListView view,    int firstVisibleItem,    int visibleItemCount,    int totalItemCount){
      if (view.getAdapter() != null && ((firstVisibleItem + visibleItemCount) >= totalItemCount) && totalItemCount != mPrevTotalItemCount) {
        mPrevTotalItemCount=totalItemCount;
        if (!error)         refresh();
      }
    }
    public void onScrollStateChanged(    AbsListView view,    int scrollState){
    }
  }
);
}

Fixed version (ground truth):
private void setlist(ENSAdapter a){
  setListAdapter(a);
  ListView lv=getListView();
  lv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener(){
    public boolean onItemLongClick(    AdapterView<?> av,    View v,    int position,    long id){
      if (position >= offset) {
        ENSPopUp Menu=new ENSPopUp(con,ENSArray.get(position).getVon().getUsername(),ENSArray.get(position).getVon().getId(),ENSArray.get(position).getENS_id(),ENSArray.get(position).getBetreff(),typ,2);
        Menu.PopUp();
      }
      return true;
    }
  }
);
  lv.setOnItemClickListener(new OnItemClickListener(){
    public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      String i="String_Node_Str";
      i=ENSArray.get(position).getENS_id();
      if (ENSArray.get(position).getTyp() == 99) {
        Bundle bundle=new Bundle();
        bundle.putString("String_Node_Str",i);
        Intent newIntent=new Intent(getApplicationContext(),ENSAusgang.class);
        newIntent.putExtras(bundle);
        startActivity(newIntent);
      }
 else {
        i=ENSArray.get(position).getENS_id();
        Bundle bundle=new Bundle();
        bundle.putString("String_Node_Str",i);
        Intent newIntent=new Intent(getApplicationContext(),ENSSingle.class);
        newIntent.putExtras(bundle);
        startActivity(newIntent);
      }
    }
  }
);
  lv.setOnScrollListener(new OnScrollListener(){
    public void onScroll(    AbsListView view,    int firstVisibleItem,    int visibleItemCount,    int totalItemCount){
      if (view.getAdapter() != null && ((firstVisibleItem + visibleItemCount) >= totalItemCount) && totalItemCount != mPrevTotalItemCount) {
        mPrevTotalItemCount=totalItemCount;
        if (!error)         refresh();
      }
    }
    public void onScrollStateChanged(    AbsListView view,    int scrollState){
    }
  }
);
}