nus-yam/ex-repair huggingface dataset:
Program: 16184
Project: 16184
Buggy source:
public void afterComponentAttached(Component comp,Page page){
  if (comp.getDesktop() != null) {
    final Binder selfBinder=(Binder)comp.getAttribute(BinderImpl.BINDER);
    if (selfBinder == null) {
      final Binder binder=(Binder)comp.getAttribute(BinderImpl.BINDER,true);
      if (binder != null && (binder instanceof BinderImpl)) {
        comp.addEventListener(10000,BinderImpl.ON_BIND_INIT,new EventListener<Event>(){
          @Override public void onEvent(          Event event) throws Exception {
            final Component comp=event.getTarget();
            comp.removeEventListener(BinderImpl.ON_BIND_INIT,this);
            if (comp.getPage() == null) {
              return;
            }
            final Binder innerBinder=(Binder)comp.getAttribute(BinderImpl.BINDER);
            if (innerBinder != null) {
              return;
            }
            if (binder instanceof AnnotateBinder) {
              new AnnotateBinderHelper(binder).initComponentBindings(comp);
            }
            binder.loadComponent(comp,true);
            if (comp.getAttribute(BinderImpl.VAR) != null)             comp.setAttribute(BinderImpl.BINDER,binder);
          }
        }
);
        Events.postEvent(new Event(BinderImpl.ON_BIND_INIT,comp));
      }
    }
  }
}

Fixed version (ground truth):
public void afterComponentAttached(Component comp,Page page){
  if (comp.getDesktop() != null) {
    final Binder selfBinder=BinderUtil.getBinder(comp);
    if (selfBinder == null) {
      final Binder binder=BinderUtil.getBinder(comp,true);
      if (binder != null && (binder instanceof BinderImpl)) {
        comp.addEventListener(10000,BinderImpl.ON_BIND_INIT,new EventListener<Event>(){
          @Override public void onEvent(          Event event) throws Exception {
            final Component comp=event.getTarget();
            comp.removeEventListener(BinderImpl.ON_BIND_INIT,this);
            if (comp.getPage() == null) {
              return;
            }
            final Binder innerBinder=BinderUtil.getBinder(comp);
            if (innerBinder != null) {
              return;
            }
            if (binder instanceof AnnotateBinder) {
              new AnnotateBinderHelper(binder).initComponentBindings(comp);
            }
            binder.loadComponent(comp,true);
            if (comp.getAttribute(BinderImpl.VAR) != null)             BinderUtil.markHandling(comp,binder);
          }
        }
);
        Events.postEvent(new Event(BinderImpl.ON_BIND_INIT,comp));
      }
    }
  }
}
Program: 16185
Project: 16185
Buggy source:
@Override public void onEvent(Event event) throws Exception {
  final Component comp=event.getTarget();
  comp.removeEventListener(BinderImpl.ON_BIND_INIT,this);
  if (comp.getPage() == null) {
    return;
  }
  final Binder innerBinder=(Binder)comp.getAttribute(BinderImpl.BINDER);
  if (innerBinder != null) {
    return;
  }
  if (binder instanceof AnnotateBinder) {
    new AnnotateBinderHelper(binder).initComponentBindings(comp);
  }
  binder.loadComponent(comp,true);
  if (comp.getAttribute(BinderImpl.VAR) != null)   comp.setAttribute(BinderImpl.BINDER,binder);
}

Fixed version (ground truth):
@Override public void onEvent(Event event) throws Exception {
  final Component comp=event.getTarget();
  comp.removeEventListener(BinderImpl.ON_BIND_INIT,this);
  if (comp.getPage() == null) {
    return;
  }
  final Binder innerBinder=BinderUtil.getBinder(comp);
  if (innerBinder != null) {
    return;
  }
  if (binder instanceof AnnotateBinder) {
    new AnnotateBinderHelper(binder).initComponentBindings(comp);
  }
  binder.loadComponent(comp,true);
  if (comp.getAttribute(BinderImpl.VAR) != null)   BinderUtil.markHandling(comp,binder);
}
Program: 16186
Project: 16186
Buggy source:
private void removeBindings0(Component comp){
  final Object installed=comp.removeAttribute(BinderImpl.RENDERER_INSTALLED);
  if (installed != null) {
    BindELContext.removeModel(comp);
  }
  final Binder binder=(Binder)comp.getAttribute(BinderImpl.BINDER);
  if (binder != null) {
    binder.removeBindings(comp);
  }
}

Fixed version (ground truth):
private void removeBindings0(Component comp){
  final Object installed=comp.removeAttribute(BinderImpl.RENDERER_INSTALLED);
  if (installed != null) {
    BindELContext.removeModel(comp);
  }
  final Binder binder=BinderUtil.getBinder(comp);
  if (binder != null) {
    binder.removeBindings(comp);
  }
}
Program: 16187
Project: 16187
Buggy source:
private void addNullMap(TrackerNode node){
  final Object propName=node.getFieldScript();
  Set<TrackerNode> nodes=_nullMap.get(propName);
  if (nodes == null) {
    nodes=new HashSet<TrackerNode>();
    _nullMap.put(propName,nodes);
  }
  nodes.add(node);
  removeBeanMap(node);
}

Fixed version (ground truth):
private void addNullMap(TrackerNode node){
  final Object propName=node.getFieldScript();
  LinkedHashSet<TrackerNode> nodes=_nullMap.get(propName);
  if (nodes == null) {
    nodes=new LinkedHashSet<TrackerNode>();
    _nullMap.put(propName,nodes);
  }
  nodes.add(node);
  removeBeanMap(node);
}
Program: 16188
Project: 16188
Buggy source:
private void removeNodes(Collection<Set<TrackerNode>> nodesets,Collection<TrackerNode> removed){
  for (final Iterator<Set<TrackerNode>> it=nodesets.iterator(); it.hasNext(); ) {
    final Set<TrackerNode> nodeset=it.next();
    nodeset.removeAll(removed);
    if (nodeset.isEmpty()) {
      it.remove();
    }
  }
}

Fixed version (ground truth):
private void removeNodes(Collection<LinkedHashSet<TrackerNode>> nodesets,Collection<TrackerNode> removed){
  for (final Iterator<LinkedHashSet<TrackerNode>> it=nodesets.iterator(); it.hasNext(); ) {
    final Set<TrackerNode> nodeset=it.next();
    nodeset.removeAll(removed);
    if (nodeset.isEmpty()) {
      it.remove();
    }
  }
}
Program: 16189
Project: 16189
Buggy source:
public Set<LoadBinding> getLoadBindings(Object base,String prop){
  final Set<LoadBinding> bindings=new HashSet<LoadBinding>();
  final Set<TrackerNode> visited=new HashSet<TrackerNode>();
  collectLoadBindings(base,prop,bindings,visited);
  return bindings;
}

