Program: 187339
Project: 187339
Buggy source:
/** 
 * Called when the activity is first created. 
 */
@Override protected void onCreate(final Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  ((TelephonyManager)this.getSystemService(TELEPHONY_SERVICE)).listen(this.pSL,PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
  MessageService.mNotificationManager=(NotificationManager)this.getSystemService(NOTIFICATION_SERVICE);
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(this);
  getEULA();
  messageSender.startThread(getApplicationContext());
  DBAccessor dba=new DBAccessor(this);
  SMSUtility.user=dba.getUserRow();
  if (SMSUtility.user == null) {
    Log.v("String_Node_Str","String_Node_Str");
    SMSUtility.user=new User();
    dba.setUser(SMSUtility.user);
  }
  Log.v("String_Node_Str",new String(SMSUtility.user.getPublicKey()));
  Log.v("String_Node_Str",new String(SMSUtility.user.getPrivateKey()));
  if (this.getIntent().hasExtra(MessageService.multipleNotificationIntent)) {
    this.getIntent().removeExtra(MessageService.multipleNotificationIntent);
  }
  if (this.getIntent().hasExtra(MessageService.notificationIntent)) {
    final Intent intent=new Intent(this,SendMessageActivity.class);
    intent.putExtra(ConversationView.MESSAGE_INTENT,ConversationView.MESSAGE_VIEW);
    intent.putExtra(selectedNumberIntent,this.getIntent().getStringExtra(MessageService.notificationIntent));
    this.getIntent().removeExtra(MessageService.notificationIntent);
    this.startActivity(intent);
  }
  ConversationView.messageViewActive=false;
  this.setContentView(R.layout.main);
  MessageReceiver.myActivityStarted=true;
  list=(ListView)this.findViewById(R.id.conversation_list);
  emptyList=(ListView)this.findViewById(R.id.empty);
  update=false;
  runThread=new ConversationLoader(this,update,handler);
  list.setOnItemClickListener(new OnItemClickListener(){
    public void onItemClick(    final AdapterView<?> parent,    final View view,    final int position,    final long id){
      final Intent intent=new Intent(ConversationView.this.getBaseContext(),SendMessageActivity.class);
      intent.putExtra(ConversationView.MESSAGE_INTENT,ConversationView.MESSAGE_VIEW);
      intent.putExtra(ConversationView.selectedNumberIntent,msgList.get(position)[0]);
      ConversationView.this.startActivity(intent);
    }
  }
);
  emptyList.setOnItemClickListener(new OnItemClickListener(){
    public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
switch (position) {
case ADD_CONTACT:
        AddContact.addContact=true;
      AddContact.editTc=null;
    ConversationView.this.startActivity(new Intent(ConversationView.this.getBaseContext(),AddContact.class));
  break;
case IMPORT_CONTACT:
ConversationView.this.startActivity(new Intent(ConversationView.this.getBaseContext(),ImportContacts.class));
break;
}
}
}
);
if (!(Walkthrough.hasShown(Step.INTRO,this) && Walkthrough.hasShown(Step.START_IMPORT,this))) {
Walkthrough.show(Step.INTRO,this);
Walkthrough.show(Step.START_IMPORT,this);
}
 else if (!Walkthrough.hasShown(Step.START_EXCHANGE,this)) {
Walkthrough.show(Step.START_EXCHANGE,this);
}
if ((!Walkthrough.hasShown(Step.SUCCESS,this)) && dba.anyTrusted()) {
Walkthrough.show(Step.SUCCESS,this);
Walkthrough.show(Step.CLOSE,this);
}
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created. 
 */
@Override protected void onCreate(final Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  ((TelephonyManager)this.getSystemService(TELEPHONY_SERVICE)).listen(this.pSL,PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
  MessageService.mNotificationManager=(NotificationManager)this.getSystemService(NOTIFICATION_SERVICE);
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(this);
  getEULA();
  messageSender.startThread(getApplicationContext());
  DBAccessor dba=new DBAccessor(this);
  SMSUtility.user=dba.getUserRow();
  if (SMSUtility.user == null) {
    Log.v("String_Node_Str","String_Node_Str");
    SMSUtility.user=new User();
    dba.setUser(SMSUtility.user);
  }
  Log.v("String_Node_Str",new String(SMSUtility.user.getPublicKey()));
  Log.v("String_Node_Str",new String(SMSUtility.user.getPrivateKey()));
  if (this.getIntent().hasExtra(MessageService.multipleNotificationIntent)) {
    this.getIntent().removeExtra(MessageService.multipleNotificationIntent);
  }
  if (this.getIntent().hasExtra(MessageService.notificationIntent)) {
    final Intent intent=new Intent(this,SendMessageActivity.class);
    intent.putExtra(ConversationView.MESSAGE_INTENT,ConversationView.MESSAGE_VIEW);
    intent.putExtra(selectedNumberIntent,this.getIntent().getStringExtra(MessageService.notificationIntent));
    this.getIntent().removeExtra(MessageService.notificationIntent);
    this.startActivity(intent);
  }
  ConversationView.messageViewActive=false;
  this.setContentView(R.layout.main);
  MessageReceiver.myActivityStarted=true;
  list=(ListView)this.findViewById(R.id.conversation_list);
  emptyList=(ListView)this.findViewById(R.id.empty);
  update=false;
  runThread=new ConversationLoader(this,update,handler);
  list.setOnItemClickListener(new OnItemClickListener(){
    public void onItemClick(    final AdapterView<?> parent,    final View view,    final int position,    final long id){
      final Intent intent=new Intent(ConversationView.this.getBaseContext(),SendMessageActivity.class);
      intent.putExtra(ConversationView.MESSAGE_INTENT,ConversationView.MESSAGE_VIEW);
      intent.putExtra(ConversationView.selectedNumberIntent,msgList.get(position)[0]);
      ConversationView.this.startActivity(intent);
    }
  }
);
  emptyList.setOnItemClickListener(new OnItemClickListener(){
    public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
switch (position) {
case ADD_CONTACT:
        AddContact.addContact=true;
      AddContact.editTc=null;
    ConversationView.this.startActivity(new Intent(ConversationView.this.getBaseContext(),AddContact.class));
  break;
case IMPORT_CONTACT:
ConversationView.this.startActivity(new Intent(ConversationView.this.getBaseContext(),ImportContacts.class));
break;
}
}
}
);
}