Program: 14613
Project: 14613
Buggy source:
private void initLocation(ViewGroup rootView){
  Post post=mActivity.getPost();
  if (hasLocationProvider() && post.supportsLocation()) {
    View locationRootView=((ViewStub)rootView.findViewById(R.id.stub_post_location_settings)).inflate();
    ((TextView)locationRootView.findViewById(R.id.locationLabel)).setText(getResources().getString(R.string.location).toUpperCase());
    mLocationText=(TextView)locationRootView.findViewById(R.id.locationText);
    mLocationText.setOnClickListener(this);
    mLocationAddSection=locationRootView.findViewById(R.id.sectionLocationAdd);
    mLocationSearchSection=locationRootView.findViewById(R.id.sectionLocationSearch);
    mLocationViewSection=locationRootView.findViewById(R.id.sectionLocationView);
    if (mActivity.getPost().hasLocation()) {
      showLocationView();
    }
 else {
      showLocationAdd();
    }
    Button addLocation=(Button)locationRootView.findViewById(R.id.addLocation);
    addLocation.setOnClickListener(this);
    mButtonSearchLocation=(Button)locationRootView.findViewById(R.id.searchLocation);
    mButtonSearchLocation.setOnClickListener(this);
    mLocationEditText=(EditText)locationRootView.findViewById(R.id.searchLocationText);
    mLocationEditText.setOnEditorActionListener(this);
    mLocationEditText.addTextChangedListener(mLocationEditTextWatcher);
    Button updateLocation=(Button)locationRootView.findViewById(R.id.updateLocation);
    Button removeLocation=(Button)locationRootView.findViewById(R.id.removeLocation);
    updateLocation.setOnClickListener(this);
    removeLocation.setOnClickListener(this);
    if (post.hasLocation()) {
      PostLocation location=post.getLocation();
      new GetAddressTask().execute(location.getLatitude(),location.getLongitude());
    }
  }
}

Fixed version (ground truth):
private void initLocation(ViewGroup rootView){
  Post post=mActivity.getPost();
  if (hasLocationProvider() && post.supportsLocation()) {
    View locationRootView=((ViewStub)rootView.findViewById(R.id.stub_post_location_settings)).inflate();
    TextView locationLabel=((TextView)locationRootView.findViewById(R.id.locationLabel));
    locationLabel.setText(getResources().getString(R.string.location).toUpperCase());
    mLocationText=(TextView)locationRootView.findViewById(R.id.locationText);
    mLocationText.setOnClickListener(this);
    mLocationAddSection=locationRootView.findViewById(R.id.sectionLocationAdd);
    mLocationSearchSection=locationRootView.findViewById(R.id.sectionLocationSearch);
    mLocationViewSection=locationRootView.findViewById(R.id.sectionLocationView);
    if (mActivity.getPost().hasLocation()) {
      showLocationView();
    }
 else {
      showLocationAdd();
    }
    Button addLocation=(Button)locationRootView.findViewById(R.id.addLocation);
    addLocation.setOnClickListener(this);
    mButtonSearchLocation=(Button)locationRootView.findViewById(R.id.searchLocation);
    mButtonSearchLocation.setOnClickListener(this);
    mLocationEditText=(EditText)locationRootView.findViewById(R.id.searchLocationText);
    mLocationEditText.setOnEditorActionListener(this);
    mLocationEditText.addTextChangedListener(mLocationEditTextWatcher);
    Button updateLocation=(Button)locationRootView.findViewById(R.id.updateLocation);
    Button removeLocation=(Button)locationRootView.findViewById(R.id.removeLocation);
    updateLocation.setOnClickListener(this);
    removeLocation.setOnClickListener(this);
    if (post.hasLocation()) {
      PostLocation location=post.getLocation();
      new GetAddressTask().execute(location.getLatitude(),location.getLongitude());
    }
  }
}