nus-yam/ex-repair huggingface dataset:
Program: 16330
Project: 16330
Buggy source:
public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Combobox cbx=(Combobox)comp;
  final ListModel<?> model=cbx.getModel();
  final ListSelectionModel smodel=(model instanceof ListSelectionModel) ? (ListSelectionModel)model : null;
  if (val != null) {
    int i=0;
    for (final Iterator<?> it=cbx.getItems().iterator(); it.hasNext(); ) {
      final Comboitem ci=(Comboitem)it.next();
      final String varnm=(String)ci.getAttribute(BinderImpl.VAR);
      Object bean=null;
      if (varnm != null) {
        bean=ci.getAttribute(varnm);
      }
 else       if (model != null) {
        bean=model.getElementAt(i);
      }
 else {
        bean=ci.getValue();
      }
      if (val.equals(bean)) {
        if (smodel != null) {
          smodel.addSelectionInterval(i,i);
          return LoadPropertyBinding.LOAD_IGNORED;
        }
        return ci;
      }
      i++;
    }
  }
  if (smodel != null) {
    if (smodel.getMaxSelectionIndex() != -1)     smodel.clearSelection();
    return LoadPropertyBinding.LOAD_IGNORED;
  }
  return null;
}

Fixed version (ground truth):
public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Combobox cbx=(Combobox)comp;
  final ListModel<?> model=cbx.getModel();
  final ListSelectionModel smodel=(model instanceof ListSelectionModel) ? (ListSelectionModel)model : null;
  if (val != null) {
    int i=0;
    for (final Iterator<?> it=cbx.getItems().iterator(); it.hasNext(); ) {
      final Comboitem ci=(Comboitem)it.next();
      Object bean=null;
      if (model != null) {
        bean=model.getElementAt(i);
      }
 else {
        bean=ci.getValue();
      }
      if (val.equals(bean)) {
        if (smodel != null) {
          smodel.addSelectionInterval(i,i);
          return LoadPropertyBinding.LOAD_IGNORED;
        }
        return ci;
      }
      i++;
    }
  }
  if (smodel != null) {
    if (smodel.getMaxSelectionIndex() != -1)     smodel.clearSelection();
    return LoadPropertyBinding.LOAD_IGNORED;
  }
  return null;
}
Program: 16331
Project: 16331
Buggy source:
public Object coerceToBean(Object val,Component comp,BindContext ctx){
  if (val != null) {
    final Listbox lbx=(Listbox)comp;
    final ListModel<?> model=lbx.getModel();
    final String varnm=(String)((Listitem)val).getAttribute(BinderImpl.VAR);
    if (varnm != null) {
      return ((Listitem)val).getAttribute(varnm);
    }
 else     if (model != null) {
      return model.getElementAt(((Listitem)val).getIndex());
    }
 else {
      return ((Listitem)val).getValue();
    }
  }
  return null;
}

Fixed version (ground truth):
public Object coerceToBean(Object val,Component comp,BindContext ctx){
  if (val != null) {
    final Listbox lbx=(Listbox)comp;
    final ListModel<?> model=lbx.getModel();
    if (model != null) {
      return model.getElementAt(((Listitem)val).getIndex());
    }
 else {
      return ((Listitem)val).getValue();
    }
  }
  return null;
}
Program: 16332
Project: 16332
Buggy source:
public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Listbox lbx=(Listbox)comp;
  final ListModel<?> model=lbx.getModel();
  final ListSelectionModel smodel=(model instanceof ListSelectionModel) ? (ListSelectionModel)model : null;
  if (val != null) {
    for (final Iterator<?> it=lbx.getItems().iterator(); it.hasNext(); ) {
      final Listitem li=(Listitem)it.next();
      final String varnm=(String)li.getAttribute(BinderImpl.VAR);
      Object bean=null;
      if (varnm != null) {
        bean=li.getAttribute(varnm);
      }
 else       if (model != null) {
        bean=model.getElementAt(li.getIndex());
      }
 else {
        bean=li.getValue();
      }
      if (val.equals(bean)) {
        if (smodel != null) {
          final int i=li.getIndex();
          smodel.addSelectionInterval(i,i);
          return LoadPropertyBinding.LOAD_IGNORED;
        }
        return li;
      }
    }
  }
  if (smodel != null) {
    if (smodel.getMaxSelectionIndex() != -1)     smodel.clearSelection();
    return LoadPropertyBinding.LOAD_IGNORED;
  }
  return null;
}

