nus-yam/ex-repair huggingface dataset:
Program: 16274
Project: 16274
Buggy source:
private synchronized void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
  s.defaultReadObject();
  final Class<?> cls=(Class<?>)s.readObject();
  if (cls != null) {
    final String nm=(String)s.readObject();
    final int sz=s.readInt();
    final Class[] argTypes=new Class[sz];
    for (int j=0; j < sz; ++j)     argTypes[j]=(Class)s.readObject();
    try {
      _m=cls.getMethod(nm,argTypes);
    }
 catch (    NoSuchMethodException ex) {
      throw new SystemException("String_Node_Str" + nm + "String_Node_Str"+ Objects.toString(argTypes));
    }
  }
}

Fixed version (ground truth):
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
  s.defaultReadObject();
  final Class<?> cls=(Class<?>)s.readObject();
  if (cls != null) {
    final String nm=(String)s.readObject();
    final int sz=s.readInt();
    final Class[] argTypes=new Class[sz];
    for (int j=0; j < sz; ++j)     argTypes[j]=(Class)s.readObject();
    try {
      _m=cls.getMethod(nm,argTypes);
    }
 catch (    NoSuchMethodException ex) {
      throw new SystemException("String_Node_Str" + nm + "String_Node_Str"+ Objects.toString(argTypes));
    }
  }
}
Program: 16275
Project: 16275
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
}
Program: 16276
Project: 16276
Buggy source:
@SuppressWarnings("String_Node_Str") private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  int size=s.readInt();
  _map=new IdentityHashMap<T,Object>((size * 4) / 3);
  for (int i=0; i < size; i++) {
    Object e=s.readObject();
    _map.put((T)e,Objects.UNKNOWN);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  int size=s.readInt();
  _map=new IdentityHashMap<T,Object>((size * 4) / 3);
  for (int i=0; i < size; i++) {
    Object e=s.readObject();
    _map.put((T)e,Objects.UNKNOWN);
  }
}
Program: 16277
Project: 16277
Buggy source:
/** 
 * Joins an array of string. since 5.0.7
 */
public static String join(Object[] ss,String separator){
  if (ss == null)   return null;
  final StringBuffer sb=new StringBuffer();
  for (int j=0; j < ss.length; ++j) {
    if (j != 0)     sb.append(separator);
    sb.append(ss[j]);
  }
  return ss.toString();
}

Fixed version (ground truth):
/** 
 * Joins an array of string. since 5.0.7
 */
