nus-yam/ex-repair huggingface dataset:
Program: 43240
Project: 43240
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: 43241
Project: 43241
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: 43242
Project: 43242
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: 43243
Project: 43243
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: 43244
Project: 43244
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: 43245
Project: 43245
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: 43246
Project: 43246
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: 43247
Project: 43247
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: 43248
Project: 43248
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: 43249
Project: 43249
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: 43250
Project: 43250
Buggy source:
/** 
 * 获取某一个本地字符串表
 * @param context 上下文
 * @param localeName 本地名
 * @return 字符串表
 * @see org.nutz.mvc.annotation.Localization
 * @see org.nutz.mvc.MessageLoader
 */
@Deprecated public static Map<String,String> getLocaleMessage(ServletContext context,String localeName){
  Map<String,Map<String,String>> msgss=getMessageSet();
  if (null != msgss)   return msgss.get(localeName);
  return null;
}

Fixed version (ground truth):
/** 
 * 获取某一个本地字符串表
 * @param context 上下文
 * @param localeName 本地名
 * @return 字符串表
 * @see org.nutz.mvc.annotation.Localization
 * @see org.nutz.mvc.MessageLoader
 */
@Deprecated public static Map<String,Object> getLocaleMessage(ServletContext context,String localeName){
  Map<String,Map<String,Object>> msgss=getMessageSet();
  if (null != msgss)   return msgss.get(localeName);
  return null;
}
Program: 43251
Project: 43251
Buggy source:
/** 
 * 获取整个应用的字符串表集合
 * @param context 上下文
 * @return 字符串表集合
 */
@Deprecated public static Map<String,Map<String,String>> getMessageSet(ServletContext context){
  return getMessageSet();
}

Fixed version (ground truth):
/** 
 * 获取整个应用的字符串表集合
 * @param context 上下文
 * @return 字符串表集合
 */
@Deprecated public static Map<String,Map<String,Object>> getMessageSet(ServletContext context){
  return getMessageSet();
}
Program: 43252
Project: 43252
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,String> msgs=null;
    if (!hasLocale(sess))     msgs=setLocale(sess,getLocaleName(sess));
 else     msgs=(Map<String,String>)sess.getAttribute(MSG);
    if (null == msgs) {
      Map<String,Map<String,String>> 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 请求对象
 */
@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);
}
Program: 43253
Project: 43253
Buggy source:
/** 
 * 获取整个应用的默认字符串表
 * @param context 上下文
 * @return 字符串表
 */
public static Map<String,String> getDefaultLocaleMessage(ServletContext context){
  Map<String,Map<String,String>> msgss=getMessageSet();
  if (null != msgss)   return msgss.get(DEFAULT_MSGS);
  return null;
}

Fixed version (ground truth):
/** 
 * 获取整个应用的默认字符串表
 * @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;
}
Program: 43254
Project: 43254
Buggy source:
/** 
 * 获取整个应用可用的 Locale 名称集合
 */
public static Set<String> getLocaleNames(ServletContext context){
  Map<String,Map<String,String>> msgss=getMessageSet();
  if (null != msgss)   return msgss.keySet();
  return null;
}

Fixed version (ground truth):
/** 
 * 获取整个应用可用的 Locale 名称集合
 */
public static Set<String> getLocaleNames(ServletContext context){
  Map<String,Map<String,Object>> msgss=getMessageSet();
  if (null != msgss)   return msgss.keySet();
  return null;
}
Program: 43255
Project: 43255
Buggy source:
/** 
 * 为当前会话设置本地字符串表。如果传入的 localeName 为空，或者不存在该表，则用默认字符串表替代。 执行完毕后，在 session 中会有一个属性（名称请参见 Mvcs.MSGS 定义） <p> 在 jsp 中，你可以用 EL 表达式 ${msgs.xxx} 来直接获取字符串的值。
 * @return 设置的 本地化字符串表
 */
