nus-yam/ex-repair huggingface dataset:
Program: 16573
Project: 16573
Buggy source:
public void render(Component comp,Writer out) throws IOException {
  final SmartWriter wh=new SmartWriter(out);
  final Flash self=(Flash)comp;
  final String uuid=self.getUuid();
  final String encsrc=self.getEncodedSrc();
  wh.write("String_Node_Str").write(uuid).write("String_Node_Str");
  wh.write(self.getOuterAttrs()).write("String_Node_Str");
  wh.write("String_Node_Str").write(uuid).write("String_Node_Str");
  wh.write(self.getWidth()).write("String_Node_Str").write(self.getHeight()).write("String_Node_Str");
  wh.write("String_Node_Str").write(encsrc).write("String_Node_Str");
  wh.write("String_Node_Str").write(self.getWmode()).write("String_Node_Str");
  wh.write("String_Node_Str").write(uuid).write("String_Node_Str");
  wh.write(encsrc).write("String_Node_Str").write(self.getWmode()).write("String_Node_Str");
  wh.write(self.getWidth()).write("String_Node_Str").write(self.getHeight()).write("String_Node_Str");
  wh.write("String_Node_Str");
}

Fixed version (ground truth):
public void render(Component comp,Writer out) throws IOException {
  final SmartWriter wh=new SmartWriter(out);
  final Flash self=(Flash)comp;
  final String uuid=self.getUuid();
  final String encsrc=self.getEncodedSrc(), bgcolor=self.getBgcolor();
  wh.write("String_Node_Str").write(uuid).write("String_Node_Str");
  wh.write(self.getOuterAttrs()).write("String_Node_Str");
  wh.write("String_Node_Str").write(uuid).write("String_Node_Str");
  wh.write(self.getWidth()).write("String_Node_Str").write(self.getHeight()).write("String_Node_Str");
  wh.write("String_Node_Str").write(encsrc).write("String_Node_Str");
  wh.write("String_Node_Str").write(self.getWmode()).write("String_Node_Str");
  wh.write("String_Node_Str").write(self.isAutoplay()).write("String_Node_Str");
  wh.write("String_Node_Str").write(self.isLoop()).write("String_Node_Str");
  if (bgcolor != null && bgcolor.length() > 0)   wh.write("String_Node_Str").write(bgcolor).write("String_Node_Str");
  wh.write("String_Node_Str").write(uuid).write("String_Node_Str");
  wh.write(encsrc).write("String_Node_Str").write(self.getWmode()).write("String_Node_Str").write(self.isAutoplay()).write("String_Node_Str").write(self.isLoop()).write('"');
  if (bgcolor != null && bgcolor.length() > 0)   wh.write("String_Node_Str").write(bgcolor).write('"');
  wh.write("String_Node_Str").write(self.getWidth()).write("String_Node_Str").write(self.getHeight()).write("String_Node_Str");
  wh.write("String_Node_Str");
}
Program: 16574
Project: 16574
Buggy source:
private void injectByName(Object arg,String fdname){
  final String mdname=Classes.toMethodName(fdname,"String_Node_Str");
  final Class parmcls=arg.getClass();
  final Class tgtcls=_controller.getClass();
  try {
    final Method md=Classes.getCloseMethod(tgtcls,mdname,new Class[]{parmcls});
    if (!injectByMethod(md,parmcls,parmcls,arg,fdname)) {
      injectFieldByName(arg,tgtcls,parmcls,fdname);
    }
  }
 catch (  NoSuchMethodException ex) {
    injectFieldByName(arg,tgtcls,parmcls,fdname);
  }
catch (  Exception ex) {
    throw UiException.Aide.wrap(ex);
  }
}

Fixed version (ground truth):
private void injectByName(Object arg,String fdname){
  if (arg != null) {
    final String mdname=Classes.toMethodName(fdname,"String_Node_Str");
    final Class parmcls=arg.getClass();
    final Class tgtcls=_controller.getClass();
    try {
      final Method md=Classes.getCloseMethod(tgtcls,mdname,new Class[]{parmcls});
      if (!injectByMethod(md,parmcls,parmcls,arg,fdname)) {
        injectFieldByName(arg,tgtcls,parmcls,fdname);
      }
    }
 catch (    NoSuchMethodException ex) {
      injectFieldByName(arg,tgtcls,parmcls,fdname);
    }
catch (    Exception ex) {
      throw UiException.Aide.wrap(ex);
    }
  }
}
Program: 16575
Project: 16575
Buggy source:
/** 
 * Returns whether the given id is an implicit ZK object id.
 * @param id Component id
 * @return whether the given name is a implicit object.
 * @since 3.5.2
 */
public static boolean isImplicit(String id){
  return IMPLICIT_NAMES.contains(id);
}

Fixed version (ground truth):
/** 
 * Returns whether the given id is an implicit ZK object id.
 * @param id Component id
 * @return whether the given name is a implicit object.
 * @since 3.5.2
 */
public static boolean isImplicit(String id){
  return "String_Node_Str".equals(id) || IMPLICIT_NAMES.contains(id);
}
Program: 16576
Project: 16576
Buggy source:
/** 
 * Search _ns instead. 
 */
protected Object getFromNamespace(String name){
  Object v=_ns.getVariable(name,true);
  return v != null || _ns.containsVariable(name,true) ? v : UNDEFINED;
}

Fixed version (ground truth):
/** 
 * Search _ns instead. 
 */
protected Object getFromNamespace(String name){
  Object v=_ns.getVariable(name,true);
  return v != null || _ns.containsVariable(name,true) ? v : getImplicit(name);
}
Program: 16577
Project: 16577
Buggy source:
private Object getImplicit(String name){
  if ("String_Node_Str".equals(name)) {
    final Execution exec=Executions.getCurrent();
    if (exec != null)     return exec;
  }
  return UNDEFINED;
}

Fixed version (ground truth):
/** 
 * Returns the value of the implict variables. It is called by   {@link #getFromNamespace}, so you don't need to invoke this method if you invoke   {@link #getFromNameSpace}. However, you have to invoke this method as the last step, if you implement your own getFromNamespace from scratch.
 * @since 3.6.0
 */
protected static Object getImplicit(String name){
  if ("String_Node_Str".equals(name)) {
    final Execution exec=Executions.getCurrent();
    if (exec != null)     return exec;
  }
  return UNDEFINED;
}
Program: 16583
Project: 16583
Buggy source:
void fixGroupIndex(int j,int to,boolean infront){
  for (Iterator it=_items.listIterator(j); it.hasNext() && (to < 0 || j <= to); ++j) {
    Object o=it.next();
    ((Listitem)o).setIndexDirectly(j);
    if (o instanceof Listgroup) {
      int[] g=getGroupsInfoAt(j + (infront ? -1 : 1),true);
      if (g != null) {
        g[0]=j;
        if (g[2] != -1)         g[2]+=(infront ? 1 : -1);
      }
    }
  }
}

