nus-yam/ex-repair huggingface dataset:
Program: 80610
Project: 80610
Buggy source:
public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    sb.append(' ').append(evalFieldType(mf));
    if (mf.isName() && en.getPkType() != PkType.NAME) {
      sb.append("String_Node_Str");
    }
 else {
      if (mf.isNotNull() || mf.isPk())       sb.append("String_Node_Str");
      if (mf.hasDefaultValue())       sb.append("String_Node_Str").append(mf.getDefaultValue(null)).append('\'');
      if (mf.isAutoIncreasement())       sb.append("String_Node_Str");
      if (mf.isPk() && en.getPks().size() == 1) {
        sb.append("String_Node_Str");
      }
    }
    sb.append(',');
  }
  sb.setCharAt(sb.length() - 1,')');
  dao.execute(Sqls.create(sb.toString()));
  if (en.getPks().size() > 1) {
    sb=new StringBuilder();
    sb.append("String_Node_Str").append(en.getTableName()).append("String_Node_Str");
    for (    MappingField mf : en.getPks()) {
      sb.append(mf.getName()).append("String_Node_Str");
    }
    sb.setCharAt(sb.length() - 1,')');
    dao.execute(Sqls.create(sb.toString()));
  }
  createRelation(dao,en);
  return true;
}

Fixed version (ground truth):
public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    sb.append(' ').append(evalFieldType(mf));
    if (mf.isName() && en.getPkType() != PkType.NAME) {
      sb.append("String_Node_Str");
    }
 else {
      if (mf.isNotNull() || mf.isPk())       sb.append("String_Node_Str");
      if (mf.hasDefaultValue())       sb.append("String_Node_Str").append(mf.getDefaultValue(null)).append('\'');
      if (mf.isAutoIncreasement())       sb.append("String_Node_Str");
      if (mf.isPk() && en.getPks().size() == 1) {
        sb.append("String_Node_Str");
      }
    }
    sb.append(',');
  }
  sb.setCharAt(sb.length() - 1,')');
  dao.execute(Sqls.create(sb.toString()));
  if (en.getPks().size() > 1) {
    sb=new StringBuilder();
    sb.append("String_Node_Str").append(en.getTableName()).append("String_Node_Str");
    for (    MappingField mf : en.getPks()) {
      sb.append("String_Node_Str").append(mf.getColumnName());
    }
    sb.append("String_Node_Str");
    for (    MappingField mf : en.getPks()) {
      sb.append(mf.getColumnName()).append("String_Node_Str");
    }
    sb.setCharAt(sb.length() - 1,')');
    dao.execute(Sqls.create(sb.toString()));
  }
  createRelation(dao,en);
  return true;
}
Program: 80611
Project: 80611
Buggy source:
@Test public void test_var_in_prev(){
  dao.create(Pet2.class,true);
  if (pojos.dao().meta().isOracle() || pojos.dao().meta().isHsql())   return;
  pojos.initPet();
  Pet2 pet=new Pet2();
  pet.setName("String_Node_Str").setAge(10);
  dao.insert(pet);
  assertEquals("String_Node_Str",pet.getNickName());
}

Fixed version (ground truth):
@Test public void test_var_in_prev(){
  dao.create(Pet2.class,true);
  if (dao.meta().isOracle() || dao.meta().isHsql() || dao.meta().isDB2())   return;
  pojos.initPet();
  Pet2 pet=new Pet2();
  pet.setName("String_Node_Str").setAge(10);
  dao.insert(pet);
  assertEquals("String_Node_Str",pet.getNickName());
}
Program: 80612
Project: 80612
Buggy source:
@Test public void check_if_support_all_normal_types() throws FailToCastObjectException {
  String d="String_Node_Str";
  String t="String_Node_Str";
  String dt=d + "String_Node_Str" + t;
  Date date=Castors.me().castTo(d,Date.class);
  Time time=Castors.me().castTo(t,Time.class);
  Timestamp ts=Castors.me().castTo(dt,Timestamp.class);
  EntityTypes exp=new EntityTypes();
  exp.name="String_Node_Str";
  exp.enum_s=TT.B;
  exp.enum_i=TT.A;
  exp.char_p='G';
  exp.char_obj='O';
  exp.int_p=23;
  exp.int_obj=23;
  exp.float_p=34.67f;
  exp.float_obj=34.68f;
  exp.short_p=6;
  exp.short_obj=6;
  exp.byte_p=2;
  exp.byte_obj=4;
  exp.long_p=56787;
  exp.long_obj=5678L;
  exp.double_p=2.4325243;
  exp.double_obj=3.4325243;
  exp.sqlDate=date;
  exp.sqlTime=time;
  exp.sqlDT=ts;
  dao.insert(exp);
  EntityTypes et=dao.fetch(EntityTypes.class);
  assertEquals(exp.id,et.id);
  Mirror<EntityTypes> me=Mirror.me(EntityTypes.class);
  for (  Field f : me.getFields()) {
    Object expValue;
    Object ttValue;
    if (f.getName().equals("String_Node_Str") && dao.meta().isMySql()) {
      expValue=me.getValue(exp,f).toString();
      ttValue=me.getValue(et,f).toString();
    }
 else {
      expValue=me.getValue(exp,f);
      ttValue=me.getValue(et,f);
      if (null == expValue)       continue;
    }
    if (!expValue.equals(ttValue))     throw Lang.makeThrow("String_Node_Str",f.getName(),expValue,ttValue);
  }
  assertTrue(true);
}

Fixed version (ground truth):
@Test public void check_if_support_all_normal_types() throws FailToCastObjectException {
  String d="String_Node_Str";
  String t="String_Node_Str";
  String dt=d + "String_Node_Str" + t;
  Date date=Castors.me().castTo(d,Date.class);
  Time time=Castors.me().castTo(t,Time.class);
  Timestamp ts=Castors.me().castTo(dt,Timestamp.class);
  EntityTypes exp=new EntityTypes();
  exp.name="String_Node_Str";
  exp.enum_s=TT.B;
  exp.enum_i=TT.A;
  exp.char_p='G';
  exp.char_obj='O';
  exp.int_p=23;
  exp.int_obj=23;
  exp.float_p=34.67f;
  exp.float_obj=34.68f;
  exp.short_p=6;
  exp.short_obj=6;
  exp.byte_p=2;
  exp.byte_obj=4;
  exp.long_p=56787;
  exp.long_obj=5678L;
  exp.double_p=2.4325243;
  exp.double_obj=3.4325243;
  exp.sqlDate=date;
  exp.sqlTime=time;
  exp.sqlDT=ts;
  dao.insert(exp);
  EntityTypes et=dao.fetch(EntityTypes.class);
  assertEquals(exp.id,et.id);
  Mirror<EntityTypes> me=Mirror.me(EntityTypes.class);
  for (  Field f : me.getFields()) {
    Object expValue;
    Object ttValue;
    if (f.getName().equals("String_Node_Str") && dao.meta().isMySql()) {
      expValue=me.getValue(exp,f).toString();
      ttValue=me.getValue(et,f).toString();
    }
 else {
      expValue=me.getValue(exp,f);
      ttValue=me.getValue(et,f);
      if (null == expValue)       continue;
    }
    if (!expValue.equals(ttValue) && !dao.meta().isDB2())     throw Lang.makeThrow("String_Node_Str",f.getName(),expValue,ttValue);
  }
  assertTrue(true);
}
Program: 80613
Project: 80613
Buggy source:
@Override public Response send() throws HttpException {
  try {
    openConnection();
    Map<String,?> params=request.getParams();
    String data=null;
    if (null != params && params.size() > 0) {
      data=request.getURLEncodedParams();
    }
    setupRequestHeader();
    setupDoInputOutputFlag();
    if (data != null) {
      Writer w=new BufferedWriter(Streams.utf8w(conn.getOutputStream()));
      w.write(data);
      Streams.safeFlush(w);
      Streams.safeClose(w);
    }
    return createResponse(getResponseHeader());
  }
 catch (  Exception e) {
    throw new HttpException(request.getUrl().toString(),e);
  }
}