public static Map<String,String> setLocale(HttpSession session,String localeName){
  Map<String,Map<String,String>> msgss=getMessageSet();
  if (null != msgss) {
    Map<String,String> 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 设置的 本地化字符串表
 */
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: 43257
Project: 43257
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: 43258
Project: 43258
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: 43259
Project: 43259
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: 43260
Project: 43260
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: 43261
Project: 43261
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);
  }
}
Program: 43262
Project: 43262
Buggy source:
public JarResourceLocation(String jarPath){
  this.jarPath=jarPath;
  try {
    ZipInputStream zis=Scans.makeZipInputStream(jarPath);
    ZipEntry ens=null;
    while (null != (ens=zis.getNextEntry())) {
      if (ens.isDirectory())       continue;
      names.add(ens.getName());
    }
    zis.close();
  }
 catch (  Throwable e) {
    if (log.isWarnEnabled())     log.warn("String_Node_Str" + jarPath + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
public JarResourceLocation(String jarPath){
  this.jarPath=jarPath;
  try {
    ZipInputStream zis=Scans.makeZipInputStream(jarPath);
    ZipEntry ens=null;
    while (null != (ens=zis.getNextEntry())) {
      if (ens.isDirectory())       continue;
      names.add(ens.getName());
    }
    zis.close();
  }
 catch (  Exception e) {
    throw Lang.wrapThrow(e);
  }
}
Program: 43263
Project: 43263
Buggy source:
public static ResourceLocation file(File root){
  return new FileSystemResourceLocation(root.getAbsoluteFile());
}

Fixed version (ground truth):
public static ResourceLocation file(File root){
  if (!root.exists())   return new ErrorResourceLocation(root);
  try {
    return new FileSystemResourceLocation(root.getAbsoluteFile());
  }
 catch (  Exception e) {
    return new ErrorResourceLocation(root);
  }
}
Program: 43264
Project: 43264
Buggy source:
public void scan(String base,Pattern regex,List<NutResource> list){
  try {
    for (    String ensName : names) {
      String name=ensName;
      if (name.contains("String_Node_Str"))       name=name.substring(name.lastIndexOf('/') + 1);
      if (ensName.startsWith(base) && (null == regex || regex.matcher(name).find())) {
        list.add(Scans.makeJarNutResource(jarPath,ensName,base));
      }
    }
  }
 catch (  Throwable e) {
    if (log.isWarnEnabled())     log.warn("String_Node_Str" + jarPath + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void scan(String base,Pattern regex,List<NutResource> list){
  for (  String ensName : names) {
    String name=ensName;
    if (name.contains("String_Node_Str"))     name=name.substring(name.lastIndexOf('/') + 1);
    if (ensName.startsWith(base) && (null == regex || regex.matcher(name).find())) {
      try {
        list.add(Scans.makeJarNutResource(jarPath,ensName,base));
      }
 catch (      IOException e) {
        if (log.isInfoEnabled())         log.info("String_Node_Str" + jarPath,e);
      }
    }
  }
}
Program: 43265
Project: 43265
Buggy source:
public static ResourceLocation jar(String jarPath){
  return new JarResourceLocation(jarPath);
}

Fixed version (ground truth):
public static ResourceLocation jar(String jarPath){
  try {
    return new JarResourceLocation(jarPath);
  }
 catch (  Exception e) {
    return new ErrorResourceLocation(jarPath);
  }
}
Program: 43266
Project: 43266
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<?>>();
  if (null != ann && ann.packages() != null && ann.packages().length > 0) {
    for (    String packageName : ann.packages())     scanModuleInPackage(modules,packageName);
  }
  for (  Class<?> type : list) {
    if (scan) {
      URL location=type.getProtectionDomain().getCodeSource().getLocation();
      if (log.isDebugEnabled())       log.debugf("String_Node_Str",location);
      Scans.me().registerLocation(location,"String_Node_Str");
      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;
}

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) {
      URL location=type.getProtectionDomain().getCodeSource().getLocation();
      if (log.isDebugEnabled())       log.debugf("String_Node_Str",location);
      Scans.me().registerLocation(location);
      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: 43267
Project: 43267
Buggy source:
public void registerLocation(URL url,String referPath){
  if (url == null)   return;
  try {
    if (url.toString().contains("String_Node_Str")) {
      locations.add(ResourceLocation.jar(new JarEntryInfo(url.toString()).getJarPath()));
    }
 else {
      String root=new File(url.toURI()).getAbsolutePath();
      root=root.substring(0,root.length() - referPath.length());
      locations.add(ResourceLocation.file(new File(root)));
    }
  }
 catch (  Throwable e) {
    if (log.isInfoEnabled())     log.info("String_Node_Str" + url,e);
  }
}

Fixed version (ground truth):
public void registerLocation(URL url){
  if (url == null)   return;
  try {
    if (url.toString().endsWith("String_Node_Str")) {
      locations.add(ResourceLocation.jar(new JarEntryInfo(url.toString()).getJarPath()));
    }
 else {
      locations.add(ResourceLocation.file(new File(url.toURI())));
    }
  }
 catch (  Throwable e) {
    if (log.isInfoEnabled())     log.info("String_Node_Str" + url,e);
  }
}
Program: 43268
Project: 43268
Buggy source:
private Scans(){
  locations.add(ResourceLocation.file(new File("String_Node_Str")));
  registerLocation(Nutz.class);
  try {
    String referPath="String_Node_Str";
    Enumeration<URL> urls=getClass().getClassLoader().getResources(referPath);
    while (urls.hasMoreElements()) {
      registerLocation(urls.nextElement(),referPath);
    }
  }
 catch (  IOException e) {
  }
  try {
    String classpath=System.getProperties().getProperty("String_Node_Str");
    String[] paths=classpath.split(System.getProperties().getProperty("String_Node_Str"));
    for (    String pathZ : paths) {
      if (pathZ.endsWith("String_Node_Str"))       locations.add(ResourceLocation.jar(pathZ));
 else       locations.add(ResourceLocation.file(new File(pathZ)));
    }
  }
 catch (  Throwable e) {
  }
}

Fixed version (ground truth):
private Scans(){
  locations.add(ResourceLocation.file(new File("String_Node_Str")));
  registerLocation(Nutz.class);
  try {
    String referPath="String_Node_Str";
    Enumeration<URL> urls=getClass().getClassLoader().getResources(referPath);
    while (urls.hasMoreElements()) {
      URL url=urls.nextElement();
      url=new URL(url.toString().substring(0,url.toString().length() - referPath.length() - 2));
      registerLocation(url);
    }
  }
 catch (  IOException e) {
  }
  try {
    String classpath=System.getProperties().getProperty("String_Node_Str");
    String[] paths=classpath.split(System.getProperties().getProperty("String_Node_Str"));
    for (    String pathZ : paths) {
      if (pathZ.endsWith("String_Node_Str"))       locations.add(ResourceLocation.jar(pathZ));
 else       locations.add(ResourceLocation.file(new File(pathZ)));
    }
  }
 catch (  Throwable e) {
  }
}
Program: 43269
Project: 43269
Buggy source:
@Override protected String evalFieldType(MappingField mf){
switch (mf.getColumnType()) {
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);
}

Fixed version (ground truth):
@Override protected String evalFieldType(MappingField mf){
switch (mf.getColumnType()) {
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";
case DATETIME:
return "String_Node_Str";
}
return super.evalFieldType(mf);
}
Program: 43270
Project: 43270
Buggy source:
public void registerLocation(URL url){
  if (url == null)   return;
  try {
    if (url.toString().endsWith("String_Node_Str")) {
      locations.add(ResourceLocation.jar(new JarEntryInfo(url.toString()).getJarPath()));
    }
 else {
      locations.add(ResourceLocation.file(new File(url.toURI())));
    }
  }
 catch (  Throwable e) {
    if (log.isInfoEnabled())     log.info("String_Node_Str" + url,e);
  }
}

Fixed version (ground truth):
public void registerLocation(URL url){
  if (url == null)   return;
  try {
    if (url.toString().endsWith("String_Node_Str")) {
      locations.add(ResourceLocation.jar(url.toString()));
    }
 else {
      locations.add(ResourceLocation.file(new File(url.toURI())));
    }
  }
 catch (  Throwable e) {
    if (log.isInfoEnabled())     log.info("String_Node_Str" + url,e);
  }
}
Program: 43271
Project: 43271
Buggy source:
private Scans(){
  locations.add(ResourceLocation.file(new File("String_Node_Str")));
  registerLocation(Nutz.class);
  try {
    String referPath="String_Node_Str";
    Enumeration<URL> urls=getClass().getClassLoader().getResources(referPath);
    while (urls.hasMoreElements()) {
      URL url=urls.nextElement();
      url=new URL(url.toString().substring(0,url.toString().length() - referPath.length() - 2));
      registerLocation(url);
    }
  }
 catch (  IOException e) {
  }
  try {
    String classpath=System.getProperties().getProperty("String_Node_Str");
    String[] paths=classpath.split(System.getProperties().getProperty("String_Node_Str"));
    for (    String pathZ : paths) {
      if (pathZ.endsWith("String_Node_Str"))       locations.add(ResourceLocation.jar(pathZ));
 else       locations.add(ResourceLocation.file(new File(pathZ)));
    }
  }
 catch (  Throwable e) {
  }
}

Fixed version (ground truth):
private Scans(){
  locations.add(ResourceLocation.file(new File("String_Node_Str")));
  registerLocation(Nutz.class);
  try {
    String referPath="String_Node_Str";
    Enumeration<URL> urls=getClass().getClassLoader().getResources(referPath);
    while (urls.hasMoreElements()) {
      URL url=urls.nextElement();
      if (url.toString().contains("String_Node_Str"))       url=new URL(url.toString().substring(0,url.toString().length() - referPath.length() - 2));
 else       url=new URL(url.toString().substring(0,url.toString().length() - referPath.length()));
      registerLocation(url);
    }
  }
 catch (  IOException e) {
  }
  try {
    String classpath=System.getProperties().getProperty("String_Node_Str");
    String[] paths=classpath.split(System.getProperties().getProperty("String_Node_Str"));
    for (    String pathZ : paths) {
      if (pathZ.endsWith("String_Node_Str"))       locations.add(ResourceLocation.jar(pathZ));
 else       locations.add(ResourceLocation.file(new File(pathZ)));
    }
  }
 catch (  Throwable e) {
  }
}
Program: 43272
Project: 43272
Buggy source:
protected void scanClasspath(String src,Pattern regex,List<NutResource> list){
  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),true));
  }
}

Fixed version (ground truth):
protected void scanClasspath(String src,Pattern regex,List<NutResource> list){
  try {
    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),true));
    }
  }
 catch (  Throwable e) {
  }
  try {
    Enumeration<URL> urls=getClass().getClassLoader().getResources("String_Node_Str");
    while (urls.hasMoreElements()) {
      list.addAll(scanInJar(src,regex,new JarEntryInfo(urls.nextElement().toString()).getJarPath()));
    }
  }
 catch (  Throwable e) {
  }
}
Program: 43273
Project: 43273
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 {
      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();
      }
    }
  }
  if (list.isEmpty())   scanClasspath(src,regex,list);
  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();
      }
    }
  }
  scanClasspath(src,regex,list);
  return list;
}
Program: 43274
Project: 43274
Buggy source:
/** 
 * 为一次 HTTP 请求，创建一个可以被表达式引擎接受的上下文对象
 * @param req HTTP 请求对象
 * @param obj 入口函数的返回值
 * @return 上下文对象
 */
