Program: 188465
Project: 188465
Buggy source:
/** 
 * Create a new panel to view a representation
 * @param viewers
 * @param index
 * @param aipId
 * @param itemBundle
 * @param representationUUID
 * @param fileUUID
 * @param file
 */
public BrowseDIP(Viewers viewers,DipBundle bundle){
  this.viewers=viewers;
  this.bundle=bundle;
  this.aip=bundle.getAip();
  this.representation=bundle.getRepresentation();
  this.file=bundle.getFile();
  this.dip=bundle.getDip();
  this.dipFile=bundle.getDipFile();
  this.dipFileAncestors=bundle.getDipFileAncestors();
  initWidget(uiBinder.createAndBindUi(this));
  HtmlSnippetUtils.setCssClassDisabled(previousButton,true);
  HtmlSnippetUtils.setCssClassDisabled(nextButton,true);
  show();
  initializeRefererListSelectionState();
  if (dipFile != null) {
    ListSelectionUtils.bindLayout(dipFile,previousButton,nextButton,keyboardFocus,true,false,false);
  }
  keyboardFocus.setFocus(true);
  if (file != null) {
    Sliders.createDisseminationsSlider(center,disseminationsButton,file);
    Sliders.createInfoSlider(center,refererInfoButton,bundle.getFile());
    Sliders.createOptionsSlider(center,refererOptionsButton,bundle.getFile());
  }
 else   if (representation != null) {
    Sliders.createDisseminationsSlider(center,disseminationsButton,representation);
    Sliders.createInfoSlider(center,refererInfoButton,bundle.getRepresentation());
    Sliders.createOptionsSlider(center,refererOptionsButton,bundle.getRepresentation());
  }
 else   if (aip != null) {
    Sliders.createDisseminationsSlider(center,disseminationsButton,aip);
    Sliders.createInfoSlider(center,refererInfoButton,bundle.getAip());
    refererOptionsButton.setVisible(false);
  }
 else {
    disseminationsButton.setVisible(false);
    refererInfoButton.setVisible(false);
    refererOptionsButton.setVisible(false);
  }
  if (dipFile != null) {
    Sliders.createOptionsSlider(center,dipOptionsButton,dipFile);
  }
 else {
    Sliders.createOptionsSlider(center,dipOptionsButton,dip);
  }
}

Fixed version (ground truth):
/** 
 * Create a new panel to view a representation
 * @param viewers
 * @param index
 * @param aipId
 * @param itemBundle
 * @param representationUUID
 * @param fileUUID
 * @param file
 */
public BrowseDIP(Viewers viewers,DipBundle bundle){
  this.viewers=viewers;
  this.bundle=bundle;
  this.aip=bundle.getAip();
  this.representation=bundle.getRepresentation();
  this.file=bundle.getFile();
  this.dip=bundle.getDip();
  this.dipFile=bundle.getDipFile();
  this.dipFileAncestors=bundle.getDipFileAncestors();
  initWidget(uiBinder.createAndBindUi(this));
  HtmlSnippetUtils.setCssClassDisabled(previousButton,true);
  HtmlSnippetUtils.setCssClassDisabled(nextButton,true);
  update();
  initializeRefererListSelectionState();
  if (dipFile != null) {
    ListSelectionUtils.bindLayout(dipFile,previousButton,nextButton,keyboardFocus,true,false,false);
  }
  keyboardFocus.setFocus(true);
  if (file != null) {
    Sliders.createDisseminationsSlider(center,disseminationsButton,file);
    Sliders.createInfoSlider(center,refererInfoButton,bundle.getFile());
    Sliders.createOptionsSlider(center,refererOptionsButton,bundle.getFile());
  }
 else   if (representation != null) {
    Sliders.createDisseminationsSlider(center,disseminationsButton,representation);
    Sliders.createInfoSlider(center,refererInfoButton,bundle.getRepresentation());
    Sliders.createOptionsSlider(center,refererOptionsButton,bundle.getRepresentation());
  }
 else   if (aip != null) {
    Sliders.createDisseminationsSlider(center,disseminationsButton,aip);
    Sliders.createInfoSlider(center,refererInfoButton,bundle.getAip());
    refererOptionsButton.setVisible(false);
  }
 else {
    disseminationsButton.setVisible(false);
    refererInfoButton.setVisible(false);
    refererOptionsButton.setVisible(false);
  }
  if (dipFile != null) {
    Sliders.createOptionsSlider(center,dipOptionsButton,dipFile);
  }
 else {
    Sliders.createOptionsSlider(center,dipOptionsButton,dip);
  }
}