Program: 16328
Project: 16328
Buggy source:
public void render(final Treeitem item,final Object data) throws Exception {
  final Tree tree=item.getTree();
  final Component parent=item.getParent();
  final int index=item.getIndex();
  final Template tm=resoloveTemplate(tree,parent,data,index,"String_Node_Str");
  if (tm == null) {
    Treecell tc=new Treecell(Objects.toString(data));
    Treerow tr=null;
    item.setValue(data);
    if (item.getTreerow() == null) {
      tr=new Treerow();
      tr.setParent(item);
    }
 else {
      tr=item.getTreerow();
      tr.getChildren().clear();
    }
    tc.setParent(tr);
  }
 else {
    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 ? varnm + STATUS_POST_VAR : itervar;
    final Component[] items=tm.create(parent,item,new VariableResolverX(){
      public Object resolveVariable(      String name){
        return varnm.equals(name) ? data : null;
      }
      public Object resolveVariable(      XelContext ctx,      Object base,      Object name) throws XelException {
        if (base == null) {
          if (varnm.equals(name)) {
            return data;
          }
 else           if (itervarnm.equals(name)) {
            return new AbstractIterationStatus(){
              private static final long serialVersionUID=1L;
              @Override public int getIndex(){
                return Integer.valueOf(index);
              }
            }
;
          }
        }
        return null;
      }
    }
,null);
    if (items.length != 1)     throw new UiException("String_Node_Str" + items.length);
    final Treeitem ti=(Treeitem)items[0];
    ti.setAttribute(BinderImpl.VAR,varnm);
    ti.setAttribute(varnm,data);
    ti.setAttribute(itervarnm,new AbstractIterationStatus(){
      private static final long serialVersionUID=1L;
      @Override public int getIndex(){
        return Integer.valueOf(index);
      }
    }
);
    addTemplateDependency(tree,ti,data,index);
    if (ti.getValue() == null)     ti.setValue(data);
    item.setAttribute("String_Node_Str",ti);
    item.detach();
  }
}

Fixed version (ground truth):
public void render(final Treeitem item,final Object data) throws Exception {
  final Tree tree=item.getTree();
  final Component parent=item.getParent();
  final int index=item.getIndex();
  final Template tm=resoloveTemplate(tree,parent,data,index,"String_Node_Str");
  if (tm == null) {
    Treecell tc=new Treecell(Objects.toString(data));
    Treerow tr=null;
    item.setValue(data);
    if (item.getTreerow() == null) {
      tr=new Treerow();
      tr.setParent(item);
    }
 else {
      tr=item.getTreerow();
      tr.getChildren().clear();
    }
    tc.setParent(tr);
  }
 else {
    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 ? varnm + STATUS_POST_VAR : itervar;
    final Component[] items=tm.create(parent,item,new VariableResolverX(){
      public Object resolveVariable(      String name){
        return varnm.equals(name) ? data : null;
      }
      public Object resolveVariable(      XelContext ctx,      Object base,      Object name) throws XelException {
        if (base == null) {
          if (varnm.equals(name)) {
            return data;
          }
 else           if (itervarnm.equals(name)) {
            return new AbstractIterationStatus(){
              private static final long serialVersionUID=1L;
              @Override public int getIndex(){
                return Integer.valueOf(index);
              }
            }
;
          }
        }
        return null;
      }
    }
,null);
    if (items.length != 1)     throw new UiException("String_Node_Str" + items.length);
    final Treeitem ti=(Treeitem)items[0];
    ti.setAttribute(BinderImpl.VAR,varnm);
    addItemReference(ti,index,varnm);
    ti.setAttribute(itervarnm,new AbstractIterationStatus(){
      private static final long serialVersionUID=1L;
      @Override public int getIndex(){
        return Integer.valueOf(index);
      }
    }
);
    addTemplateTracking(tree,ti,data,index);
    if (ti.getValue() == null)     ti.setValue(data);
    item.setAttribute("String_Node_Str",ti);
    item.detach();
  }
}