Program: 86254
Project: 86254
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_searchresult_detail,container,false);
  view=rootView;
  toolbar=(Toolbar)view.findViewById(R.id.toolbar);
  toolbar.setVisibility(View.VISIBLE);
  setHasOptionsMenu(false);
  if (getActivity() instanceof SearchResultDetailActivity) {
    toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
    toolbar.setNavigationOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        getActivity().supportFinishAfterTransition();
      }
    }
);
    back_button_visible=true;
  }
  toolbar.inflateMenu(R.menu.search_result_details_activity);
  refreshMenu(toolbar.getMenu());
  toolbar.setOnMenuItemClickListener(this);
  setRetainInstance(true);
  setProgress();
  scrollView=(ObservableScrollView)view.findViewById(R.id.rootView);
  scrollView.addCallbacks(this);
  ivCover=(ImageView)view.findViewById(R.id.ivCover);
  gradientBottom=view.findViewById(R.id.gradient_bottom);
  gradientTop=view.findViewById(R.id.gradient_top);
  tint=view.findViewById(R.id.tint);
  tvTitel=(TextView)view.findViewById(R.id.tvTitle);
  llDetails=(LinearLayout)view.findViewById(R.id.llDetails);
  llCopies=(LinearLayout)view.findViewById(R.id.llCopies);
  ImageView iv=(ImageView)view.findViewById(R.id.ivCover);
  if (getArguments().containsKey(ARG_ITEM_COVER_BITMAP)) {
    Bitmap bitmap=getArguments().getParcelable(ARG_ITEM_COVER_BITMAP);
    iv.setImageBitmap(bitmap);
    Palette.generateAsync(bitmap,new Palette.PaletteAsyncListener(){
      @Override public void onGenerated(      Palette palette){
        Palette.Swatch swatch=palette.getDarkVibrantSwatch();
        if (swatch != null) {
          ivCover.setBackgroundColor(swatch.getRgb());
          tint.setBackgroundColor(swatch.getRgb());
        }
      }
    }
);
    analyzeWhitenessOfCoverAsync(bitmap);
    image_analyzed=true;
    showCoverView(true);
  }
 else {
    showCoverView(false);
  }
  tvTitel.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){
    @Override public void onGlobalLayout(){
      if (tvTitel.getLineCount() > 2) {
        try {
          int lineEndIndex=tvTitel.getLayout().getLineEnd(1);
          String text=tvTitel.getText().subSequence(0,lineEndIndex - 3) + "String_Node_Str";
          tvTitel.setText(text);
        }
 catch (        StringIndexOutOfBoundsException e) {
          e.printStackTrace();
        }
      }
    }
  }
);
  return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_searchresult_detail,container,false);
  view=rootView;
  toolbar=(Toolbar)view.findViewById(R.id.toolbar);
  toolbar.setVisibility(View.VISIBLE);
  setHasOptionsMenu(false);
  if (getActivity() instanceof SearchResultDetailActivity) {
    toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
    toolbar.setNavigationOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        getActivity().supportFinishAfterTransition();
      }
    }
);
    back_button_visible=true;
  }
  toolbar.inflateMenu(R.menu.search_result_details_activity);
  refreshMenu(toolbar.getMenu());
  toolbar.setOnMenuItemClickListener(this);
  setRetainInstance(true);
  setProgress();
  scrollView=(ObservableScrollView)view.findViewById(R.id.rootView);
  scrollView.addCallbacks(this);
  ivCover=(ImageView)view.findViewById(R.id.ivCover);
  gradientBottom=view.findViewById(R.id.gradient_bottom);
  gradientTop=view.findViewById(R.id.gradient_top);
  tint=view.findViewById(R.id.tint);
  tvTitel=(TextView)view.findViewById(R.id.tvTitle);
  llDetails=(LinearLayout)view.findViewById(R.id.llDetails);
  llCopies=(LinearLayout)view.findViewById(R.id.llCopies);
  ImageView iv=(ImageView)view.findViewById(R.id.ivCover);
  if (getArguments().containsKey(ARG_ITEM_COVER_BITMAP)) {
    Bitmap bitmap=getArguments().getParcelable(ARG_ITEM_COVER_BITMAP);
    iv.setImageBitmap(bitmap);
    Palette.generateAsync(bitmap,new Palette.PaletteAsyncListener(){
      @Override public void onGenerated(      Palette palette){
        Palette.Swatch swatch=palette.getDarkVibrantSwatch();
        if (swatch != null) {
          ivCover.setBackgroundColor(swatch.getRgb());
          tint.setBackgroundColor(swatch.getRgb());
        }
      }
    }
);
    analyzeWhitenessOfCoverAsync(bitmap);
    image_analyzed=true;
    showCoverView(true);
  }
 else {
    showCoverView(false);
  }
  fixEllipsize(tvTitel);
  return rootView;
}