nus-yam/ex-repair huggingface dataset:
Program: 80424
Project: 80424
Buggy source:
@SuppressWarnings("String_Node_Str") public JsonActionChainMakerConfiguretion(String... jsonPaths){
  List<NutResource> list=Scans.me().loadResource("String_Node_Str",jsonPaths);
  try {
    File defaultChainsFile=Files.findFile("String_Node_Str");
    if (defaultChainsFile == null) {
      log.warn("String_Node_Str");
      throw new NutRuntimeException("String_Node_Str");
    }
    map.putAll(Json.fromJsonFile(Map.class,defaultChainsFile));
    for (    NutResource nr : list)     map.putAll(Json.fromJson(Map.class,nr.getReader()));
  }
 catch (  IOException e) {
    throw Lang.wrapThrow(e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public JsonActionChainMakerConfiguretion(String... jsonPaths){
  List<NutResource> list=Scans.me().loadResource("String_Node_Str",jsonPaths);
  try {
    File defaultChainsFile=Files.findFile("String_Node_Str");
    if (defaultChainsFile != null && defaultChainsFile.exists())     map.putAll(Json.fromJsonFile(Map.class,defaultChainsFile));
 else {
      if (!Lang.isAndroid) {
        log.warn("String_Node_Str");
        throw new NutRuntimeException("String_Node_Str");
      }
      map.putAll(Json.fromJson(Map.class,new InputStreamReader(getClass().getClassLoader().getResourceAsStream("String_Node_Str"))));
    }
    for (    NutResource nr : list)     map.putAll(Json.fromJson(Map.class,nr.getReader()));
  }
 catch (  IOException e) {
    if (Lang.isAndroid) {
    }
    throw Lang.wrapThrow(e);
  }
}
Program: 80425
Project: 80425
Buggy source:
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);
  }
}

Fixed version (ground truth):
public Object getReferObject(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,String[] pathArgs){
  try {
    return Json.fromJson(Streams.utf8r(req.getInputStream()));
  }
 catch (  Exception e) {
    throw Lang.wrapThrow(e);
  }
}
Program: 80426
Project: 80426
Buggy source:
@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);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Object get(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,Object refer){
  if (null == name)   return Mapl.maplistToObj(refer,type);
  Map<String,Object> map=(Map<String,Object>)refer;
  Object theObj=map.get(name);
  if (null == theObj)   return null;
  return Mapl.maplistToObj(map,type);
}
Program: 80427
Project: 80427
Buggy source:
@Test public void test_deleteWith_many(){
  dao.create(Ask.class,true);
  dao.create(AskReply.class,true);
  Ask ask=new Ask();
  ask.setTemptitle("String_Node_Str");
  ask.setTitle("String_Node_Str");
  List<AskReply> askReplies=new ArrayList<AskReply>();
  askReplies.add(new AskReply(ask.getAskId()));
  askReplies.add(new AskReply(ask.getAskId()));
  ask.setReplys(askReplies);
  dao.insertWith(ask,"String_Node_Str");
  dao.deleteWith(ask,"String_Node_Str");
  assertEquals(0,dao.count(AskReply.class));
}

Fixed version (ground truth):
@Test public void test_deleteWith_many(){
  dao.create(Ask.class,true);
  dao.create(AskReply.class,true);
  Ask ask=new Ask();
  ask.setTemptitle("String_Node_Str");
  ask.setTitle("String_Node_Str");
  List<AskReply> askReplies=new ArrayList<AskReply>();
  askReplies.add(new AskReply(ask.getAskId()));
  askReplies.add(new AskReply(ask.getAskId()));
  ask.setReplys(askReplies);
  dao.insertWith(ask,"String_Node_Str");
  ask.setReplys(null);
  dao.deleteWith(ask,"String_Node_Str");
  assertEquals(2,dao.count(AskReply.class));
  ask=dao.fetchLinks(ask,null);
  dao.deleteWith(ask,"String_Node_Str");
  assertEquals(0,dao.count(AskReply.class));
}
Program: 80428
Project: 80428
Buggy source:
@At({"String_Node_Str","String_Node_Str"}) @Fail("String_Node_Str") public void errParam(@Param("String_Node_Str") long id,AdaptorErrorContext errCtx){
  TestCase.assertNotNull(errCtx);
  TestCase.assertNotNull(errCtx.getErrors()[0]);
}

Fixed version (ground truth):
@At({"String_Node_Str","String_Node_Str"}) public void errParam(@Param("String_Node_Str") long id,AdaptorErrorContext errCtx){
  TestCase.assertNotNull(errCtx);
  TestCase.assertNotNull(errCtx.getErrors()[0]);
}
Program: 80429
Project: 80429
Buggy source:
/** 
 * @return 当前类型是不是接口
 */
public boolean isInterface(){
  return null == klass ? null : klass.isInterface();
}

Fixed version (ground truth):
/** 
 * @return 当前类型是不是接口
 */
public boolean isInterface(){
  return klass.isInterface();
}
Program: 80430
Project: 80430
Buggy source:
/** 
 * 子类可以覆盖这个方法，给出自己特殊的后缀
 * @return 后缀
 */
