Program: 187368
Project: 187368
Buggy source:
/** 
 * Called when the activity is first created. 
 */
@Override protected void onCreate(final Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  this.setContentView(R.layout.contact);
  this.extendableList=(ExpandableListView)this.findViewById(R.id.contacts_list);
  this.listView=(ListView)this.findViewById(R.id.empty_list);
  this.exchangeKeys=(Button)this.findViewById(R.id.exchange_keys);
  this.extendableList.setOnItemLongClickListener(new OnItemLongClickListener(){
    public boolean onItemLongClick(    AdapterView<?> parent,    View view,    int position,    long id){
      AddContact.addContact=false;
      AddContact.editTc=ManageContactsActivity.this.tc.get(position);
      ManageContactsActivity.this.startActivity(new Intent(ManageContactsActivity.this,AddContact.class));
      return true;
    }
  }
);
  this.listView.setOnItemClickListener(new OnItemClickListener(){
    public void onItemClick(    final AdapterView<?> parent,    final View view,    final int position,    final long id){
      AddContact.addContact=true;
      AddContact.editTc=null;
      ManageContactsActivity.this.startActivity(new Intent(ManageContactsActivity.this.getBaseContext(),AddContact.class));
    }
  }
);
  this.extendableList.setOnChildClickListener(new OnChildClickListener(){
    public boolean onChildClick(    final ExpandableListView parent,    final View v,    final int groupPosition,    final int childPosition,    final long id){
      final CheckedTextView checked_text=(CheckedTextView)v.findViewById(R.id.trust_name);
      adapter.getContacts().get(groupPosition).getNumber(childPosition).toggle();
      checked_text.setChecked(adapter.getContacts().get(groupPosition).getNumber(childPosition).isSelected());
      return true;
    }
  }
);
  this.exchangeKeys.setOnClickListener(new OnClickListener(){
    public void onClick(    final View v){
      ExchangeKey.keyDialog=ProgressDialog.show(ManageContactsActivity.this,"String_Node_Str","String_Node_Str",true,false);
      keyThread.startThread(ManageContactsActivity.this,adapter.getContacts());
      ExchangeKey.keyDialog.setOnDismissListener(new OnDismissListener(){
        public void onDismiss(        final DialogInterface dialog){
          ManageContactsActivity.this.startThread();
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created. 
 */
@Override protected void onCreate(final Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  this.setContentView(R.layout.contact);
  this.extendableList=(ExpandableListView)this.findViewById(R.id.contacts_list);
  this.listView=(ListView)this.findViewById(R.id.empty_list);
  this.exchangeKeys=(Button)this.findViewById(R.id.exchange_keys);
  this.extendableList.setOnItemLongClickListener(new OnItemLongClickListener(){
    public boolean onItemLongClick(    AdapterView<?> parent,    View view,    int position,    long id){
      Toast.makeText(getBaseContext(),"String_Node_Str" + String.valueOf(position),Toast.LENGTH_SHORT).show();
      Toast.makeText(getBaseContext(),"String_Node_Str" + String.valueOf(id),Toast.LENGTH_SHORT).show();
      return true;
    }
  }
);
  this.listView.setOnItemClickListener(new OnItemClickListener(){
    public void onItemClick(    final AdapterView<?> parent,    final View view,    final int position,    final long id){
      AddContact.addContact=true;
      AddContact.editTc=null;
      ManageContactsActivity.this.startActivity(new Intent(ManageContactsActivity.this.getBaseContext(),AddContact.class));
    }
  }
);
  this.extendableList.setOnChildClickListener(new OnChildClickListener(){
    public boolean onChildClick(    final ExpandableListView parent,    final View v,    final int groupPosition,    final int childPosition,    final long id){
      final CheckedTextView checked_text=(CheckedTextView)v.findViewById(R.id.trust_name);
      adapter.getContacts().get(groupPosition).getNumber(childPosition).toggle();
      checked_text.setChecked(adapter.getContacts().get(groupPosition).getNumber(childPosition).isSelected());
      return true;
    }
  }
);
  this.exchangeKeys.setOnClickListener(new OnClickListener(){
    public void onClick(    final View v){
      ExchangeKey.keyDialog=ProgressDialog.show(ManageContactsActivity.this,"String_Node_Str","String_Node_Str",true,false);
      keyThread.startThread(ManageContactsActivity.this,adapter.getContacts());
      ExchangeKey.keyDialog.setOnDismissListener(new OnDismissListener(){
        public void onDismiss(        final DialogInterface dialog){
          ManageContactsActivity.this.startThread();
        }
      }
);
    }
  }
);
}