Fixed version (ground truth):
void fixGroupIndex(int j,int to,boolean infront){
  final int beginning=j;
  for (Iterator it=_items.listIterator(j); it.hasNext() && (to < 0 || j <= to); ++j) {
    Object o=it.next();
    ((Listitem)o).setIndexDirectly(j);
    if (beginning != j && o instanceof Listgroup) {
      int[] g=getGroupsInfoAt(j + (infront ? -1 : 1),true);
      if (g != null) {
        g[0]=j;
        if (g[2] != -1)         g[2]+=(infront ? 1 : -1);
      }
    }
  }
}
Program: 16586
Project: 16586
Buggy source:
/** 
 * Update the number of the visible item before it is removed or after it is added.
 */
private void updateVisibleCount(Row row,boolean isRemove){
  if (row instanceof Group || row.isVisible()) {
    final Group g=getGroup(row.getIndex());
    if (row instanceof Groupfoot || row instanceof Group || g == null || g.isOpen())     addVisibleItemCount(isRemove ? -1 : 1);
    if (row instanceof Group) {
      final Group group=(Group)row;
      final Row preRow=(Row)row.getPreviousSibling();
      if (preRow == null) {
        if (!group.isOpen()) {
          addVisibleItemCount(isRemove ? group.getVisibleItemCount() : -group.getVisibleItemCount());
        }
      }
 else {
        final Group preGroup=getGroup(preRow.getIndex());
        if (preGroup != null) {
          if (!preGroup.isOpen() && group.isOpen())           addVisibleItemCount(isRemove ? -group.getVisibleItemCount() : group.getVisibleItemCount());
 else           if (preGroup.isOpen() && !group.isOpen())           addVisibleItemCount(isRemove ? group.getVisibleItemCount() : -group.getVisibleItemCount());
        }
 else {
          if (!group.isOpen())           addVisibleItemCount(isRemove ? group.getVisibleItemCount() : -group.getVisibleItemCount());
        }
      }
    }
  }
  final Grid grid=getGrid();
  if (grid != null && grid.inPagingMold())   grid.getPaginal().setTotalSize(getVisibleItemCount());
}

Fixed version (ground truth):
/** 
 * Update the number of the visible item before it is removed or after it is added.
 */
private void updateVisibleCount(Row row,boolean isRemove){
  if (row instanceof Group || row.isVisible()) {
    final Group g=getGroup(row.getIndex());
    if (row instanceof Groupfoot || row instanceof Group || g == null || g.isOpen())     addVisibleItemCount(isRemove ? -1 : 1);
    if (row instanceof Group) {
      final Group group=(Group)row;
      final Row preRow=(Row)row.getPreviousSibling();
      if (preRow == null) {
        if (!group.isOpen()) {
          addVisibleItemCount(isRemove ? group.getVisibleItemCount() : -group.getVisibleItemCount());
        }
      }
 else {
        final Group preGroup=preRow instanceof Group ? (Group)preRow : getGroup(preRow.getIndex());
        if (preGroup != null) {
          if (!preGroup.isOpen() && group.isOpen())           addVisibleItemCount(isRemove ? -group.getVisibleItemCount() : group.getVisibleItemCount());
 else           if (preGroup.isOpen() && !group.isOpen())           addVisibleItemCount(isRemove ? group.getVisibleItemCount() : -group.getVisibleItemCount());
        }
 else {
          if (!group.isOpen())           addVisibleItemCount(isRemove ? group.getVisibleItemCount() : -group.getVisibleItemCount());
        }
      }
    }
  }
  final Grid grid=getGrid();
  if (grid != null && grid.inPagingMold())   grid.getPaginal().setTotalSize(getVisibleItemCount());
}
Program: 16587
Project: 16587
Buggy source:
void fixGroupIndex(int j,int to,boolean infront){
  final int beginning=j;
  for (Iterator it=_items.listIterator(j); it.hasNext() && (to < 0 || j <= to); ++j) {
    Object o=it.next();
    ((Listitem)o).setIndexDirectly(j);
    if (beginning != j && o instanceof Listgroup) {
      int[] g=getGroupsInfoAt(j + (infront ? -1 : 1),true);
      if (g != null) {
        g[0]=j;
        if (g[2] != -1)         g[2]+=(infront ? 1 : -1);
      }
    }
  }
}

Fixed version (ground truth):
void fixGroupIndex(int j,int to,boolean infront){
  final int beginning=j;
  for (Iterator it=_items.listIterator(j); it.hasNext() && (to < 0 || j <= to); ++j) {
    Object o=it.next();
    ((Listitem)o).setIndexDirectly(j);
    if (beginning != j && o instanceof Listgroup) {
      int[] g=getLastGroupsInfoAt(j + (infront ? -1 : 1));
      if (g != null) {
        g[0]=j;
        if (g[2] != -1)         g[2]+=(infront ? 1 : -1);
      }
    }
  }
}
Program: 16588
Project: 16588
Buggy source:
void fixGroupIndex(int j,int to,boolean infront){
  for (Iterator it=getChildren().listIterator(j); it.hasNext() && (to < 0 || j <= to); ++j) {
    Object o=it.next();
    if (o instanceof Group) {
      int[] g=getGroupsInfoAt(j + (infront ? -1 : 1),true);
      if (g != null) {
        g[0]=j;
        if (g[2] != -1)         g[2]+=(infront ? 1 : -1);
      }
    }
  }
}

Fixed version (ground truth):
void fixGroupIndex(int j,int to,boolean infront){
  for (Iterator it=getChildren().listIterator(j); it.hasNext() && (to < 0 || j <= to); ++j) {
    Object o=it.next();
    if (o instanceof Group) {
      int[] g=getLastGroupsInfoAt(j + (infront ? -1 : 1));
      if (g != null) {
        g[0]=j;
        if (g[2] != -1)         g[2]+=(infront ? 1 : -1);
      }
    }
  }
}
Program: 16589
Project: 16589
Buggy source:
public void render(Component comp,Writer out) throws IOException {
  final Tabpanel self=(Tabpanel)comp;
  final Tabbox tabbox=self.getTabbox();
  final String mold=tabbox.getMold();
  if ("String_Node_Str".equals(mold) || "String_Node_Str".equals(mold)) {
    _acdpanel.render(comp,out);
    return;
  }
  if ("String_Node_Str".equals(tabbox.getOrient())) {
    _vpanel.render(comp,out);
    return;
  }
  final SmartWriter wh=new SmartWriter(out);
  wh.write("String_Node_Str").write(self.getUuid()).write('"').write("String_Node_Str").write(self.getOuterAttrs()).write("String_Node_Str" + tabbox.getId() + "String_Node_Str").write('>').write("String_Node_Str").write(self.getUuid()).write("String_Node_Str").write(self.getInnerAttrs()).write('>').writeChildren(self).writeln("String_Node_Str");
}

