Program: 35931
Project: 35931
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  final View v=inflater.inflate(R.layout.dashboard_music,container,false);
  Log.d(TAG,"String_Node_Str");
  mSettings=PreferenceManager.getDefaultSharedPreferences(getActivity());
  String radioType=mSettings.getString("String_Node_Str","String_Node_Str");
  mRadioType=(radioType.equals("String_Node_Str")) ? RadioTypes.BM53 : RadioTypes.CD53;
  if (mCurrentRadioMode == null) {
    mCurrentRadioMode=RadioModes.AUX;
  }
  mRadioLayout=(LinearLayout)v.findViewById(R.id.radioAudio);
  mTabletLayout=(LinearLayout)v.findViewById(R.id.tabletAudio);
  mPlayerPrevBtn=(ImageButton)v.findViewById(R.id.playerPrevBtn);
  mPlayerControlBtn=(ImageButton)v.findViewById(R.id.playerPlayPauseBtn);
  mPlayerNextBtn=(ImageButton)v.findViewById(R.id.playerNextBtn);
  mPlayerTitleText=(TextView)v.findViewById(R.id.playerTitleField);
  mPlayerAlbumText=(TextView)v.findViewById(R.id.playerAlbumField);
  mPlayerArtistText=(TextView)v.findViewById(R.id.playerArtistField);
  mPlayerArtwork=(ImageView)v.findViewById(R.id.albumArt);
  mPlayerScrubBar=(SeekBar)v.findViewById(R.id.playerTrackBar);
  OnClickListener playerClickListener=new OnClickListener(){
    @Override public void onClick(    View v){
      if (mMediaPlayerConnected) {
switch (v.getId()) {
case R.id.playerPrevBtn:
          mPlayerService.sendPreviousKey();
        break;
case R.id.playerNextBtn:
      mPlayerService.sendNextKey();
    break;
case R.id.playerPlayPauseBtn:
  if (mIsPlaying) {
    mIsPlaying=false;
    mPlayerService.sendPauseKey();
  }
 else {
    mIsPlaying=true;
    mPlayerService.sendPlayKey();
  }
break;
}
}
}
}
;
mPlayerPrevBtn.setOnClickListener(playerClickListener);
mPlayerNextBtn.setOnClickListener(playerClickListener);
mPlayerControlBtn.setOnClickListener(playerClickListener);
mPlayerScrubBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener(){
@Override public void onProgressChanged(SeekBar seekBar,int progress,boolean fromUser){
if (mMediaPlayerConnected && fromUser) {
mPlayerService.seekTo(mSongDuration * progress / seekBar.getMax());
}
}
@Override public void onStartTrackingTouch(SeekBar seekBar){
mHandler.removeCallbacks(mUpdateSeekBar);
}
@Override public void onStopTrackingTouch(SeekBar seekBar){
mHandler.post(mUpdateSeekBar);
}
}
);
ImageButton btnVolUp=(ImageButton)v.findViewById(R.id.btnVolUp);
ImageButton btnVolDown=(ImageButton)v.findViewById(R.id.btnVolDown);
Button btnRadioFM=(Button)v.findViewById(R.id.btnRadioFM);
Button btnRadioAM=(Button)v.findViewById(R.id.btnRadioAM);
mBtnMusicMode=(Switch)v.findViewById(R.id.btnMusicMode);
ImageButton btnPrev=(ImageButton)v.findViewById(R.id.btnPrev);
ImageButton btnNext=(ImageButton)v.findViewById(R.id.btnNext);
mStationText=(TextView)v.findViewById(R.id.stationText);
mRDSField=(TextView)v.findViewById(R.id.radioRDSIndicator);
mStereoField=(TextView)v.findViewById(R.id.radioStereoIndicator);
mProgramField=(TextView)v.findViewById(R.id.radioProgram);
mBroadcastField=(TextView)v.findViewById(R.id.radioBroadcast);
if (mRadioType == RadioTypes.BM53) {
btnVolUp.setTag(IBusCommandsEnum.BMToRadioVolumeUp.name());
btnVolDown.setTag(IBusCommandsEnum.BMToRadioVolumeDown.name());
btnPrev.setTag("String_Node_Str");
btnNext.setTag("String_Node_Str");
}
 else {
btnVolUp.setTag(IBusCommandsEnum.SWToRadioVolumeUp.name());
btnVolDown.setTag(IBusCommandsEnum.SWToRadioVolumeDown.name());
btnPrev.setTag("String_Node_Str");
btnNext.setTag("String_Node_Str");
}
btnRadioFM.setTag("String_Node_Str");
btnRadioAM.setTag("String_Node_Str");
mBtnMusicMode.setOnCheckedChangeListener(new OnCheckedChangeListener(){
public void onCheckedChanged(CompoundButton buttonView,boolean isChecked){
Log.d(TAG,"String_Node_Str");
if (isChecked) {
if (!(mCurrentRadioMode == RadioModes.AUX) && mRadioType == RadioTypes.BM53) {
changeRadioMode(RadioModes.AUX);
}
mRadioLayout.setVisibility(View.GONE);
mTabletLayout.setVisibility(View.VISIBLE);
}
 else {
if (mIsPlaying) {
mPlayerService.sendPauseKey();
}
if ((mCurrentRadioMode == RadioModes.AUX || mCurrentRadioMode == RadioModes.CD) && mRadioType == RadioTypes.BM53) {
changeRadioMode(RadioModes.Radio);
}
mRadioLayout.setVisibility(View.VISIBLE);
mTabletLayout.setVisibility(View.GONE);
}
}
}
);
OnClickListener clickSingleAction=new OnClickListener(){
@Override public void onClick(View v){
sendIBusCommand(IBusCommandsEnum.valueOf(v.getTag().toString()));
}
}
;
OnTouchListener touchAction=new OnTouchListener(){
@SuppressLint("String_Node_Str") @Override public boolean onTouch(View v,MotionEvent event){
String action=(event.getAction() == MotionEvent.ACTION_DOWN) ? "String_Node_Str" : "String_Node_Str";
sendIBusCommand(IBusCommandsEnum.valueOf(v.getTag().toString() + action));
return false;
}
}
;
btnVolUp.setOnClickListener(clickSingleAction);
btnVolDown.setOnClickListener(clickSingleAction);
btnRadioFM.setOnTouchListener(touchAction);
btnRadioAM.setOnTouchListener(touchAction);
btnPrev.setOnTouchListener(touchAction);
btnNext.setOnTouchListener(touchAction);
if (mRadioType != RadioTypes.BM53) {
mCurrentRadioMode=RadioModes.AUX;
mBtnMusicMode.setVisibility(View.GONE);
mRadioLayout.setVisibility(View.GONE);
mTabletLayout.setVisibility(View.VISIBLE);
}
return v;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  final View v=inflater.inflate(R.layout.dashboard_music,container,false);
  Log.d(TAG,"String_Node_Str");
  mSettings=PreferenceManager.getDefaultSharedPreferences(getActivity());
  String radioType=mSettings.getString("String_Node_Str","String_Node_Str");
  mRadioType=(radioType.equals("String_Node_Str")) ? RadioTypes.BM53 : RadioTypes.CD53;
  mRadioLayout=(LinearLayout)v.findViewById(R.id.radioAudio);
  mTabletLayout=(LinearLayout)v.findViewById(R.id.tabletAudio);
  mPlayerPrevBtn=(ImageButton)v.findViewById(R.id.playerPrevBtn);
  mPlayerControlBtn=(ImageButton)v.findViewById(R.id.playerPlayPauseBtn);
  mPlayerNextBtn=(ImageButton)v.findViewById(R.id.playerNextBtn);
  mPlayerTitleText=(TextView)v.findViewById(R.id.playerTitleField);
  mPlayerAlbumText=(TextView)v.findViewById(R.id.playerAlbumField);
  mPlayerArtistText=(TextView)v.findViewById(R.id.playerArtistField);
  mPlayerArtwork=(ImageView)v.findViewById(R.id.albumArt);
  mPlayerScrubBar=(SeekBar)v.findViewById(R.id.playerTrackBar);
  OnClickListener playerClickListener=new OnClickListener(){
    @Override public void onClick(    View v){
      if (mMediaPlayerConnected) {
switch (v.getId()) {
case R.id.playerPrevBtn:
          mPlayerService.sendPreviousKey();
        break;
case R.id.playerNextBtn:
      mPlayerService.sendNextKey();
    break;
case R.id.playerPlayPauseBtn:
  if (mIsPlaying) {
    mIsPlaying=false;
    mPlayerService.sendPauseKey();
  }
 else {
    mIsPlaying=true;
    mPlayerService.sendPlayKey();
  }
break;
}
}
}
}
;
mPlayerPrevBtn.setOnClickListener(playerClickListener);
mPlayerNextBtn.setOnClickListener(playerClickListener);
mPlayerControlBtn.setOnClickListener(playerClickListener);
mPlayerScrubBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener(){
@Override public void onProgressChanged(SeekBar seekBar,int progress,boolean fromUser){
if (mMediaPlayerConnected && fromUser) {
mPlayerService.seekTo(mSongDuration * progress / seekBar.getMax());
}
}
@Override public void onStartTrackingTouch(SeekBar seekBar){
mHandler.removeCallbacks(mUpdateSeekBar);
}
@Override public void onStopTrackingTouch(SeekBar seekBar){
mHandler.post(mUpdateSeekBar);
}
}
);
ImageButton btnVolUp=(ImageButton)v.findViewById(R.id.btnVolUp);
ImageButton btnVolDown=(ImageButton)v.findViewById(R.id.btnVolDown);
Button btnRadioFM=(Button)v.findViewById(R.id.btnRadioFM);
Button btnRadioAM=(Button)v.findViewById(R.id.btnRadioAM);
mBtnMusicMode=(Switch)v.findViewById(R.id.btnMusicMode);
ImageButton btnPrev=(ImageButton)v.findViewById(R.id.btnPrev);
ImageButton btnNext=(ImageButton)v.findViewById(R.id.btnNext);
mStationText=(TextView)v.findViewById(R.id.stationText);
mRDSField=(TextView)v.findViewById(R.id.radioRDSIndicator);
mStereoField=(TextView)v.findViewById(R.id.radioStereoIndicator);
mProgramField=(TextView)v.findViewById(R.id.radioProgram);
mBroadcastField=(TextView)v.findViewById(R.id.radioBroadcast);
if (mRadioType == RadioTypes.BM53) {
btnVolUp.setTag(IBusCommandsEnum.BMToRadioVolumeUp.name());
btnVolDown.setTag(IBusCommandsEnum.BMToRadioVolumeDown.name());
btnPrev.setTag("String_Node_Str");
btnNext.setTag("String_Node_Str");
}
 else {
btnVolUp.setTag(IBusCommandsEnum.SWToRadioVolumeUp.name());
btnVolDown.setTag(IBusCommandsEnum.SWToRadioVolumeDown.name());
btnPrev.setTag("String_Node_Str");
btnNext.setTag("String_Node_Str");
}
btnRadioFM.setTag("String_Node_Str");
btnRadioAM.setTag("String_Node_Str");
mBtnMusicMode.setOnCheckedChangeListener(new OnCheckedChangeListener(){
public void onCheckedChanged(CompoundButton buttonView,boolean isChecked){
Log.d(TAG,"String_Node_Str");
if (isChecked) {
if (!(mCurrentRadioMode == RadioModes.AUX) && mRadioType == RadioTypes.BM53) {
changeRadioMode(RadioModes.AUX);
}
mRadioLayout.setVisibility(View.GONE);
mTabletLayout.setVisibility(View.VISIBLE);
}
 else {
if (mIsPlaying) {
mPlayerService.sendPauseKey();
}
if ((mCurrentRadioMode == RadioModes.AUX || mCurrentRadioMode == RadioModes.CD) && mRadioType == RadioTypes.BM53) {
changeRadioMode(RadioModes.Radio);
}
mRadioLayout.setVisibility(View.VISIBLE);
mTabletLayout.setVisibility(View.GONE);
}
}
}
);
OnClickListener clickSingleAction=new OnClickListener(){
@Override public void onClick(View v){
sendIBusCommand(IBusCommandsEnum.valueOf(v.getTag().toString()));
}
}
;
OnTouchListener touchAction=new OnTouchListener(){
@SuppressLint("String_Node_Str") @Override public boolean onTouch(View v,MotionEvent event){
String action=(event.getAction() == MotionEvent.ACTION_DOWN) ? "String_Node_Str" : "String_Node_Str";
sendIBusCommand(IBusCommandsEnum.valueOf(v.getTag().toString() + action));
return false;
}
}
;
btnVolUp.setOnClickListener(clickSingleAction);
btnVolDown.setOnClickListener(clickSingleAction);
btnRadioFM.setOnTouchListener(touchAction);
btnRadioAM.setOnTouchListener(touchAction);
btnPrev.setOnTouchListener(touchAction);
btnNext.setOnTouchListener(touchAction);
if (mRadioType != RadioTypes.BM53) {
mCurrentRadioMode=RadioModes.AUX;
mBtnMusicMode.setVisibility(View.GONE);
mRadioLayout.setVisibility(View.GONE);
mTabletLayout.setVisibility(View.VISIBLE);
}
return v;
}