nus-yam/ex-repair huggingface dataset:
Program: 53717
Project: 53717
Buggy source:
/** 
 * Test that the correct values are sent to the Cell to be rendered.
 */
public void testRenderWithKeyProvider(){
  final List<String> rendered=new ArrayList<String>();
  final Cell<String> cell=new TextCell(){
    @Override public void render(    Context context,    SafeHtml data,    SafeHtmlBuilder sb){
      int call=rendered.size();
      rendered.add(data.asString());
      assertTrue("String_Node_Str",rendered.size() < 11);
      Object key=context.getKey();
      assertEquals("String_Node_Str" + call,data.asString());
      assertTrue(key instanceof Integer);
      assertEquals(call,key);
    }
  }
;
  ProvidesKey<String> keyProvider=new ProvidesKey<String>(){
    public Object getKey(    String item){
      return Integer.parseInt(item.substring(5));
    }
  }
;
  CellList<String> cellList=new CellList<String>(cell,keyProvider);
  cellList.setRowData(createData(0,10));
  cellList.getPresenter().flush();
  assertEquals(10,rendered.size());
}

Fixed version (ground truth):
/** 
 * Test that the correct values are sent to the Cell to be rendered.
 */
public void testRenderWithKeyProvider(){
  final List<String> rendered=new ArrayList<String>();
  final Cell<String> cell=new TextCell(){
    @Override public void render(    Context context,    SafeHtml data,    SafeHtmlBuilder sb){
      int call=rendered.size();
      rendered.add(data.asString());
      assertTrue("String_Node_Str",rendered.size() < 11);
      Object key=context.getKey();
      assertEquals("String_Node_Str" + call,data.asString());
      assertTrue(key instanceof Integer);
      assertEquals(call,key);
    }
  }
;
  ProvidesKey<String> keyProvider=new ProvidesKey<String>(){
    @Override public Object getKey(    String item){
      return Integer.parseInt(item.substring(5));
    }
  }
;
  CellList<String> cellList=new CellList<String>(cell,keyProvider);
  cellList.setRowData(createData(0,10));
  cellList.getPresenter().flush();
  assertEquals(10,rendered.size());
}
Program: 53718
Project: 53718
Buggy source:
private void createResourceUiRenderer(XMLElement elem,String resourceName,JClassType resourceType,JClassType matchingResourceType) throws UnableToCompleteException {
  FieldWriter fieldWriter;
  if (resourceType != null && !resourceType.getErasedType().isAssignableFrom(matchingResourceType.getErasedType())) {
    writer.die(elem,"String_Node_Str",resourceName,writer.getBaseClass().getQualifiedSourceName());
  }
  fieldWriter=fieldManager.registerField(FieldWriterType.IMPORTED,matchingResourceType.getErasedType(),resourceName);
  fieldWriter.setInitializer("String_Node_Str" + resourceName);
}

Fixed version (ground truth):
private void createResourceUiRenderer(XMLElement elem,String resourceName,JClassType resourceType,JClassType matchingResourceType) throws UnableToCompleteException {
  FieldWriter fieldWriter;
  if (resourceType != null && !resourceType.getErasedType().isAssignableFrom(matchingResourceType.getErasedType())) {
    writer.die(elem,"String_Node_Str",resourceName,writer.getBaseClass().getQualifiedSourceName());
  }
  fieldWriter=fieldManager.registerField(FieldWriterType.IMPORTED,matchingResourceType.getErasedType(),resourceName);
  fieldWriter.setInitializer(UiBinderWriter.RENDER_PARAM_HOLDER_PREFIX + resourceName);
}
Program: 53719
Project: 53719
Buggy source:
private void writeRenderParameterDefinitions(IndentedWriter w,JParameter[] renderParameters){
  for (int i=0; i < renderParameters.length; i++) {
    JParameter parameter=renderParameters[i];
    w.write("String_Node_Str",parameter.getType().getQualifiedSourceName(),parameter.getName());
    w.newline();
  }
}

Fixed version (ground truth):
private void writeRenderParameterDefinitions(IndentedWriter w,JParameter[] renderParameters){
  for (int i=0; i < renderParameters.length; i++) {
    JParameter parameter=renderParameters[i];
    w.write("String_Node_Str",parameter.getType().getQualifiedSourceName(),RENDER_PARAM_HOLDER_PREFIX,parameter.getName());
    w.newline();
  }
}
Program: 53720
Project: 53720
Buggy source:
private void writeRenderParameterInitializers(IndentedWriter w,JParameter[] renderParameters){
  for (int i=0; i < renderParameters.length; i++) {
    JParameter parameter=renderParameters[i];
    w.write("String_Node_Str",parameter.getName(),parameter.getName());
    w.newline();
  }
}

Fixed version (ground truth):
private void writeRenderParameterInitializers(IndentedWriter w,JParameter[] renderParameters){
  for (int i=0; i < renderParameters.length; i++) {
    JParameter parameter=renderParameters[i];
    w.write("String_Node_Str",RENDER_PARAM_HOLDER_PREFIX,parameter.getName(),parameter.getName());
    w.newline();
  }
}
Program: 53721
Project: 53721
Buggy source:
public void testFieldGetters(){
  assertTrue(renderer.isParentOrRenderer(docDiv));
  DivElement root=renderer.getRoot(docDiv);
  assertTrue(renderer.isParentOrRenderer(root));
  assertNotNull(root);
  assertSpanContainsRenderedValue(root);
  SpanElement nameSpan=renderer.getNameSpan(docDiv);
  assertSpanContainsRenderedValueText(nameSpan.getFirstChild());
  DivElement root2=renderer.getRoot(root);
  assertTrue(renderer.isParentOrRenderer(root2));
  assertNotNull(root2);
  assertSpanContainsRenderedValue(root2);
  nameSpan=renderer.getNameSpan(root);
  assertSpanContainsRenderedValueText(nameSpan.getFirstChild());
}

Fixed version (ground truth):
public void testFieldGetters(){
  assertTrue(renderer.isParentOrRenderer(docDiv));
  DivElement root=renderer.getRoot(docDiv);
  assertTrue(renderer.isParentOrRenderer(root));
  assertNotNull(root);
  assertSpanContainsRenderedValue(root);
  SpanElement nameSpan=renderer.getNameSpan(docDiv);
  assertSpanContainsRenderedValueText(RENDERED_VALUE,nameSpan.getFirstChild());
  DivElement root2=renderer.getRoot(root);
  assertTrue(renderer.isParentOrRenderer(root2));
  assertNotNull(root2);
  assertSpanContainsRenderedValue(root2);
  nameSpan=renderer.getNameSpan(root);
  assertSpanContainsRenderedValueText(RENDERED_VALUE,nameSpan.getFirstChild());
}
Program: 53722
Project: 53722
Buggy source:
private void assertSpanContainsRenderedValue(Node root){
  Node firstFieldNode=root.getChild(2);
  assertEquals(Node.ELEMENT_NODE,firstFieldNode.getNodeType());
  assertEquals("String_Node_Str",firstFieldNode.getNodeName().toLowerCase());
  assertTrue(firstFieldNode.hasChildNodes());
  Node renderedValue=firstFieldNode.getFirstChild();
  assertSpanContainsRenderedValueText(renderedValue);
}

