nus-yam/ex-repair huggingface dataset:
Program: 80483
Project: 80483
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: 80484
Project: 80484
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: 80485
Project: 80485
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: 80486
Project: 80486
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: 80487
Project: 80487
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: 80488
Project: 80488
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: 80489
Project: 80489
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: 80490
Project: 80490
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: 80491
Project: 80491
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: 80492
Project: 80492
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: 80493
Project: 80493
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: 80494
Project: 80494
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: 80495
Project: 80495
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: 80496
Project: 80496
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: 80497
Project: 80497
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: 80498
Project: 80498
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: 80499
Project: 80499
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: 80500
Project: 80500
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: 80501
Project: 80501
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: 80502
Project: 80502
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: 80503
Project: 80503
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: 80504
Project: 80504
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: 80505
Project: 80505
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: 80506
Project: 80506
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: 80507
Project: 80507
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: 80508
Project: 80508
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: 80509
Project: 80509
Buggy source:
/** 
 * 加载指定文件/文件夹的Properties文件,合并成一个Properties对象 <p> <b style=color:red>如果有重复的key,请务必注意加载的顺序!!<b/>
 * @param paths 需要加载的Properties文件路径
 */
public void setPaths(String... paths){
  mp=new MultiLineProperties();
  List<NutResource> list=Scans.me().loadResource("String_Node_Str",paths);
  try {
    if (utf8)     for (    NutResource nr : list)     mp.load(nr.getReader());
 else {
      Properties p=new Properties();
      for (      NutResource nr : list) {
        p.load(nr.getInputStream());
      }
      mp.putAll(p);
    }
  }
 catch (  IOException e) {
    throw Lang.wrapThrow(e);
  }
}

Fixed version (ground truth):
/** 
 * 加载指定文件/文件夹的Properties文件,合并成一个Properties对象 <p> <b style=color:red>如果有重复的key,请务必注意加载的顺序!!<b/>
 * @param paths 需要加载的Properties文件路径
 */
public void setPaths(String... paths){
  mp=new MultiLineProperties();
  List<NutResource> list=Scans.me().loadResource("String_Node_Str",paths);
  try {
    if (utf8)     for (    NutResource nr : list)     mp.load(nr.getReader(),false);
 else {
      Properties p=new Properties();
      for (      NutResource nr : list) {
        p.load(nr.getInputStream());
      }
      mp.putAll(p);
    }
  }
 catch (  IOException e) {
    throw Lang.wrapThrow(e);
  }
}
Program: 80510
Project: 80510
Buggy source:
public List<String> keys(){
  return keys;
}

Fixed version (ground truth):
public List<String> keys(){
  return new ArrayList<String>(maps.keySet());
}
Program: 80511
Project: 80511
Buggy source:
public MultiLineProperties(){
  maps=new HashMap<String,String>();
  keys=new LinkedList<String>();
}

Fixed version (ground truth):
public MultiLineProperties(){
  maps=new HashMap<String,String>();
}
Program: 80512
Project: 80512
Buggy source:
public synchronized void load(Reader reader) throws IOException {
  BufferedReader tr=null;
  if (reader instanceof BufferedReader)   tr=(BufferedReader)reader;
 else   tr=new BufferedReader(reader);
  this.clear();
  String s;
  while (null != (s=tr.readLine())) {
    if (Strings.isBlank(s))     continue;
    if (s.length() > 0 && s.trim().charAt(0) == '#')     continue;
    int pos;
    char c='0';
    for (pos=0; pos < s.length(); pos++) {
      c=s.charAt(pos);
      if (c == '=' || c == ':')       break;
    }
    if (c == '=') {
      String name=s.substring(0,pos);
      maps.put(name,s.substring(pos + 1));
      keys.add(name);
    }
 else     if (c == ':') {
      String name=s.substring(0,pos);
      StringBuffer sb=new StringBuffer();
      sb.append(s.substring(pos + 1));
      String ss;
      while (null != (ss=tr.readLine())) {
        if (ss.length() > 0 && ss.charAt(0) == '#')         break;
        sb.append("String_Node_Str" + ss);
      }
      maps.put(name,sb.toString());
      keys.add(name);
      if (null == ss)       return;
    }
 else {
      maps.put(s,null);
      keys.add(s);
    }
  }
}

