Program: 15895
Project: 15895
Buggy source:
public void renderTab(Tab item,final Object data,final int index) throws Exception {
  final Tabbox tabbox=item.getTabbox();
  final Tabs tabs=tabbox.getTabs();
  final int size=tabbox.getModel().getSize();
  final String tmn="String_Node_Str";
  final Template tm=resolveTemplate(tabbox,item,data,index,size,tmn,"String_Node_Str");
  if (tm == null) {
    item.setLabel(Objects.toString(data));
    item.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=tabs.getAttribute(varnm);
    Object oldIter=tabs.getAttribute(itervarnm);
    tabs.setAttribute(varnm,data);
    tabs.setAttribute(itervarnm,iterStatus);
    final Component[] items=filterOutShadows(tabs,tm.create(tabs,item,null,null));
    tabs.setAttribute(varnm,oldVar);
    tabs.setAttribute(itervarnm,oldIter);
    if (items.length != 1)     throw new UiException("String_Node_Str" + items.length);
    final Tab ntab=(Tab)items[0];
    ntab.setAttribute(BinderCtrl.VAR,varnm);
    recordRenderedIndex(tabs,items.length);
    ntab.setAttribute(AbstractRenderer.IS_TEMPLATE_MODEL_ENABLED_ATTR,true);
    ntab.setAttribute(AbstractRenderer.CURRENT_INDEX_RESOLVER_ATTR,new IndirectBinding(){
      public Binder getBinder(){
        return BinderUtil.getBinder(ntab,true);
      }
      public void setValue(      BindELContext ctx,      Object value){
        int idx=BindTabboxRenderer.this.getRenderedIndex(tabs,ntab.getIndex());
        ListModel<?> listmodel=tabbox.getModel();
        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 ntab;
      }
      public Object getValue(      BindELContext ctx){
        return tabbox.getModel().getElementAt(BindTabboxRenderer.this.getRenderedIndex(tabs,ntab.getIndex()));
      }
    }
);
    addItemReference(tabbox,ntab,index,varnm);
    ntab.setAttribute(itervarnm,iterStatus);
    ntab.setAttribute(TemplateResolver.TEMPLATE_OBJECT,item.removeAttribute(TemplateResolver.TEMPLATE_OBJECT));
    addTemplateTracking(tabs,ntab,data,index,size);
    if (ntab.getValue() == null)     ntab.setValue(data);
    item.setAttribute(Attributes.MODEL_RENDERAS,ntab);
    item.detach();
  }
}

Fixed version (ground truth):
public void renderTab(Tab item,final Object data,final int index) throws Exception {
  final Tabbox tabbox=item.getTabbox();
  final Tabs tabs=tabbox.getTabs();
  final int size=tabbox.getModel().getSize();
  final String tmn="String_Node_Str";
  final Template tm=resolveTemplate(tabbox,item,data,index,size,tmn,"String_Node_Str");
  if (tm == null) {
    item.setLabel(Objects.toString(data));
    item.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=tabs.getAttribute(varnm);
    Object oldIter=tabs.getAttribute(itervarnm);
    tabs.setAttribute(varnm,data);
    tabs.setAttribute(itervarnm,iterStatus);
    final Component[] items=filterOutShadows(tabs,tm.create(tabs,item,null,null));
    if (oldVar == null) {
      tabs.removeAttribute(varnm);
    }
 else {
      tabs.setAttribute(varnm,oldVar);
    }
    if (oldIter == null) {
      tabs.removeAttribute(itervarnm);
    }
 else {
      tabs.setAttribute(itervarnm,oldIter);
    }
    if (items.length != 1)     throw new UiException("String_Node_Str" + items.length);
    final Tab ntab=(Tab)items[0];
    ntab.setAttribute(BinderCtrl.VAR,varnm);
    recordRenderedIndex(tabs,items.length);
    ntab.setAttribute(AbstractRenderer.IS_TEMPLATE_MODEL_ENABLED_ATTR,true);
    ntab.setAttribute(AbstractRenderer.CURRENT_INDEX_RESOLVER_ATTR,new IndirectBinding(){
      public Binder getBinder(){
        return BinderUtil.getBinder(ntab,true);
      }
      public void setValue(      BindELContext ctx,      Object value){
        int idx=BindTabboxRenderer.this.getRenderedIndex(tabs,ntab.getIndex());
        ListModel<?> listmodel=tabbox.getModel();
        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 ntab;
      }
      public Object getValue(      BindELContext ctx){
        return tabbox.getModel().getElementAt(BindTabboxRenderer.this.getRenderedIndex(tabs,ntab.getIndex()));
      }
    }
);
    addItemReference(tabbox,ntab,index,varnm);
    ntab.setAttribute(itervarnm,iterStatus);
    ntab.setAttribute(TemplateResolver.TEMPLATE_OBJECT,item.removeAttribute(TemplateResolver.TEMPLATE_OBJECT));
    addTemplateTracking(tabs,ntab,data,index,size);
    if (ntab.getValue() == null)     ntab.setValue(data);
    item.setAttribute(Attributes.MODEL_RENDERAS,ntab);
    item.detach();
  }
}