nus-yam/ex-repair huggingface dataset:
Program: 81785
Project: 81785
Buggy source:
public KeyboardSelectionPolicy getKeyboardSelectionPolicy(){
  return presenter.getKeyboardSelectionPolicy();
}

Fixed version (ground truth):
@Override public KeyboardSelectionPolicy getKeyboardSelectionPolicy(){
  return presenter.getKeyboardSelectionPolicy();
}
Program: 81786
Project: 81786
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: 81787
Project: 81787
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: 81788
Project: 81788
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: 81789
Project: 81789
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: 81790
Project: 81790
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: 81791
Project: 81791
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: 81792
Project: 81792
Buggy source:
public boolean isRowCountExact(){
  return presenter.isRowCountExact();
}

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

Fixed version (ground truth):
@Override public void fireEvent(GwtEvent<?> event){
  handlerManger.fireEvent(event);
}
Program: 81794
Project: 81794
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: 81795
Project: 81795
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: 81796
Project: 81796
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: 81797
Project: 81797
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: 81798
Project: 81798
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: 81799
Project: 81799
Buggy source:
public int getRowCount(){
  return presenter.getRowCount();
}

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

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

Fixed version (ground truth):
@Override public void execute(){
  tree.setFocus(true);
}
Program: 81803
Project: 81803
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: 81804
Project: 81804
Buggy source:
public void setVisibleRange(Range range){
  presenter.setVisibleRange(range);
}

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

Fixed version (ground truth):
@Override public int getVisibleItemCount(){
  return presenter.getVisibleItemCount();
}
Program: 81809
Project: 81809
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: 81810
Project: 81810
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: 81811
Project: 81811
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: 81813
Project: 81813
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: 81814
Project: 81814
Buggy source:
public TreeNode getParent(){
  assertNotDestroyed();
  return getParentImpl();
}

Fixed version (ground truth):
@Override public TreeNode getParent(){
  assertNotDestroyed();
  return getParentImpl();
}
Program: 81815
Project: 81815
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: 81816
Project: 81816
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: 81817
Project: 81817
Buggy source:
public Range getVisibleRange(){
  return presenter.getVisibleRange();
}

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

Fixed version (ground truth):
@Override public Object getValue(){
  return nodeView.value;
}
Program: 81819
Project: 81819
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: 81820
Project: 81820
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: 81821
Project: 81821
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: 81822
Project: 81822
Buggy source:
public void resetFocus(){
  nodeView.tree.resetFocus();
}

Fixed version (ground truth):
@Override public void resetFocus(){
  nodeView.tree.resetFocus();
}
Program: 81823
Project: 81823
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: 81824
Project: 81824
Buggy source:
public List<C> getVisibleItems(){
  return presenter.getVisibleItems();
}

Fixed version (ground truth):
@Override public List<C> getVisibleItems(){
  return presenter.getVisibleItems();
}
Program: 81825
Project: 81825
Buggy source:
@Override public String getReadableDeclaration(){
  String[] names=TypeOracle.modifierBitsToNames(getModifierBits());
  StringBuilder sb=new StringBuilder();
  for (  String name : names) {
    sb.append(name);
    sb.append("String_Node_Str");
  }
  if (getTypeParameters().length > 0) {
    toStringTypeParams(sb);
    sb.append("String_Node_Str");
  }
  sb.append(getName());
  toStringParamsAndThrows(sb);
  return sb.toString();
}