public static String join(Object[] ss,String separator){
  if (ss == null)   return null;
  final StringBuffer sb=new StringBuffer();
  for (int j=0; j < ss.length; ++j) {
    if (j != 0)     sb.append(separator);
    sb.append(ss[j]);
  }
  return sb.toString();
}
Program: 16278
Project: 16278
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
  s.defaultReadObject();
  if (s.readBoolean()) {
    BSHInterpreter.read(new NameSpace(null,null,"String_Node_Str"){
      public void setVariable(      String name,      Object value,      boolean strictJava){
        if (_vars == null)         _vars=new HashMap<String,Object>();
        _vars.put(name,value);
      }
      public void setMethod(      String name,      BshMethod mtd){
        if (_mtds == null)         _mtds=new LinkedList<BshMethod>();
        _mtds.add(mtd);
      }
      public void importClass(      String name){
        if (_clses == null)         _clses=new LinkedList<String>();
        _clses.add(name);
      }
      public void importPackage(      String name){
        if (_pkgs == null)         _pkgs=new LinkedList<String>();
        _pkgs.add(name);
      }
      public void loadDefaultImports(){
      }
    }
,s);
  }
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
  s.defaultReadObject();
  if (s.readBoolean()) {
    BSHInterpreter.read(new NameSpace(null,null,"String_Node_Str"){
      public void setVariable(      String name,      Object value,      boolean strictJava){
        if (_vars == null)         _vars=new HashMap<String,Object>();
        _vars.put(name,value);
      }
      public void setMethod(      String name,      BshMethod mtd){
        if (_mtds == null)         _mtds=new LinkedList<BshMethod>();
        _mtds.add(mtd);
      }
      public void importClass(      String name){
        if (_clses == null)         _clses=new LinkedList<String>();
        _clses.add(name);
      }
      public void importPackage(      String name){
        if (_pkgs == null)         _pkgs=new LinkedList<String>();
        _pkgs.add(name);
      }
      public void loadDefaultImports(){
      }
    }
,s);
  }
}
Program: 16280
Project: 16280
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  for (AbstractComponent q=null; ; ) {
    final AbstractComponent child=(AbstractComponent)s.readObject();
    if (child == null) {
      _lastRoot=q;
      break;
    }
    if (q != null)     q._next=child;
 else     _firstRoot=child;
    child._prev=q;
    child._page=this;
    q=child;
  }
  fixFellows(getRoots());
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  for (AbstractComponent q=null; ; ) {
    final AbstractComponent child=(AbstractComponent)s.readObject();
    if (child == null) {
      _lastRoot=q;
      break;
    }
    if (q != null)     q._next=child;
 else     _firstRoot=child;
    child._prev=q;
    child._page=this;
    q=child;
  }
  fixFellows(getRoots());
}
Program: 16281
Project: 16281
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _listeners=EventListenerInfo.read(s,null);
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _listeners=EventListenerInfo.read(s,null);
}
Program: 16282
Project: 16282
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  Serializables.smartRead(s,_props);
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  Serializables.smartRead(s,_props);
}
Program: 16283
Project: 16283
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  readThis(s);
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  readThis(s);
}
Program: 16284
Project: 16284
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  for (  Page page : _pages)   for (Component root=page.getFirstRoot(); root != null; root=root.getNextSibling())   addAllComponents(root);
  final Map<String,Object> attrs=_attrs.getAttributes();
  Serializables.smartRead(s,attrs);
  final List<ScopeListener> lns=_attrs.getListeners();
  Serializables.smartRead(s,lns);
  _dtCleans=(List<DesktopCleanup>)Serializables.smartRead(s,_dtCleans);
  _execInits=(List<ExecutionInit>)Serializables.smartRead(s,_execInits);
  _execCleans=(List<ExecutionCleanup>)Serializables.smartRead(s,_execCleans);
  _uiCycles=(List<UiLifeCycle>)Serializables.smartRead(s,_uiCycles);
  _ausvcs=(List<AuService>)Serializables.smartRead(s,_ausvcs);
  didDeserialize(attrs.values());
  didDeserialize(lns);
  didDeserialize(_dtCleans);
  didDeserialize(_execInits);
  didDeserialize(_execCleans);
  didDeserialize(_uiCycles);
  didDeserialize(_ausvcs);
  Object o=s.readObject();
  if (o != null) {
    ServerPush sp=null;
    if (o instanceof Class) {
      try {
        sp=(ServerPush)((Class)o).newInstance();
      }
 catch (      Throwable ex) {
      }
    }
 else     sp=(ServerPush)o;
    _spushTemp=sp;
  }
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  for (  Page page : _pages)   for (Component root=page.getFirstRoot(); root != null; root=root.getNextSibling())   addAllComponents(root);
  final Map<String,Object> attrs=_attrs.getAttributes();
  Serializables.smartRead(s,attrs);
  final List<ScopeListener> lns=_attrs.getListeners();
  Serializables.smartRead(s,lns);
  _dtCleans=(List<DesktopCleanup>)Serializables.smartRead(s,_dtCleans);
  _execInits=(List<ExecutionInit>)Serializables.smartRead(s,_execInits);
  _execCleans=(List<ExecutionCleanup>)Serializables.smartRead(s,_execCleans);
  _uiCycles=(List<UiLifeCycle>)Serializables.smartRead(s,_uiCycles);
  _ausvcs=(List<AuService>)Serializables.smartRead(s,_ausvcs);
  didDeserialize(attrs.values());
  didDeserialize(lns);
  didDeserialize(_dtCleans);
  didDeserialize(_execInits);
  didDeserialize(_execCleans);
  didDeserialize(_uiCycles);
  didDeserialize(_ausvcs);
  Object o=s.readObject();
  if (o != null) {
    ServerPush sp=null;
    if (o instanceof Class) {
      try {
        sp=(ServerPush)((Class)o).newInstance();
      }
 catch (      Throwable ex) {
      }
    }
 else     sp=(ServerPush)o;
    _spushTemp=sp;
  }
}
Program: 16285
Project: 16285
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  final Collection<EventInterceptor> eilst=Serializables.smartRead(s,(Collection<EventInterceptor>)null);
  if (eilst != null)   _eis=eilst.toArray(new EventInterceptor[eilst.size()]);
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  final Collection<EventInterceptor> eilst=Serializables.smartRead(s,(Collection<EventInterceptor>)null);
  if (eilst != null)   _eis=eilst.toArray(new EventInterceptor[eilst.size()]);
}
Program: 16286
Project: 16286
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  final String langnm=(String)s.readObject();
  if (langnm != null)   _langdef=LanguageDefinition.lookup(langnm);
  _ownerUuid=(String)s.readObject();
  final Map<String,Object> attrs=_attrs.getAttributes();
  Serializables.smartRead(s,attrs);
  final List<ScopeListener> lns=_attrs.getListeners();
  Serializables.smartRead(s,lns);
  for (; ; ) {
    final String evtnm=(String)s.readObject();
    if (evtnm == null)     break;
    if (_listeners == null)     _listeners=new HashMap<String,List<EventListener<? extends Event>>>();
    final List<EventListener<? extends Event>> ls=Serializables.smartRead(s,(List<EventListener<? extends Event>>)null);
    _listeners.put(evtnm,ls);
  }
  _resolvers=Serializables.smartRead(s,_resolvers);
  _mappers=Serializables.smartRead(s,_mappers);
  for (; ; ) {
    final String zslang=(String)s.readObject();
    if (zslang == null)     break;
    ((SerializableAware)getInterpreter(zslang)).read(s);
  }
  didDeserialize(attrs.values());
  didDeserialize(lns);
  didDeserialize(_resolvers);
  didDeserialize(_mappers);
  if (_listeners != null)   for (  List<EventListener<? extends Event>> ls : _listeners.values())   didDeserialize(ls);
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  init();
  final String langnm=(String)s.readObject();
  if (langnm != null)   _langdef=LanguageDefinition.lookup(langnm);
  _ownerUuid=(String)s.readObject();
  final Map<String,Object> attrs=_attrs.getAttributes();
  Serializables.smartRead(s,attrs);
  final List<ScopeListener> lns=_attrs.getListeners();
  Serializables.smartRead(s,lns);
  for (; ; ) {
    final String evtnm=(String)s.readObject();
    if (evtnm == null)     break;
    if (_listeners == null)     _listeners=new HashMap<String,List<EventListener<? extends Event>>>();
    final List<EventListener<? extends Event>> ls=Serializables.smartRead(s,(List<EventListener<? extends Event>>)null);
    _listeners.put(evtnm,ls);
  }
  _resolvers=Serializables.smartRead(s,_resolvers);
  _mappers=Serializables.smartRead(s,_mappers);
  for (; ; ) {
    final String zslang=(String)s.readObject();
    if (zslang == null)     break;
    ((SerializableAware)getInterpreter(zslang)).read(s);
  }
  didDeserialize(attrs.values());
  didDeserialize(lns);
  didDeserialize(_resolvers);
  didDeserialize(_mappers);
  if (_listeners != null)   for (  List<EventListener<? extends Event>> ls : _listeners.values())   didDeserialize(ls);
}
Program: 16287
Project: 16287
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  final boolean old=disableExpunge(true);
  try {
    s.defaultReadObject();
  }
  finally {
    disableExpunge(old);
  }
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  final boolean old=disableExpunge(true);
  try {
    s.defaultReadObject();
  }
  finally {
    disableExpunge(old);
  }
}
Program: 16288
Project: 16288
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  for (Iterator it=_children.iterator(); it.hasNext(); )   ((LeafInfo)it.next()).setParentDirectly(this);
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  for (Iterator it=_children.iterator(); it.hasNext(); )   ((LeafInfo)it.next()).setParentDirectly(this);
}
Program: 16289
Project: 16289
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  int cnt=s.readInt();
  while (--cnt >= 0)   add((ComponentDefinition)s.readObject());
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  int cnt=s.readInt();
  while (--cnt >= 0)   add((ComponentDefinition)s.readObject());
}
Program: 16290
Project: 16290
Buggy source:
private synchronized 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);
    _compdef=langdef.getComponentDefinition((String)s.readObject());
  }
 else {
    _compdef=(ComponentDefinition)v;
  }
}
Program: 16291
Project: 16291
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  final String langnm=(String)s.readObject();
  if (langnm != null)   _langdef=LanguageDefinition.lookup(langnm);
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  final String langnm=(String)s.readObject();
  if (langnm != null)   _langdef=LanguageDefinition.lookup(langnm);
}
Program: 16292
Project: 16292
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _expfcls=cast((Class)s.readObject());
  _mapper=(FunctionMapper)s.readObject();
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _expfcls=cast((Class)s.readObject());
  _mapper=(FunctionMapper)s.readObject();
}
Program: 16293
Project: 16293
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  final String langnm=(String)s.readObject();
  if (langnm != null)   _langdef=LanguageDefinition.lookup(langnm);
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  final String langnm=(String)s.readObject();
  if (langnm != null)   _langdef=LanguageDefinition.lookup(langnm);
}
Program: 16294
Project: 16294
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _coercedVal=Objects.UNKNOWN;
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  _coercedVal=Objects.UNKNOWN;
}
Program: 16295
Project: 16295
Buggy source:
private Component getVarRootComponent(BindingNode node){
  final BindingNode varRootNode=node.getRootNode(_pathTree);
  Object bean=null;
  for (final Iterator it=varRootNode.getSameNodes().iterator(); it.hasNext(); ) {
    Object obj=it.next();
    if (!(obj instanceof BindingNode)) {
      bean=obj;
      break;
    }
  }
  Component comp=null;
  for (final Iterator itx=varRootNode.getBindings().iterator(); itx.hasNext(); ) {
    Binding binding=(Binding)itx.next();
    if ("String_Node_Str".equals(binding.getAttr())) {
      comp=binding.getComponent();
      break;
    }
  }
  return getCollectionItem(comp,bean,true);
}