Fixed version (ground truth):
public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Listbox lbx=(Listbox)comp;
  final ListModel<?> model=lbx.getModel();
  final ListSelectionModel smodel=(model instanceof ListSelectionModel) ? (ListSelectionModel)model : null;
  if (val != null) {
    for (final Iterator<?> it=lbx.getItems().iterator(); it.hasNext(); ) {
      final Listitem li=(Listitem)it.next();
      Object bean=null;
      if (model != null) {
        bean=model.getElementAt(li.getIndex());
      }
 else {
        bean=li.getValue();
      }
      if (val.equals(bean)) {
        if (smodel != null) {
          final int i=li.getIndex();
          smodel.addSelectionInterval(i,i);
          return LoadPropertyBinding.LOAD_IGNORED;
        }
        return li;
      }
    }
  }
  if (smodel != null) {
    if (smodel.getMaxSelectionIndex() != -1)     smodel.clearSelection();
    return LoadPropertyBinding.LOAD_IGNORED;
  }
  return null;
}
Program: 16333
Project: 16333
Buggy source:
@SuppressWarnings("String_Node_Str") public Object coerceToBean(Object val,Component comp,BindContext ctx){
  Set<Object> vals=new LinkedHashSet<Object>();
  if (val != null) {
    final Listbox lbx=(Listbox)comp;
    final ListModel<?> model=lbx.getModel();
    final Set<Listitem> items=(Set<Listitem>)Classes.coerce(LinkedHashSet.class,val);
    for (    Listitem item : items) {
      final String varnm=(String)item.getAttribute(BinderImpl.VAR);
      if (varnm != null) {
        vals.add(item.getAttribute(varnm));
      }
 else       if (model != null) {
        vals.add(model.getElementAt(item.getIndex()));
      }
 else {
        vals.add(item.getValue());
      }
    }
    return vals;
  }
  return vals;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Object coerceToBean(Object val,Component comp,BindContext ctx){
  Set<Object> vals=new LinkedHashSet<Object>();
  if (val != null) {
    final Listbox lbx=(Listbox)comp;
    final ListModel<?> model=lbx.getModel();
    final Set<Listitem> items=(Set<Listitem>)Classes.coerce(LinkedHashSet.class,val);
    for (    Listitem item : items) {
      if (model != null) {
        vals.add(model.getElementAt(item.getIndex()));
      }
 else {
        vals.add(item.getValue());
      }
    }
    return vals;
  }
  return vals;
}
Program: 16334
Project: 16334
Buggy source:
@SuppressWarnings("String_Node_Str") public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Listbox lbx=(Listbox)comp;
  final ListModel<?> model=lbx.getModel();
  final ListSelectionModel smodel=(model instanceof ListSelectionModel) ? (ListSelectionModel)model : null;
  final Set<Listitem> items=new LinkedHashSet<Listitem>();
  Set<Object> vals=val == null ? null : (Set<Object>)Classes.coerce(LinkedHashSet.class,val);
  if (smodel != null && smodel.getMaxSelectionIndex() != -1) {
    smodel.clearSelection();
  }
  if (vals != null && vals.size() > 0) {
    for (final Iterator<?> it=lbx.getItems().iterator(); it.hasNext(); ) {
      final Listitem li=(Listitem)it.next();
      final String varnm=(String)li.getAttribute(BinderImpl.VAR);
      Object bean=null;
      if (varnm != null) {
        bean=li.getAttribute(varnm);
      }
 else       if (model != null) {
        bean=model.getElementAt(li.getIndex());
      }
 else {
        bean=li.getValue();
      }
      if (vals.contains(bean)) {
        if (smodel != null) {
          final int i=li.getIndex();
          smodel.addSelectionInterval(i,i);
        }
        items.add(li);
      }
    }
  }
  return smodel == null ? items : LoadPropertyBinding.LOAD_IGNORED;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Listbox lbx=(Listbox)comp;
  final ListModel<?> model=lbx.getModel();
  final ListSelectionModel smodel=(model instanceof ListSelectionModel) ? (ListSelectionModel)model : null;
  final Set<Listitem> items=new LinkedHashSet<Listitem>();
  Set<Object> vals=val == null ? null : (Set<Object>)Classes.coerce(LinkedHashSet.class,val);
  if (smodel != null && smodel.getMaxSelectionIndex() != -1) {
    smodel.clearSelection();
  }
  if (vals != null && vals.size() > 0) {
    for (final Iterator<?> it=lbx.getItems().iterator(); it.hasNext(); ) {
      final Listitem li=(Listitem)it.next();
      Object bean=null;
      if (model != null) {
        bean=model.getElementAt(li.getIndex());
      }
 else {
        bean=li.getValue();
      }
      if (vals.contains(bean)) {
        if (smodel != null) {
          final int i=li.getIndex();
          smodel.addSelectionInterval(i,i);
        }
        items.add(li);
      }
    }
  }
  return smodel == null ? items : LoadPropertyBinding.LOAD_IGNORED;
}
Program: 16335
Project: 16335
Buggy source:
public Object coerceToBean(Object val,Component comp,BindContext ctx){
  if (val != null) {
    final Tree tree=(Tree)comp;
    final TreeModel<?> model=tree.getModel();
    final String varnm=(String)((Treeitem)val).getAttribute(BinderImpl.VAR);
    if (varnm != null) {
      return ((Treeitem)val).getAttribute(varnm);
    }
 else     if (model != null) {
      return model.getChild(toPath((Treeitem)val));
    }
 else {
      return ((Treeitem)val).getValue();
    }
  }
  return null;
}

Fixed version (ground truth):
public Object coerceToBean(Object val,Component comp,BindContext ctx){
  if (val != null) {
    final Tree tree=(Tree)comp;
    final TreeModel<?> model=tree.getModel();
    if (model != null) {
      return model.getChild(toPath((Treeitem)val));
    }
 else {
      return ((Treeitem)val).getValue();
    }
  }
  return null;
}
Program: 16336
Project: 16336
Buggy source:
public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Tree tree=(Tree)comp;
  final TreeModel<?> model=tree.getModel();
  final TreeSelectionModel smodel=(model instanceof TreeSelectionModel) ? (TreeSelectionModel)model : null;
  if (val != null) {
    for (final Iterator<?> it=tree.getItems().iterator(); it.hasNext(); ) {
      final Treeitem ti=(Treeitem)it.next();
      final String varnm=(String)ti.getAttribute(BinderImpl.VAR);
      Object bean=null;
      int path[]=null;
      if (varnm != null) {
        bean=ti.getAttribute(varnm);
      }
 else       if (model != null) {
        bean=model.getChild(path=toPath(ti));
      }
 else {
        bean=ti.getValue();
      }
      if (val.equals(bean)) {
        if (smodel != null) {
          if (path == null) {
            path=toPath(ti);
          }
          smodel.addSelectionPath(path);
          return LoadPropertyBinding.LOAD_IGNORED;
        }
        return ti;
      }
    }
  }
  if (smodel != null) {
    if (smodel.getSelectionCount() > 0)     smodel.clearSelection();
    return LoadPropertyBinding.LOAD_IGNORED;
  }
  return null;
}