@SuppressWarnings("String_Node_Str") public static Context createContext(HttpServletRequest req,Object obj){
  Context context=Lang.context();
  Object globalContext=Mvcs.getServletContext().getAttribute(Loading.CONTEXT_NAME);
  if (globalContext != null) {
    context.putAll((Context)globalContext);
  }
  Map<String,Object> a=new HashMap<String,Object>();
  for (Enumeration<String> en=req.getAttributeNames(); en.hasMoreElements(); ) {
    String tem=en.nextElement();
    a.put(tem,req.getAttribute(tem));
  }
  context.set("String_Node_Str",a);
  Map<String,String> p=new HashMap<String,String>();
  for (  Object o : req.getParameterMap().keySet()) {
    String key=(String)o;
    String value=req.getParameter(key);
    p.put(key,value);
    context.set(key,value);
  }
  context.set("String_Node_Str",p);
  Map<String,String> u=new HashMap<String,String>();
  AtMap at=Mvcs.getAtMap();
  if (at != null) {
    for (    Object o : at.keys()) {
      String key=(String)o;
      u.put(key,at.get(key));
    }
    context.set("String_Node_Str",u);
  }
  if (null != obj)   context.set(ViewProcessor.DEFAULT_ATTRIBUTE,obj);
  return context;
}