protected String getExt(){
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * 子类可以覆盖这个方法，给出自己特殊的后缀,必须小写哦
 * @return 后缀
 */
protected String getExt(){
  return "String_Node_Str";
}
Program: 80431
Project: 80431
Buggy source:
public void render(HttpServletRequest req,HttpServletResponse resp,Object obj) throws Exception {
  String path=evalPath(req,obj);
  String args="String_Node_Str";
  if (path != null && path.contains("String_Node_Str")) {
    path=path.substring(0,path.indexOf('?'));
    args=path.substring(path.indexOf('?'));
  }
  String ext=getExt();
  if (Strings.isBlank(path)) {
    path=Mvcs.getRequestPath(req);
    path="String_Node_Str" + (path.startsWith("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + Files.renameSuffix(path,ext);
  }
 else   if (path.charAt(0) == '/') {
    if (!path.toLowerCase().endsWith(ext))     path+=ext;
  }
 else {
    path="String_Node_Str" + path.replace('.','/') + ext;
  }
  path=path + args;
  RequestDispatcher rd=req.getRequestDispatcher(path);
  if (rd == null)   throw Lang.makeThrow("String_Node_Str",path);
  rd.forward(req,resp);
}

Fixed version (ground truth):
public void render(HttpServletRequest req,HttpServletResponse resp,Object obj) throws Exception {
  String path=evalPath(req,obj);
  String args="String_Node_Str";
  if (path != null && path.contains("String_Node_Str")) {
    args=path.substring(path.indexOf('?'));
    path=path.substring(0,path.indexOf('?'));
  }
  String ext=getExt();
  if (Strings.isBlank(path)) {
    path=Mvcs.getRequestPath(req);
    path="String_Node_Str" + (path.startsWith("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + Files.renameSuffix(path,ext);
  }
 else   if (path.charAt(0) == '/') {
    if (!path.toLowerCase().endsWith(ext))     path+=ext;
  }
 else {
    path="String_Node_Str" + path.replace('.','/') + ext;
  }
  path=path + args;
  RequestDispatcher rd=req.getRequestDispatcher(path);
  if (rd == null)   throw Lang.makeThrow("String_Node_Str",path);
  rd.forward(req,resp);
}
Program: 80432
Project: 80432
Buggy source:
public void visit(Object obj,LinkField lnk){
  Object value=lnk.getValue(obj);
  final Pojo pojo=opt.maker().makeDelete(lnk.getLinkedEntity());
  pojo.setOperatingObject(value);
  pojo.append(Pojos.Items.cndAuto(lnk.getLinkedEntity(),null));
  Lang.each(value,new Each<Object>(){
    public void invoke(    int i,    Object ele,    int length) throws ExitLoop, LoopException {
      pojo.addParamsBy(ele);
    }
  }
);
  opt.add(pojo);
}

Fixed version (ground truth):
public void visit(Object obj,LinkField lnk){
  Object value=lnk.getValue(obj);
  if (value == null) {
    log.infof("String_Node_Str",lnk.getLinkType(),lnk.getEntity().getType().getSimpleName(),lnk.getHostField().getName());
    return;
  }
  final Pojo pojo=opt.maker().makeDelete(lnk.getLinkedEntity());
  pojo.setOperatingObject(value);
  pojo.append(Pojos.Items.cndAuto(lnk.getLinkedEntity(),null));
  Lang.each(value,new Each<Object>(){
    public void invoke(    int i,    Object ele,    int length) throws ExitLoop, LoopException {
      pojo.addParamsBy(ele);
    }
  }
);
  opt.add(pojo);
}
Program: 80433
Project: 80433
Buggy source:
public int joinParams(Entity<?> en,Object obj,Object[] params,int off){
  if (def == obj && null != obj) {
    params[off++]=def;
  }
 else {
    en=_en(en);
    if (null != obj && null != mf && mf.getEntity() == en && en.getType().isInstance(obj))     params[off++]=mf.getValue(obj);
 else     if (null != def)     params[off++]=def;
 else     if (null != obj)     params[off++]=Castors.me().castTo(obj,colType);
 else     throw Lang.impossible();
  }
  return off;
}

Fixed version (ground truth):
public int joinParams(Entity<?> en,Object obj,Object[] params,int off){
  if (def == obj && null != obj) {
    params[off++]=def;
  }
 else {
    en=_en(en);
    if (null != obj && null != mf && mf.getEntity() == en && en.getType().isInstance(obj))     params[off++]=mf.getValue(obj);
 else     if (null != def)     params[off++]=def;
 else     if (null != obj) {
      params[off++]=Castors.me().castTo(obj,colType);
    }
 else     throw Lang.impossible();
  }
  return off;
}
Program: 80434
Project: 80434
Buggy source:
public Method getCallingMethod(){
  return callingMethod;
}

Fixed version (ground truth):
/** 
 * 正在被调用的Method
 */
public Method getCallingMethod(){
  return callingMethod;
}
Program: 80435
Project: 80435
Buggy source:
public Object[] getArgs(){
  return args;
}

Fixed version (ground truth):
/** 
 * 方法调用的参数数组,如果你要改变参数,那么必须保证参数类型与方法参数兼容.
 */
public Object[] getArgs(){
  return args;
}
Program: 80437
Project: 80437
Buggy source:
public ActionInvoker get(ActionContext ac){
  String path=Mvcs.getRequestPath(ac.getRequest());
  ActionInvoker invoker=root.get(ac,path);
  if (invoker != null) {
    ActionChain chain=invoker.getActionChain(ac);
    if (chain != null) {
      if (log.isDebugEnabled()) {
        log.debugf("String_Node_Str",path,chain);
      }
      return invoker;
    }
  }
  if (log.isDebugEnabled())   log.debugf("String_Node_Str",path);
  return null;
}

Fixed version (ground truth):
public ActionInvoker get(ActionContext ac){
  String path=Mvcs.getRequestPath(ac.getRequest());
  ActionInvoker invoker=root.get(ac,path);
  if (invoker != null) {
    ActionChain chain=invoker.getActionChain(ac);
    if (chain != null) {
      if (log.isDebugEnabled()) {
        log.debugf("String_Node_Str",ac.getRequest().getMethod(),path,chain);
      }
      return invoker;
    }
  }
  if (log.isDebugEnabled())   log.debugf("String_Node_Str",path);
  return null;
}
Program: 80438
Project: 80438
Buggy source:
public void process(ActionContext ac) throws Throwable {
  RequestIocContext reqContext=null;
  try {
    if (null != moduleObj) {
      ac.setModule(moduleObj);
    }
 else {
      Ioc ioc=ac.getIoc();
      if (null == ioc)       throw Lang.makeThrow("String_Node_Str",injectName,injectName);
      Object obj;
      if (ioc instanceof Ioc2) {
        reqContext=new RequestIocContext(ac.getRequest());
        SessionIocContext sessionContext=new SessionIocContext(Mvcs.getHttpSession());
        IocContext myContext=new ComboContext(reqContext,sessionContext);
        Mvcs.setIocContext(myContext);
        obj=((Ioc2)ioc).get(moduleType,injectName,myContext);
      }
 else       obj=ioc.get(moduleType,injectName);
      ac.setModule(obj);
    }
    ac.setMethod(method);
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",ac.getPath(),method);
    doNext(ac);
  }
  finally {
    if (reqContext != null)     try {
      reqContext.depose();
    }
 catch (    Throwable e) {
      if (log.isDebugEnabled())       log.debug("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
public void process(ActionContext ac) throws Throwable {
  RequestIocContext reqContext=null;
  try {
    if (null != moduleObj) {
      ac.setModule(moduleObj);
    }
 else {
      Ioc ioc=ac.getIoc();
      if (null == ioc)       throw Lang.makeThrow("String_Node_Str",injectName,injectName);
      Object obj;
      if (ioc instanceof Ioc2) {
        reqContext=new RequestIocContext(ac.getRequest());
        SessionIocContext sessionContext=new SessionIocContext(Mvcs.getHttpSession());
        IocContext myContext=new ComboContext(reqContext,sessionContext);
        Mvcs.setIocContext(myContext);
        obj=((Ioc2)ioc).get(moduleType,injectName,myContext);
      }
 else       obj=ioc.get(moduleType,injectName);
      ac.setModule(obj);
    }
    ac.setMethod(method);
    doNext(ac);
  }
  finally {
    if (reqContext != null)     try {
      reqContext.depose();
    }
 catch (    Throwable e) {
      if (log.isDebugEnabled())       log.debug("String_Node_Str",e);
    }
  }
}
Program: 80439
Project: 80439
Buggy source:
private void _runPreparedStatement(Connection conn,DaoStatement st,Object[][] paramMatrix) throws SQLException {
  ValueAdaptor[] adaptors=st.getAdaptors();
  if (adaptors.length != paramMatrix[0].length)   throw Lang.makeThrow("String_Node_Str");
  boolean statIsClosed=false;
  String sql=st.toPreparedStatement();
  PreparedStatement pstat=null;
  if (log.isDebugEnabled())   log.debug(st);
  try {
    pstat=conn.prepareStatement(sql);
    if (paramMatrix.length == 1) {
      for (int i=0; i < paramMatrix[0].length; i++) {
        adaptors[i].set(pstat,paramMatrix[0][i],i + 1);
      }
      pstat.execute();
      st.getContext().setUpdateCount(pstat.getUpdateCount());
      pstat.close();
      statIsClosed=true;
    }
 else {
      for (      Object[] params : paramMatrix) {
        for (int i=0; i < params.length; i++) {
          adaptors[i].set(pstat,params[i],i + 1);
        }
        pstat.addBatch();
      }
      int[] counts=pstat.executeBatch();
      pstat.close();
      statIsClosed=true;
      int sum=0;
      for (      int i : counts)       sum+=i;
      st.getContext().setUpdateCount(sum);
    }
  }
  finally {
    if (!statIsClosed)     Daos.safeClose(pstat);
  }
  if (log.isTraceEnabled())   log.trace("String_Node_Str");
}

Fixed version (ground truth):
private void _runPreparedStatement(Connection conn,DaoStatement st,Object[][] paramMatrix) throws SQLException {
  ValueAdaptor[] adaptors=st.getAdaptors();
  if (adaptors.length != paramMatrix[0].length)   throw Lang.makeThrow("String_Node_Str");
  boolean statIsClosed=false;
  String sql=st.toPreparedStatement();
  PreparedStatement pstat=null;
  if (log.isDebugEnabled())   log.debug(st);
  try {
    pstat=conn.prepareStatement(sql);
    if (paramMatrix.length == 1) {
      for (int i=0; i < paramMatrix[0].length; i++) {
        adaptors[i].set(pstat,paramMatrix[0][i],i + 1);
      }
      pstat.execute();
      st.getContext().setUpdateCount(pstat.getUpdateCount());
      pstat.close();
      statIsClosed=true;
    }
 else {
      for (      Object[] params : paramMatrix) {
        for (int i=0; i < params.length; i++) {
          adaptors[i].set(pstat,params[i],i + 1);
        }
        pstat.addBatch();
      }
      int[] counts=pstat.executeBatch();
      int sum=0;
      for (      int i : counts)       if (i > 0)       sum+=i;
      if (sum == 0)       sum=pstat.getUpdateCount();
      pstat.close();
      statIsClosed=true;
      st.getContext().setUpdateCount(sum);
    }
  }
  finally {
    if (!statIsClosed)     Daos.safeClose(pstat);
  }
  if (log.isTraceEnabled())   log.trace("String_Node_Str");
}
Program: 80440
Project: 80440
Buggy source:
public FilterConvertImpl(List<String> paths){
  this.paths=paths;
}

Fixed version (ground truth):
public FilterConvertImpl(List<String> paths){
  this.items=paths;
}
Program: 80441
Project: 80441
Buggy source:
protected void DLR(String path,Object item){
  if (clude) {
    if (paths.contains(path)) {
      build.put(path,item,arrayIndex);
    }
  }
}

Fixed version (ground truth):
protected void DLR(String path,Object item){
  if (clude) {
    if (items.contains(path)) {
      build.put(path,item,arrayIndex);
    }
  }
}
Program: 80442
Project: 80442
Buggy source:
protected void LRD(String path,Object item){
  if (clude) {
    return;
  }
  for (  String p : paths) {
    if (!p.startsWith(path) && !path.startsWith(p)) {
      build.put(path,item,arrayIndex);
    }
  }
}

Fixed version (ground truth):
protected void LRD(String path,Object item){
  if (clude) {
    return;
  }
  int isFilter=0;
  for (  String p : items) {
    System.out.println(p + "String_Node_Str" + path);
    if (!(p.equals(path) || path.startsWith((p + "String_Node_Str")) || p.startsWith(path + "String_Node_Str")|| path.startsWith((p + "String_Node_Str"))|| p.startsWith(path + "String_Node_Str"))) {
      isFilter++;
    }
  }
  if (isFilter == items.size()) {
    build.put(path,item,arrayIndex);
  }
}
Program: 80443
Project: 80443
Buggy source:
private void _evalFieldMacro(Entity<?> en,List<MappingInfo> infos){
  for (  MappingInfo info : infos) {
    if (null != info.annPrev) {
      en.addBeforeInsertMacro(__macro(en.getField(info.name),_annToFieldMacroInfo(info.annPrev.els(),info.annPrev.value())));
    }
    if (null != info.annNext && en.addAfterInsertMacro(__macro(en.getField(info.name),_annToFieldMacroInfo(info.annNext.els(),info.annNext.value())))) {
      continue;
    }
 else     if (null != info.annId && info.annId.auto()) {
      MappingField idField=en.getField(info.name);
      String autoSql="String_Node_Str";
      Pojo autoInfo=new SqlFieldMacro(idField,autoSql);
      autoInfo.setEntity(en);
      en.addAfterInsertMacro(autoInfo);
    }
  }
}

Fixed version (ground truth):
private void _evalFieldMacro(Entity<?> en,List<MappingInfo> infos){
  for (  MappingInfo info : infos) {
    if (null != info.annPrev) {
      en.addBeforeInsertMacro(__macro(en.getField(info.name),_annToFieldMacroInfo(info.annPrev.els(),info.annPrev.value())));
    }
    if (null != info.annNext && en.addAfterInsertMacro(__macro(en.getField(info.name),_annToFieldMacroInfo(info.annNext.els(),info.annNext.value())))) {
      continue;
    }
 else     if (null != info.annId && info.annId.auto()) {
      en.addAfterInsertMacro(expert.fetchPojoId(en,en.getField(info.name)));
    }
  }
}
Program: 80444
Project: 80444
Buggy source:
@Override public String getDatabaseType(){
  return DB.H2.name();
}

Fixed version (ground truth):
public String getDatabaseType(){
  return DB.H2.name();
}
Program: 80445
Project: 80445
Buggy source:
public Object run(List<Object> param){
  Object obj=fetchVar();
  Mirror<?> me=null;
  me=Mirror.me(obj);
  if (param.isEmpty()) {
    return me.invoke(obj,right.toString());
  }
  return me.invoke(obj,right.toString(),param.toArray());
}

Fixed version (ground truth):
public Object run(List<Object> param){
  Object obj=fetchVar();
  Mirror<?> me=null;
  if (obj == null)   throw new NullPointerException();
  if (obj instanceof Class) {
    me=Mirror.me(obj);
    try {
      return me.invoke(obj,right.toString(),param.toArray());
    }
 catch (    InvokingException e) {
      throw e;
    }
catch (    Throwable e) {
      if (Lang.unwrapThrow(e) instanceof NoSuchMethodException) {
        me=Mirror.me(obj.getClass().getClass());
        return me.invoke(obj,right.toString(),param.toArray());
      }
      throw Lang.wrapThrow(e);
    }
  }
 else {
    me=Mirror.me(obj);
    return me.invoke(obj,right.toString(),param.toArray());
  }
}
Program: 80446
Project: 80446
Buggy source:
@Test public void testIssue308(){
  Context context=Lang.context();
  List<String> list=new ArrayList<String>();
  list.add("String_Node_Str");
  context.set("String_Node_Str",list);
  context.set("String_Node_Str",System.class);
}

Fixed version (ground truth):
@Test public void testIssue308(){
  Context context=Lang.context();
  List<String> list=new ArrayList<String>();
  list.add("String_Node_Str");
  context.set("String_Node_Str",list);
  context.set("String_Node_Str",System.class);
  El.eval(context,"String_Node_Str");
}
Program: 80447
Project: 80447
Buggy source:
private void _checkupEntityFieldsWithDatabase(NutEntity<?> en){
  Connection conn=null;
  try {
    conn=Trans.getConnectionAuto(datasource);
    expert.setupEntityField(conn,en);
  }
 catch (  Exception e) {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",en.getType().getName(),en.getTableName(),e.getClass().getName(),e.getMessage());
  }
 finally {
    if (null != conn) {
      try {
        conn.close();
      }
 catch (      SQLException e) {
        if (log.isWarnEnabled())         log.warn("String_Node_Str",e);
      }
    }
  }
}

Fixed version (ground truth):
private void _checkupEntityFieldsWithDatabase(NutEntity<?> en){
  Connection conn=null;
  try {
    conn=Trans.getConnectionAuto(datasource);
    expert.setupEntityField(conn,en);
  }
 catch (  Exception e) {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",en.getType().getName(),en.getTableName(),e.getClass().getName(),e.getMessage());
  }
 finally {
    Trans.closeConnectionAuto(conn);
  }
}
Program: 80448
Project: 80448
Buggy source:
/** 
 * 如果在事务中,则返回事务的连接,否则直接从数据源取一个新的连接
 * @param ds
 * @return
 * @throws SQLException
 */
public static Connection getConnectionAuto(DataSource ds) throws SQLException {
  if (get() == null)   return ds.getConnection();
 else   return get().getConnection(ds);
}

Fixed version (ground truth):
/** 
 * 如果在事务中,则返回事务的连接,否则直接从数据源取一个新的连接
 */
public static Connection getConnectionAuto(DataSource ds) throws SQLException {
  if (get() == null)   return ds.getConnection();
 else   return get().getConnection(ds);
}
Program: 80449
Project: 80449
Buggy source:
public FileResource(String base,File file){
  base=Disks.normalize(Disks.getCanonicalPath(base));
  if (!base.endsWith("String_Node_Str"))   base+="String_Node_Str";
  this.name=Disks.normalize(Disks.getCanonicalPath(file.getAbsolutePath()));
  this.name=this.name.substring(this.name.indexOf(base) + base.length()).replace('\\','/');
  this.file=file;
}

Fixed version (ground truth):
public FileResource(String base,File file){
  base=Disks.normalize(Disks.getCanonicalPath(base));
  if (base == null)   base="String_Node_Str";
 else   if (!base.endsWith("String_Node_Str"))   base+="String_Node_Str";
  this.name=Disks.normalize(Disks.getCanonicalPath(file.getAbsolutePath()));
  this.name=this.name.substring(this.name.indexOf(base) + base.length()).replace('\\','/');
  this.file=file;
}
Program: 80450
Project: 80450
Buggy source:
public Object run(List<Object> param){
  Object obj=fetchVar();
  Mirror<?> me=null;
  if (obj instanceof Class) {
    me=Mirror.me((Class<?>)obj);
  }
 else {
    me=Mirror.me(obj);
  }
  if (param.isEmpty()) {
    return me.invoke(obj,right.toString());
  }
  return me.invoke(obj,right.toString(),param.toArray());
}

Fixed version (ground truth):
public Object run(List<Object> param){
  Object obj=fetchVar();
  Mirror<?> me=null;
  me=Mirror.me(obj);
  if (param.isEmpty()) {
    return me.invoke(obj,right.toString());
  }
  return me.invoke(obj,right.toString(),param.toArray());
}
Program: 80451
Project: 80451
Buggy source:
/** 
 * 转换数据,主要是转换负号,方法执行
 */
private Object parseItem(Object item){
  if (paramSize == 0) {
    if (!(item instanceof Operator)) {
      paramSize=1;
    }
  }
 else {
    if (item instanceof CommaOpt) {
      paramSize++;
    }
  }
  if (item instanceof LBracketOpt) {
    if (prev instanceof Elobj) {
      prem=new MethodOpt();
      item=new Object[]{prem,new LBracketOpt()};
      paramSize=0;
      bracket.addFirst(BracketType.Method);
    }
 else {
      bracket.addFirst(BracketType.Default);
    }
  }
  if (item instanceof RBracketOpt) {
switch (bracket.poll()) {
case Method:
      prem.setSize(paramSize);
    paramSize=-1;
  item=new Object[]{new RBracketOpt(),new InvokeMethodOpt()};
prem=null;
break;
default :
break;
}
}
if (item instanceof SubOpt && NegativeOpt.isNegetive(prev)) {
item=new NegativeOpt();
}
prev=item;
return item;
}

Fixed version (ground truth):
/** 
 * 转换数据,主要是转换负号,方法执行
 */
private Object parseItem(Object item){
  if (methods.peek() != null) {
    MethodOpt opt=methods.peek();
    if (opt.getSize() <= 0) {
      if (!(item instanceof CommaOpt) && !(item instanceof RBracketOpt)) {
        opt.setSize(1);
      }
    }
 else {
      if (item instanceof CommaOpt) {
        opt.setSize(opt.getSize() + 1);
      }
    }
  }
  if (item instanceof LBracketOpt) {
    if (prev instanceof Elobj) {
      MethodOpt prem=new MethodOpt();
      item=new Object[]{prem,new LBracketOpt()};
      methods.addFirst(prem);
    }
 else {
      methods.addFirst(null);
    }
  }
  if (item instanceof RBracketOpt) {
    if (methods.poll() != null) {
      item=new Object[]{new RBracketOpt(),new InvokeMethodOpt()};
    }
  }
  if (item instanceof SubOpt && NegativeOpt.isNegetive(prev)) {
    item=new NegativeOpt();
  }
  prev=item;
  return item;
}
Program: 80453
Project: 80453
Buggy source:
/** 
 * 取得变得的值
 */
public Object fetchVar(){
  if (left instanceof AccessOpt) {
    return ((AccessOpt)left).fetchVar();
  }
  if (left instanceof Operator) {
    return ((Operator)left).calculate();
  }
  if (left instanceof Elobj) {
    Object obj=((Elobj)left).fetchVal();
    if (right instanceof FieldObj) {
      try {
        return Mirror.me(obj).getField(((Elobj)right).getVal());
      }
 catch (      NoSuchFieldException e) {
        throw Lang.wrapThrow(e);
      }
    }
    return obj;
  }
  return left;
}

Fixed version (ground truth):
/** 
 * 取得变得的值
 */
public Object fetchVar(){
  if (left instanceof AccessOpt) {
    return ((AccessOpt)left).fetchVar();
  }
  if (left instanceof Operator) {
    return ((Operator)left).calculate();
  }
  if (left instanceof Elobj) {
    Object obj=((Elobj)left).fetchVal();
    if (right instanceof FieldObj) {
      return Mirror.me(obj).getValue(obj,((Elobj)right).getVal());
    }
    return obj;
  }
  return left;
}
Program: 80454
Project: 80454
Buggy source:
@Test public void testIssue303(){
  Context context=Lang.context();
  Issue303 item=new Issue303("String_Node_Str");
  item.child=new Issue303("String_Node_Str");
  context.set("String_Node_Str",item);
  assertEquals("String_Node_Str",El.eval(context,"String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testIssue303(){
  Context context=Lang.context();
  Issue303 item=new Issue303("String_Node_Str");
  item.child=new Issue303("String_Node_Str");
  context.set("String_Node_Str",item);
  assertEquals("String_Node_Str",El.eval(context,"String_Node_Str"));
  assertEquals(0,El.eval(context,"String_Node_Str"));
}
Program: 80455
Project: 80455
Buggy source:
public IdentifierObj(String val){
  this.val=val;
}

Fixed version (ground truth):
public IdentifierObj(String val){
  super(val);
}
Program: 80456
Project: 80456
Buggy source:
/** 
 * 取得变得的值
 */
public Object fetchVar(){
  if (left instanceof AccessOpt) {
    return ((AccessOpt)left).fetchVar();
  }
  if (left instanceof Operator) {
    return ((Operator)left).calculate();
  }
  if (left instanceof Elobj) {
    return ((Elobj)left).fetchVal();
  }
  return left;
}

Fixed version (ground truth):
/** 
 * 取得变得的值
 */
public Object fetchVar(){
  if (left instanceof AccessOpt) {
    return ((AccessOpt)left).fetchVar();
  }
  if (left instanceof Operator) {
    return ((Operator)left).calculate();
  }
  if (left instanceof Elobj) {
    Object obj=((Elobj)left).fetchVal();
    if (right instanceof FieldObj) {
      try {
        return Mirror.me(obj).getField(((Elobj)right).getVal());
      }
 catch (      NoSuchFieldException e) {
        throw Lang.wrapThrow(e);
      }
    }
    return obj;
  }
  return left;
}
Program: 80457
Project: 80457
Buggy source:
private void _checkupEntityFieldsWithDatabase(NutEntity<?> en){
  Connection conn=null;
  try {
    conn=datasource.getConnection();
    expert.setupEntityField(conn,en);
  }
 catch (  Exception e) {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",en.getType().getName(),en.getTableName(),e.getClass().getName(),e.getMessage());
  }
 finally {
    if (null != conn) {
      try {
        conn.close();
      }
 catch (      SQLException e) {
        if (log.isWarnEnabled())         log.warn("String_Node_Str",e);
      }
    }
  }
}

Fixed version (ground truth):
private void _checkupEntityFieldsWithDatabase(NutEntity<?> en){
  Connection conn=null;
  try {
    conn=Trans.getConnectionAuto(datasource);
    expert.setupEntityField(conn,en);
  }
 catch (  Exception e) {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",en.getType().getName(),en.getTableName(),e.getClass().getName(),e.getMessage());
  }
 finally {
    if (null != conn) {
      try {
        conn.close();
      }
 catch (      SQLException e) {
        if (log.isWarnEnabled())         log.warn("String_Node_Str",e);
      }
    }
  }
}
Program: 80458
Project: 80458
Buggy source:
/** 
 * 根据 Java 字段创建一个实体字段信息对象
 * @param pk 复合主键
 * @param field Java 字段
 * @return 字段信息对象
 */
public static MappingInfo createMappingInfo(PK pk,Field field){
  MappingInfo info=create(MappingInfo.class,field);
  info.annPK=pk;
  info.annColumn=field.getAnnotation(Column.class);
  info.annDefine=field.getAnnotation(ColDefine.class);
  info.annDefault=field.getAnnotation(Default.class);
  info.annId=field.getAnnotation(Id.class);
  info.annName=field.getAnnotation(Name.class);
  info.annNext=field.getAnnotation(Next.class);
  info.annPrev=field.getAnnotation(Prev.class);
  info.annReadonly=field.getAnnotation(Readonly.class);
  info.columnComment=field.getAnnotation(Comment.class);
  return info;
}

Fixed version (ground truth):
/** 
 * 根据 Java 字段创建一个实体字段信息对象
 * @param pk 复合主键
 * @param field Java 字段
 * @return 字段信息对象
 */
public static MappingInfo createMappingInfo(PK pk,Field field){
  MappingInfo info=create(MappingInfo.class,field);
  info.annPK=pk;
  info.annColumn=field.getAnnotation(Column.class);
  info.annDefine=field.getAnnotation(ColDefine.class);
  info.annDefault=field.getAnnotation(Default.class);
  info.annId=field.getAnnotation(Id.class);
  info.annName=field.getAnnotation(Name.class);
  info.annNext=field.getAnnotation(Next.class);
  info.annPrev=field.getAnnotation(Prev.class);
  info.annReadonly=field.getAnnotation(Readonly.class);
  info.columnComment=field.getAnnotation(Comment.class);
  if (info.annId != null) {
    if (!Mirror.me(field.getType()).isIntLike())     throw Lang.makeThrow(DaoException.class,"String_Node_Str",field);
  }
  if (info.annName != null)   if (!Mirror.me(field.getType()).isStringLike())   throw Lang.makeThrow(DaoException.class,"String_Node_Str",field);
  return info;
}
Program: 80459
Project: 80459
Buggy source:
public void wrap(Queue<Object> rpn){
  if (rpn.peek() instanceof AccessOpt) {
    left=rpn.poll();
    return;
  }
  if (getSize() <= 0) {
    left=rpn.poll();
  }
 else {
    right=rpn.poll();
    left=rpn.poll();
  }
}

Fixed version (ground truth):
public void wrap(Queue<Object> rpn){
  if (getSize() <= 0) {
    left=rpn.poll();
  }
 else {
    right=rpn.poll();
    left=rpn.poll();
  }
}
Program: 80460
Project: 80460
Buggy source:
/** 
 * 转换数据,主要是转换负号,方法执行
 */
private Object parseItem(Object item){
  paramSize++;
  if (item instanceof LBracketOpt) {
    if (prev instanceof Elobj) {
      prem=new MethodOpt();
      item=new Object[]{prem,new LBracketOpt()};
      paramSize=0;
      bracket.addFirst(BracketType.Method);
    }
 else {
      bracket.addFirst(BracketType.Default);
    }
  }
  if (item instanceof RBracketOpt) {
switch (bracket.poll()) {
case Method:
      prem.setSize(paramSize - 1);
    item=new Object[]{new RBracketOpt(),new InvokeMethodOpt()};
  prem=null;
break;
default :
break;
}
}
if (item instanceof SubOpt && NegativeOpt.isNegetive(prev)) {
item=new NegativeOpt();
}
prev=item;
return item;
}

Fixed version (ground truth):
/** 
 * 转换数据,主要是转换负号,方法执行
 */
private Object parseItem(Object item){
  if (paramSize == 0) {
    if (!(item instanceof Operator)) {
      paramSize=1;
    }
  }
 else {
    if (item instanceof CommaOpt) {
      paramSize++;
    }
  }
  if (item instanceof LBracketOpt) {
    if (prev instanceof Elobj) {
      prem=new MethodOpt();
      item=new Object[]{prem,new LBracketOpt()};
      paramSize=0;
      bracket.addFirst(BracketType.Method);
    }
 else {
      bracket.addFirst(BracketType.Default);
    }
  }
  if (item instanceof RBracketOpt) {
switch (bracket.poll()) {
case Method:
      prem.setSize(paramSize);
    paramSize=-1;
  item=new Object[]{new RBracketOpt(),new InvokeMethodOpt()};
prem=null;
break;
default :
break;
}
}
if (item instanceof SubOpt && NegativeOpt.isNegetive(prev)) {
item=new NegativeOpt();
}
prev=item;
return item;
}
Program: 80461
Project: 80461
Buggy source:
public Object get(ResultSet rs,String colName) throws SQLException {
  File f=this.createTempFile();
  Clob clob=rs.getClob(colName);
  if (clob == null)   return null;
  Files.write(f,clob.getAsciiStream());
  return new SimpleClob(f);
}

Fixed version (ground truth):
public Object get(ResultSet rs,String colName) throws SQLException {
  File f=this.createTempFile();
  Clob clob=rs.getClob(colName);
  if (clob == null)   return null;
  Files.write(f,clob.getCharacterStream());
  return new SimpleClob(f);
}
Program: 80462
Project: 80462
Buggy source:
public Object get(ResultSet rs,String colName) throws SQLException {
  File f=this.createTempFile();
  Clob clob=rs.getClob(colName);
  if (clob == null)   return null;
  Files.write(f,clob.getAsciiStream());
  return new SimpleClob(f);
}

Fixed version (ground truth):
public Object get(ResultSet rs,String colName) throws SQLException {
  File f=this.createTempFile();
  Clob clob=rs.getClob(colName);
  if (clob == null)   return null;
  Files.write(f,clob.getCharacterStream());
  return new SimpleClob(f);
}
Program: 80463
Project: 80463
Buggy source:
public void truncate(long len) throws SQLException {
  Files.write(file,new Byte[]{});
}

Fixed version (ground truth):
public void truncate(long len) throws SQLException {
  try {
    new RandomAccessFile(file,"String_Node_Str").setLength(len);
  }
 catch (  FileNotFoundException e) {
    throw Lang.wrapThrow(e);
  }
catch (  IOException e) {
    throw Lang.wrapThrow(e);
  }
}
Program: 80464
Project: 80464
Buggy source:
@Override public boolean dropEntity(Dao dao,Entity<?> en){
  if (super.dropEntity(dao,en)) {
    if (en.getPks().isEmpty())     return true;
    List<Sql> sqls=new ArrayList<Sql>();
    for (    MappingField pk : en.getPks()) {
      String sql=gSQL(DSEQ,en.getTableName(),pk.getColumnName());
      sqls.add(Sqls.create(sql));
    }
    try {
      dao.execute(sqls.toArray(new Sql[sqls.size()]));
      return true;
    }
 catch (    Exception e) {
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean dropEntity(Dao dao,Entity<?> en){
  if (super.dropEntity(dao,en)) {
    if (en.getPks().isEmpty())     return true;
    List<Sql> sqls=new ArrayList<Sql>();
    for (    MappingField pk : en.getPks()) {
      if (pk.isAutoIncreasement()) {
        String sql=gSQL(DSEQ,en.getTableName(),pk.getColumnName());
        sqls.add(Sqls.create(sql));
      }
    }
    try {
      dao.execute(sqls.toArray(new Sql[sqls.size()]));
      return true;
    }
 catch (    Exception e) {
    }
  }
  return false;
}
Program: 80465
Project: 80465
Buggy source:
private void evalLocalization(NutConfig config,Class<?> mainModule){
  Localization lc=mainModule.getAnnotation(Localization.class);
  if (null != lc) {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",lc.value());
    Map<String,Map<String,Object>> msgss=Mirror.me(lc.type()).born().load(lc.value());
    Mvcs.setMessageSet(msgss);
  }
 else   if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
}

Fixed version (ground truth):
private void evalLocalization(NutConfig config,Class<?> mainModule){
  Localization lc=mainModule.getAnnotation(Localization.class);
  if (null != lc) {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",lc.value());
    MessageLoader msgLoader=null;
    if (!Strings.isBlank(lc.beanName())) {
      msgLoader=config.getIoc().get(lc.type(),lc.beanName());
    }
 else {
      msgLoader=Mirror.me(lc.type()).born();
    }
    Map<String,Map<String,Object>> msgss=msgLoader.load(lc.value());
    Mvcs.setMessageSet(msgss);
  }
 else   if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
}
Program: 80466
Project: 80466
Buggy source:
private ViewMaker[] createViewMakers(Class<?> mainModule) throws Exception {
  Views vms=mainModule.getAnnotation(Views.class);
  ViewMaker[] makers;
  int i=0;
  if (null != vms) {
    makers=new ViewMaker[vms.value().length + 1];
    for (; i < vms.value().length; i++)     makers[i]=Mirror.me(vms.value()[i]).born();
  }
 else {
    makers=new ViewMaker[1];
  }
  makers[i]=new DefaultViewMaker();
  if (log.isDebugEnabled()) {
    StringBuilder sb=new StringBuilder();
    sb.append(makers[0].getClass().getSimpleName());
    for (i=1; i < makers.length; i++)     sb.append(',').append(makers[i].getClass().getSimpleName());
    log.debugf("String_Node_Str",sb);
  }
  return makers;
}

Fixed version (ground truth):
private ViewMaker[] createViewMakers(Class<?> mainModule) throws Exception {
  Views vms=mainModule.getAnnotation(Views.class);
  ViewMaker[] makers;
  int i=0;
  if (null != vms) {
    makers=new ViewMaker[vms.value().length + 1];
    for (; i < vms.value().length; i++)     makers[i]=Mirror.me(vms.value()[i]).born();
  }
 else {
    makers=new ViewMaker[1];
  }
  makers[i]=new DefaultViewMaker();
  if (log.isDebugEnabled()) {
    StringBuilder sb=new StringBuilder();
    sb.append(makers[0].getClass().getSimpleName());
    for (i=0; i < makers.length - 1; i++)     sb.append(',').append(makers[i].getClass().getSimpleName());
    log.debugf("String_Node_Str",sb);
  }
  return makers;
}
Program: 80467
Project: 80467
Buggy source:
/** 
 * 获取当前会话的 Locale 名称
 */
public static String getLocaleName(HttpSession session){
  return (String)session.getAttribute(LOCALE_NAME);
}

Fixed version (ground truth):
/** 
 * 获取当前会话的 Locale 名称
 */
@Deprecated public static String getLocaleName(HttpSession session){
  return (String)session.getAttribute(LOCALE_KEY);
}
Program: 80468
Project: 80468
Buggy source:
/** 
 * 判断当前会话是否已经设置了本地字符串表
 */
public static boolean hasLocale(HttpSession session){
  return null != session.getAttribute(MSG);
}

Fixed version (ground truth):
/** 
 * 判断当前会话是否已经设置了本地字符串表
 */
@Deprecated public static boolean hasLocale(HttpSession session){
  return null != session.getAttribute(MSG);
}
Program: 80469
Project: 80469
Buggy source:
/** 
 * 为当前会话设置 Locale 的名称
 */
public static void setLocaleName(HttpSession session,String name){
  session.setAttribute(LOCALE_NAME,name);
  session.removeAttribute(MSG);
}

Fixed version (ground truth):
/** 
 * 为当前会话设置 Locale 的名称
 */
@Deprecated public static void setLocaleName(HttpSession session,String name){
  session.setAttribute(LOCALE_KEY,name);
  session.removeAttribute(MSG);
}
Program: 80470
Project: 80470
Buggy source:
/** 
 * 判断当前会话是够设置了特殊的 Locale 的名称。
 */
public static boolean hasLocaleName(HttpSession session){
  return !Strings.isBlank(getLocaleName(session));
}

Fixed version (ground truth):
/** 
 * 判断当前会话是够设置了特殊的 Locale 的名称。
 */
@Deprecated public static boolean hasLocaleName(HttpSession session){
  return !Strings.isBlank(getLocaleName(session));
}
Program: 80471
Project: 80471
Buggy source:
/** 
 * 为当前的 HTTP 请求对象设置一些必要的属性。包括： <ul> <li>本地化子字符串 => ${msg} <li>应用的路径名 => ${base} </ul>
 * @param req HTTP 请求对象
 */
@SuppressWarnings("String_Node_Str") public static void updateRequestAttributes(HttpServletRequest req){
  HttpSession sess=getHttpSession();
  if (null != getMessageSet()) {
    Map<String,Object> msgs=null;
    if (!hasLocale(sess))     msgs=setLocale(sess,getLocaleName(sess));
 else     msgs=(Map<String,Object>)sess.getAttribute(MSG);
    if (null == msgs) {
      Map<String,Map<String,Object>> msgss=getMessageSet();
      if (msgss.size() > 0)       msgs=msgss.values().iterator().next();
    }
    req.setAttribute(MSG,msgs);
  }
  req.setAttribute("String_Node_Str",req.getContextPath());
  req.setAttribute("String_Node_Str",req);
}

Fixed version (ground truth):
/** 
 * 为当前的 HTTP 请求对象设置一些必要的属性。包括： <ul> <li>本地化子字符串 => ${msg} <li>应用的路径名 => ${base} </ul>
 * @param req HTTP 请求对象
 */
public static void updateRequestAttributes(HttpServletRequest req){
  Map<String,Map<String,Object>> msgss=getMessageSet();
  if (null != msgss) {
    Map<String,Object> msgs=null;
    String lKey=Mvcs.getLocalizationKey();
    if (!Strings.isBlank(lKey))     msgs=msgss.get(lKey);
    if (null == msgs) {
      if (msgss.size() > 0)       msgs=msgss.values().iterator().next();
    }
    req.setAttribute(MSG,msgs);
  }
  req.setAttribute("String_Node_Str",req.getContextPath());
  req.setAttribute("String_Node_Str",req);
}
Program: 80472
Project: 80472
Buggy source:
/** 
 * 获取整个应用的默认字符串表
 * @param context 上下文
 * @return 字符串表
 */
public static Map<String,Object> getDefaultLocaleMessage(ServletContext context){
  Map<String,Map<String,Object>> msgss=getMessageSet();
  if (null != msgss)   return msgss.get(DEFAULT_MSGS);
  return null;
}

Fixed version (ground truth):
/** 
 * 获取整个应用的默认字符串表
 * @param context 上下文
 * @return 字符串表
 */
@Deprecated public static Map<String,Object> getDefaultLocaleMessage(ServletContext context){
  Map<String,Map<String,Object>> msgss=getMessageSet();
  if (null != msgss)   return msgss.get(DEFAULT_MSGS);
  return null;
}
Program: 80473
Project: 80473
Buggy source:
/** 
 * 获取整个应用可用的 Locale 名称集合
 */
public static Set<String> getLocaleNames(ServletContext context){
  Map<String,Map<String,Object>> msgss=getMessageSet();
  if (null != msgss)   return msgss.keySet();
  return null;
}

Fixed version (ground truth):
/** 
 * 获取整个应用可用的 Locale 名称集合
 */
@Deprecated public static Set<String> getLocaleNames(ServletContext context){
  Map<String,Map<String,Object>> msgss=getMessageSet();
  if (null != msgss)   return msgss.keySet();
  return null;
}
Program: 80474
Project: 80474
Buggy source:
/** 
 * 为当前会话设置本地字符串表。如果传入的 localeName 为空，或者不存在该表，则用默认字符串表替代。 执行完毕后，在 session 中会有一个属性（名称请参见 Mvcs.MSGS 定义） <p> 在 jsp 中，你可以用 EL 表达式 ${msgs.xxx} 来直接获取字符串的值。
 * @return 设置的 本地化字符串表
 */
public static Map<String,Object> setLocale(HttpSession session,String localeName){
  Map<String,Map<String,Object>> msgss=getMessageSet();
  if (null != msgss) {
    Map<String,Object> msgs=null;
    if (null != localeName)     msgs=msgss.get(localeName);
    if (null == msgs)     msgs=msgss.get(DEFAULT_MSGS);
    if (null != msgs)     session.setAttribute(MSG,msgs);
    return msgs;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * 为当前会话设置本地字符串表。如果传入的 localeName 为空，或者不存在该表，则用默认字符串表替代。 执行完毕后，在 session 中会有一个属性（名称请参见 Mvcs.MSGS 定义） <p> 在 jsp 中，你可以用 EL 表达式 ${msgs.xxx} 来直接获取字符串的值。
 * @return 设置的 本地化字符串表
 */
@Deprecated public static Map<String,Object> setLocale(HttpSession session,String localeName){
  Map<String,Map<String,Object>> msgss=getMessageSet();
  if (null != msgss) {
    Map<String,Object> msgs=null;
    if (null != localeName)     msgs=msgss.get(localeName);
    if (null == msgs)     msgs=msgss.get(DEFAULT_MSGS);
    if (null != msgs)     session.setAttribute(MSG,msgs);
    return msgs;
  }
  return null;
}
Program: 80475
Project: 80475
Buggy source:
@Override protected String evalFieldType(MappingField mf){
switch (mf.getColumnType()) {
case BOOLEAN:
    return "String_Node_Str";
case TIMESTAMP:
  return "String_Node_Str";
case DATETIME:
case DATE:
case TIME:
return "String_Node_Str";
case INT:
if (mf.getWidth() > 0) return "String_Node_Str" + mf.getWidth() + "String_Node_Str";
return "String_Node_Str";
case FLOAT:
if (mf.getWidth() > 0 && mf.getPrecision() > 0) {
return "String_Node_Str" + mf.getWidth() + "String_Node_Str"+ mf.getPrecision()+ "String_Node_Str";
}
if (mf.getTypeMirror().isDouble()) return "String_Node_Str";
return "String_Node_Str";
}
return super.evalFieldType(mf);
}

Fixed version (ground truth):
@Override protected String evalFieldType(MappingField mf){
switch (mf.getColumnType()) {
case BOOLEAN:
    return "String_Node_Str";
case TIMESTAMP:
  return "String_Node_Str";
case DATETIME:
case DATE:
case TIME:
return "String_Node_Str";
case INT:
if (mf.getWidth() > 0) return "String_Node_Str" + mf.getWidth() + "String_Node_Str";
return "String_Node_Str";
case FLOAT:
if (mf.getWidth() > 0 && mf.getPrecision() > 0) {
return "String_Node_Str" + mf.getWidth() + "String_Node_Str"+ mf.getPrecision()+ "String_Node_Str";
}
if (mf.getTypeMirror().isDouble()) return "String_Node_Str";
return "String_Node_Str";
case BINARY:
return "String_Node_Str";
}
return super.evalFieldType(mf);
}
Program: 80476
Project: 80476
Buggy source:
/** 
 * 判断当前类型是否为POJO。 除了下面的类型，其他均为 POJO <ul> <li>原生以及所有包裹类 <li>类字符串 <li>类日期 <li>非容器 </ul>
 * @return true or false
 */
public boolean isPojo(){
  if (this.klass.isPrimitive())   return false;
  if (this.isStringLike() || this.isDateTimeLike())   return false;
  if (this.isPrimitiveNumber() || this.isBoolean() || this.isChar())   return false;
  return !isContainer();
}

Fixed version (ground truth):
/** 
 * 判断当前类型是否为POJO。 除了下面的类型，其他均为 POJO <ul> <li>原生以及所有包裹类 <li>类字符串 <li>类日期 <li>非容器 </ul>
 * @return true or false
 */
public boolean isPojo(){
  if (this.klass.isPrimitive() || this.isEnum())   return false;
  if (this.isStringLike() || this.isDateTimeLike())   return false;
  if (this.isPrimitiveNumber() || this.isBoolean() || this.isChar())   return false;
  return !isContainer();
}
Program: 80477
Project: 80477
Buggy source:
@Override public void formatQuery(Sql sql){
  sql.getContext().setResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE);
}

Fixed version (ground truth):
public void formatQuery(Sql sql){
  sql.getContext().setResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE);
}
Program: 80478
Project: 80478
Buggy source:
/** 
 * 为一个输出流包裹一个缓冲流。如果这个输出流本身就是缓冲流，则直接返回
 * @param ops 输出流。
 * @return 缓冲输出流
 */
public static BufferedOutputStream buff(OutputStream ops){
  if (ops instanceof BufferedOutputStream)   return (BufferedOutputStream)ops;
  return new BufferedOutputStream(ops);
}

Fixed version (ground truth):
/** 
 * 为一个输出流包裹一个缓冲流。如果这个输出流本身就是缓冲流，则直接返回
 * @param ops 输出流。
 * @return 缓冲输出流
 */
public static BufferedOutputStream buff(OutputStream ops){
  if (ops == null)   throw new NullPointerException("String_Node_Str");
  if (ops instanceof BufferedOutputStream)   return (BufferedOutputStream)ops;
  return new BufferedOutputStream(ops);
}
Program: 80479
Project: 80479
Buggy source:
public void setProductName(String productName){
  this.productName=productName;
  String proName=productName.toLowerCase();
  if ("String_Node_Str".equals(proName)) {
    type=DB.H2;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.PSQL;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.MYSQL;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.ORACLE;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.DB2;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.SQLSERVER;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.SQLITE;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.HSQL;
  }
 else {
    type=DB.OTHER;
  }
}

Fixed version (ground truth):
public void setProductName(String productName){
  this.productName=productName;
  String proName=productName.toLowerCase();
  if ("String_Node_Str".equals(proName)) {
    type=DB.H2;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.PSQL;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.MYSQL;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.ORACLE;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.DB2;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.SQLSERVER;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.SQLITE;
  }
 else   if (proName.startsWith("String_Node_Str")) {
    type=DB.HSQL;
  }
 else   if (proName.contains("String_Node_Str")) {
    type=DB.DERBY;
  }
 else {
    type=DB.OTHER;
  }
}
Program: 80480
Project: 80480
Buggy source:
protected String createResultSetMetaSql(Entity<?> en){
  return "String_Node_Str" + en.getViewName();
}

Fixed version (ground truth):
protected String createResultSetMetaSql(Entity<?> en){
  return "String_Node_Str" + en.getViewName() + "String_Node_Str";
}
Program: 80481
Project: 80481
Buggy source:
void visitX(int i){
  if (i < 6) {
    mv.visitInsn(i + ICONST_0);
  }
 else {
    mv.visitIntInsn(BIPUSH,i);
  }
}

Fixed version (ground truth):
void visitX(int i){
  if (i < 6) {
    mv.visitInsn(i + ICONST_0);
  }
 else {
    if (i < Byte.MAX_VALUE)     mv.visitIntInsn(BIPUSH,i);
 else     mv.visitIntInsn(SIPUSH,i);
  }
}