Fixed version (ground truth):
public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Tree tree=(Tree)comp;
  final TreeModel<?> model=tree.getModel();
  final TreeSelectionModel smodel=(model instanceof TreeSelectionModel) ? (TreeSelectionModel)model : null;
  if (val != null) {
    for (final Iterator<?> it=tree.getItems().iterator(); it.hasNext(); ) {
      final Treeitem ti=(Treeitem)it.next();
      Object bean=null;
      int path[]=null;
      if (model != null) {
        bean=model.getChild(path=toPath(ti));
      }
 else {
        bean=ti.getValue();
      }
      if (val.equals(bean)) {
        if (smodel != null) {
          if (path == null) {
            path=toPath(ti);
          }
          smodel.addSelectionPath(path);
          return LoadPropertyBinding.LOAD_IGNORED;
        }
        return ti;
      }
    }
  }
  if (smodel != null) {
    if (smodel.getSelectionCount() > 0)     smodel.clearSelection();
    return LoadPropertyBinding.LOAD_IGNORED;
  }
  return null;
}
Program: 16337
Project: 16337
Buggy source:
@SuppressWarnings("String_Node_Str") public Object coerceToBean(Object val,Component comp,BindContext ctx){
  Set<Object> vals=new LinkedHashSet<Object>();
  if (val != null) {
    final Tree tree=(Tree)comp;
    final TreeModel<?> model=tree.getModel();
    final Set<Treeitem> items=(Set<Treeitem>)Classes.coerce(LinkedHashSet.class,val);
    for (    Treeitem item : items) {
      final String varnm=(String)item.getAttribute(BinderImpl.VAR);
      if (varnm != null) {
        vals.add(item.getAttribute(varnm));
      }
 else       if (model != null) {
        vals.add(model.getChild(toPath(item)));
      }
 else {
        vals.add(item.getValue());
      }
    }
    return vals;
  }
  return vals;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Object coerceToBean(Object val,Component comp,BindContext ctx){
  Set<Object> vals=new LinkedHashSet<Object>();
  if (val != null) {
    final Tree tree=(Tree)comp;
    final TreeModel<?> model=tree.getModel();
    final Set<Treeitem> items=(Set<Treeitem>)Classes.coerce(LinkedHashSet.class,val);
    for (    Treeitem item : items) {
      if (model != null) {
        vals.add(model.getChild(toPath(item)));
      }
 else {
        vals.add(item.getValue());
      }
    }
    return vals;
  }
  return vals;
}
Program: 16338
Project: 16338
Buggy source:
@SuppressWarnings("String_Node_Str") public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Tree tree=(Tree)comp;
  final TreeModel<?> model=tree.getModel();
  final TreeSelectionModel smodel=(model instanceof TreeSelectionModel) ? (TreeSelectionModel)model : null;
  final Set<Treeitem> items=new LinkedHashSet<Treeitem>();
  Set<Object> vals=val == null ? null : (Set<Object>)Classes.coerce(LinkedHashSet.class,val);
  if (smodel != null && !smodel.isSelectionEmpty()) {
    smodel.clearSelection();
  }
  if (vals != null && vals.size() > 0) {
    for (final Iterator<?> it=tree.getItems().iterator(); it.hasNext(); ) {
      final Treeitem ti=(Treeitem)it.next();
      final String varnm=(String)ti.getAttribute(BinderImpl.VAR);
      Object bean=null;
      int path[]=null;
      if (varnm != null) {
        bean=ti.getAttribute(varnm);
      }
 else       if (model != null) {
        bean=model.getChild(path=toPath(ti));
      }
 else {
        bean=ti.getValue();
      }
      if (vals.contains(bean)) {
        if (smodel != null) {
          if (path == null) {
            path=toPath(ti);
          }
          smodel.addSelectionPath(path);
        }
        items.add(ti);
      }
    }
  }
  return smodel == null ? items : LoadPropertyBinding.LOAD_IGNORED;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Tree tree=(Tree)comp;
  final TreeModel<?> model=tree.getModel();
  final TreeSelectionModel smodel=(model instanceof TreeSelectionModel) ? (TreeSelectionModel)model : null;
  final Set<Treeitem> items=new LinkedHashSet<Treeitem>();
  Set<Object> vals=val == null ? null : (Set<Object>)Classes.coerce(LinkedHashSet.class,val);
  if (smodel != null && !smodel.isSelectionEmpty()) {
    smodel.clearSelection();
  }
  if (vals != null && vals.size() > 0) {
    for (final Iterator<?> it=tree.getItems().iterator(); it.hasNext(); ) {
      final Treeitem ti=(Treeitem)it.next();
      Object bean=null;
      int path[]=null;
      if (model != null) {
        bean=model.getChild(path=toPath(ti));
      }
 else {
        bean=ti.getValue();
      }
      if (vals.contains(bean)) {
        if (smodel != null) {
          if (path == null) {
            path=toPath(ti);
          }
          smodel.addSelectionPath(path);
        }
        items.add(ti);
      }
    }
  }
  return smodel == null ? items : LoadPropertyBinding.LOAD_IGNORED;
}
Program: 16340
Project: 16340
Buggy source:
@SuppressWarnings("String_Node_Str") public void load(BindContext ctx){
  final Component comp=getComponent();
  final BindEvaluatorX eval=getBinder().getEvaluatorX();
  Object value=eval.getValue(ctx,comp,_accessInfo.getProperty());
  comp.getChildren().clear();
  if (value != null) {
    BindChildRenderer renderer=new BindChildRenderer();
    List<Object> data=(List<Object>)Classes.coerce(List.class,value);
    int size=data.size();
    for (int i=0; i < size; i++) {
      renderer.render(comp,data.get(i),i);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void load(BindContext ctx){
  final Component comp=getComponent();
  final BindEvaluatorX eval=getBinder().getEvaluatorX();
  Object value=eval.getValue(ctx,comp,_accessInfo.getProperty());
  comp.getChildren().clear();
  if (value != null) {
    BindChildRenderer renderer=new BindChildRenderer();
    List<Object> data=(List<Object>)Classes.coerce(List.class,value);
    comp.setAttribute(BinderImpl.MODEL,data);
    int size=data.size();
    for (int i=0; i < size; i++) {
      renderer.render(comp,data.get(i),i);
    }
  }
}
Program: 16341
Project: 16341
Buggy source:
@SuppressWarnings("String_Node_Str") public void load(BindContext ctx){
  final Component comp=getComponent();
  final BindEvaluatorX eval=getBinder().getEvaluatorX();
  Object value=eval.getValue(ctx,comp,_accessInfo.getProperty());
  comp.getChildren().clear();
  if (value != null) {
    BindChildRenderer renderer=new BindChildRenderer();
    List<Object> data=(List<Object>)Classes.coerce(List.class,value);
    int size=data.size();
    for (int i=0; i < size; i++) {
      renderer.render(comp,data.get(i),i);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void load(BindContext ctx){
  final Component comp=getComponent();
  final BindEvaluatorX eval=getBinder().getEvaluatorX();
  Object value=eval.getValue(ctx,comp,_accessInfo.getProperty());
  comp.getChildren().clear();
  if (value != null) {
    BindChildRenderer renderer=new BindChildRenderer();
    List<Object> data=(List<Object>)Classes.coerce(List.class,value);
    comp.setAttribute(BinderImpl.MODEL,data);
    int size=data.size();
    for (int i=0; i < size; i++) {
      renderer.render(comp,data.get(i),i);
    }
  }
}
Program: 16342
Project: 16342
Buggy source:
public void onChange(ListDataEvent event){
  if (event.getType() == ListDataEvent.SELECTION_CHANGED) {
    if (_model instanceof ListSelectionModel) {
      ListSelectionModel smodel=(ListSelectionModel)_model;
      setSelectedIndex(smodel.getMinSelectionIndex());
    }
  }
 else {
    postOnInitRender();
  }
}

Fixed version (ground truth):
public void onChange(ListDataEvent event){
  if (_model instanceof ListSelectionModel) {
    ListSelectionModel smodel=(ListSelectionModel)_model;
    setSelectedIndex(smodel.getMinSelectionIndex());
  }
  if (event.getType() != ListDataEvent.SELECTION_CHANGED) {
    postOnInitRender();
  }
}
Program: 16343
Project: 16343
Buggy source:
private void initDataListener(){
  if (_dataListener == null)   _dataListener=new ListDataListener(){
    public void onChange(    ListDataEvent event){
      if (event.getType() == ListDataEvent.SELECTION_CHANGED) {
        if (_model instanceof ListSelectionModel) {
          ListSelectionModel smodel=(ListSelectionModel)_model;
          setSelectedIndex(smodel.getMinSelectionIndex());
        }
      }
 else {
        postOnInitRender();
      }
    }
  }
;
  _model.addListDataListener(_dataListener);
}

Fixed version (ground truth):
private void initDataListener(){
  if (_dataListener == null)   _dataListener=new ListDataListener(){
    public void onChange(    ListDataEvent event){
      if (_model instanceof ListSelectionModel) {
        ListSelectionModel smodel=(ListSelectionModel)_model;
        setSelectedIndex(smodel.getMinSelectionIndex());
      }
      if (event.getType() != ListDataEvent.SELECTION_CHANGED) {
        postOnInitRender();
      }
    }
  }
;
  _model.addListDataListener(_dataListener);
}
Program: 16344
Project: 16344
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  reIndexRequired();
  if (_model != null)   initDataListener();
}

Fixed version (ground truth):
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  reIndexRequired();
  if (_model != null) {
    initDataListener();
    if (_model instanceof ListModelMap) {
      for (      Comboitem item : getItems()) {
        item.setValue(_model.getElementAt(item.getIndex()));
      }
    }
  }
}
Program: 16345
Project: 16345
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _model=(ListModel)s.readObject();
  didDeserialize(_model);
  _renderer=(RowRenderer)s.readObject();
  didDeserialize(_renderer);
  init();
  afterUnmarshal(-1);
  int offset=s.readInt();
  int limit=s.readInt();
  resetDataLoader(false);
  getDataLoader().init(this,offset,limit);
  if (_model != null) {
    initDataListener();
    getDataLoader().setLoadAll(_renderAll);
  }
}

Fixed version (ground truth):
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _model=(ListModel)s.readObject();
  didDeserialize(_model);
  _renderer=(RowRenderer)s.readObject();
  didDeserialize(_renderer);
  init();
  afterUnmarshal(-1);
  int offset=s.readInt();
  int limit=s.readInt();
  resetDataLoader(false);
  getDataLoader().init(this,offset,limit);
  if (_model != null) {
    initDataListener();
    getDataLoader().setLoadAll(_renderAll);
    if (_model instanceof ListModelMap && _rows != null) {
      for (      Component o : _rows.getChildren()) {
        Row item=(Row)o;
        item.setValue(_model.getElementAt(item.getIndex()));
      }
    }
  }
}
Program: 16346
Project: 16346
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _model=(ListModel)s.readObject();
  didDeserialize(_model);
  _renderer=(ListitemRenderer)s.readObject();
  didDeserialize(_renderer);
  init();
  int offset=s.readInt();
  afterUnmarshal(offset);
  int limit=s.readInt();
  resetDataLoader(false);
  getDataLoader().init(this,offset,limit);
  if (_model != null) {
    initDataListener();
    getDataLoader().setLoadAll(_renderAll);
  }
  int size=s.readInt();
  if (size > 0) {
    List groupsInfo=(List)s.readObject();
    for (int i=0; i < size; i++)     _groupsInfo.add((int[])groupsInfo.get(i));
  }
}

Fixed version (ground truth):
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _model=(ListModel)s.readObject();
  didDeserialize(_model);
  _renderer=(ListitemRenderer)s.readObject();
  didDeserialize(_renderer);
  init();
  int offset=s.readInt();
  afterUnmarshal(offset);
  int limit=s.readInt();
  resetDataLoader(false);
  getDataLoader().init(this,offset,limit);
  if (_model != null) {
    initDataListener();
    getDataLoader().setLoadAll(_renderAll);
    if (_model instanceof ListModelMap) {
      for (      Listitem item : getItems())       item.setValue(_model.getElementAt(item.getIndex()));
    }
  }
  int size=s.readInt();
  if (size > 0) {
    List groupsInfo=(List)s.readObject();
    for (int i=0; i < size; i++)     _groupsInfo.add((int[])groupsInfo.get(i));
  }
}
Program: 16347
Project: 16347
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  afterUnmarshal();
}