Fixed version (ground truth):
private Component getVarRootComponent(BindingNode node){
  final BindingNode varRootNode=node.getRootNode(_pathTree);
  Object bean=null;
  for (final Iterator it=varRootNode.getSameNodes().iterator(); it.hasNext(); ) {
    Object obj=it.next();
    if (!(obj instanceof BindingNode)) {
      bean=obj;
      break;
    }
  }
  Component comp=null;
  for (final Iterator itx=varRootNode.getBindings().iterator(); itx.hasNext(); ) {
    Binding binding=(Binding)itx.next();
    if ("String_Node_Str".equals(binding.getAttr())) {
      comp=binding.getComponent();
      break;
    }
  }
  return comp == null ? null : getCollectionItem(comp,bean,true);
}
Program: 16296
Project: 16296
Buggy source:
public boolean equals(Object other){
  final Dual o=(Dual)other;
  return o._comp == _comp && o._binding == _binding;
}

Fixed version (ground truth):
public boolean equals(Object other){
  if (this == other)   return true;
  if (other instanceof Dual) {
    final Dual o=(Dual)other;
    return o._comp == _comp && o._binding == _binding;
  }
  return false;
}
Program: 16297
Project: 16297
Buggy source:
private synchronized void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
  s.defaultReadObject();
  _variableResolvers=new ArrayList<VariableResolver>();
  int size=s.readInt();
  for (int i=0; i < size; i++) {
    Object o=s.readObject();
    if (o instanceof String) {
      _variableResolvers.add(new DefaultDelegatingVariableResolver());
    }
 else     _variableResolvers.add((VariableResolver)o);
  }
}

Fixed version (ground truth):
private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
  s.defaultReadObject();
  _variableResolvers=new ArrayList<VariableResolver>();
  int size=s.readInt();
  for (int i=0; i < size; i++) {
    Object o=s.readObject();
    if (o instanceof String) {
      _variableResolvers.add(new DefaultDelegatingVariableResolver());
    }
 else     _variableResolvers.add((VariableResolver)o);
  }
}
Program: 16298
Project: 16298
Buggy source:
public void setCharacterEncoding(String enc) throws java.io.UnsupportedEncodingException {
  byte buffer[]=new byte[1];
  buffer[0]=(byte)'a';
  String dummy=new String(buffer,enc);
  _enc=enc;
}

Fixed version (ground truth):
public void setCharacterEncoding(String enc) throws java.io.UnsupportedEncodingException {
  byte buffer[]=new byte[1];
  buffer[0]=(byte)'a';
  new String(buffer,enc);
  _enc=enc;
}
Program: 16299
Project: 16299
Buggy source:
public final String getContentType(){
  return _ctype;
}

