Program: 55010
Project: 55010
Buggy source:
/** 
 * Will check if any preference conflicts with the current state of the app and fix it
 */
public void checkForChangedPreferences(){
  int sourceType=Integer.valueOf(preferences.getString(getString(R.string.pref_sourceType),"String_Node_Str"));
  if (source != null) {
switch (sourceType) {
case FILE_SOURCE:
      if (!(source instanceof FileIQSource))       createSource();
    long freq=Integer.valueOf(preferences.getString(getString(R.string.pref_filesource_frequency),"String_Node_Str"));
  int sampRate=Integer.valueOf(preferences.getString(getString(R.string.pref_filesource_sampleRate),"String_Node_Str"));
String fileName=preferences.getString(getString(R.string.pref_filesource_file),"String_Node_Str");
boolean repeat=preferences.getBoolean(getString(R.string.pref_filesource_repeat),false);
if (freq != source.getFrequency() || sampRate != source.getSampleRate() || !fileName.equals(((FileIQSource)source).getFilename()) || repeat != ((FileIQSource)source).isRepeat()) {
createSource();
}
break;
case HACKRF_SOURCE:
if (!(source instanceof HackrfSource)) createSource();
break;
case RTLSDR_SOURCE:
break;
default :
}
}
if (analyzerSurface != null) {
analyzerSurface.setVerticalScrollEnabled(preferences.getBoolean(getString(R.string.pref_scrollDB),true));
analyzerSurface.setVerticalZoomEnabled(preferences.getBoolean(getString(R.string.pref_zoomDB),true));
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.setAverageLength(Integer.valueOf(preferences.getString(getString(R.string.pref_averaging),"String_Node_Str")));
analyzerSurface.setPeakHoldEnabled(preferences.getBoolean(getString(R.string.pref_peakHold),false));
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")));
}
String screenOrientation=preferences.getString(getString(R.string.pref_screenOrientation),"String_Node_Str");
if (screenOrientation.equals("String_Node_Str")) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
 else if (screenOrientation.equals("String_Node_Str")) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
 else if (screenOrientation.equals("String_Node_Str")) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
 else if (screenOrientation.equals("String_Node_Str")) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE);
 else if (screenOrientation.equals("String_Node_Str")) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT);
}

Fixed version (ground truth):
/** 
 * Will check if any preference conflicts with the current state of the app and fix it
 */
public void checkForChangedPreferences(){
  int sourceType=Integer.valueOf(preferences.getString(getString(R.string.pref_sourceType),"String_Node_Str"));
  if (source != null) {
switch (sourceType) {
case FILE_SOURCE:
      if (!(source instanceof FileIQSource))       createSource();
    long freq=Integer.valueOf(preferences.getString(getString(R.string.pref_filesource_frequency),"String_Node_Str"));
  int sampRate=Integer.valueOf(preferences.getString(getString(R.string.pref_filesource_sampleRate),"String_Node_Str"));
String fileName=preferences.getString(getString(R.string.pref_filesource_file),"String_Node_Str");
boolean repeat=preferences.getBoolean(getString(R.string.pref_filesource_repeat),false);
if (freq != source.getFrequency() || sampRate != source.getSampleRate() || !fileName.equals(((FileIQSource)source).getFilename()) || repeat != ((FileIQSource)source).isRepeat()) {
createSource();
}
break;
case HACKRF_SOURCE:
if (!(source instanceof HackrfSource)) createSource();
break;
case RTLSDR_SOURCE:
break;
default :
}
}
if (analyzerSurface != null) {
analyzerSurface.setVerticalScrollEnabled(preferences.getBoolean(getString(R.string.pref_scrollDB),true));
analyzerSurface.setVerticalZoomEnabled(preferences.getBoolean(getString(R.string.pref_zoomDB),true));
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.setAverageLength(Integer.valueOf(preferences.getString(getString(R.string.pref_averaging),"String_Node_Str")));
analyzerSurface.setPeakHoldEnabled(preferences.getBoolean(getString(R.string.pref_peakHold),false));
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));
}
String screenOrientation=preferences.getString(getString(R.string.pref_screenOrientation),"String_Node_Str");
if (screenOrientation.equals("String_Node_Str")) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
 else if (screenOrientation.equals("String_Node_Str")) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
 else if (screenOrientation.equals("String_Node_Str")) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
 else if (screenOrientation.equals("String_Node_Str")) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE);
 else if (screenOrientation.equals("String_Node_Str")) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT);
}