Fixed version (ground truth):
public synchronized void load(Reader reader,boolean clear) throws IOException {
  if (clear)   this.clear();
  BufferedReader tr=null;
  if (reader instanceof BufferedReader)   tr=(BufferedReader)reader;
 else   tr=new BufferedReader(reader);
  String s;
  while (null != (s=tr.readLine())) {
    if (Strings.isBlank(s))     continue;
    if (s.length() > 0 && s.trim().charAt(0) == '#')     continue;
    int pos;
    char c='0';
    for (pos=0; pos < s.length(); pos++) {
      c=s.charAt(pos);
      if (c == '=' || c == ':')       break;
    }
    if (c == '=') {
      String name=s.substring(0,pos);
      maps.put(name,s.substring(pos + 1));
    }
 else     if (c == ':') {
      String name=s.substring(0,pos);
      StringBuffer sb=new StringBuffer();
      sb.append(s.substring(pos + 1));
      String ss;
      while (null != (ss=tr.readLine())) {
        if (ss.length() > 0 && ss.charAt(0) == '#')         break;
        sb.append("String_Node_Str" + ss);
      }
      maps.put(name,sb.toString());
      if (null == ss)       return;
    }
 else {
      maps.put(s,null);
    }
  }
}
Program: 80513
Project: 80513
Buggy source:
public void execute(final Sql... sqls){
  _exec(sqls);
}

Fixed version (ground truth):
public void execute(final Sql... sqls){
  for (  Sql sql : sqls)   expert.formatQuery(sql);
  _exec(sqls);
}
Program: 80514
Project: 80514
Buggy source:
public void formatQuery(Pojo pojo){
  Pager pager=pojo.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0) {
    pojo.insertFirst(Pojos.Items.wrap("String_Node_Str" + "String_Node_Str" + "String_Node_Str"));
    pojo.append(Pojos.Items.wrapf("String_Node_Str",pager.getOffset() + 1,pager.getOffset() + pager.getPageSize()));
  }
}

Fixed version (ground truth):
public void formatQuery(Sql sql){
  Pager pager=sql.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0) {
    String pre="String_Node_Str";
    String last=String.format("String_Node_Str",pager.getOffset() + 1,pager.getOffset() + pager.getPageSize());
    sql.setSourceSql(pre + sql.getSourceSql() + last);
  }
}
Program: 80515
Project: 80515
Buggy source:
public void formatQuery(Pojo pojo){
  Pager pager=pojo.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0) {
    pojo.append(Pojos.Items.wrapf("String_Node_Str",pager.getPageSize(),pager.getOffset()));
  }
}

Fixed version (ground truth):
public void formatQuery(Sql sql){
  Pager pager=sql.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0) {
    sql.setSourceSql(sql.getSourceSql() + String.format("String_Node_Str",pager.getPageSize(),pager.getOffset()));
  }
}
Program: 80516
Project: 80516
Buggy source:
public void formatQuery(Pojo pojo){
  Pager pager=pojo.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0)   pojo.append(Pojos.Items.wrapf("String_Node_Str",pager.getOffset(),pager.getPageSize()));
}

Fixed version (ground truth):
public void formatQuery(Sql sql){
  Pager pager=sql.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0)   sql.setSourceSql(sql.getSourceSql() + String.format("String_Node_Str",pager.getOffset(),pager.getPageSize()));
}
Program: 80517
Project: 80517
Buggy source:
public void formatQuery(Pojo pojo){
  Pager pager=pojo.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0) {
    pojo.insertFirst(Pojos.Items.wrap("String_Node_Str"));
    pojo.append(Pojos.Items.wrapf("String_Node_Str",pager.getOffset() + pager.getPageSize(),pager.getOffset()));
  }
}