Fixed version (ground truth):
public final String getContentType(){
  if (_ctype == null) {
    _ctype=getContentType(getFormat());
  }
  return _ctype;
}
Program: 16300
Project: 16300
Buggy source:
public final String getFormat(){
  return _format;
}

Fixed version (ground truth):
public final String getFormat(){
  if (_format == null) {
    try {
      _format=getFormat0();
    }
 catch (    IOException ex) {
      throw new SystemException("String_Node_Str",ex);
    }
  }
  return _format;
}
Program: 16301
Project: 16301
Buggy source:
public boolean equals(Object o){
  if (!(o instanceof JavaScript))   return false;
  final JavaScript js=(JavaScript)o;
  return Objects.equals(js._src,_src) && Objects.equals(js._charset,_charset) && Objects.equals(js._content,_content);
}

Fixed version (ground truth):
public boolean equals(Object o){
  if (this == o)   return true;
  if (!(o instanceof JavaScript))   return false;
  final JavaScript js=(JavaScript)o;
  return Objects.equals(js._src,_src) && Objects.equals(js._charset,_charset) && Objects.equals(js._content,_content);
}
Program: 16302
Project: 16302
Buggy source:
public boolean equals(Object o){
  if (!(o instanceof StyleSheet))   return false;
  final StyleSheet ss=(StyleSheet)o;
  return Objects.equals(ss._href,_href) && Objects.equals(ss._type,_type) && Objects.equals(ss._content,_content)&& Objects.equals(ss._media,_media);
}

Fixed version (ground truth):
public boolean equals(Object o){
  if (this == o)   return true;
  if (!(o instanceof StyleSheet))   return false;
  final StyleSheet ss=(StyleSheet)o;
  return Objects.equals(ss._href,_href) && Objects.equals(ss._type,_type) && Objects.equals(ss._content,_content)&& Objects.equals(ss._media,_media);
}
Program: 16303
Project: 16303
Buggy source:
public final Attr setAttributeNodeNS(Attr newAttr){
  Attribute attr=(Attribute)newAttr;
  int j=getAttributeIndex(0,attr.getNamespace().getURI(),attr.getLocalName(),0);
  if (j >= 0) {
    return (Attr)getAttributeItems().set(j,(Attribute)newAttr);
  }
 else {
    getAttributeItems().add((Attribute)newAttr);
    return null;
  }
}

Fixed version (ground truth):
public final Attr setAttributeNodeNS(Attr newAttr){
  Attribute attr=(Attribute)newAttr;
  int j=getAttributeIndex(0,attr.getNamespace().getURI(),attr.getLocalName(),0);
  if (j >= 0) {
    return getAttributeItems().set(j,(Attribute)newAttr);
  }
 else {
    getAttributeItems().add((Attribute)newAttr);
    return null;
  }
}
Program: 16304
Project: 16304
Buggy source:
public final Attribute getAttributeItem(String tname){
  int j=getAttributeIndex(0,tname);
  return j >= 0 ? (Attribute)_attrs.get(j) : null;
}

Fixed version (ground truth):
public final Attribute getAttributeItem(String tname){
  int j=getAttributeIndex(0,tname);
  return j >= 0 ? _attrs.get(j) : null;
}
Program: 16305
Project: 16305
Buggy source:
private void checkAdd(Attribute newItem,Attribute other,boolean replace){
  if (newItem.getOwner() != null)   throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,"String_Node_Str" + newItem.toString() + "String_Node_Str",getLocator());
  int j=getAttributeIndex(0,newItem.getTagName());
  if (j >= 0 && (!replace || get(j) != other))   throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,"String_Node_Str" + newItem.getTagName() + "String_Node_Str"+ j+ ')',getLocator());
  try {
    if (replace)     onRemove(other);
    newItem.setOwner(Element.this);
  }
 catch (  RuntimeException ex) {
    if (replace) {
      Attribute attrRep=(Attribute)other;
      if (attrRep.getOwner() == null)       attrRep.setOwner(Element.this);
    }
    throw ex;
  }
}

Fixed version (ground truth):
private void checkAdd(Attribute newItem,Attribute other,boolean replace){
  if (newItem.getOwner() != null)   throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,"String_Node_Str" + newItem.toString() + "String_Node_Str",getLocator());
  int j=getAttributeIndex(0,newItem.getTagName());
  if (j >= 0 && (!replace || get(j) != other))   throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,"String_Node_Str" + newItem.getTagName() + "String_Node_Str"+ j+ ')',getLocator());
  try {
    if (replace)     onRemove(other);
    newItem.setOwner(Element.this);
  }
 catch (  RuntimeException ex) {
    if (replace) {
      Attribute attrRep=other;
      if (attrRep.getOwner() == null)       attrRep.setOwner(Element.this);
    }
    throw ex;
  }
}
Program: 16306
Project: 16306
Buggy source:
public final Attr removeAttributeNode(Attr oldAttr){
  Attribute attr=(Attribute)oldAttr;
  int j=getAttributeIndex(0,attr.getTagName());
  if (j >= 0) {
    return (Attr)_attrs.remove(j);
  }
 else {
    throw new DOMException(DOMException.NOT_FOUND_ERR,getLocator());
  }
}

Fixed version (ground truth):
public final Attr removeAttributeNode(Attr oldAttr){
  Attribute attr=(Attribute)oldAttr;
  int j=getAttributeIndex(0,attr.getTagName());
  if (j >= 0) {
    return _attrs.remove(j);
  }
 else {
    throw new DOMException(DOMException.NOT_FOUND_ERR,getLocator());
  }
}
Program: 16307
Project: 16307
Buggy source:
/** 
 * Get the element with name. If you have many values associalted with the same key, it returned the head for you.
 */