Fixed version (ground truth):
public void render(Component comp,Writer out) throws IOException {
  final Tabpanel self=(Tabpanel)comp;
  final Tabbox tabbox=self.getTabbox();
  final String mold=tabbox.getMold();
  if ("String_Node_Str".equals(mold) || "String_Node_Str".equals(mold)) {
    _acdpanel.render(comp,out);
    return;
  }
  if ("String_Node_Str".equals(tabbox.getOrient())) {
    _vpanel.render(comp,out);
    return;
  }
  final SmartWriter wh=new SmartWriter(out);
  wh.write("String_Node_Str").write(self.getUuid()).write('"').write("String_Node_Str").write("String_Node_Str" + tabbox.getUuid() + "String_Node_Str").write(self.getOuterAttrs()).write('>').write("String_Node_Str").write(self.getUuid()).write("String_Node_Str").write(self.getInnerAttrs()).write('>').writeChildren(self).writeln("String_Node_Str");
}
Program: 16590
Project: 16590
Buggy source:
/** 
 * @param data an array data to be grouping.
 * @param cmpr a comparator implementation help group the data. you could implements {@link GroupComparator} to do more grouping control.<br/>At 1st phase, it calls  {@link Comparator#compare(Object,Object)} or {@link GroupComparator#compareGroup(Object,Object)} to sort the data.<br/>At 2nd phase, it calls  {@link Comparator#compare(Object,Object)} or {@link GroupComparator#compareGroup(Object,Object)} to decide which data belong to which group. In this phase it also invoke  {@link #createGroupHead(Object[],int,int)} and {@link #createGroupFoot(Object[],int,int)} to create head of foot Object of each group.<br/>At 3rd phase, it calls  {@link Comparator#compare(Object,Object)} to sort data in each group.<br/>
 * @param col column index associate with cmpr.
 */
public ArrayGroupsModel(Object[] data,Comparator cmpr,int col){
  if (data == null || cmpr == null)   throw new IllegalArgumentException("String_Node_Str");
  _nativedata=Arrays.copyOf(data,data.length);
  _comparator=cmpr;
  group(_comparator,true,col);
}

Fixed version (ground truth):
/** 
 * @param data an array data to be grouping.
 * @param cmpr a comparator implementation help group the data. you could implements {@link GroupComparator} to do more grouping control.<br/>At 1st phase, it calls  {@link Comparator#compare(Object,Object)} or {@link GroupComparator#compareGroup(Object,Object)} to sort the data.<br/>At 2nd phase, it calls  {@link Comparator#compare(Object,Object)} or {@link GroupComparator#compareGroup(Object,Object)} to decide which data belong to which group. In this phase it also invoke  {@link #createGroupHead(Object[],int,int)} and {@link #createGroupFoot(Object[],int,int)} to create head of foot Object of each group.<br/>At 3rd phase, it calls  {@link Comparator#compare(Object,Object)} to sort data in each group.<br/>
 * @param col column index associate with cmpr.
 */
public ArrayGroupsModel(Object[] data,Comparator cmpr,int col){
  if (data == null || cmpr == null)   throw new IllegalArgumentException("String_Node_Str");
  _nativedata=(Object[])ArraysX.duplicate(data);
  _comparator=cmpr;
  group(_comparator,true,col);
}
Program: 16593
Project: 16593
Buggy source:
/** 
 * @param data an array data to be grouping.
 * @param cmpr a comparator implementation help group the data. you could implements {@link GroupComparator} to do more grouping control.<br/>At 1st phase, it calls  {@link Comparator#compare(Object,Object)} or {@link GroupComparator#compareGroup(Object,Object)} to sort the data.<br/>At 2nd phase, it calls  {@link Comparator#compare(Object,Object)} or {@link GroupComparator#compareGroup(Object,Object)} to decide which data belong to which group. In this phase it also invoke  {@link #createGroupHead(Object[],int)} and {@link #createGroupFoot(Object[],int)} to create head of foot Object of each group.<br/>At 3rd phase, it calls  {@link Comparator#compare(Object,Object)} to sort data in each group.<br/>
 * @param col column index associate with cmpr.
 */
public ArrayGroupsModel(Object[] data,Comparator cmpr,int col){
  if (data == null || cmpr == null)   throw new IllegalArgumentException("String_Node_Str");
  _nativedata=Arrays.copyOf(data,data.length);
  _comparator=cmpr;
  group(_comparator,true,col);
}

Fixed version (ground truth):
/** 
 * @param data an array data to be grouping.
 * @param cmpr a comparator implementation help group the data. you could implements {@link GroupComparator} to do more grouping control.<br/>At 1st phase, it calls  {@link Comparator#compare(Object,Object)} or {@link GroupComparator#compareGroup(Object,Object)} to sort the data.<br/>At 2nd phase, it calls  {@link Comparator#compare(Object,Object)} or {@link GroupComparator#compareGroup(Object,Object)} to decide which data belong to which group. In this phase it also invoke  {@link #createGroupHead(Object[],int,int)} and {@link #createGroupFoot(Object[],int,int)} to create head of foot Object of each group.<br/>At 3rd phase, it calls  {@link Comparator#compare(Object,Object)} to sort data in each group.<br/>
 * @param col column index associate with cmpr.
 */
public ArrayGroupsModel(Object[] data,Comparator cmpr,int col){
  if (data == null || cmpr == null)   throw new IllegalArgumentException("String_Node_Str");
  _nativedata=Arrays.copyOf(data,data.length);
  _comparator=cmpr;
  group(_comparator,true,col);
}
Program: 16594
Project: 16594
Buggy source:
public void onDrawNewChild(Component child,StringBuffer out) throws IOException {
  final StringBuffer sb=new StringBuffer(128).append("String_Node_Str").append(child.getUuid()).append("String_Node_Str");
  final Grid grid=getGrid();
  if (grid != null) {
    int j=0;
    for (Iterator it=getChildren().iterator(); it.hasNext(); ++j)     if (child == it.next())     break;
    sb.append(getChildAttrs(j));
  }
  sb.append("String_Node_Str").append(child.getUuid()).append("String_Node_Str").append("String_Node_Str").append(getMoldSclass()).append("String_Node_Str");
  if (grid.isFixedLayout())   sb.append("String_Node_Str");
  if (this instanceof Group && this.getChildren().indexOf(child) == 0)   sb.append(((Group)this).getImgTag());
  if (JVMs.isJava5())   out.insert(0,sb);
 else   out.insert(0,sb.toString());
  out.append("String_Node_Str");
}