Fixed version (ground truth):
@Override public Response send() throws HttpException {
  try {
    openConnection();
    setupRequestHeader();
    setupDoInputOutputFlag();
    InputStream ins=request.getInputStream();
    if (null != ins) {
      OutputStream ops=Streams.buff(conn.getOutputStream());
      Streams.write(ops,ins,8192);
      Streams.safeClose(ins);
      Streams.safeFlush(ops);
      Streams.safeClose(ops);
    }
    return createResponse(getResponseHeader());
  }
 catch (  Exception e) {
    throw new HttpException(request.getUrl().toString(),e);
  }
}
Program: 80614
Project: 80614
Buggy source:
/** 
 * 子类应该覆盖这个方法或者evalInjector(Type,Param)方法.
 */
protected ParamInjector evalInjector(Class<?> type,Param param){
  return null;
}

Fixed version (ground truth):
protected ParamInjector evalInjector(Type type,Param param){
  Class<?> clazz=Lang.getTypeClass(type);
  Type[] paramTypes=null;
  if (type instanceof ParameterizedType)   paramTypes=((ParameterizedType)type).getActualTypeArguments();
  if (clazz == null) {
    if (log.isWarnEnabled())     log.warnf("String_Node_Str",type,param);
    return null;
  }
  return evalInjectorBy(clazz,param,paramTypes);
}
Program: 80615
Project: 80615
Buggy source:
public Object getReferObject(ServletContext sc,HttpServletRequest request,HttpServletResponse response,String[] pathArgs){
  try {
    return Json.fromJson(Streams.utf8r(request.getInputStream()));
  }
 catch (  Exception e) {
    throw Lang.wrapThrow(e);
  }
}

Fixed version (ground truth):
public Object getReferObject(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,String[] pathArgs){
  try {
    String str=Streams.readAndClose(Streams.utf8r(req.getInputStream()));
    return Json.fromJson(str);
  }
 catch (  Exception e) {
    throw Lang.wrapThrow(e);
  }
}
Program: 80616
Project: 80616
Buggy source:
public ArrayInjector(String name,Class<?> type){
  super(name,type);
}

Fixed version (ground truth):
public ArrayInjector(String name,Class<?> type,Type[] paramTypes){
  super(name,type,paramTypes);
}
Program: 80617
Project: 80617
Buggy source:
/** 
 * 获得所有的属性，包括私有属性。不包括 Object 的属性
 */
public Field[] getFields(){
  Class<?> cc=klass;
  Map<String,Field> map=new LinkedHashMap<String,Field>();
  while (null != cc && cc != Object.class) {
    Field[] fs=cc.getDeclaredFields();
    for (int i=0; i < fs.length; i++) {
      if (!isIgnoredField(fs[i]) && !map.containsKey(fs[i].getName()))       map.put(fs[i].getName(),fs[i]);
    }
    cc=cc.getSuperclass();
  }
  return map.values().toArray(new Field[map.size()]);
}

Fixed version (ground truth):
/** 
 * 获得所有的属性，包括私有属性。不包括 Object 的属性
 * @return 字段列表
 */
public Field[] getFields(){
  return _getFields(true,false,true,true);
}
Program: 80618
Project: 80618
Buggy source:
public static Set<Class<?>> scanModules(Class<?> mainModule){
  Modules ann=mainModule.getAnnotation(Modules.class);
  boolean scan=null == ann ? false : ann.scanPackage();
  List<Class<?>> list=new LinkedList<Class<?>>();
  list.add(mainModule);
  if (null != ann) {
    for (    Class<?> module : ann.value()) {
      list.add(module);
    }
  }
  Set<Class<?>> modules=new HashSet<Class<?>>();
  for (  Class<?> type : list) {
    if (scan) {
      if (log.isDebugEnabled())       log.debugf("String_Node_Str",type.getPackage().getName());
      List<Class<?>> subs=Scans.me().scanPackage(type);
      for (      Class<?> sub : subs) {
        if (isModule(sub)) {
          if (log.isDebugEnabled())           log.debugf("String_Node_Str",sub.getName());
          modules.add(sub);
        }
 else         if (log.isTraceEnabled()) {
          log.tracef("String_Node_Str",sub.getName());
        }
      }
    }
 else {
      if (isModule(type)) {
        if (log.isDebugEnabled())         log.debugf("String_Node_Str",type.getName());
        modules.add(type);
      }
 else       if (log.isTraceEnabled()) {
        log.tracef("String_Node_Str",type.getName());
      }
    }
  }
  return modules;
}

Fixed version (ground truth):
public static Set<Class<?>> scanModules(Class<?> mainModule){
  Modules ann=mainModule.getAnnotation(Modules.class);
  boolean scan=null == ann ? false : ann.scanPackage();
  List<Class<?>> list=new LinkedList<Class<?>>();
  list.add(mainModule);
  if (null != ann) {
    for (    Class<?> module : ann.value()) {
      list.add(module);
    }
  }
  Set<Class<?>> modules=new HashSet<Class<?>>();
  if (null != ann && ann.packages() != null && ann.packages().length > 0) {
    for (    String packageName : ann.packages())     scanModuleInPackage(modules,packageName);
  }
  for (  Class<?> type : list) {
    if (scan)     scanModuleInPackage(modules,type.getPackage().getName());
 else {
      if (isModule(type)) {
        if (log.isDebugEnabled())         log.debugf("String_Node_Str",type.getName());
        modules.add(type);
      }
 else       if (log.isTraceEnabled()) {
        log.tracef("String_Node_Str",type.getName());
      }
    }
  }
  return modules;
}
Program: 80619
Project: 80619
Buggy source:
public static PItem cndAuto(Entity<?> en,Object obj){
switch (en.getPkType()) {
case ID:
    Number id=null != obj ? ((Number)en.getIdField().getValue(obj)) : null;
  return cndId(en,id);
case NAME:
String name=null != obj ? en.getNameField().getValue(obj).toString() : null;
return cndName(en,name);
case COMPOSITE:
Object[] pks=null;
if (null != obj) {
pks=new Object[en.getCompositePKFields().size()];
int i=0;
for (EntityField ef : en.getCompositePKFields()) pks[i++]=ef.getValue(obj);
}
return cndPk(en,pks);
default :
throw Lang.makeThrow("String_Node_Str",en.getType().getName(),obj);
}
}

