Program: 8361
Project: 8361
Buggy source:
/** 
 * Executed when service is started by intent
 */
@Override public int onStartCommand(Intent intent,int flags,int startId){
  Log.d(Constants.TAG,"String_Node_Str");
  registerReceiver();
  if (intent != null && intent.getAction() != null) {
    if (ACTION_PASSPHRASE_CACHE_ADD.equals(intent.getAction())) {
      long ttl=intent.getLongExtra(EXTRA_TTL,DEFAULT_TTL);
      long keyId=intent.getLongExtra(EXTRA_KEY_ID,-1);
      String passphrase=intent.getStringExtra(EXTRA_PASSPHRASE);
      String primaryUserID=intent.getStringExtra(EXTRA_USERID);
      Log.d(Constants.TAG,"String_Node_Str" + keyId + "String_Node_Str"+ ttl+ "String_Node_Str"+ primaryUserID);
      mPassphraseCache.put(keyId,new CachedPassphrase(passphrase,primaryUserID));
      if (ttl > 0) {
        long triggerTime=new Date().getTime() + (ttl * 1000);
        AlarmManager am=(AlarmManager)this.getSystemService(Context.ALARM_SERVICE);
        am.set(AlarmManager.RTC_WAKEUP,triggerTime,buildIntent(this,keyId));
      }
      updateNotifications();
    }
 else     if (ACTION_PASSPHRASE_CACHE_GET.equals(intent.getAction())) {
      long keyId=intent.getLongExtra(EXTRA_KEY_ID,-1);
      Messenger messenger=intent.getParcelableExtra(EXTRA_MESSENGER);
      String passphrase=getCachedPassphraseImpl(keyId);
      Message msg=Message.obtain();
      Bundle bundle=new Bundle();
      bundle.putString(EXTRA_PASSPHRASE,passphrase);
      msg.obj=bundle;
      try {
        messenger.send(msg);
      }
 catch (      RemoteException e) {
        Log.e(Constants.TAG,"String_Node_Str",e);
      }
    }
 else     if (ACTION_PASSPHRASE_CACHE_PURGE.equals(intent.getAction())) {
      AlarmManager am=(AlarmManager)this.getSystemService(Context.ALARM_SERVICE);
      for (int i=0; i < mPassphraseCache.size(); i++) {
        am.cancel(buildIntent(this,mPassphraseCache.keyAt(i)));
      }
      mPassphraseCache.clear();
      updateNotifications();
    }
 else {
      Log.e(Constants.TAG,"String_Node_Str");
    }
  }
  return START_STICKY;
}

Fixed version (ground truth):
/** 
 * Executed when service is started by intent
 */
@Override public int onStartCommand(Intent intent,int flags,int startId){
  Log.d(Constants.TAG,"String_Node_Str");
  registerReceiver();
  if (intent != null && intent.getAction() != null) {
    if (ACTION_PASSPHRASE_CACHE_ADD.equals(intent.getAction())) {
      long ttl=intent.getLongExtra(EXTRA_TTL,DEFAULT_TTL);
      long keyId=intent.getLongExtra(EXTRA_KEY_ID,-1);
      String passphrase=intent.getStringExtra(EXTRA_PASSPHRASE);
      String primaryUserID=intent.getStringExtra(EXTRA_USERID);
      Log.d(Constants.TAG,"String_Node_Str" + keyId + "String_Node_Str"+ ttl+ "String_Node_Str"+ primaryUserID);
      mPassphraseCache.put(keyId,new CachedPassphrase(passphrase,primaryUserID));
      if (ttl > 0) {
        long triggerTime=new Date().getTime() + (ttl * 1000);
        AlarmManager am=(AlarmManager)this.getSystemService(Context.ALARM_SERVICE);
        am.set(AlarmManager.RTC_WAKEUP,triggerTime,buildIntent(this,keyId));
      }
      updateNotifications();
    }
 else     if (ACTION_PASSPHRASE_CACHE_GET.equals(intent.getAction())) {
      long keyId=intent.getLongExtra(EXTRA_KEY_ID,-1);
      Messenger messenger=intent.getParcelableExtra(EXTRA_MESSENGER);
      String passphrase=getCachedPassphraseImpl(keyId);
      Message msg=Message.obtain();
      Bundle bundle=new Bundle();
      bundle.putString(EXTRA_PASSPHRASE,passphrase);
      msg.obj=bundle;
      try {
        messenger.send(msg);
      }
 catch (      RemoteException e) {
        Log.e(Constants.TAG,"String_Node_Str",e);
      }
    }
 else     if (ACTION_PASSPHRASE_CACHE_CLEAR.equals(intent.getAction())) {
      AlarmManager am=(AlarmManager)this.getSystemService(Context.ALARM_SERVICE);
      for (int i=0; i < mPassphraseCache.size(); i++) {
        am.cancel(buildIntent(this,mPassphraseCache.keyAt(i)));
      }
      mPassphraseCache.clear();
      updateNotifications();
    }
 else {
      Log.e(Constants.TAG,"String_Node_Str");
    }
  }
  return START_STICKY;
}