Fixed version (ground truth):
public Set<LoadBinding> getLoadBindings(Object base,String prop){
  final LinkedHashSet<LoadBinding> bindings=new LinkedHashSet<LoadBinding>();
  final Set<TrackerNode> visited=new HashSet<TrackerNode>();
  collectLoadBindings(base,prop,bindings,visited);
  return bindings;
}
Program: 16190
Project: 16190
Buggy source:
private void getLoadBindingsPerProperty(Collection<TrackerNode> nodes,String prop,Set<LoadBinding> bindings,Set<Object> kidbases,Set<TrackerNode> visited){
  if ("String_Node_Str".equals(prop)) {
    for (    TrackerNode node : nodes) {
      getLoadBindings0(node,bindings,kidbases,visited);
    }
  }
 else   if ("String_Node_Str".equals(prop)) {
    for (    TrackerNode node : nodes) {
      final Set<TrackerNode> kids=node.getDirectDependents();
      getNodesLoadBindings(kids,bindings,kidbases,visited);
    }
  }
 else {
    for (    TrackerNode node : nodes) {
      final TrackerNode kid=node.getDependent(prop);
      if (kid != null) {
        getLoadBindings0(kid,bindings,kidbases,visited);
      }
    }
  }
}

Fixed version (ground truth):
private void getLoadBindingsPerProperty(Collection<TrackerNode> nodes,String prop,LinkedHashSet<LoadBinding> bindings,LinkedHashSet<Object> kidbases,Set<TrackerNode> visited){
  if ("String_Node_Str".equals(prop)) {
    for (    TrackerNode node : nodes) {
      getLoadBindings0(node,bindings,kidbases,visited);
    }
  }
 else   if ("String_Node_Str".equals(prop)) {
    for (    TrackerNode node : nodes) {
      final Set<TrackerNode> kids=node.getDirectDependents();
      getNodesLoadBindings(kids,bindings,kidbases,visited);
    }
  }
 else {
    for (    TrackerNode node : nodes) {
      final TrackerNode kid=node.getDependent(prop);
      if (kid != null) {
        getLoadBindings0(kid,bindings,kidbases,visited);
      }
    }
  }
}
Program: 16191
Project: 16191
Buggy source:
private void addBeanMap(TrackerNode node,Object value){
  if (!value.equals(node.getBean())) {
    removeBeanMap(node);
    if (!BindELContext.isImmutable(value)) {
      Set<TrackerNode> nodes=_beanMap.get(value);
      if (nodes == null) {
        nodes=new HashSet<TrackerNode>();
        _beanMap.put(value,nodes);
        _equalBeansMap.put(value);
      }
      nodes.add(node);
      node.setBean(value);
    }
  }
  removeNullMap(node);
}

Fixed version (ground truth):
private void addBeanMap(TrackerNode node,Object value){
  if (!value.equals(node.getBean())) {
    removeBeanMap(node);
    if (!BindELContext.isImmutable(value)) {
      LinkedHashSet<TrackerNode> nodes=_beanMap.get(value);
      if (nodes == null) {
        nodes=new LinkedHashSet<TrackerNode>();
        _beanMap.put(value,nodes);
        _equalBeansMap.put(value);
      }
      nodes.add(node);
      node.setBean(value);
    }
  }
  removeNullMap(node);
}
Program: 16192
Project: 16192
Buggy source:
private void removeAllFromBeanMap(Collection<TrackerNode> removed){
  final Collection<Entry<Object,Set<TrackerNode>>> nodesets=_beanMap.entrySet();
  for (final Iterator<Entry<Object,Set<TrackerNode>>> it=nodesets.iterator(); it.hasNext(); ) {
    final Entry<Object,Set<TrackerNode>> nodeset=it.next();
    final Object bean=nodeset.getKey();
    nodeset.getValue().removeAll(removed);
    if (nodeset.getValue().isEmpty()) {
      it.remove();
      _equalBeansMap.remove(bean);
    }
  }
}

Fixed version (ground truth):
private void removeAllFromBeanMap(Collection<TrackerNode> removed){
  final Collection<Entry<Object,LinkedHashSet<TrackerNode>>> nodesets=_beanMap.entrySet();
  for (final Iterator<Entry<Object,LinkedHashSet<TrackerNode>>> it=nodesets.iterator(); it.hasNext(); ) {
    final Entry<Object,LinkedHashSet<TrackerNode>> nodeset=it.next();
    final Object bean=nodeset.getKey();
    nodeset.getValue().removeAll(removed);
    if (nodeset.getValue().isEmpty()) {
      it.remove();
      _equalBeansMap.remove(bean);
    }
  }
}
Program: 16193
Project: 16193
Buggy source:
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _beanMap=new WeakIdentityMap<Object,Set<TrackerNode>>();
  _equalBeansMap=new EqualBeansMap();
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _beanMap=new WeakIdentityMap<Object,LinkedHashSet<TrackerNode>>();
  _equalBeansMap=new EqualBeansMap();
}
Program: 16194
Project: 16194
Buggy source:
private void getNodesLoadBindings(Set<TrackerNode> basenodes,Set<LoadBinding> bindings,Set<Object> kidbases,Set<TrackerNode> visited){
  if (basenodes != null) {
    for (    TrackerNode node : basenodes) {
      if (node != null) {
        getLoadBindings0(node,bindings,kidbases,visited);
      }
    }
  }
}

Fixed version (ground truth):
private void getNodesLoadBindings(Set<TrackerNode> basenodes,LinkedHashSet<LoadBinding> bindings,LinkedHashSet<Object> kidbases,Set<TrackerNode> visited){
  if (basenodes != null) {
    for (    TrackerNode node : basenodes) {
      if (node != null) {
        getLoadBindings0(node,bindings,kidbases,visited);
      }
    }
  }
}
Program: 16195
Project: 16195
Buggy source:
private void getLoadBindings0(TrackerNode node,Set<LoadBinding> bindings,Set<Object> kidbases,Set<TrackerNode> visited){
  if (visited.contains(node)) {
    return;
  }
  visited.add(node);
  bindings.addAll(node.getLoadBindings());
  final Set<ReferenceBinding> refBindings=node.getReferenceBindings();
  bindings.addAll(refBindings);
  for (  ReferenceBinding refBinding : refBindings) {
    refBinding.invalidateCache();
    collectLoadBindings(refBinding,"String_Node_Str",bindings,visited);
  }
  for (  TrackerNode associate : node.getAssociates()) {
    getLoadBindings0(associate,bindings,kidbases,visited);
  }
  final Object kidbase=node.getBean();
  if (kidbases != null && kidbase != null) {
    kidbases.add(kidbase);
  }
 else {
    final Set<TrackerNode> nodes=node.getDirectDependents();
    for (    TrackerNode kid : nodes) {
      getLoadBindings0(kid,bindings,null,visited);
    }
  }
}