Fixed version (ground truth):
public static PItem cndAuto(Entity<?> en,Object obj){
  obj=Lang.first(obj);
switch (en.getPkType()) {
case ID:
    Number id=null != obj ? ((Number)en.getIdField().getValue(obj)) : null;
  return cndId(en,id);
case NAME:
String name=null != obj ? en.getNameField().getValue(obj).toString() : null;
return cndName(en,name);
case COMPOSITE:
Object[] pks=null;
if (null != obj) {
pks=new Object[en.getCompositePKFields().size()];
int i=0;
for (EntityField ef : en.getCompositePKFields()) pks[i++]=ef.getValue(obj);
}
return cndPk(en,pks);
default :
throw Lang.makeThrow("String_Node_Str",en.getType().getName(),obj);
}
}
Program: 80620
Project: 80620
Buggy source:
protected ParamInjector evalInjector(Type type,Param param){
  return new JsonInjector(type,null == param ? null : param.value());
}

Fixed version (ground truth):
@Override protected ParamInjector evalInjector(Type type,Param param){
  if (param == null)   return new JsonInjector(type,null);
  return super.evalInjector(type,param);
}
Program: 80621
Project: 80621
Buggy source:
public Object getReferObject(ServletContext sc,HttpServletRequest request,HttpServletResponse response,String[] pathArgs){
  try {
    return Streams.readAndClose(Streams.utf8r(request.getInputStream()));
  }
 catch (  Exception e) {
    throw Lang.wrapThrow(e);
  }
}

