Program: 34251
Project: 34251
Buggy source:
/** 
 * Adds some default entries to the address book, adds a welcome message to the inbox, generates a new Bitmessage address for the user, and starts the BackgroundService for the first time.
 */
private void runFirstLaunchRoutine(){
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
  SharedPreferences.Editor editor=prefs.edit();
  editor.putBoolean(INBOX_FIRST_RUN,false);
  editor.commit();
  AddressBookRecord addressBookEntry0=new AddressBookRecord();
  addressBookEntry0.setLabel(ADDRESS_BOOK_ENTRY_0_LABEL);
  addressBookEntry0.setAddress(ADDRESS_BOOK_ENTRY_0_ADDRESS);
  AddressBookRecord addressBookEntry1=new AddressBookRecord();
  addressBookEntry1.setLabel(ADDRESS_BOOK_ENTRY_1_LABEL);
  addressBookEntry1.setAddress(ADDRESS_BOOK_ENTRY_1_ADDRESS);
  AddressBookRecordProvider addBookProv=AddressBookRecordProvider.get(this);
  addBookProv.addAddressBookRecord(addressBookEntry0);
  addBookProv.addAddressBookRecord(addressBookEntry1);
  Message welcomeMessage=new Message();
  welcomeMessage.setBelongsToMe(false);
  welcomeMessage.setToAddress(WELCOME_MESSAGE_TO_ADDRESS);
  welcomeMessage.setFromAddress(WELCOME_MESSAGE_FROM_ADDRESS);
  welcomeMessage.setSubject(WELCOME_MESSAGE_SUBJECT);
  welcomeMessage.setBody(WELCOME_MESSAGE_BODY);
  welcomeMessage.setTime(System.currentTimeMillis() / 1000);
  MessageProvider msgProv=MessageProvider.get(getApplicationContext());
  long msg0Id=msgProv.addMessage(welcomeMessage);
  welcomeMessage.setId(msg0Id);
  mMessages=new ArrayList<Message>();
  mMessages.add(welcomeMessage);
  try {
    Log.i(TAG,"String_Node_Str");
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str" + "String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Adds some default entries to the address book, adds a welcome message to the inbox, generates a new Bitmessage address for the user, and starts the BackgroundService for the first time.
 */
private void runFirstLaunchRoutine(){
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
  SharedPreferences.Editor editor=prefs.edit();
  editor.putBoolean(INBOX_FIRST_RUN,false);
  editor.commit();
  AddressBookRecord addressBookEntry0=new AddressBookRecord();
  addressBookEntry0.setLabel(ADDRESS_BOOK_ENTRY_0_LABEL);
  addressBookEntry0.setAddress(ADDRESS_BOOK_ENTRY_0_ADDRESS);
  AddressBookRecord addressBookEntry1=new AddressBookRecord();
  addressBookEntry1.setLabel(ADDRESS_BOOK_ENTRY_1_LABEL);
  addressBookEntry1.setAddress(ADDRESS_BOOK_ENTRY_1_ADDRESS);
  AddressBookRecordProvider addBookProv=AddressBookRecordProvider.get(this);
  addBookProv.addAddressBookRecord(addressBookEntry0);
  addBookProv.addAddressBookRecord(addressBookEntry1);
  Message welcomeMessage=new Message();
  welcomeMessage.setBelongsToMe(false);
  welcomeMessage.setToAddress(WELCOME_MESSAGE_TO_ADDRESS);
  welcomeMessage.setFromAddress(WELCOME_MESSAGE_FROM_ADDRESS);
  welcomeMessage.setSubject(WELCOME_MESSAGE_SUBJECT);
  welcomeMessage.setBody(WELCOME_MESSAGE_BODY);
  welcomeMessage.setTime(System.currentTimeMillis() / 1000);
  MessageProvider msgProv=MessageProvider.get(getApplicationContext());
  long msg0Id=msgProv.addMessage(welcomeMessage);
  welcomeMessage.setId(msg0Id);
  mMessages=new ArrayList<Message>();
  mMessages.add(welcomeMessage);
  try {
    AddressGenerator addGen=new AddressGenerator();
    Address firstAddress=addGen.generateAndSaveNewAddress();
    firstAddress.setLabel(FIRST_ADDRESS_LABEL);
    AddressProvider addProv=AddressProvider.get(getApplicationContext());
    addProv.updateAddress(firstAddress);
    long currentTime=System.currentTimeMillis() / 1000;
    editor.putLong(LAST_MSG_CHECK_TIME,currentTime);
    editor.commit();
    Log.i(TAG,"String_Node_Str" + currentTime);
    editor.putLong(LAST_PROCESSED_MSG_TIME,currentTime);
    editor.commit();
    Log.i(TAG,"String_Node_Str" + currentTime);
    Intent intent=new Intent(getBaseContext(),BackgroundService.class);
    intent.putExtra(BackgroundService.UI_REQUEST,BackgroundService.UI_REQUEST_CREATE_IDENTITY);
    intent.putExtra(BackgroundService.ADDRESS_ID,firstAddress.getId());
    startService(intent);
    Log.i(TAG,"String_Node_Str");
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str" + "String_Node_Str" + e.getMessage());
  }
}