Program: 86120
Project: 86120
Buggy source:
public void setSource(TableDataSource source,boolean dragNDrop){
  this.source=source;
  dragNDropEnabled=dragNDrop;
  pagesEntryCount=DEFAULT_ENTRIES_BY_PAGE;
  currentPage=0;
  for (int i=this.getRowCount(); i > 0; i--) {
    this.removeRow(0);
  }
  if (source == null) {
    return;
  }
 else {
    numberOfPages=source.getRowCount() / pagesEntryCount + 1;
  }
  int row=0;
  String[] headers=source.getHeaderRow();
  if (headers != null) {
    int col=0;
    for (; col < headers.length; col++) {
      this.setHTML(row,col + 4,headers[col]);
    }
    this.setText(row,col + 4,"String_Node_Str");
    this.setText(row,col + 5,"String_Node_Str");
    this.getRowFormatter().addStyleName(row,headerStyle);
    row++;
  }
  if (source.getRowCount() != 0) {
    int beginning=currentPage * pagesEntryCount;
    int end=pagesEntryCount * (currentPage + 1);
    if (end > source.getRowCount()) {
      end=source.getRowCount();
    }
    for (int i=0; i < source.getRowCount(); i++) {
      final CheckBox selection=new CheckBox();
      selection.setFormValue(i + "String_Node_Str");
      selection.addClickHandler(new ClickHandler(){
        public void onClick(        ClickEvent event){
          int row=Integer.parseInt(selection.getFormValue());
          if (selection.getValue()) {
            getRowFormatter().addStyleName(row + 1,selectedStyle);
          }
 else {
            getRowFormatter().removeStyleName(row + 1,selectedStyle);
          }
        }
      }
);
      if (dragNDropEnabled) {
        Image im=new DraggableDocIcon(row);
        dndController.makeDraggable(im,im);
        this.setWidget(row,0,im);
        this.setWidget(row,1,selection);
      }
 else {
        this.setWidget(row,0,selection);
      }
      String[] values=source.getRow(i);
      for (int col=0; col < values.length; col++) {
        if (source.getTooltipForRowColumn(i,col) != null) {
          this.setWidget(row,col + 4,new InteractiveEntry(values[col],source.getTooltipForRowColumn(i,col)));
        }
 else {
          this.setHTML(row,col + 4,values[col]);
        }
      }
      getFlexCellFormatter().setWidth(row,0,"String_Node_Str");
      getFlexCellFormatter().setWidth(row,1,"String_Node_Str");
      getFlexCellFormatter().setWidth(row,2,"String_Node_Str");
      if (dragNDropEnabled) {
        getFlexCellFormatter().setWidth(row,0,"String_Node_Str");
        getFlexCellFormatter().setWidth(row,3,"String_Node_Str");
        getFlexCellFormatter().setHorizontalAlignment(row,0,HasHorizontalAlignment.ALIGN_CENTER);
        getFlexCellFormatter().setVerticalAlignment(row,0,HasVerticalAlignment.ALIGN_MIDDLE);
      }
      getRowFormatter().setVisible(row,i >= beginning && i < end);
      row++;
    }
  }
 else {
    Label l=new Label(source.getEmptyCaseMessage());
    this.setWidget(row,0,l);
    getFlexCellFormatter().setColSpan(row,0,getCellCount(0));
    getCellFormatter().setHorizontalAlignment(row,0,HasHorizontalAlignment.ALIGN_CENTER);
  }
  fireEvent();
}

Fixed version (ground truth):
public void setSource(TableDataSource source,boolean dragNDrop){
  this.source=source;
  dragNDropEnabled=dragNDrop;
  pagesEntryCount=DEFAULT_ENTRIES_BY_PAGE;
  currentPage=0;
  for (int i=this.getRowCount(); i > 0; i--) {
    this.removeRow(0);
  }
  if (source == null) {
    return;
  }
 else {
    if (source.getRowCount() % pagesEntryCount != 0) {
      numberOfPages=source.getRowCount() / pagesEntryCount + 1;
    }
 else {
      numberOfPages=source.getRowCount() / pagesEntryCount;
    }
  }
  int row=0;
  String[] headers=source.getHeaderRow();
  if (headers != null) {
    int col=0;
    for (; col < headers.length; col++) {
      this.setHTML(row,col + 4,headers[col]);
    }
    this.setText(row,col + 4,"String_Node_Str");
    this.setText(row,col + 5,"String_Node_Str");
    this.getRowFormatter().addStyleName(row,headerStyle);
    row++;
  }
  if (source.getRowCount() != 0) {
    int beginning=currentPage * pagesEntryCount;
    int end=pagesEntryCount * (currentPage + 1);
    if (end > source.getRowCount()) {
      end=source.getRowCount();
    }
    for (int i=0; i < source.getRowCount(); i++) {
      final CheckBox selection=new CheckBox();
      selection.setFormValue(i + "String_Node_Str");
      selection.addClickHandler(new ClickHandler(){
        public void onClick(        ClickEvent event){
          int row=Integer.parseInt(selection.getFormValue());
          if (selection.getValue()) {
            getRowFormatter().addStyleName(row + 1,selectedStyle);
          }
 else {
            getRowFormatter().removeStyleName(row + 1,selectedStyle);
          }
        }
      }
);
      if (dragNDropEnabled) {
        Image im=new DraggableDocIcon(row);
        dndController.makeDraggable(im,im);
        this.setWidget(row,0,im);
        this.setWidget(row,1,selection);
      }
 else {
        this.setWidget(row,0,selection);
      }
      String[] values=source.getRow(i);
      for (int col=0; col < values.length; col++) {
        if (source.getTooltipForRowColumn(i,col) != null) {
          this.setWidget(row,col + 4,new InteractiveEntry(values[col],source.getTooltipForRowColumn(i,col)));
        }
 else {
          this.setHTML(row,col + 4,values[col]);
        }
      }
      getFlexCellFormatter().setWidth(row,0,"String_Node_Str");
      getFlexCellFormatter().setWidth(row,1,"String_Node_Str");
      getFlexCellFormatter().setWidth(row,2,"String_Node_Str");
      if (dragNDropEnabled) {
        getFlexCellFormatter().setWidth(row,0,"String_Node_Str");
        getFlexCellFormatter().setWidth(row,3,"String_Node_Str");
        getFlexCellFormatter().setHorizontalAlignment(row,0,HasHorizontalAlignment.ALIGN_CENTER);
        getFlexCellFormatter().setVerticalAlignment(row,0,HasVerticalAlignment.ALIGN_MIDDLE);
      }
      getRowFormatter().setVisible(row,i >= beginning && i < end);
      row++;
    }
  }
 else {
    Label l=new Label(source.getEmptyCaseMessage());
    this.setWidget(row,0,l);
    getFlexCellFormatter().setColSpan(row,0,getCellCount(0));
    getCellFormatter().setHorizontalAlignment(row,0,HasHorizontalAlignment.ALIGN_CENTER);
  }
  fireEvent();
}