Program: 87585
Project: 87585
Buggy source:
@SuppressWarnings("String_Node_Str") private void onStartInputViewInternal(final EditorInfo editorInfo,final boolean restarting){
  super.onStartInputView(editorInfo,restarting);
  final KeyboardSwitcher switcher=mKeyboardSwitcher;
  final MainKeyboardView mainKeyboardView=switcher.getMainKeyboardView();
  final SettingsValues currentSettingsValues=mSettings.getCurrent();
  if (editorInfo == null) {
    Log.e(TAG,"String_Node_Str");
    if (LatinImeLogger.sDBG) {
      throw new NullPointerException("String_Node_Str");
    }
    return;
  }
  if (DEBUG) {
    Log.d(TAG,"String_Node_Str" + String.format("String_Node_Str",editorInfo.inputType,editorInfo.imeOptions));
    Log.d(TAG,"String_Node_Str" + ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS) != 0) + "String_Node_Str"+ ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_SENTENCES) != 0)+ "String_Node_Str"+ ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_WORDS) != 0));
  }
  if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
    final SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(this);
    ResearchLogger.latinIME_onStartInputViewInternal(editorInfo,prefs);
  }
  if (InputAttributes.inPrivateImeOptions(null,NO_MICROPHONE_COMPAT,editorInfo)) {
    Log.w(TAG,"String_Node_Str" + editorInfo.privateImeOptions);
    Log.w(TAG,"String_Node_Str" + getPackageName() + "String_Node_Str"+ NO_MICROPHONE+ "String_Node_Str");
  }
  if (InputAttributes.inPrivateImeOptions(getPackageName(),FORCE_ASCII,editorInfo)) {
    Log.w(TAG,"String_Node_Str" + editorInfo.privateImeOptions);
    Log.w(TAG,"String_Node_Str");
  }
  final PackageInfo packageInfo=TargetPackageInfoGetterTask.getCachedPackageInfo(editorInfo.packageName);
  mAppWorkAroundsUtils.setPackageInfo(packageInfo);
  if (null == packageInfo) {
    new TargetPackageInfoGetterTask(this,this).execute(editorInfo.packageName);
  }
  LatinImeLogger.onStartInputView(editorInfo);
  if (mainKeyboardView == null) {
    return;
  }
  final AccessibilityUtils accessUtils=AccessibilityUtils.getInstance();
  if (accessUtils.isTouchExplorationEnabled()) {
    accessUtils.onStartInputViewInternal(mainKeyboardView,editorInfo,restarting);
  }
  final boolean inputTypeChanged=!currentSettingsValues.isSameInputType(editorInfo);
  final boolean isDifferentTextField=!restarting || inputTypeChanged;
  if (isDifferentTextField) {
    mSubtypeSwitcher.updateParametersOnStartInputView();
  }
  updateFullscreenMode();
  mApplicationSpecifiedCompletions=null;
  mEnteredText=null;
  resetComposingState(true);
  if (isDifferentTextField)   mHandler.postResumeSuggestions();
  mDeleteCount=0;
  mSpaceState=SPACE_STATE_NONE;
  mRecapitalizeStatus.deactivate();
  mCurrentlyPressedHardwareKeys.clear();
  final Locale currentLocale=mSubtypeSwitcher.getCurrentSubtypeLocale();
  if (null != mSuggest && null != currentLocale && !currentLocale.equals(mSuggest.mLocale)) {
    initSuggest();
  }
  if (mSuggestionStripView != null) {
    setPunctuationSuggestions();
  }
  mSuggestedWords=SuggestedWords.EMPTY;
  mConnection.resetCachesUponCursorMove(editorInfo.initialSelStart,false);
  if (isDifferentTextField) {
    mainKeyboardView.closing();
    loadSettings();
    if (mSuggest != null && currentSettingsValues.mCorrectionEnabled) {
      mSuggest.setAutoCorrectionThreshold(currentSettingsValues.mAutoCorrectionThreshold);
    }
    switcher.loadKeyboard(editorInfo,currentSettingsValues);
  }
 else   if (restarting) {
    switcher.resetKeyboardStateToAlphabet();
    switcher.updateShiftState();
  }
  setSuggestionStripShownInternal(isSuggestionsStripVisible(),false);
  mLastSelectionStart=editorInfo.initialSelStart;
  mLastSelectionEnd=editorInfo.initialSelEnd;
  mHandler.cancelUpdateSuggestionStrip();
  mHandler.cancelDoubleSpacePeriodTimer();
  mainKeyboardView.setMainDictionaryAvailability(mIsMainDictionaryAvailable);
  mainKeyboardView.setKeyPreviewPopupEnabled(currentSettingsValues.mKeyPreviewPopupOn,currentSettingsValues.mKeyPreviewPopupDismissDelay);
  mainKeyboardView.setSlidingKeyInputPreviewEnabled(currentSettingsValues.mSlidingKeyInputPreviewEnabled);
  mainKeyboardView.setGestureHandlingEnabledByUser(currentSettingsValues.mGestureInputEnabled);
  mainKeyboardView.setGesturePreviewMode(currentSettingsValues.mGesturePreviewTrailEnabled,currentSettingsValues.mGestureFloatingPreviewTextEnabled);
  if (null != mPositionalInfoForUserDictPendingAddition && mPositionalInfoForUserDictPendingAddition.tryReplaceWithActualWord(mConnection,editorInfo,mLastSelectionEnd,currentLocale)) {
    mPositionalInfoForUserDictPendingAddition=null;
  }
  if (TRACE)   Debug.startMethodTracing("String_Node_Str");
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void onStartInputViewInternal(final EditorInfo editorInfo,final boolean restarting){
  super.onStartInputView(editorInfo,restarting);
  final KeyboardSwitcher switcher=mKeyboardSwitcher;
  final MainKeyboardView mainKeyboardView=switcher.getMainKeyboardView();
  SettingsValues currentSettingsValues=mSettings.getCurrent();
  if (editorInfo == null) {
    Log.e(TAG,"String_Node_Str");
    if (LatinImeLogger.sDBG) {
      throw new NullPointerException("String_Node_Str");
    }
    return;
  }
  if (DEBUG) {
    Log.d(TAG,"String_Node_Str" + String.format("String_Node_Str",editorInfo.inputType,editorInfo.imeOptions));
    Log.d(TAG,"String_Node_Str" + ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS) != 0) + "String_Node_Str"+ ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_SENTENCES) != 0)+ "String_Node_Str"+ ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_WORDS) != 0));
  }
  if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
    final SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(this);
    ResearchLogger.latinIME_onStartInputViewInternal(editorInfo,prefs);
  }
  if (InputAttributes.inPrivateImeOptions(null,NO_MICROPHONE_COMPAT,editorInfo)) {
    Log.w(TAG,"String_Node_Str" + editorInfo.privateImeOptions);
    Log.w(TAG,"String_Node_Str" + getPackageName() + "String_Node_Str"+ NO_MICROPHONE+ "String_Node_Str");
  }
  if (InputAttributes.inPrivateImeOptions(getPackageName(),FORCE_ASCII,editorInfo)) {
    Log.w(TAG,"String_Node_Str" + editorInfo.privateImeOptions);
    Log.w(TAG,"String_Node_Str");
  }
  final PackageInfo packageInfo=TargetPackageInfoGetterTask.getCachedPackageInfo(editorInfo.packageName);
  mAppWorkAroundsUtils.setPackageInfo(packageInfo);
  if (null == packageInfo) {
    new TargetPackageInfoGetterTask(this,this).execute(editorInfo.packageName);
  }
  LatinImeLogger.onStartInputView(editorInfo);
  if (mainKeyboardView == null) {
    return;
  }
  final AccessibilityUtils accessUtils=AccessibilityUtils.getInstance();
  if (accessUtils.isTouchExplorationEnabled()) {
    accessUtils.onStartInputViewInternal(mainKeyboardView,editorInfo,restarting);
  }
  final boolean inputTypeChanged=!currentSettingsValues.isSameInputType(editorInfo);
  final boolean isDifferentTextField=!restarting || inputTypeChanged;
  if (isDifferentTextField) {
    mSubtypeSwitcher.updateParametersOnStartInputView();
  }
  updateFullscreenMode();
  mApplicationSpecifiedCompletions=null;
  mEnteredText=null;
  resetComposingState(true);
  if (isDifferentTextField)   mHandler.postResumeSuggestions();
  mDeleteCount=0;
  mSpaceState=SPACE_STATE_NONE;
  mRecapitalizeStatus.deactivate();
  mCurrentlyPressedHardwareKeys.clear();
  final Locale currentLocale=mSubtypeSwitcher.getCurrentSubtypeLocale();
  if (null != mSuggest && null != currentLocale && !currentLocale.equals(mSuggest.mLocale)) {
    initSuggest();
  }
  if (mSuggestionStripView != null) {
    setPunctuationSuggestions();
  }
  mSuggestedWords=SuggestedWords.EMPTY;
  mConnection.resetCachesUponCursorMove(editorInfo.initialSelStart,false);
  if (isDifferentTextField) {
    mainKeyboardView.closing();
    loadSettings();
    currentSettingsValues=mSettings.getCurrent();
    if (mSuggest != null && currentSettingsValues.mCorrectionEnabled) {
      mSuggest.setAutoCorrectionThreshold(currentSettingsValues.mAutoCorrectionThreshold);
    }
    switcher.loadKeyboard(editorInfo,currentSettingsValues);
  }
 else   if (restarting) {
    switcher.resetKeyboardStateToAlphabet();
    switcher.updateShiftState();
  }
  setSuggestionStripShownInternal(isSuggestionsStripVisible(),false);
  mLastSelectionStart=editorInfo.initialSelStart;
  mLastSelectionEnd=editorInfo.initialSelEnd;
  mHandler.cancelUpdateSuggestionStrip();
  mHandler.cancelDoubleSpacePeriodTimer();
  mainKeyboardView.setMainDictionaryAvailability(mIsMainDictionaryAvailable);
  mainKeyboardView.setKeyPreviewPopupEnabled(currentSettingsValues.mKeyPreviewPopupOn,currentSettingsValues.mKeyPreviewPopupDismissDelay);
  mainKeyboardView.setSlidingKeyInputPreviewEnabled(currentSettingsValues.mSlidingKeyInputPreviewEnabled);
  mainKeyboardView.setGestureHandlingEnabledByUser(currentSettingsValues.mGestureInputEnabled);
  mainKeyboardView.setGesturePreviewMode(currentSettingsValues.mGesturePreviewTrailEnabled,currentSettingsValues.mGestureFloatingPreviewTextEnabled);
  if (null != mPositionalInfoForUserDictPendingAddition && mPositionalInfoForUserDictPendingAddition.tryReplaceWithActualWord(mConnection,editorInfo,mLastSelectionEnd,currentLocale)) {
    mPositionalInfoForUserDictPendingAddition=null;
  }
  if (TRACE)   Debug.startMethodTracing("String_Node_Str");
}