Fixed version (ground truth):
private void getLoadBindings0(TrackerNode node,LinkedHashSet<LoadBinding> bindings,Set<Object> kidbases,Set<TrackerNode> visited){
  if (visited.contains(node)) {
    return;
  }
  visited.add(node);
  bindings.addAll(node.getLoadBindings());
  final Set<ReferenceBinding> refBindings=node.getReferenceBindings();
  bindings.addAll(refBindings);
  for (  ReferenceBinding refBinding : refBindings) {
    refBinding.invalidateCache();
    collectLoadBindings(refBinding,"String_Node_Str",bindings,visited);
  }
  for (  TrackerNode associate : node.getAssociates()) {
    getLoadBindings0(associate,bindings,kidbases,visited);
  }
  final Object kidbase=node.getBean();
  if (kidbases != null && kidbase != null) {
    kidbases.add(kidbase);
  }
 else {
    final Set<TrackerNode> nodes=node.getDirectDependents();
    for (    TrackerNode kid : nodes) {
      getLoadBindings0(kid,bindings,null,visited);
    }
  }
}
Program: 16196
Project: 16196
Buggy source:
private void collectLoadBindings(Object base,String prop,Set<LoadBinding> bindings,Set<TrackerNode> visited){
  final Set<Object> kidbases=new HashSet<Object>();
  if (base != null) {
    if ("String_Node_Str".equals(base)) {
      final Collection<Map<Object,TrackerNode>> nodesMaps=_compMap.values();
      if (nodesMaps != null) {
        for (        Map<Object,TrackerNode> nodesMap : nodesMaps) {
          final Collection<TrackerNode> nodes=nodesMap.values();
          if (nodes != null) {
            getLoadBindingsPerProperty(nodes,prop,bindings,kidbases,visited);
          }
        }
      }
    }
 else {
      final Set<TrackerNode> nodes=getAllTrackerNodesByBean(base);
      if (nodes != null && !nodes.isEmpty()) {
        getLoadBindingsPerProperty(nodes,prop,bindings,kidbases,visited);
      }
    }
  }
 else {
    if ("String_Node_Str".equals(prop)) {
      for (      Set<TrackerNode> basenodes : _nullMap.values()) {
        getNodesLoadBindings(basenodes,bindings,kidbases,visited);
      }
    }
 else {
      final Set<TrackerNode> basenodes=_nullMap.get(prop);
      getNodesLoadBindings(basenodes,bindings,kidbases,visited);
    }
  }
  for (  Object kidbase : kidbases) {
    collectLoadBindings(kidbase,"String_Node_Str",bindings,visited);
  }
}