Fixed version (ground truth):
/** 
 * 为一次 HTTP 请求，创建一个可以被表达式引擎接受的上下文对象
 * @param req HTTP 请求对象
 * @param obj 入口函数的返回值
 * @return 上下文对象
 */
@SuppressWarnings("String_Node_Str") public static Context createContext(HttpServletRequest req,Object obj){
  Context context=Lang.context();
  Object globalContext=Mvcs.getServletContext().getAttribute(Loading.CONTEXT_NAME);
  if (globalContext != null) {
    context.putAll((Context)globalContext);
  }
  Map<String,Object> req_attr=new HashMap<String,Object>();
  for (Enumeration<String> en=req.getAttributeNames(); en.hasMoreElements(); ) {
    String tem=en.nextElement();
    req_attr.put(tem,req.getAttribute(tem));
  }
  context.set("String_Node_Str",req_attr);
  context.set("String_Node_Str",req_attr);
  Map<String,Object> session_attr=new HashMap<String,Object>();
  for (Enumeration<String> en=req.getSession().getAttributeNames(); en.hasMoreElements(); ) {
    String tem=en.nextElement();
    session_attr.put(tem,req.getAttribute(tem));
  }
  context.set("String_Node_Str",session_attr);
  Map<String,String> p=new HashMap<String,String>();
  for (  Object o : req.getParameterMap().keySet()) {
    String key=(String)o;
    String value=req.getParameter(key);
    p.put(key,value);
    context.set(key,value);
  }
  context.set("String_Node_Str",p);
  Map<String,String> u=new HashMap<String,String>();
  AtMap at=Mvcs.getAtMap();
  if (at != null) {
    for (    Object o : at.keys()) {
      String key=(String)o;
      u.put(key,at.get(key));
    }
    context.set("String_Node_Str",u);
  }
  if (null != obj)   context.set(ViewProcessor.DEFAULT_ATTRIBUTE,obj);
  return context;
}
Program: 43275
Project: 43275
Buggy source:
@SuppressWarnings({"String_Node_Str"}) protected static Collection<?> createCollection(Object src,Class<?> toType) throws FailToCastObjectException {
  Collection<?> coll=null;
  try {
    coll=(Collection<Object>)toType.newInstance();
  }
 catch (  Exception e) {
    if (Modifier.isAbstract(toType.getModifiers()) && toType.isAssignableFrom(ArrayList.class)) {
      coll=new ArrayList<Object>(Array.getLength(src));
    }
    if (null == coll)     throw new FailToCastObjectException(String.format("String_Node_Str",toType.getName()),e);
  }
  return coll;
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str"}) protected static Collection<?> createCollection(Object src,Class<?> toType) throws FailToCastObjectException {
  Collection<?> coll=null;
  try {
    coll=(Collection<Object>)toType.newInstance();
  }
 catch (  Exception e) {
    if (Modifier.isAbstract(toType.getModifiers())) {
      if (toType.isAssignableFrom(ArrayList.class)) {
        coll=new ArrayList<Object>(Array.getLength(src));
      }
 else       if (toType.isAssignableFrom(HashSet.class)) {
        coll=new HashSet<Object>();
      }
    }
    if (null == coll)     throw new FailToCastObjectException(String.format("String_Node_Str",toType.getName()),e);
  }
  return coll;
}
Program: 43276
Project: 43276
Buggy source:
public AbstractNutConfig(ServletContext context){
  Scans.me().init(context);
}