public final Element get(String name){
  final List<Element> vals=_map.get(name);
  return vals != null && !vals.isEmpty() ? (Element)vals.get(0) : null;
}

Fixed version (ground truth):
/** 
 * Get the element with name. If you have many values associalted with the same key, it returned the head for you.
 */
public final Element get(String name){
  final List<Element> vals=_map.get(name);
  return vals != null && !vals.isEmpty() ? vals.get(0) : null;
}
Program: 16308
Project: 16308
Buggy source:
private void checkAdd(Item newVal,Item other,boolean replace){
  if (!(newVal instanceof Element) && !(newVal instanceof Text) && !(newVal instanceof CData)&& !(newVal instanceof Comment)&& !(newVal instanceof EntityReference)&& !(newVal instanceof Binary)&& !(newVal instanceof ProcessingInstruction))   throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,"String_Node_Str",getLocator());
  final Item newItem=(Item)newVal;
  if (newItem.getParent() != null) {
    throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,"String_Node_Str" + newItem.toString() + "String_Node_Str"+ newItem.getParent()+ "String_Node_Str"+ newItem.getLocator()+ "String_Node_Str",getLocator());
  }
  if (newItem instanceof Group)   for (Item p=AbstractGroup.this; p != null; p=p.getParent())   if (p == newItem)   throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,"String_Node_Str",getLocator());
  if (newItem instanceof Element) {
    Element eOther;
    if ((other != null) && !(other instanceof Element)) {
      eOther=null;
      boolean bFirstElemFind=false;
      for (Iterator it=this.iterator(); it.hasNext(); ) {
        Object node=it.next();
        if (bFirstElemFind) {
          if (node instanceof Element) {
            eOther=(Element)node;
            break;
          }
        }
 else         if (node == other) {
          bFirstElemFind=true;
        }
      }
    }
 else {
      eOther=(Element)other;
    }
    _elemMap.put((Element)newItem,eOther);
  }
  if (replace)   onRemove(other);
  newItem.setParent(AbstractGroup.this);
}

Fixed version (ground truth):
private void checkAdd(Item newVal,Item other,boolean replace){
  if (!(newVal instanceof Element) && !(newVal instanceof Text) && !(newVal instanceof CData)&& !(newVal instanceof Comment)&& !(newVal instanceof EntityReference)&& !(newVal instanceof Binary)&& !(newVal instanceof ProcessingInstruction))   throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,"String_Node_Str",getLocator());
  final Item newItem=newVal;
  if (newItem.getParent() != null) {
    throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,"String_Node_Str" + newItem.toString() + "String_Node_Str"+ newItem.getParent()+ "String_Node_Str"+ newItem.getLocator()+ "String_Node_Str",getLocator());
  }
  if (newItem instanceof Group)   for (Item p=AbstractGroup.this; p != null; p=p.getParent())   if (p == newItem)   throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,"String_Node_Str",getLocator());
  if (newItem instanceof Element) {
    Element eOther;
    if ((other != null) && !(other instanceof Element)) {
      eOther=null;
      boolean bFirstElemFind=false;
      for (Iterator it=this.iterator(); it.hasNext(); ) {
        Object node=it.next();
        if (bFirstElemFind) {
          if (node instanceof Element) {
            eOther=(Element)node;
            break;
          }
        }
 else         if (node == other) {
          bFirstElemFind=true;
        }
      }
    }
 else {
      eOther=(Element)other;
    }
    _elemMap.put((Element)newItem,eOther);
  }
  if (replace)   onRemove(other);
  newItem.setParent(AbstractGroup.this);
}
Program: 16309
Project: 16309
Buggy source:
protected void onRemove(Item item){
  final Item removeItem=(Item)item;
  removeItem.setParent(null);
  if (removeItem instanceof Element)   _elemMap.remove((Element)removeItem);
}

Fixed version (ground truth):
protected void onRemove(Item item){
  final Item removeItem=item;
  removeItem.setParent(null);
  if (removeItem instanceof Element)   _elemMap.remove((Element)removeItem);
}
Program: 16310
Project: 16310
Buggy source:
public byte[] encode(RenderedImage image) throws java.io.IOException {
  ByteArrayOutputStream os=new ByteArrayOutputStream();
  ImageWriter iw=(ImageWriter)ImageIO.getImageWritersByFormatName("String_Node_Str").next();
  ImageWriteParam iwp=iw.getDefaultWriteParam();
  iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
  iwp.setCompressionQuality(_quality);
  ImageOutputStream ios=ImageIO.createImageOutputStream(os);
  iw.setOutput(ios);
  iw.write(null,new IIOImage(image,null,null),iwp);
  ios.flush();
  iw.dispose();
  ios.close();
  return os.toByteArray();
}

Fixed version (ground truth):
public byte[] encode(RenderedImage image) throws java.io.IOException {
  ByteArrayOutputStream os=new ByteArrayOutputStream();
  ImageWriter iw=ImageIO.getImageWritersByFormatName("String_Node_Str").next();
  ImageWriteParam iwp=iw.getDefaultWriteParam();
  iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
  iwp.setCompressionQuality(_quality);
  ImageOutputStream ios=ImageIO.createImageOutputStream(os);
  iw.setOutput(ios);
  iw.write(null,new IIOImage(image,null,null),iwp);
  ios.flush();
  iw.dispose();
  ios.close();
  return os.toByteArray();
}
Program: 16311
Project: 16311
Buggy source:
public boolean equals(Object o){
  return o instanceof JavaScriptValue && _js.equals(((JavaScriptValue)o)._js);
}