Fixed version (ground truth):
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  if (s.readBoolean())   _value=s.readObject();
  afterUnmarshal();
}
Program: 16348
Project: 16348
Buggy source:
/** 
 * Adds the event listener for the onPaging event. 
 */
private void addPagingListener(Paginal pgi){
  if (_pgListener == null)   _pgListener=new SerializableEventListener<PagingEvent>(){
    public void onEvent(    PagingEvent event){
      Events.postEvent(new PagingEvent(event.getName(),Grid.this,event.getPageable(),event.getActivePage()));
    }
  }
;
  pgi.addEventListener(ZulEvents.ON_PAGING,_pgListener);
  if (_pgImpListener == null)   _pgImpListener=new SerializableEventListener<Event>(){
    public void onEvent(    Event event){
      if (_rows != null && _model != null && inPagingMold()) {
        final Paginal pgi=getPaginal();
        int pgsz=pgi.getPageSize();
        final int ofs=pgi.getActivePage() * pgsz;
        if (_rod) {
          getDataLoader().syncModel(ofs,pgsz);
        }
        postOnPagingInitRender();
      }
      if (getModel() != null || getPagingPosition().equals("String_Node_Str"))       invalidate();
 else       if (_rows != null) {
        _rows.invalidate();
        if (_frozen != null)         _frozen.invalidate();
      }
    }
  }
;
  pgi.addEventListener("String_Node_Str",_pgImpListener);
}