Fixed version (ground truth):
private void collectLoadBindings(Object base,String prop,LinkedHashSet<LoadBinding> bindings,Set<TrackerNode> visited){
  final LinkedHashSet<Object> kidbases=new LinkedHashSet<Object>();
  if (base != null) {
    if ("String_Node_Str".equals(base)) {
      final Collection<Map<Object,TrackerNode>> nodesMaps=_compMap.values();
      if (nodesMaps != null) {
        for (        Map<Object,TrackerNode> nodesMap : nodesMaps) {
          final Collection<TrackerNode> nodes=nodesMap.values();
          if (nodes != null) {
            getLoadBindingsPerProperty(nodes,prop,bindings,kidbases,visited);
          }
        }
      }
    }
 else {
      final Set<TrackerNode> nodes=getAllTrackerNodesByBean(base);
      if (nodes != null && !nodes.isEmpty()) {
        getLoadBindingsPerProperty(nodes,prop,bindings,kidbases,visited);
      }
    }
  }
 else {
    if ("String_Node_Str".equals(prop)) {
      for (      Set<TrackerNode> basenodes : _nullMap.values()) {
        getNodesLoadBindings(basenodes,bindings,kidbases,visited);
      }
    }
 else {
      final Set<TrackerNode> basenodes=_nullMap.get(prop);
      getNodesLoadBindings(basenodes,bindings,kidbases,visited);
    }
  }
  for (  Object kidbase : kidbases) {
    collectLoadBindings(kidbase,"String_Node_Str",bindings,visited);
  }
}
Program: 16197
Project: 16197
Buggy source:
@SuppressWarnings("String_Node_Str") public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Radiogroup radiogroup=(Radiogroup)comp;
  final ListModel<?> model=radiogroup.getModel();
  if (model != null && !(model instanceof Selectable)) {
    throw new UiException("String_Node_Str");
  }
  if (val != null) {
    if (model != null) {
      ((Selectable<Object>)model).addToSelection(val);
      return IGNORED_VALUE;
    }
 else {
      for (final Iterator<?> it=radiogroup.getItems().iterator(); it.hasNext(); ) {
        final Radio radio=(Radio)it.next();
        String value=radio.getValue();
        if (val.equals(value)) {
          return radio;
        }
      }
    }
  }
  if (model != null) {
    Set<Object> sels=((Selectable<Object>)model).getSelection();
    if (sels != null && sels.size() > 0)     ((Selectable<Object>)model).clearSelection();
    return IGNORED_VALUE;
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Object coerceToUi(Object val,Component comp,BindContext ctx){
  Radiogroup radiogroup=(Radiogroup)comp;
  final ListModel<?> model=radiogroup.getModel();
  if (model != null && !(model instanceof Selectable)) {
    throw new UiException("String_Node_Str");
  }
  if (val != null) {
    if (model != null) {
      ((Selectable<Object>)model).addToSelection(val);
      return IGNORED_VALUE;
    }
 else {
      for (final Iterator<?> it=radiogroup.getItems().iterator(); it.hasNext(); ) {
        final Radio radio=(Radio)it.next();
        if (val.equals(radio.getValue())) {
          return radio;
        }
      }
    }
  }
  if (model != null) {
    Set<Object> sels=((Selectable<Object>)model).getSelection();
    if (sels != null && sels.size() > 0)     ((Selectable<Object>)model).clearSelection();
    return IGNORED_VALUE;
  }
  return null;
}
Program: 16199
Project: 16199
Buggy source:
protected static final Object coerceToTypeForSetValue(final Object obj,final Class<?> type) throws ELException {
  if (type == null || Object.class.equals(type) || (obj != null && type.isAssignableFrom(obj.getClass()))) {
    return obj;
  }
  if (String.class.equals(type)) {
    return obj == null && COERCE_NULL_TO_NULL ? null : coerceToString(obj);
  }
  if (ELArithmetic.isNumberType(type)) {
    return (obj == null || "String_Node_Str".equals(obj)) && !type.isPrimitive() && COERCE_NULL_TO_NULL ? null : coerceToNumber(obj,type);
  }
  if (Character.class.equals(type) || Character.TYPE == type) {
    return (obj == null || "String_Node_Str".equals(obj)) && !type.isPrimitive() && COERCE_NULL_TO_NULL ? null : coerceToCharacter(obj);
  }
  if (Boolean.class.equals(type) || Boolean.TYPE == type) {
    return (obj == null || "String_Node_Str".equals(obj)) && COERCE_NULL_TO_NULL ? null : coerceToBoolean(obj);
  }
  if (type.isEnum()) {
    return coerceToEnum(obj,type);
  }
  if (isDateTimeType(type)) {
    return coerceToDateTime(obj,type);
  }
  if (obj == null)   return null;
  if (obj instanceof String) {
    if ("String_Node_Str".equals(obj))     return null;
    PropertyEditor editor=PropertyEditorManager.findEditor(type);
    if (editor != null) {
      editor.setAsText((String)obj);
      return editor.getValue();
    }
  }
  throw new ELException(MessageFactory.get("String_Node_Str",obj,obj.getClass(),type));
}

Fixed version (ground truth):
protected static final Object coerceToTypeForSetValue(final Object obj,final Class<?> type) throws ELException {
  if (type == null || Object.class.equals(type) || (obj != null && type.isAssignableFrom(obj.getClass()))) {
    return obj;
  }
  if (String.class.equals(type)) {
    return obj == null && COERCE_NULL_TO_NULL ? null : coerceToString(obj);
  }
  if (ELArithmetic.isNumberType(type)) {
    return (obj == null || "String_Node_Str".equals(obj)) && !type.isPrimitive() && COERCE_NULL_TO_NULL ? null : coerceToNumber(obj,type);
  }
  if (Character.class.equals(type) || Character.TYPE == type) {
    return (obj == null || "String_Node_Str".equals(obj)) && !type.isPrimitive() && COERCE_NULL_TO_NULL ? null : coerceToCharacter(obj);
  }
  if (Boolean.class.equals(type) || Boolean.TYPE == type) {
    return (obj == null || "String_Node_Str".equals(obj)) && !type.isPrimitive() && COERCE_NULL_TO_NULL ? null : coerceToBoolean(obj);
  }
  if (type.isEnum()) {
    return coerceToEnum(obj,type);
  }
  if (isDateTimeType(type)) {
    return coerceToDateTime(obj,type);
  }
  if (obj == null)   return null;
  if (obj instanceof String) {
    if ("String_Node_Str".equals(obj))     return null;
    PropertyEditor editor=PropertyEditorManager.findEditor(type);
    if (editor != null) {
      editor.setAsText((String)obj);
      return editor.getValue();
    }
  }
  throw new ELException(MessageFactory.get("String_Node_Str",obj,obj.getClass(),type));
}
Program: 16200
Project: 16200
Buggy source:
/** 
 * Formats a number (Integer, BigDecimal...) into a string. If null, an empty string is returned. <p>A utility to assist the handling of numeric data.
 * @see #toNumberOnly
 * @param defaultFormat used if {@link #getFormat} returns null.If defaultFormat and  {@link #getFormat} are both null,the system's default format is used.
 */
protected String formatNumber(Object value,String defaultFormat){
  if (value == null)   return "String_Node_Str";
  final DecimalFormat df=(DecimalFormat)NumberFormat.getInstance(getDefaultLocale());
  if (_rounding != BigDecimal.ROUND_HALF_EVEN)   df.setRoundingMode(RoundingMode.valueOf(_rounding));
  String fmt=getFormat();
  if (fmt == null)   fmt=defaultFormat;
  if (fmt != null)   df.applyLocalizedPattern(fmt);
  return df.format(value);
}

Fixed version (ground truth):
/** 
 * Formats a number (Integer, BigDecimal...) into a string. If null, an empty string is returned. <p>A utility to assist the handling of numeric data.
 * @see #toNumberOnly
 * @param defaultFormat used if {@link #getFormat} returns null.If defaultFormat and  {@link #getFormat} are both null,the system's default format is used.
 */
protected String formatNumber(Object value,String defaultFormat){
  if (value == null)   return "String_Node_Str";
  final DecimalFormat df=(DecimalFormat)NumberFormat.getInstance(getDefaultLocale());
  if (_rounding != BigDecimal.ROUND_HALF_EVEN)   df.setRoundingMode(RoundingMode.valueOf(_rounding));
  String fmt=getFormat();
  if (fmt == null)   fmt=defaultFormat;
  if (fmt != null)   if (_locale != null)   df.applyLocalizedPattern(fmt);
 else   df.applyPattern(fmt);
  return df.format(value);
}
Program: 16201
Project: 16201
Buggy source:
private void addNullMap(TrackerNode node){
  final Object propName=node.getFieldScript();
  Set<TrackerNode> nodes=_nullMap.get(propName);
  if (nodes == null) {
    nodes=new HashSet<TrackerNode>();
    _nullMap.put(propName,nodes);
  }
  nodes.add(node);
  removeBeanMap(node);
}

Fixed version (ground truth):
private void addNullMap(TrackerNode node){
  final Object propName=node.getFieldScript();
  LinkedHashSet<TrackerNode> nodes=_nullMap.get(propName);
  if (nodes == null) {
    nodes=new LinkedHashSet<TrackerNode>();
    _nullMap.put(propName,nodes);
  }
  nodes.add(node);
  removeBeanMap(node);
}
Program: 16202
Project: 16202
Buggy source:
private void removeNodes(Collection<Set<TrackerNode>> nodesets,Collection<TrackerNode> removed){
  for (final Iterator<Set<TrackerNode>> it=nodesets.iterator(); it.hasNext(); ) {
    final Set<TrackerNode> nodeset=it.next();
    nodeset.removeAll(removed);
    if (nodeset.isEmpty()) {
      it.remove();
    }
  }
}

Fixed version (ground truth):
private void removeNodes(Collection<LinkedHashSet<TrackerNode>> nodesets,Collection<TrackerNode> removed){
  for (final Iterator<LinkedHashSet<TrackerNode>> it=nodesets.iterator(); it.hasNext(); ) {
    final Set<TrackerNode> nodeset=it.next();
    nodeset.removeAll(removed);
    if (nodeset.isEmpty()) {
      it.remove();
    }
  }
}
Program: 16203
Project: 16203
Buggy source:
public Set<LoadBinding> getLoadBindings(Object base,String prop){
  final Set<LoadBinding> bindings=new HashSet<LoadBinding>();
  final Set<TrackerNode> visited=new HashSet<TrackerNode>();
  collectLoadBindings(base,prop,bindings,visited);
  return bindings;
}

Fixed version (ground truth):
public Set<LoadBinding> getLoadBindings(Object base,String prop){
  final LinkedHashSet<LoadBinding> bindings=new LinkedHashSet<LoadBinding>();
  final Set<TrackerNode> visited=new HashSet<TrackerNode>();
  collectLoadBindings(base,prop,bindings,visited);
  return bindings;
}
Program: 16204
Project: 16204
Buggy source:
private void getLoadBindingsPerProperty(Collection<TrackerNode> nodes,String prop,Set<LoadBinding> bindings,Set<Object> kidbases,Set<TrackerNode> visited){
  if ("String_Node_Str".equals(prop)) {
    for (    TrackerNode node : nodes) {
      getLoadBindings0(node,bindings,kidbases,visited);
    }
  }
 else   if ("String_Node_Str".equals(prop)) {
    for (    TrackerNode node : nodes) {
      final Set<TrackerNode> kids=node.getDirectDependents();
      getNodesLoadBindings(kids,bindings,kidbases,visited);
    }
  }
 else {
    for (    TrackerNode node : nodes) {
      final TrackerNode kid=node.getDependent(prop);
      if (kid != null) {
        getLoadBindings0(kid,bindings,kidbases,visited);
      }
    }
  }
}

Fixed version (ground truth):
private void getLoadBindingsPerProperty(Collection<TrackerNode> nodes,String prop,LinkedHashSet<LoadBinding> bindings,LinkedHashSet<Object> kidbases,Set<TrackerNode> visited){
  if ("String_Node_Str".equals(prop)) {
    for (    TrackerNode node : nodes) {
      getLoadBindings0(node,bindings,kidbases,visited);
    }
  }
 else   if ("String_Node_Str".equals(prop)) {
    for (    TrackerNode node : nodes) {
      final Set<TrackerNode> kids=node.getDirectDependents();
      getNodesLoadBindings(kids,bindings,kidbases,visited);
    }
  }
 else {
    for (    TrackerNode node : nodes) {
      final TrackerNode kid=node.getDependent(prop);
      if (kid != null) {
        getLoadBindings0(kid,bindings,kidbases,visited);
      }
    }
  }
}
Program: 16205
Project: 16205
Buggy source:
private void addBeanMap(TrackerNode node,Object value){
  if (!value.equals(node.getBean())) {
    removeBeanMap(node);
    if (!BindELContext.isImmutable(value)) {
      Set<TrackerNode> nodes=_beanMap.get(value);
      if (nodes == null) {
        nodes=new HashSet<TrackerNode>();
        _beanMap.put(value,nodes);
        _equalBeansMap.put(value);
      }
      nodes.add(node);
      node.setBean(value);
    }
  }
  removeNullMap(node);
}

Fixed version (ground truth):
private void addBeanMap(TrackerNode node,Object value){
  if (!value.equals(node.getBean())) {
    removeBeanMap(node);
    if (!BindELContext.isImmutable(value)) {
      LinkedHashSet<TrackerNode> nodes=_beanMap.get(value);
      if (nodes == null) {
        nodes=new LinkedHashSet<TrackerNode>();
        _beanMap.put(value,nodes);
        _equalBeansMap.put(value);
      }
      nodes.add(node);
      node.setBean(value);
    }
  }
  removeNullMap(node);
}
Program: 16206
Project: 16206
Buggy source:
private void removeAllFromBeanMap(Collection<TrackerNode> removed){
  final Collection<Entry<Object,Set<TrackerNode>>> nodesets=_beanMap.entrySet();
  for (final Iterator<Entry<Object,Set<TrackerNode>>> it=nodesets.iterator(); it.hasNext(); ) {
    final Entry<Object,Set<TrackerNode>> nodeset=it.next();
    final Object bean=nodeset.getKey();
    nodeset.getValue().removeAll(removed);
    if (nodeset.getValue().isEmpty()) {
      it.remove();
      _equalBeansMap.remove(bean);
    }
  }
}

Fixed version (ground truth):
private void removeAllFromBeanMap(Collection<TrackerNode> removed){
  final Collection<Entry<Object,LinkedHashSet<TrackerNode>>> nodesets=_beanMap.entrySet();
  for (final Iterator<Entry<Object,LinkedHashSet<TrackerNode>>> it=nodesets.iterator(); it.hasNext(); ) {
    final Entry<Object,LinkedHashSet<TrackerNode>> nodeset=it.next();
    final Object bean=nodeset.getKey();
    nodeset.getValue().removeAll(removed);
    if (nodeset.getValue().isEmpty()) {
      it.remove();
      _equalBeansMap.remove(bean);
    }
  }
}
Program: 16207
Project: 16207
Buggy source:
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _beanMap=new WeakIdentityMap<Object,Set<TrackerNode>>();
  _equalBeansMap=new EqualBeansMap();
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _beanMap=new WeakIdentityMap<Object,LinkedHashSet<TrackerNode>>();
  _equalBeansMap=new EqualBeansMap();
}
Program: 16208
Project: 16208
Buggy source:
private void getNodesLoadBindings(Set<TrackerNode> basenodes,Set<LoadBinding> bindings,Set<Object> kidbases,Set<TrackerNode> visited){
  if (basenodes != null) {
    for (    TrackerNode node : basenodes) {
      if (node != null) {
        getLoadBindings0(node,bindings,kidbases,visited);
      }
    }
  }
}