Fixed version (ground truth):
public boolean equals(Object o){
  if (this == o)   return true;
  return o instanceof JavaScriptValue && _js.equals(((JavaScriptValue)o)._js);
}
Program: 16312
Project: 16312
Buggy source:
@Override public boolean hasPropertyLoadBinding(Component comp,String attr){
  checkInit();
  final BindingKey bkey=getBindingKey(comp,attr);
  return _propertyBindingHandler.hasLoadBinding(bkey);
}

Fixed version (ground truth):
@Override public boolean hasPropertyLoadBinding(Component comp,String attr){
  checkInit();
  Map<String,List<Binding>> map=_bindings.get(comp);
  if (map == null)   return false;
  List<Binding> list=map.get(attr);
  if (list == null)   return false;
  for (  Binding binding : list) {
    if (binding instanceof LoadPropertyBinding)     return true;
  }
  return false;
}
Program: 16313
Project: 16313
Buggy source:
public BinderImpl(String qname,String qscope){
  _bindings=new HashMap<Component,Map<String,List<Binding>>>();
  _formBindingHandler=new FormBindingHandler(this);
  _propertyBindingHandler=new PropertyBindingHandler(this);
  _childrenBindingHandler=new ChildrenBindingHandler(this);
  _assocFormSaveBindings=new HashMap<Component,Set<SaveBinding>>();
  _reversedAssocFormSaveBindings=new HashMap<Component,Map<SaveBinding,Set<SaveBinding>>>();
  _hasValidators=new HashSet<BindingKey>();
  _templateResolvers=new HashMap<Component,Map<String,TemplateResolver>>();
  _listenerMap=new HashMap<BindingKey,CommandEventListener>();
  _quename=qname != null && !Strings.isEmpty(qname) ? qname : BinderImpl.QUE;
  _quescope=qscope != null && !Strings.isBlank(qscope) ? qscope : EventQueues.DESKTOP;
  _queueListener=new EventListener<Event>(){
    public void onEvent(    Event event) throws Exception {
      if (event instanceof PropertyChangeEvent) {
        final PropertyChangeEvent evt=(PropertyChangeEvent)event;
        BinderImpl.this.loadOnPropertyChange(evt.getBase(),evt.getPropertyName());
      }
    }
  }
;
}

Fixed version (ground truth):
public BinderImpl(String qname,String qscope){
  _bindings=new HashMap<Component,Map<String,List<Binding>>>();
  _formBindingHandler=new FormBindingHandler(this);
  _propertyBindingHandler=new PropertyBindingHandler(this);
  _childrenBindingHandler=new ChildrenBindingHandler(this);
  _assocFormSaveBindings=new HashMap<Component,Set<SaveBinding>>();
  _reversedAssocFormSaveBindings=new HashMap<Component,Map<SaveBinding,Set<SaveBinding>>>();
  _hasValidators=new HashSet<BindingKey>();
  _templateResolvers=new HashMap<Component,Map<String,TemplateResolver>>();
  _listenerMap=new HashMap<BindingKey,CommandEventListener>();
  _quename=qname != null && !Strings.isEmpty(qname) ? qname : BinderImpl.QUE;
  _quescope=qscope != null && !Strings.isBlank(qscope) ? qscope : EventQueues.DESKTOP;
  _queueListener=new QueueListener();
}
Program: 16314
Project: 16314
Buggy source:
void removeBindings(Collection<Binding> removes){
  _loadAfterBindings.values().removeAll(removes);
  _loadBeforeBindings.values().removeAll(removes);
}

Fixed version (ground truth):
void removeBindings(Collection<Binding> removes){
  for (  List<LoadChildrenBinding> bindings : _loadAfterBindings.values()) {
    bindings.removeAll(removes);
  }
  for (  List<LoadChildrenBinding> bindings : _loadBeforeBindings.values()) {
    bindings.removeAll(removes);
  }
}
Program: 16315
Project: 16315
Buggy source:
void removeBindings(Collection<Binding> bindings){
  _loadFormAfterBindings.values().removeAll(bindings);
  _saveFormAfterBindings.values().removeAll(bindings);
  _loadFormBeforeBindings.values().removeAll(bindings);
  _saveFormBeforeBindings.values().removeAll(bindings);
}

Fixed version (ground truth):
void removeBindings(Collection<Binding> removes){
  for (  List<LoadFormBinding> bindings : _loadFormAfterBindings.values()) {
    bindings.removeAll(removes);
  }
  for (  List<SaveFormBinding> bindings : _saveFormAfterBindings.values()) {
    bindings.removeAll(removes);
  }
  for (  List<LoadFormBinding> bindings : _loadFormBeforeBindings.values()) {
    bindings.removeAll(removes);
  }
  for (  List<SaveFormBinding> bindings : _saveFormBeforeBindings.values()) {
    bindings.removeAll(removes);
  }
}
Program: 16316
Project: 16316
Buggy source:
public FormImpl(){
  _fields=new LinkedHashMap<String,Object>(INIT_CAPACITY);
  _initFields=new HashMap<String,Object>(INIT_CAPACITY);
  _saveFieldNames=new LinkedHashSet<String>(INIT_CAPACITY);
  _loadFieldNames=new LinkedHashSet<String>(INIT_CAPACITY);
  _dirtyFieldNames=new HashSet<String>(INIT_CAPACITY);
  _status=new FormStatus(){
    @Override public boolean isDirty(){
      return FormImpl.this.isDirty();
    }
  }
;
}

