Program: 40021
Project: 40021
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  if (view != null) {
    ViewGroup parent=(ViewGroup)view.getParent();
    if (parent != null)     parent.removeView(view);
  }
  try {
    view=inflater.inflate(R.layout.fragment_map,container,false);
  }
 catch (  InflateException e) {
  }
  View v=view;
  mSharedPreferences=getActivity().getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE);
  ((TextView)getActivity().findViewById(R.id.actionbar_title)).setText(R.string.map);
  Button newTreeBtn=(Button)v.findViewById(R.id.fragment_map_new_tree);
  newTreeBtn.setOnClickListener(MapsFragment.this);
  Button dataBtn=(Button)v.findViewById(R.id.fragment_map_data);
  dataBtn.setOnClickListener(MapsFragment.this);
  Button updateTreeBtn=(Button)v.findViewById(R.id.fragment_map_update_tree);
  updateTreeBtn.setOnClickListener(MapsFragment.this);
  ((SupportMapFragment)getChildFragmentManager().findFragmentById(R.id.map)).getMapAsync(this);
  TextView mapGpsAccuracy=((TextView)v.findViewById(R.id.fragment_map_gps_accuracy));
  TextView mapGpsAccuracyValue=((TextView)v.findViewById(R.id.fragment_map_gps_accuracy_value));
  int minAccuracy=mSharedPreferences.getInt(ValueHelper.MIN_ACCURACY_GLOBAL_SETTING,ValueHelper.MIN_ACCURACY_DEFAULT_SETTING);
  if (mapGpsAccuracy != null) {
    Log.i("String_Node_Str","String_Node_Str");
    if (MainActivity.mCurrentLocation != null) {
      Log.i("String_Node_Str","String_Node_Str");
      if (MainActivity.mCurrentLocation.hasAccuracy() && (MainActivity.mCurrentLocation.getAccuracy() < minAccuracy)) {
        Log.i("String_Node_Str","String_Node_Str");
        mapGpsAccuracy.setTextColor(Color.GREEN);
        mapGpsAccuracyValue.setTextColor(Color.GREEN);
        mapGpsAccuracyValue.setText(Integer.toString(Math.round(MainActivity.mCurrentLocation.getAccuracy())) + "String_Node_Str" + getResources().getString(R.string.meters));
        MainActivity.mAllowNewTreeOrUpdate=true;
      }
 else {
        Log.i("String_Node_Str","String_Node_Str");
        mapGpsAccuracy.setTextColor(Color.RED);
        MainActivity.mAllowNewTreeOrUpdate=false;
        if (MainActivity.mCurrentLocation.hasAccuracy()) {
          mapGpsAccuracyValue.setTextColor(Color.RED);
          mapGpsAccuracyValue.setText(Integer.toString(Math.round(MainActivity.mCurrentLocation.getAccuracy())) + "String_Node_Str" + getResources().getString(R.string.meters));
        }
 else {
          mapGpsAccuracyValue.setTextColor(Color.RED);
          mapGpsAccuracyValue.setText("String_Node_Str");
        }
      }
    }
 else {
      Log.i("String_Node_Str","String_Node_Str");
      if (ActivityCompat.checkSelfPermission(getActivity(),android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(),android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
        showLocationAlertDialog();
      }
      mapGpsAccuracy.setTextColor(Color.RED);
      mapGpsAccuracyValue.setTextColor(Color.RED);
      mapGpsAccuracyValue.setText("String_Node_Str");
      MainActivity.mAllowNewTreeOrUpdate=false;
    }
  }
  return v;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  if (view != null) {
    ViewGroup parent=(ViewGroup)view.getParent();
    if (parent != null)     parent.removeView(view);
  }
  try {
    view=inflater.inflate(R.layout.fragment_map,container,false);
  }
 catch (  InflateException e) {
  }
  View v=view;
  mSharedPreferences=getActivity().getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE);
  ((TextView)getActivity().findViewById(R.id.actionbar_title)).setText(R.string.map);
  Button newTreeBtn=(Button)v.findViewById(R.id.fragment_map_new_tree);
  newTreeBtn.setOnClickListener(MapsFragment.this);
  Button dataBtn=(Button)v.findViewById(R.id.fragment_map_data);
  dataBtn.setOnClickListener(MapsFragment.this);
  Button updateTreeBtn=(Button)v.findViewById(R.id.fragment_map_update_tree);
  updateTreeBtn.setOnClickListener(MapsFragment.this);
  ((SupportMapFragment)getChildFragmentManager().findFragmentById(R.id.map)).getMapAsync(this);
  TextView mapGpsAccuracy=((TextView)v.findViewById(R.id.fragment_map_gps_accuracy));
  TextView mapGpsAccuracyValue=((TextView)v.findViewById(R.id.fragment_map_gps_accuracy_value));
  int minAccuracy=mSharedPreferences.getInt(ValueHelper.MIN_ACCURACY_GLOBAL_SETTING,ValueHelper.MIN_ACCURACY_DEFAULT_SETTING);
  if (mapGpsAccuracy != null) {
    Log.i("String_Node_Str","String_Node_Str");
    if (MainActivity.mCurrentLocation != null) {
      Log.i("String_Node_Str","String_Node_Str");
      if (MainActivity.mCurrentLocation.hasAccuracy() && (MainActivity.mCurrentLocation.getAccuracy() < minAccuracy)) {
        Log.i("String_Node_Str","String_Node_Str");
        mapGpsAccuracy.setTextColor(Color.GREEN);
        mapGpsAccuracyValue.setTextColor(Color.GREEN);
        mapGpsAccuracyValue.setText(Integer.toString(Math.round(MainActivity.mCurrentLocation.getAccuracy())) + "String_Node_Str" + getResources().getString(R.string.meters));
        MainActivity.mAllowNewTreeOrUpdate=true;
      }
 else {
        Log.i("String_Node_Str","String_Node_Str");
        mapGpsAccuracy.setTextColor(Color.RED);
        MainActivity.mAllowNewTreeOrUpdate=false;
        if (MainActivity.mCurrentLocation.hasAccuracy()) {
          mapGpsAccuracyValue.setTextColor(Color.RED);
          mapGpsAccuracyValue.setText(Integer.toString(Math.round(MainActivity.mCurrentLocation.getAccuracy())) + "String_Node_Str" + getResources().getString(R.string.meters));
        }
 else {
          mapGpsAccuracyValue.setTextColor(Color.RED);
          mapGpsAccuracyValue.setText("String_Node_Str");
        }
      }
    }
 else {
      Log.i("String_Node_Str","String_Node_Str");
      if (ActivityCompat.checkSelfPermission(getActivity(),android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(),android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
        requestPermissions(new String[]{android.Manifest.permission.ACCESS_COARSE_LOCATION},Permissions.MY_PERMISSION_ACCESS_COURSE_LOCATION);
      }
      mapGpsAccuracy.setTextColor(Color.RED);
      mapGpsAccuracyValue.setTextColor(Color.RED);
      mapGpsAccuracyValue.setText("String_Node_Str");
      MainActivity.mAllowNewTreeOrUpdate=false;
    }
  }
  return v;
}