Fixed version (ground truth):
public void onDrawNewChild(Component child,StringBuffer out) throws IOException {
  final StringBuffer sb=new StringBuffer(128).append("String_Node_Str").append(child.getUuid()).append("String_Node_Str");
  final Grid grid=getGrid();
  if (grid != null) {
    int j=0;
    for (Iterator it=getChildren().iterator(); it.hasNext(); ++j)     if (child == it.next())     break;
    sb.append(getChildAttrs(j));
  }
  sb.append("String_Node_Str").append(child.getUuid()).append("String_Node_Str").append("String_Node_Str").append(getMoldSclass()).append("String_Node_Str");
  if (grid.isFixedLayout())   sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  if (JVMs.isJava5())   out.insert(0,sb);
 else   out.insert(0,sb.toString());
  out.append("String_Node_Str");
}
Program: 16595
Project: 16595
Buggy source:
/** 
 * Synchronizes the grid to be consistent with the specified model.
 * @param min the lower index that a range of invalidated rows
 * @param max the higher index that a range of invalidated rows
 */
private void syncModel(int min,int max){
  RowRenderer renderer=null;
  final int newsz=_model.getSize();
  final int oldsz=_rows != null ? _rows.getChildren().size() : 0;
  if (oldsz > 0) {
    if (newsz > 0 && min < oldsz) {
      if (max < 0 || max >= oldsz)       max=oldsz - 1;
      if (max >= newsz)       max=newsz - 1;
      if (min < 0)       min=0;
      for (Iterator it=new ArrayList(_rows.getChildren()).listIterator(min); min <= max && it.hasNext(); ++min) {
        final Row row=(Row)it.next();
        if (row.isLoaded()) {
          if (renderer == null)           renderer=getRealRenderer();
          unloadRow(renderer,row);
        }
      }
    }
    if (oldsz > newsz) {
      for (Iterator it=_rows.getChildren().listIterator(newsz); it.hasNext(); ) {
        it.next();
        it.remove();
      }
    }
  }
  if (_rows == null)   new Rows().setParent(this);
  if (newsz - oldsz > 50 && !inPagingMold())   invalidate();
  for (int j=oldsz; j < newsz; ++j) {
    if (renderer == null)     renderer=getRealRenderer();
    newUnloadedRow(renderer,j).setParent(_rows);
  }
}

Fixed version (ground truth):
/** 
 * Synchronizes the grid to be consistent with the specified model.
 * @param min the lower index that a range of invalidated rows
 * @param max the higher index that a range of invalidated rows
 */
private void syncModel(int min,int max){
  RowRenderer renderer=null;
  final int newsz=_model.getSize();
  final int oldsz=_rows != null ? _rows.getChildren().size() : 0;
  if (oldsz > 0) {
    if (newsz > 0 && min < oldsz) {
      if (max < 0 || max >= oldsz)       max=oldsz - 1;
      if (max >= newsz)       max=newsz - 1;
      if (min < 0)       min=0;
      for (Iterator it=new ArrayList(_rows.getChildren()).listIterator(min); min <= max && it.hasNext(); ++min) {
        final Row row=(Row)it.next();
        if (row.isLoaded()) {
          if (renderer == null)           renderer=getRealRenderer();
          unloadRow(renderer,row,min);
        }
      }
    }
    if (oldsz > newsz) {
      for (Iterator it=_rows.getChildren().listIterator(newsz); it.hasNext(); ) {
        it.next();
        it.remove();
      }
    }
  }
  if (_rows == null)   new Rows().setParent(this);
  if (newsz - oldsz > 50 && !inPagingMold())   invalidate();
  for (int j=oldsz; j < newsz; ++j) {
    if (renderer == null)     renderer=getRealRenderer();
    newUnloadedRow(renderer,j).setParent(_rows);
  }
}
Program: 16596
Project: 16596
Buggy source:
/** 
 * Clears a row as if it is not loaded. 
 */
private final void unloadRow(RowRenderer renderer,Row row){
  _rows.insertBefore(newUnloadedRow(renderer,-1),row);
  row.detach();
}

Fixed version (ground truth):
/** 
 * Clears a row as if it is not loaded. 
 */
private final void unloadRow(RowRenderer renderer,Row row,int index){
  _rows.insertBefore(newUnloadedRow(renderer,index),row);
  row.detach();
}
Program: 16597
Project: 16597
Buggy source:
/** 
 * Synchronizes the listbox to be consistent with the specified model.
 * @param min the lower index that a range of invalidated items
 * @param max the higher index that a range of invalidated items
 */
private void syncModel(int min,int max){
  ListitemRenderer renderer=null;
  final int newsz=_model.getSize();
  final int oldsz=getItemCount();
  if (oldsz > 0) {
    if (newsz > 0 && min < oldsz) {
      if (max < 0 || max >= oldsz)       max=oldsz - 1;
      if (max >= newsz)       max=newsz - 1;
      if (min < 0)       min=0;
      for (Iterator it=new ArrayList(_items).listIterator(min); min <= max && it.hasNext(); ++min) {
        final Listitem item=(Listitem)it.next();
        if (item.isLoaded()) {
          if (renderer == null)           renderer=getRealRenderer();
          unloadItem(renderer,item);
        }
      }
    }
    for (int j=newsz; j < oldsz; ++j)     getItemAtIndex(newsz).detach();
  }
  if (newsz - oldsz > 50 && !inPagingMold())   invalidate();
  for (int j=oldsz; j < newsz; ++j) {
    if (renderer == null)     renderer=getRealRenderer();
    newUnloadedItem(renderer,j).setParent(this);
  }
}

Fixed version (ground truth):
/** 
 * Synchronizes the listbox to be consistent with the specified model.
 * @param min the lower index that a range of invalidated items
 * @param max the higher index that a range of invalidated items
 */