Fixed version (ground truth):
private void assertSpanContainsRenderedValue(Node root){
  Node firstFieldNode=root.getChild(2);
  assertEquals(Node.ELEMENT_NODE,firstFieldNode.getNodeType());
  assertEquals("String_Node_Str",firstFieldNode.getNodeName().toLowerCase());
  assertTrue(firstFieldNode.hasChildNodes());
  Node renderedValue=firstFieldNode.getFirstChild();
  assertSpanContainsRenderedValueText(RENDERED_VALUE,renderedValue);
}
Program: 53723
Project: 53723
Buggy source:
public void testFieldGettersNotOnlyChild(){
  DivElement root=renderer.getRoot(docDiv);
  docDiv.appendChild(Document.get().createSpanElement());
  DivElement rootAgain=renderer.getRoot(docDiv);
  assertEquals(root,rootAgain);
  if (GWT.isProdMode()) {
    assertTrue(renderer.isParentOrRenderer(docDiv));
    SpanElement nameSpan=renderer.getNameSpan(docDiv);
    assertSpanContainsRenderedValueText(nameSpan.getFirstChild());
  }
 else {
    assertFalse(renderer.isParentOrRenderer(docDiv));
    try {
      renderer.getNameSpan(docDiv);
      fail("String_Node_Str");
    }
 catch (    IllegalArgumentException e) {
    }
  }
}

Fixed version (ground truth):
public void testFieldGettersNotOnlyChild(){
  DivElement root=renderer.getRoot(docDiv);
  docDiv.appendChild(Document.get().createSpanElement());
  DivElement rootAgain=renderer.getRoot(docDiv);
  assertEquals(root,rootAgain);
  if (GWT.isProdMode()) {
    assertTrue(renderer.isParentOrRenderer(docDiv));
    SpanElement nameSpan=renderer.getNameSpan(docDiv);
    assertSpanContainsRenderedValueText(RENDERED_VALUE,nameSpan.getFirstChild());
  }
 else {
    assertFalse(renderer.isParentOrRenderer(docDiv));
    try {
      renderer.getNameSpan(docDiv);
      fail("String_Node_Str");
    }
 catch (    IllegalArgumentException e) {
    }
  }
}
Program: 53724
Project: 53724
Buggy source:
public void testSafeHtmlRendererText(){
  Node innerDiv=docDiv.getFirstChild();
  Node spanWithConstantTextNode=innerDiv.getChild(0);
  assertEquals("String_Node_Str",spanWithConstantTextNode.getNodeName().toLowerCase());
  assertEquals(Node.TEXT_NODE,spanWithConstantTextNode.getFirstChild().getNodeType());
  assertEquals("String_Node_Str",spanWithConstantTextNode.getFirstChild().getNodeValue());
  Node firstRawTextNode=innerDiv.getChild(1);
  assertEquals(Node.TEXT_NODE,firstRawTextNode.getNodeType());
  assertEquals("String_Node_Str",firstRawTextNode.getNodeValue());
  assertSpanContainsRenderedValue(innerDiv);
  Node secondRawTextNode=innerDiv.getChild(3);
  assertEquals(Node.TEXT_NODE,secondRawTextNode.getNodeType());
  assertEquals("String_Node_Str",secondRawTextNode.getNodeValue());
  Node spanNode=innerDiv.getChild(4);
  assertEquals(Node.ELEMENT_NODE,spanNode.getNodeType());
  assertEquals("String_Node_Str",spanNode.getNodeName().toLowerCase());
  assertFalse(spanNode.hasChildNodes());
}

Fixed version (ground truth):
public void testSafeHtmlRendererText(){
  Node innerDiv=docDiv.getFirstChild();
  Node spanWithConstantTextNode=innerDiv.getChild(0);
  assertEquals("String_Node_Str",spanWithConstantTextNode.getNodeName().toLowerCase());
  assertEquals(Node.TEXT_NODE,spanWithConstantTextNode.getFirstChild().getNodeType());
  assertEquals("String_Node_Str",spanWithConstantTextNode.getFirstChild().getNodeValue());
  Node firstRawTextNode=innerDiv.getChild(1);
  assertEquals(Node.TEXT_NODE,firstRawTextNode.getNodeType());
  assertEquals("String_Node_Str",firstRawTextNode.getNodeValue());
  assertSpanContainsRenderedValue(innerDiv);
  Node secondRawTextNode=innerDiv.getChild(3);
  assertEquals(Node.TEXT_NODE,secondRawTextNode.getNodeType());
  assertEquals("String_Node_Str",secondRawTextNode.getNodeValue());
  Node spanNode=innerDiv.getChild(4);
  assertEquals(Node.ELEMENT_NODE,spanNode.getNodeType());
  assertEquals("String_Node_Str",spanNode.getNodeName().toLowerCase());
  assertFalse(spanNode.hasChildNodes());
  Node spanNode2=innerDiv.getChild(5);
  assertEquals(Node.ELEMENT_NODE,spanNode2.getNodeType());
  assertEquals("String_Node_Str",spanNode2.getNodeName().toLowerCase());
  assertTrue(spanNode2.hasChildNodes());
  assertSpanContainsRenderedValueText(RENDERED_VALUE_TWICE + RENDERED_VALUE_TWICE,spanNode2.getFirstChild());
}
Program: 53725
Project: 53725
Buggy source:
@Override public void gwtSetUp() throws Exception {
  super.gwtSetUp();
  UiRendererTestApp app=UiRendererTestApp.getInstance();
  safeHtmlUi=app.getSafeHtmlUi();
  renderedHtml=safeHtmlUi.render(RENDERED_VALUE);
  renderer=safeHtmlUi.getRenderer();
  docDiv=Document.get().createDivElement();
  docDiv.setInnerHTML(renderedHtml.asString());
  Document.get().getBody().appendChild(docDiv);
}