Fixed version (ground truth):
private void getNodesLoadBindings(Set<TrackerNode> basenodes,LinkedHashSet<LoadBinding> bindings,LinkedHashSet<Object> kidbases,Set<TrackerNode> visited){
  if (basenodes != null) {
    for (    TrackerNode node : basenodes) {
      if (node != null) {
        getLoadBindings0(node,bindings,kidbases,visited);
      }
    }
  }
}
Program: 16209
Project: 16209
Buggy source:
private void getLoadBindings0(TrackerNode node,Set<LoadBinding> bindings,Set<Object> kidbases,Set<TrackerNode> visited){
  if (visited.contains(node)) {
    return;
  }
  visited.add(node);
  bindings.addAll(node.getLoadBindings());
  final Set<ReferenceBinding> refBindings=node.getReferenceBindings();
  bindings.addAll(refBindings);
  for (  ReferenceBinding refBinding : refBindings) {
    refBinding.invalidateCache();
    collectLoadBindings(refBinding,"String_Node_Str",bindings,visited);
  }
  for (  TrackerNode associate : node.getAssociates()) {
    getLoadBindings0(associate,bindings,kidbases,visited);
  }
  final Object kidbase=node.getBean();
  if (kidbases != null && kidbase != null) {
    kidbases.add(kidbase);
  }
 else {
    final Set<TrackerNode> nodes=node.getDirectDependents();
    for (    TrackerNode kid : nodes) {
      getLoadBindings0(kid,bindings,null,visited);
    }
  }
}

