Program: 79908
Project: 79908
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.fragment_select_wunderground,container,false);
  SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(getActivity());
  locationEditText=view.findViewById(R.id.wunderground_location);
  locationEditText.setText(settings.getString("String_Node_Str","String_Node_Str"));
  typeSpinner=view.findViewById(R.id.wundergroundTypeSpinner);
  ArrayAdapter<CharSequence> typeAdapter=ArrayAdapter.createFromResource(getActivity(),R.array.wunderground_type_names,android.R.layout.simple_spinner_dropdown_item);
  typeSpinner.setAdapter(typeAdapter);
  String type=settings.getString("String_Node_Str",getString(R.string.wunderground_type_default));
  int typeIndex=Arrays.asList(getResources().getStringArray(R.array.wunderground_type_values)).indexOf(type);
  typeSpinner.setSelection(typeIndex);
  loopSwitch=view.findViewById(R.id.loopSwitch);
  loopSwitch.setChecked(settings.getBoolean("String_Node_Str",false));
  int distance=settings.getInt("String_Node_Str",50);
  radiusNumber=view.findViewById(R.id.radiusNumber);
  radiusNumber.setText(String.valueOf(distance));
  final SeekBar radiusBar=view.findViewById(R.id.radiusBar);
  radiusBar.setProgress(getRadiusPercent(distance));
  radiusBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener(){
    @Override public void onProgressChanged(    SeekBar seekBar,    int i,    boolean b){
      radiusNumber.setText(String.valueOf(getRadiusValue(i)));
    }
    @Override public void onStartTrackingTouch(    SeekBar seekBar){
    }
    @Override public void onStopTrackingTouch(    SeekBar seekBar){
    }
  }
);
  TextView radiusText=view.findViewById(R.id.radiusText);
  String currentText=radiusText.getText().toString();
  String unitsValue=settings.getString("String_Node_Str",getString(R.string.distance_unit_default));
  int index=Arrays.asList(getResources().getStringArray(R.array.distance_unit_values)).indexOf(unitsValue);
  String unitsName=getResources().getStringArray(R.array.distance_unit_names)[index];
  String newText=currentText + String.format("String_Node_Str",unitsName.toLowerCase());
  radiusText.setText(newText);
  viewButton=view.findViewById(R.id.viewButton);
  viewButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      viewWunderground();
      viewButton.setText(R.string.loading);
      viewButton.setEnabled(false);
    }
  }
);
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.fragment_select_wunderground,container,false);
  SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(getActivity());
  locationEditText=view.findViewById(R.id.wunderground_location);
  locationEditText.setText(settings.getString("String_Node_Str","String_Node_Str"));
  typeSpinner=view.findViewById(R.id.wundergroundTypeSpinner);
  ArrayAdapter<CharSequence> typeAdapter=ArrayAdapter.createFromResource(getActivity(),R.array.wunderground_type_names,android.R.layout.simple_spinner_dropdown_item);
  typeSpinner.setAdapter(typeAdapter);
  String type=settings.getString("String_Node_Str",getString(R.string.wunderground_type_default));
  int typeIndex=Arrays.asList(getResources().getStringArray(R.array.wunderground_type_values)).indexOf(type);
  typeSpinner.setSelection(typeIndex);
  loopSwitch=view.findViewById(R.id.loopSwitch);
  loopSwitch.setChecked(settings.getBoolean("String_Node_Str",false));
  int distance=settings.getInt("String_Node_Str",50);
  radiusNumber=view.findViewById(R.id.radiusNumber);
  radiusNumber.setText(String.valueOf(distance));
  final SeekBar radiusBar=view.findViewById(R.id.radiusBar);
  radiusBar.setProgress(getRadiusPercent(distance));
  radiusBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener(){
    @Override public void onProgressChanged(    SeekBar seekBar,    int i,    boolean b){
      radiusNumber.setText(String.valueOf(getRadiusValue(i)));
    }
    @Override public void onStartTrackingTouch(    SeekBar seekBar){
    }
    @Override public void onStopTrackingTouch(    SeekBar seekBar){
    }
  }
);
  TextView radiusText=view.findViewById(R.id.radiusText);
  String currentText=radiusText.getText().toString();
  String unitsValue=settings.getString("String_Node_Str",getString(R.string.distance_unit_default));
  int index=Arrays.asList(getResources().getStringArray(R.array.distance_unit_values)).indexOf(unitsValue);
  String unitsName=getResources().getStringArray(R.array.distance_unit_names)[index];
  String newText=currentText + String.format("String_Node_Str",unitsName.toLowerCase());
  radiusText.setText(newText);
  viewButton=view.findViewById(R.id.viewButton);
  viewButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      viewWunderground();
    }
  }
);
  return view;
}