Fixed version (ground truth):
@Override public void gwtSetUp() throws Exception {
  super.gwtSetUp();
  UiRendererTestApp app=UiRendererTestApp.getInstance();
  safeHtmlUi=app.getSafeHtmlUi();
  renderedHtml=safeHtmlUi.render(RENDERED_VALUE,RENDERED_VALUE_TWICE);
  renderer=safeHtmlUi.getRenderer();
  docDiv=Document.get().createDivElement();
  docDiv.setInnerHTML(renderedHtml.asString());
  Document.get().getBody().appendChild(docDiv);
}
Program: 53726
Project: 53726
Buggy source:
private void assertSpanContainsRenderedValueText(Node renderedValue){
  assertEquals(Node.TEXT_NODE,renderedValue.getNodeType());
  assertEquals(RENDERED_VALUE,renderedValue.getNodeValue());
}

Fixed version (ground truth):
private void assertSpanContainsRenderedValueText(String expectedValue,Node renderedValue){
  assertEquals(Node.TEXT_NODE,renderedValue.getNodeType());
  assertEquals(expectedValue,renderedValue.getNodeValue());
}
Program: 53727
Project: 53727
Buggy source:
public SafeHtml render(String value){
  SafeHtmlBuilder sb=new SafeHtmlBuilder();
  getRenderer().render(sb,new Foo(value));
  return sb.toSafeHtml();
}

Fixed version (ground truth):
public SafeHtml render(String value,String valueTwice){
  SafeHtmlBuilder sb=new SafeHtmlBuilder();
  getRenderer().render(sb,new Foo(value),new Foo(valueTwice));
  return sb.toSafeHtml();
}
Program: 53728
Project: 53728
Buggy source:
public void onRowCountChange(RowCountChangeEvent event){
  if (AbstractPager.this.display != null) {
    handleRowCountChange(event.getNewRowCount(),event.isNewRowCountExact());
  }
}

Fixed version (ground truth):
@Override public void onRowCountChange(RowCountChangeEvent event){
  if (AbstractPager.this.display != null) {
    handleRowCountChange(event.getNewRowCount(),event.isNewRowCountExact());
  }
}
Program: 53729
Project: 53729
Buggy source:
public void onRangeChange(RangeChangeEvent event){
  if (AbstractPager.this.display != null) {
    onRangeOrRowCountChanged();
  }
}

Fixed version (ground truth):
@Override public void onRangeChange(RangeChangeEvent event){
  if (AbstractPager.this.display != null) {
    onRangeOrRowCountChanged();
  }
}
Program: 53730
Project: 53730
Buggy source:
/** 
 * Set the   {@link HasRows} to be paged.
 * @param display the {@link HasRows}
 * @see #getDisplay()
 */
public void setDisplay(HasRows display){
  if (rangeChangeHandler != null) {
    rangeChangeHandler.removeHandler();
    rangeChangeHandler=null;
  }
  if (rowCountChangeHandler != null) {
    rowCountChangeHandler.removeHandler();
    rangeChangeHandler=null;
  }
  this.display=display;
  if (display != null) {
    rangeChangeHandler=display.addRangeChangeHandler(new RangeChangeEvent.Handler(){
      public void onRangeChange(      RangeChangeEvent event){
        if (AbstractPager.this.display != null) {
          onRangeOrRowCountChanged();
        }
      }
    }
);
    rowCountChangeHandler=display.addRowCountChangeHandler(new RowCountChangeEvent.Handler(){
      public void onRowCountChange(      RowCountChangeEvent event){
        if (AbstractPager.this.display != null) {
          handleRowCountChange(event.getNewRowCount(),event.isNewRowCountExact());
        }
      }
    }
);
    onRangeOrRowCountChanged();
  }
}

Fixed version (ground truth):
/** 
 * Set the   {@link HasRows} to be paged.
 * @param display the {@link HasRows}
 * @see #getDisplay()
 */
public void setDisplay(HasRows display){
  if (rangeChangeHandler != null) {
    rangeChangeHandler.removeHandler();
    rangeChangeHandler=null;
  }
  if (rowCountChangeHandler != null) {
    rowCountChangeHandler.removeHandler();
    rowCountChangeHandler=null;
  }
  this.display=display;
  if (display != null) {
    rangeChangeHandler=display.addRangeChangeHandler(new RangeChangeEvent.Handler(){
      @Override public void onRangeChange(      RangeChangeEvent event){
        if (AbstractPager.this.display != null) {
          onRangeOrRowCountChanged();
        }
      }
    }
);
    rowCountChangeHandler=display.addRowCountChangeHandler(new RowCountChangeEvent.Handler(){
      @Override public void onRowCountChange(      RowCountChangeEvent event){
        if (AbstractPager.this.display != null) {
          handleRowCountChange(event.getNewRowCount(),event.isNewRowCountExact());
        }
      }
    }
);
    onRangeOrRowCountChanged();
  }
}
Program: 53731
Project: 53731
Buggy source:
/** 
 * Performs a   {@link DOM#getElementById(String)} after attaching the panel'selement into a hidden DIV in the document's body. Attachment is necessary to be able to use the native getElementById. The panel's element will be re-attached to its original parent (if any) after the method returns.
 * @param id the id whose associated element is to be retrieved
 * @return the associated element, or <code>null</code> if none is found
 */
private Element attachToDomAndGetElement(String id){
  if (hiddenDiv == null) {
    hiddenDiv=Document.get().createDivElement();
    UIObject.setVisible(hiddenDiv,false);
    RootPanel.getBodyElement().appendChild(hiddenDiv);
  }
  Element origParent=getElement().getParentElement();
  Element origSibling=getElement().getNextSiblingElement();
  hiddenDiv.appendChild(getElement());
  Element child=Document.get().getElementById(id);
  if (origParent != null) {
    origParent.insertBefore(getElement(),origSibling);
  }
 else {
    hiddenDiv.removeChild(getElement());
  }
  return child;
}

Fixed version (ground truth):
/** 
 * Performs a   {@link Document#getElementById(String)} after attaching the panel'selement into a hidden DIV in the document's body. Attachment is necessary to be able to use the native getElementById. The panel's element will be re-attached to its original parent (if any) after the method returns.
 * @param id the id whose associated element is to be retrieved
 * @return the associated element, or <code>null</code> if none is found
 */
private Element attachToDomAndGetElement(String id){
  if (hiddenDiv == null) {
    hiddenDiv=Document.get().createDivElement();
    UIObject.setVisible(hiddenDiv,false);
    RootPanel.getBodyElement().appendChild(hiddenDiv);
  }
  Element origParent=getElement().getParentElement();
  Element origSibling=getElement().getNextSiblingElement();
  hiddenDiv.appendChild(getElement());
  Element child=Document.get().getElementById(id);
  if (origParent != null) {
    origParent.insertBefore(getElement(),origSibling);
  }
 else {
    hiddenDiv.removeChild(getElement());
  }
  return child;
}
Program: 53732
Project: 53732
Buggy source:
/** 
 * Ensures that   {@link HTMLPanel#addAndReplaceChild(Widget,String)} puts thewidget in exactly the right place in the DOM.
 */