Fixed version (ground truth):
@Override public void formatQuery(Sql sql){
  Pager pager=sql.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0) {
    String pre="String_Node_Str";
    String last=String.format("String_Node_Str",pager.getOffset() + pager.getPageSize(),pager.getOffset());
    sql.setSourceSql(pre + sql.getSourceSql() + last);
  }
}
Program: 80518
Project: 80518
Buggy source:
public void formatQuery(Pojo pojo){
  Pager pager=pojo.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0)   pojo.append(Pojos.Items.wrapf("String_Node_Str",pager.getPageSize(),pager.getOffset()));
}

Fixed version (ground truth):
public void formatQuery(Sql sql){
  Pager pager=sql.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0) {
    sql.setSourceSql(sql.getSourceSql() + String.format("String_Node_Str",pager.getPageSize(),pager.getOffset()));
  }
}
Program: 80519
Project: 80519
Buggy source:
@Override public void formatQuery(Pojo pojo){
  pojo.getContext().setResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE);
}

Fixed version (ground truth):
@Override public void formatQuery(Sql sql){
  sql.getContext().setResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE);
}
Program: 80520
Project: 80520
Buggy source:
public void formatQuery(Pojo pojo){
  Pager pager=pojo.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0) {
    PItem pi=pojo.getItem(0);
    StringBuilder sb=new StringBuilder();
    pi.joinSql(pojo.getEntity(),sb);
    String str=sb.toString();
    if (str.trim().toLowerCase().startsWith("String_Node_Str")) {
      pojo.setItem(0,Pojos.Items.wrap(str.substring(6)));
    }
 else     return;
    pojo.insertFirst(Pojos.Items.wrapf("String_Node_Str",pager.getOffset() + pager.getPageSize()));
    pojo.append(Pojos.Items.wrapf("String_Node_Str",pager.getOffset()));
  }
}

Fixed version (ground truth):
@Override public void formatQuery(Sql sql){
  Pager pager=sql.getContext().getPager();
  if (null != pager && pager.getPageNumber() > 0) {
    if (!sql.getSourceSql().toUpperCase().startsWith("String_Node_Str"))     return;
    String xSql=sql.getSourceSql().substring(6);
    String pre=String.format("String_Node_Str",pager.getOffset() + pager.getPageSize());
    String last=String.format("String_Node_Str",pager.getOffset());
    sql.setSourceSql(pre + xSql + last);
  }
}
Program: 80521
Project: 80521
Buggy source:
@Override 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();
}
Program: 80522
Project: 80522
Buggy source:
/** 
 * 根据 Dao 查询语句，以及其翻页信息，对其进行格式化
 * @param pojo Dao 语句
 */
void formatQuery(Pojo pojo);

Fixed version (ground truth):
/** 
 * 根据 Dao 查询语句，以及其翻页信息，对其进行格式化
 * @param pojo Dao 语句
 */