Fixed version (ground truth):
public Object getReferObject(ServletContext sc,HttpServletRequest request,HttpServletResponse response,String[] pathArgs){
  try {
    return Json.fromJson(Streams.utf8r(request.getInputStream()));
  }
 catch (  Exception e) {
    throw Lang.wrapThrow(e);
  }
}
Program: 80622
Project: 80622
Buggy source:
@Override public Object get(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,Object refer){
  if (null != refer)   return Castors.me().castTo(refer,type);
  String[] values=req.getParameterValues(name);
  if (null == values || values.length == 0)   return null;
  if (values.length == 1) {
    try {
      return Castors.me().castTo(values[0],type);
    }
 catch (    Exception e) {
      Object re=Array.newInstance(type.getComponentType(),1);
      Object v=Castors.me().castTo(values[0],type.getComponentType());
      Array.set(re,0,v);
      return re;
    }
  }
  return Lang.array2array(values,type.getComponentType());
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public Object get(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,Object refer){
  Object value=null;
  if (null != refer) {
    if (refer instanceof Map) {
      value=((Map<String,Object>)refer).get(name);
      if (value != null && value.getClass().isArray())       return Lang.array2array(value,type.getComponentType());
    }
    if (value != null)     return convertMe(value);
  }
  String[] values=req.getParameterValues(name);
  if (null == values || values.length == 0)   return null;
  if (values.length == 1) {
    return convertMe(values[0]);
  }
  return Lang.array2array(values,type.getComponentType());
}
Program: 80623
Project: 80623
Buggy source:
public Object get(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,Object refer){
  if (null == name)   return Json.fromJson(type,refer.toString());
  NutMap map=Json.fromJson(NutMap.class,refer.toString());
  Object theObj=map.get(name);
  if (null == theObj)   return null;
  Class<?> clazz=Lang.getTypeClass(type);
  return Castors.me().castTo(theObj,clazz);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Object get(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,Object refer){
  if (null == name)   return Castors.me().castTo(refer,Lang.getTypeClass(type));
  Map<String,Object> map=(Map<String,Object>)refer;
  Object theObj=map.get(name);
  if (null == theObj)   return null;
  Class<?> clazz=Lang.getTypeClass(type);
  return Castors.me().castTo(theObj,clazz);
}
Program: 80624
Project: 80624
Buggy source:
public void process(ActionContext ac) throws Throwable {
  Object module=ac.getModule();
  Method method=ac.getMethod();
  Object[] args=ac.getMethodArgs();
  try {
    Object re=method.invoke(module,args);
    ac.setMethodReturn(re);
    doNext(ac);
  }
 catch (  IllegalAccessException e) {
    throw e.getCause();
  }
catch (  IllegalArgumentException e) {
    throw e.getCause();
  }
catch (  InvocationTargetException e) {
    throw e.getTargetException();
  }
}

Fixed version (ground truth):
public void process(ActionContext ac) throws Throwable {
  Object module=ac.getModule();
  Method method=ac.getMethod();
  Object[] args=ac.getMethodArgs();
  try {
    Object re=method.invoke(module,args);
    ac.setMethodReturn(re);
    doNext(ac);
  }
 catch (  IllegalAccessException e) {
    throw Lang.unwrapThrow(e);
  }
catch (  IllegalArgumentException e) {
    throw Lang.unwrapThrow(e);
  }
catch (  InvocationTargetException e) {
    throw Lang.unwrapThrow(e);
  }
}
Program: 80625
Project: 80625
Buggy source:
public Object getReferObject(ServletContext sc,HttpServletRequest request,HttpServletResponse response,String[] pathArgs){
  try {
    Uploading ing=new FastUploading();
    return ing.parse(request,context);
  }
 catch (  UploadException e) {
    throw Lang.wrapThrow(e);
  }
 finally {
    Uploads.removeInfo(request);
  }
}

Fixed version (ground truth):
public Map<String,Object> getReferObject(ServletContext sc,HttpServletRequest request,HttpServletResponse response,String[] pathArgs){
  try {
    Uploading ing=new FastUploading();
    return ing.parse(request,context);
  }
 catch (  UploadException e) {
    throw Lang.wrapThrow(e);
  }
 finally {
    Uploads.removeInfo(request);
  }
}
Program: 80626
Project: 80626
Buggy source:
@Test public void testPersonObject() throws Exception {
  Person p=Json.fromJson(Person.class,getFileAsInputStreamReader("String_Node_Str"));
  StringBuilder sb=new StringBuilder();
  Writer w=new OutputStreamWriter(new StringOutputStream(sb));
  w.write(p.dump());
  w.write("String_Node_Str");
  w.write(p.getFather().dump());
  w.write("String_Node_Str");
  w.write(p.getCompany().getName());
  w.write("String_Node_Str");
  w.write(p.getCompany().getCreator().dump());
  w.flush();
  w.close();
  assertTrue(Streams.equals(new StringInputStream(sb),getClass().getResourceAsStream("String_Node_Str")));
}

Fixed version (ground truth):
@Ignore @Test public void testPersonObject() throws Exception {
  Person p=Json.fromJson(Person.class,getFileAsInputStreamReader("String_Node_Str"));
  StringBuilder sb=new StringBuilder();
  Writer w=new OutputStreamWriter(new StringOutputStream(sb));
  w.write(p.dump());
  w.write("String_Node_Str");
  w.write(p.getFather().dump());
  w.write("String_Node_Str");
  w.write(p.getCompany().getName());
  w.write("String_Node_Str");
  w.write(p.getCompany().getCreator().dump());
  w.flush();
  w.close();
  assertTrue(Streams.equals(new StringInputStream(sb),getClass().getResourceAsStream("String_Node_Str")));
}
Program: 80627
Project: 80627
Buggy source:
@Test public void test_array() throws ServletException, IOException {
  String path="String_Node_Str";
  String json="String_Node_Str";
  initreq(path,json);
  servlet.service(request,response);
  assertEquals(3,response.getAsInt());
}

Fixed version (ground truth):
@Test public void test_array() throws ServletException, IOException {
  String path="String_Node_Str";
  String json="String_Node_Str";
  initreq(path,json);
  servlet.service(request,response);
  System.out.println(response.getAsString());
  assertEquals(3,response.getAsInt());
}
Program: 80628
Project: 80628
Buggy source:
public static List<MappingField> getFieldsForUpdate(Entity<?> en,FieldMatcher fm,Object refer){
  List<MappingField> re=new ArrayList<MappingField>(en.getMappingFields().size());
  for (  MappingField mf : en.getMappingFields()) {
    if (mf.isPk()) {
      if (en.getPkType() == PkType.ID && mf.isId())       continue;
      if (en.getPkType() == PkType.NAME && mf.isName())       continue;
      if (en.getPkType() == PkType.COMPOSITE && mf.isCompositePk())       continue;
    }
    if (!mf.isAutoIncreasement() && !mf.isReadonly())     if (null != fm && null != refer && fm.isIgnoreNull() && null == mf.getValue(refer))     continue;
    if (null == fm || fm.match(mf.getName()))     re.add(mf);
  }
  return re;
}

Fixed version (ground truth):
public static List<MappingField> getFieldsForUpdate(Entity<?> en,FieldMatcher fm,Object refer){
  List<MappingField> re=new ArrayList<MappingField>(en.getMappingFields().size());
  for (  MappingField mf : en.getMappingFields()) {
    if (mf.isPk()) {
      if (en.getPkType() == PkType.ID && mf.isId())       continue;
      if (en.getPkType() == PkType.NAME && mf.isName())       continue;
      if (en.getPkType() == PkType.COMPOSITE && mf.isCompositePk())       continue;
    }
    if (mf.isReadonly() || mf.isAutoIncreasement())     continue;
 else     if (null != fm && null != refer && fm.isIgnoreNull() && null == mf.getValue(refer))     continue;
    if (null == fm || fm.match(mf.getName()))     re.add(mf);
  }
  return re;
}
Program: 80629
Project: 80629
Buggy source:
public JsonEntity(Mirror<?> mirror){
  Field[] flds=mirror.getFields();
  fields=new ArrayList<JsonEntityField>(flds.length);
  for (  Field fld : flds) {
    JsonEntityField ef=new JsonEntityField(mirror,fld);
    fields.add(ef);
  }
  try {
    borning=mirror.getBorning();
  }
 catch (  BorningException e) {
    err=e;
  }
}

Fixed version (ground truth):
public JsonEntity(Mirror<?> mirror){
  Field[] flds=mirror.getFields();
  fields=new ArrayList<JsonEntityField>(flds.length);
  for (  Field fld : flds) {
    JsonEntityField ef=JsonEntityField.eval(mirror,fld);
    if (null != ef)     fields.add(ef);
  }
  try {
    borning=mirror.getBorning();
  }
 catch (  BorningException e) {
    err=e;
  }
}
Program: 80630
Project: 80630
Buggy source:
public JsonEntityField(Mirror<?> mirror,Field fld){
  this.injecting=mirror.getInjecting(fld.getName());
  this.ejecting=mirror.getEjecting(fld.getName());
  this.genericType=fld.getGenericType();
  JsonField jf=fld.getAnnotation(JsonField.class);
  if (null != jf)   name=jf.value();
 else   name=fld.getName();
}

Fixed version (ground truth):
private JsonEntityField(){
}
Program: 80632
Project: 80632
Buggy source:
/** 
 * 从一个 ResultSet 中获取一个对象。 <p> 因为 Dao 接口可以知道一个 POJO 的映射细节，这个函数可以帮你节省一点体力。
 * @param classOfT
 * @param rs
 * @param fm
 * @return 对象
 */
<T>T getObject(Class<T> classOfT,ResultSet rs,FieldMatcher fm);

Fixed version (ground truth):
/** 
 * 从一个 ResultSet 中获取一个对象。 <p> 因为 Dao 接口可以知道一个 POJO 的映射细节，这个函数可以帮你节省一点体力。
 * @param classOfT 对象类型
 * @param rs 结果集
 * @param fm 字段过滤器
 * @return 对象
 */
<T>T getObject(Class<T> classOfT,ResultSet rs,FieldMatcher fm);
Program: 80634
Project: 80634
Buggy source:
/** 
 * 将字符串，变成数字对象，现支持的格式为： <ul> <li>null - 整数 0</li> <li>23.78 - 浮点 Float</li> <li>0x45 - 16进制整数 Integer</li> <li>78L - 长整数 Long</li> <li>69 - 普通整数 Integer</li> </ul>
 * @param s 参数
 * @return 数字对象
 */
public static Number str2number(String s){
  if (null == s) {
    return 0;
  }
  s=s.toUpperCase();
  if (s.indexOf('.') != -1) {
    return Float.valueOf(s);
  }
  if (s.startsWith("String_Node_Str")) {
    return Integer.valueOf(s.substring(2),16);
  }
  if (s.charAt(s.length() - 1) == 'L') {
    return Long.valueOf(s.substring(0,s.length() - 1));
  }
  return Integer.valueOf(s);
}

Fixed version (ground truth):
/** 
 * 将字符串，变成数字对象，现支持的格式为： <ul> <li>null - 整数 0</li> <li>23.78 - 浮点 Float</li> <li>0x45 - 16进制整数 Integer</li> <li>78L - 长整数 Long</li> <li>69 - 普通整数 Integer</li> </ul>
 * @param s 参数
 * @return 数字对象
 */
public static Number str2number(String s){
  if (null == s) {
    return 0;
  }
  s=s.toUpperCase();
  if (s.indexOf('.') != -1) {
    return Float.valueOf(s);
  }
  if (s.startsWith("String_Node_Str")) {
    return Integer.valueOf(s.substring(2),16);
  }
  if (s.charAt(s.length() - 1) == 'L') {
    return Long.valueOf(s.substring(0,s.length() - 1));
  }
  Long re=Long.parseLong(s);
  if (Integer.MAX_VALUE >= re && re >= Integer.MIN_VALUE)   return re.intValue();
  return re;
}
Program: 80635
Project: 80635
Buggy source:
public static ElObj oLong(Long v){
  return new StaticElObj(new LongElValue(v));
}

Fixed version (ground truth):
public static ElObj oLong(Long v){
  return new StaticElObj(new NumberElValue(v));
}
Program: 80636
Project: 80636
Buggy source:
public static ElObj oInt(Integer v){
  return new StaticElObj(new IntegerElValue(v));
}

Fixed version (ground truth):
public static ElObj oInt(Integer v){
  return new StaticElObj(new NumberElValue(v));
}
Program: 80637
Project: 80637
Buggy source:
public static ElObj oFloat(Float v){
  return new StaticElObj(new FloatElValue(v));
}

Fixed version (ground truth):
public static ElObj oFloat(Float v){
  return new StaticElObj(new NumberElValue(v));
}
Program: 80638
Project: 80638
Buggy source:
public ElValue make(Object obj){
  if (obj instanceof ElValue)   return (ElValue)obj;
  if (null == obj)   return new NullElValue();
  if (obj instanceof Map<?,?>)   return new MapElValue((Map<?,?>)obj);
  if (obj instanceof List<?>)   return new ListElValue((List<?>)obj);
  if (obj instanceof Collection<?>)   return new CollectionElValue((List<?>)obj);
  if (obj.getClass().isArray()) {
    return new ArrayElValue(obj);
  }
  Mirror<?> mirror=Mirror.me(obj);
  if (mirror.isStringLike())   return new StringElValue(obj.toString());
  if (mirror.isLong())   return new LongElValue((Long)obj);
  if (mirror.isIntLike())   return new IntegerElValue((Integer)obj);
  if (mirror.isBoolean())   return (Boolean)obj ? El.TRUE : El.FALSE;
  if (mirror.isFloat())   return new FloatElValue((Float)obj);
  return new PojoElValue<Object>(obj);
}

Fixed version (ground truth):
public ElValue make(Object obj){
  if (obj instanceof ElValue)   return (ElValue)obj;
  if (null == obj)   return new NullElValue();
  if (obj instanceof Map<?,?>)   return new MapElValue((Map<?,?>)obj);
  if (obj instanceof List<?>)   return new ListElValue((List<?>)obj);
  if (obj instanceof Collection<?>)   return new CollectionElValue((List<?>)obj);
  if (obj.getClass().isArray()) {
    return new ArrayElValue(obj);
  }
  Mirror<?> mirror=Mirror.me(obj);
  if (mirror.isStringLike())   return new StringElValue(obj.toString());
  if (mirror.isLong())   return new NumberElValue((Long)obj);
  if (mirror.isIntLike())   return new NumberElValue((Integer)obj);
  if (mirror.isBoolean())   return (Boolean)obj ? El.TRUE : El.FALSE;
  if (mirror.isFloat())   return new NumberElValue((Float)obj);
  return new PojoElValue<Object>(obj);
}
Program: 80639
Project: 80639
Buggy source:
public ElValue getProperty(ElValue val){
  Object v=val.get();
  if (v instanceof Integer) {
    return El.wrap(Array.get(obj,((Integer)v).intValue()));
  }
 else   if ("String_Node_Str".equals(val.getString())) {
    return El.wrap(Array.getLength(obj));
  }
  throw new ElException("String_Node_Str",val.getString());
}

Fixed version (ground truth):
public ElValue getProperty(ElValue val){
  Object v=val.get();
  if (v instanceof BigDecimal) {
    return El.wrap(Array.get(obj,((BigDecimal)v).intValue()));
  }
 else   if ("String_Node_Str".equals(val.getString())) {
    return El.wrap(Array.getLength(obj));
  }
  throw new ElException("String_Node_Str",val.getString());
}
Program: 80640
Project: 80640
Buggy source:
public void injectValue(Object obj,ResultSet rs){
  try {
    this.setValue(obj,adaptor.get(rs,columnName));
  }
 catch (  SQLException e) {
    throw Lang.wrapThrow(e);
  }
}

Fixed version (ground truth):
public void injectValue(Object obj,ResultSet rs){
  try {
    this.setValue(obj,adaptor.get(rs,columnName));
  }
 catch (  SQLException e) {
  }
}
Program: 80641
Project: 80641
Buggy source:
public <T>T insertRelation(T obj,String regex){
  EntityOperator opt=__opt(obj);
  opt.entity.visitManyMany(obj,regex,doInsertRelation(opt));
  opt.exec();
  return obj;
}

Fixed version (ground truth):
public <T>T insertRelation(T obj,String regex){
  EntityOperator opt=_optBy(obj);
  opt.entity.visitManyMany(obj,regex,doInsertRelation(opt));
  opt.exec();
  return obj;
}
Program: 80642
Project: 80642
Buggy source:
public <T>T insertWith(T obj,String regex){
  EntityOperator opt=__opt(obj);
  opt.entity.visitOne(obj,regex,doInsert(opt));
  opt.addInsert();
  opt.entity.visitMany(obj,regex,doInsert(opt));
  opt.entity.visitManyMany(obj,regex,doInsert(opt));
  opt.entity.visitManyMany(obj,regex,doInsertRelation(opt));
  opt.exec();
  return obj;
}

Fixed version (ground truth):
public <T>T insertWith(T obj,String regex){
  EntityOperator opt=_optBy(obj);
  opt.entity.visitOne(obj,regex,doInsert(opt));
  opt.addInsert();
  opt.entity.visitMany(obj,regex,doInsert(opt));
  opt.entity.visitManyMany(obj,regex,doInsert(opt));
  opt.entity.visitManyMany(obj,regex,doInsertRelation(opt));
  opt.exec();
  return obj;
}
Program: 80643
Project: 80643
Buggy source:
public <T>T insertLinks(T obj,String regex){
  EntityOperator opt=__opt(obj);
  opt.entity.visitOne(obj,regex,doInsert(opt));
  opt.entity.visitMany(obj,regex,doInsert(opt));
  opt.entity.visitManyMany(obj,regex,doInsert(opt));
  opt.entity.visitManyMany(obj,regex,doInsertRelation(opt));
  opt.exec();
  return obj;
}

Fixed version (ground truth):
public <T>T insertLinks(T obj,String regex){
  EntityOperator opt=_optBy(obj);
  opt.entity.visitOne(obj,regex,doInsert(opt));
  opt.entity.visitMany(obj,regex,doInsert(opt));
  opt.entity.visitManyMany(obj,regex,doInsert(opt));
  opt.entity.visitManyMany(obj,regex,doInsertRelation(opt));
  opt.exec();
  return obj;
}
Program: 80644
Project: 80644
Buggy source:
public int update(Class<?> classOfT,Chain chain,Condition cnd){
  Entity<?> en=holder.getEntity(classOfT);
  return update(en.getTableName(),chain.updateBy(en),cnd);
}

Fixed version (ground truth):
public int update(Class<?> classOfT,Chain chain,Condition cnd){
  EntityOperator opt=_opt(classOfT);
  opt.addUpdate(chain,cnd);
  opt.exec();
  return opt.getUpdateCount();
}
Program: 80645
Project: 80645
Buggy source:
public int delete(Object obj){
  EntityOperator opt=__opt(obj);
  opt.addDeleteSelfOnly();
  opt.exec();
  return opt.getUpdateCount();
}

Fixed version (ground truth):
public int delete(Object obj){
  EntityOperator opt=_optBy(obj);
  opt.addDeleteSelfOnly();
  opt.exec();
  return opt.getUpdateCount();
}
Program: 80646
Project: 80646
Buggy source:
public int updateIgnoreNull(final Object obj){
  EntityOperator opt=__opt(obj);
  opt.addUpdateForIgnoreNull(opt.entity,obj,FieldFilter.get(opt.entity.getType()));
  opt.exec();
  return opt.getUpdateCount();
}

Fixed version (ground truth):
public int updateIgnoreNull(final Object obj){
  EntityOperator opt=_optBy(obj);
  opt.addUpdateForIgnoreNull(opt.entity,obj,FieldFilter.get(opt.entity.getType()));
  opt.exec();
  return opt.getUpdateCount();
}
Program: 80647
Project: 80647
Buggy source:
public int deleteLinks(Object obj,String regex){
  EntityOperator opt=this.__opt(obj);
  opt.entity.visitMany(obj,regex,doDelete(opt));
  opt.entity.visitManyMany(obj,regex,doClearRelationByLinkedField(opt));
  opt.entity.visitManyMany(obj,regex,doDelete(opt));
  opt.entity.visitOne(obj,regex,doDelete(opt));
  return opt.exec().getUpdateCount();
}

Fixed version (ground truth):
public int deleteLinks(Object obj,String regex){
  EntityOperator opt=this._optBy(obj);
  opt.entity.visitMany(obj,regex,doDelete(opt));
  opt.entity.visitManyMany(obj,regex,doClearRelationByLinkedField(opt));
  opt.entity.visitManyMany(obj,regex,doDelete(opt));
  opt.entity.visitOne(obj,regex,doDelete(opt));
  return opt.exec().getUpdateCount();
}
Program: 80648
Project: 80648
Buggy source:
public <T>T clearLinks(T obj,String regex){
  EntityOperator opt=this.__opt(obj);
  opt.entity.visitMany(obj,regex,doClear(opt));
  opt.entity.visitManyMany(obj,regex,doClearRelationByHostField(opt));
  opt.entity.visitOne(obj,regex,doClear(opt));
  opt.exec();
  return obj;
}

Fixed version (ground truth):
public <T>T clearLinks(T obj,String regex){
  EntityOperator opt=this._optBy(obj);
  opt.entity.visitMany(obj,regex,doClear(opt));
  opt.entity.visitManyMany(obj,regex,doClearRelationByHostField(opt));
  opt.entity.visitOne(obj,regex,doClear(opt));
  opt.exec();
  return obj;
}
Program: 80649
Project: 80649
Buggy source:
public <T>T updateLinks(T obj,String regex){
  EntityOperator opt=this.__opt(obj);
  opt.entity.visitOne(obj,regex,doUpdate(opt));
  opt.entity.visitMany(obj,regex,doUpdate(opt));
  opt.entity.visitManyMany(obj,regex,doUpdate(opt));
  opt.exec();
  return obj;
}

Fixed version (ground truth):
public <T>T updateLinks(T obj,String regex){
  EntityOperator opt=this._optBy(obj);
  opt.entity.visitOne(obj,regex,doUpdate(opt));
  opt.entity.visitMany(obj,regex,doUpdate(opt));
  opt.entity.visitManyMany(obj,regex,doUpdate(opt));
  opt.exec();
  return obj;
}
Program: 80650
Project: 80650
Buggy source:
public <T>T updateWith(T obj,String regex){
  EntityOperator opt=this.__opt(obj);
  opt.entity.visitOne(obj,regex,doUpdate(opt));
  opt.addUpdate();
  opt.entity.visitMany(obj,regex,doUpdate(opt));
  opt.entity.visitManyMany(obj,regex,doUpdate(opt));
  opt.exec();
  return obj;
}

Fixed version (ground truth):
public <T>T updateWith(T obj,String regex){
  EntityOperator opt=this._optBy(obj);
  opt.entity.visitOne(obj,regex,doUpdate(opt));
  opt.addUpdate();
  opt.entity.visitMany(obj,regex,doUpdate(opt));
  opt.entity.visitManyMany(obj,regex,doUpdate(opt));
  opt.exec();
  return obj;
}
Program: 80651
Project: 80651
Buggy source:
public <T>T fetchLinks(T obj,String regex){
  EntityOperator opt=this.__opt(obj);
  opt.entity.visitMany(obj,regex,doFetch(opt));
  opt.entity.visitManyMany(obj,regex,doFetch(opt));
  opt.entity.visitOne(obj,regex,doFetch(opt));
  opt.exec();
  return obj;
}

Fixed version (ground truth):
public <T>T fetchLinks(T obj,String regex){
  EntityOperator opt=this._optBy(obj);
  opt.entity.visitMany(obj,regex,doFetch(opt));
  opt.entity.visitManyMany(obj,regex,doFetch(opt));
  opt.entity.visitOne(obj,regex,doFetch(opt));
  opt.exec();
  return obj;
}
Program: 80652
Project: 80652
Buggy source:
public <T>T fastInsert(T obj){
  EntityOperator opt=__opt(obj);
  opt.addInsertSelfOnly();
  opt.exec();
  return obj;
}

Fixed version (ground truth):
public <T>T fastInsert(T obj){
  EntityOperator opt=_optBy(obj);
  opt.addInsertSelfOnly();
  opt.exec();
  return obj;
}
Program: 80653
Project: 80653
Buggy source:
public int deleteWith(Object obj,String regex){
  EntityOperator opt=this.__opt(obj);
  opt.entity.visitMany(obj,regex,doDelete(opt));
  opt.entity.visitManyMany(obj,regex,doClearRelationByLinkedField(opt));
  opt.entity.visitManyMany(obj,regex,doDelete(opt));
  opt.addDeleteSelfOnly();
  opt.entity.visitOne(obj,regex,doDelete(opt));
  return opt.exec().getUpdateCount();
}

Fixed version (ground truth):
public int deleteWith(Object obj,String regex){
  EntityOperator opt=this._optBy(obj);
  opt.entity.visitMany(obj,regex,doDelete(opt));
  opt.entity.visitManyMany(obj,regex,doClearRelationByLinkedField(opt));
  opt.entity.visitManyMany(obj,regex,doDelete(opt));
  opt.addDeleteSelfOnly();
  opt.entity.visitOne(obj,regex,doDelete(opt));
  return opt.exec().getUpdateCount();
}
Program: 80654
Project: 80654
Buggy source:
public Pojo append(PItem... itemAry){
  if (null != itemAry)   for (  PItem item : itemAry) {
    items.add(item);
    item.setPojo(this);
  }
  return this;
}

Fixed version (ground truth):
public Pojo append(PItem... itemAry){
  if (null != itemAry)   for (  PItem item : itemAry) {
    if (null != item) {
      items.add(item);
      item.setPojo(this);
    }
  }
  return this;
}
Program: 80655
Project: 80655
Buggy source:
public static PItem[] cnd(Condition cnd){
  List<PItem> list=new LinkedList<PItem>();
  if (null == cnd) {
  }
  if (cnd instanceof Criteria) {
    list.add((Criteria)cnd);
  }
 else {
    list.add(new ConditionPItem(cnd));
  }
  return list.toArray(new PItem[list.size()]);
}

Fixed version (ground truth):
public static PItem[] cnd(Condition cnd){
  List<PItem> list=new LinkedList<PItem>();
  if (null == cnd) {
  }
 else   if (cnd instanceof Criteria) {
    list.add((Criteria)cnd);
  }
 else {
    list.add(new ConditionPItem(cnd));
  }
  return list.toArray(new PItem[list.size()]);
}
Program: 80656
Project: 80656
Buggy source:
public List<NutResource> loadResource(String regex,String... paths){
  List<NutResource> list=new LinkedList<NutResource>();
  try {
    for (    String path : paths) {
      File f=Files.findFile(path);
      if (null == f || f.isDirectory()) {
        list.addAll(scan(path,regex));
      }
 else       if (f.isFile()) {
        list.add(new FileResource(f));
      }
 else       if (f.getAbsolutePath().contains("String_Node_Str")) {
        list.add(new JarEntryResource(new JarEntryInfo(f.getAbsolutePath())));
      }
    }
  }
 catch (  IOException e) {
    throw Lang.wrapThrow(e);
  }
  if (list.size() < 1 && paths.length > 0)   throw Lang.makeThrow(RuntimeException.class,"String_Node_Str",regex,Castors.me().castToString(paths));
  return list;
}

Fixed version (ground truth):
public List<NutResource> loadResource(String regex,String... paths){
  List<NutResource> list=new LinkedList<NutResource>();
  for (  String path : paths) {
    File f=Files.findFile(path);
    if (null == f || f.isDirectory()) {
      list.addAll(scan(path,regex));
    }
 else     if (f.isFile()) {
      list.add(new FileResource(f));
    }
 else     if (isInJar(f)) {
      NutResource nutResource=makeJarNutResource(f);
      if (nutResource != null) {
        list.add(nutResource);
      }
 else {
        if (!path.replace('\\','/').endsWith("String_Node_Str"))         path+='/';
        list.addAll(scan(path,regex));
      }
    }
  }
  if (list.size() < 1 && paths.length > 0)   throw Lang.makeThrow(RuntimeException.class,"String_Node_Str",regex,Castors.me().castToString(paths));
  return list;
}
Program: 80657
Project: 80657
Buggy source:
protected List<NutResource> scanInJar(String src,Pattern regex,String jarPath){
  List<NutResource> list=new ArrayList<NutResource>();
  try {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",jarPath,regex,src);
    JarFile jar=new JarFile(jarPath);
    Enumeration<JarEntry> ens=jar.entries();
    while (ens.hasMoreElements()) {
      JarEntry jen=ens.nextElement();
      if (jen.isDirectory())       continue;
      String name=jen.getName();
      if (name.startsWith(src) && (null != regex && regex.matcher(name).find())) {
        list.add(new JarEntryResource(jar,jen,jen.getName().substring(src.length())));
      }
    }
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",list.size(),jarPath,regex,src);
  }
 catch (  Throwable e) {
    if (log.isWarnEnabled())     log.warn("String_Node_Str" + jarPath + "String_Node_Str",e);
  }
  return list;
}

Fixed version (ground truth):
protected List<NutResource> scanInJar(String src,Pattern regex,String jarPath){
  List<NutResource> list=new ArrayList<NutResource>();
  try {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",jarPath,regex,src);
    JarFile jar=new JarFile(jarPath);
    Enumeration<JarEntry> ens=jar.entries();
    while (ens.hasMoreElements()) {
      JarEntry jen=ens.nextElement();
      if (jen.isDirectory())       continue;
      String name=jen.getName();
      if (name.startsWith(src) && (null == regex || regex.matcher(name).find())) {
        list.add(new JarEntryResource(jar,jen,jen.getName().substring(src.length())));
      }
    }
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",list.size(),jarPath,regex,src);
  }
 catch (  Throwable e) {
    if (log.isWarnEnabled())     log.warn("String_Node_Str" + jarPath + "String_Node_Str",e);
  }
  return list;
}
Program: 80658
Project: 80658
Buggy source:
public List<NutResource> list(String src,String filter){
  final List<NutResource> list=new LinkedList<NutResource>();
  final Pattern regex=null == filter ? null : Pattern.compile(filter);
  File f=Files.findFile(src);
  if (f != null && f.exists()) {
    if (f.isFile())     list.addAll(scanInDir(regex,f.getParentFile(),ignoreHidden));
 else     list.addAll(scanInDir(regex,f,ignoreHidden));
  }
 else {
    String path=Disks.absolute(src,getClass().getClassLoader(),Encoding.defaultEncoding());
    if (null != path) {
      f=new File(path);
      if (!path.contains("String_Node_Str")) {
        int pos=path.lastIndexOf(src);
        if (pos > 0)         list.addAll(scanInDir(regex,f,ignoreHidden));
      }
 else {
        JarEntryInfo jeInfo=new JarEntryInfo(path);
        list.addAll(scanInJar(checkSrc(jeInfo.getEntryName()),regex,jeInfo.getJarPath()));
      }
    }
 else {
      String classpath=System.getProperties().getProperty("String_Node_Str");
      if (LOG.isInfoEnabled())       LOG.info("String_Node_Str" + classpath);
      String[] paths=classpath.split(System.getProperties().getProperty("String_Node_Str"));
      for (      String pathZ : paths) {
        if (pathZ.endsWith("String_Node_Str"))         list.addAll(scanInJar(checkSrc(src),regex,pathZ));
 else         list.addAll(scanInDir(regex,new File(pathZ + "String_Node_Str" + src),ignoreHidden));
      }
    }
  }
  return list;
}

Fixed version (ground truth):
public List<NutResource> list(String src,String filter){
  final List<NutResource> list=new LinkedList<NutResource>();
  final Pattern regex=null == filter ? null : Pattern.compile(filter);
  File f=Files.findFile(src);
  if (f != null && f.exists()) {
    if (f.isFile())     list.addAll(scanInDir(regex,f.getParentFile(),ignoreHidden));
 else     list.addAll(scanInDir(regex,f,ignoreHidden));
  }
 else {
    String path=Disks.absolute(src,getClass().getClassLoader(),Encoding.defaultEncoding());
    if (null != path) {
      f=new File(path);
      if (!path.contains("String_Node_Str")) {
        int pos=path.lastIndexOf(src);
        if (pos > 0)         list.addAll(scanInDir(regex,f,ignoreHidden));
      }
 else {
        JarEntryInfo jeInfo=new JarEntryInfo(path);
        list.addAll(scanInJar(checkSrc(jeInfo.getEntryName()),regex,jeInfo.getJarPath()));
      }
    }
 else {
      try {
        Enumeration<URL> en=getClass().getClassLoader().getResources(src);
        if (en != null) {
          while (en.hasMoreElements()) {
            JarEntryInfo jeInfo=new JarEntryInfo(en.nextElement().getPath());
            list.addAll(scanInJar(checkSrc(jeInfo.getEntryName()),regex,jeInfo.getJarPath()));
          }
        }
      }
 catch (      Throwable e) {
        e.printStackTrace();
      }
    }
  }
  return list;
}
Program: 80659
Project: 80659
Buggy source:
@SuppressWarnings({"String_Node_Str"}) public void render(Object obj) throws IOException {
  if (null == obj) {
    writer.write("String_Node_Str");
  }
 else   if (obj instanceof Class) {
    string2Json(((Class<?>)obj).getName());
  }
 else   if (obj instanceof Mirror) {
    string2Json(((Mirror<?>)obj).getType().getName());
  }
 else {
    Mirror mr=Mirror.me(obj.getClass());
    if (mr.isEnum()) {
      string2Json(((Enum)obj).name());
    }
 else     if (mr.isNumber() || mr.isBoolean() || mr.isChar()) {
      writer.append(obj.toString());
    }
 else     if (mr.isStringLike()) {
      string2Json(obj.toString());
    }
 else     if (mr.isDateTimeLike()) {
      string2Json(format.getCastors().castToString(obj));
    }
 else     if (memo.containsKey(obj)) {
      writer.append("String_Node_Str");
    }
 else {
      memo.put(obj,null);
      if (obj instanceof Map)       map2Json((Map)obj);
 else       if (obj instanceof Collection)       coll2Json((Collection)obj);
 else       if (obj.getClass().isArray())       array2Json(obj);
 else {
        pojo2Json(obj);
      }
      memo.remove(obj);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str"}) public void render(Object obj) throws IOException {
  if (null == obj) {
    writer.write("String_Node_Str");
  }
 else   if (obj instanceof Class) {
    string2Json(((Class<?>)obj).getName());
  }
 else   if (obj instanceof Mirror) {
    string2Json(((Mirror<?>)obj).getType().getName());
  }
 else {
    Mirror mr=Mirror.me(obj.getClass());
    if (mr.isEnum()) {
      string2Json(((Enum)obj).name());
    }
 else     if (mr.isNumber() || mr.isBoolean()) {
      writer.append(obj.toString());
    }
 else     if (mr.isStringLike() || mr.isChar()) {
      string2Json(obj.toString());
    }
 else     if (mr.isDateTimeLike()) {
      string2Json(format.getCastors().castToString(obj));
    }
 else     if (memo.containsKey(obj)) {
      writer.append("String_Node_Str");
    }
 else {
      memo.put(obj,null);
      if (obj instanceof Map)       map2Json((Map)obj);
 else       if (obj instanceof Collection)       coll2Json((Collection)obj);
 else       if (obj.getClass().isArray())       array2Json(obj);
 else {
        pojo2Json(obj);
      }
      memo.remove(obj);
    }
  }
}
Program: 80660
Project: 80660
Buggy source:
public ElValue isNEQ(ElValue ta){
  throw new ElException("String_Node_Str",getClass().getSimpleName(),"String_Node_Str");
}

Fixed version (ground truth):
public ElValue isNEQ(ElValue ta){
  if (obj != ta.get())   return El.TRUE;
  return El.FALSE;
}
Program: 80661
Project: 80661
Buggy source:
public ElValue isEquals(ElValue ta){
  throw new ElException("String_Node_Str",getClass().getSimpleName(),"String_Node_Str");
}

Fixed version (ground truth):
public ElValue isEquals(ElValue ta){
  if (obj == ta.get())   return El.TRUE;
  return El.FALSE;
}
Program: 80663
Project: 80663
Buggy source:
public Object[] adapt(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,String[] pathArgs){
  Object[] args=new Object[injs.length];
  int len=Math.min(args.length,null == pathArgs ? 0 : pathArgs.length);
  int i=0;
  for (; i < len; i++) {
    args[i]=injs[i].get(sc,req,resp,null == pathArgs ? null : pathArgs[i]);
  }
  Class<?>[] argTypes=method.getParameterTypes();
  for (; i < injs.length; i++) {
    args[i]=injs[i].get(sc,req,resp,null);
    if (args[i] == null && argTypes[i].isPrimitive()) {
      args[i]=Lang.getPrimitiveDefaultValue(argTypes[i]);
    }
  }
  return args;
}

Fixed version (ground truth):
public Object[] adapt(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,String[] pathArgs){
  Object[] args=new Object[injs.length];
  int len=Math.min(args.length,null == pathArgs ? 0 : pathArgs.length);
  int i=0;
  for (; i < len; i++) {
    args[i]=injs[i].get(sc,req,resp,null == pathArgs ? null : pathArgs[i]);
  }
  Class<?>[] argTypes=method.getParameterTypes();
  Object obj=getReferObject(sc,req,resp,pathArgs);
  for (; i < injs.length; i++) {
    System.out.println("String_Node_Str" + i + "String_Node_Str"+ injs[i].getClass());
    args[i]=injs[i].get(sc,req,resp,obj);
    if (args[i] == null && argTypes[i].isPrimitive()) {
      args[i]=Lang.getPrimitiveDefaultValue(argTypes[i]);
    }
  }
  return args;
}