Fixed version (ground truth):
@Override public String getReadableDeclaration(){
  String[] names=TypeOracle.modifierBitsToNamesForMethod(getModifierBits());
  StringBuilder sb=new StringBuilder();
  for (  String name : names) {
    sb.append(name);
    sb.append("String_Node_Str");
  }
  if (getTypeParameters().length > 0) {
    toStringTypeParams(sb);
    sb.append("String_Node_Str");
  }
  sb.append(getName());
  toStringParamsAndThrows(sb);
  return sb.toString();
}
Program: 81826
Project: 81826
Buggy source:
@Override public String toString(){
  String[] names=TypeOracle.modifierBitsToNames(modifierBits);
  StringBuffer sb=new StringBuffer();
  for (int i=0; i < names.length; i++) {
    if (i > 0) {
      sb.append("String_Node_Str");
    }
    sb.append(names[i]);
  }
  if (names.length > 0) {
    sb.append("String_Node_Str");
  }
  sb.append(type.getParameterizedQualifiedSourceName());
  sb.append("String_Node_Str");
  sb.append(getName());
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  String[] names=TypeOracle.modifierBitsToNamesForField(modifierBits);
  StringBuffer sb=new StringBuffer();
  for (int i=0; i < names.length; i++) {
    if (i > 0) {
      sb.append("String_Node_Str");
    }
    sb.append(names[i]);
  }
  if (names.length > 0) {
    sb.append("String_Node_Str");
  }
  sb.append(type.getParameterizedQualifiedSourceName());
  sb.append("String_Node_Str");
  sb.append(getName());
  return sb.toString();
}
Program: 81827
Project: 81827
Buggy source:
String getReadableDeclaration(int modifierBits){
  String[] names=TypeOracle.modifierBitsToNames(modifierBits);
  StringBuilder sb=new StringBuilder();
  for (  String name : names) {
    sb.append(name);
    sb.append("String_Node_Str");
  }
  if (getTypeParameters().length > 0) {
    toStringTypeParams(sb);
    sb.append("String_Node_Str");
  }
  sb.append(returnType.getParameterizedQualifiedSourceName());
  sb.append("String_Node_Str");
  sb.append(getName());
  toStringParamsAndThrows(sb);
  return sb.toString();
}

Fixed version (ground truth):
String getReadableDeclaration(int modifierBits){
  String[] names=TypeOracle.modifierBitsToNamesForMethod(modifierBits);
  StringBuilder sb=new StringBuilder();
  for (  String name : names) {
    sb.append(name);
    sb.append("String_Node_Str");
  }
  if (getTypeParameters().length > 0) {
    toStringTypeParams(sb);
    sb.append("String_Node_Str");
  }
  sb.append(returnType.getParameterizedQualifiedSourceName());
  sb.append("String_Node_Str");
  sb.append(getName());
  toStringParamsAndThrows(sb);
  return sb.toString();
}
Program: 81828
Project: 81828
Buggy source:
/** 
 * Best effort resymbolization of a a single stack trace element.
 * @param ste the stack trace element to resymbolize
 * @param strongName the GWT permutation strong name
 * @return the best effort resymbolized stack trace element
 */
public StackTraceElement resymbolize(StackTraceElement ste,String strongName){
  SymbolMap map=loadSymbolMap(strongName);
  String symbolData=map == null ? null : map.get(ste.getMethodName());
  if (symbolData != null) {
    String[] parts=symbolData.split("String_Node_Str");
    if (parts.length == 5) {
      String[] ref=parse(parts[0].substring(0,parts[0].lastIndexOf(')') + 1));
      String declaringClass;
      String methodName;
      if (ref != null) {
        declaringClass=ref[0];
        methodName=ref[1];
      }
 else {
        declaringClass=ste.getClassName();
        methodName=ste.getMethodName();
      }
      String filename="String_Node_Str".equals(parts[3]) ? null : parts[3].substring(parts[3].lastIndexOf('/') + 1);
      int lineNumber=ste.getLineNumber();
      if (lineNumber == 0) {
        lineNumber=Integer.parseInt(parts[4]);
      }
      return new StackTraceElement(declaringClass,methodName,filename,lineNumber);
    }
  }
  return ste;
}

Fixed version (ground truth):
/** 
 * Best effort resymbolization of a a single stack trace element.
 * @param ste the stack trace element to resymbolize
 * @param strongName the GWT permutation strong name
 * @return the best effort resymbolized stack trace element
 */
public StackTraceElement resymbolize(StackTraceElement ste,String strongName){
  SymbolMap map=loadSymbolMap(strongName);
  String symbolData=map == null ? null : map.get(ste.getMethodName());
  if (symbolData != null) {
    String[] parts=symbolData.split("String_Node_Str");
    if (parts.length == 5) {
      String[] ref=parse(parts[0].substring(0,parts[0].lastIndexOf(')') + 1));
      String declaringClass;
      String methodName;
      if (ref != null) {
        declaringClass=ref[0];
        methodName=ref[1];
      }
 else {
        declaringClass=ste.getClassName();
        methodName=ste.getMethodName();
      }
      String filename="String_Node_Str".equals(parts[3]) ? null : parts[3].substring(parts[3].lastIndexOf('/') + 1);
      int lineNumber=ste.getLineNumber();
      if (lineNumber == LINE_NUMBER_UNKNOWN) {
        lineNumber=Integer.parseInt(parts[4]);
      }
      return new StackTraceElement(declaringClass,methodName,filename,lineNumber);
    }
  }
  return ste;
}
Program: 81829
Project: 81829
Buggy source:
private void checkName(JsName name){
  if (!toEvaluate.contains(name)) {
    return;
  }
  if (unevaluated.size() == 0 || !unevaluated.remove(0).equals(name)) {
    maintainsOrder=false;
  }
}

