Program: 86252
Project: 86252
Buggy source:
protected void display(){
  try {
    Log.i("String_Node_Str",getItem().toString());
  }
 catch (  Exception e) {
    ACRA.getErrorReporter().handleException(e);
  }
  if (getItem().getCoverBitmap() != null) {
    ivCover.setVisibility(View.VISIBLE);
    ivCover.setImageBitmap(getItem().getCoverBitmap());
    if (!image_analyzed) {
      Palette.generateAsync(getItem().getCoverBitmap(),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(getItem().getCoverBitmap());
    }
    tvTitel.setText(getItem().getTitle());
    showCoverView(true);
  }
 else {
    showCoverView(false);
    toolbar.setTitle(getItem().getTitle());
  }
  llDetails.removeAllViews();
  for (  Detail detail : item.getDetails()) {
    View v=getLayoutInflater(null).inflate(R.layout.listitem_detail,null);
    ((TextView)v.findViewById(R.id.tvDesc)).setText(detail.getDesc());
    ((TextView)v.findViewById(R.id.tvContent)).setText(detail.getContent());
    Linkify.addLinks((TextView)v.findViewById(R.id.tvContent),Linkify.WEB_URLS);
    llDetails.addView(v);
  }
  llCopies.removeAllViews();
  if (item.getVolumesearch() != null) {
    TextView tvC=(TextView)view.findViewById(R.id.tvCopies);
    tvC.setText(R.string.baende);
    Button btnVolume=new Button(getActivity());
    btnVolume.setText(R.string.baende_volumesearch);
    btnVolume.setOnClickListener(new OnClickListener(){
      @Override public void onClick(      View v){
        app.startVolumeSearch(getActivity(),getItem().getVolumesearch());
      }
    }
);
    llCopies.addView(btnVolume);
  }
 else   if (item.getBaende().size() > 0) {
    TextView tvC=(TextView)view.findViewById(R.id.tvCopies);
    tvC.setText(R.string.baende);
    for (    final Map<String,String> band : item.getBaende()) {
      View v=getLayoutInflater(null).inflate(R.layout.listitem_volume,null);
      ((TextView)v.findViewById(R.id.tvTitel)).setText(band.get(DetailledItem.KEY_CHILD_TITLE));
      v.findViewById(R.id.llItem).setOnClickListener(new OnClickListener(){
        @Override public void onClick(        View v){
          Intent intent=new Intent(getActivity(),SearchResultDetailActivity.class);
          intent.putExtra(ARG_ITEM_ID,band.get(DetailledItem.KEY_CHILD_ID));
          intent.putExtra("String_Node_Str",true);
          startActivity(intent);
        }
      }
);
      llCopies.addView(v);
    }
  }
 else {
    if (item.getCopies().size() == 0) {
      view.findViewById(R.id.tvCopies).setVisibility(View.GONE);
    }
 else {
      for (      Map<String,String> copy : item.getCopies()) {
        View v=getLayoutInflater(null).inflate(R.layout.listitem_copy,llCopies,false);
        if (v.findViewById(R.id.tvBranch) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_BRANCH)) {
            ((TextView)v.findViewById(R.id.tvBranch)).setText(copy.get(DetailledItem.KEY_COPY_BRANCH));
            v.findViewById(R.id.llBranch).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llBranch).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvDepartment) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_DEPARTMENT)) {
            ((TextView)v.findViewById(R.id.tvDepartment)).setText(copy.get(DetailledItem.KEY_COPY_DEPARTMENT));
            v.findViewById(R.id.llDepartment).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llDepartment).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvLocation) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_LOCATION)) {
            ((TextView)v.findViewById(R.id.tvLocation)).setText(copy.get(DetailledItem.KEY_COPY_LOCATION));
            v.findViewById(R.id.llLocation).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llLocation).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvShelfmark) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_SHELFMARK)) {
            ((TextView)v.findViewById(R.id.tvShelfmark)).setText(copy.get(DetailledItem.KEY_COPY_SHELFMARK));
            v.findViewById(R.id.llShelfmark).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llShelfmark).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvStatus) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_STATUS)) {
            ((TextView)v.findViewById(R.id.tvStatus)).setText(copy.get(DetailledItem.KEY_COPY_STATUS));
            v.findViewById(R.id.llStatus).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llStatus).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvReservations) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_RESERVATIONS)) {
            ((TextView)v.findViewById(R.id.tvReservations)).setText(copy.get(DetailledItem.KEY_COPY_RESERVATIONS));
            v.findViewById(R.id.llReservations).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llReservations).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvReturndate) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_RETURN) && !"String_Node_Str".equals(copy.get(DetailledItem.KEY_COPY_RETURN))) {
            ((TextView)v.findViewById(R.id.tvReturndate)).setText(getString(R.string.ret) + "String_Node_Str" + copy.get(DetailledItem.KEY_COPY_RETURN));
            v.findViewById(R.id.llReturndate).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llReturndate).setVisibility(View.GONE);
          }
        }
        llCopies.addView(v);
      }
    }
  }
  if (id == null || id.equals("String_Node_Str")) {
    id=getItem().getId();
  }
  setProgress(false,true);
  refreshMenu(toolbar.getMenu());
  if (getItem().getCoverBitmap() != null) {
    fixTitle();
  }
 else {
    llCopies.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){
      @Override public void onGlobalLayout(){
        onScrollChanged(0,0);
      }
    }
);
  }
}

