Program: 31770
Project: 31770
Buggy source:
/** 
 * Process a click on one of our selectors.
 * @param v   The view that was clicked
 * @return    true if we need to update the graph
 */
public boolean processClick(View v){
  SharedPreferences sharedPref=PreferenceManager.getDefaultSharedPreferences(this);
  SharedPreferences.Editor editor=sharedPref.edit();
  String value=((TextView)v).getText().toString();
switch (v.getId()) {
case R.id.button_recording:
    bSaveWav=value.equals("String_Node_Str");
  analyzerViews.enableSaveWavView(bSaveWav);
return true;
case R.id.run:
boolean pause=value.equals("String_Node_Str");
if (samplingThread != null && samplingThread.getPause() != pause) {
samplingThread.setPause(pause);
}
analyzerViews.graphView.spectrogramPlot.setPause(pause);
return false;
case R.id.freq_scaling_mode:
{
boolean isLinearFreq=value.equals("String_Node_Str");
Log.d(TAG,"String_Node_Str" + isLinearFreq);
analyzerViews.graphView.setAxisModeLinear(isLinearFreq);
editor.putString("String_Node_Str",value);
editor.apply();
return false;
}
case R.id.dbA:
analyzerParam.isAWeighting=!value.equals("String_Node_Str");
if (samplingThread != null) {
samplingThread.setAWeighting(analyzerParam.isAWeighting);
}
editor.putBoolean("String_Node_Str",analyzerParam.isAWeighting);
editor.apply();
return false;
case R.id.spectrum_spectrogram_mode:
if (value.equals("String_Node_Str")) {
analyzerViews.graphView.switch2Spectrum();
}
 else {
analyzerViews.graphView.switch2Spectrogram();
}
editor.putBoolean("String_Node_Str",value.equals("String_Node_Str"));
editor.apply();
return false;
default :
return true;
}
}

Fixed version (ground truth):
/** 
 * Process a click on one of our selectors.
 * @param v   The view that was clicked
 * @return    true if we need to update the graph
 */
public boolean processClick(View v){
  SharedPreferences sharedPref=PreferenceManager.getDefaultSharedPreferences(this);
  SharedPreferences.Editor editor=sharedPref.edit();
  String value=((TextView)v).getText().toString();
switch (v.getId()) {
case R.id.button_recording:
    bSaveWav=value.equals("String_Node_Str");
  analyzerViews.enableSaveWavView(bSaveWav);
return true;
case R.id.run:
boolean pause=value.equals("String_Node_Str");
if (samplingThread != null && samplingThread.getPause() != pause) {
samplingThread.setPause(pause);
}
analyzerViews.graphView.spectrogramPlot.setPause(pause);
return false;
case R.id.freq_scaling_mode:
{
boolean isLinearFreq=value.equals("String_Node_Str");
Log.d(TAG,"String_Node_Str" + isLinearFreq);
analyzerViews.graphView.setAxisModeLinear(isLinearFreq);
editor.putString("String_Node_Str",value);
editor.commit();
return false;
}
case R.id.dbA:
analyzerParam.isAWeighting=!value.equals("String_Node_Str");
if (samplingThread != null) {
samplingThread.setAWeighting(analyzerParam.isAWeighting);
}
editor.putBoolean("String_Node_Str",analyzerParam.isAWeighting);
editor.commit();
return false;
case R.id.spectrum_spectrogram_mode:
if (value.equals("String_Node_Str")) {
analyzerViews.graphView.switch2Spectrum();
}
 else {
analyzerViews.graphView.switch2Spectrogram();
}
editor.putBoolean("String_Node_Str",value.equals("String_Node_Str"));
editor.commit();
return false;
default :
return true;
}
}