Fixed version (ground truth):
public FormImpl(){
  _fields=new LinkedHashMap<String,Object>(INIT_CAPACITY);
  _initFields=new HashMap<String,Object>(INIT_CAPACITY);
  _saveFieldNames=new LinkedHashSet<String>(INIT_CAPACITY);
  _loadFieldNames=new LinkedHashSet<String>(INIT_CAPACITY);
  _dirtyFieldNames=new HashSet<String>(INIT_CAPACITY);
  _status=new FormStatusImpl();
}
Program: 16317
Project: 16317
Buggy source:
public void setComponent(Component comp){
  _component=comp;
  _paramResolvers.put(ScopeParam.class,new ParamResolver<Annotation>(){
    @Override public Object resolveParameter(    Annotation anno,    Class<?> returnType){
      final String name=((ScopeParam)anno).value();
      final Scope[] ss=((ScopeParam)anno).scopes();
      for (      Scope s : ss) {
switch (s) {
case AUTO:
          if (ss.length == 1) {
            return _component.getAttribute(name,true);
          }
        throw new UiException("String_Node_Str" + s + "String_Node_Str"+ ss);
    }
  }
  Object val=null;
  for (  Scope scope : ss) {
    final String scopeName=scope.getName();
    Object scopeObj=Components.getImplicit(_component,scopeName);
    if (scopeObj instanceof Map) {
      val=((Map<?,?>)scopeObj).get(name);
      if (val != null)       break;
    }
 else     if (scopeObj != null) {
      _log.error("String_Node_Str" + scopeName + "String_Node_Str"+ scopeObj);
    }
  }
  return val == null ? null : Classes.coerce(returnType,val);
}
}
);
_paramResolvers.put(SelectorParam.class,new ParamResolver<Annotation>(){
@Override public Object resolveParameter(Annotation anno,Class<?> returnType){
  final String selector=((SelectorParam)anno).value();
  final List<Component> result=Selectors.find(_root,selector);
  Object val;
  if (!Collection.class.isAssignableFrom(returnType)) {
    val=result.size() > 0 ? Classes.coerce(returnType,result.get(0)) : null;
  }
 else {
    val=Classes.coerce(returnType,result);
  }
  return val;
}
}
);
}

Fixed version (ground truth):
public void setComponent(Component comp){
  _component=comp;
  _paramResolvers.put(ScopeParam.class,new ParamResolver<Annotation>(){
    @Override public Object resolveParameter(    Annotation anno,    Class<?> returnType){
      final String name=((ScopeParam)anno).value();
      final Scope[] ss=((ScopeParam)anno).scopes();
      for (      Scope s : ss) {
switch (s) {
case AUTO:
          if (ss.length == 1) {
            return _component.getAttribute(name,true);
          }
        throw new UiException("String_Node_Str" + s + "String_Node_Str"+ Arrays.toString(ss));
    }
  }
  Object val=null;
  for (  Scope scope : ss) {
    final String scopeName=scope.getName();
    Object scopeObj=Components.getImplicit(_component,scopeName);
    if (scopeObj instanceof Map) {
      val=((Map<?,?>)scopeObj).get(name);
      if (val != null)       break;
    }
 else     if (scopeObj != null) {
      _log.error("String_Node_Str" + scopeName + "String_Node_Str"+ scopeObj);
    }
  }
  return val == null ? null : Classes.coerce(returnType,val);
}
}
);
_paramResolvers.put(SelectorParam.class,new ParamResolver<Annotation>(){
@Override public Object resolveParameter(Annotation anno,Class<?> returnType){
  final String selector=((SelectorParam)anno).value();
  final List<Component> result=Selectors.find(_root,selector);
  Object val;
  if (!Collection.class.isAssignableFrom(returnType)) {
    val=result.size() > 0 ? Classes.coerce(returnType,result.get(0)) : null;
  }
 else {
    val=Classes.coerce(returnType,result);
  }
  return val;
}
}
);
}
Program: 16318
Project: 16318
Buggy source:
void removeBindings(Collection<Binding> removes){
  _loadAfterBindings.values().removeAll(removes);
  _saveAfterBindings.values().removeAll(removes);
  _loadBeforeBindings.values().removeAll(removes);
  _saveBeforeBindings.values().removeAll(removes);
}

Fixed version (ground truth):
void removeBindings(Collection<Binding> removes){
  for (  List<LoadPropertyBinding> bindings : _loadAfterBindings.values()) {
    bindings.removeAll(removes);
  }
  for (  List<SavePropertyBinding> bindings : _saveAfterBindings.values()) {
    bindings.removeAll(removes);
  }
  for (  List<LoadPropertyBinding> bindings : _loadBeforeBindings.values()) {
    bindings.removeAll(removes);
  }
  for (  List<SavePropertyBinding> bindings : _saveBeforeBindings.values()) {
    bindings.removeAll(removes);
  }
}
Program: 16319
Project: 16319
Buggy source:
private boolean validateSaveFormBinding(Component comp,SaveFormBinding binding,String command,Map<String,Property[]> validates,boolean valid,Set<Property> notifys){
  Set<SaveBinding> savebindings=((BinderCtrl)binding.getBinder()).getFormAssociatedSaveBindings(binding.getComponent());
  boolean svalid=true;
  for (  SaveBinding sbinding : savebindings) {
    if (sbinding instanceof SavePropertyBinding) {
      svalid&=validateSavePropertyBinding(comp,((SavePropertyBinding)sbinding),command,validates,svalid & valid,notifys);
    }
 else {
    }
  }
  if (!binding.hasValidator())   return svalid;
  if (((BinderImpl)binding.getBinder()).hasValidator(binding.getComponent(),binding.getFormId())) {
    clearValidationMessage(binding.getBinder(),binding.getComponent(),binding.getFormId());
  }
  final BindContext ctx=BindContextUtil.newBindContext(_binder,binding,true,command,binding.getComponent(),null);
  BindContextUtil.setValidatorArgs(binding.getBinder(),binding.getComponent(),ctx,binding);
  Property p=_mainPropertyCache.get(binding);
  ValidationContextImpl vContext=new ValidationContextImpl(command,p,validates,ctx,svalid & valid);
  binding.validate(vContext);
  final Set<Property> xnotifys=getNotifys(ctx);
  if (xnotifys != null) {
    notifys.addAll(xnotifys);
  }
  return svalid & vContext.isValid();
}

