Program: 184911
Project: 184911
Buggy source:
@Override public void onCreate(){
  if (Config.LOGV)   Log.v(LOG_TAG,"String_Node_Str");
  ContentResolver resolver=getContentResolver();
  if (phone == null) {
    PhoneFactory.makeDefaultPhones(this);
    phone=PhoneFactory.getDefaultPhone();
    NotificationMgr.init(this);
    phoneMgr=new PhoneInterfaceManager(this,phone);
    if (getSystemService(Context.BLUETOOTH_SERVICE) != null) {
      mBtHandsfree=new BluetoothHandsfree(this,phone);
      startService(new Intent(this,BluetoothHeadsetService.class));
    }
 else {
      mBtHandsfree=null;
    }
    ringer=new Ringer(phone);
    SoundEffect.init();
    PowerManager pm=(PowerManager)getSystemService(Context.POWER_SERVICE);
    mWakeLock=pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP | PowerManager.ON_AFTER_RELEASE,LOG_TAG);
    mPartialWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK | PowerManager.ON_AFTER_RELEASE,LOG_TAG);
    mKeyguardManager=(KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE);
    mKeyguardLock=mKeyguardManager.newKeyguardLock(LOG_TAG);
    mPowerManagerService=IPowerManager.Stub.asInterface(ServiceManager.getService("String_Node_Str"));
    notifier=new CallNotifier(this,phone,ringer,mBtHandsfree);
    IccCard sim=phone.getIccCard();
    if (sim != null) {
      if (Config.LOGV)       Log.v(LOG_TAG,"String_Node_Str");
      sim.registerForAbsent(mHandler,EVENT_SIM_ABSENT,null);
      sim.registerForLocked(mHandler,EVENT_SIM_LOCKED,null);
      sim.registerForNetworkLocked(mHandler,EVENT_SIM_NETWORK_LOCKED,null);
    }
    phone.registerForMmiComplete(mHandler,MMI_COMPLETE,null);
    PhoneUtils.initializeConnectionHandler(phone);
    IntentFilter intentFilter=new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED);
    intentFilter.addAction(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION);
    intentFilter.addAction(BluetoothIntent.HEADSET_AUDIO_STATE_CHANGED_ACTION);
    intentFilter.addAction(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED);
    intentFilter.addAction(Intent.ACTION_HEADSET_PLUG);
    intentFilter.addAction(Intent.ACTION_BATTERY_LOW);
    intentFilter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
    intentFilter.addAction(TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED);
    registerReceiver(mReceiver,intentFilter);
    IntentFilter mediaButtonIntentFilter=new IntentFilter(Intent.ACTION_MEDIA_BUTTON);
    mediaButtonIntentFilter.setPriority(1);
    registerReceiver(mMediaButtonReceiver,mediaButtonIntentFilter);
    PreferenceManager.setDefaultValues(this,R.xml.network_setting,false);
    PreferenceManager.setDefaultValues(this,R.xml.call_feature_setting,false);
switch (phone.getState()) {
case IDLE:
      if (DBG)       Log.d(LOG_TAG,"String_Node_Str");
    PhoneUtils.setAudioControlState(PhoneUtils.AUDIO_IDLE);
  PhoneUtils.setAudioMode(this,AudioManager.MODE_NORMAL);
break;
case RINGING:
if (DBG) Log.d(LOG_TAG,"String_Node_Str");
PhoneUtils.setAudioControlState(PhoneUtils.AUDIO_RINGING);
PhoneUtils.setAudioMode(this,AudioManager.MODE_RINGTONE);
break;
case OFFHOOK:
if (DBG) Log.d(LOG_TAG,"String_Node_Str");
PhoneUtils.setAudioControlState(PhoneUtils.AUDIO_OFFHOOK);
PhoneUtils.setAudioMode(this,AudioManager.MODE_IN_CALL);
break;
}
}
resolver.getType(Uri.parse("String_Node_Str"));
mShouldRestoreMuteOnInCallResume=false;
}