Fixed version (ground truth):
/** 
 * Adds the event listener for the onPaging event. 
 */
private void addPagingListener(Paginal pgi){
  if (_pgListener == null)   _pgListener=new PGListener();
  pgi.addEventListener(ZulEvents.ON_PAGING,_pgListener);
  if (_pgImpListener == null)   _pgImpListener=new PGImpListener();
  pgi.addEventListener("String_Node_Str",_pgImpListener);
}
Program: 16349
Project: 16349
Buggy source:
/** 
 * Adds the event listener for the onPaging event. 
 */
private void addPagingListener(Paginal pgi){
  if (_pgListener == null)   _pgListener=new SerializableEventListener<PagingEvent>(){
    public void onEvent(    PagingEvent event){
      Events.postEvent(new PagingEvent(event.getName(),Listbox.this,event.getPageable(),event.getActivePage()));
    }
  }
;
  pgi.addEventListener(ZulEvents.ON_PAGING,_pgListener);
  if (_pgImpListener == null)   _pgImpListener=new SerializableEventListener<Event>(){
    public void onEvent(    Event event){
      if (_model != null && inPagingMold()) {
        final Paginal pgi=getPaginal();
        int pgsz=pgi.getPageSize();
        final int ofs=pgi.getActivePage() * pgsz;
        if (_rod) {
          getDataLoader().syncModel(ofs,pgsz);
        }
        postOnPagingInitRender();
      }
      invalidate();
    }
  }
;
  pgi.addEventListener("String_Node_Str",_pgImpListener);
}

Fixed version (ground truth):
/** 
 * Adds the event listener for the onPaging event. 
 */
private void addPagingListener(Paginal pgi){
  if (_pgListener == null)   _pgListener=new PGListener();
  pgi.addEventListener(ZulEvents.ON_PAGING,_pgListener);
  if (_pgImpListener == null)   _pgImpListener=new PGImpListener();
  pgi.addEventListener("String_Node_Str",_pgImpListener);
}
Program: 16350
Project: 16350
Buggy source:
/** 
 * Adds the event listener for the onPaging event. 
 */
private void addPagingListener(Paginal pgi){
  if (_pgListener == null)   _pgListener=new SerializableEventListener<PagingEvent>(){
    public void onEvent(    PagingEvent event){
      Events.postEvent(new PagingEvent(event.getName(),Tree.this,event.getPageable(),event.getActivePage()));
    }
  }
;
  pgi.addEventListener(ZulEvents.ON_PAGING,_pgListener);
  if (_pgImpListener == null)   _pgImpListener=new SerializableEventListener<Event>(){
    public void onEvent(    Event event){
      if (inPagingMold()) {
        invalidate();
      }
    }
  }
;
  pgi.addEventListener("String_Node_Str",_pgImpListener);
}

Fixed version (ground truth):
/** 
 * Adds the event listener for the onPaging event. 
 */
private void addPagingListener(Paginal pgi){
  if (_pgListener == null)   _pgListener=new PGListener();
  pgi.addEventListener(ZulEvents.ON_PAGING,_pgListener);
  if (_pgImpListener == null)   _pgImpListener=new PGImpListener();
  pgi.addEventListener("String_Node_Str",_pgImpListener);
}
Program: 16351
Project: 16351
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
}

Fixed version (ground truth):
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  _indexCache=new LinkedHashMap<Object,Integer>();
}
Program: 16352
Project: 16352
Buggy source:
/** 
 * Handles when the list model's content changed.
 */
private void onListDataChange(ListDataEvent event){
  int type=event.getType();
  if ((type == ListDataEvent.INTERVAL_ADDED || type == ListDataEvent.CONTENTS_CHANGED) && !isIgnoreSortWhenChanged()) {
    doSort(this);
  }
 else   if (type == ListDataEvent.SELECTION_CHANGED) {
    if (_model instanceof ListSelectionModel) {
      ListSelectionModel smodel=(ListSelectionModel)_model;
      if (smodel.isSelectionEmpty()) {
        for (        Listitem item : new ArrayList<Listitem>(_selItems))         item.setSelected(false);
      }
 else {
        final int min=Math.max(event.getIndex0(),smodel.getMinSelectionIndex());
        final int max=Math.min(event.getIndex1(),smodel.getMaxSelectionIndex());
        for (int i=min; i <= max; i++) {
          Listitem item=getItemAtIndex(i);
          if (item != null) {
            item.setSelected(smodel.isSelectedIndex(i));
          }
 else           if (smodel.isSelectedIndex(i)) {
            setSelectedIndex(i);
          }
        }
      }
    }
  }
 else {
    getDataLoader().doListDataChange(event);
    postOnInitRender();
  }
}

Fixed version (ground truth):
/** 
 * Handles when the list model's content changed.
 */
private void onListDataChange(ListDataEvent event){
  int type=event.getType();
  if ((type == ListDataEvent.INTERVAL_ADDED || type == ListDataEvent.CONTENTS_CHANGED) && !isIgnoreSortWhenChanged()) {
    doSort(this);
  }
 else   if (type == ListDataEvent.SELECTION_CHANGED) {
    if (_model instanceof ListSelectionModel) {
      ListSelectionModel smodel=(ListSelectionModel)_model;
      if (smodel.isSelectionEmpty()) {
        for (        Listitem item : new ArrayList<Listitem>(_selItems))         item.setSelected(false);
      }
 else {
        final int min=event.getIndex0();
        final int max=event.getIndex1();
        for (int i=min; i <= max; i++) {
          Listitem item=getItemAtIndex(i);
          if (item != null) {
            item.setSelected(smodel.isSelectedIndex(i));
          }
 else           if (smodel.isSelectedIndex(i)) {
            setSelectedIndex(i);
          }
        }
      }
    }
  }
 else {
    getDataLoader().doListDataChange(event);
    postOnInitRender();
  }
}
Program: 16353
Project: 16353
Buggy source:
private void afterUnmarshal(){
  final int offset=getDataLoader().getOffset();
  final int limit=getDataLoader().getLimit();
  resetDataLoader();
  getDataLoader().init(this,offset,limit);
  int index=offset;
  for (Iterator it=getChildren().iterator(); it.hasNext(); ) {
    final Object child=it.next();
    if (child instanceof Listitem) {
      final Listitem li=(Listitem)child;
      li.setIndexDirectly(index++);
      if (li.isSelected()) {
        _selItems.add(li);
      }
    }
 else     if (child instanceof Listhead) {
      _listhead=(Listhead)child;
    }
 else     if (child instanceof Listfoot) {
      _listfoot=(Listfoot)child;
    }
 else     if (child instanceof Frozen) {
      _frozen=(Frozen)child;
    }
 else     if (child instanceof Paging) {
      _pgi=_paging=(Paging)child;
      addPagingListener(_pgi);
    }
  }
}