Fixed version (ground truth):
public AbstractNutConfig(ServletContext context){
  Scans.me().init(context);
  Json.clearEntityCache();
}
Program: 43277
Project: 43277
Buggy source:
private void enhandMethod(){
  for (  Method method : methodArray) {
    String methodName=method.getName();
    String methodDesc=Type.getMethodDescriptor(method);
    int methodAccess=getAccess(method.getModifiers());
    MethodVisitor mv=cw.visitMethod(methodAccess,methodName,methodDesc,null,convertExp(method.getExceptionTypes()));
    int methodIndex=findMethodIndex(methodName,methodDesc,methodArray);
    new AopMethodAdapter(mv,methodAccess,methodName,methodDesc,methodIndex,myName,enhancedSuperName).visitCode();
  }
}

Fixed version (ground truth):
private void enhandMethod(){
  for (  Method method : methodArray) {
    String methodName=method.getName();
    String methodDesc=Type.getMethodDescriptor(method);
    int methodAccess=getAccess(method.getModifiers());
    MethodVisitor mv=cw.visitMethod(methodAccess,methodName,methodDesc,null,convertExp(method.getExceptionTypes()));
    int methodIndex=findMethodIndex(methodName,methodDesc,methodArray);
    AopMethodAdapter adapter=new AopMethodAdapter(mv,methodAccess,methodName,methodDesc,methodIndex,myName,enhancedSuperName);
    adapter.visitCode();
    adapter.visitAttribute();
  }
}
Program: 43278
Project: 43278
Buggy source:
ClassY(Class<?> klass,String myName,Method[] methodArray,Constructor<?>[] constructors){
  this.myName=myName.replace('.','/');
  this.enhancedSuperName=klass.getName().replace('.','/');
  this.cw=new ClassWriter(ClassWriter.COMPUTE_FRAMES);
  cw.visit(AsmClassAgent.CLASS_LEVEL,ACC_PUBLIC,this.myName,null,enhancedSuperName,getParentInterfaces(klass));
  this.methodArray=methodArray;
  this.constructors=constructors;
}