Fixed version (ground truth):
private void getLoadBindings0(TrackerNode node,LinkedHashSet<LoadBinding> bindings,Set<Object> kidbases,Set<TrackerNode> visited){
  if (visited.contains(node)) {
    return;
  }
  visited.add(node);
  bindings.addAll(node.getLoadBindings());
  final Set<ReferenceBinding> refBindings=node.getReferenceBindings();
  bindings.addAll(refBindings);
  for (  ReferenceBinding refBinding : refBindings) {
    refBinding.invalidateCache();
    collectLoadBindings(refBinding,"String_Node_Str",bindings,visited);
  }
  for (  TrackerNode associate : node.getAssociates()) {
    getLoadBindings0(associate,bindings,kidbases,visited);
  }
  final Object kidbase=node.getBean();
  if (kidbases != null && kidbase != null) {
    kidbases.add(kidbase);
  }
 else {
    final Set<TrackerNode> nodes=node.getDirectDependents();
    for (    TrackerNode kid : nodes) {
      getLoadBindings0(kid,bindings,null,visited);
    }
  }
}
Program: 16210
Project: 16210
Buggy source:
private void collectLoadBindings(Object base,String prop,Set<LoadBinding> bindings,Set<TrackerNode> visited){
  final Set<Object> kidbases=new HashSet<Object>();
  if (base != null) {
    if ("String_Node_Str".equals(base)) {
      final Collection<Map<Object,TrackerNode>> nodesMaps=_compMap.values();
      if (nodesMaps != null) {
        for (        Map<Object,TrackerNode> nodesMap : nodesMaps) {
          final Collection<TrackerNode> nodes=nodesMap.values();
          if (nodes != null) {
            getLoadBindingsPerProperty(nodes,prop,bindings,kidbases,visited);
          }
        }
      }
    }
 else {
      final Set<TrackerNode> nodes=getAllTrackerNodesByBean(base);
      if (nodes != null && !nodes.isEmpty()) {
        getLoadBindingsPerProperty(nodes,prop,bindings,kidbases,visited);
      }
    }
  }
 else {
    if ("String_Node_Str".equals(prop)) {
      for (      Set<TrackerNode> basenodes : _nullMap.values()) {
        getNodesLoadBindings(basenodes,bindings,kidbases,visited);
      }
    }
 else {
      final Set<TrackerNode> basenodes=_nullMap.get(prop);
      getNodesLoadBindings(basenodes,bindings,kidbases,visited);
    }
  }
  for (  Object kidbase : kidbases) {
    collectLoadBindings(kidbase,"String_Node_Str",bindings,visited);
  }
}

Fixed version (ground truth):
private void collectLoadBindings(Object base,String prop,LinkedHashSet<LoadBinding> bindings,Set<TrackerNode> visited){
  final LinkedHashSet<Object> kidbases=new LinkedHashSet<Object>();
  if (base != null) {
    if ("String_Node_Str".equals(base)) {
      final Collection<Map<Object,TrackerNode>> nodesMaps=_compMap.values();
      if (nodesMaps != null) {
        for (        Map<Object,TrackerNode> nodesMap : nodesMaps) {
          final Collection<TrackerNode> nodes=nodesMap.values();
          if (nodes != null) {
            getLoadBindingsPerProperty(nodes,prop,bindings,kidbases,visited);
          }
        }
      }
    }
 else {
      final Set<TrackerNode> nodes=getAllTrackerNodesByBean(base);
      if (nodes != null && !nodes.isEmpty()) {
        getLoadBindingsPerProperty(nodes,prop,bindings,kidbases,visited);
      }
    }
  }
 else {
    if ("String_Node_Str".equals(prop)) {
      for (      Set<TrackerNode> basenodes : _nullMap.values()) {
        getNodesLoadBindings(basenodes,bindings,kidbases,visited);
      }
    }
 else {
      final Set<TrackerNode> basenodes=_nullMap.get(prop);
      getNodesLoadBindings(basenodes,bindings,kidbases,visited);
    }
  }
  for (  Object kidbase : kidbases) {
    collectLoadBindings(kidbase,"String_Node_Str",bindings,visited);
  }
}
Program: 16211
Project: 16211
Buggy source:
/** 
 * Formats a number (Integer, BigDecimal...) into a string. If null, an empty string is returned. <p>A utility to assist the handling of numeric data.
 * @see #toNumberOnly
 * @param defaultFormat used if {@link #getFormat} returns null.If defaultFormat and  {@link #getFormat} are both null,the system's default format is used.
 */
protected String formatNumber(Object value,String defaultFormat){
  if (value == null)   return "String_Node_Str";
  final DecimalFormat df=(DecimalFormat)NumberFormat.getInstance(getDefaultLocale());
  if (_rounding != BigDecimal.ROUND_HALF_EVEN)   df.setRoundingMode(RoundingMode.valueOf(_rounding));
  String fmt=getFormat();
  if (fmt == null)   fmt=defaultFormat;
  if (fmt != null)   df.applyLocalizedPattern(fmt);
  return df.format(value);
}

Fixed version (ground truth):
/** 
 * Formats a number (Integer, BigDecimal...) into a string. If null, an empty string is returned. <p>A utility to assist the handling of numeric data.
 * @see #toNumberOnly
 * @param defaultFormat used if {@link #getFormat} returns null.If defaultFormat and  {@link #getFormat} are both null,the system's default format is used.
 */