Fixed version (ground truth):
/** 
 * Check to see if the evaluation of this JsName will break program order assumptions given the parameters left to be substituted. The cases are as follows: 1) JsName is a function parameter name which has side effects or is affected by side effects (hereafter called 'volatile'), so it will be in 'toEvaluate' 2) JsName is a function parameter which is not volatile (not in toEvaluate) 3) JsName is a reference to a global variable 4) JsName is a reference to a local variable A reference to a global while there are still parameters left to evaluate / substitute implies an order violation. A reference to a volatile parameter is ok if it is the next parameter in sequence to be evaluated (beginning of unevaluated list). Else, it is either being evaluated out of order with respect to other parameters, or it is being evaluated more than once.
 */
private void checkName(JsName name){
  if (!toEvaluate.contains(name)) {
    if (!paramsOrLocals.contains(name) && unevaluated.size() > 0) {
      maintainsOrder=false;
    }
    return;
  }
  if (unevaluated.size() == 0 || !unevaluated.remove(0).equals(name)) {
    maintainsOrder=false;
  }
}
Program: 81830
Project: 81830
Buggy source:
public EvaluationOrderVisitor(List<JsName> toEvaluate){
  this.toEvaluate=toEvaluate;
  this.unevaluated=new ArrayList<JsName>(toEvaluate);
}

Fixed version (ground truth):
public EvaluationOrderVisitor(List<JsName> toEvaluate,JsFunction callee){
  this.toEvaluate=toEvaluate;
  this.unevaluated=new ArrayList<JsName>(toEvaluate);
  new JsVisitor(){
    @Override public void endVisit(    JsParameter x,    JsContext ctx){
      paramsOrLocals.add(x.getName());
    }
    @Override public boolean visit(    JsVar x,    JsContext ctx){
      paramsOrLocals.add(x.getName());
      return true;
    }
  }
.accept(callee);
}
Program: 81831
Project: 81831
Buggy source:
public JClassType(SourceInfo info,String name,boolean isAbstract,boolean isFinal){
  super(info,name);
  this.isAbstract=isAbstract;
  this.isFinal=isFinal;
}

Fixed version (ground truth):
/** 
 * Construct a bare-bones deserialized external class.
 */
private JClassType(String name){
  super(SourceOrigin.UNKNOWN,name);
  isAbstract=false;
  setExternal(true);
}
Program: 81832
Project: 81832
Buggy source:
private Object readResolve(){
  JClassType result=new JClassType(SourceOrigin.UNKNOWN,name,false,false);
  result.setExternal(true);
  return result;
}

