Program: 43683
Project: 43683
Buggy source:
@Override public void handleMessage(Message msg){
  try {
    if (msg.what == MESSAGE_LOCATION_CHANGED) {
synchronized (mLock) {
        Location location=(Location)msg.obj;
        if (mCollector != null && LocationManager.GPS_PROVIDER.equals(location.getProvider())) {
          try {
            mCollector.updateLocation(location);
          }
 catch (          RemoteException e) {
            Log.w(TAG,"String_Node_Str");
          }
        }
        String provider=location.getProvider();
        if (!isAllowedBySettingsLocked(provider)) {
          return;
        }
        if (mWakeLockAcquireTime != 0) {
          handleLocationChangedLocked(location);
        }
        if ((mWakeLockAcquireTime != 0) && (SystemClock.elapsedRealtime() - mWakeLockAcquireTime > MAX_TIME_FOR_WAKE_LOCK)) {
          removeMessages(MESSAGE_RELEASE_WAKE_LOCK);
          log("String_Node_Str");
          Message m=Message.obtain(this,MESSAGE_RELEASE_WAKE_LOCK);
          sendMessageAtFrontOfQueue(m);
        }
 else         if (mWakeLockAcquireTime != 0 && mWakeLockGpsReceived && mWakeLockNetworkReceived) {
          removeMessages(MESSAGE_RELEASE_WAKE_LOCK);
          log("String_Node_Str");
          mWakeLockAcquireTime=0;
          Message m=Message.obtain(this,MESSAGE_RELEASE_WAKE_LOCK);
          sendMessageDelayed(m,TIME_AFTER_WAKE_LOCK);
        }
      }
    }
 else     if (msg.what == MESSAGE_RELEASE_WAKE_LOCK) {
      log("String_Node_Str");
synchronized (mLock) {
        updateWakelockStatusLocked();
        releaseWakeLockLocked();
      }
    }
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void handleMessage(Message msg){
  try {
    if (msg.what == MESSAGE_LOCATION_CHANGED) {
synchronized (mLock) {
        Location location=(Location)msg.obj;
        if (mCollector != null && LocationManager.GPS_PROVIDER.equals(location.getProvider())) {
          try {
            mCollector.updateLocation(location);
          }
 catch (          RemoteException e) {
            Log.w(TAG,"String_Node_Str");
          }
        }
        String provider=location.getProvider();
        if (!isAllowedBySettingsLocked(provider)) {
          return;
        }
        handleLocationChangedLocked(location);
        if ((mWakeLockAcquireTime != 0) && (SystemClock.elapsedRealtime() - mWakeLockAcquireTime > MAX_TIME_FOR_WAKE_LOCK)) {
          removeMessages(MESSAGE_RELEASE_WAKE_LOCK);
          log("String_Node_Str");
          Message m=Message.obtain(this,MESSAGE_RELEASE_WAKE_LOCK);
          sendMessageAtFrontOfQueue(m);
        }
 else         if (mWakeLockAcquireTime != 0 && mWakeLockGpsReceived && mWakeLockNetworkReceived) {
          removeMessages(MESSAGE_RELEASE_WAKE_LOCK);
          log("String_Node_Str");
          mWakeLockAcquireTime=0;
          Message m=Message.obtain(this,MESSAGE_RELEASE_WAKE_LOCK);
          sendMessageDelayed(m,TIME_AFTER_WAKE_LOCK);
        }
      }
    }
 else     if (msg.what == MESSAGE_RELEASE_WAKE_LOCK) {
      log("String_Node_Str");
synchronized (mLock) {
        updateWakelockStatusLocked();
        releaseWakeLockLocked();
      }
    }
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}