nus-yam/ex-repair huggingface dataset:
Program: 81714
Project: 81714
Buggy source:
/** 
 * Construct a new   {@link TreeNodeImpl}.
 * @param nodeInfo the nodeInfo for the children nodes
 * @param value the value of the node
 * @param display the display associated with the node
 * @param widget the widget that wraps the display
 */
public TreeNodeImpl(final NodeInfo<C> nodeInfo,Object value,final BrowserCellList<C> display,Widget widget){
  this.display=display;
  this.nodeInfo=nodeInfo;
  this.value=value;
  this.widget=widget;
  valueChangeHandler=display.addValueChangeHandler(new ValueChangeHandler<List<C>>(){
    public void onValueChange(    ValueChangeEvent<List<C>> event){
      Object focusedKey=display.focusedKey;
      if (focusedKey != null) {
        boolean stillExists=false;
        List<C> displayValues=event.getValue();
        for (        C displayValue : displayValues) {
          if (focusedKey.equals(display.getValueKey(displayValue))) {
            stillExists=true;
            break;
          }
        }
        if (!stillExists) {
          trimToLevel(display.level);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Construct a new   {@link TreeNodeImpl}.
 * @param nodeInfo the nodeInfo for the children nodes
 * @param value the value of the node
 * @param display the display associated with the node
 * @param widget the widget that wraps the display
 */
public TreeNodeImpl(final NodeInfo<C> nodeInfo,Object value,final BrowserCellList<C> display,Widget widget){
  this.display=display;
  this.nodeInfo=nodeInfo;
  this.value=value;
  this.widget=widget;
  valueChangeHandler=display.addValueChangeHandler(new ValueChangeHandler<List<C>>(){
    @Override public void onValueChange(    ValueChangeEvent<List<C>> event){
      Object focusedKey=display.focusedKey;
      if (focusedKey != null) {
        boolean stillExists=false;
        List<C> displayValues=event.getValue();
        for (        C displayValue : displayValues) {
          if (focusedKey.equals(display.getValueKey(displayValue))) {
            stillExists=true;
            break;
          }
        }
        if (!stillExists) {
          trimToLevel(display.level);
        }
      }
    }
  }
);
}
Program: 81715
Project: 81715
Buggy source:
public C getChildValue(int index){
  assertNotDestroyed();
  checkChildBounds(index);
  return display.getVisibleItem(index);
}

Fixed version (ground truth):
@Override public C getChildValue(int index){
  assertNotDestroyed();
  checkChildBounds(index);
  return display.getVisibleItem(index);
}
Program: 81716
Project: 81716
Buggy source:
public TreeNode setChildOpen(int index,boolean open,boolean fireEvents){
  assertNotDestroyed();
  checkChildBounds(index);
  if (open) {
    display.getPresenter().setKeyboardSelectedRow(index,false,true);
    return updateChildState(display,fireEvents);
  }
 else {
    if (index == display.getKeyboardSelectedRow()) {
      display.getPresenter().clearKeyboardSelectedRowValue();
      updateChildState(display,fireEvents);
    }
    return null;
  }
}

Fixed version (ground truth):
@Override public TreeNode setChildOpen(int index,boolean open,boolean fireEvents){
  assertNotDestroyed();
  checkChildBounds(index);
  if (open) {
    display.getPresenter().setKeyboardSelectedRow(index,false,true);
    return updateChildState(display,fireEvents);
  }
 else {
    if (index == display.getKeyboardSelectedRow()) {
      display.getPresenter().clearKeyboardSelectedRowValue();
      updateChildState(display,fireEvents);
    }
    return null;
  }
}
Program: 81717
Project: 81717
Buggy source:
public boolean ensureInjected(){
  return delegate.ensureInjected();
}

Fixed version (ground truth):
@Override public boolean ensureInjected(){
  return delegate.ensureInjected();
}
Program: 81718
Project: 81718
Buggy source:
public TreeNodeImpl<?> getParent(){
  assertNotDestroyed();
  return getParentImpl();
}

Fixed version (ground truth):
@Override public TreeNodeImpl<?> getParent(){
  assertNotDestroyed();
  return getParentImpl();
}
Program: 81720
Project: 81720
Buggy source:
public Object getValue(){
  return value;
}

Fixed version (ground truth):
@Override public Object getValue(){
  return value;
}
Program: 81721
Project: 81721
Buggy source:
public boolean isChildOpen(int index){
  assertNotDestroyed();
  checkChildBounds(index);
  return (display.focusedKey == null || !display.isFocusedOpen) ? false : display.focusedKey.equals(display.getValueKey(getChildValue(index)));
}

Fixed version (ground truth):
@Override public boolean isChildOpen(int index){
  assertNotDestroyed();
  checkChildBounds(index);
  return (display.focusedKey == null || !display.isFocusedOpen) ? false : display.focusedKey.equals(display.getValueKey(getChildValue(index)));
}
Program: 81722
Project: 81722
Buggy source:
public void setAnimationEnabled(boolean enable){
  this.isAnimationEnabled=enable;
}

Fixed version (ground truth):
@Override public void setAnimationEnabled(boolean enable){
  this.isAnimationEnabled=enable;
}
Program: 81723
Project: 81723
Buggy source:
public CellList.Style cellListStyle(){
  return style;
}

Fixed version (ground truth):
@Override public CellList.Style cellListStyle(){
  return style;
}
Program: 81726
Project: 81726
Buggy source:
public void onSuggestionsReady(Request request,Response response){
  display.setMoreSuggestions(response.hasMoreSuggestions(),response.getMoreSuggestionsCount());
  display.showSuggestions(SuggestBox.this,response.getSuggestions(),oracle.isDisplayStringHTML(),isAutoSelectEnabled(),suggestionCallback);
}

Fixed version (ground truth):
public void onSuggestionsReady(Request request,Response response){
  if (!isEnabled()) {
    return;
  }
  display.setMoreSuggestions(response.hasMoreSuggestions(),response.getMoreSuggestionsCount());
  display.showSuggestions(SuggestBox.this,response.getSuggestions(),oracle.isDisplayStringHTML(),isAutoSelectEnabled(),suggestionCallback);
}
Program: 81728
Project: 81728
Buggy source:
public void testOutputCssMapArtifactReturnNullOutputString() throws UnableToCompleteException {
  UnitTestTreeLogger.Builder builder=new UnitTestTreeLogger.Builder();
  builder.expectError("String_Node_Str",null);
  UnitTestTreeLogger testLogger=builder.createLogger();
  ResourceContext mockResourceContext=EasyMock.createMock(ResourceContext.class);
  Map<JMethod,String> testMap=new HashMap<JMethod,String>();
  OutputStream mockOutputStream=EasyMock.createMock(OutputStream.class);
  GeneratorContext mockGeneratorContext=EasyMock.createMock(GeneratorContext.class);
  GeneratedResource mockGeneratedResource=EasyMock.createMock(GeneratedResource.class);
  EasyMock.expect(mockResourceContext.getGeneratorContext()).andReturn(mockGeneratorContext);
  EasyMock.expect(mockGeneratorContext.tryCreateResource(testLogger,"String_Node_Str")).andReturn(null);
  EasyMock.replay(mockResourceContext);
  EasyMock.replay(mockGeneratorContext);
  CssResourceGenerator crg=new CssResourceGenerator();
  crg.outputCssMapArtifact(testLogger,mockResourceContext,testMap,"String_Node_Str");
  testLogger.assertCorrectLogEntries();
  EasyMock.verify(mockResourceContext);
  EasyMock.verify(mockGeneratorContext);
}

Fixed version (ground truth):
public void testOutputCssMapArtifactReturnNullOutputString() throws UnableToCompleteException {
  UnitTestTreeLogger.Builder builder=new UnitTestTreeLogger.Builder();
  builder.expectWarn("String_Node_Str",null);
  UnitTestTreeLogger testLogger=builder.createLogger();
  ResourceContext mockResourceContext=EasyMock.createMock(ResourceContext.class);
  Map<JMethod,String> testMap=new HashMap<JMethod,String>();
  OutputStream mockOutputStream=EasyMock.createMock(OutputStream.class);
  GeneratorContext mockGeneratorContext=EasyMock.createMock(GeneratorContext.class);
  GeneratedResource mockGeneratedResource=EasyMock.createMock(GeneratedResource.class);
  EasyMock.expect(mockResourceContext.getGeneratorContext()).andReturn(mockGeneratorContext);
  EasyMock.expect(mockGeneratorContext.tryCreateResource(testLogger,"String_Node_Str")).andReturn(null);
  JMethod method=EasyMock.createMock(JMethod.class);
  JClassType bundleType=EasyMock.createMock(JClassType.class);
  EasyMock.expect(method.getEnclosingType()).andReturn(bundleType);
  EasyMock.expect(bundleType.getQualifiedSourceName()).andReturn("String_Node_Str");
  EasyMock.expect(method.getName()).andReturn("String_Node_Str");
  EasyMock.replay(mockResourceContext);
  EasyMock.replay(mockGeneratorContext);
  EasyMock.replay(method);
  EasyMock.replay(bundleType);
  CssResourceGenerator crg=new CssResourceGenerator();
  crg.outputCssMapArtifact(testLogger,mockResourceContext,method,testMap);
  testLogger.assertCorrectLogEntries();
  EasyMock.verify(mockResourceContext);
  EasyMock.verify(mockGeneratorContext);
  EasyMock.verify(method);
  EasyMock.verify(bundleType);
}
Program: 81730
Project: 81730
Buggy source:
public void testOutputCssMapArtifact() throws UnableToCompleteException {
  UnitTestTreeLogger testLogger=new UnitTestTreeLogger.Builder().createLogger();
  ResourceContext mockResourceContext=EasyMock.createMock(ResourceContext.class);
  Map<JMethod,String> testMap=new HashMap<JMethod,String>();
  OutputStream mockOutputStream=EasyMock.createMock(OutputStream.class);
  GeneratorContext mockGeneratorContext=EasyMock.createMock(GeneratorContext.class);
  GeneratedResource mockGeneratedResource=EasyMock.createMock(GeneratedResource.class);
  EasyMock.expect(mockResourceContext.getGeneratorContext()).andReturn(mockGeneratorContext);
  EasyMock.expectLastCall().times(2);
  EasyMock.expect(mockGeneratorContext.tryCreateResource(testLogger,"String_Node_Str")).andReturn(mockOutputStream);
  EasyMock.expect(mockGeneratorContext.commitResource(testLogger,mockOutputStream)).andReturn(mockGeneratedResource);
  EasyMock.replay(mockResourceContext);
  EasyMock.replay(mockGeneratorContext);
  CssResourceGenerator crg=new CssResourceGenerator();
  crg.outputCssMapArtifact(testLogger,mockResourceContext,testMap,"String_Node_Str");
  testLogger.assertCorrectLogEntries();
  EasyMock.verify(mockResourceContext);
  EasyMock.verify(mockGeneratorContext);
}

Fixed version (ground truth):
public void testOutputCssMapArtifact() throws UnableToCompleteException {
  UnitTestTreeLogger testLogger=new UnitTestTreeLogger.Builder().createLogger();
  ResourceContext mockResourceContext=EasyMock.createMock(ResourceContext.class);
  Map<JMethod,String> testMap=new HashMap<JMethod,String>();
  OutputStream mockOutputStream=EasyMock.createMock(OutputStream.class);
  GeneratorContext mockGeneratorContext=EasyMock.createMock(GeneratorContext.class);
  GeneratedResource mockGeneratedResource=EasyMock.createMock(GeneratedResource.class);
  EasyMock.expect(mockResourceContext.getGeneratorContext()).andReturn(mockGeneratorContext);
  EasyMock.expectLastCall().times(2);
  EasyMock.expect(mockGeneratorContext.tryCreateResource(testLogger,"String_Node_Str")).andReturn(mockOutputStream);
  EasyMock.expect(mockGeneratorContext.commitResource(testLogger,mockOutputStream)).andReturn(mockGeneratedResource);
  JMethod method=EasyMock.createMock(JMethod.class);
  JClassType bundleType=EasyMock.createMock(JClassType.class);
  EasyMock.expect(method.getEnclosingType()).andReturn(bundleType);
  EasyMock.expect(bundleType.getQualifiedSourceName()).andReturn("String_Node_Str");
  EasyMock.expect(method.getName()).andReturn("String_Node_Str");
  EasyMock.replay(mockResourceContext);
  EasyMock.replay(mockGeneratorContext);
  EasyMock.replay(method);
  EasyMock.replay(bundleType);
  CssResourceGenerator crg=new CssResourceGenerator();
  crg.outputCssMapArtifact(testLogger,mockResourceContext,method,testMap);
  testLogger.assertCorrectLogEntries();
  EasyMock.verify(mockResourceContext);
  EasyMock.verify(mockGeneratorContext);
  EasyMock.verify(method);
  EasyMock.verify(bundleType);
}
Program: 81731
Project: 81731
Buggy source:
public void testOutputCssMapArtifactThrowOnTryCreateResource() throws UnableToCompleteException {
  UnitTestTreeLogger.Builder builder=new UnitTestTreeLogger.Builder();
  builder.expectError("String_Node_Str",null);
  UnitTestTreeLogger testLogger=builder.createLogger();
  ResourceContext mockResourceContext=EasyMock.createMock(ResourceContext.class);
  Map<JMethod,String> testMap=new HashMap<JMethod,String>();
  OutputStream mockOutputStream=EasyMock.createMock(OutputStream.class);
  GeneratorContext mockGeneratorContext=EasyMock.createMock(GeneratorContext.class);
  GeneratedResource mockGeneratedResource=EasyMock.createMock(GeneratedResource.class);
  EasyMock.expect(mockResourceContext.getGeneratorContext()).andReturn(mockGeneratorContext);
  EasyMock.expect(mockGeneratorContext.tryCreateResource(testLogger,"String_Node_Str")).andThrow(new UnableToCompleteException());
  EasyMock.replay(mockResourceContext);
  EasyMock.replay(mockGeneratorContext);
  CssResourceGenerator crg=new CssResourceGenerator();
  crg.outputCssMapArtifact(testLogger,mockResourceContext,testMap,"String_Node_Str");
  testLogger.assertCorrectLogEntries();
  EasyMock.verify(mockResourceContext);
  EasyMock.verify(mockGeneratorContext);
}

Fixed version (ground truth):
public void testOutputCssMapArtifactThrowOnTryCreateResource() throws UnableToCompleteException {
  UnitTestTreeLogger.Builder builder=new UnitTestTreeLogger.Builder();
  builder.expectWarn("String_Node_Str",null);
  UnitTestTreeLogger testLogger=builder.createLogger();
  ResourceContext mockResourceContext=EasyMock.createMock(ResourceContext.class);
  Map<JMethod,String> testMap=new HashMap<JMethod,String>();
  OutputStream mockOutputStream=EasyMock.createMock(OutputStream.class);
  GeneratorContext mockGeneratorContext=EasyMock.createMock(GeneratorContext.class);
  GeneratedResource mockGeneratedResource=EasyMock.createMock(GeneratedResource.class);
  EasyMock.expect(mockResourceContext.getGeneratorContext()).andReturn(mockGeneratorContext);
  EasyMock.expect(mockGeneratorContext.tryCreateResource(testLogger,"String_Node_Str")).andThrow(new UnableToCompleteException());
  JMethod method=EasyMock.createMock(JMethod.class);
  JClassType bundleType=EasyMock.createMock(JClassType.class);
  EasyMock.expect(method.getEnclosingType()).andReturn(bundleType);
  EasyMock.expect(bundleType.getQualifiedSourceName()).andReturn("String_Node_Str");
  EasyMock.expect(method.getName()).andReturn("String_Node_Str");
  EasyMock.replay(mockResourceContext);
  EasyMock.replay(mockGeneratorContext);
  EasyMock.replay(method);
  EasyMock.replay(bundleType);
  CssResourceGenerator crg=new CssResourceGenerator();
  crg.outputCssMapArtifact(testLogger,mockResourceContext,method,testMap);
  testLogger.assertCorrectLogEntries();
  EasyMock.verify(mockResourceContext);
  EasyMock.verify(mockGeneratorContext);
  EasyMock.verify(method);
  EasyMock.verify(bundleType);
}
Program: 81734
Project: 81734
Buggy source:
/** 
 * Set a row's hovering style and fire a   {@link RowHoverEvent}
 * @param tr the row element
 * @param isHovering false if this is an unhover event
 */
private void setRowHover(TableRowElement tr,boolean isHovering){
  setRowStyleName(tr,style.hoveredRow(),style.hoveredRowCell(),isHovering);
  RowHoverEvent.fire(this,tr,isHovering);
}

Fixed version (ground truth):
/** 
 * Set a row's hovering style and fire a   {@link RowHoverEvent}
 * @param tr the row element
 * @param isHovering false if this is an unhover event
 */
private void setRowHover(TableRowElement tr,boolean isHovering){
  setRowStyleName(tr,style.hoveredRow(),style.hoveredRowCell(),isHovering);
  RowHoverEvent.fire(this,tr,!isHovering);
}
Program: 81735
Project: 81735
Buggy source:
@Override public LogRecord instantiateInstance(ServerSerializationStreamReader reader) throws SerializationException {
  return LogRecord_CustomFieldSerializer.instantiate(reader);
}

Fixed version (ground truth):
@Override public LogRecord instantiateInstance(ServerSerializationStreamReader reader,Class<?> instanceClass,DequeMap<Type,Type> resolvedTypes) throws SerializationException {
  return LogRecord_CustomFieldSerializer.instantiate(reader);
}
Program: 81736
Project: 81736
Buggy source:
@SuppressWarnings("String_Node_Str") public static void deserialize(ServerSerializationStreamReader streamReader,LogRecord instance,Class<?> instanceClass,DequeMap<Type,Type> resolvedTypes) throws SerializationException {
  String loggerName=streamReader.readString();
  Long millis=streamReader.readLong();
  Object throwable=streamReader.readObject(Throwable.class,resolvedTypes);
  instance.setLoggerName(loggerName);
  instance.setMillis(millis);
  if (throwable != null && throwable instanceof SerializableThrowable) {
    instance.setThrown(((SerializableThrowable)throwable).getThrowable());
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void deserialize(ServerSerializationStreamReader streamReader,LogRecord instance,Class<?> instanceClass,DequeMap<Type,Type> resolvedTypes) throws SerializationException {
  String loggerName=streamReader.readString();
  Long millis=streamReader.readLong();
  Object throwable=streamReader.readObject(SerializableThrowable.class,resolvedTypes);
  instance.setLoggerName(loggerName);
  instance.setMillis(millis);
  if (throwable != null && throwable instanceof SerializableThrowable) {
    instance.setThrown(((SerializableThrowable)throwable).getThrowable());
  }
}
Program: 81737
Project: 81737
Buggy source:
public void onFailure(Throwable caught){
  TestSetValidator.rethrowException(caught);
}

Fixed version (ground truth):
public void onFailure(Throwable caught){
  TestSetValidator.rethrowException(caught);
  fail(caught.getMessage());
}
Program: 81738
Project: 81738
Buggy source:
public void testLogRecord(){
  LoggingRPCTestServiceAsync service=getServiceAsync();
  delayTestFinish(15000);
  service.echoLogRecord(expectedLogRecord,new AsyncCallback<LogRecord>(){
    public void onFailure(    Throwable caught){
      TestSetValidator.rethrowException(caught);
    }
    public void onSuccess(    LogRecord result){
      assertNotNull(result);
      assertTrue(isValid(result));
      finishTest();
    }
  }
);
  finishTest();
}

Fixed version (ground truth):
public void testLogRecord(){
  LoggingRPCTestServiceAsync service=getServiceAsync();
  delayTestFinish(15000);
  service.echoLogRecord(expectedLogRecord,new AsyncCallback<LogRecord>(){
    public void onFailure(    Throwable caught){
      TestSetValidator.rethrowException(caught);
      fail(caught.getMessage());
    }
    public void onSuccess(    LogRecord result){
      assertNotNull(result);
      assertTrue(isValid(result));
      finishTest();
    }
  }
);
}
Program: 81739
Project: 81739
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: 81740
Project: 81740
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: 81741
Project: 81741
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: 81742
Project: 81742
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: 81743
Project: 81743
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: 81744
Project: 81744
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: 81745
Project: 81745
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: 81746
Project: 81746
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: 81747
Project: 81747
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: 81748
Project: 81748
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: 81752
Project: 81752
Buggy source:
@Override public void onCellPreview(CellPreviewEvent<T> event){
  NativeEvent nativeEvent=event.getNativeEvent();
  String eventType=event.getNativeEvent().getType();
  if ("String_Node_Str".equals(eventType) && !event.isCellEditing()) {
switch (nativeEvent.getKeyCode()) {
case KeyCodes.KEY_DOWN:
      nextRow();
    handledEvent(event);
  return;
case KeyCodes.KEY_UP:
prevRow();
handledEvent(event);
return;
case KeyCodes.KEY_PAGEDOWN:
nextPage();
handledEvent(event);
return;
case KeyCodes.KEY_PAGEUP:
prevPage();
handledEvent(event);
return;
case KeyCodes.KEY_HOME:
home();
handledEvent(event);
return;
case KeyCodes.KEY_END:
end();
handledEvent(event);
return;
case 32:
handledEvent(event);
return;
}
}
 else if ("String_Node_Str".equals(eventType)) {
int relRow=event.getIndex() - display.getPageStart();
if (display.getKeyboardSelectedRow() != relRow) {
boolean isFocusable=false;
Element target=Element.as(event.getNativeEvent().getEventTarget());
isFocusable=CellBasedWidgetImpl.get().isFocusable(target);
display.setKeyboardSelectedRow(relRow,!isFocusable);
}
}
 else if ("String_Node_Str".equals(eventType)) {
int relRow=event.getIndex() - display.getPageStart();
if (display.getKeyboardSelectedRow() != relRow) {
display.setKeyboardSelectedRow(event.getIndex(),false);
return;
}
}
}

Fixed version (ground truth):
@Override public void onCellPreview(CellPreviewEvent<T> event){
  NativeEvent nativeEvent=event.getNativeEvent();
  String eventType=event.getNativeEvent().getType();
  if ("String_Node_Str".equals(eventType) && !event.isCellEditing()) {
switch (nativeEvent.getKeyCode()) {
case KeyCodes.KEY_DOWN:
      nextRow();
    handledEvent(event);
  return;
case KeyCodes.KEY_UP:
prevRow();
handledEvent(event);
return;
case KeyCodes.KEY_PAGEDOWN:
nextPage();
handledEvent(event);
return;
case KeyCodes.KEY_PAGEUP:
prevPage();
handledEvent(event);
return;
case KeyCodes.KEY_HOME:
home();
handledEvent(event);
return;
case KeyCodes.KEY_END:
end();
handledEvent(event);
return;
case 32:
handledEvent(event);
return;
}
}
 else if ("String_Node_Str".equals(eventType)) {
int relRow=event.getIndex() - display.getPageStart();
boolean isFocusable=false;
Element target=Element.as(event.getNativeEvent().getEventTarget());
isFocusable=CellBasedWidgetImpl.get().isFocusable(target);
display.setKeyboardSelectedRow(relRow,!isFocusable);
}
 else if ("String_Node_Str".equals(eventType)) {
int relRow=event.getIndex() - display.getPageStart();
if (display.getKeyboardSelectedRow() != relRow) {
display.setKeyboardSelectedRow(event.getIndex(),false);
return;
}
}
}
Program: 81753
Project: 81753
Buggy source:
public Object getKey(String item){
  return Integer.parseInt(item.substring(5));
}

Fixed version (ground truth):
@Override public Object getKey(String item){
  return Integer.parseInt(item.substring(5));
}
Program: 81754
Project: 81754
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: 81755
Project: 81755
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: 81756
Project: 81756
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: 81757
Project: 81757
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: 81758
Project: 81758
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: 81759
Project: 81759
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: 81760
Project: 81760
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: 81761
Project: 81761
Buggy source:
public String getModuleName(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getModuleName(){
  return "String_Node_Str";
}
Program: 81762
Project: 81762
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: 81763
Project: 81763
Buggy source:
public boolean isRowCountExact(){
  return presenter.isRowCountExact();
}

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

Fixed version (ground truth):
@Override public ProvidesKey<T> getKeyProvider(){
  return presenter.getKeyProvider();
}
Program: 81765
Project: 81765
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: 81766
Project: 81766
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: 81767
Project: 81767
Buggy source:
public int getTabIndex(){
  return tabIndex;
}

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

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

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

Fixed version (ground truth):
@Override public KeyboardPagingPolicy getKeyboardPagingPolicy(){
  return presenter.getKeyboardPagingPolicy();
}
Program: 81771
Project: 81771
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: 81772
Project: 81772
Buggy source:
public void setKeyboardPagingPolicy(KeyboardPagingPolicy policy){
  presenter.setKeyboardPagingPolicy(policy);
}

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

Fixed version (ground truth):
@Override public void setVisibleRange(Range range){
  presenter.setVisibleRange(range);
}
Program: 81774
Project: 81774
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: 81775
Project: 81775
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: 81776
Project: 81776
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: 81777
Project: 81777
Buggy source:
public int getVisibleItemCount(){
  return presenter.getVisibleItemCount();
}

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

Fixed version (ground truth):
@Override public void setKeyboardSelectionPolicy(KeyboardSelectionPolicy policy){
  presenter.setKeyboardSelectionPolicy(policy);
}
Program: 81779
Project: 81779
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: 81780
Project: 81780
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: 81781
Project: 81781
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: 81782
Project: 81782
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: 81783
Project: 81783
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: 81784
Project: 81784
Buggy source:
public Range getVisibleRange(){
  return presenter.getVisibleRange();
}

Fixed version (ground truth):
@Override public Range getVisibleRange(){
  return presenter.getVisibleRange();
}