Program: 87021
Project: 87021
Buggy source:
public void setUpLocationElements(){
  setLocationItemsEnabled(false);
  enableLocationCheckBox.setChecked(false);
  enableLocationCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(){
    @Override public void onCheckedChanged(    CompoundButton buttonView,    boolean isChecked){
      if (isChecked) {
        setLocationItemsEnabled(true);
      }
 else {
        setLocationItemsEnabled(false);
      }
    }
  }
);
  selectLocationTextView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      Log.v(LOG_TAG,"String_Node_Str");
      Intent intent=new Intent(getActivity(),SelectLocation.class);
      getActivity().startActivityForResult(intent,REQUEST_LOCATION_SELECT);
    }
  }
);
}

Fixed version (ground truth):
public void setUpLocationElements(){
  setLocationItemsEnabled(false);
  enableLocationCheckBox.setChecked(false);
  enableLocationCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(){
    @Override public void onCheckedChanged(    CompoundButton buttonView,    boolean isChecked){
      if (isChecked) {
        setLocationItemsEnabled(true);
        storedLocations=LocationEnvironmentVariable.getLocationEnvironmentVariables(getActivity());
        mSelectedLocationItem=-1;
      }
 else {
        setLocationItemsEnabled(false);
      }
    }
  }
);
  selectLocationTextView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      Log.v(LOG_TAG,"String_Node_Str");
      Intent intent=new Intent(getActivity(),SelectLocation.class);
      getActivity().startActivityForResult(intent,REQUEST_LOCATION_SELECT);
    }
  }
);
  selectStoredLocationTextView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      String[] locationNames=new String[storedLocations.size()];
      for (int i=0; i < storedLocations.size(); i++) {
        locationNames[i]=((LocationEnvironmentVariable)storedLocations.get(i)).getLocationName();
      }
      AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
      builder.setTitle(R.string.dialog_pick_wifi_connection);
      builder.setSingleChoiceItems(locationNames,mSelectedLocationItem,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          mSelectedLocationItem=which;
          mSelectedLocation=(LocationEnvironmentVariable)storedLocations.get(which);
        }
      }
);
      builder.setPositiveButton(R.string.ok,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          if (mSelectedLocationItem != -1) {
            nameLocationEditText.setText(mSelectedLocation.getLocationName());
            latLocationEditText.setText("String_Node_Str" + mSelectedLocation.getLatitude());
            lonLocationEditText.setText("String_Node_Str" + mSelectedLocation.getLongitude());
            radLocationEditText.setText("String_Node_Str" + mSelectedLocation.getRadius());
          }
        }
      }
);
      AlertDialog alert=builder.create();
      alert.show();
    }
  }
);
}