nus-yam/ex-repair huggingface dataset:
Program: 16050
Project: 16050
Buggy source:
protected Object getShadowVariable0(AbstractComponent baseChild,String name,boolean recurse){
  Object val=getAttribute(name);
  if (val != null || hasAttribute(name))   return val;
  if (!(this instanceof ShadowElement)) {
    ComponentCtrl ctrl=this;
    List<HtmlShadowElement> shadowRoots=ctrl.getShadowRoots();
    if (!shadowRoots.isEmpty()) {
      try {
        initIndexCacheMap();
        for (        HtmlShadowElement shadow : shadowRoots) {
          val=shadow.resolveVariable(baseChild,name,recurse);
          if (val != null)           return val;
        }
      }
  finally {
        destroyIndexCacheMap();
      }
    }
  }
  if (recurse) {
    if (_parent != null)     return _parent.getShadowVariable0(this,name,recurse);
    if (this instanceof ShadowElement) {
      AbstractComponent shadowHost=(AbstractComponent)((ShadowElement)this).getShadowHost();
      if (shadowHost != null) {
        if (shadowHost._variableSeeking) {
          if (shadowHost.getParent() != null) {
            return ((AbstractComponent)shadowHost.getParent()).getShadowVariable(name,recurse);
          }
          return null;
        }
        return shadowHost.getShadowVariable(name,recurse);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
protected Object getShadowVariable0(AbstractComponent baseChild,String name,boolean recurse){
  Object val=getAttribute(name);
  if (val != null || hasAttribute(name))   return val;
  if (!(this instanceof ShadowElement)) {
    ComponentCtrl ctrl=this;
    List<HtmlShadowElement> shadowRoots=ctrl.getShadowRoots();
    if (!shadowRoots.isEmpty()) {
      Map<Component,Integer> indexCacheMap=getIndexCacheMap();
      try {
        if (indexCacheMap == null)         initIndexCacheMap();
        for (        HtmlShadowElement shadow : shadowRoots) {
          val=shadow.resolveVariable(baseChild,name,recurse);
          if (val != null)           return val;
        }
      }
  finally {
        ShadowElementsCtrl.setDistributedIndexInfo(indexCacheMap);
      }
    }
  }
  if (recurse) {
    if (_parent != null)     return _parent.getShadowVariable0(this,name,recurse);
    if (this instanceof ShadowElement) {
      AbstractComponent shadowHost=(AbstractComponent)((ShadowElement)this).getShadowHost();
      if (shadowHost != null) {
        if (shadowHost._variableSeeking) {
          if (shadowHost.getParent() != null) {
            return ((AbstractComponent)shadowHost.getParent()).getShadowVariable(name,recurse);
          }
          return null;
        }
        return shadowHost.getShadowVariable(name,recurse);
      }
    }
  }
  return null;
}
Program: 16051
Project: 16051
Buggy source:
private void rebuildShadowTree(){
  Map<Component,Integer> oldCacheMap=getIndexCacheMap();
  final boolean destroyCacheMap=oldCacheMap == null;
  try {
    if (destroyCacheMap)     oldCacheMap=initIndexCacheMap();
    rebuildSubShadowTree();
  }
  finally {
    if (destroyCacheMap)     destroyIndexCacheMap();
  }
}

Fixed version (ground truth):
private void rebuildShadowTree(){
  Map<Component,Integer> oldCacheMap=getIndexCacheMap();
  final boolean destroyCacheMap=oldCacheMap == null;
  try {
    if (destroyCacheMap)     initIndexCacheMap();
    rebuildSubShadowTree();
  }
  finally {
    if (destroyCacheMap)     destroyIndexCacheMap();
  }
}
Program: 16054
Project: 16054
Buggy source:
private void loadComponent0(Component comp,boolean loadinit){
  loadComponentProperties0(comp,loadinit);
  for (Component kid=comp.getFirstChild(); kid != null; kid=kid.getNextSibling()) {
    loadComponent0(kid,loadinit);
  }
}

Fixed version (ground truth):
private void loadComponent0(Component comp,boolean loadinit){
  loadComponentProperties0(comp,loadinit);
  final Map<String,List<Binding>> compBindings=_bindings.get(comp);
  if (compBindings == null || !compBindings.keySet().contains(CHILDREN_ATTR)) {
    for (Component kid=comp.getFirstChild(); kid != null; kid=kid.getNextSibling()) {
      loadComponent0(kid,loadinit);
    }
  }
}
Program: 16055
Project: 16055
Buggy source:
@SuppressWarnings("String_Node_Str") private void sort0(TreeNode<E> node,Comparator<TreeNode<E>> cmpr){
  if (node.getChildren() == null)   return;
  if (node instanceof DefaultTreeNode)   ((TreeNodeChildrenList)node.getChildren()).sort(cmpr);
 else   Collections.sort(node.getChildren(),cmpr);
  for (  TreeNode<E> child : node.getChildren())   sort0(child,cmpr);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void sort0(TreeNode<E> node,Comparator<TreeNode<E>> cmpr){
  if (node.getChildren() == null)   return;
  if (node instanceof DefaultTreeNode)   ((TreeNodeChildrenList)node.getChildren()).treeSort(cmpr);
 else   Collections.sort(node.getChildren(),cmpr);
  for (  TreeNode<E> child : node.getChildren())   sort0(child,cmpr);
}
Program: 16056
Project: 16056
Buggy source:
@SuppressWarnings("String_Node_Str") private void sort0(TreeNode<E> node,Comparator<TreeNode<E>> cmpr){
  if (node.getChildren() == null)   return;
  if (node instanceof DefaultTreeNode)   ((TreeNodeChildrenList)node.getChildren()).sort(cmpr);
 else   Collections.sort(node.getChildren(),cmpr);
  for (  TreeNode<E> child : node.getChildren())   sort0(child,cmpr);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void sort0(TreeNode<E> node,Comparator<TreeNode<E>> cmpr){
  if (node.getChildren() == null)   return;
  if (node instanceof DefaultTreeNode)   ((TreeNodeChildrenList)node.getChildren()).treeSort(cmpr);
 else   Collections.sort(node.getChildren(),cmpr);
  for (  TreeNode<E> child : node.getChildren())   sort0(child,cmpr);
}
Program: 16057
Project: 16057
Buggy source:
/** 
 * Returns the processed script.
 * @param script
 * @return
 */
public Object processScript(Object script){
  return script;
}

Fixed version (ground truth):
/** 
 * Returns the processed script.
 * @param script
 */
public Object processScript(Object script){
  return script;
}
Program: 16059
Project: 16059
Buggy source:
public void removeValue(Comparable<?> series,Comparable<?> category){
  List<Comparable<?>> key=new ArrayList<Comparable<?>>(2);
  key.add(series);
  key.add(category);
  if (_valueMap.remove(key) == null)   return;
  final int cIndex=_categoryList.indexOf(category);
  final int sIndex=_seriesList.indexOf(series);
  final Number value=getValue(series,category);
  int ccount=_categoryMap.get(category).intValue();
  if (ccount > 1) {
    _categoryMap.put(category,new Integer(ccount - 1));
  }
 else {
    _categoryMap.remove(category);
    _categoryList.remove(category);
  }
  int scount=_seriesMap.get(series).intValue();
  if (scount > 1) {
    _seriesMap.put(series,new Integer(scount - 1));
  }
 else {
    _seriesMap.remove(series);
    _seriesList.remove(series);
  }
  fireEvent(ChartDataEvent.REMOVED,series,category,sIndex,cIndex,value);
}

Fixed version (ground truth):
public void removeValue(Comparable<?> series,Comparable<?> category){
  List<Comparable<?>> key=new ArrayList<Comparable<?>>(2);
  key.add(series);
  key.add(category);
  if (_valueMap.remove(key) == null)   return;
  final List<Comparable<?>> cateList=_seriesMap.get(series);
  final int cIndex=cateList.indexOf(category);
  final int sIndex=_seriesList.indexOf(series);
  final Number value=getValue(series,category);
  cateList.remove(cIndex);
  if (cateList.isEmpty()) {
    _seriesList.remove(series);
    _seriesMap.remove(series);
  }
  boolean clear=true;
  for (  List<Comparable<?>> cate : _seriesMap.values()) {
    if (cate.contains(category)) {
      clear=false;
      break;
    }
  }
  if (clear)   _categoryList.remove(category);
  fireEvent(ChartDataEvent.REMOVED,series,category,sIndex,cIndex,value);
}
Program: 16060
Project: 16060
Buggy source:
public void setValue(Comparable<?> series,Comparable<?> category,Number value){
  List<Comparable<?>> key=new ArrayList<Comparable<?>>(2);
  key.add(series);
  key.add(category);
  if (!_valueMap.containsKey(key)) {
    if (!_categoryMap.containsKey(category)) {
      _categoryMap.put(category,new Integer(1));
      _categoryList.add(category);
    }
 else {
      Integer count=_categoryMap.get(category);
      _categoryMap.put(category,new Integer(count.intValue() + 1));
    }
    if (!_seriesMap.containsKey(series)) {
      _seriesMap.put(series,new Integer(1));
      _seriesList.add(series);
    }
 else {
      Integer count=_seriesMap.get(series);
      _seriesMap.put(series,new Integer(count.intValue() + 1));
    }
    _valueMap.put(key,value);
    final int cIndex=_categoryList.indexOf(category);
    final int sIndex=_seriesList.indexOf(series);
    fireEvent(ChartDataEvent.ADDED,series,category,sIndex,cIndex,value);
  }
 else {
    Number ovalue=_valueMap.get(key);
    if (Objects.equals(ovalue,value)) {
      return;
    }
    _valueMap.put(key,value);
    final int cIndex=_categoryList.indexOf(category);
    final int sIndex=_seriesList.indexOf(series);
    fireEvent(ChartDataEvent.CHANGED,series,category,sIndex,cIndex,value);
  }
}

Fixed version (ground truth):
public void setValue(Comparable<?> series,Comparable<?> category,Number value){
  List<Comparable<?>> key=new ArrayList<Comparable<?>>(2);
  key.add(series);
  key.add(category);
  if (!_valueMap.containsKey(key)) {
    if (!_categoryList.contains(category))     _categoryList.add(category);
    LinkedList<Comparable<?>> list=_seriesMap.get(series);
    if (list == null) {
      list=new LinkedList<Comparable<?>>();
      list.add(category);
      _seriesMap.put(series,list);
      _seriesList.add(series);
    }
 else {
      list.add(category);
    }
    _valueMap.put(key,value);
    final int cIndex=list.indexOf(category);
    final int sIndex=_seriesList.indexOf(series);
    fireEvent(ChartDataEvent.ADDED,series,category,sIndex,cIndex,value);
  }
 else {
    Number ovalue=_valueMap.get(key);
    if (Objects.equals(ovalue,value)) {
      return;
    }
    _valueMap.put(key,value);
    final int cIndex=_seriesMap.get(series).indexOf(category);
    final int sIndex=_seriesList.indexOf(series);
    fireEvent(ChartDataEvent.CHANGED,series,category,sIndex,cIndex,value);
  }
}
Program: 16061
Project: 16061
Buggy source:
public void clear(){
  _seriesMap.clear();
  _seriesList.clear();
  _categoryMap.clear();
  _categoryList.clear();
  _valueMap.clear();
  fireEvent(ChartDataEvent.REMOVED,null,null,-1,-1,null);
}

Fixed version (ground truth):
public void clear(){
  _seriesMap.clear();
  _seriesList.clear();
  _categoryList.clear();
  _valueMap.clear();
  fireEvent(ChartDataEvent.REMOVED,null,null,-1,-1,null);
}
Program: 16062
Project: 16062
Buggy source:
public Object clone(){
  SimpleCategoryModel clone=(SimpleCategoryModel)super.clone();
  if (_seriesMap != null)   clone._seriesMap=new HashMap<Comparable<?>,Integer>(_seriesMap);
  if (_seriesList != null)   clone._seriesList=new ArrayList<Comparable<?>>(_seriesList);
  if (_categoryMap != null)   clone._categoryMap=new HashMap<Comparable<?>,Integer>(_categoryMap);
  if (_categoryList != null)   clone._categoryList=new ArrayList<Comparable<?>>(_categoryList);
  if (_valueMap != null)   clone._valueMap=new LinkedHashMap<List<Comparable<?>>,Number>(_valueMap);
  return clone;
}

Fixed version (ground truth):
public Object clone(){
  SimpleCategoryModel clone=(SimpleCategoryModel)super.clone();
  if (_seriesMap != null)   clone._seriesMap=new HashMap<Comparable<?>,LinkedList<Comparable<?>>>(_seriesMap);
  if (_seriesList != null)   clone._seriesList=new ArrayList<Comparable<?>>(_seriesList);
  if (_categoryList != null)   clone._categoryList=new ArrayList<Comparable<?>>(_categoryList);
  if (_valueMap != null)   clone._valueMap=new LinkedHashMap<List<Comparable<?>>,Number>(_valueMap);
  return clone;
}
Program: 16063
Project: 16063
Buggy source:
public void onPiggyback(){
  final Configuration config=_desktop.getWebApp().getConfiguration();
  long tmexpired=0;
  for (int cnt=0; !_pending.isEmpty(); ) {
    if (tmexpired == 0) {
      tmexpired=System.currentTimeMillis() + (config.getMaxProcessTime() >> 1);
      cnt=_pending.size() + 3;
    }
 else     if (--cnt < 0 || System.currentTimeMillis() > tmexpired) {
      break;
    }
    final ThreadInfo info;
synchronized (_pending) {
      if (_pending.isEmpty())       return;
      info=_pending.remove(0);
    }
synchronized (_mutex) {
      _carryOver=new ExecutionCarryOver(_desktop);
synchronized (info) {
        if (info.nActive == GIVEUP)         continue;
        info.nActive=1;
        info.notify();
      }
      if (_desktop == null)       break;
      try {
        _mutex.wait();
      }
 catch (      InterruptedException ex) {
        throw UiException.Aide.wrap(ex);
      }
    }
  }
}

Fixed version (ground truth):
public void onPiggyback(){
  if (_desktop == null)   return;
  final Configuration config=_desktop.getWebApp().getConfiguration();
  long tmexpired=0;
  for (int cnt=0; !_pending.isEmpty(); ) {
    if (tmexpired == 0) {
      tmexpired=System.currentTimeMillis() + (config.getMaxProcessTime() >> 1);
      cnt=_pending.size() + 3;
    }
 else     if (--cnt < 0 || System.currentTimeMillis() > tmexpired) {
      break;
    }
    final ThreadInfo info;
synchronized (_pending) {
      if (_pending.isEmpty())       return;
      info=_pending.remove(0);
    }
synchronized (_mutex) {
      _carryOver=new ExecutionCarryOver(_desktop);
synchronized (info) {
        if (info.nActive == GIVEUP)         continue;
        info.nActive=1;
        info.notify();
      }
      if (_desktop == null)       break;
      try {
        _mutex.wait();
      }
 catch (      InterruptedException ex) {
        throw UiException.Aide.wrap(ex);
      }
    }
  }
}
Program: 16066
Project: 16066
Buggy source:
public void doAfterCompose(Page page,Component[] comps) throws Exception {
  final Execution exec=Executions.getCurrent();
  if (exec.getAttribute(RESOLVE_COMPOSITION) != this) {
    return;
  }
  exec.removeAttribute(RESOLVE_COMPOSITION);
  final Map<String,Component> insertMap=new HashMap<String,Component>();
  final Component parent=(Component)exec.getAttribute(PARENT);
  final Collection<Component> roots=(parent == null ? page.getRoots() : parent.getChildren());
  resolveInsertComponents(roots,insertMap);
  if (!roots.isEmpty()) {
    Component comp=roots.iterator().next();
    do {
      final Component nextRoot=comp.getNextSibling();
      final Annotation annt=((ComponentCtrl)comp).getAnnotation(null,"String_Node_Str");
      if (annt != null) {
        final String joinId=annt.getAttribute("String_Node_Str");
        final Component insertComp=insertMap.get(joinId);
        if (insertComp != null) {
          comp.setParent(insertComp);
        }
 else {
          comp.detach();
        }
      }
      comp=nextRoot;
    }
 while (comp != null);
  }
}

Fixed version (ground truth):
public void doAfterCompose(Page page,Component[] comps) throws Exception {
  final Execution exec=Executions.getCurrent();
  if (exec.getAttribute(RESOLVE_COMPOSITION) != this) {
    return;
  }
  exec.removeAttribute(RESOLVE_COMPOSITION);
  final Map<String,Component> insertMap=new HashMap<String,Component>();
  final Component parent=(Component)exec.getAttribute(PARENT);
  final Collection<Component> roots=(parent == null ? page.getRoots() : parent.getChildren());
  resolveInsertComponents(roots,insertMap);
  resolveDefineComponents(roots,insertMap);
}
Program: 16067
Project: 16067
Buggy source:
private static void outDivTemplateBegin(Writer out,String uuid) throws IOException {
  out.write("String_Node_Str");
  writeAttr(out,"String_Node_Str",uuid);
  out.write("String_Node_Str");
}

Fixed version (ground truth):
private static void outDivTemplateBegin(Writer out,String uuid) throws IOException {
  out.write("String_Node_Str");
  writeAttr(out,"String_Node_Str",uuid);
  out.write("String_Node_Str" + "String_Node_Str" + getLoadingLabel() + "String_Node_Str");
}
Program: 16068
Project: 16068
Buggy source:
protected void init(){
  getState(State.MAIN).setReturningAll(true).addMinorTransition('[',State.IN_ATTRIBUTE);
  setState(State.IN_ATTRIBUTE,new StateCtx<State,CharClass,Character>(){
    protected void onReturn(    Character i,    CharClass cls){
      if (cls != CharClass.OTHER)       return;
      if (i == '"')       _inDoubleQuote=!_inDoubleQuote;
 else       if (i == '\'')       _inSingleQuote=!_inSingleQuote;
    }
  }
).setReturningAll(true).addMinorTransition(']',State.MAIN);
}

Fixed version (ground truth):
protected void init(){
  getState(State.MAIN).setReturningAll(true).addTransition(CharClass.OPEN_BRACKET,State.IN_ATTRIBUTE);
  setState(State.IN_ATTRIBUTE,new StateCtx<State,CharClass,Character>(){
    protected void onReturn(    Character i,    CharClass cls){
      if (cls != CharClass.OTHER)       return;
      if (i == '"')       _inDoubleQuote=!_inDoubleQuote;
 else       if (i == '\'')       _inSingleQuote=!_inSingleQuote;
    }
  }
).setReturningAll(true).addTransition(CharClass.CLOSE_BRACKET,State.MAIN);
}
Program: 16069
Project: 16069
Buggy source:
protected CharClass getClass(Character c){
  if (_inDoubleQuote && (_escaped || c != '"'))   return CharClass.LITERAL;
  if (_inSingleQuote && (_escaped || c != '\''))   return CharClass.LITERAL;
  if (_inParam && c != ',' && c != ')')   return Character.isWhitespace(c) ? CharClass.OTHER : CharClass.LITERAL;
  if (_escaped)   return Character.isWhitespace(c) ? CharClass.WHITESPACE : CharClass.LITERAL;
  if (Character.isLetter(c) || Character.isDigit(c) || c == '-' || c == '_')   return CharClass.LITERAL;
  if (Character.isWhitespace(c))   return CharClass.WHITESPACE;
  return c == '\\' ? CharClass.ESCAPE : CharClass.OTHER;
}

Fixed version (ground truth):
protected CharClass getClass(Character c){
  if (_inDoubleQuote && (_escaped || c != '"'))   return CharClass.LITERAL;
  if (_inSingleQuote && (_escaped || c != '\''))   return CharClass.LITERAL;
  if (_current == State.MAIN && c == '[') {
    return CharClass.OPEN_BRACKET;
  }
  if (_current == State.IN_ATTRIBUTE && !_inDoubleQuote && !_inSingleQuote && c == ']') {
    return CharClass.CLOSE_BRACKET;
  }
  if (_inParam && c != ',' && c != ')')   return Character.isWhitespace(c) ? CharClass.OTHER : CharClass.LITERAL;
  if (_escaped)   return Character.isWhitespace(c) ? CharClass.WHITESPACE : CharClass.LITERAL;
  if (Character.isLetter(c) || Character.isDigit(c) || c == '-' || c == '_')   return CharClass.LITERAL;
  if (Character.isWhitespace(c))   return CharClass.WHITESPACE;
  if ('.' == c.charValue() && _current == State.IN_ATTRIBUTE) {
    return CharClass.LITERAL;
  }
  return c == '\\' ? CharClass.ESCAPE : CharClass.OTHER;
}
Program: 16070
Project: 16070
Buggy source:
private Type getTokenType(char input,CharClass inputClass){
switch (inputClass) {
case LITERAL:
    return Type.IDENTIFIER;
case WHITESPACE:
  return Type.WHITESPACE;
}
switch (input) {
case ',':
return _inParam ? Type.PARAM_SEPARATOR : Type.SELECTOR_SEPARATOR;
case '*':
return Type.UNIVERSAL;
case '>':
return Type.CBN_CHILD;
case '+':
return Type.CBN_ADJACENT_SIBLING;
case '~':
return Type.CBN_GENERAL_SIBLING;
case '#':
return Type.NTN_ID;
case '.':
return Type.NTN_CLASS;
case ':':
return Type.NTN_PSDOCLS;
case '\'':
return Type.SINGLE_QUOTE;
case '"':
return Type.DOUBLE_QUOTE;
case '[':
return Type.OPEN_BRACKET;
case ']':
return Type.CLOSE_BRACKET;
case '(':
return Type.OPEN_PAREN;
case ')':
return Type.CLOSE_PAREN;
case '=':
switch (_prevChar) {
case '^':
return Type.OP_BEGIN_WITH;
case '$':
return Type.OP_END_WITH;
case '*':
return Type.OP_CONTAIN;
default :
return Type.OP_EQUAL;
}
default :
return Character.isWhitespace(input) ? Type.MINOR_WHITESPACE : Type.UNKNOWN_CHAR;
}
}

Fixed version (ground truth):
private Type getTokenType(char input,CharClass inputClass){
switch (inputClass) {
case LITERAL:
    return Type.IDENTIFIER;
case WHITESPACE:
  return Type.WHITESPACE;
}
switch (input) {
case ',':
return _inParam ? Type.PARAM_SEPARATOR : Type.SELECTOR_SEPARATOR;
case '*':
return Type.UNIVERSAL;
case '>':
return Type.CBN_CHILD;
case '+':
return Type.CBN_ADJACENT_SIBLING;
case '~':
return Type.CBN_GENERAL_SIBLING;
case '#':
return Type.NTN_ID;
case '.':
return (inputClass == CharClass.ATTR_GETTER_OP) ? Type.IDENTIFIER : Type.NTN_CLASS;
case ':':
return Type.NTN_PSDOCLS;
case '\'':
return Type.SINGLE_QUOTE;
case '"':
return Type.DOUBLE_QUOTE;
case '[':
return Type.OPEN_BRACKET;
case ']':
return Type.CLOSE_BRACKET;
case '(':
return Type.OPEN_PAREN;
case ')':
return Type.CLOSE_PAREN;
case '=':
switch (_prevChar) {
case '^':
return Type.OP_BEGIN_WITH;
case '$':
return Type.OP_END_WITH;
case '*':
return Type.OP_CONTAIN;
default :
return Type.OP_EQUAL;
}
default :
return Character.isWhitespace(input) ? Type.MINOR_WHITESPACE : Type.UNKNOWN_CHAR;
}
}
Program: 16071
Project: 16071
Buggy source:
protected State getLandingState(Character input,CharClass inputClass){
  if (input == '[')   return State.IN_ATTRIBUTE;
  if (inputClass == CharClass.ESCAPE)   _escaped=true;
  return State.MAIN;
}

Fixed version (ground truth):
protected State getLandingState(Character input,CharClass inputClass){
  if (input == '[')   return State.IN_ATTRIBUTE;
  if (super._current == State.IN_ATTRIBUTE) {
    if (_inDoubleQuote || _inSingleQuote)     return State.IN_ATTRIBUTE;
  }
  if (inputClass == CharClass.ESCAPE)   _escaped=true;
  return State.MAIN;
}
Program: 16074
Project: 16074
Buggy source:
private void initRendererIfAny(Component comp,String attr){
  final Object installed=comp.getAttribute(BinderImpl.RENDERER_INSTALLED);
  if (installed != null) {
    return;
  }
  final ComponentCtrl compCtrl=(ComponentCtrl)comp;
  final Annotation ann=AnnotationUtil.getSystemAnnotation(compCtrl,null);
  final Map<String,String[]> attrs=ann != null ? ann.getAttributes() : null;
  final String installAttr="String_Node_Str";
  if (installAttr.equals(attr)) {
    final String rendererName=AnnotationUtil.testString(attrs.get(Binder.RENDERER),ann);
    if (rendererName != null) {
      String[] values=null;
      if (rendererName.indexOf("String_Node_Str") != -1) {
        values=rendererName.split("String_Node_Str",2);
      }
 else {
        values=rendererName.split("String_Node_Str",2);
      }
      if (values != null) {
        final Object renderer=getRenderer(values[1]);
        Object old=null;
        try {
          old=Fields.get(comp,values[0]);
        }
 catch (        NoSuchMethodException e1) {
        }
        if (old == null) {
          try {
            Fields.set(comp,values[0],renderer,false);
          }
 catch (          Exception e) {
            throw new UiException(e.getMessage(),e);
          }
          if (renderer instanceof TemplateRendererCtrl) {
            ((TemplateRendererCtrl)renderer).setAttributeName(attr);
          }
        }
        comp.setAttribute(BinderImpl.RENDERER_INSTALLED,"String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
private void initRendererIfAny(Component comp,String attr){
  final Object installed=comp.getAttribute(BinderImpl.RENDERER_INSTALLED);
  if (installed != null) {
    return;
  }
  final ComponentCtrl compCtrl=(ComponentCtrl)comp;
  final Annotation ann=AnnotationUtil.getSystemAnnotation(compCtrl,null);
  final Map<String,String[]> attrs=ann != null ? ann.getAttributes() : null;
  final String installAttr="String_Node_Str";
  if (attrs != null && installAttr.equals(attr)) {
    final String rendererName=AnnotationUtil.testString(attrs.get(Binder.RENDERER),ann);
    if (rendererName != null) {
      String[] values=null;
      if (rendererName.indexOf("String_Node_Str") != -1) {
        values=rendererName.split("String_Node_Str",2);
      }
 else {
        values=rendererName.split("String_Node_Str",2);
      }
      if (values != null) {
        final Object renderer=getRenderer(values[1]);
        Object old=null;
        try {
          old=Fields.get(comp,values[0]);
        }
 catch (        NoSuchMethodException e1) {
        }
        if (old == null) {
          try {
            Fields.set(comp,values[0],renderer,false);
          }
 catch (          Exception e) {
            throw new UiException(e.getMessage(),e);
          }
          if (renderer instanceof TemplateRendererCtrl) {
            ((TemplateRendererCtrl)renderer).setAttributeName(attr);
          }
        }
        comp.setAttribute(BinderImpl.RENDERER_INSTALLED,"String_Node_Str");
      }
    }
  }
}
Program: 16075
Project: 16075
Buggy source:
public void setVoided(boolean voided){
  Object created=getAttribute(org.zkoss.zk.ui.impl.Attributes.PAGE_CREATED);
  if (created instanceof Boolean && ((Boolean)created).booleanValue())   throw new IllegalStateException("String_Node_Str");
  _voided=voided;
}

Fixed version (ground truth):
public void setVoided(boolean voided){
  Object created=getAttribute(org.zkoss.zk.ui.impl.Attributes.PAGE_CREATED);
  if (created instanceof Boolean && ((Boolean)created).booleanValue())   if (!getDesktop().getComponents().isEmpty())   throw new IllegalStateException("String_Node_Str");
  _voided=voided;
}
Program: 16078
Project: 16078
Buggy source:
public void onChildRemoved(Component child){
  if (child instanceof Treerow) {
    _treerow=null;
  }
 else   if (child instanceof Treechildren) {
    addVisibleItemCount(-_treechildren.getVisibleItemCount());
    _treechildren=null;
  }
  super.onChildRemoved(child);
}

Fixed version (ground truth):
public void onChildRemoved(Component child){
  if (child instanceof Treerow) {
    _treerow=null;
  }
 else   if (child instanceof Treechildren) {
    if (isOpen())     addVisibleItemCount(-_treechildren.getVisibleItemCount());
    _treechildren=null;
  }
  super.onChildRemoved(child);
}
Program: 16079
Project: 16079
Buggy source:
/** 
 * Returns a live list of children. By live we mean the developer could add or remove a child by manipulating the returned list directly. <p>Default: instantiates and returns an instance of   {@link Children}.
 */
public List<Component> getChildren(){
  return new Children();
}

Fixed version (ground truth):
/** 
 * Returns a live list of children. By live we mean the developer could add or remove a child by manipulating the returned list directly. <p>Default: instantiates and returns an instance of   {@link Children}.
 */
public List<? extends Component> getChildren(){
  return new Children();
}
Program: 16080
Project: 16080
Buggy source:
private final void fixFellows(Collection<Component> c){
  for (  Component comp : c) {
    final String compId=comp.getId();
    if (compId.length() > 0)     addFellow(comp);
    if (!(comp instanceof IdSpace))     fixFellows(comp.getChildren());
  }
}

Fixed version (ground truth):
private final void fixFellows(Collection<Component> c){
  for (  Component comp : c) {
    final String compId=comp.getId();
    if (compId.length() > 0)     addFellow(comp);
    if (!(comp instanceof IdSpace))     fixFellows((Collection<Component>)comp.getChildren());
  }
}
Program: 16081
Project: 16081
Buggy source:
/** 
 * Returns a live list of children. By live we mean the developer could add or remove a child by manipulating the returned list directly.
 */
public List<Component> getChildren();

Fixed version (ground truth):
/** 
 * Returns a live list of children. By live we mean the developer could add or remove a child by manipulating the returned list directly.
 */
public List<? extends Component> getChildren();
Program: 16082
Project: 16082
Buggy source:
/** 
 * Replaces all children of the specified component. It is the same as <pre><code>parent.getChildren().clear(); parent.getChildren().addAll(newChildren); </code></pre>
 * @since 3.5.2
 */
public static void replaceChildren(Component parent,Collection<Component> newChildren){
  final Collection<Component> children=parent.getChildren();
  children.clear();
  children.addAll(newChildren);
}

Fixed version (ground truth):
/** 
 * Replaces all children of the specified component. It is the same as <pre><code>parent.getChildren().clear(); parent.getChildren().addAll(newChildren); </code></pre>
 * @since 3.5.2
 */
public static void replaceChildren(Component parent,Collection<Component> newChildren){
  final Collection<Component> children=(Collection<Component>)parent.getChildren();
  children.clear();
  children.addAll(newChildren);
}
Program: 16083
Project: 16083
Buggy source:
/** 
 * Returns a collection of visible children. <p>The performance of the returned collection's size() is NO GOOD.
 */
public static Collection<Component> getVisibleChildren(Component comp){
  final Collection<Component> children=comp.getChildren();
  return new AbstractCollection<Component>(){
    public int size(){
      int size=0;
      for (      Component c : children) {
        if (c.isVisible())         ++size;
      }
      return size;
    }
    public Iterator<Component> iterator(){
      return new Iterator<Component>(){
        final Iterator<Component> _it=children.iterator();
        Component _next;
        public boolean hasNext(){
          if (_next != null)           return true;
          _next=getNextVisible(false);
          return _next != null;
        }
        public Component next(){
          if (_next != null) {
            final Component c=_next;
            _next=null;
            return c;
          }
          return getNextVisible(true);
        }
        public void remove(){
          throw new UnsupportedOperationException();
        }
        private Component getNextVisible(        boolean blind){
          while (blind || _it.hasNext()) {
            final Component c=_it.next();
            if (c.isVisible())             return c;
          }
          return null;
        }
      }
;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Returns a collection of visible children. <p>The performance of the returned collection's size() is NO GOOD.
 */
public static Collection<Component> getVisibleChildren(Component comp){
  final Collection<Component> children=(Collection<Component>)comp.getChildren();
  return new AbstractCollection<Component>(){
    public int size(){
      int size=0;
      for (      Component c : children) {
        if (c.isVisible())         ++size;
      }
      return size;
    }
    public Iterator<Component> iterator(){
      return new Iterator<Component>(){
        final Iterator<Component> _it=children.iterator();
        Component _next;
        public boolean hasNext(){
          if (_next != null)           return true;
          _next=getNextVisible(false);
          return _next != null;
        }
        public Component next(){
          if (_next != null) {
            final Component c=_next;
            _next=null;
            return c;
          }
          return getNextVisible(true);
        }
        public void remove(){
          throw new UnsupportedOperationException();
        }
        private Component getNextVisible(        boolean blind){
          while (blind || _it.hasNext()) {
            final Component c=_it.next();
            if (c.isVisible())             return c;
          }
          return null;
        }
      }
;
    }
  }
;
}
Program: 16084
Project: 16084
Buggy source:
private void removeComponents(Collection<Component> comps){
  for (  Component comp : comps) {
    removeComponents(comp.getChildren());
    removeComponent(comp,true);
  }
}

Fixed version (ground truth):
private void removeComponents(Collection<Component> comps){
  for (  Component comp : comps) {
    removeComponents((Collection<Component>)comp.getChildren());
    removeComponent(comp,true);
  }
}
Program: 16085
Project: 16085
Buggy source:
public void doAfterCompose(Page page,Component[] comps) throws Exception {
  final Execution exec=Executions.getCurrent();
  if (exec.getAttribute(RESOLVE_COMPOSITION) != this) {
    return;
  }
  exec.removeAttribute(RESOLVE_COMPOSITION);
  final Map<String,Component> insertMap=new HashMap<String,Component>();
  final Component parent=(Component)exec.getAttribute(PARENT);
  final Collection<Component> roots=parent == null ? page.getRoots() : parent.getChildren();
  resolveInsertComponents(roots,insertMap);
  if (!roots.isEmpty()) {
    Component comp=roots.iterator().next();
    do {
      final Component nextRoot=comp.getNextSibling();
      final Annotation annt=((ComponentCtrl)comp).getAnnotation(null,"String_Node_Str");
      if (annt != null) {
        final String joinId=annt.getAttribute("String_Node_Str");
        final Component insertComp=insertMap.get(joinId);
        if (insertComp != null) {
          comp.setParent(insertComp);
        }
 else {
          comp.detach();
        }
      }
      comp=nextRoot;
    }
 while (comp != null);
  }
}

Fixed version (ground truth):
public void doAfterCompose(Page page,Component[] comps) throws Exception {
  final Execution exec=Executions.getCurrent();
  if (exec.getAttribute(RESOLVE_COMPOSITION) != this) {
    return;
  }
  exec.removeAttribute(RESOLVE_COMPOSITION);
  final Map<String,Component> insertMap=new HashMap<String,Component>();
  final Component parent=(Component)exec.getAttribute(PARENT);
  final Collection<Component> roots=(Collection<Component>)(parent == null ? page.getRoots() : parent.getChildren());
  resolveInsertComponents(roots,insertMap);
  if (!roots.isEmpty()) {
    Component comp=roots.iterator().next();
    do {
      final Component nextRoot=comp.getNextSibling();
      final Annotation annt=((ComponentCtrl)comp).getAnnotation(null,"String_Node_Str");
      if (annt != null) {
        final String joinId=annt.getAttribute("String_Node_Str");
        final Component insertComp=insertMap.get(joinId);
        if (insertComp != null) {
          comp.setParent(insertComp);
        }
 else {
          comp.detach();
        }
      }
      comp=nextRoot;
    }
 while (comp != null);
  }
}
Program: 16086
Project: 16086
Buggy source:
private void resolveInsertComponents(Collection<Component> comps,Map<String,Component> map){
  for (  Component comp : comps) {
    final Annotation annt=((ComponentCtrl)comp).getAnnotation(null,"String_Node_Str");
    if (annt != null) {
      final String insertName=annt.getAttribute("String_Node_Str");
      if (map.containsKey(insertName)) {
        throw new UiException("String_Node_Str" + insertName + "String_Node_Str"+ comp);
      }
      map.put(insertName,comp);
    }
    resolveInsertComponents(comp.getChildren(),map);
  }
}

Fixed version (ground truth):
private void resolveInsertComponents(Collection<Component> comps,Map<String,Component> map){
  for (  Component comp : comps) {
    final Annotation annt=((ComponentCtrl)comp).getAnnotation(null,"String_Node_Str");
    if (annt != null) {
      final String insertName=annt.getAttribute("String_Node_Str");
      if (map.containsKey(insertName)) {
        throw new UiException("String_Node_Str" + insertName + "String_Node_Str"+ comp);
      }
      map.put(insertName,comp);
    }
    resolveInsertComponents((Collection<Component>)comp.getChildren(),map);
  }
}
Program: 16087
Project: 16087
Buggy source:
public Object coerceToUi(Object val,Component component,BindContext ctx){
  if (val != null) {
    for (Iterator<Component> it=((Tabbox)component).getTabs().getChildren().iterator(); it.hasNext(); ) {
      final Component child=it.next();
      if (child instanceof Tab) {
        if (val.equals(((Tab)child).getLabel())) {
          return child;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public Object coerceToUi(Object val,Component component,BindContext ctx){
  if (val != null) {
    for (Iterator<Component> it=(Iterator<Component>)((Tabbox)component).getTabs().getChildren().iterator(); it.hasNext(); ) {
      final Component child=it.next();
      if (child instanceof Tab) {
        if (val.equals(((Tab)child).getLabel())) {
          return child;
        }
      }
    }
  }
  return null;
}
Program: 16088
Project: 16088
Buggy source:
private void processAllComponentsBindings(Component comp){
  final Binder selfBinder=BinderUtil.getBinder(comp);
  if (selfBinder != null)   return;
  BindingAnnotationInfoChecker checker=((BinderCtrl)_binder).getBindingAnnotationInfoChecker();
  if (checker != null) {
    checker.checkBinding(_binder,comp);
  }
  processComponentBindings0(comp);
  for (final Iterator<Component> it=comp.getChildren().iterator(); it.hasNext(); ) {
    final Component kid=it.next();
    processAllComponentsBindings(kid);
  }
}

Fixed version (ground truth):
private void processAllComponentsBindings(Component comp){
  final Binder selfBinder=BinderUtil.getBinder(comp);
  if (selfBinder != null)   return;
  BindingAnnotationInfoChecker checker=((BinderCtrl)_binder).getBindingAnnotationInfoChecker();
  if (checker != null) {
    checker.checkBinding(_binder,comp);
  }
  processComponentBindings0(comp);
  for (final Iterator<Component> it=(Iterator<Component>)comp.getChildren().iterator(); it.hasNext(); ) {
    final Component kid=it.next();
    processAllComponentsBindings(kid);
  }
}
Program: 16089
Project: 16089
Buggy source:
private void removeBindings(Component comp){
  removeBindings0(comp);
  for (final Iterator<Component> it=comp.getChildren().iterator(); it.hasNext(); ) {
    final Component kid=it.next();
    if (kid != null) {
      removeBindings(kid);
    }
  }
}

Fixed version (ground truth):
private void removeBindings(Component comp){
  removeBindings0(comp);
  for (final Iterator<Component> it=(Iterator<Component>)comp.getChildren().iterator(); it.hasNext(); ) {
    final Component kid=it.next();
    if (kid != null) {
      removeBindings(kid);
    }
  }
}
Program: 16091
Project: 16091
Buggy source:
public V put(K key,V value){
  tryExpunge();
  final Value<V> v=_map.put(key,new Value<V>(value));
  return v != null ? v.value : null;
}

Fixed version (ground truth):
public V put(K key,V value){
  final Value<V> v=_map.put(key,new Value<V>(value));
  tryExpunge();
  return v != null ? v.value : null;
}
Program: 16092
Project: 16092
Buggy source:
/** 
 * Tests whether certain value is OK to expunge. <p>Note: values are tested thru   {@link #canExpunge} only if{@link #shallExpunge} returns true.<p>Deriving classes might override this method to return different value for different criteria. <p>The return value could be a combination of EXPUNGE_xxx. One of EXPUNGE_YES and EXPUNGE_NO is returned to denote whether to expunge the mapping. One of EXPUNGE_CONTINUE and EXPUNGE_STOP is returned to denote whether to continue the searching of the next mapping for expunging. <p>Normally, you return either (EXPUNGE_YES|EXPUNGE_CONTINUE) or (EXPUNG_NO|EXPUNGE_STOP). Notice that the mapping is queried in the last-access order. Thus, you rarely needs to return (EXPUNGE_NO|EXPUNGE_CONTINUE) unless the appropriate one might be out of this order. <p>This implementation compares the access time and size. It returns (EXPUNGE_YES|EXPUNGE_CONTINUE) if OK, and (EXPUNGE_NO|EXPUNGE_STOP) if not.
 * @param size the current size. It is used instead of size(), sincethe entry might not be removed yet (such as  {@link FastReadCache}).
 * @return a combination of EXPUNGE_xxx
 * @see #shallExpunge
 */
protected int canExpunge(int size,Value<V> v){
  return size >= getMaxSize() || (System.currentTimeMillis() - v.access) > getLifetime() ? (EXPUNGE_YES | EXPUNGE_CONTINUE) : (EXPUNGE_NO | EXPUNGE_STOP);
}

Fixed version (ground truth):
/** 
 * Tests whether certain value is OK to expunge. <p>Note: values are tested thru   {@link #canExpunge} only if{@link #shallExpunge} returns true.<p>Deriving classes might override this method to return different value for different criteria. <p>The return value could be a combination of EXPUNGE_xxx. One of EXPUNGE_YES and EXPUNGE_NO is returned to denote whether to expunge the mapping. One of EXPUNGE_CONTINUE and EXPUNGE_STOP is returned to denote whether to continue the searching of the next mapping for expunging. <p>Normally, you return either (EXPUNGE_YES|EXPUNGE_CONTINUE) or (EXPUNG_NO|EXPUNGE_STOP). Notice that the mapping is queried in the last-access order. Thus, you rarely needs to return (EXPUNGE_NO|EXPUNGE_CONTINUE) unless the appropriate one might be out of this order. <p>This implementation compares the access time and size. It returns (EXPUNGE_YES|EXPUNGE_CONTINUE) if OK, and (EXPUNGE_NO|EXPUNGE_STOP) if not.
 * @param size the current size. It is used instead of size(), sincethe entry might not be removed yet (such as  {@link FastReadCache}).
 * @return a combination of EXPUNGE_xxx
 * @see #shallExpunge
 */
protected int canExpunge(int size,Value<V> v){
  return size > getMaxSize() || (System.currentTimeMillis() - v.access) > getLifetime() ? (EXPUNGE_YES | EXPUNGE_CONTINUE) : (EXPUNGE_NO | EXPUNGE_STOP);
}
Program: 16093
Project: 16093
Buggy source:
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  final Object v=s.readObject();
  if (v instanceof String) {
    final LanguageDefinition langdef=LanguageDefinition.lookup((String)v);
    _compdef=langdef.getComponentDefinition((String)s.readObject());
  }
 else {
    _compdef=(ComponentDefinition)v;
  }
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  final Object v=s.readObject();
  if (v instanceof String) {
    final LanguageDefinition langdef=LanguageDefinition.lookup((String)v);
    final String name=(String)s.readObject();
    try {
      _compdef=langdef.getComponentDefinition(name);
    }
 catch (    DefinitionNotFoundException e) {
      if ("String_Node_Str".equals(name)) {
        _compdef=langdef.getNativeDefinition();
      }
 else {
        throw e;
      }
    }
  }
 else {
    _compdef=(ComponentDefinition)v;
  }
}
Program: 16098
Project: 16098
Buggy source:
@SuppressWarnings("String_Node_Str") public void onInitRender(){
  removeAttribute(ATTR_ON_INIT_RENDER_POSTED);
  if (_model != null) {
    _tmpdatas=new String[_model.getSize()];
    final boolean old=_childable;
    try {
      _childable=true;
      final ItemRenderer renderer=getRealRenderer();
      final Selectable<Object> smodel=getSelectableModel();
      _jsel=-1;
      for (int i=0, sz=_model.getSize(); i < sz; i++) {
        final Object value=_model.getElementAt(i);
        if (_jsel < 0 && smodel.isSelected(value))         _jsel=i;
        _tmpdatas[i]=renderer.render(this,value,i);
      }
    }
 catch (    Exception e) {
      throw UiException.Aide.wrap(e);
    }
 finally {
      _childable=old;
      getChildren().clear();
    }
  }
  invalidate();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void onInitRender(){
  removeAttribute(ATTR_ON_INIT_RENDER_POSTED);
  onInitRenderNow();
  invalidate();
}
Program: 16099
Project: 16099
Buggy source:
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
  super.renderProperties(renderer);
  render(renderer,"String_Node_Str",_name);
  render(renderer,"String_Node_Str",isDisabled());
  renderer.render("String_Node_Str",_jsel);
  if (_tabindex != 0)   renderer.render("String_Node_Str",_tabindex);
  if (_tmpdatas != null) {
    render(renderer,"String_Node_Str",_tmpdatas);
    _tmpdatas=null;
  }
}

Fixed version (ground truth):
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
  super.renderProperties(renderer);
  render(renderer,"String_Node_Str",_name);
  render(renderer,"String_Node_Str",isDisabled());
  renderer.render("String_Node_Str",_jsel);
  if (_tabindex != 0)   renderer.render("String_Node_Str",_tabindex);
  if (_tmpdatas == null && _model != null && _model.getSize() > 0) {
    onInitRenderNow();
  }
  if (_tmpdatas != null) {
    render(renderer,"String_Node_Str",_tmpdatas);
    _tmpdatas=null;
  }
}
Program: 16100
Project: 16100
Buggy source:
/** 
 * Returns the icon font
 * @param iconSclass a CSS class name for the icon font
 * @since 7.0.0
 */
public String getIconSclass(){
  return _auxinf != null && _auxinf.iconSclass instanceof String ? (String)_auxinf.iconSclass : null;
}

Fixed version (ground truth):
/** 
 * Returns the icon font
 * @since 7.0.0
 */
public String getIconSclass(){
  return _auxinf != null && _auxinf.iconSclass instanceof String ? (String)_auxinf.iconSclass : null;
}
Program: 16101
Project: 16101
Buggy source:
/** 
 * @param wapp the Web application (or null if not available yet)
 */
private void sessionTimeout(HttpServletRequest request,HttpServletResponse response,WebApp wapp,String dtid,boolean compress) throws ServletException, IOException {
  final String sid=request.getHeader("String_Node_Str");
  if (sid != null)   response.setHeader("String_Node_Str",sid);
  final AuWriter out=AuWriters.newInstance();
  out.setCompress(compress);
  out.open(request,response);
  if (!getAuDecoder(wapp).isIgnorable(request,wapp)) {
    final String deviceType=getDeviceType(request);
    URIInfo ui=wapp != null ? wapp.getConfiguration().getTimeoutURI(deviceType) : null;
    String uri=ui != null ? ui.uri : null;
    out.write(new AuConfirmClose(null));
    final AuResponse resp;
    if (uri != null) {
      if (uri.length() != 0)       uri=Encodes.encodeURL(getServletContext(),request,response,uri);
      resp=new AuSendRedirect(uri,null);
    }
 else {
      String msg=wapp.getConfiguration().getTimeoutMessage(deviceType);
      if (msg != null && msg.startsWith("String_Node_Str")) {
        final String key;
        msg=Labels.getLabel(key=msg.substring(6),new Object[]{dtid});
        if (msg == null)         log.warning("String_Node_Str" + key);
      }
      if (msg == null)       msg=Messages.get(MZk.UPDATE_OBSOLETE_PAGE,dtid);
      resp=new AuObsolete(dtid,msg);
    }
    out.write(resp);
  }
  out.close(request,response);
}

Fixed version (ground truth):
/** 
 * @param wapp the Web application (or null if not available yet)
 */
private void sessionTimeout(HttpServletRequest request,HttpServletResponse response,WebApp wapp,String dtid,boolean compress) throws ServletException, IOException {
  final String sid=request.getHeader("String_Node_Str");
  if (sid != null)   response.setHeader("String_Node_Str",sid);
  final AuWriter out=AuWriters.newInstance();
  out.setCompress(compress);
  out.open(request,response);
  if (!getAuDecoder(wapp).isIgnorable(request,wapp)) {
    final String deviceType=getDeviceType(request);
    URIInfo ui=wapp != null ? wapp.getConfiguration().getTimeoutURI(deviceType) : null;
    String uri=ui != null ? ui.uri : null;
    out.write(new AuConfirmClose(null));
    final AuResponse resp;
    if (uri != null) {
      if (uri.length() != 0)       uri=Encodes.encodeURL(getServletContext(),request,response,uri);
      resp=new AuSendRedirect(uri,null);
    }
 else {
      String msg=wapp.getConfiguration().getTimeoutMessage(deviceType);
      dtid=XMLs.encodeText(dtid);
      if (msg != null && msg.startsWith("String_Node_Str")) {
        final String key;
        msg=Labels.getLabel(key=msg.substring(6),new Object[]{dtid});
        if (msg == null)         log.warning("String_Node_Str" + key);
      }
      if (msg == null)       msg=Messages.get(MZk.UPDATE_OBSOLETE_PAGE,dtid);
      resp=new AuObsolete(dtid,msg);
    }
    out.write(resp);
  }
  out.close(request,response);
}
Program: 16102
Project: 16102
Buggy source:
public void onParentInvalidated(){
  for (  Component comp : getChildren())   comp.onParentInvalidated();
}

Fixed version (ground truth):
public void onParentInvalidated(){
  List<Component> children=getChildren();
  if (!children.isEmpty() && getFirstChild() != null) {
    for (    Component comp : children) {
      comp.onParentInvalidated();
    }
  }
}