Fixed version (ground truth):
@Override public void onCreate(){
  if (Config.LOGV)   Log.v(LOG_TAG,"String_Node_Str");
  ContentResolver resolver=getContentResolver();
  if (phone == null) {
    PhoneFactory.makeDefaultPhones(this);
    phone=PhoneFactory.getDefaultPhone();
    NotificationMgr.init(this);
    phoneMgr=new PhoneInterfaceManager(this,phone);
    if (getSystemService(Context.BLUETOOTH_SERVICE) != null) {
      mBtHandsfree=new BluetoothHandsfree(this,phone);
      startService(new Intent(this,BluetoothHeadsetService.class));
    }
 else {
      mBtHandsfree=null;
    }
    ringer=new Ringer(phone);
    PowerManager pm=(PowerManager)getSystemService(Context.POWER_SERVICE);
    mWakeLock=pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP | PowerManager.ON_AFTER_RELEASE,LOG_TAG);
    mPartialWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK | PowerManager.ON_AFTER_RELEASE,LOG_TAG);
    mKeyguardManager=(KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE);
    mKeyguardLock=mKeyguardManager.newKeyguardLock(LOG_TAG);
    mPowerManagerService=IPowerManager.Stub.asInterface(ServiceManager.getService("String_Node_Str"));
    notifier=new CallNotifier(this,phone,ringer,mBtHandsfree);
    IccCard sim=phone.getIccCard();
    if (sim != null) {
      if (Config.LOGV)       Log.v(LOG_TAG,"String_Node_Str");
      sim.registerForAbsent(mHandler,EVENT_SIM_ABSENT,null);
      sim.registerForLocked(mHandler,EVENT_SIM_LOCKED,null);
      sim.registerForNetworkLocked(mHandler,EVENT_SIM_NETWORK_LOCKED,null);
    }
    phone.registerForMmiComplete(mHandler,MMI_COMPLETE,null);
    PhoneUtils.initializeConnectionHandler(phone);
    IntentFilter intentFilter=new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED);
    intentFilter.addAction(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION);
    intentFilter.addAction(BluetoothIntent.HEADSET_AUDIO_STATE_CHANGED_ACTION);
    intentFilter.addAction(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED);
    intentFilter.addAction(Intent.ACTION_HEADSET_PLUG);
    intentFilter.addAction(Intent.ACTION_BATTERY_LOW);
    intentFilter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
    intentFilter.addAction(TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED);
    registerReceiver(mReceiver,intentFilter);
    IntentFilter mediaButtonIntentFilter=new IntentFilter(Intent.ACTION_MEDIA_BUTTON);
    mediaButtonIntentFilter.setPriority(1);
    registerReceiver(mMediaButtonReceiver,mediaButtonIntentFilter);
    PreferenceManager.setDefaultValues(this,R.xml.network_setting,false);
    PreferenceManager.setDefaultValues(this,R.xml.call_feature_setting,false);
switch (phone.getState()) {
case IDLE:
      if (DBG)       Log.d(LOG_TAG,"String_Node_Str");
    PhoneUtils.setAudioControlState(PhoneUtils.AUDIO_IDLE);
  PhoneUtils.setAudioMode(this,AudioManager.MODE_NORMAL);
break;
case RINGING:
if (DBG) Log.d(LOG_TAG,"String_Node_Str");
PhoneUtils.setAudioControlState(PhoneUtils.AUDIO_RINGING);
PhoneUtils.setAudioMode(this,AudioManager.MODE_RINGTONE);
break;
case OFFHOOK:
if (DBG) Log.d(LOG_TAG,"String_Node_Str");
PhoneUtils.setAudioControlState(PhoneUtils.AUDIO_OFFHOOK);
PhoneUtils.setAudioMode(this,AudioManager.MODE_IN_CALL);
break;
}
}
resolver.getType(Uri.parse("String_Node_Str"));
mShouldRestoreMuteOnInCallResume=false;
}