Fixed version (ground truth):
private boolean validateSaveFormBinding(Component comp,SaveFormBinding binding,String command,Map<String,Property[]> validates,boolean valid,Set<Property> notifys){
  Set<SaveBinding> savebindings=((BinderCtrl)binding.getBinder()).getFormAssociatedSaveBindings(binding.getComponent());
  boolean svalid=true;
  for (  SaveBinding sbinding : savebindings) {
    if (sbinding instanceof SavePropertyBinding) {
      svalid&=validateSavePropertyBinding(comp,((SavePropertyBinding)sbinding),command,validates,svalid & valid,notifys);
    }
 else {
    }
  }
  if (!binding.hasValidator())   return svalid;
  if (((BinderImpl)binding.getBinder()).hasValidator(binding.getComponent(),binding.getFormId())) {
    clearValidationMessage(binding.getBinder(),binding.getComponent(),binding.getFormId());
  }
  final BindContext ctx=BindContextUtil.newBindContext(_binder,binding,true,command,binding.getComponent(),null);
  BindContextUtil.setValidatorArgs(binding.getBinder(),binding.getComponent(),ctx,binding);
  Property p=_mainPropertyCache.get(binding);
  ValidationContextImpl vContext=new ValidationContextImpl(command,p,validates,ctx,svalid & valid);
  binding.validate(vContext);
  final Set<Property> xnotifys=getNotifys(ctx);
  if (xnotifys != null) {
    notifys.addAll(xnotifys);
  }
  return svalid && vContext.isValid();
}
Program: 16320
Project: 16320
Buggy source:
private List<Method> getInitMethods(Class<?> clz){
  List<Method> inits=_initMethodCache.get(clz);
  if (inits != null)   return inits;
synchronized (_initMethodCache) {
    inits=_initMethodCache.get(clz);
    if (inits != null)     return inits;
    inits=new ArrayList<Method>();
    Class<?> curr=clz;
    while (curr != null && !curr.equals(Object.class)) {
      Method currm=null;
      Init init=null;
      for (      Method m : curr.getDeclaredMethods()) {
        final Init i=m.getAnnotation(Init.class);
        if (i == null)         continue;
        if (currm != null) {
          throw new UiException("String_Node_Str" + curr + "String_Node_Str"+ currm+ "String_Node_Str"+ m);
        }
        init=i;
        currm=m;
      }
      if (currm != null) {
        inits.add(0,currm);
      }
      curr=(init != null && init.upward()) ? curr.getSuperclass() : null;
    }
    inits=Collections.unmodifiableList(inits);
    _initMethodCache.put(clz,inits);
  }
  return inits;
}

Fixed version (ground truth):
private List<Method> getInitMethods(Class<?> clz){
  List<Method> inits=null;
synchronized (_initMethodCache) {
    inits=_initMethodCache.get(clz);
    if (inits != null)     return inits;
    inits=new ArrayList<Method>();
    Class<?> curr=clz;
    while (curr != null && !curr.equals(Object.class)) {
      Method currm=null;
      Init init=null;
      for (      Method m : curr.getDeclaredMethods()) {
        final Init i=m.getAnnotation(Init.class);
        if (i == null)         continue;
        if (currm != null) {
          throw new UiException("String_Node_Str" + curr + "String_Node_Str"+ currm+ "String_Node_Str"+ m);
        }
        init=i;
        currm=m;
      }
      if (currm != null) {
        inits.add(0,currm);
      }
      curr=(init != null && init.upward()) ? curr.getSuperclass() : null;
    }
    inits=Collections.unmodifiableList(inits);
    _initMethodCache.put(clz,inits);
  }
  return inits;
}
Program: 16324
Project: 16324
Buggy source:
public ExpressionX parseExpressionX(BindContext ctx,String expression,Class<?> expectedType) throws XelException {
  return (ExpressionX)getExpressionFactory().parseExpression(newXelContext(ctx,null),"String_Node_Str" + expression + "String_Node_Str",expectedType);
}

Fixed version (ground truth):
public ExpressionX parseExpressionX(BindContext ctx,String expression,Class<?> expectedType) throws XelException {
  Component comp=null;
  if (ctx != null) {
    comp=ctx.getComponent();
    if (comp == null) {
      final Binding binding=ctx.getBinding();
      if (binding != null) {
        comp=binding.getComponent();
      }
    }
  }
  return (ExpressionX)getExpressionFactory().parseExpression(newXelContext(ctx,comp),"String_Node_Str" + expression + "String_Node_Str",expectedType);
}
Program: 16329
Project: 16329
Buggy source:
public Object coerceToBean(Object val,Component comp,BindContext ctx){
  if (val != null) {
    final Combobox lbx=(Combobox)comp;
    final ListModel<?> model=lbx.getModel();
    final String varnm=(String)((Comboitem)val).getAttribute(BinderImpl.VAR);
    if (varnm != null) {
      return ((Comboitem)val).getAttribute(varnm);
    }
 else     if (model != null) {
      return model.getElementAt(((Comboitem)val).getIndex());
    }
 else {
      return ((Comboitem)val).getValue();
    }
  }
  return null;
}

Fixed version (ground truth):
public Object coerceToBean(Object val,Component comp,BindContext ctx){
  if (val != null) {
    final Combobox lbx=(Combobox)comp;
    final ListModel<?> model=lbx.getModel();
    if (model != null) {
      return model.getElementAt(((Comboitem)val).getIndex());
    }
 else {
      return ((Comboitem)val).getValue();
    }
  }
  return null;
}