Program: 15916
Project: 15916
Buggy source:
public void render(final Row row,final Object data,final int index){
  final Rows rows=(Rows)row.getParent();
  final Grid grid=(Grid)rows.getParent();
  final int size=grid.getModel().getSize();
  final String subtype=row instanceof Group ? "String_Node_Str" : row instanceof Groupfoot ? "String_Node_Str" : null;
  final Template tm=resolveTemplate(grid,row,data,index,size,"String_Node_Str",subtype);
  if (tm == null) {
    final Label label=newRenderLabel(Objects.toString(data));
    label.applyProperties();
    label.setParent(row);
    row.setValue(data);
  }
 else {
    final ForEachStatus iterStatus=new AbstractForEachStatus(){
      private static final long serialVersionUID=1L;
      public int getIndex(){
        return index;
      }
      public Object getCurrent(){
        return data;
      }
      public Integer getEnd(){
        return size;
      }
    }
;
    final String var=(String)tm.getParameters().get(EACH_ATTR);
    final String varnm=var == null ? EACH_VAR : var;
    final String itervar=(String)tm.getParameters().get(STATUS_ATTR);
    final String itervarnm=itervar == null ? (var == null ? EACH_STATUS_VAR : varnm + STATUS_POST_VAR) : itervar;
    Object oldVar=grid.getAttribute(varnm);
    Object oldIter=grid.getAttribute(itervarnm);
    grid.setAttribute(varnm,data);
    grid.setAttribute(itervarnm,iterStatus);
    final Component[] items=filterOutShadows(rows,tm.create(rows,row,null,null));
    grid.setAttribute(varnm,oldVar);
    grid.setAttribute(itervarnm,oldIter);
    if (items.length != 1)     throw new UiException("String_Node_Str" + items.length);
    final Row nr=(Row)items[0];
    nr.setAttribute(BinderCtrl.VAR,varnm);
    nr.setAttribute(AbstractRenderer.IS_TEMPLATE_MODEL_ENABLED_ATTR,true);
    nr.setAttribute(AbstractRenderer.CURRENT_INDEX_RESOLVER_ATTR,new IndirectBinding(){
      public Binder getBinder(){
        return BinderUtil.getBinder(nr,true);
      }
      @SuppressWarnings("String_Node_Str") public void setValue(      BindELContext ctx,      Object value){
        int idx=nr.getIndex() / items.length;
        ListModel<?> listmodel=grid.getListModel();
        if (idx >= 0 && idx < listmodel.getSize()) {
          if (listmodel instanceof ListModelArray) {
            ((ListModelArray<Object>)listmodel).set(idx,value);
          }
 else           if (listmodel instanceof ListModelList<?>) {
            ((ListModelList<Object>)listmodel).set(idx,value);
          }
        }
 else {
        }
      }
      public Component getComponent(){
        return nr;
      }
      public Object getValue(      BindELContext ctx){
        return grid.getModel().getElementAt(nr.getIndex() / items.length);
      }
    }
);
    addItemReference(grid,nr,index,varnm);
    nr.setAttribute(itervarnm,iterStatus);
    if (nr instanceof Group && row instanceof Group) {
      ((Group)nr).setOpen(((Group)row).isOpen());
    }
    nr.setAttribute(TemplateResolver.TEMPLATE_OBJECT,row.removeAttribute(TemplateResolver.TEMPLATE_OBJECT));
    addTemplateTracking(grid,nr,data,index,size);
    if (nr.getValue() == null)     nr.setValue(data);
    row.setAttribute(Attributes.MODEL_RENDERAS,nr);
    row.detach();
  }
}

Fixed version (ground truth):
public void render(final Row row,final Object data,final int index){
  final Rows rows=(Rows)row.getParent();
  final Grid grid=(Grid)rows.getParent();
  final int size=grid.getModel().getSize();
  final String subtype=row instanceof Group ? "String_Node_Str" : row instanceof Groupfoot ? "String_Node_Str" : null;
  final Template tm=resolveTemplate(grid,row,data,index,size,"String_Node_Str",subtype);
  if (tm == null) {
    final Label label=newRenderLabel(Objects.toString(data));
    label.applyProperties();
    label.setParent(row);
    row.setValue(data);
  }
 else {
    final ForEachStatus iterStatus=new AbstractForEachStatus(){
      private static final long serialVersionUID=1L;
      public int getIndex(){
        return index;
      }
      public Object getCurrent(){
        return data;
      }
      public Integer getEnd(){
        return size;
      }
    }
;
    final String var=(String)tm.getParameters().get(EACH_ATTR);
    final String varnm=var == null ? EACH_VAR : var;
    final String itervar=(String)tm.getParameters().get(STATUS_ATTR);
    final String itervarnm=itervar == null ? (var == null ? EACH_STATUS_VAR : varnm + STATUS_POST_VAR) : itervar;
    Object oldVar=grid.getAttribute(varnm);
    Object oldIter=grid.getAttribute(itervarnm);
    grid.setAttribute(varnm,data);
    grid.setAttribute(itervarnm,iterStatus);
    final Component[] items=filterOutShadows(rows,tm.create(rows,row,null,null));
    grid.setAttribute(varnm,oldVar);
    grid.setAttribute(itervarnm,oldIter);
    if (items.length != 1)     throw new UiException("String_Node_Str" + items.length);
    final Row nr=(Row)items[0];
    nr.setAttribute(BinderCtrl.VAR,varnm);
    recordRenderedIndex(grid,items.length);
    nr.setAttribute(AbstractRenderer.IS_TEMPLATE_MODEL_ENABLED_ATTR,true);
    nr.setAttribute(AbstractRenderer.CURRENT_INDEX_RESOLVER_ATTR,new IndirectBinding(){
      public Binder getBinder(){
        return BinderUtil.getBinder(nr,true);
      }
      @SuppressWarnings("String_Node_Str") public void setValue(      BindELContext ctx,      Object value){
        int idx=BindRowRenderer.this.getRenderedIndex(grid,nr.getIndex());
        ListModel<?> listmodel=grid.getListModel();
        if (idx >= 0 && idx < listmodel.getSize()) {
          if (listmodel instanceof ListModelArray) {
            ((ListModelArray<Object>)listmodel).set(idx,value);
          }
 else           if (listmodel instanceof ListModelList<?>) {
            ((ListModelList<Object>)listmodel).set(idx,value);
          }
        }
 else {
        }
      }
      public Component getComponent(){
        return nr;
      }
      public Object getValue(      BindELContext ctx){
        return grid.getModel().getElementAt(BindRowRenderer.this.getRenderedIndex(grid,nr.getIndex()));
      }
    }
);
    addItemReference(grid,nr,index,varnm);
    nr.setAttribute(itervarnm,iterStatus);
    if (nr instanceof Group && row instanceof Group) {
      ((Group)nr).setOpen(((Group)row).isOpen());
    }
    nr.setAttribute(TemplateResolver.TEMPLATE_OBJECT,row.removeAttribute(TemplateResolver.TEMPLATE_OBJECT));
    addTemplateTracking(grid,nr,data,index,size);
    if (nr.getValue() == null)     nr.setValue(data);
    row.setAttribute(Attributes.MODEL_RENDERAS,nr);
    row.detach();
  }
}