Fixed version (ground truth):
private void afterUnmarshal(){
  final int offset=getDataLoader().getOffset();
  int index=offset;
  for (Iterator it=getChildren().iterator(); it.hasNext(); ) {
    final Object child=it.next();
    if (child instanceof Listitem) {
      final Listitem li=(Listitem)child;
      li.setIndexDirectly(index++);
      if (li.isSelected()) {
        _selItems.add(li);
      }
    }
 else     if (child instanceof Listhead) {
      _listhead=(Listhead)child;
    }
 else     if (child instanceof Listfoot) {
      _listfoot=(Listfoot)child;
    }
 else     if (child instanceof Frozen) {
      _frozen=(Frozen)child;
    }
 else     if (child instanceof Paging) {
      _pgi=_paging=(Paging)child;
      addPagingListener(_pgi);
    }
  }
  final int limit=getDataLoader().getLimit();
  resetDataLoader();
  getDataLoader().init(this,offset,limit);
}
Program: 16354
Project: 16354
Buggy source:
/** 
 * Handles when the list model's content changed.
 */
private void onListDataChange(ListDataEvent event){
  int type=event.getType();
  if ((type == ListDataEvent.INTERVAL_ADDED || type == ListDataEvent.CONTENTS_CHANGED) && !isIgnoreSortWhenChanged()) {
    doSort(this);
  }
 else   if (type == ListDataEvent.SELECTION_CHANGED) {
    if (_model instanceof ListSelectionModel) {
      ListSelectionModel smodel=(ListSelectionModel)_model;
      if (smodel.isSelectionEmpty()) {
        for (        Listitem item : new ArrayList<Listitem>(_selItems))         item.setSelected(false);
      }
 else {
        for (int i=smodel.getMinSelectionIndex(); i <= smodel.getMaxSelectionIndex(); i++) {
          Listitem item=getItemAtIndex(i);
          if (item != null) {
            item.setSelected(smodel.isSelectedIndex(i));
          }
 else           if (smodel.isSelectedIndex(i)) {
            setSelectedIndex(i);
          }
        }
      }
    }
  }
 else {
    getDataLoader().doListDataChange(event);
    postOnInitRender();
  }
}

Fixed version (ground truth):
/** 
 * Handles when the list model's content changed.
 */
private void onListDataChange(ListDataEvent event){
  int type=event.getType();
  if ((type == ListDataEvent.INTERVAL_ADDED || type == ListDataEvent.CONTENTS_CHANGED) && !isIgnoreSortWhenChanged()) {
    doSort(this);
  }
 else   if (type == ListDataEvent.SELECTION_CHANGED) {
    if (_model instanceof ListSelectionModel) {
      ListSelectionModel smodel=(ListSelectionModel)_model;
      if (smodel.isSelectionEmpty()) {
        for (        Listitem item : new ArrayList<Listitem>(_selItems))         item.setSelected(false);
      }
 else {
        final int min=Math.max(event.getIndex0(),smodel.getMinSelectionIndex());
        final int max=Math.min(event.getIndex1(),smodel.getMaxSelectionIndex());
        for (int i=min; i <= max; i++) {
          Listitem item=getItemAtIndex(i);
          if (item != null) {
            item.setSelected(smodel.isSelectedIndex(i));
          }
 else           if (smodel.isSelectedIndex(i)) {
            setSelectedIndex(i);
          }
        }
      }
    }
  }
 else {
    getDataLoader().doListDataChange(event);
    postOnInitRender();
  }
}
Program: 16355
Project: 16355
Buggy source:
private void fireSelectionChanged(){
  if (lastChangedIndex == MIN) {
    return;
  }
  int oldFirstChangedIndex=firstChangedIndex;
  int oldLastChangedIndex=lastChangedIndex;
  firstChangedIndex=MAX;
  lastChangedIndex=MIN;
  fireEvent(ListDataEvent.SELECTION_CHANGED,oldFirstChangedIndex,oldLastChangedIndex);
}

