Program: 55023
Project: 55023
Buggy source:
/** 
 * Will create a IQ Source instance according to the user settings.
 * @return true on success; false on error
 */
public boolean createSource(){
  int sourceType=Integer.valueOf(preferences.getString(getString(R.string.pref_sourceType),"String_Node_Str"));
switch (sourceType) {
case FILE_SOURCE:
    long frequency;
  int sampleRate;
try {
  frequency=Integer.valueOf(preferences.getString(getString(R.string.pref_filesource_frequency),"String_Node_Str"));
  sampleRate=Integer.valueOf(preferences.getString(getString(R.string.pref_filesource_sampleRate),"String_Node_Str"));
}
 catch (NumberFormatException e) {
  this.runOnUiThread(new Runnable(){
    @Override public void run(){
      Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_LONG).show();
    }
  }
);
  return false;
}
String filename=preferences.getString(getString(R.string.pref_filesource_file),"String_Node_Str");
boolean repeat=preferences.getBoolean(getString(R.string.pref_filesource_repeat),false);
source=new FileIQSource(filename,sampleRate,frequency,16384,repeat);
break;
case HACKRF_SOURCE:
source=new HackrfSource();
source.setFrequency(preferences.getLong(getString(R.string.pref_frequency),97000000));
source.setSampleRate(preferences.getInt(getString(R.string.pref_sampleRate),HackrfSource.MAX_SAMPLERATE));
((HackrfSource)source).setVgaRxGain(preferences.getInt(getString(R.string.pref_hackrf_vgaRxGain),HackrfSource.MAX_VGA_RX_GAIN / 2));
((HackrfSource)source).setLnaGain(preferences.getInt(getString(R.string.pref_hackrf_lnaGain),HackrfSource.MAX_LNA_GAIN / 2));
break;
case RTLSDR_SOURCE:
Log.e(LOGTAG,"String_Node_Str");
Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
return false;
default :
Log.e(LOGTAG,"String_Node_Str" + sourceType);
return false;
}
analyzerSurface.setSource(source);
if (savedInstanceState != null) {
analyzerSurface.setVirtualFrequency(savedInstanceState.getLong(getString(R.string.save_state_virtualFrequency)));
analyzerSurface.setVirtualSampleRate(savedInstanceState.getInt(getString(R.string.save_state_virtualSampleRate)));
analyzerSurface.setDBScale(savedInstanceState.getFloat(getString(R.string.save_state_minDB)),savedInstanceState.getFloat(getString(R.string.save_state_maxDB)));
savedInstanceState=null;
}
return true;
}

Fixed version (ground truth):
/** 
 * Will create a IQ Source instance according to the user settings.
 * @return true on success; false on error
 */
public boolean createSource(){
  int sourceType=Integer.valueOf(preferences.getString(getString(R.string.pref_sourceType),"String_Node_Str"));
switch (sourceType) {
case FILE_SOURCE:
    long frequency;
  int sampleRate;
try {
  frequency=Integer.valueOf(preferences.getString(getString(R.string.pref_filesource_frequency),"String_Node_Str"));
  sampleRate=Integer.valueOf(preferences.getString(getString(R.string.pref_filesource_sampleRate),"String_Node_Str"));
}
 catch (NumberFormatException e) {
  this.runOnUiThread(new Runnable(){
    @Override public void run(){
      Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_LONG).show();
    }
  }
);
  return false;
}
String filename=preferences.getString(getString(R.string.pref_filesource_file),"String_Node_Str");
boolean repeat=preferences.getBoolean(getString(R.string.pref_filesource_repeat),false);
source=new FileIQSource(filename,sampleRate,frequency,16384,repeat);
break;
case HACKRF_SOURCE:
source=new HackrfSource();
source.setFrequency(preferences.getLong(getString(R.string.pref_frequency),97000000));
source.setSampleRate(preferences.getInt(getString(R.string.pref_sampleRate),HackrfSource.MAX_SAMPLERATE));
((HackrfSource)source).setVgaRxGain(preferences.getInt(getString(R.string.pref_hackrf_vgaRxGain),HackrfSource.MAX_VGA_RX_GAIN / 2));
((HackrfSource)source).setLnaGain(preferences.getInt(getString(R.string.pref_hackrf_lnaGain),HackrfSource.MAX_LNA_GAIN / 2));
break;
case RTLSDR_SOURCE:
Log.e(LOGTAG,"String_Node_Str");
Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
return false;
default :
Log.e(LOGTAG,"String_Node_Str" + sourceType);
return false;
}
analyzerSurface.setSource(source);
return true;
}