Program: 53879
Project: 53879
Buggy source:
/** 
 * Construct a   {@link SimplePager} with the specified resources.
 * @param location the location of the text relative to the buttons
 * @param resources the {@link Resources} to use
 * @param showFastForwardButton if true, show a fast-forward button thatadvances by a larger increment than a single page
 * @param fastForwardRows the number of rows to jump when fast forwarding
 * @param showLastPageButton if true, show a button to go the the last page
 */
public SimplePager(TextLocation location,Resources resources,boolean showFastForwardButton,final int fastForwardRows,boolean showLastPageButton){
  this.resources=resources;
  this.fastForwardRows=fastForwardRows;
  this.style=resources.simplePagerStyle();
  this.style.ensureInjected();
  firstPage=new Image(resources.simplePagerFirstPage());
  firstPage.addClickHandler(new ClickHandler(){
    public void onClick(    ClickEvent event){
      firstPage();
    }
  }
);
  nextPage=new Image(resources.simplePagerNextPage());
  nextPage.addClickHandler(new ClickHandler(){
    public void onClick(    ClickEvent event){
      nextPage();
    }
  }
);
  prevPage=new Image(resources.simplePagerPreviousPage());
  prevPage.addClickHandler(new ClickHandler(){
    public void onClick(    ClickEvent event){
      previousPage();
    }
  }
);
  if (showLastPageButton) {
    lastPage=new Image(resources.simplePagerLastPage());
    lastPage.addClickHandler(new ClickHandler(){
      public void onClick(      ClickEvent event){
        lastPage();
      }
    }
);
  }
 else {
    lastPage=null;
  }
  if (showFastForwardButton) {
    fastForward=new Image(resources.simplePagerFastForward());
    fastForward.addClickHandler(new ClickHandler(){
      public void onClick(      ClickEvent event){
        setPage(getPage() + getFastForwardPages());
      }
    }
);
  }
 else {
    fastForward=null;
  }
  HorizontalPanel layout=new HorizontalPanel();
  layout.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
  initWidget(layout);
  if (location == TextLocation.RIGHT) {
    layout.add(label);
  }
  layout.add(firstPage);
  layout.add(prevPage);
  if (location == TextLocation.CENTER) {
    layout.add(label);
  }
  layout.add(nextPage);
  if (showFastForwardButton) {
    layout.add(fastForward);
  }
  if (showLastPageButton) {
    layout.add(lastPage);
  }
  if (location == TextLocation.LEFT) {
    layout.add(label);
  }
  firstPage.getElement().getParentElement().addClassName(style.button());
  prevPage.getElement().getParentElement().addClassName(style.button());
  label.getElement().getParentElement().addClassName(style.pageDetails());
  nextPage.getElement().getParentElement().addClassName(style.button());
  if (showFastForwardButton) {
    fastForward.getElement().getParentElement().addClassName(style.button());
  }
  if (showLastPageButton) {
    lastPage.getElement().getParentElement().addClassName(style.button());
  }
  setDisplay(null);
}

Fixed version (ground truth):
/** 
 * Construct a   {@link SimplePager} with the specified resources.
 * @param location the location of the text relative to the buttons
 * @param resources the {@link Resources} to use
 * @param showFastForwardButton if true, show a fast-forward button thatadvances by a larger increment than a single page
 * @param fastForwardRows the number of rows to jump when fast forwarding
 * @param showLastPageButton if true, show a button to go the the last page
 */
public SimplePager(TextLocation location,Resources resources,boolean showFastForwardButton,final int fastForwardRows,boolean showLastPageButton){
  this.resources=resources;
  this.fastForwardRows=fastForwardRows;
  this.style=resources.simplePagerStyle();
  this.style.ensureInjected();
  String disabledStyle=style.disabledButton();
  firstPage=new ImageButton(resources.simplePagerFirstPage(),resources.simplePagerFirstPageDisabled(),disabledStyle);
  firstPage.addClickHandler(new ClickHandler(){
    public void onClick(    ClickEvent event){
      firstPage();
    }
  }
);
  nextPage=new ImageButton(resources.simplePagerNextPage(),resources.simplePagerNextPageDisabled(),disabledStyle);
  nextPage.addClickHandler(new ClickHandler(){
    public void onClick(    ClickEvent event){
      nextPage();
    }
  }
);
  prevPage=new ImageButton(resources.simplePagerPreviousPage(),resources.simplePagerPreviousPageDisabled(),disabledStyle);
  prevPage.addClickHandler(new ClickHandler(){
    public void onClick(    ClickEvent event){
      previousPage();
    }
  }
);
  if (showLastPageButton) {
    lastPage=new ImageButton(resources.simplePagerLastPage(),resources.simplePagerLastPageDisabled(),disabledStyle);
    lastPage.addClickHandler(new ClickHandler(){
      public void onClick(      ClickEvent event){
        lastPage();
      }
    }
);
  }
 else {
    lastPage=null;
  }
  if (showFastForwardButton) {
    fastForward=new ImageButton(resources.simplePagerFastForward(),resources.simplePagerFastForwardDisabled(),disabledStyle);
    fastForward.addClickHandler(new ClickHandler(){
      public void onClick(      ClickEvent event){
        setPage(getPage() + getFastForwardPages());
      }
    }
);
  }
 else {
    fastForward=null;
  }
  HorizontalPanel layout=new HorizontalPanel();
  layout.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
  initWidget(layout);
  if (location == TextLocation.RIGHT) {
    layout.add(label);
  }
  layout.add(firstPage);
  layout.add(prevPage);
  if (location == TextLocation.CENTER) {
    layout.add(label);
  }
  layout.add(nextPage);
  if (showFastForwardButton) {
    layout.add(fastForward);
  }
  if (showLastPageButton) {
    layout.add(lastPage);
  }
  if (location == TextLocation.LEFT) {
    layout.add(label);
  }
  firstPage.getElement().getParentElement().addClassName(style.button());
  prevPage.getElement().getParentElement().addClassName(style.button());
  label.getElement().getParentElement().addClassName(style.pageDetails());
  nextPage.getElement().getParentElement().addClassName(style.button());
  if (showFastForwardButton) {
    fastForward.getElement().getParentElement().addClassName(style.button());
  }
  if (showLastPageButton) {
    lastPage.getElement().getParentElement().addClassName(style.button());
  }
  setDisplay(null);
}