Program: 13779
Project: 13779
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  ViewGroup rootView=(ViewGroup)inflater.inflate(R.layout.edit_post_settings_fragment,container,false);
  if (rootView == null) {
    return null;
  }
  mExcerptTextView=(TextView)rootView.findViewById(R.id.post_excerpt);
  mSlugTextView=(TextView)rootView.findViewById(R.id.post_slug);
  mLocationTextView=(TextView)rootView.findViewById(R.id.post_location);
  mCategoriesTextView=(TextView)rootView.findViewById(R.id.post_categories);
  mTagsTextView=(TextView)rootView.findViewById(R.id.post_tags);
  mStatusTextView=(TextView)rootView.findViewById(R.id.post_status);
  mPostFormatTextView=(TextView)rootView.findViewById(R.id.post_format);
  mPasswordTextView=(TextView)rootView.findViewById(R.id.post_password);
  mPublishDateTextView=(TextView)rootView.findViewById(R.id.publish_date);
  mFeaturedImageView=(WPNetworkImageView)rootView.findViewById(R.id.post_featured_image);
  mFeaturedImageButton=(Button)rootView.findViewById(R.id.post_add_featured_image_button);
  CardView featuredImageCardView=(CardView)rootView.findViewById(R.id.post_featured_image_card_view);
  if (AppPrefs.isVisualEditorEnabled() || AppPrefs.isAztecEditorEnabled()) {
    registerForContextMenu(mFeaturedImageView);
    mFeaturedImageView.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        view.showContextMenu();
      }
    }
);
    mFeaturedImageButton.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        launchFeaturedMediaPicker();
      }
    }
);
  }
 else {
    featuredImageCardView.setVisibility(View.GONE);
  }
  mExcerptContainer=(LinearLayout)rootView.findViewById(R.id.post_excerpt_container);
  mExcerptContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showPostExcerptDialog();
    }
  }
);
  final LinearLayout slugContainer=(LinearLayout)rootView.findViewById(R.id.post_slug_container);
  slugContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showSlugDialog();
    }
  }
);
  final LinearLayout locationContainer=(LinearLayout)rootView.findViewById(R.id.post_location_container);
  locationContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showLocationPickerOrPopupMenu(view);
    }
  }
);
  mCategoriesContainer=(LinearLayout)rootView.findViewById(R.id.post_categories_container);
  mCategoriesContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showCategoriesActivity();
    }
  }
);
  mTagsContainer=(LinearLayout)rootView.findViewById(R.id.post_tags_container);
  mTagsContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showTagsActivity();
    }
  }
);
  final LinearLayout statusContainer=(LinearLayout)rootView.findViewById(R.id.post_status_container);
  statusContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showStatusDialog();
    }
  }
);
  mFormatContainer=(LinearLayout)rootView.findViewById(R.id.post_format_container);
  mFormatContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showPostFormatDialog();
    }
  }
);
  final LinearLayout passwordContainer=(LinearLayout)rootView.findViewById(R.id.post_password_container);
  passwordContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showPostPasswordDialog();
    }
  }
);
  final LinearLayout publishDateContainer=(LinearLayout)rootView.findViewById(R.id.publish_date_container);
  publishDateContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showPostDateSelectionDialog();
    }
  }
);
  if (getPost().isPage()) {
    final View categoriesTagsContainer=rootView.findViewById(R.id.post_categories_and_tags_card);
    final View formatBottomSeparator=rootView.findViewById(R.id.post_format_bottom_separator);
    categoriesTagsContainer.setVisibility(View.GONE);
    formatBottomSeparator.setVisibility(View.GONE);
    mFormatContainer.setVisibility(View.GONE);
  }
  refreshViews();
  return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  ViewGroup rootView=(ViewGroup)inflater.inflate(R.layout.edit_post_settings_fragment,container,false);
  if (rootView == null) {
    return null;
  }
  mExcerptTextView=(TextView)rootView.findViewById(R.id.post_excerpt);
  mSlugTextView=(TextView)rootView.findViewById(R.id.post_slug);
  mLocationTextView=(TextView)rootView.findViewById(R.id.post_location);
  mCategoriesTextView=(TextView)rootView.findViewById(R.id.post_categories);
  mTagsTextView=(TextView)rootView.findViewById(R.id.post_tags);
  mStatusTextView=(TextView)rootView.findViewById(R.id.post_status);
  mPostFormatTextView=(TextView)rootView.findViewById(R.id.post_format);
  mPasswordTextView=(TextView)rootView.findViewById(R.id.post_password);
  mPublishDateTextView=(TextView)rootView.findViewById(R.id.publish_date);
  mFeaturedImageView=(WPNetworkImageView)rootView.findViewById(R.id.post_featured_image);
  mFeaturedImageButton=(Button)rootView.findViewById(R.id.post_add_featured_image_button);
  CardView featuredImageCardView=(CardView)rootView.findViewById(R.id.post_featured_image_card_view);
  if (AppPrefs.isVisualEditorEnabled() || AppPrefs.isAztecEditorEnabled()) {
    registerForContextMenu(mFeaturedImageView);
    mFeaturedImageView.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        view.showContextMenu();
      }
    }
);
    mFeaturedImageButton.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        launchFeaturedMediaPicker();
      }
    }
);
  }
 else {
    featuredImageCardView.setVisibility(View.GONE);
  }
  mExcerptContainer=(LinearLayout)rootView.findViewById(R.id.post_excerpt_container);
  mExcerptContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showPostExcerptDialog();
    }
  }
);
  final LinearLayout slugContainer=(LinearLayout)rootView.findViewById(R.id.post_slug_container);
  slugContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showSlugDialog();
    }
  }
);
  final LinearLayout locationContainer=(LinearLayout)rootView.findViewById(R.id.post_location_container);
  locationContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showLocationPickerOrPopupMenu(view);
    }
  }
);
  mCategoriesContainer=(LinearLayout)rootView.findViewById(R.id.post_categories_container);
  mCategoriesContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showCategoriesActivity();
    }
  }
);
  mTagsContainer=(LinearLayout)rootView.findViewById(R.id.post_tags_container);
  mTagsContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showTagsActivity();
    }
  }
);
  final LinearLayout statusContainer=(LinearLayout)rootView.findViewById(R.id.post_status_container);
  statusContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showStatusDialog();
    }
  }
);
  mFormatContainer=(LinearLayout)rootView.findViewById(R.id.post_format_container);
  mFormatContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showPostFormatDialog();
    }
  }
);
  final LinearLayout passwordContainer=(LinearLayout)rootView.findViewById(R.id.post_password_container);
  passwordContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showPostPasswordDialog();
    }
  }
);
  final LinearLayout publishDateContainer=(LinearLayout)rootView.findViewById(R.id.publish_date_container);
  publishDateContainer.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      showPostDateSelectionDialog();
    }
  }
);
  if (getPost().isPage()) {
    final View categoriesTagsContainer=rootView.findViewById(R.id.post_categories_and_tags_card);
    final View formatBottomSeparator=rootView.findViewById(R.id.post_format_bottom_separator);
    categoriesTagsContainer.setVisibility(View.GONE);
    formatBottomSeparator.setVisibility(View.GONE);
    mFormatContainer.setVisibility(View.GONE);
  }
  return rootView;
}