void formatQuery(DaoStatement daoStatement);
Program: 80523
Project: 80523
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: 80524
Project: 80524
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 :
log.infof("String_Node_Str",en.getType().getName(),obj);
return null;
}
}

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 :
if (Map.class.isAssignableFrom(en.getType())) {
log.infof("String_Node_Str",en.getType().getName(),obj);
return null;
}
throw Lang.makeThrow("String_Node_Str",en.getType().getName(),obj);
}
}
Program: 80525
Project: 80525
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 :
if (Map.class.isAssignableFrom(en.getType())) {
log.infof("String_Node_Str",en.getType().getName(),obj);
return null;
}
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 :
if (Map.class.isAssignableFrom(en.getType())) {
return null;
}
throw Lang.makeThrow("String_Node_Str",en.getType().getName(),obj);
}
}
Program: 80526
Project: 80526
Buggy source:
public void doLoop(ResultSet rs,SqlContext context) throws SQLException {
  Pager pager=context.getPager();
  if (null == rs)   return;
  if (null == pager || ResultSet.TYPE_FORWARD_ONLY == rs.getType() || pager.getPageNumber() <= 0) {
    if (null != pager && pager.getPageSize() > 0)     rs.setFetchSize(pager.getPageSize());
    while (rs.next()) {
      createObject(++index,rs,context,-1);
    }
  }
 else   if (rs.last()) {
    if (pager.getPageSize() <= 0)     rs.setFetchSize(Pager.DEFAULT_PAGE_SIZE);
 else     if (pager.getPageSize() > Pager.MAX_FETCH_SIZE)     rs.setFetchSize(Pager.MAX_FETCH_SIZE);
 else     rs.setFetchSize(pager.getPageSize());
    int rowCount=rs.getRow();
    LoopScope ls=LoopScope.eval(pager,rowCount);
    if (rs.absolute(ls.start + 1))     for (int i=ls.start; i < ls.max; i++) {
      createObject(++index,rs,context,rowCount);
      if (!rs.next())       break;
    }
  }
}

Fixed version (ground truth):
public void doLoop(ResultSet rs,SqlContext context) throws SQLException {
  Pager pager=context.getPager();
  if (null == rs)   return;
  if (null == pager || ResultSet.TYPE_FORWARD_ONLY == rs.getType() || pager.getPageNumber() <= 0) {
    while (rs.next()) {
      createObject(++index,rs,context,-1);
    }
  }
 else   if (rs.last()) {
    if (pager.getPageSize() <= 0)     rs.setFetchSize(Pager.DEFAULT_PAGE_SIZE);
 else     if (pager.getPageSize() > Pager.MAX_FETCH_SIZE)     rs.setFetchSize(Pager.MAX_FETCH_SIZE);
 else     rs.setFetchSize(pager.getPageSize());
    int rowCount=rs.getRow();
    LoopScope ls=LoopScope.eval(pager,rowCount);
    if (rs.absolute(ls.start + 1))     for (int i=ls.start; i < ls.max; i++) {
      createObject(++index,rs,context,rowCount);
      if (!rs.next())       break;
    }
  }
}
Program: 80527
Project: 80527
Buggy source:
public boolean canWork(){
  try {
    Class.forName("String_Node_Str",false,Thread.currentThread().getContextClassLoader());
    return true;
  }
 catch (  Throwable e) {
  }
  return false;
}

Fixed version (ground truth):
public boolean canWork(){
  try {
    Class.forName("String_Node_Str",false,Log4jLogAdapter.class.getClassLoader());
    return true;
  }
 catch (  Throwable e) {
  }
  return false;
}
Program: 80529
Project: 80529
Buggy source:
public void destroy(){
  if (handler != null)   handler.depose();
  Mvcs.setServletContext(null);
}

Fixed version (ground truth):
public void destroy(){
  Mvcs.resetALL();
  Mvcs.set(selfName,null,null);
  if (handler != null)   handler.depose();
  Mvcs.setServletContext(null);
}
Program: 80530
Project: 80530
Buggy source:
public void destroy(){
  if (handler != null)   handler.depose();
}

Fixed version (ground truth):
public void destroy(){
  Mvcs.resetALL();
  Mvcs.set(selfName,null,null);
  if (handler != null)   handler.depose();
  Mvcs.setServletContext(null);
}
Program: 80531
Project: 80531
Buggy source:
public void render(HttpServletRequest req,HttpServletResponse resp,Object obj){
  resp.setStatus(sc);
}

Fixed version (ground truth):
public void render(HttpServletRequest req,HttpServletResponse resp,Object obj){
  if (sc >= 400)   try {
    resp.sendError(sc);
  }
 catch (  IOException e) {
    throw Lang.wrapThrow(e);
  }
 else   resp.setStatus(sc);
}