private void syncModel(int min,int max){
  ListitemRenderer renderer=null;
  final int newsz=_model.getSize();
  final int oldsz=getItemCount();
  if (oldsz > 0) {
    if (newsz > 0 && min < oldsz) {
      if (max < 0 || max >= oldsz)       max=oldsz - 1;
      if (max >= newsz)       max=newsz - 1;
      if (min < 0)       min=0;
      for (Iterator it=new ArrayList(_items).listIterator(min); min <= max && it.hasNext(); ++min) {
        final Listitem item=(Listitem)it.next();
        if (item.isLoaded()) {
          if (renderer == null)           renderer=getRealRenderer();
          unloadItem(renderer,item,min);
        }
      }
    }
    for (int j=newsz; j < oldsz; ++j)     getItemAtIndex(newsz).detach();
  }
  if (newsz - oldsz > 50 && !inPagingMold())   invalidate();
  for (int j=oldsz; j < newsz; ++j) {
    if (renderer == null)     renderer=getRealRenderer();
    newUnloadedItem(renderer,j).setParent(this);
  }
}
Program: 16598
Project: 16598
Buggy source:
/** 
 * Clears a listitem as if it is not loaded. 
 */
private final void unloadItem(ListitemRenderer renderer,Listitem item){
  item.getParent().insertBefore(newUnloadedItem(renderer,-1),item);
  item.detach();
}

Fixed version (ground truth):
/** 
 * Clears a listitem as if it is not loaded. 
 */
private final void unloadItem(ListitemRenderer renderer,Listitem item,int index){
  item.getParent().insertBefore(newUnloadedItem(renderer,index),item);
  item.detach();
}
Program: 16599
Project: 16599
Buggy source:
/** 
 * Returns the available children, or null if no cropping.
 */
private static Set getAvailableAtClient(Component comp,Map croppingInfos){
  final Object xc=((ComponentCtrl)comp).getExtraCtrl();
  if (xc instanceof Cropper) {
    Set set=(Set)croppingInfos.get(comp);
    if (set != null)     return set != Collections.EMPTY_SET ? set : null;
    set=((Cropper)xc).getAvailableAtClient();
    croppingInfos.put(comp,set != null ? set : Collections.EMPTY_SET);
    return set;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the available children, or null if no cropping.
 */
private static Set getAvailableAtClient(Component comp,Map croppingInfos){
  final Object xc=((ComponentCtrl)comp).getExtraCtrl();
  if (xc instanceof Cropper) {
    Object crop=croppingInfos.get(comp);
    if (crop == Objects.UNKNOWN)     return null;
    if (crop != null)     return (Set)crop;
    crop=((Cropper)xc).getAvailableAtClient();
    croppingInfos.put(comp,crop != null ? crop : Objects.UNKNOWN);
    return (Set)crop;
  }
  return null;
}
Program: 16603
Project: 16603
Buggy source:
public boolean accept(File dir,String name){
  for (int i=0; i < SKIP_LIST.length; i++)   if (name.equals(SKIP_LIST[i]))   return false;
  if (name.endsWith("String_Node_Str") || name.endsWith("String_Node_Str"))   name=name.substring(0,name.length() - 4);
 else   if (name.endsWith("String_Node_Str"))   name=name.substring(0,name.length() - 6);
 else   return false;
  if (!name.matches("String_Node_Str"))   return false;
  if (reg) {
    Matcher matcher=pattern.matcher(name);
    return matcher.matches();
  }
 else {
    return name.toUpperCase().indexOf(str.toUpperCase()) >= 0;
  }
}

Fixed version (ground truth):
public boolean accept(File dir,String name){
  for (int i=0; i < SKIP_LIST.length; i++)   if (name.equals(SKIP_LIST[i]))   return false;
  final String n=name;
  if (name.endsWith("String_Node_Str") || name.endsWith("String_Node_Str"))   name=name.substring(0,name.length() - 4);
 else   if (name.endsWith("String_Node_Str"))   name=name.substring(0,name.length() - 6);
 else   if (!n.equalsIgnoreCase(str))   return false;
  if (n.equalsIgnoreCase(str))   return true;
 else   if (!name.matches("String_Node_Str"))   return false;
  if (reg) {
    Matcher matcher=pattern.matcher(n);
    return matcher.matches();
  }
 else {
    return n.toUpperCase().indexOf(str.toUpperCase()) >= 0;
  }
}
Program: 16604
Project: 16604
Buggy source:
/** 
 * Whether to generate the value directly without ID. <p>Used only for component generated. Not for applications.
 * @since 3.0.0
 */
public boolean isIdRequired(){
  final Component p=getParent();
  return p == null || !isVisible() || !isRawLabel(p) || !Components.isAutoId(getId()) || getContext() != null || getTooltip() != null || getTooltiptext() != null || getPopup() != null || getAction() != null || getDraggable() != null || getDroppable() != null || getStyle() != null || getSclass() != null || getLeft() != null || getTop() != null || getWidth() != null || getHeight() != null || isAsapRequired(Events.ON_CLICK) || isAsapRequired(Events.ON_RIGHT_CLICK) || isAsapRequired(Events.ON_DOUBLE_CLICK);
}

Fixed version (ground truth):
/** 
 * Whether to generate the value directly without ID. <p>Used only for component generated. Not for applications.
 * @since 3.0.0
 */
public boolean isIdRequired(){
  final Component p=getParent();
  return p == null || !isVisible() || !isRawLabel(p) || !Components.isAutoId(getId()) || isAsapRequired(Events.ON_CLICK) || !isEmpty(getStyle()) || !isEmpty(getSclass()) || !isEmpty(getContext()) || !isEmpty(getTooltip()) || !isEmpty(getTooltiptext()) || !isEmpty(getPopup()) || !"String_Node_Str".equals(getDraggable()) || !"String_Node_Str".equals(getDroppable()) || isAsapRequired(Events.ON_RIGHT_CLICK) || !isEmpty(getAction()) || !isEmpty(getLeft()) || !isEmpty(getTop()) || !isEmpty(getWidth()) || !isEmpty(getHeight()) || isAsapRequired(Events.ON_DOUBLE_CLICK);
}
Program: 16605
Project: 16605
Buggy source:
private void renderTreeChild(Object node,int index){
  Treeitem ti=new Treeitem();
  Object data=_model.getChild(node,index);
  try {
    _renderer.render(ti,data);
  }
 catch (  Throwable ex) {
    try {
      ti.setLabel(Exceptions.getMessage(ex));
    }
 catch (    Throwable t) {
      log.error(t);
    }
    ti.setOpen(true);
  }
  if (!_model.isLeaf(data)) {
    Treechildren ch=new Treechildren();
    ch.setParent(ti);
  }
  ti.setParent(_treechildren);
}

Fixed version (ground truth):
private void renderTreeChild(Object node,int index){
  Treeitem ti=new Treeitem();
  Object data=_model.getChild(node,index);
  try {
    getRealRenderer().render(ti,data);
  }
 catch (  Throwable ex) {
    try {
      ti.setLabel(Exceptions.getMessage(ex));
    }
 catch (    Throwable t) {
      log.error(t);
    }
    ti.setOpen(true);
  }
  if (!_model.isLeaf(data)) {
    Treechildren ch=new Treechildren();
    ch.setParent(ti);
  }
  ti.setParent(_treechildren);
}
Program: 16606
Project: 16606
Buggy source:
/** 
 * Render the treetiem with given node and its children
 */
private void dfRenderItem(Object node,Treeitem item) throws Exception {
  if (!item.isLoaded()) {
    Treechildren children=null;
    if (item.getTreechildren() != null) {
      children=item.getTreechildren();
      if (children.getItemCount() > 0)       children.getChildren().clear();
    }
 else {
      children=new Treechildren();
      _renderer.render(item,node);
    }
    if (_model.isLeaf(node)) {
      _renderer.render(item,node);
      if (item.getTreechildren() != null)       item.getTreechildren().detach();
    }
 else {
      for (int i=0; i < _model.getChildCount(node); i++) {
        Treeitem ti=new Treeitem();
        Object data=_model.getChild(node,i);
        _renderer.render(ti,data);
        if (!_model.isLeaf(data)) {
          Treechildren ch=new Treechildren();
          ch.setParent(ti);
        }
        ti.setParent(children);
      }
      children.setParent(item);
    }
    item.setLoaded(true);
  }
}

Fixed version (ground truth):
/** 
 * Render the treetiem with given node and its children
 */
private void dfRenderItem(Object node,Treeitem item) throws Exception {
  if (!item.isLoaded()) {
    Treechildren children=null;
    if (item.getTreechildren() != null) {
      children=item.getTreechildren();
      if (children.getItemCount() > 0)       children.getChildren().clear();
    }
 else {
      children=new Treechildren();
      getRealRenderer().render(item,node);
    }
    if (_model.isLeaf(node)) {
      getRealRenderer().render(item,node);
      if (item.getTreechildren() != null)       item.getTreechildren().detach();
    }
 else {
      for (int i=0; i < _model.getChildCount(node); i++) {
        Treeitem ti=new Treeitem();
        Object data=_model.getChild(node,i);
        getRealRenderer().render(ti,data);
        if (!_model.isLeaf(data)) {
          Treechildren ch=new Treechildren();
          ch.setParent(ti);
        }
        ti.setParent(children);
      }
      children.setParent(item);
    }
    item.setLoaded(true);
  }
}
Program: 16607
Project: 16607
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  afterUnmarshal(-1,-1);
}

Fixed version (ground truth):
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  afterUnmarshal(-1,-1);
  if (_model != null)   initDataListener();
}
Program: 16608
Project: 16608
Buggy source:
/** 
 * Synchronizes the tree to be consistent with the specified model. <p>Author: jeffliu
 */