public void testAddAndReplaceElement(){
  HTMLPanel hp=new HTMLPanel("String_Node_Str");
  Button button=new Button("String_Node_Str");
  hp.addAndReplaceElement(button,"String_Node_Str");
  assertParentId(button,"String_Node_Str");
  assertIsBetweenSiblings(button,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Ensures that   {@link HTMLPanel#addAndReplaceElement(Widget,String)} putsthe widget in exactly the right place in the DOM.
 */
public void testAddAndReplaceElement(){
  HTMLPanel hp=new HTMLPanel("String_Node_Str");
  Button button=new Button("String_Node_Str");
  hp.addAndReplaceElement(button,"String_Node_Str");
  assertParentId(button,"String_Node_Str");
  assertIsBetweenSiblings(button,"String_Node_Str","String_Node_Str");
}
Program: 53733
Project: 53733
Buggy source:
/** 
 * Ensures that  {@link HTMLPanel#addAndReplaceElement(Widget,com.google.gwt.user.client.Element)}puts the widget in exactly the right place in the DOM.
 */
@SuppressWarnings("String_Node_Str") public void testAddAndReplaceElementForUserElement(){
  HTMLPanel hp=new HTMLPanel("String_Node_Str");
  RootPanel.get().add(hp);
  com.google.gwt.user.client.Element placeholder=hp.getElementById("String_Node_Str");
  Button button=new Button("String_Node_Str");
  hp.addAndReplaceElement(button,placeholder);
  assertParentId(button,"String_Node_Str");
  assertIsBetweenSiblings(button,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Ensures that   {@link HTMLPanel#addAndReplaceElement(Widget,Element)} putsthe widget in exactly the right place in the DOM.
 */
@SuppressWarnings("String_Node_Str") public void testAddAndReplaceElementForUserElement(){
  HTMLPanel hp=new HTMLPanel("String_Node_Str");
  RootPanel.get().add(hp);
  com.google.gwt.user.client.Element placeholder=hp.getElementById("String_Node_Str");
  Button button=new Button("String_Node_Str");
  hp.addAndReplaceElement(button,placeholder);
  assertParentId(button,"String_Node_Str");
  assertIsBetweenSiblings(button,"String_Node_Str","String_Node_Str");
}
Program: 53734
Project: 53734
Buggy source:
public String getModuleName(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getModuleName(){
  return "String_Node_Str";
}
Program: 53735
Project: 53735
Buggy source:
public void addChild(HasWidgets container,Widget child){
  ((HTMLPanel)container).add(child,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void addChild(HasWidgets container,Widget child){
  ((HTMLPanel)container).add(child,"String_Node_Str");
}
Program: 53736
Project: 53736
Buggy source:
public boolean isRowCountExact(){
  return presenter.isRowCountExact();
}

Fixed version (ground truth):
@Override public boolean isRowCountExact(){
  return presenter.isRowCountExact();
}
Program: 53737
Project: 53737
Buggy source:
public ProvidesKey<T> getKeyProvider(){
  return presenter.getKeyProvider();
}

Fixed version (ground truth):
@Override public ProvidesKey<T> getKeyProvider(){
  return presenter.getKeyProvider();
}
Program: 53738
Project: 53738
Buggy source:
public void setLoadingState(LoadingState state){
  hasData.isRefreshing=true;
  hasData.onLoadingStateChanged(state);
  hasData.isRefreshing=false;
}

Fixed version (ground truth):
@Override public void setLoadingState(LoadingState state){
  hasData.isRefreshing=true;
  hasData.onLoadingStateChanged(state);
  hasData.isRefreshing=false;
}
Program: 53739
Project: 53739
Buggy source:
public HandlerRegistration addCellPreviewHandler(CellPreviewEvent.Handler<T> handler){
  return presenter.addCellPreviewHandler(handler);
}

Fixed version (ground truth):
@Override public HandlerRegistration addCellPreviewHandler(CellPreviewEvent.Handler<T> handler){
  return presenter.addCellPreviewHandler(handler);
}
Program: 53740
Project: 53740
Buggy source:
public int getTabIndex(){
  return tabIndex;
}

Fixed version (ground truth):
@Override public int getTabIndex(){
  return tabIndex;
}
Program: 53741
Project: 53741
Buggy source:
public int getRowCount(){
  return presenter.getRowCount();
}

Fixed version (ground truth):
@Override public int getRowCount(){
  return presenter.getRowCount();
}
Program: 53742
Project: 53742
Buggy source:
public SelectionModel<? super T> getSelectionModel(){
  return presenter.getSelectionModel();
}

Fixed version (ground truth):
@Override public SelectionModel<? super T> getSelectionModel(){
  return presenter.getSelectionModel();
}
Program: 53743
Project: 53743
Buggy source:
public KeyboardPagingPolicy getKeyboardPagingPolicy(){
  return presenter.getKeyboardPagingPolicy();
}

Fixed version (ground truth):
@Override public KeyboardPagingPolicy getKeyboardPagingPolicy(){
  return presenter.getKeyboardPagingPolicy();
}
Program: 53744
Project: 53744
Buggy source:
public void execute(){
  if (!hasData.resetFocusOnCell()) {
    Element elem=hasData.getKeyboardSelectedElement();
    if (elem != null) {
      elem.focus();
    }
  }
}

Fixed version (ground truth):
@Override public void execute(){
  if (!hasData.resetFocusOnCell()) {
    Element elem=hasData.getKeyboardSelectedElement();
    if (elem != null) {
      elem.focus();
    }
  }
}
Program: 53745
Project: 53745
Buggy source:
public void setKeyboardPagingPolicy(KeyboardPagingPolicy policy){
  presenter.setKeyboardPagingPolicy(policy);
}

Fixed version (ground truth):
@Override public void setKeyboardPagingPolicy(KeyboardPagingPolicy policy){
  presenter.setKeyboardPagingPolicy(policy);
}
Program: 53746
Project: 53746
Buggy source:
public void setVisibleRange(Range range){
  presenter.setVisibleRange(range);
}

Fixed version (ground truth):
@Override public void setVisibleRange(Range range){
  presenter.setVisibleRange(range);
}
Program: 53747
Project: 53747
Buggy source:
public void setVisibleRangeAndClearData(Range range,boolean forceRangeChangeEvent){
  presenter.setVisibleRangeAndClearData(range,forceRangeChangeEvent);
}

Fixed version (ground truth):
@Override public void setVisibleRangeAndClearData(Range range,boolean forceRangeChangeEvent){
  presenter.setVisibleRangeAndClearData(range,forceRangeChangeEvent);
}
Program: 53748
Project: 53748
Buggy source:
/** 
 * {@inheritDoc}
 * @see #getAccessKey()
 */
public void setAccessKey(char key){
  this.accessKey=key;
  setKeyboardSelected(getKeyboardSelectedRow(),true,false);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see #getAccessKey()
 */
@Override public void setAccessKey(char key){
  this.accessKey=key;
  setKeyboardSelected(getKeyboardSelectedRow(),true,false);
}
Program: 53749
Project: 53749
Buggy source:
public void setRowData(int start,List<? extends T> values){
  presenter.setRowData(start,values);
}

Fixed version (ground truth):
@Override public void setRowData(int start,List<? extends T> values){
  presenter.setRowData(start,values);
}
Program: 53750
Project: 53750
Buggy source:
public int getVisibleItemCount(){
  return presenter.getVisibleItemCount();
}

Fixed version (ground truth):
@Override public int getVisibleItemCount(){
  return presenter.getVisibleItemCount();
}
Program: 53751
Project: 53751
Buggy source:
public void setKeyboardSelectionPolicy(KeyboardSelectionPolicy policy){
  presenter.setKeyboardSelectionPolicy(policy);
}

Fixed version (ground truth):
@Override public void setKeyboardSelectionPolicy(KeyboardSelectionPolicy policy){
  presenter.setKeyboardSelectionPolicy(policy);
}
Program: 53752
Project: 53752
Buggy source:
public void render(SafeHtmlBuilder sb,List<T> values,int start,SelectionModel<? super T> selectionModel){
  hasData.renderRowValues(sb,values,start,selectionModel);
}

Fixed version (ground truth):
@Override public void render(SafeHtmlBuilder sb,List<T> values,int start,SelectionModel<? super T> selectionModel){
  hasData.renderRowValues(sb,values,start,selectionModel);
}
Program: 53753
Project: 53753
Buggy source:
public <H extends EventHandler>HandlerRegistration addHandler(H handler,Type<H> type){
  return hasData.addHandler(handler,type);
}

Fixed version (ground truth):
@Override public <H extends EventHandler>HandlerRegistration addHandler(H handler,Type<H> type){
  return hasData.addHandler(handler,type);
}
Program: 53754
Project: 53754
Buggy source:
public HandlerRegistration addRangeChangeHandler(RangeChangeEvent.Handler handler){
  return presenter.addRangeChangeHandler(handler);
}

Fixed version (ground truth):
@Override public HandlerRegistration addRangeChangeHandler(RangeChangeEvent.Handler handler){
  return presenter.addRangeChangeHandler(handler);
}
Program: 53755
Project: 53755
Buggy source:
public void setFocus(boolean focused){
  Element elem=getKeyboardSelectedElement();
  if (elem != null) {
    if (focused) {
      elem.focus();
    }
 else {
      elem.blur();
    }
  }
}

Fixed version (ground truth):
@Override public void setFocus(boolean focused){
  Element elem=getKeyboardSelectedElement();
  if (elem != null) {
    if (focused) {
      elem.focus();
    }
 else {
      elem.blur();
    }
  }
}
Program: 53756
Project: 53756
Buggy source:
public HandlerRegistration addRowCountChangeHandler(RowCountChangeEvent.Handler handler){
  return presenter.addRowCountChangeHandler(handler);
}

Fixed version (ground truth):
@Override public HandlerRegistration addRowCountChangeHandler(RowCountChangeEvent.Handler handler){
  return presenter.addRowCountChangeHandler(handler);
}
Program: 53757
Project: 53757
Buggy source:
public Range getVisibleRange(){
  return presenter.getVisibleRange();
}

Fixed version (ground truth):
@Override public Range getVisibleRange(){
  return presenter.getVisibleRange();
}
Program: 53758
Project: 53758
Buggy source:
public KeyboardSelectionPolicy getKeyboardSelectionPolicy(){
  return presenter.getKeyboardSelectionPolicy();
}

Fixed version (ground truth):
@Override public KeyboardSelectionPolicy getKeyboardSelectionPolicy(){
  return presenter.getKeyboardSelectionPolicy();
}
Program: 53759
Project: 53759
Buggy source:
public void setTabIndex(int index){
  this.tabIndex=index;
  setKeyboardSelected(getKeyboardSelectedRow(),true,false);
}

Fixed version (ground truth):
@Override public void setTabIndex(int index){
  this.tabIndex=index;
  setKeyboardSelected(getKeyboardSelectedRow(),true,false);
}
Program: 53760
Project: 53760
Buggy source:
public T getVisibleItem(int indexOnPage){
  checkRowBounds(indexOnPage);
  return presenter.getVisibleItem(indexOnPage);
}

Fixed version (ground truth):
@Override public T getVisibleItem(int indexOnPage){
  checkRowBounds(indexOnPage);
  return presenter.getVisibleItem(indexOnPage);
}
Program: 53761
Project: 53761
Buggy source:
public void setRowCount(int size,boolean isExact){
  presenter.setRowCount(size,isExact);
}

Fixed version (ground truth):
@Override public void setRowCount(int size,boolean isExact){
  presenter.setRowCount(size,isExact);
}
Program: 53762
Project: 53762
Buggy source:
public void resetFocus(){
  if (wasFocused) {
    CellBasedWidgetImpl.get().resetFocus(new Scheduler.ScheduledCommand(){
      public void execute(){
        if (!hasData.resetFocusOnCell()) {
          Element elem=hasData.getKeyboardSelectedElement();
          if (elem != null) {
            elem.focus();
          }
        }
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void resetFocus(){
  if (wasFocused) {
    CellBasedWidgetImpl.get().resetFocus(new Scheduler.ScheduledCommand(){
      @Override public void execute(){
        if (!hasData.resetFocusOnCell()) {
          Element elem=hasData.getKeyboardSelectedElement();
          if (elem != null) {
            elem.focus();
          }
        }
      }
    }
);
  }
}
Program: 53763
Project: 53763
Buggy source:
/** 
 * Return the row values that the widget is currently displaying as an immutable list.
 * @return a List of displayed items
 */
public List<T> getVisibleItems(){
  return presenter.getVisibleItems();
}

Fixed version (ground truth):
/** 
 * Return the row values that the widget is currently displaying as an immutable list.
 * @return a List of displayed items
 */
@Override public List<T> getVisibleItems(){
  return presenter.getVisibleItems();
}
Program: 53764
Project: 53764
Buggy source:
@Override public void replaceAllChildren(List<C> values,SafeHtml html,boolean stealFocus){
  if (nodeView.tree.isAnimationEnabled()) {
    nodeView.ensureAnimationFrame().getStyle().setDisplay(Display.NONE);
  }
  nodeView.tree.isRefreshing=true;
  Map<Object,CellTreeNodeView<?>> savedViews=saveChildState(values,0);
  AbstractHasData.replaceAllChildren(nodeView.tree,childContainer,html);
  nodeView.tree.isRefreshing=false;
  int size=values.size();
  int childCount=nodeView.children.size();
  while (childCount > size) {
    childCount--;
    nodeView.children.remove(childCount);
  }
  loadChildState(values,0,savedViews);
  if (nodeView.isRootNode() && nodeView.tree.getKeyboardSelectedNode() == nodeView && values.size() > 0) {
    nodeView.tree.keyboardSelect(nodeView.children.get(0),false);
  }
  if (nodeView.tree.isAnimationEnabled()) {
    nodeView.tree.maybeAnimateTreeNode(nodeView);
  }
}

Fixed version (ground truth):
@Override public void replaceAllChildren(List<C> values,SafeHtml html,boolean stealFocus,boolean contentChanged){
  if (nodeView.tree.isAnimationEnabled()) {
    nodeView.ensureAnimationFrame().getStyle().setDisplay(Display.NONE);
  }
  nodeView.tree.isRefreshing=true;
  Map<Object,CellTreeNodeView<?>> savedViews=saveChildState(values,0);
  if (contentChanged) {
    AbstractHasData.replaceAllChildren(nodeView.tree,childContainer,html);
  }
  nodeView.tree.isRefreshing=false;
  int size=values.size();
  int childCount=nodeView.children.size();
  while (childCount > size) {
    childCount--;
    nodeView.children.remove(childCount);
  }
  loadChildState(values,0,savedViews);
  if (nodeView.isRootNode() && nodeView.tree.getKeyboardSelectedNode() == nodeView && values.size() > 0) {
    nodeView.tree.keyboardSelect(nodeView.children.get(0),false);
  }
  if (nodeView.tree.isAnimationEnabled()) {
    nodeView.tree.maybeAnimateTreeNode(nodeView);
  }
}
Program: 53765
Project: 53765
Buggy source:
public boolean isRowCountExact(){
  return presenter.isRowCountExact();
}

Fixed version (ground truth):
@Override public boolean isRowCountExact(){
  return presenter.isRowCountExact();
}
Program: 53766
Project: 53766
Buggy source:
public void fireEvent(GwtEvent<?> event){
  handlerManger.fireEvent(event);
}

Fixed version (ground truth):
@Override public void fireEvent(GwtEvent<?> event){
  handlerManger.fireEvent(event);
}
Program: 53767
Project: 53767
Buggy source:
public void setLoadingState(LoadingState state){
  nodeView.updateImage(state == LoadingState.LOADING);
  showOrHide(nodeView.emptyMessageElem,state == LoadingState.LOADED && presenter.isEmpty());
}

Fixed version (ground truth):
@Override public void setLoadingState(LoadingState state){
  nodeView.updateImage(state == LoadingState.LOADING);
  showOrHide(nodeView.emptyMessageElem,state == LoadingState.LOADED && presenter.isEmpty());
}
Program: 53768
Project: 53768
Buggy source:
public void onRowCountChange(RowCountChangeEvent event){
  int rowCount=event.getNewRowCount();
  boolean isExact=event.isNewRowCountExact();
  int pageSize=getVisibleRange().getLength();
  showOrHide(nodeView.showMoreElem,isExact && rowCount > pageSize);
}

Fixed version (ground truth):
@Override public void onRowCountChange(RowCountChangeEvent event){
  int rowCount=event.getNewRowCount();
  boolean isExact=event.isNewRowCountExact();
  int pageSize=getVisibleRange().getLength();
  showOrHide(nodeView.showMoreElem,isExact && rowCount > pageSize);
}
Program: 53769
Project: 53769
Buggy source:
public HandlerRegistration addCellPreviewHandler(Handler<C> handler){
  return presenter.addCellPreviewHandler(handler);
}

Fixed version (ground truth):
@Override public HandlerRegistration addCellPreviewHandler(Handler<C> handler){
  return presenter.addCellPreviewHandler(handler);
}
Program: 53770
Project: 53770
Buggy source:
public boolean isChildLeaf(int index){
  assertNotDestroyed();
  checkChildBounds(index);
  flush();
  return nodeView.getChildNode(index).isLeaf();
}

Fixed version (ground truth):
@Override public boolean isChildLeaf(int index){
  assertNotDestroyed();
  checkChildBounds(index);
  flush();
  return nodeView.getChildNode(index).isLeaf();
}
Program: 53771
Project: 53771
Buggy source:
public void replaceChildren(List<C> values,int start,SafeHtml html,boolean stealFocus){
  Map<Object,CellTreeNodeView<?>> savedViews=saveChildState(values,start);
  nodeView.tree.isRefreshing=true;
  Element newChildren=AbstractHasData.convertToElements(nodeView.tree,getTmpElem(),html);
  AbstractHasData.replaceChildren(nodeView.tree,childContainer,newChildren,start,html);
  nodeView.tree.isRefreshing=false;
  loadChildState(values,start,savedViews);
}

Fixed version (ground truth):
@Override public void replaceChildren(List<C> values,int start,SafeHtml html,boolean stealFocus){
  Map<Object,CellTreeNodeView<?>> savedViews=saveChildState(values,start);
  nodeView.tree.isRefreshing=true;
  Element newChildren=AbstractHasData.convertToElements(nodeView.tree,getTmpElem(),html);
  AbstractHasData.replaceChildren(nodeView.tree,childContainer,newChildren,start,html);
  nodeView.tree.isRefreshing=false;
  loadChildState(values,start,savedViews);
}
Program: 53772
Project: 53772
Buggy source:
public int getRowCount(){
  return presenter.getRowCount();
}

Fixed version (ground truth):
@Override public int getRowCount(){
  return presenter.getRowCount();
}
Program: 53773
Project: 53773
Buggy source:
public SelectionModel<? super C> getSelectionModel(){
  return presenter.getSelectionModel();
}

Fixed version (ground truth):
@Override public SelectionModel<? super C> getSelectionModel(){
  return presenter.getSelectionModel();
}
Program: 53774
Project: 53774
Buggy source:
public void execute(){
  tree.setFocus(true);
}

Fixed version (ground truth):
@Override public void execute(){
  tree.setFocus(true);
}
Program: 53776
Project: 53776
Buggy source:
public void setSelectionModel(final SelectionModel<? super C> selectionModel){
  presenter.setSelectionModel(selectionModel);
}

Fixed version (ground truth):
@Override public void setSelectionModel(final SelectionModel<? super C> selectionModel){
  presenter.setSelectionModel(selectionModel);
}
Program: 53777
Project: 53777
Buggy source:
public void setVisibleRange(Range range){
  presenter.setVisibleRange(range);
}

Fixed version (ground truth):
@Override public void setVisibleRange(Range range){
  presenter.setVisibleRange(range);
}
Program: 53778
Project: 53778
Buggy source:
public void setVisibleRangeAndClearData(Range range,boolean forceRangeChangeEvent){
  presenter.setVisibleRangeAndClearData(range,forceRangeChangeEvent);
}

Fixed version (ground truth):
@Override public void setVisibleRangeAndClearData(Range range,boolean forceRangeChangeEvent){
  presenter.setVisibleRangeAndClearData(range,forceRangeChangeEvent);
}
Program: 53779
Project: 53779
Buggy source:
public void replaceAllChildren(List<C> values,SafeHtml html,boolean stealFocus){
  if (nodeView.tree.isAnimationEnabled()) {
    nodeView.ensureAnimationFrame().getStyle().setDisplay(Display.NONE);
  }
  nodeView.tree.isRefreshing=true;
  Map<Object,CellTreeNodeView<?>> savedViews=saveChildState(values,0);
  AbstractHasData.replaceAllChildren(nodeView.tree,childContainer,html);
  nodeView.tree.isRefreshing=false;
  int size=values.size();
  int childCount=nodeView.children.size();
  while (childCount > size) {
    childCount--;
    nodeView.children.remove(childCount);
  }
  loadChildState(values,0,savedViews);
  if (nodeView.isRootNode() && nodeView.tree.getKeyboardSelectedNode() == nodeView && values.size() > 0) {
    nodeView.tree.keyboardSelect(nodeView.children.get(0),false);
  }
  if (nodeView.tree.isAnimationEnabled()) {
    nodeView.tree.maybeAnimateTreeNode(nodeView);
  }
}

Fixed version (ground truth):
@Override public void replaceAllChildren(List<C> values,SafeHtml html,boolean stealFocus){
  if (nodeView.tree.isAnimationEnabled()) {
    nodeView.ensureAnimationFrame().getStyle().setDisplay(Display.NONE);
  }
  nodeView.tree.isRefreshing=true;
  Map<Object,CellTreeNodeView<?>> savedViews=saveChildState(values,0);
  AbstractHasData.replaceAllChildren(nodeView.tree,childContainer,html);
  nodeView.tree.isRefreshing=false;
  int size=values.size();
  int childCount=nodeView.children.size();
  while (childCount > size) {
    childCount--;
    nodeView.children.remove(childCount);
  }
  loadChildState(values,0,savedViews);
  if (nodeView.isRootNode() && nodeView.tree.getKeyboardSelectedNode() == nodeView && values.size() > 0) {
    nodeView.tree.keyboardSelect(nodeView.children.get(0),false);
  }
  if (nodeView.tree.isAnimationEnabled()) {
    nodeView.tree.maybeAnimateTreeNode(nodeView);
  }
}
Program: 53780
Project: 53780
Buggy source:
public void setRowData(int start,List<? extends C> values){
  presenter.setRowData(start,values);
}

Fixed version (ground truth):
@Override public void setRowData(int start,List<? extends C> values){
  presenter.setRowData(start,values);
}
Program: 53781
Project: 53781
Buggy source:
public int getVisibleItemCount(){
  return presenter.getVisibleItemCount();
}

Fixed version (ground truth):
@Override public int getVisibleItemCount(){
  return presenter.getVisibleItemCount();
}
Program: 53782
Project: 53782
Buggy source:
public Object getChildValue(int index){
  assertNotDestroyed();
  checkChildBounds(index);
  flush();
  return nodeView.getChildNode(index).value;
}

Fixed version (ground truth):
@Override public Object getChildValue(int index){
  assertNotDestroyed();
  checkChildBounds(index);
  flush();
  return nodeView.getChildNode(index).value;
}
Program: 53783
Project: 53783
Buggy source:
public TreeNode setChildOpen(int index,boolean open,boolean fireEvents){
  assertNotDestroyed();
  checkChildBounds(index);
  CellTreeNodeView<?> child=nodeView.getChildNode(index);
  return child.setOpen(open,fireEvents) ? child.treeNode : null;
}

Fixed version (ground truth):
@Override public TreeNode setChildOpen(int index,boolean open,boolean fireEvents){
  assertNotDestroyed();
  checkChildBounds(index);
  CellTreeNodeView<?> child=nodeView.getChildNode(index);
  return child.setOpen(open,fireEvents) ? child.treeNode : null;
}
Program: 53784
Project: 53784
Buggy source:
/** 
 * Fire an event to the   {@link com.google.gwt.cell.client.AbstractCell}.
 * @param event the native event
 */
@SuppressWarnings("String_Node_Str") protected void fireEventToCell(NativeEvent event){
  if (parentNodeInfo == null) {
    return;
  }
  Cell<T> parentCell=parentNodeInfo.getCell();
  String eventType=event.getType();
  Element cellParent=getCellParent();
  Object key=getValueKey();
  Context context=new Context(getIndex(),0,key);
  boolean cellWasEditing=parentCell.isEditing(context,cellParent,value);
  boolean isSelectionHandled=parentCell.handlesSelection() || KeyboardSelectionPolicy.BOUND_TO_SELECTION == tree.getKeyboardSelectionPolicy();
  HasData<T> display=(HasData<T>)parentNode.listView;
  CellPreviewEvent<T> previewEvent=CellPreviewEvent.fire(display,event,display,context,value,cellWasEditing,isSelectionHandled);
  if (previewEvent.isCanceled() || !cellParent.isOrHasChild(Element.as(event.getEventTarget()))) {
    return;
  }
  Set<String> consumedEvents=parentCell.getConsumedEvents();
  if (consumedEvents != null && consumedEvents.contains(eventType)) {
    parentCell.onBrowserEvent(context,cellParent,value,event,parentNodeInfo.getValueUpdater());
    tree.cellIsEditing=parentCell.isEditing(context,cellParent,value);
    if (cellWasEditing && !tree.cellIsEditing) {
      CellBasedWidgetImpl.get().resetFocus(new Scheduler.ScheduledCommand(){
        public void execute(){
          tree.setFocus(true);
        }
      }
);
    }
  }
}

Fixed version (ground truth):
/** 
 * Fire an event to the   {@link com.google.gwt.cell.client.AbstractCell}.
 * @param event the native event
 */
@SuppressWarnings("String_Node_Str") protected void fireEventToCell(NativeEvent event){
  if (parentNodeInfo == null) {
    return;
  }
  Cell<T> parentCell=parentNodeInfo.getCell();
  String eventType=event.getType();
  Element cellParent=getCellParent();
  Object key=getValueKey();
  Context context=new Context(getIndex(),0,key);
  boolean cellWasEditing=parentCell.isEditing(context,cellParent,value);
  boolean isSelectionHandled=parentCell.handlesSelection() || KeyboardSelectionPolicy.BOUND_TO_SELECTION == tree.getKeyboardSelectionPolicy();
  HasData<T> display=(HasData<T>)parentNode.listView;
  CellPreviewEvent<T> previewEvent=CellPreviewEvent.fire(display,event,display,context,value,cellWasEditing,isSelectionHandled);
  if (previewEvent.isCanceled() || !cellParent.isOrHasChild(Element.as(event.getEventTarget()))) {
    return;
  }
  Set<String> consumedEvents=parentCell.getConsumedEvents();
  if (consumedEvents != null && consumedEvents.contains(eventType)) {
    parentCell.onBrowserEvent(context,cellParent,value,event,parentNodeInfo.getValueUpdater());
    tree.cellIsEditing=parentCell.isEditing(context,cellParent,value);
    if (cellWasEditing && !tree.cellIsEditing) {
      CellBasedWidgetImpl.get().resetFocus(new Scheduler.ScheduledCommand(){
        @Override public void execute(){
          tree.setFocus(true);
        }
      }
);
    }
  }
}
Program: 53786
Project: 53786
Buggy source:
public <H extends EventHandler>HandlerRegistration addHandler(H handler,Type<H> type){
  return handlerManger.addHandler(type,handler);
}

Fixed version (ground truth):
@Override public <H extends EventHandler>HandlerRegistration addHandler(H handler,Type<H> type){
  return handlerManger.addHandler(type,handler);
}
Program: 53787
Project: 53787
Buggy source:
public TreeNode getParent(){
  assertNotDestroyed();
  return getParentImpl();
}

Fixed version (ground truth):
@Override public TreeNode getParent(){
  assertNotDestroyed();
  return getParentImpl();
}
Program: 53788
Project: 53788
Buggy source:
public HandlerRegistration addRangeChangeHandler(RangeChangeEvent.Handler handler){
  return presenter.addRangeChangeHandler(handler);
}

Fixed version (ground truth):
@Override public HandlerRegistration addRangeChangeHandler(RangeChangeEvent.Handler handler){
  return presenter.addRangeChangeHandler(handler);
}
Program: 53789
Project: 53789
Buggy source:
public HandlerRegistration addRowCountChangeHandler(RowCountChangeEvent.Handler handler){
  return presenter.addRowCountChangeHandler(handler);
}

Fixed version (ground truth):
@Override public HandlerRegistration addRowCountChangeHandler(RowCountChangeEvent.Handler handler){
  return presenter.addRowCountChangeHandler(handler);
}
Program: 53790
Project: 53790
Buggy source:
public Range getVisibleRange(){
  return presenter.getVisibleRange();
}

Fixed version (ground truth):
@Override public Range getVisibleRange(){
  return presenter.getVisibleRange();
}
Program: 53791
Project: 53791
Buggy source:
public Object getValue(){
  return nodeView.value;
}

Fixed version (ground truth):
@Override public Object getValue(){
  return nodeView.value;
}
Program: 53792
Project: 53792
Buggy source:
public boolean isChildOpen(int index){
  assertNotDestroyed();
  checkChildBounds(index);
  flush();
  return nodeView.getChildNode(index).isOpen();
}

Fixed version (ground truth):
@Override public boolean isChildOpen(int index){
  assertNotDestroyed();
  checkChildBounds(index);
  flush();
  return nodeView.getChildNode(index).isOpen();
}
Program: 53793
Project: 53793
Buggy source:
public C getVisibleItem(int indexOnPage){
  return presenter.getVisibleItem(indexOnPage);
}

Fixed version (ground truth):
@Override public C getVisibleItem(int indexOnPage){
  return presenter.getVisibleItem(indexOnPage);
}
Program: 53794
Project: 53794
Buggy source:
public void setRowCount(int size,boolean isExact){
  presenter.setRowCount(size,isExact);
}

Fixed version (ground truth):
@Override public void setRowCount(int size,boolean isExact){
  presenter.setRowCount(size,isExact);
}
Program: 53795
Project: 53795
Buggy source:
public void resetFocus(){
  nodeView.tree.resetFocus();
}

Fixed version (ground truth):
@Override public void resetFocus(){
  nodeView.tree.resetFocus();
}
Program: 53796
Project: 53796
Buggy source:
public NodeCellList(final NodeInfo<C> nodeInfo,final CellTreeNodeView<?> nodeView,int pageSize){
  this.defaultPageSize=pageSize;
  this.nodeInfo=nodeInfo;
  this.nodeView=nodeView;
  cell=nodeInfo.getCell();
  presenter=new HasDataPresenter<C>(this,new View(nodeView.ensureChildContainer()),pageSize,nodeInfo.getProvidesKey());
  presenter.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
  presenter.addRowCountChangeHandler(new RowCountChangeEvent.Handler(){
    public void onRowCountChange(    RowCountChangeEvent event){
      int rowCount=event.getNewRowCount();
      boolean isExact=event.isNewRowCountExact();
      int pageSize=getVisibleRange().getLength();
      showOrHide(nodeView.showMoreElem,isExact && rowCount > pageSize);
    }
  }
);
}

Fixed version (ground truth):
public NodeCellList(final NodeInfo<C> nodeInfo,final CellTreeNodeView<?> nodeView,int pageSize){
  this.defaultPageSize=pageSize;
  this.nodeInfo=nodeInfo;
  this.nodeView=nodeView;
  cell=nodeInfo.getCell();
  presenter=new HasDataPresenter<C>(this,new View(nodeView.ensureChildContainer()),pageSize,nodeInfo.getProvidesKey());
  presenter.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
  presenter.addRowCountChangeHandler(new RowCountChangeEvent.Handler(){
    @Override public void onRowCountChange(    RowCountChangeEvent event){
      int rowCount=event.getNewRowCount();
      boolean isExact=event.isNewRowCountExact();
      int pageSize=getVisibleRange().getLength();
      showOrHide(nodeView.showMoreElem,isExact && rowCount > pageSize);
    }
  }
);
}
Program: 53797
Project: 53797
Buggy source:
public List<C> getVisibleItems(){
  return presenter.getVisibleItems();
}

Fixed version (ground truth):
@Override public List<C> getVisibleItems(){
  return presenter.getVisibleItems();
}