Fixed version (ground truth):
ClassY(Class<?> klass,String myName,Method[] methodArray,Constructor<?>[] constructors){
  this.myName=myName.replace('.','/');
  this.enhancedSuperName=klass.getName().replace('.','/');
  this.cw=new ClassWriter(ClassWriter.COMPUTE_FRAMES);
  cw.visit(AsmClassAgent.CLASS_LEVEL,ACC_PUBLIC,this.myName,null,enhancedSuperName,getParentInterfaces(klass));
  this.methodArray=methodArray;
  this.constructors=constructors;
  this.superClass=klass;
}
Program: 43279
Project: 43279
Buggy source:
byte[] toByteArray(){
  addField();
  addConstructors();
  addAopMethods();
  enhandMethod();
  return cw.toByteArray();
}

Fixed version (ground truth):
byte[] toByteArray(){
  addField();
  addConstructors();
  addAopMethods();
  enhandMethod();
  cw.visitSource(superClass.getSimpleName() + "String_Node_Str",null);
  return cw.toByteArray();
}
Program: 43280
Project: 43280
Buggy source:
/** 
 * Constructs a new empty attribute.
 * @param type the type of the attribute.
 */
protected Attribute(final String type){
  this.type=type;
}

Fixed version (ground truth):
/** 
 * Constructs a new empty attribute.
 * @param type the type of the attribute.
 */
public Attribute(final String type){
  this.type=type;
}
Program: 43281
Project: 43281
Buggy source:
/** 
 * 检查一个字符串是否为合法的电子邮件地址
 * @param input 需要检查的字符串
 * @return true 如果是有效的邮箱地址
 */
public static synchronized final boolean isEmail(CharSequence input){
  return email_Pattern.matcher(input).matches();
}

Fixed version (ground truth):
/** 
 * 检查一个字符串是否为合法的电子邮件地址
 * @param input 需要检查的字符串
 * @return true 如果是有效的邮箱地址
 */
public static final boolean isEmail(CharSequence input){
  if (Strings.isBlank(input))   return false;
  try {
    new Email(input.toString());
    return true;
  }
 catch (  Exception e) {
  }
  return false;
}
Program: 43282
Project: 43282
Buggy source:
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);
}
}

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 :
log.infof("String_Node_Str",en.getType().getName(),obj);
return null;
}
}
Program: 43283
Project: 43283
Buggy source:
private <T>Pair2[] findMatchedMethod(Class<T> klass){
  Method[] all=Mirror.me(klass).getAllDeclaredMethodsWithoutTop();
  List<Pair2> p2=new ArrayList<Pair2>();
  for (  Method m : all) {
    int mod=m.getModifiers();
    if (mod == 0 || Modifier.isStatic(mod) || Modifier.isPrivate(mod))     continue;
    ArrayList<MethodInterceptor> mls=new ArrayList<MethodInterceptor>();
    for (    Pair p : pairs)     if (p.matcher.match(m))     mls.add(p.listener);
    if (mls.size() > 0)     p2.add(new Pair2(m,mls));
  }
  return p2.toArray(new Pair2[p2.size()]);
}