Fixed version (ground truth):
private Object readResolve(){
  return new JClassType(name);
}
Program: 81833
Project: 81833
Buggy source:
@Override protected Object writeReplace(){
  if (getEnclosingType() != null && getEnclosingType().isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else {
    return this;
  }
}

Fixed version (ground truth):
@Override protected Object writeReplace(){
  if (isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else {
    return this;
  }
}
Program: 81834
Project: 81834
Buggy source:
protected Object writeReplace(){
  if (enclosingType != null && enclosingType.isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else   if (this == NULL_FIELD) {
    return ExternalSerializedNullField.INSTANCE;
  }
 else {
    return this;
  }
}

Fixed version (ground truth):
protected Object writeReplace(){
  if (isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else   if (this == NULL_FIELD) {
    return ExternalSerializedNullField.INSTANCE;
  }
 else {
    return this;
  }
}
Program: 81835
Project: 81835
Buggy source:
public boolean hasClinit(){
  if (!field.isStatic()) {
    return false;
  }
  if (field.isFinal() && field.isCompileTimeConstant()) {
    return false;
  }
  return getEnclosingType().checkClinitTo(field.getEnclosingType());
}

Fixed version (ground truth):
public boolean hasClinit(){
  JField field=getField();
  if (!field.isStatic()) {
    return false;
  }
  if (field.isFinal() && field.isCompileTimeConstant()) {
    return false;
  }
  return getEnclosingType().checkClinitTo(field.getEnclosingType());
}
Program: 81836
Project: 81836
Buggy source:
public JFieldRef(SourceInfo info,JExpression instance,JField field,JDeclaredType enclosingType,JType overriddenType){
  super(info,field);
  assert(instance != null || field.isStatic());
  assert(enclosingType != null);
  this.instance=instance;
  this.field=field;
  this.enclosingType=enclosingType;
  this.overriddenType=overriddenType;
}

Fixed version (ground truth):
public JFieldRef(SourceInfo info,JExpression instance,JField field,JDeclaredType enclosingType,JType overriddenType){
  super(info,field);
  assert(instance != null || field.isStatic());
  assert(enclosingType != null);
  this.instance=instance;
  this.enclosingType=enclosingType;
  this.overriddenType=overriddenType;
}
Program: 81837
Project: 81837
Buggy source:
public JField getField(){
  return field;
}

Fixed version (ground truth):
public JField getField(){
  return (JField)getTarget();
}
Program: 81838
Project: 81838
Buggy source:
public static JExpression createInstantiationExpression(SourceInfo info,JClassType classType,JDeclaredType enclosingType){
  JConstructor noArgCtor=null;
  for (  JMethod ctor : classType.getMethods()) {
    if (ctor instanceof JConstructor) {
      if (ctor.getParams().size() == 0) {
        noArgCtor=(JConstructor)ctor;
        break;
      }
    }
  }
  if (noArgCtor == null) {
    return null;
  }
  return new JNewInstance(info,noArgCtor,enclosingType);
}

Fixed version (ground truth):
public static JExpression createInstantiationExpression(SourceInfo info,JClassType classType,JDeclaredType enclosingType){
  JConstructor noArgCtor=null;
  for (  JMethod ctor : classType.getMethods()) {
    if (ctor instanceof JConstructor) {
      if (ctor.getOriginalParamTypes().size() == 0) {
        noArgCtor=(JConstructor)ctor;
        break;
      }
    }
  }
  if (noArgCtor == null) {
    return null;
  }
  return new JNewInstance(info,noArgCtor,enclosingType);
}
Program: 81839
Project: 81839
Buggy source:
private Object readResolve(){
  JInterfaceType result=new JInterfaceType(SourceOrigin.UNKNOWN,name);
  result.setExternal(true);
  return result;
}

Fixed version (ground truth):
private Object readResolve(){
  return new JInterfaceType(name);
}
Program: 81840
Project: 81840
Buggy source:
public JInterfaceType(SourceInfo info,String name){
  super(info,name);
}

Fixed version (ground truth):
/** 
 * Construct a bare-bones deserialized external interface.
 */
private JInterfaceType(String name){
  super(SourceOrigin.UNKNOWN,name);
  setExternal(true);
}
Program: 81841
Project: 81841
Buggy source:
protected Object writeReplace(){
  if (enclosingType != null && enclosingType.isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else   if (this == NULL_METHOD) {
    return ExternalSerializedNullMethod.INSTANCE;
  }
 else {
    return this;
  }
}

Fixed version (ground truth):
protected Object writeReplace(){
  if (isExternal()) {
    return new ExternalSerializedForm(this);
  }
 else   if (this == NULL_METHOD) {
    return ExternalSerializedNullMethod.INSTANCE;
  }
 else {
    return this;
  }
}
Program: 81842
Project: 81842
Buggy source:
/** 
 * These are only supposed to be constructed by JProgram.
 */
public JMethod(SourceInfo info,String name,JDeclaredType enclosingType,JType returnType,boolean isAbstract,boolean isStatic,boolean isFinal,boolean isPrivate){
  super(info);
  this.name=StringInterner.get().intern(name);
  this.enclosingType=enclosingType;
  this.returnType=returnType;
  this.isAbstract=isAbstract;
  this.isStatic=isStatic;
  this.isFinal=isFinal;
  this.isPrivate=isPrivate;
}

Fixed version (ground truth):
/** 
 * Construct a bare-bones deserialized external method.
 */
private JMethod(String signature,JDeclaredType enclosingType){
  super(SourceOrigin.UNKNOWN);
  this.name=signature.substring(0,signature.indexOf('('));
  this.enclosingType=enclosingType;
  this.signature=signature;
  this.isAbstract=false;
  this.isStatic=false;
  this.isPrivate=false;
}
Program: 81843
Project: 81843
Buggy source:
public JStringLiteral(SourceInfo sourceInfo,String value,JClassType stringType){
  super(sourceInfo);
  this.value=value;
  this.stringType=stringType;
}

Fixed version (ground truth):
public JStringLiteral(SourceInfo sourceInfo,String value,JClassType stringType){
}
Program: 81844
Project: 81844
Buggy source:
private ImplementClassLiteralsAsFields(JProgram program){
  this.program=program;
  this.typeClassLiteralHolder=program.getTypeClassLiteralHolder();
  this.classLiteralHolderClinitBody=(JMethodBody)typeClassLiteralHolder.getMethods().get(0).getBody();
}

Fixed version (ground truth):
private ImplementClassLiteralsAsFields(JProgram program){
}
Program: 81845
Project: 81845
Buggy source:
public void testUiTextWithSafeHtml(){
  assertEquals(widgetUi.htmlWithComputedSafeHtml.getHTML().toLowerCase(),"String_Node_Str");
  assertEquals(widgetUi.htmlWithComputedText.getHTML().toLowerCase(),"String_Node_Str");
  assertEquals(widgetUi.labelWithComputedText.getText().toLowerCase(),"String_Node_Str");
}

Fixed version (ground truth):
public void testUiTextWithSafeHtml(){
  assertEquals(widgetUi.htmlWithComputedSafeHtml.getHTML().toLowerCase(),"String_Node_Str");
  assertEquals(widgetUi.htmlWithComputedText.getHTML().toLowerCase().replaceAll("String_Node_Str","String_Node_Str"),"String_Node_Str");
  assertEquals(widgetUi.labelWithComputedText.getText().toLowerCase(),"String_Node_Str");
}
Program: 81846
Project: 81846
Buggy source:
@Override public void wrapElement(Element element){
  if (!isFullyInitialized()) {
    element.getParentNode().replaceChild(getElement(),element);
  }
 else {
    setElement(element);
    html=null;
  }
  if (wrapInitializationCallback != null) {
    wrapInitializationCallback.execute();
    wrapInitializationCallback=null;
  }
}

Fixed version (ground truth):
@Override public void wrapElement(Element element){
  if (isFullyInitialized()) {
    throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
  setElement(element);
  html=null;
  if (wrapInitializationCallback != null) {
    wrapInitializationCallback.execute();
    wrapInitializationCallback=null;
  }
}
Program: 81847
Project: 81847
Buggy source:
/** 
 * Synchronize the scroll positions of the scrollbars with the actual scroll position of the content.
 */
private void maybeUpdateScrollbarPositions(){
  if (!isAttached()) {
    return;
  }
  if (hScrollbar != null) {
    int hPos=getHorizontalScrollPosition();
    if (hScrollbar.getHorizontalScrollPosition() != hPos) {
      hScrollbar.setHorizontalScrollPosition(hPos);
    }
  }
  if (vScrollbar != null) {
    int vPos=getVerticalScrollPosition();
    if (vScrollbar.getVerticalScrollPosition() != vPos) {
      vScrollbar.setVerticalScrollPosition(vPos);
    }
  }
  getElement().setScrollLeft(0);
  getElement().setScrollTop(0);
}

Fixed version (ground truth):
/** 
 * Synchronize the scroll positions of the scrollbars with the actual scroll position of the content.
 */
private void maybeUpdateScrollbarPositions(){
  if (!isAttached()) {
    return;
  }
  if (hScrollbar != null) {
    int hPos=getHorizontalScrollPosition();
    if (hScrollbar.getHorizontalScrollPosition() != hPos) {
      hScrollbar.setHorizontalScrollPosition(hPos);
    }
  }
  if (vScrollbar != null) {
    int vPos=getVerticalScrollPosition();
    if (vScrollbar.getVerticalScrollPosition() != vPos) {
      vScrollbar.setVerticalScrollPosition(vPos);
    }
  }
  if (getElement().getScrollLeft() != 0) {
    getElement().setScrollLeft(0);
  }
  if (getElement().getScrollTop() != 0) {
    getElement().setScrollTop(0);
  }
}
Program: 81848
Project: 81848
Buggy source:
@Override public boolean visit(JMethod x,Context ctx){
  currentMethod=x;
  return true;
}

Fixed version (ground truth):
@Override public boolean visit(JMethod x,Context ctx){
  currentMethod=x;
  if (program.getStaticImpl(x) != null) {
    return false;
  }
  return true;
}
Program: 81849
Project: 81849
Buggy source:
@Override public boolean visit(JMethod x,Context ctx){
  Set<JMethod> overrides=program.typeOracle.getAllOverrides(x);
  if (!overrides.isEmpty()) {
    for (    JMethod m : overrides) {
      rescuedMethods.add(m);
    }
    rescuedMethods.add(x);
  }
 else {
    JMethod staticImpl=program.staticImplFor(x);
    if (staticImpl != null && staticImpl.getEnclosingType().getMethods().contains(staticImpl)) {
      rescuedMethods.add(x);
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean visit(JMethod x,Context ctx){
  Set<JMethod> overrides=program.typeOracle.getAllOverrides(x);
  if (!overrides.isEmpty()) {
    for (    JMethod m : overrides) {
      rescuedMethods.add(m);
    }
    rescuedMethods.add(x);
  }
  return true;
}
Program: 81850
Project: 81850
Buggy source:
/** 
 * Declare a field that will hold an Element instance. Returns a token that the caller must set as the id attribute of that element in whatever innerHTML expression will reproduce it at runtime. <P> In the generated code, this token will be replaced by an expression to generate a unique dom id at runtime. Further code will be generated to be run after widgets are instantiated, to use that dom id in a getElementById call and assign the Element instance to its field.
 * @param fieldName The name of the field being declared
 * @param ancestorField The name of fieldName parent
 */
public String declareDomField(String fieldName,String ancestorField) throws UnableToCompleteException {
  ensureAttached();
  String name=declareDomIdHolder();
  if (useLazyWidgetBuilders) {
    FieldWriter field=fieldManager.require(fieldName);
    field.setInitializer(formatCode("String_Node_Str",fieldManager.convertFieldToGetter(name)));
    field.addStatement("String_Node_Str",fieldName);
    fieldManager.require(ancestorField).addAttachStatement(fieldManager.convertFieldToGetter(fieldName) + "String_Node_Str");
  }
 else {
    setFieldInitializer(fieldName,"String_Node_Str");
    addInitStatement("String_Node_Str",fieldName,name);
    addInitStatement("String_Node_Str",fieldName);
  }
  return tokenForStringExpression(fieldManager.convertFieldToGetter(name));
}

Fixed version (ground truth):
/** 
 * Declare a field that will hold an Element instance. Returns a token that the caller must set as the id attribute of that element in whatever innerHTML expression will reproduce it at runtime. <P> In the generated code, this token will be replaced by an expression to generate a unique dom id at runtime. Further code will be generated to be run after widgets are instantiated, to use that dom id in a getElementById call and assign the Element instance to its field.
 * @param fieldName The name of the field being declared
 * @param ancestorField The name of fieldName parent
 */
public String declareDomField(String fieldName,String ancestorField) throws UnableToCompleteException {
  ensureAttached();
  String name=declareDomIdHolder();
  if (useLazyWidgetBuilders) {
    FieldWriter field=fieldManager.require(fieldName);
    field.setInitializer(formatCode("String_Node_Str",LazyDomElement.class.getCanonicalName(),fieldManager.convertFieldToGetter(name)));
    fieldManager.require(ancestorField).addAttachStatement(fieldManager.convertFieldToGetter(fieldName) + "String_Node_Str");
  }
 else {
    setFieldInitializer(fieldName,"String_Node_Str");
    addInitStatement("String_Node_Str",fieldName,name);
    addInitStatement("String_Node_Str",fieldName);
  }
  return tokenForStringExpression(fieldManager.convertFieldToGetter(name));
}
Program: 81852
Project: 81852
Buggy source:
@Override public void onBrowserEvent(Event event){
  if (event.getTypeInt() == Event.ONLOAD) {
    clearUnhandledEvent();
  }
  super.onBrowserEvent(event);
}

Fixed version (ground truth):
@Override public void onBrowserEvent(Event event){
  if (event.getTypeInt() == Event.ONLOAD) {
    clearUnhandledEvent();
    state.onLoadEvent(this);
  }
  super.onBrowserEvent(event);
}
Program: 81853
Project: 81853
Buggy source:
public void execute(){
  NativeEvent evt=Document.get().createLoadEvent();
  getImageElement(image).dispatchEvent(evt);
}

Fixed version (ground truth):
public void execute(){
  if (image.state != State.this || this != syntheticEventCommand) {
    return;
  }
  syntheticEventCommand=null;
  if (!image.isAttached()) {
    getImageElement(image).setPropertyString(UNHANDLED_EVENT_ATTR,"String_Node_Str");
    return;
  }
  NativeEvent evt=Document.get().createLoadEvent();
  getImageElement(image).dispatchEvent(evt);
}
Program: 81854
Project: 81854
Buggy source:
/** 
 * We need to synthesize a load event in case the image loads synchronously, before our handlers can be attached.
 * @param image the image on which to dispatch the event
 */
protected void fireSyntheticLoadEvent(final Image image){
  DeferredCommand.addCommand(new Command(){
    public void execute(){
      NativeEvent evt=Document.get().createLoadEvent();
      getImageElement(image).dispatchEvent(evt);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * We need to synthesize a load event in case the image loads synchronously, before our handlers can be attached.
 * @param image the image on which to dispatch the event
 */
protected void fireSyntheticLoadEvent(final Image image){
  syntheticEventCommand=new ScheduledCommand(){
    public void execute(){
      if (image.state != State.this || this != syntheticEventCommand) {
        return;
      }
      syntheticEventCommand=null;
      if (!image.isAttached()) {
        getImageElement(image).setPropertyString(UNHANDLED_EVENT_ATTR,"String_Node_Str");
        return;
      }
      NativeEvent evt=Document.get().createLoadEvent();
      getImageElement(image).dispatchEvent(evt);
    }
  }
;
  Scheduler.get().scheduleDeferred(syntheticEventCommand);
}
Program: 81855
Project: 81855
Buggy source:
@Override public int getAbsoluteLeft(Element elem){
  Document doc=elem.getOwnerDocument();
  return getBoundingClientRectLeft(elem) + doc.getScrollLeft();
}

Fixed version (ground truth):
@Override public int getAbsoluteLeft(Element elem){
  int left=getBoundingClientRectLeft(elem) + getDocumentScrollLeftImpl();
  if (isRTL(elem)) {
    left+=getParentOffsetDelta(elem);
  }
  return left;
}
Program: 81856
Project: 81856
Buggy source:
@Override public int getAbsoluteTop(Element elem){
  Document doc=elem.getOwnerDocument();
  return getBoundingClientRectTop(elem) + doc.getScrollTop();
}

Fixed version (ground truth):
@Override public int getAbsoluteTop(Element elem){
  return getBoundingClientRectTop(elem) + getDocumentScrollTopImpl();
}
Program: 81857
Project: 81857
Buggy source:
private native boolean isRTL(Element elem);

Fixed version (ground truth):
protected native boolean isRTL(Element elem);
Program: 81858
Project: 81858
Buggy source:
/** 
 * Creates an &lt;input type='checkbox'&gt; element.
 * @return the newly created element
 */
public final InputElement createCheckInputElement(){
  return DOMImpl.impl.createInputElement(this,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Creates an &lt;input type='checkbox'&gt; element.
 * @return the newly created element
 */
public final InputElement createCheckInputElement(){
  return DOMImpl.impl.createCheckInputElement(this);
}
Program: 81861
Project: 81861
Buggy source:
@Override public Object createServiceInstance(Method contextMethod,Method domainMethod){
  Class<? extends ServiceLocator> locatorType=getTop().resolveServiceLocator(contextMethod,domainMethod);
  ServiceLocator locator=newInstance(locatorType,ServiceLocator.class);
  return locator.getInstance(domainMethod.getDeclaringClass());
}

Fixed version (ground truth):
@Override public Object createServiceInstance(Method contextMethod,Method domainMethod){
  Class<? extends ServiceLocator> locatorType=getTop().resolveServiceLocator(contextMethod,domainMethod);
  ServiceLocator locator=newInstance(locatorType,ServiceLocator.class);
  Class<?> declaringClass=contextMethod.getDeclaringClass();
  Class<?> serviceClass=getTop().resolveServiceClass(declaringClass.asSubclass(RequestContext.class));
  return locator.getInstance(serviceClass);
}