Fixed version (ground truth):
protected void display(){
  try {
    Log.i("String_Node_Str",getItem().toString());
  }
 catch (  Exception e) {
    ACRA.getErrorReporter().handleException(e);
  }
  if (getItem().getCoverBitmap() != null) {
    ivCover.setVisibility(View.VISIBLE);
    ivCover.setImageBitmap(getItem().getCoverBitmap());
    if (!image_analyzed) {
      Palette.generateAsync(getItem().getCoverBitmap(),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(getItem().getCoverBitmap());
    }
    tvTitel.setText(getItem().getTitle());
    showCoverView(true);
  }
 else {
    showCoverView(false);
    toolbar.setTitle(getItem().getTitle());
  }
  llDetails.removeAllViews();
  for (  Detail detail : item.getDetails()) {
    View v=getLayoutInflater(null).inflate(R.layout.listitem_detail,null);
    ((TextView)v.findViewById(R.id.tvDesc)).setText(detail.getDesc());
    ((TextView)v.findViewById(R.id.tvContent)).setText(detail.getContent());
    Linkify.addLinks((TextView)v.findViewById(R.id.tvContent),Linkify.WEB_URLS);
    llDetails.addView(v);
  }
  llCopies.removeAllViews();
  if (item.getVolumesearch() != null) {
    TextView tvC=(TextView)view.findViewById(R.id.tvCopies);
    tvC.setText(R.string.baende);
    Button btnVolume=new Button(getActivity());
    btnVolume.setText(R.string.baende_volumesearch);
    btnVolume.setOnClickListener(new OnClickListener(){
      @Override public void onClick(      View v){
        app.startVolumeSearch(getActivity(),getItem().getVolumesearch());
      }
    }
);
    llCopies.addView(btnVolume);
  }
 else   if (item.getBaende().size() > 0) {
    TextView tvC=(TextView)view.findViewById(R.id.tvCopies);
    tvC.setText(R.string.baende);
    for (    final Map<String,String> band : item.getBaende()) {
      View v=getLayoutInflater(null).inflate(R.layout.listitem_volume,null);
      ((TextView)v.findViewById(R.id.tvTitel)).setText(band.get(DetailledItem.KEY_CHILD_TITLE));
      v.findViewById(R.id.llItem).setOnClickListener(new OnClickListener(){
        @Override public void onClick(        View v){
          Intent intent=new Intent(getActivity(),SearchResultDetailActivity.class);
          intent.putExtra(ARG_ITEM_ID,band.get(DetailledItem.KEY_CHILD_ID));
          intent.putExtra("String_Node_Str",true);
          startActivity(intent);
        }
      }
);
      llCopies.addView(v);
    }
  }
 else {
    if (item.getCopies().size() == 0) {
      view.findViewById(R.id.tvCopies).setVisibility(View.GONE);
    }
 else {
      for (      Map<String,String> copy : item.getCopies()) {
        View v=getLayoutInflater(null).inflate(R.layout.listitem_copy,llCopies,false);
        if (v.findViewById(R.id.tvBranch) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_BRANCH)) {
            ((TextView)v.findViewById(R.id.tvBranch)).setText(copy.get(DetailledItem.KEY_COPY_BRANCH));
            v.findViewById(R.id.llBranch).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llBranch).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvDepartment) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_DEPARTMENT)) {
            ((TextView)v.findViewById(R.id.tvDepartment)).setText(copy.get(DetailledItem.KEY_COPY_DEPARTMENT));
            v.findViewById(R.id.llDepartment).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llDepartment).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvLocation) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_LOCATION)) {
            ((TextView)v.findViewById(R.id.tvLocation)).setText(copy.get(DetailledItem.KEY_COPY_LOCATION));
            v.findViewById(R.id.llLocation).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llLocation).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvShelfmark) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_SHELFMARK)) {
            ((TextView)v.findViewById(R.id.tvShelfmark)).setText(copy.get(DetailledItem.KEY_COPY_SHELFMARK));
            v.findViewById(R.id.llShelfmark).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llShelfmark).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvStatus) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_STATUS)) {
            ((TextView)v.findViewById(R.id.tvStatus)).setText(copy.get(DetailledItem.KEY_COPY_STATUS));
            v.findViewById(R.id.llStatus).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llStatus).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvReservations) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_RESERVATIONS)) {
            ((TextView)v.findViewById(R.id.tvReservations)).setText(copy.get(DetailledItem.KEY_COPY_RESERVATIONS));
            v.findViewById(R.id.llReservations).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llReservations).setVisibility(View.GONE);
          }
        }
        if (v.findViewById(R.id.tvReturndate) != null) {
          if (copy.containsKey(DetailledItem.KEY_COPY_RETURN) && !"String_Node_Str".equals(copy.get(DetailledItem.KEY_COPY_RETURN))) {
            ((TextView)v.findViewById(R.id.tvReturndate)).setText(getString(R.string.ret) + "String_Node_Str" + copy.get(DetailledItem.KEY_COPY_RETURN));
            v.findViewById(R.id.llReturndate).setVisibility(View.VISIBLE);
          }
 else {
            v.findViewById(R.id.llReturndate).setVisibility(View.GONE);
          }
        }
        llCopies.addView(v);
      }
    }
  }
  if (id == null || id.equals("String_Node_Str")) {
    id=getItem().getId();
  }
  setProgress(false,true);
  refreshMenu(toolbar.getMenu());
  fixTitle();
}