private void syncModel() throws Exception {
  if (_renderer == null)   _renderer=getRealRenderer();
  renderTree();
}

Fixed version (ground truth):
/** 
 * Synchronizes the tree to be consistent with the specified model. <p>Author: jeffliu
 */
private void syncModel() throws Exception {
  renderTree();
}
Program: 16609
Project: 16609
Buggy source:
/** 
 * Sets the tree model associated with this tree.  <p>Author: jeffliu
 * @param model the tree model to associate, or null to dis-associateany previous model.
 * @exception UiException if failed to initialize with the model
 * @since 3.0.0
 */
public void setModel(TreeModel model) throws Exception {
  _model=model;
  syncModel();
  initDataListener();
}

Fixed version (ground truth):
/** 
 * Sets the tree model associated with this tree.  <p>Author: jeffliu
 * @param model the tree model to associate, or null to dis-associateany previous model.
 * @exception UiException if failed to initialize with the model
 * @since 3.0.0
 */
public void setModel(TreeModel model) throws Exception {
  if (model != null) {
    if (_model != model) {
      if (_model != null) {
        _model.removeTreeDataListener(_dataListener);
      }
 else {
        getItems().clear();
      }
      _model=model;
      initDataListener();
    }
    syncModel();
  }
 else   if (_model != null) {
    _model.removeTreeDataListener(_dataListener);
    _model=null;
    getItems().clear();
  }
}
Program: 16610
Project: 16610
Buggy source:
public Object clone(){
  int cntSel=_selItems.size();
  final Tree clone=(Tree)super.clone();
  clone.init();
  int cnt=0;
  if (_treecols != null)   ++cnt;
  if (_treefoot != null)   ++cnt;
  if (_treechildren != null)   ++cnt;
  if (cnt > 0 || cntSel > 0)   clone.afterUnmarshal(cnt,cntSel);
  return clone;
}

Fixed version (ground truth):
public Object clone(){
  int cntSel=_selItems.size();
  final Tree clone=(Tree)super.clone();
  clone.init();
  int cnt=0;
  if (_treecols != null)   ++cnt;
  if (_treefoot != null)   ++cnt;
  if (_treechildren != null)   ++cnt;
  if (cnt > 0 || cntSel > 0)   clone.afterUnmarshal(cnt,cntSel);
  if (clone._model != null) {
    clone._dataListener=null;
    clone.initDataListener();
  }
  return clone;
}
Program: 16611
Project: 16611
Buggy source:
private void onTreeDataChange(TreeDataEvent event){
  Object data=event.getParent();
  Component parent=getChildByNode(data);
  int indexFrom=event.getIndexFrom();
  int indexTo=event.getIndexTo();
switch (event.getType()) {
case TreeDataEvent.INTERVAL_ADDED:
    for (int i=indexFrom; i <= indexTo; i++)     onTreeDataInsert(parent,data,i);
  break;
case TreeDataEvent.INTERVAL_REMOVED:
for (int i=indexTo; i >= indexFrom; i--) onTreeDataRemoved(parent,data,i);
break;
case TreeDataEvent.CONTENTS_CHANGED:
for (int i=indexFrom; i <= indexTo; i++) onTreeDataContentChanged(parent,data,i);
break;
}
}