Fixed version (ground truth):
private void fireSelectionChanged(){
  if (lastChangedIndex == MIN || noFireEvent) {
    return;
  }
  int oldFirstChangedIndex=firstChangedIndex;
  int oldLastChangedIndex=lastChangedIndex;
  firstChangedIndex=MAX;
  lastChangedIndex=MIN;
  fireEvent(ListDataEvent.SELECTION_CHANGED,oldFirstChangedIndex,oldLastChangedIndex);
}
Program: 16356
Project: 16356
Buggy source:
@SuppressWarnings("String_Node_Str") void render(Listitem item) throws Throwable {
  if (item.isLoaded())   return;
  if (!_rendered && (_renderer instanceof RendererCtrl)) {
    ((RendererCtrl)_renderer).doTry();
    _ctrled=true;
  }
  final Listcell cell=(Listcell)item.getFirstChild();
  if (!(_renderer instanceof ListitemRendererExt) || (((ListitemRendererExt)_renderer).getControls() & ListitemRendererExt.DETACH_ON_RENDER) != 0) {
    cell.detach();
  }
  final Object value=_model.getElementAt(item.getIndex());
  final boolean selected=_model instanceof ListSelectionModel && ((ListSelectionModel)_model).isSelectedIndex(item.getIndex());
  try {
    _renderer.render(item,value);
    Object v=item.getAttribute("String_Node_Str");
    if (v != null)     item=(Listitem)v;
  }
 catch (  Throwable ex) {
    try {
      item.setLabel(Exceptions.getMessage(ex));
    }
 catch (    Throwable t) {
      log.error(t);
    }
    item.setLoaded(true);
    throw ex;
  }
 finally {
    if (item.getChildren().isEmpty())     cell.setParent(item);
  }
  if (selected) {
    addItemToSelection(item);
  }
  item.setLoaded(true);
  _rendered=true;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") void render(Listitem item) throws Throwable {
  if (item.isLoaded())   return;
  if (!_rendered && (_renderer instanceof RendererCtrl)) {
    ((RendererCtrl)_renderer).doTry();
    _ctrled=true;
  }
  final Listcell cell=(Listcell)item.getFirstChild();
  if (!(_renderer instanceof ListitemRendererExt) || (((ListitemRendererExt)_renderer).getControls() & ListitemRendererExt.DETACH_ON_RENDER) != 0) {
    cell.detach();
  }
  final Object value=_model.getElementAt(item.getIndex());
  final boolean selected=_model instanceof ListSelectionModel && !((ListSelectionModel)_model).isSelectionEmpty() && ((ListSelectionModel)_model).isSelectedIndex(item.getIndex());
  try {
    _renderer.render(item,value);
    Object v=item.getAttribute("String_Node_Str");
    if (v != null)     item=(Listitem)v;
  }
 catch (  Throwable ex) {
    try {
      item.setLabel(Exceptions.getMessage(ex));
    }
 catch (    Throwable t) {
      log.error(t);
    }
    item.setLoaded(true);
    throw ex;
  }
 finally {
    if (item.getChildren().isEmpty())     cell.setParent(item);
  }
  if (selected) {
    addItemToSelection(item);
  }
  item.setLoaded(true);
  _rendered=true;
}
Program: 16357
Project: 16357
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public Object willClone(Component comp){
  if (_model instanceof ComponentCloneListener)   return GroupsListModel.toListModel((GroupsModel<D,G,F>)((ComponentCloneListener)_model).willClone(comp));
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public Object willClone(Component comp){
  if (_model instanceof ComponentCloneListener) {
    GroupsListModelExt clone=(GroupsListModelExt)clone();
    GroupsModel m=(GroupsModel)((ComponentCloneListener)_model).willClone(comp);
    if (m != null)     clone._model=m;
    clone.init();
    return clone;
  }
  return null;
}
Program: 16358
Project: 16358
Buggy source:
/** 
 * Returns the index of the first occurrence of the specified element.
 * @since 6.0.0
 */
protected int indexOf(Object obj){
  for (int i=0, j=this.getSize(); i < j; i++) {
    if (Objects.equals(obj,getElementAt(i)))     return i;
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * Returns the index of the first occurrence of the specified element. <p> The performance of this implementation is bad, it will go through the whole GroupsModel to check the element's index.
 * @since 6.0.0
 */
protected int indexOf(Object obj){
  if (_indexCache.isEmpty()) {
    reindex();
  }
  Integer val=_indexCache.get(obj);
  return val == null ? -1 : val.intValue();
}
Program: 16359
Project: 16359
Buggy source:
private void init(){
  final int groupCount=_model.getGroupCount();
  _gpofs=new int[groupCount];
  _gpfts=new boolean[groupCount];
  _gpcloses=new boolean[groupCount];
  _size=0;
  for (int j=0; j < groupCount; ++j) {
    _gpofs[j]=_size;
    _gpcloses[j]=_model.isClose(j);
    _size+=1 + (_gpcloses[j] ? 0 : _model.getChildCount(j));
    _gpfts[j]=_model.hasGroupfoot(j);
    if (_gpfts[j])     ++_size;
  }
  if (_listener == null) {
    _listener=new DataListener();
    _model.addGroupsDataListener(_listener);
  }
}

Fixed version (ground truth):
protected void init(){
  final int groupCount=_model.getGroupCount();
  _gpofs=new int[groupCount];
  _gpfts=new boolean[groupCount];
  _gpcloses=new boolean[groupCount];
  _size=0;
  for (int j=0; j < groupCount; ++j) {
    _gpofs[j]=_size;
    _gpcloses[j]=_model.isClose(j);
    _size+=1 + (_gpcloses[j] ? 0 : _model.getChildCount(j));
    _gpfts[j]=_model.hasGroupfoot(j);
    if (_gpfts[j])     ++_size;
  }
  if (_listener == null) {
    _listener=new DataListener();
    _model.addGroupsDataListener(_listener);
  }
}
Program: 16360
Project: 16360
Buggy source:
public void onChange(GroupsDataEvent event){
  int type=event.getType(), j0=event.getIndex0(), j1=event.getIndex1();
switch (type) {
case GroupsDataEvent.CONTENTS_CHANGED:
case GroupsDataEvent.INTERVAL_ADDED:
case GroupsDataEvent.INTERVAL_REMOVED:
    final int gi=event.getGroupIndex();
  if (gi < 0 || gi >= _gpofs.length)   throw new IndexOutOfBoundsException("String_Node_Str" + getGroupCount() + "String_Node_Str"+ gi);
int ofs=_gpofs[gi] + 1;
j0=j0 >= 0 ? j0 + ofs : ofs;
if (j1 >= 0) {
j1=j1 + ofs;
}
 else {
j1=getNextOffset(gi) - 1;
if (_gpfts[gi]) --j1;
}
break;
case GroupsDataEvent.GROUPS_CHANGED:
case GroupsDataEvent.GROUPS_ADDED:
case GroupsDataEvent.GROUPS_REMOVED:
type-=GroupsDataEvent.GROUPS_CHANGED;
if (j0 >= 0) {
if (j0 >= _gpofs.length) throw new IndexOutOfBoundsException("String_Node_Str" + getGroupCount() + "String_Node_Str"+ j0);
j0=_gpofs[j0];
}
if (j1 >= 0) {
if (j1 >= _gpofs.length) throw new IndexOutOfBoundsException("String_Node_Str" + getGroupCount() + "String_Node_Str"+ j1);
j1=getNextOffset(j1) - 1;
}
}
init();
fireEvent(type,j0,j1);
}

Fixed version (ground truth):
public void onChange(GroupsDataEvent event){
  int type=event.getType(), j0=event.getIndex0(), j1=event.getIndex1();
  if (type != GroupsDataEvent.GROUPS_CHANGED) {
    GroupsListModel self=GroupsListModel.this;
    List<Object> selected=null;
    if (!self.isSelectionEmpty()) {
      selected=new ArrayList<Object>();
      int min=self.getMinSelectionIndex();
      int max=self.getMinSelectionIndex();
      for (      Map.Entry<Object,Integer> me : _indexCache.entrySet()) {
        if (min >= me.getValue() && max <= me.getValue()) {
          if (GroupsListModel.super.isSelectedIndex(me.getValue())) {
            selected.add(me.getKey());
          }
        }
        if (max < me.getValue())         break;
      }
    }
    _indexCache.clear();
    if (selected != null) {
      int[] sel=new int[selected.size()];
      int i=0;
      for (      Object o : selected) {
        sel[i++]=indexOf(o);
      }
      self.reorganizeIndex(sel);
    }
  }
switch (type) {
case GroupsDataEvent.CONTENTS_CHANGED:
case GroupsDataEvent.INTERVAL_ADDED:
case GroupsDataEvent.INTERVAL_REMOVED:
    final int gi=event.getGroupIndex();
  if (gi < 0 || gi >= _gpofs.length)   throw new IndexOutOfBoundsException("String_Node_Str" + getGroupCount() + "String_Node_Str"+ gi);
int ofs=_gpofs[gi] + 1;
j0=j0 >= 0 ? j0 + ofs : ofs;
if (j1 >= 0) {
j1=j1 + ofs;
}
 else {
j1=getNextOffset(gi) - 1;
if (_gpfts[gi]) --j1;
}
break;
case GroupsDataEvent.GROUPS_CHANGED:
case GroupsDataEvent.GROUPS_ADDED:
case GroupsDataEvent.GROUPS_REMOVED:
type-=GroupsDataEvent.GROUPS_CHANGED;
if (j0 >= 0) {
if (j0 >= _gpofs.length) throw new IndexOutOfBoundsException("String_Node_Str" + getGroupCount() + "String_Node_Str"+ j0);
j0=_gpofs[j0];
}
if (j1 >= 0) {
if (j1 >= _gpofs.length) throw new IndexOutOfBoundsException("String_Node_Str" + getGroupCount() + "String_Node_Str"+ j1);
j1=getNextOffset(j1) - 1;
}
}
init();
fireEvent(type,j0,j1);
}
Program: 16361
Project: 16361
Buggy source:
/** 
 * Add the specified object into selection.
 * @param obj the object to be as selection.
 */
public void addSelection(Object obj){
  int index=indexOf(obj);
  if (index >= 0)   addSelectionInterval(index,index);
}

Fixed version (ground truth):
/** 
 * Add the specified object into selection.
 * @param obj the object to be as selection.
 */
public void addSelection(Object obj){
  int index=indexOf(obj);
  if (index >= 0)   super.addSelectionInterval(index,index);
}
Program: 16362
Project: 16362
Buggy source:
/** 
 * Remove the specified object from selection.
 * @param obj the object to be remove from selection.
 */
public void removeSelection(Object obj){
  int index=indexOf(obj);
  if (index >= 0)   removeSelectionInterval(index,index);
}

Fixed version (ground truth):
/** 
 * Remove the specified object from selection.
 * @param obj the object to be remove from selection.
 */
public void removeSelection(Object obj){
  int index=indexOf(obj);
  if (index >= 0)   super.removeSelectionInterval(index,index);
}
Program: 16363
Project: 16363
Buggy source:
public boolean hasLoadBinding(BindingKey bkey){
  return _initBindings.size() > 0 || _loadPromptBindings.size() > 0 || _loadEventBindings.size() > 0 || _loadAfterBindings.size() > 0 || _loadBeforeBindings.size() > 0;
}

Fixed version (ground truth):
public boolean hasLoadBinding(BindingKey bkey){
  boolean r=false;
  List<?> bindings=_initBindings.get(bkey);
  if (bindings != null && bindings.size() > 0) {
    return true;
  }
  bindings=_loadPromptBindings.get(bkey);
  if (bindings != null && bindings.size() > 0) {
    return true;
  }
  bindings=_loadEventBindings.get(bkey);
  if (bindings != null && bindings.size() > 0) {
    return true;
  }
  bindings=_loadAfterBindings.get(bkey);
  if (bindings != null && bindings.size() > 0) {
    return true;
  }
  bindings=_loadBeforeBindings.get(bkey);
  if (bindings != null && bindings.size() > 0) {
    return true;
  }
  return false;
}
Program: 16364
Project: 16364
Buggy source:
private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  willSerialize(_model);
  Serializables.smartWrite(s,_model);
  willSerialize(_renderer);
  Serializables.smartWrite(s,_renderer);
}

Fixed version (ground truth):
private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  willSerialize(_model);
  Serializables.smartWrite(s,_model);
  willSerialize(_renderer);
  Serializables.smartWrite(s,_renderer);
  if (_dataLoader != null) {
    s.writeInt(_dataLoader.getOffset());
    s.writeInt(_dataLoader.getLimit());
  }
 else {
    s.writeInt(0);
    s.writeInt(100);
  }
}
Program: 16365
Project: 16365
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _model=(ListModel)s.readObject();
  didDeserialize(_model);
  _renderer=(RowRenderer)s.readObject();
  didDeserialize(_renderer);
  init();
  afterUnmarshal(-1);
  if (_model != null) {
    initDataListener();
    getDataLoader().setLoadAll(_renderAll);
  }
}

Fixed version (ground truth):
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _model=(ListModel)s.readObject();
  didDeserialize(_model);
  _renderer=(RowRenderer)s.readObject();
  didDeserialize(_renderer);
  init();
  afterUnmarshal(-1);
  int offset=s.readInt();
  int limit=s.readInt();
  resetDataLoader(false);
  getDataLoader().init(this,offset,limit);
  if (_model != null) {
    initDataListener();
    getDataLoader().setLoadAll(_renderAll);
  }
}
Program: 16366
Project: 16366
Buggy source:
private void resetDataLoader(){
  if (_dataLoader != null) {
    _dataLoader.reset();
    _dataLoader=null;
    smartUpdate("String_Node_Str",0);
  }
  smartUpdate("String_Node_Str",true);
  _currentTop=0;
  _currentLeft=0;
  _topPad=0;
}

Fixed version (ground truth):
private void resetDataLoader(boolean shallReset){
  if (_dataLoader != null) {
    if (shallReset) {
      _dataLoader.reset();
      smartUpdate("String_Node_Str",0);
    }
    _dataLoader=null;
  }
  if (shallReset) {
    smartUpdate("String_Node_Str",true);
    _currentTop=0;
    _currentLeft=0;
    _topPad=0;
  }
}