Fixed version (ground truth):
private <T>Pair2[] findMatchedMethod(Class<T> klass){
  Method[] all=Mirror.me(klass).getAllDeclaredMethodsWithoutTop();
  List<Pair2> p2=new ArrayList<Pair2>();
  for (  Method m : all) {
    int mod=m.getModifiers();
    if (mod == 0 || Modifier.isStatic(mod) || Modifier.isPrivate(mod) || Modifier.isFinal(mod) || Modifier.isAbstract(mod))     continue;
    ArrayList<MethodInterceptor> mls=new ArrayList<MethodInterceptor>();
    for (    Pair p : pairs)     if (p.matcher.match(m))     mls.add(p.listener);
    if (mls.size() > 0)     p2.add(new Pair2(m,mls));
  }
  return p2.toArray(new Pair2[p2.size()]);
}
Program: 43284
Project: 43284
Buggy source:
@SuppressWarnings("String_Node_Str") public Object invoke(Connection conn,ResultSet rs,Pojo pojo) throws SQLException {
  final Each<Object> each=pojo.getContext().attr(Each.class);
  if (null == each)   return null;
  final Entity<?> en=pojo.getEntity();
  ResultSetLooping ing=new ResultSetLooping(){
    protected boolean createObject(    int index,    ResultSet rs,    SqlContext context,    int rowCount){
      Object obj=en.getObject(rs,context.getFieldMatcher());
      try {
        each.invoke(index,obj,rowCount);
      }
 catch (      LoopException e) {
        throw Lang.wrapThrow(e);
      }
      return false;
    }
  }
;
  try {
    if (each instanceof Loop)     if (!((Loop<?>)each).begin())     return 0;
    ing.doLoop(rs,pojo.getContext());
    if (each instanceof Loop)     ((Loop<?>)each).end();
  }
 catch (  ExitLoop e) {
  }
catch (  LoopException e) {
    throw new SQLException(e.getCause());
  }
  return ing.getIndex() + 1;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Object invoke(Connection conn,ResultSet rs,Pojo pojo) throws SQLException {
  final Each<Object> each=pojo.getContext().attr(Each.class);
  if (null == each)   return null;
  final Entity<?> en=pojo.getEntity();
  ResultSetLooping ing=new ResultSetLooping(){
    protected boolean createObject(    int index,    ResultSet rs,    SqlContext context,    int rowCount){
      Object obj=en.getObject(rs,context.getFieldMatcher());
      try {
        each.invoke(index,obj,rowCount);
      }
 catch (      LoopException e) {
        throw Lang.wrapThrow(e);
      }
      return false;
    }
  }
;
  try {
    if (each instanceof Loop)     if (!((Loop<?>)each).begin())     return 0;
    ing.doLoop(rs,pojo.getContext());
    if (each instanceof Loop)     ((Loop<?>)each).end();
  }
 catch (  ExitLoop e) {
  }
catch (  LoopException e) {
    SQLException e2=new SQLException();
    e2.initCause(e.getCause());
    throw e2;
  }
  return ing.getIndex() + 1;
}
Program: 43285
Project: 43285
Buggy source:
@Override protected String evalFieldType(MappingField mf){
switch (mf.getColumnType()) {
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 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: 43286
Project: 43286
Buggy source:
public void set(PreparedStatement stat,Object obj,int i) throws SQLException {
  if (null == obj) {
    stat.setString(i,null);
  }
 else {
    String v=Castors.me().castToString(obj);
    stat.setString(i,v);
  }
}

Fixed version (ground truth):
public void set(PreparedStatement stat,Object obj,int index) throws SQLException {
  if (null == obj) {
    stat.setNull(index,Types.BINARY);
  }
 else {
    stat.setBytes(index,(byte[])obj);
  }
}