Fixed version (ground truth):
private void onTreeDataChange(TreeDataEvent event){
  Object data=event.getParent();
  Component parent=getChildByNode(data);
  int indexFrom=event.getIndexFrom();
  int indexTo=event.getIndexTo();
  if (parent != null) {
switch (event.getType()) {
case TreeDataEvent.INTERVAL_ADDED:
      for (int i=indexFrom; i <= indexTo; i++)       onTreeDataInsert(parent,data,i);
    break;
case TreeDataEvent.INTERVAL_REMOVED:
  for (int i=indexTo; i >= indexFrom; i--)   onTreeDataRemoved(parent,data,i);
break;
case TreeDataEvent.CONTENTS_CHANGED:
for (int i=indexFrom; i <= indexTo; i++) onTreeDataContentChanged(parent,data,i);
break;
}
}
}
Program: 16612
Project: 16612
Buggy source:
/** 
 * Return the Tree or Treeitem component by a given associated node in model.<br> This implmentation calls   {@link TreeModel#getPath} method to locate assoicatedTreeitem (or Tree) via path. You can override this method to speed up  performance if possible.
 * @since 3.0.0
 */
protected Component getChildByNode(Object node){
  int[] path=_model.getPath(_model.getRoot(),node);
  if (path == null || path.length == 0)   return this;
 else {
    Treeitem ti=(Treeitem)this.getTreechildren().getChildren().get(path[0]);
    for (int i=1; i < path.length; i++) {
      ti=(Treeitem)ti.getTreechildren().getChildren().get(path[i]);
    }
    return ti;
  }
}

Fixed version (ground truth):
/** 
 * Return the Tree or Treeitem component by a given associated node in model.<br> This implmentation calls   {@link TreeModel#getPath} method to locate assoicatedTreeitem (or Tree) via path. You can override this method to speed up  performance if possible.  Return null, if the Tree or Treeitem is not yet rendered.
 * @since 3.0.0
 */
protected Component getChildByNode(Object node){
  int[] path=_model.getPath(_model.getRoot(),node);
  if (path == null || path.length == 0)   return this;
 else {
    Treeitem ti=null;
    for (int i=1; i < path.length; i++) {
      List children=ti.getTreechildren().getChildren();
      if (children.size() > path[i] && 0 <= path[i]) {
        ti=(Treeitem)children.get(path[i]);
      }
 else {
        return null;
      }
    }
    return ti;
  }
}
Program: 16614
Project: 16614
Buggy source:
public void onEvent(Event evt) throws Exception {
  final Method mtd=ComponentsCtrl.getEventMethod(this.getClass(),evt.getName());
  if (mtd != null) {
    if (mtd.getParameterTypes().length == 0)     mtd.invoke(this,null);
 else     mtd.invoke(this,new Object[]{evt.getData()});
  }
}

Fixed version (ground truth):
public void onEvent(Event evt) throws Exception {
  final Method mtd=ComponentsCtrl.getEventMethod(this.getClass(),evt.getName());
  if (mtd != null) {
    if (mtd.getParameterTypes().length == 0)     mtd.invoke(this,null);
 else     mtd.invoke(this,evt);
  }
}
Program: 16615
Project: 16615
Buggy source:
void initComponent() throws JspException {
  if (_roottag == null)   throw new IllegalStateException("String_Node_Str" + this);
  composeHandle=new ComposerHandler(_attrMap.remove("String_Node_Str"));
  try {
    Page page=this._roottag.getPage();
    _compDef=page.getComponentDefinition(_tag,true);
    if (_compDef == null)     throw new JspException("String_Node_Str" + _tag);
    Object useClass=_compDef.getImplementationClass();
    if (_compDef.isInlineMacro()) {
      final Map props=new HashMap();
      Component parent=this._parenttag.getComponent();
      props.put("String_Node_Str",parent);
      _compDef.evalProperties(props,page,parent);
      props.putAll(_attrMap);
      if (this.getUse() != null)       props.put("String_Node_Str",this.getUse());
      _comps=parent.getDesktop().getExecution().createComponents(_compDef.getMacroURI(),props);
    }
 else {
      String clazzName=null;
      if (super.getUse() != null)       clazzName=getUse();
 else       if (useClass instanceof String)       clazzName=(String)useClass;
 else       clazzName=((Class)useClass).getName();
      _comps=new Component[]{_comp=_compDef.newInstance(page,clazzName)};
      composeHandle.doBeforeComposeChildren(_comp);
      _comp.getDefinition().applyProperties(_comp);
    }
  }
 catch (  Exception e) {
    composeHandle.doCatch(e);
    throw new JspException(e);
  }
 finally {
    composeHandle.doFinally();
  }
  if (_parenttag != null)   _parenttag.addChildTag(this);
 else   _roottag.addChildTag(this);
}

Fixed version (ground truth):
void initComponent() throws JspException {
  if (_roottag == null)   throw new IllegalStateException("String_Node_Str" + this);
  Page page=this._roottag.getPage();
  _compDef=page.getComponentDefinition(_tag,true);
  if (_compDef == null)   throw new JspException("String_Node_Str" + _tag);
  composeHandle=new ComposerHandler(_attrMap.remove("String_Node_Str"));
  try {
    Object useClass=_compDef.getImplementationClass();
    if (_compDef.isInlineMacro()) {
      final Map props=new HashMap();
      Component parent=this._parenttag.getComponent();
      props.put("String_Node_Str",parent);
      _compDef.evalProperties(props,page,parent);
      props.putAll(_attrMap);
      if (this.getUse() != null)       props.put("String_Node_Str",this.getUse());
      _comps=parent.getDesktop().getExecution().createComponents(_compDef.getMacroURI(),props);
    }
 else {
      String clazzName=null;
      if (super.getUse() != null)       clazzName=getUse();
 else       if (useClass instanceof String)       clazzName=(String)useClass;
 else       clazzName=((Class)useClass).getName();
      _comps=new Component[]{_comp=_compDef.newInstance(page,clazzName)};
      composeHandle.doBeforeComposeChildren(_comp);
      _comp.getDefinition().applyProperties(_comp);
    }
  }
 catch (  Exception e) {
    if (!_compDef.isInlineMacro())     composeHandle.doCatch(e);
    throw new JspException(e);
  }
 finally {
    if (!_compDef.isInlineMacro())     composeHandle.doFinally();
  }
  if (_parenttag != null)   _parenttag.addChildTag(this);
 else   _roottag.addChildTag(this);
}
Program: 16616
Project: 16616
Buggy source:
void initComponent() throws JspException {
  if (_roottag == null)   throw new IllegalStateException("String_Node_Str" + this);
  composeHandle=new ComposerHandler(_attrMap.remove("String_Node_Str"));
  try {
    Page page=this._roottag.getPage();
    _compDef=page.getComponentDefinition(_tag,true);
    if (_compDef == null)     throw new JspException("String_Node_Str" + _tag);
    Object useClass=_compDef.getImplementationClass();
    if (_compDef.isInlineMacro()) {
      final Map props=new HashMap();
      Component parent=this._parenttag.getComponent();
      props.put("String_Node_Str",parent);
      _compDef.evalProperties(props,page,parent);
      props.putAll(_attrMap);
      if (this.getUse() != null)       props.put("String_Node_Str",this.getUse());
      _comps=parent.getDesktop().getExecution().createComponents(_compDef.getMacroURI(),props);
    }
 else {
      String clazzName=null;
      if (super.getUse() != null)       clazzName=getUse();
 else       if (useClass instanceof String)       clazzName=(String)useClass;
 else       clazzName=((Class)useClass).getName();
      _comps=new Component[]{_comp=_compDef.newInstance(page,clazzName)};
      composeHandle.doBeforeComposeChildren(_comp);
      _comp.getDefinition().applyProperties(_comp);
    }
  }
 catch (  Exception e) {
    if (!_compDef.isInlineMacro())     composeHandle.doCatch(e);
    throw new JspException(e);
  }
 finally {
    if (!_compDef.isInlineMacro())     composeHandle.doFinally();
  }
  if (_parenttag != null)   _parenttag.addChildTag(this);
 else   _roottag.addChildTag(this);
}