protected String formatNumber(Object value,String defaultFormat){
  if (value == null)   return "String_Node_Str";
  final DecimalFormat df=(DecimalFormat)NumberFormat.getInstance(getDefaultLocale());
  if (_rounding != BigDecimal.ROUND_HALF_EVEN)   df.setRoundingMode(RoundingMode.valueOf(_rounding));
  String fmt=getFormat();
  if (fmt == null)   fmt=defaultFormat;
  if (fmt != null)   if (_locale != null)   df.applyLocalizedPattern(fmt);
 else   df.applyPattern(fmt);
  return df.format(value);
}
Program: 16212
Project: 16212
Buggy source:
/** 
 * Wire controller as an attribute of the specified component with a custom separator. <p>The separator is used to separate the component ID and the controller. By default, it is '$'. However, for Groovy or other environment that '$' is not applicable, you can invoke this method to use '_' as the separator.
 */
public static final void wireController(Component comp,Object controller,char separator){
  Object onm=comp.getAttribute("String_Node_Str");
  if (onm instanceof String && ((String)onm).length() > 0) {
    comp.setAttribute((String)onm,controller);
  }
 else {
    comp.setAttribute(separator + "String_Node_Str",controller);
    final String id=comp.getId();
    comp.setAttribute(id + separator + "String_Node_Str",controller);
    comp.setAttribute(composerNameByClass(id,controller.getClass(),separator),controller);
  }
}

Fixed version (ground truth):
/** 
 * Wire controller as an attribute of the specified component with a custom separator. <p>The separator is used to separate the component ID and the controller. By default, it is '$'. However, for Groovy or other environment that '$' is not applicable, you can invoke this method to use '_' as the separator.
 */
public static final void wireController(Component comp,Object controller,char separator){
  Object onm=comp.getAttribute("String_Node_Str");
  if (onm instanceof String && ((String)onm).length() > 0) {
    comp.setAttribute((String)onm,controller);
  }
 else {
    comp.setAttribute("String_Node_Str",controller);
  }
  comp.setAttribute(separator + "String_Node_Str",controller);
  final String id=comp.getId();
  comp.setAttribute(id + separator + "String_Node_Str",controller);
  comp.setAttribute(composerNameByClass(id,controller.getClass(),separator),controller);
}
Program: 16213
Project: 16213
Buggy source:
public void doBeforeComposeChildren(Component comp) throws Exception {
  _viewModel=initViewModel(evalx,comp);
  _binder=initBinder(evalx,comp);
  ValidationMessages _vmsgs=initValidationMessages(evalx,comp,_binder);
  Selectors.wireVariables(comp,_viewModel,Selectors.newVariableResolvers(_viewModel.getClass(),null));
  if (_vmsgs != null) {
    _binder.setValidationMessages(_vmsgs);
  }
  BinderKeeper keeper=BinderKeeper.getInstance(comp);
  keeper.book(_binder,comp);
  _binder.init(comp,_viewModel,getViewModelInitArgs(evalx,comp));
}

Fixed version (ground truth):
public void doBeforeComposeChildren(Component comp) throws Exception {
  _viewModel=initViewModel(evalx,comp);
  _binder=initBinder(evalx,comp);
  ValidationMessages _vmsgs=initValidationMessages(evalx,comp,_binder);
  Selectors.wireVariables(comp,_viewModel,Selectors.newVariableResolvers(_viewModel.getClass(),null));
  if (_vmsgs != null) {
    _binder.setValidationMessages(_vmsgs);
  }
  BinderKeeper keeper=BinderKeeper.getInstance(comp);
  keeper.book(_binder,comp);
  _binder.init(comp,_viewModel,getViewModelInitArgs(evalx,comp));
  ConventionWires.wireController(comp,this);
}
Program: 16214
Project: 16214
Buggy source:
public void doAfterCompose(T comp) throws Exception {
  String cname=(String)comp.getAttribute(COMPOSER_NAME_ATTR);
  comp.setAttribute(cname != null ? cname : comp.getId() + "String_Node_Str",this);
  _binder.initAnnotatedBindings();
  new AbstractAnnotatedMethodInvoker<AfterCompose>(AfterCompose.class,_afterComposeMethodCache){
    protected boolean shouldLookupSuperclass(    AfterCompose annotation){
      return annotation.superclass();
    }
  }
.invokeMethod(_binder,getViewModelInitArgs(evalx,comp));
  BinderKeeper keeper=BinderKeeper.getInstance(comp);
  if (keeper.isRootBinder(_binder)) {
    keeper.loadComponentForAllBinders();
  }
}

Fixed version (ground truth):
public void doAfterCompose(T comp) throws Exception {
  _binder.initAnnotatedBindings();
  new AbstractAnnotatedMethodInvoker<AfterCompose>(AfterCompose.class,_afterComposeMethodCache){
    protected boolean shouldLookupSuperclass(    AfterCompose annotation){
      return annotation.superclass();
    }
  }
.invokeMethod(_binder,getViewModelInitArgs(evalx,comp));
  BinderKeeper keeper=BinderKeeper.getInstance(comp);
  if (keeper.isRootBinder(_binder)) {
    keeper.loadComponentForAllBinders();
  }
}
Program: 16215
Project: 16215
Buggy source:
public boolean insertBefore(Component child,Component refChild){
  if (child instanceof Caption) {
    refChild=getFirstChild();
    if (super.insertBefore(child,refChild)) {
      _caption=(Caption)child;
      invalidate();
      return true;
    }
    return false;
  }
 else   if (child instanceof Label) {
    _tmpLabel=(Label)child;
    log.warning("String_Node_Str" + this + "String_Node_Str");
    return false;
  }
 else   return super.insertBefore(child,refChild);
}

Fixed version (ground truth):
public boolean insertBefore(Component child,Component refChild){
  if (child instanceof Caption) {
    refChild=getFirstChild();
    if (super.insertBefore(child,refChild)) {
      _caption=(Caption)child;
      invalidate();
      return true;
    }
    return false;
  }
 else   if (child instanceof Label) {
    _tmpLabel=(Label)child;
    log.warning("String_Node_Str" + this + "String_Node_Str");
  }
  return super.insertBefore(child,refChild);
}
Program: 16216
Project: 16216
Buggy source:
/** 
 * Internal use only
 * @since 6.5.0
 */
