Program: 54953
Project: 54953
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  this.savedInstanceState=savedInstanceState;
  PreferenceManager.setDefaultValues(this,R.xml.preferences,false);
  preferences=PreferenceManager.getDefaultSharedPreferences(this);
  String extStorage=Environment.getExternalStorageDirectory().getAbsolutePath();
  String defaultFile=getString(R.string.pref_filesource_file_default);
  if (preferences.getString(getString(R.string.pref_filesource_file),"String_Node_Str").equals(defaultFile))   preferences.edit().putString(getString(R.string.pref_filesource_file),extStorage + "String_Node_Str" + defaultFile).apply();
  defaultFile=getString(R.string.pref_logfile_default);
  if (preferences.getString(getString(R.string.pref_logfile),"String_Node_Str").equals(defaultFile))   preferences.edit().putString(getString(R.string.pref_logfile),extStorage + "String_Node_Str" + defaultFile).apply();
  if (preferences.getBoolean(getString(R.string.pref_logging),false)) {
    try {
      File logfile=new File(preferences.getString(getString(R.string.pref_logfile),"String_Node_Str"));
      logfile.getParentFile().mkdir();
      logcat=Runtime.getRuntime().exec("String_Node_Str" + logfile);
      Log.i("String_Node_Str","String_Node_Str" + logcat.toString() + "String_Node_Str"+ logfile);
    }
 catch (    Exception e) {
      Log.e("String_Node_Str","String_Node_Str");
    }
  }
  fl_analyzerFrame=(FrameLayout)findViewById(R.id.fl_analyzerFrame);
  analyzerSurface=new AnalyzerSurface(this,this);
  analyzerSurface.setVerticalScrollEnabled(preferences.getBoolean(getString(R.string.pref_scrollDB),true));
  analyzerSurface.setVerticalZoomEnabled(preferences.getBoolean(getString(R.string.pref_zoomDB),true));
  analyzerSurface.setDecoupledAxis(preferences.getBoolean(getString(R.string.pref_decoupledAxis),false));
  analyzerSurface.setDisplayRelativeFrequencies(preferences.getBoolean(getString(R.string.pref_relativeFrequencies),false));
  analyzerSurface.setWaterfallColorMapType(Integer.valueOf(preferences.getString(getString(R.string.pref_colorMapType),"String_Node_Str")));
  analyzerSurface.setFftDrawingType(Integer.valueOf(preferences.getString(getString(R.string.pref_fftDrawingType),"String_Node_Str")));
  analyzerSurface.setFftRatio(Float.valueOf(preferences.getString(getString(R.string.pref_spectrumWaterfallRatio),"String_Node_Str")));
  analyzerSurface.setFontSize(Integer.valueOf(preferences.getString(getString(R.string.pref_fontSize),"String_Node_Str")));
  analyzerSurface.setShowDebugInformation(preferences.getBoolean(getString(R.string.pref_showDebugInformation),false));
  fl_analyzerFrame.addView(analyzerSurface);
  if (savedInstanceState != null) {
    running=savedInstanceState.getBoolean(getString(R.string.save_state_running));
    demodulationMode=savedInstanceState.getInt(getString(R.string.save_state_demodulatorMode));
    if (running && Integer.valueOf(preferences.getString(getString(R.string.pref_sourceType),"String_Node_Str")) == RTLSDR_SOURCE && !preferences.getBoolean(getString(R.string.pref_rtlsdr_externalServer),false)) {
      running=false;
      Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      Thread timer=new Thread(){
        @Override public void run(){
          try {
            Thread.sleep(1500);
            startAnalyzer();
          }
 catch (          InterruptedException e) {
            Log.e(LOGTAG,"String_Node_Str");
          }
        }
      }
;
      timer.start();
    }
  }
 else {
    running=preferences.getBoolean((getString(R.string.pref_autostart)),false);
  }
  setVolumeControlStream(AudioManager.STREAM_MUSIC);
  getActionBar().setDisplayShowTitleEnabled(false);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  this.savedInstanceState=savedInstanceState;
  PreferenceManager.setDefaultValues(this,R.xml.preferences,false);
  preferences=PreferenceManager.getDefaultSharedPreferences(this);
  String extStorage=Environment.getExternalStorageDirectory().getAbsolutePath();
  String defaultFile=getString(R.string.pref_filesource_file_default);
  if (preferences.getString(getString(R.string.pref_filesource_file),"String_Node_Str").equals(defaultFile))   preferences.edit().putString(getString(R.string.pref_filesource_file),extStorage + "String_Node_Str" + defaultFile).apply();
  defaultFile=getString(R.string.pref_logfile_default);
  if (preferences.getString(getString(R.string.pref_logfile),"String_Node_Str").equals(defaultFile))   preferences.edit().putString(getString(R.string.pref_logfile),extStorage + "String_Node_Str" + defaultFile).apply();
  if (preferences.getBoolean(getString(R.string.pref_logging),false)) {
    try {
      File logfile=new File(preferences.getString(getString(R.string.pref_logfile),"String_Node_Str"));
      logfile.getParentFile().mkdir();
      logcat=Runtime.getRuntime().exec("String_Node_Str" + logfile);
      Log.i("String_Node_Str","String_Node_Str" + logcat.toString() + "String_Node_Str"+ logfile);
    }
 catch (    Exception e) {
      Log.e("String_Node_Str","String_Node_Str");
    }
  }
  fl_analyzerFrame=(FrameLayout)findViewById(R.id.fl_analyzerFrame);
  analyzerSurface=new AnalyzerSurface(this,this);
  analyzerSurface.setVerticalScrollEnabled(preferences.getBoolean(getString(R.string.pref_scrollDB),true));
  analyzerSurface.setVerticalZoomEnabled(preferences.getBoolean(getString(R.string.pref_zoomDB),true));
  analyzerSurface.setDecoupledAxis(preferences.getBoolean(getString(R.string.pref_decoupledAxis),false));
  analyzerSurface.setDisplayRelativeFrequencies(preferences.getBoolean(getString(R.string.pref_relativeFrequencies),false));
  analyzerSurface.setWaterfallColorMapType(Integer.valueOf(preferences.getString(getString(R.string.pref_colorMapType),"String_Node_Str")));
  analyzerSurface.setFftDrawingType(Integer.valueOf(preferences.getString(getString(R.string.pref_fftDrawingType),"String_Node_Str")));
  analyzerSurface.setFftRatio(Float.valueOf(preferences.getString(getString(R.string.pref_spectrumWaterfallRatio),"String_Node_Str")));
  analyzerSurface.setFontSize(Integer.valueOf(preferences.getString(getString(R.string.pref_fontSize),"String_Node_Str")));
  analyzerSurface.setShowDebugInformation(preferences.getBoolean(getString(R.string.pref_showDebugInformation),false));
  fl_analyzerFrame.addView(analyzerSurface);
  if (savedInstanceState != null) {
    running=savedInstanceState.getBoolean(getString(R.string.save_state_running));
    demodulationMode=savedInstanceState.getInt(getString(R.string.save_state_demodulatorMode));
    if (running && Integer.valueOf(preferences.getString(getString(R.string.pref_sourceType),"String_Node_Str")) == RTLSDR_SOURCE && !preferences.getBoolean(getString(R.string.pref_rtlsdr_externalServer),false)) {
      running=false;
      Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      Thread timer=new Thread(){
        @Override public void run(){
          try {
            Thread.sleep(1500);
            startAnalyzer();
          }
 catch (          InterruptedException e) {
            Log.e(LOGTAG,"String_Node_Str");
          }
        }
      }
;
      timer.start();
    }
  }
 else {
    running=preferences.getBoolean((getString(R.string.pref_autostart)),false);
  }
  setVolumeControlStream(AudioManager.STREAM_MUSIC);
}