Fixed version (ground truth):
void initComponent() throws JspException {
  if (_roottag == null)   throw new IllegalStateException("String_Node_Str" + this);
  composeHandle=new ComposerHandler(_attrMap.remove("String_Node_Str"));
  try {
    Page page=this._roottag.getPage();
    _compDef=page.getComponentDefinition(_tag,true);
    if (_compDef == null)     throw new JspException("String_Node_Str" + _tag);
    Object useClass=_compDef.getImplementationClass();
    if (_compDef.isInlineMacro()) {
      final Map props=new HashMap();
      Component parent=this._parenttag.getComponent();
      props.put("String_Node_Str",parent);
      _compDef.evalProperties(props,page,parent);
      props.putAll(_attrMap);
      if (this.getUse() != null)       props.put("String_Node_Str",this.getUse());
      _comps=parent.getDesktop().getExecution().createComponents(_compDef.getMacroURI(),props);
    }
 else {
      String clazzName=null;
      if (super.getUse() != null)       clazzName=getUse();
 else       if (useClass instanceof String)       clazzName=(String)useClass;
 else       clazzName=((Class)useClass).getName();
      _comps=new Component[]{_comp=_compDef.newInstance(page,clazzName)};
      composeHandle.doBeforeComposeChildren(_comp);
      _comp.getDefinition().applyProperties(_comp);
    }
  }
 catch (  Exception e) {
    composeHandle.doCatch(e);
    throw new JspException(e);
  }
 finally {
    composeHandle.doFinally();
  }
  if (_parenttag != null)   _parenttag.addChildTag(this);
 else   _roottag.addChildTag(this);
}
Program: 16617
Project: 16617
Buggy source:
/** 
 * Creates and returns the page.
 */
protected void init(Execution exec,Page page){
  super.init(exec,page);
  Map compDefs=(Map)getJspContext().getAttribute(Const.CONTEXT_KEY);
  for (Iterator it=compDefs.values().iterator(); it.hasNext(); )   ((ComponentDefinitionTag)it.next()).registComponentDefinition(page);
  page.setId(_id);
  page.setStyle(_style);
}

Fixed version (ground truth):
/** 
 * Creates and returns the page.
 */
protected void init(Execution exec,Page page){
  super.init(exec,page);
  Map compDefs=(Map)getJspContext().getAttribute(Const.CONTEXT_KEY);
  if (compDefs != null) {
    for (Iterator it=compDefs.values().iterator(); it.hasNext(); )     ((ComponentDefinitionTag)it.next()).registComponentDefinition(page);
  }
  page.setId(_id);
  page.setStyle(_style);
}
Program: 16618
Project: 16618
Buggy source:
/** 
 * after children creation do dynamic attributes setter work and registers event handler. Called by   {@link #doTag}.
 * @throws JspException 
 */
void afterComposeComponent() throws JspException {
  if (_comp == null)   throw new JspTagException("String_Node_Str");
  try {
    evaluateDynaAttributes(_comp,_attrMap);
  }
 catch (  ModificationException e) {
    throw new JspException(e);
  }
catch (  NoSuchMethodException e) {
    throw new JspException(e);
  }
  if (_comp instanceof AfterCompose)   ((AfterCompose)_comp).afterCompose();
  composeHandle.doAfterCompose(_comp);
  ComponentsCtrl.applyForward(_comp,_forward);
  if (Events.isListened(_comp,Events.ON_CREATE,false))   Events.postEvent(new CreateEvent(Events.ON_CREATE,_comp,Executions.getCurrent().getArg()));
  for (Iterator itor=_eventListenerMap.entrySet().iterator(); itor.hasNext(); ) {
    Map.Entry entry=(Map.Entry)itor.next();
    final ZScript zscript=ZScript.parseContent((String)entry.getValue());
    ((ComponentCtrl)_comp).addEventHandler((String)entry.getKey(),new EventHandler(zscript,null));
  }
}

Fixed version (ground truth):
/** 
 * after children creation do dynamic attributes setter work and registers event handler. Called by   {@link #doTag}.
 * @throws JspException 
 */
void afterComposeComponent() throws JspException {
  if (_comp == null)   throw new JspTagException("String_Node_Str");
  try {
    evaluateDynaAttributes(_comp,_attrMap);
  }
 catch (  ModificationException e) {
    throw new JspException(e);
  }
catch (  NoSuchMethodException e) {
    throw new JspException(e);
  }
  if (_comp instanceof AfterCompose)   ((AfterCompose)_comp).afterCompose();
  composeHandle.doAfterCompose(_comp);
  ComponentsCtrl.applyForward(_comp,_forward);
  for (Iterator itor=_eventListenerMap.entrySet().iterator(); itor.hasNext(); ) {
    Map.Entry entry=(Map.Entry)itor.next();
    final ZScript zscript=ZScript.parseContent((String)entry.getValue());
    ((ComponentCtrl)_comp).addEventHandler((String)entry.getKey(),new EventHandler(zscript,null));
  }
  if (Events.isListened(_comp,Events.ON_CREATE,false))   Events.postEvent(new CreateEvent(Events.ON_CREATE,_comp,Executions.getCurrent().getArg()));
}
Program: 16619
Project: 16619
Buggy source:
/** 
 * Returns the implementaion class of the epxrerssion factory, or null to use the default.
 */
public Class getExpressionFactoryClass(){
  return _expfcls;
}

Fixed version (ground truth):
/** 
 * Returns the implementation class of the expression factory, or null to use the default.
 */
public Class getExpressionFactoryClass(){
  return _expfcls;
}