Program: 162669
Project: 162669
Buggy source:
@SuppressLint("String_Node_Str") protected void scanLeDevice(final Boolean enable){
  mScanCyclerStarted=true;
  if (getBluetoothAdapter() == null) {
    LogManager.e(TAG,"String_Node_Str");
  }
  if (enable) {
    if (deferScanIfNeeded()) {
      return;
    }
    LogManager.d(TAG,"String_Node_Str");
    if (!mScanning || mScanningPaused || mRestartNeeded) {
      mScanning=true;
      mScanningPaused=false;
      try {
        if (getBluetoothAdapter() != null) {
          if (getBluetoothAdapter().isEnabled()) {
            if (mBluetoothCrashResolver != null && mBluetoothCrashResolver.isRecoveryInProgress()) {
              LogManager.w(TAG,"String_Node_Str");
            }
 else {
              if (mScanningEnabled) {
                if (mRestartNeeded) {
                  mRestartNeeded=false;
                  LogManager.d(TAG,"String_Node_Str");
                }
 else {
                  LogManager.d(TAG,"String_Node_Str");
                }
                try {
                  startScan();
                }
 catch (                Exception e) {
                  LogManager.e(e,TAG,"String_Node_Str");
                }
              }
 else {
                LogManager.d(TAG,"String_Node_Str");
              }
            }
            mLastScanCycleStartTime=new Date().getTime();
          }
 else {
            LogManager.d(TAG,"String_Node_Str");
          }
        }
      }
 catch (      Exception e) {
        LogManager.e(e,TAG,"String_Node_Str");
      }
    }
 else {
      LogManager.d(TAG,"String_Node_Str");
    }
    mScanCycleStopTime=(new Date().getTime() + mScanPeriod);
    scheduleScanCycleStop();
    LogManager.d(TAG,"String_Node_Str");
  }
 else {
    LogManager.d(TAG,"String_Node_Str");
    mScanning=false;
    stopScan();
    mLastScanCycleEndTime=new Date().getTime();
  }
}

Fixed version (ground truth):
@SuppressLint("String_Node_Str") protected void scanLeDevice(final Boolean enable){
  mScanCyclerStarted=true;
  if (getBluetoothAdapter() == null) {
    LogManager.e(TAG,"String_Node_Str");
  }
  if (enable) {
    if (deferScanIfNeeded()) {
      return;
    }
    LogManager.d(TAG,"String_Node_Str");
    if (!mScanning || mScanningPaused || mRestartNeeded) {
      mScanning=true;
      mScanningPaused=false;
      try {
        if (getBluetoothAdapter() != null) {
          if (getBluetoothAdapter().isEnabled()) {
            if (mBluetoothCrashResolver != null && mBluetoothCrashResolver.isRecoveryInProgress()) {
              LogManager.w(TAG,"String_Node_Str");
            }
 else {
              if (mScanningEnabled) {
                if (mRestartNeeded) {
                  mRestartNeeded=false;
                  LogManager.d(TAG,"String_Node_Str");
                }
 else {
                  LogManager.d(TAG,"String_Node_Str");
                }
                try {
                  startScan();
                }
 catch (                Exception e) {
                  LogManager.e(e,TAG,"String_Node_Str");
                }
              }
 else {
                LogManager.d(TAG,"String_Node_Str");
              }
            }
            mLastScanCycleStartTime=new Date().getTime();
          }
 else {
            LogManager.d(TAG,"String_Node_Str");
          }
        }
      }
 catch (      Exception e) {
        LogManager.e(e,TAG,"String_Node_Str");
      }
    }
 else {
      LogManager.d(TAG,"String_Node_Str");
    }
    mScanCycleStopTime=(new Date().getTime() + mScanPeriod);
    scheduleScanCycleStop();
    LogManager.d(TAG,"String_Node_Str");
  }
 else {
    LogManager.d(TAG,"String_Node_Str");
    mScanning=false;
    mScanCyclerStarted=false;
    stopScan();
    mLastScanCycleEndTime=new Date().getTime();
  }
}