public void onCreate(Event evt){
  if (_tmpLabel != null)   setLabel(_tmpLabel.getValue());
  _tmpLabel=null;
}

Fixed version (ground truth):
/** 
 * Internal use only
 * @since 6.5.0
 */
public void onCreate(Event evt){
  if (_tmpLabel != null) {
    setLabel(_tmpLabel.getValue());
    removeChild(_tmpLabel);
  }
  _tmpLabel=null;
}
Program: 16217
Project: 16217
Buggy source:
/** 
 * Returns the CDI BeanManager.  Default implementation use JNDI to lookup "java:comp/env/BeanManager". 
 */
public static BeanManager getBeanManager(){
  if (_manager != null)   return _manager;
  try {
    final InitialContext initialContext=new InitialContext();
    _manager=(BeanManager)initialContext.lookup(Library.getProperty("String_Node_Str","String_Node_Str"));
  }
 catch (  NamingException e) {
    e.printStackTrace();
    throw XelException.Aide.wrap(e,"String_Node_Str");
  }
  return _manager;
}

Fixed version (ground truth):
/** 
 * Returns the CDI BeanManager.  Default implementation use JNDI to lookup "java:comp/env/BeanManager". 
 */
public static BeanManager getBeanManager(){
  if (_manager != null)   return _manager;
  try {
    final InitialContext initialContext=new InitialContext();
    _manager=(BeanManager)initialContext.lookup(Library.getProperty("String_Node_Str","String_Node_Str"));
  }
 catch (  NamingException e) {
    throw XelException.Aide.wrap(e,"String_Node_Str");
  }
  return _manager;
}
Program: 16218
Project: 16218
Buggy source:
/** 
 * Process fileitems named file0, file1 and so on.
 */
private static final void processItems(Desktop desktop,Map<String,Object> params,Map<String,String> attrs) throws IOException {
  List<Media> meds=(List<Media>)desktop.getAttribute("String_Node_Str");
  if (meds == null) {
    meds=new LinkedList<Media>();
    desktop.setAttribute("String_Node_Str",meds);
  }
  final boolean alwaysNative="String_Node_Str".equals(params.get("String_Node_Str"));
  final Object fis=params.get("String_Node_Str");
  if (fis instanceof FileItem) {
    meds.add(processItem(desktop,(FileItem)fis,alwaysNative));
  }
 else   if (fis != null) {
    for (Iterator it=((List)fis).iterator(); it.hasNext(); ) {
      meds.add(processItem(desktop,(FileItem)it.next(),alwaysNative));
    }
  }
}

Fixed version (ground truth):
/** 
 * Process fileitems named file0, file1 and so on.
 */
private static final void processItems(Desktop desktop,Map<String,Object> params,Map<String,String> attrs) throws IOException {
  String uuid=attrs.get("String_Node_Str");
  List<Media> meds=(List<Media>)desktop.getAttribute(uuid);
  if (meds == null) {
    meds=new LinkedList<Media>();
    desktop.setAttribute(uuid,meds);
  }
  final boolean alwaysNative="String_Node_Str".equals(params.get("String_Node_Str"));
  final Object fis=params.get("String_Node_Str");
  if (fis instanceof FileItem) {
    meds.add(processItem(desktop,(FileItem)fis,alwaysNative));
  }
 else   if (fis != null) {
    for (Iterator it=((List)fis).iterator(); it.hasNext(); ) {
      meds.add(processItem(desktop,(FileItem)it.next(),alwaysNative));
    }
  }
}
Program: 16219
Project: 16219
Buggy source:
@Override public void service(Event event,Scope scope) throws Exception {
  if (event instanceof StubEvent) {
    postToNonStubAncestor((StubEvent)event);
  }
 else {
    super.service(event,scope);
  }
}

Fixed version (ground truth):
@Override public void service(Event event,Scope scope) throws Exception {
  if (event instanceof StubEvent) {
    EventListenerMap map=((ComponentCtrl)this).getEventListenerMap();
    if (map != null) {
      map.service(event,scope,this,((StubEvent)event).getCommand());
    }
 else     postToNonStubAncestor((StubEvent)event);
  }
 else {
    super.service(event,scope);
  }
}
Program: 16220
Project: 16220
Buggy source:
public void doBeforeComposeChildren(Component comp) throws Exception {
  _viewModel=initViewModel(evalx,comp);
  _binder=initBinder(evalx,comp);
  ValidationMessages _vmsgs=initValidationMessages(evalx,comp,_binder);
  Selectors.wireVariables(comp,_viewModel,Selectors.newVariableResolvers(_viewModel.getClass(),null));
  if (_vmsgs != null) {
    _binder.setValidationMessages(_vmsgs);
  }
  BinderKeeper keeper=BinderKeeper.getInstance(comp);
  keeper.book(_binder,comp);
}

Fixed version (ground truth):
public void doBeforeComposeChildren(Component comp) throws Exception {
  _viewModel=initViewModel(evalx,comp);
  _binder=initBinder(evalx,comp);
  ValidationMessages _vmsgs=initValidationMessages(evalx,comp,_binder);
  Selectors.wireVariables(comp,_viewModel,Selectors.newVariableResolvers(_viewModel.getClass(),null));
  if (_vmsgs != null) {
    _binder.setValidationMessages(_vmsgs);
  }
  BinderKeeper keeper=BinderKeeper.getInstance(comp);
  keeper.book(_binder,comp);
  _binder.initViewModel(comp,_viewModel,getViewModelInitArgs(evalx,comp));
}
Program: 16221
Project: 16221
Buggy source:
public void doAfterCompose(T comp) throws Exception {
  String cname=(String)comp.getAttribute(COMPOSER_NAME_ATTR);
  comp.setAttribute(cname != null ? cname : comp.getId() + "String_Node_Str",this);
  _binder.initViewModel(comp,_viewModel,getViewModelInitArgs(evalx,comp));
  _binder.initAnnotatedBindings();
  BinderKeeper keeper=BinderKeeper.getInstance(comp);
  if (keeper.isRootBinder(_binder)) {
    keeper.loadComponentForAllBinders();
  }
}

Fixed version (ground truth):
public void doAfterCompose(T comp) throws Exception {
  String cname=(String)comp.getAttribute(COMPOSER_NAME_ATTR);
  comp.setAttribute(cname != null ? cname : comp.getId() + "String_Node_Str",this);
  _binder.initAnnotatedBindings();
  BinderKeeper keeper=BinderKeeper.getInstance(comp);
  if (keeper.isRootBinder(_binder)) {
    keeper.loadComponentForAllBinders();
  }
}