Program: 187433
Project: 187433
Buggy source:
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.add_contact);
  listView=(ListView)findViewById(R.id.contact_numbers);
  addNumber=(Button)findViewById(R.id.add_new_number);
  contactEdit=editTc;
  editTc=null;
  update(null);
  addNumber.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      final EditText input=new EditText(getBaseContext());
      input.setInputType(InputType.TYPE_CLASS_PHONE);
      AlertDialog.Builder builder=new AlertDialog.Builder(AddContact.this);
      builder.setMessage("String_Node_Str").setCancelable(true).setView(input).setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int id){
          String value=input.getText().toString();
          update(value);
          input.setText("String_Node_Str");
        }
      }
).setNegativeButton("String_Node_Str",new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
        }
      }
);
      AlertDialog alert=builder.create();
      alert.show();
    }
  }
);
  listView.setOnItemLongClickListener(new OnItemLongClickListener(){
    public boolean onItemLongClick(    AdapterView<?> parent,    View view,    int position,    long id){
      return true;
    }
  }
);
  listView.setOnItemClickListener(new OnItemClickListener(){
    public void onItemClick(    AdapterView<?> parent,    View view,    final int position,    long id){
      final EditText input=new EditText(getBaseContext());
      input.setText(contactEdit.getNumber(position));
      input.setInputType(InputType.TYPE_CLASS_PHONE);
      AlertDialog.Builder builder=new AlertDialog.Builder(AddContact.this);
      builder.setMessage("String_Node_Str").setCancelable(true).setView(input).setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int id){
          contactEdit.setNumber(position,input.getText().toString());
          update(null);
          input.setText("String_Node_Str");
        }
      }
).setNegativeButton("String_Node_Str",new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
        }
      }
);
      AlertDialog alert=builder.create();
      alert.show();
    }
  }
);
  add=(Button)findViewById(R.id.add);
  contactName=(EditText)findViewById(R.id.contact_name);
  if (contactEdit != null) {
    if (contactEdit.getName() != null) {
      contactName.setText(contactEdit.getName());
    }
  }
  add.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      String name=contactName.getText().toString();
      if (name.length() > 0 && contactEdit.getPrimaryNumber().length() > 0) {
        Prephase2Activity.dba.updateRow(contactEdit,contactEdit.getPrimaryNumber());
        Toast.makeText(getBaseContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
        contactEdit=null;
        finish();
      }
    }
  }
);
}

Fixed version (ground truth):
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.add_contact);
  listView=(ListView)findViewById(R.id.contact_numbers);
  addNumber=(Button)findViewById(R.id.add_new_number);
  contactEdit=editTc;
  editTc=null;
  update(null);
  addNumber.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      final EditText input=new EditText(getBaseContext());
      input.setInputType(InputType.TYPE_CLASS_PHONE);
      AlertDialog.Builder builder=new AlertDialog.Builder(AddContact.this);
      builder.setMessage("String_Node_Str").setCancelable(true).setView(input).setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int id){
          String value=input.getText().toString();
          update(value);
          input.setText("String_Node_Str");
        }
      }
).setNegativeButton("String_Node_Str",new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
        }
      }
);
      AlertDialog alert=builder.create();
      alert.show();
    }
  }
);
  listView.setOnItemLongClickListener(new OnItemLongClickListener(){
    public boolean onItemLongClick(    AdapterView<?> parent,    View view,    int position,    long id){
      return true;
    }
  }
);
  listView.setOnItemClickListener(new OnItemClickListener(){
    public void onItemClick(    AdapterView<?> parent,    View view,    final int position,    long id){
      final EditText input=new EditText(getBaseContext());
      input.setText(contactEdit.getNumber(position));
      input.setInputType(InputType.TYPE_CLASS_PHONE);
      AlertDialog.Builder builder=new AlertDialog.Builder(AddContact.this);
      builder.setMessage("String_Node_Str").setCancelable(true).setView(input).setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int id){
          contactEdit.setNumber(position,input.getText().toString());
          update(null);
          input.setText("String_Node_Str");
        }
      }
).setNegativeButton("String_Node_Str",new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
        }
      }
);
      AlertDialog alert=builder.create();
      alert.show();
    }
  }
);
  add=(Button)findViewById(R.id.add);
  contactName=(EditText)findViewById(R.id.contact_name);
  if (contactEdit != null) {
    if (contactEdit.getName() != null) {
      contactName.setText(contactEdit.getName());
    }
  }
  add.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      String name=contactName.getText().toString();
      if (name.length() > 0 && !contactEdit.isNumbersEmpty()) {
        Prephase2Activity.dba.updateRow(contactEdit,contactEdit.getNumber(0));
        Toast.makeText(getBaseContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
        contactEdit=null;
        finish();
      }
    }
  }
);
}