nus-yam/ex-repair huggingface dataset:
Program: 80242
Project: 80242
Buggy source:
@Override public DatagramSocket listenMulticastGroup(String multicastAddress,String networkInterface,String source,Handler<AsyncResult<DatagramSocket>> handler){
  configurable=false;
  try {
    addListener(channel().joinGroup(InetAddress.getByName(multicastAddress),NetworkInterface.getByName(networkInterface),InetAddress.getByName(source)),handler);
  }
 catch (  Exception e) {
    notifyException(handler,e);
  }
  return this;
}

Fixed version (ground truth):
@Override public DatagramSocket listenMulticastGroup(String multicastAddress,String networkInterface,String source,Handler<AsyncResult<DatagramSocket>> handler){
  configurable=false;
  try {
    InetAddress sourceAddress;
    if (source == null) {
      sourceAddress=null;
    }
 else {
      sourceAddress=InetAddress.getByName(source);
    }
    addListener(channel().joinGroup(InetAddress.getByName(multicastAddress),NetworkInterface.getByName(networkInterface),sourceAddress),handler);
  }
 catch (  Exception e) {
    notifyException(handler,e);
  }
  return this;
}
Program: 80244
Project: 80244
Buggy source:
private void doDeployVerticle(boolean worker,boolean multiThreaded,final String main,final JsonObject config,final URL[] urls,int instances,File currentModDir,String includes,Handler<AsyncResult<String>> doneHandler){
  checkWorkerContext();
  if (main == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (urls == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  String depName=genDepName();
  ModuleIdentifier enclosingModName=getEnclosingModID();
  String moduleKey;
  if (enclosingModName == null) {
    moduleKey=ModuleIdentifier.createInternalModIDForVerticle(depName).toString();
  }
 else {
    moduleKey=enclosingModName.toString() + "String_Node_Str" + main;
  }
  ModuleReference mr=getModuleReference(moduleKey,urls);
  if (enclosingModName != null) {
    ModuleReference parentRef=moduleRefs.get(enclosingModName.toString());
    mr.mcl.addReference(parentRef);
    parentRef.incRef();
  }
  if (includes != null) {
    loadIncludedModules(modRoot,currentModDir,mr,includes);
  }
  doDeploy(depName,false,worker,multiThreaded,main,null,config,urls,instances,currentModDir,mr,modRoot,false,doneHandler);
}

Fixed version (ground truth):
private void doDeployVerticle(boolean worker,boolean multiThreaded,final String main,final JsonObject config,final URL[] urls,int instances,File currentModDir,String includes,Handler<AsyncResult<String>> doneHandler){
  checkWorkerContext();
  if (main == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (urls == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  String depName=genDepName();
  ModuleIdentifier enclosingModName=getEnclosingModID();
  String moduleKey;
  if (enclosingModName == null) {
    moduleKey=ModuleIdentifier.createInternalModIDForVerticle(depName).toString();
  }
 else {
    moduleKey=enclosingModName.toString() + "String_Node_Str" + main;
  }
  ModuleReference mr=getModuleReference(moduleKey,urls);
  if (enclosingModName != null) {
    ModuleReference parentRef=moduleRefs.get(enclosingModName.toString());
    if (mr.mcl.addReference(parentRef)) {
      parentRef.incRef();
    }
  }
  if (includes != null) {
    loadIncludedModules(modRoot,currentModDir,mr,includes);
  }
  doDeploy(depName,false,worker,multiThreaded,main,null,config,urls,instances,currentModDir,mr,modRoot,false,doneHandler);
}
Program: 80246
Project: 80246
Buggy source:
private void doLoadIncludedModules(File modRoot,File currentModuleDir,ModuleReference mr,String includesString,Set<String> included){
  checkWorkerContext();
  for (  String moduleName : parseIncludeString(includesString)) {
    ModuleIdentifier modID=new ModuleIdentifier(moduleName);
    if (included.contains(modID.toString())) {
      log.warn("String_Node_Str" + modID + "String_Node_Str");
    }
 else {
      included.add(modID.toString());
      ModuleReference includedMr=moduleRefs.get(moduleName);
      if (includedMr == null) {
        File modDir=locateModule(modRoot,currentModuleDir,modID);
        if (modDir == null) {
          doInstallMod(modID);
        }
        modDir=locateModule(modRoot,currentModuleDir,modID);
        List<URL> urls=getModuleClasspath(modDir);
        JsonObject conf=loadModuleConfig(modID,modDir);
        ModuleFields fields=new ModuleFields(conf);
        boolean res=fields.isResident();
        includedMr=new ModuleReference(this,moduleName,new ModuleClassLoader(modID.toString(),platformClassLoader,urls.toArray(new URL[urls.size()])),res);
        ModuleReference prev=moduleRefs.putIfAbsent(moduleName,includedMr);
        if (prev != null) {
          includedMr=prev;
        }
        String includes=fields.getIncludes();
        if (includes != null) {
          doLoadIncludedModules(modRoot,modDir,includedMr,includes,included);
        }
      }
      includedMr.incRef();
      mr.mcl.addReference(includedMr);
    }
  }
}

Fixed version (ground truth):
private void doLoadIncludedModules(File modRoot,File currentModuleDir,ModuleReference mr,String includesString,Set<String> included){
  checkWorkerContext();
  for (  String moduleName : parseIncludeString(includesString)) {
    ModuleIdentifier modID=new ModuleIdentifier(moduleName);
    if (included.contains(modID.toString())) {
      log.warn("String_Node_Str" + modID + "String_Node_Str");
    }
 else {
      included.add(modID.toString());
      ModuleReference includedMr=moduleRefs.get(moduleName);
      if (includedMr == null) {
        File modDir=locateModule(modRoot,currentModuleDir,modID);
        if (modDir == null) {
          doInstallMod(modID);
        }
        modDir=locateModule(modRoot,currentModuleDir,modID);
        List<URL> urls=getModuleClasspath(modDir);
        JsonObject conf=loadModuleConfig(modID,modDir);
        ModuleFields fields=new ModuleFields(conf);
        boolean res=fields.isResident();
        includedMr=new ModuleReference(this,moduleName,new ModuleClassLoader(modID.toString(),platformClassLoader,urls.toArray(new URL[urls.size()])),res);
        ModuleReference prev=moduleRefs.putIfAbsent(moduleName,includedMr);
        if (prev != null) {
          includedMr=prev;
        }
        String includes=fields.getIncludes();
        if (includes != null) {
          doLoadIncludedModules(modRoot,modDir,includedMr,includes,included);
        }
      }
      if (mr.mcl.addReference(includedMr)) {
        includedMr.incRef();
      }
    }
  }
}
Program: 80247
Project: 80247
Buggy source:
public synchronized void addReference(ModuleReference reference){
  references.add(reference);
  modGraph=null;
}

Fixed version (ground truth):
public synchronized boolean addReference(ModuleReference reference){
  if (!references.contains(reference)) {
    references.add(reference);
    modGraph=null;
    return true;
  }
 else {
    return false;
  }
}
Program: 80248
Project: 80248
Buggy source:
/** 
 * Decodes a full DNS response packet.
 * @param buf the raw DNS response packet
 * @return the decoded {@link DnsResponse}
 */
protected static DnsResponse decodeResponse(ByteBuf buf,ByteBufAllocator allocator){
  DnsResponse response=new DnsResponse(buf);
  DnsResponseHeader header=decodeHeader(response,buf);
  response.setHeader(header);
  for (int i=0; i < header.getReadQuestions(); i++) {
    response.addQuestion(decodeQuestion(buf));
  }
  if (header.getResponseCode() != 0) {
    System.err.println("String_Node_Str" + response.getQuestions().get(0).name() + "String_Node_Str"+ DnsResponseCode.valueOf(header.getResponseCode()));
  }
  for (int i=0; i < header.getReadAnswers(); i++) {
    response.addAnswer(decodeResource(buf,allocator));
  }
  for (int i=0; i < header.getReadAuthorityResources(); i++) {
    response.addAuthorityResource(decodeResource(buf,allocator));
  }
  for (int i=0; i < header.getReadAdditionalResources(); i++) {
    response.addAdditionalResource(decodeResource(buf,allocator));
  }
  return response;
}

Fixed version (ground truth):
/** 
 * Decodes a full DNS response packet.
 * @param buf the raw DNS response packet
 * @return the decoded {@link DnsResponse}
 */
protected static DnsResponse decodeResponse(ByteBuf buf,ByteBufAllocator allocator){
  DnsResponse response=new DnsResponse(buf);
  DnsResponseHeader header=decodeHeader(response,buf);
  response.setHeader(header);
  for (int i=0; i < header.getReadQuestions(); i++) {
    response.addQuestion(decodeQuestion(buf));
  }
  if (header.getResponseCode() != 0) {
    return response;
  }
  for (int i=0; i < header.getReadAnswers(); i++) {
    response.addAnswer(decodeResource(buf,allocator));
  }
  for (int i=0; i < header.getReadAuthorityResources(); i++) {
    response.addAuthorityResource(decodeResource(buf,allocator));
  }
  for (int i=0; i < header.getReadAdditionalResources(); i++) {
    response.addAdditionalResource(decodeResource(buf,allocator));
  }
  return response;
}
Program: 80249
Project: 80249
Buggy source:
public NutFilePool(String homePath,long size){
  if (log.isInfoEnabled()) {
    log.infof("String_Node_Str",homePath,size);
  }
  this.size=size;
  this.home=Files.createDirIfNoExists(homePath);
  if (!home.isDirectory())   throw Lang.makeThrow("String_Node_Str",homePath,this.getClass().getName());
  home=new File(Disks.normalize(homePath));
  if (log.isDebugEnabled()) {
    log.debugf("String_Node_Str",home.getAbsolutePath());
  }
  File last=home;
  String[] subs=null;
  while (last.isDirectory()) {
    subs=last.list(new FilenameFilter(){
      public boolean accept(      File dir,      String name){
        return Regex.match("String_Node_Str",name);
      }
    }
);
    if (null != subs && subs.length > 0) {
      String lastName="String_Node_Str";
      for (      String sub : subs) {
        if (sub.compareTo(lastName) > 0) {
          lastName=sub;
        }
      }
      last=new File(last.getAbsolutePath() + "String_Node_Str" + lastName);
      if (last.isFile()) {
        cursor=Pools.getFileId(home,last);
        break;
      }
    }
 else {
      break;
    }
  }
  if (log.isInfoEnabled())   log.infof("String_Node_Str",cursor);
}

Fixed version (ground truth):
public NutFilePool(String homePath,long size){
  if (log.isInfoEnabled()) {
    log.infof("String_Node_Str",homePath,size);
  }
  this.size=size;
  this.home=Files.createDirIfNoExists(homePath);
  if (!home.isDirectory())   throw Lang.makeThrow("String_Node_Str",homePath,this.getClass().getName());
  home=new File(Disks.normalize(homePath));
  if (log.isDebugEnabled()) {
    log.debugf("String_Node_Str",home.getAbsolutePath());
  }
  cursor=foundMax(home,home,0);
  if (cursor < 0)   cursor=0;
  if (log.isInfoEnabled())   log.infof("String_Node_Str",cursor);
}
Program: 80250
Project: 80250
Buggy source:
/** 
 * 快速插入一个对象。 对象的 '@Prev' 以及 '@Next' 在这个函数里不起作用。 <p> 即，你必须为其设置好值，它会统一采用 batch 的方法插入
 * @param obj 要被插入的对象 <p> 它可以是： <ul> <li>普通 POJO <li>集合 <li>数组 <li>Map </ul> <b style=color:red>注意：</b> 如果是集合，数组或者 Map，所有的对象必须类型相同，否则可能会出错
 */
<T>T fastInsert(T obj);

Fixed version (ground truth):
<T>T fastInsert(T obj,boolean detectAllColumns);
Program: 80251
Project: 80251
Buggy source:
EntityOperator _optBy(Object obj){
  if (null == obj)   return null;
  Entity<?> en=holder.getEntityBy(obj);
  if (null == en)   return null;
  EntityOperator re=_opt(en);
  re.myObj=obj.getClass().isArray() ? Lang.array2list((Object[])obj) : obj;
  return re;
}

Fixed version (ground truth):
EntityOperator _optBy(Object obj,boolean detectAllColumns){
  if (null == obj)   return null;
  Entity<?> en=null;
  if (detectAllColumns && Lang.eleSize(obj) > 1) {
    Object first=Lang.first(obj);
    if (first != null && first instanceof Map) {
      final Map<String,Object> tmp=new HashMap<String,Object>();
      Lang.each(obj,new Each<Object>(){
        @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void invoke(        int index,        Object ele,        int length) throws ExitLoop, ContinueLoop, LoopException {
          tmp.putAll((Map)ele);
        }
      }
);
      en=holder.getEntityBy(tmp);
    }
  }
  if (en == null) {
    en=holder.getEntityBy(obj);
  }
  if (null == en)   return null;
  EntityOperator re=_opt(en);
  re.myObj=obj.getClass().isArray() ? Lang.array2list((Object[])obj) : obj;
  return re;
}
Program: 80252
Project: 80252
Buggy source:
public void invoke(Connection conn){
  Statement stat=null;
  ResultSet rs=null;
  try {
    stat=conn.createStatement();
    String sql="String_Node_Str" + tableName + "String_Node_Str";
    rs=stat.executeQuery(sql);
    if (rs.next())     ee[0]=true;
  }
 catch (  SQLException e) {
  }
 finally {
    Daos.safeClose(stat,rs);
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void invoke(int index,Object ele,int length) throws ExitLoop, ContinueLoop, LoopException {
  tmp.putAll((Map)ele);
}
Program: 80253
Project: 80253
Buggy source:
public <T>T fastInsert(T obj){
  EntityOperator opt=_optBy(obj);
  if (null == opt)   return null;
  opt.addInsertSelfOnly();
  opt.exec();
  return obj;
}

Fixed version (ground truth):
public <T>T fastInsert(T obj,boolean detectAllColumns){
  EntityOperator opt=_optBy(obj,detectAllColumns);
  if (null == opt)   return null;
  opt.addInsertSelfOnly();
  opt.exec();
  return obj;
}
Program: 80254
Project: 80254
Buggy source:
@Override public void toJson(Mirror<?> mirror,Object currentObj,JsonRender r,JsonFormat jf) throws IOException {
  String df=jf.getDateFormatRaw();
  if (df == null)   df="String_Node_Str";
  Locale locale=null;
  String tmp=jf.getLocale();
  if (tmp != null)   locale=Locale.forLanguageTag(tmp);
 else   locale=Locale.getDefault();
  r.string2Json(DateTimeFormatter.ofPattern(df,locale).format((TemporalAccessor)currentObj));
}

Fixed version (ground truth):
@Override public void toJson(Mirror<?> mirror,Object currentObj,JsonRender r,JsonFormat jf) throws IOException {
  String df=jf.getDateFormatRaw();
  if (df == null)   df="String_Node_Str";
  Locale locale=null;
  String tmp=jf.getLocale();
  if (tmp != null)   locale=Locale.forLanguageTag(tmp);
 else   locale=Locale.getDefault();
  r.string2Json(DateTimeFormatter.ofPattern(df,locale).withZone(ZoneId.systemDefault()).format((TemporalAccessor)currentObj));
}
Program: 80255
Project: 80255
Buggy source:
public NutFilePool(String homePath,long size){
  if (log.isInfoEnabled()) {
    log.infof("String_Node_Str",homePath,size);
  }
  this.size=size;
  this.home=Files.createDirIfNoExists(homePath);
  if (!home.isDirectory())   throw Lang.makeThrow("String_Node_Str",homePath,this.getClass().getName());
  home=new File(Disks.normalize(homePath));
  if (log.isDebugEnabled()) {
    log.debugf("String_Node_Str",home.getAbsolutePath());
  }
  File last=home;
  String[] subs=null;
  while (last.isDirectory()) {
    subs=last.list(new FilenameFilter(){
      public boolean accept(      File dir,      String name){
        return name.matches("String_Node_Str");
      }
    }
);
    if (null != subs && subs.length > 0) {
      String lastName="String_Node_Str";
      for (      String sub : subs) {
        if (sub.compareTo(lastName) > 0) {
          lastName=sub;
        }
      }
      last=new File(last.getAbsolutePath() + "String_Node_Str" + lastName);
      if (last.isFile()) {
        cursor=Pools.getFileId(home,last);
        break;
      }
    }
 else {
      break;
    }
  }
  if (log.isInfoEnabled())   log.infof("String_Node_Str",cursor);
}

Fixed version (ground truth):
public NutFilePool(String homePath,long size){
  if (log.isInfoEnabled()) {
    log.infof("String_Node_Str",homePath,size);
  }
  this.size=size;
  this.home=Files.createDirIfNoExists(homePath);
  if (!home.isDirectory())   throw Lang.makeThrow("String_Node_Str",homePath,this.getClass().getName());
  home=new File(Disks.normalize(homePath));
  if (log.isDebugEnabled()) {
    log.debugf("String_Node_Str",home.getAbsolutePath());
  }
  File last=home;
  String[] subs=null;
  while (last.isDirectory()) {
    subs=last.list(new FilenameFilter(){
      public boolean accept(      File dir,      String name){
        return Regex.match("String_Node_Str",name);
      }
    }
);
    if (null != subs && subs.length > 0) {
      String lastName="String_Node_Str";
      for (      String sub : subs) {
        if (sub.compareTo(lastName) > 0) {
          lastName=sub;
        }
      }
      last=new File(last.getAbsolutePath() + "String_Node_Str" + lastName);
      if (last.isFile()) {
        cursor=Pools.getFileId(home,last);
        break;
      }
    }
 else {
      break;
    }
  }
  if (log.isInfoEnabled())   log.infof("String_Node_Str",cursor);
}
Program: 80256
Project: 80256
Buggy source:
public boolean accept(File dir,String name){
  return name.matches("String_Node_Str");
}

Fixed version (ground truth):
public boolean accept(File dir,String name){
  return Regex.match("String_Node_Str",name);
}
Program: 80257
Project: 80257
Buggy source:
public static boolean isIocObject(Map<String,?> map){
  for (  Entry<String,?> en : map.entrySet())   if (!en.getKey().matches(OBJFIELDS))   return false;
  return true;
}

Fixed version (ground truth):
public static boolean isIocObject(Map<String,?> map){
  for (  Entry<String,?> en : map.entrySet())   if (!Regex.match(OBJFIELDS,en.getKey()))   return false;
  return true;
}
Program: 80258
Project: 80258
Buggy source:
private void checkIfNeedAddNode(){
  if (!Strings.isBlank(sb)) {
    String s=Strings.trim(clearStringBuffer());
    if (s.equalsIgnoreCase("String_Node_Str")) {
      addNode(new NullNode());
    }
 else     if (s.matches("String_Node_Str")) {
      addNode(new BooleanNode(s));
    }
 else     if (s.matches("String_Node_Str")) {
      addNode(new NumberNode(s));
    }
 else     if (null == last) {
      int pos=s.lastIndexOf('.');
      if (pos < 0)       throw Lang.makeThrow("String_Node_Str",s);
      String className=s.substring(0,pos);
      String funcName=s.substring(pos + 1);
      addNode(new StaticFunctionNode(className,funcName,new ChainNode[0]));
    }
 else {
      addNode(new FieldNode(s));
    }
  }
}

Fixed version (ground truth):
private void checkIfNeedAddNode(){
  if (!Strings.isBlank(sb)) {
    String s=Strings.trim(clearStringBuffer());
    if (s.equalsIgnoreCase("String_Node_Str")) {
      addNode(new NullNode());
    }
 else     if (Regex.match("String_Node_Str",s)) {
      addNode(new BooleanNode(s));
    }
 else     if (Regex.match("String_Node_Str",s)) {
      addNode(new NumberNode(s));
    }
 else     if (null == last) {
      int pos=s.lastIndexOf('.');
      if (pos < 0)       throw Lang.makeThrow("String_Node_Str",s);
      String className=s.substring(0,pos);
      String funcName=s.substring(pos + 1);
      addNode(new StaticFunctionNode(className,funcName,new ChainNode[0]));
    }
 else {
      addNode(new FieldNode(s));
    }
  }
}
Program: 80259
Project: 80259
Buggy source:
/** 
 * 根据正则式，从压缩文件中获取文件
 * @param zip 压缩文件
 * @param regex 正则式，用来匹配文件名
 * @return 数组
 */
public static ZipEntry[] findEntryInZip(ZipFile zip,String regex){
  List<ZipEntry> list=new LinkedList<ZipEntry>();
  Enumeration<? extends ZipEntry> en=zip.entries();
  while (en.hasMoreElements()) {
    ZipEntry ze=en.nextElement();
    if (null == regex || ze.getName().matches(regex))     list.add(ze);
  }
  return list.toArray(new ZipEntry[list.size()]);
}

Fixed version (ground truth):
/** 
 * 根据正则式，从压缩文件中获取文件
 * @param zip 压缩文件
 * @param regex 正则式，用来匹配文件名
 * @return 数组
 */
public static ZipEntry[] findEntryInZip(ZipFile zip,String regex){
  List<ZipEntry> list=new LinkedList<ZipEntry>();
  Enumeration<? extends ZipEntry> en=zip.entries();
  while (en.hasMoreElements()) {
    ZipEntry ze=en.nextElement();
    if (null == regex || Regex.match(regex,ze.getName()))     list.add(ze);
  }
  return list.toArray(new ZipEntry[list.size()]);
}
Program: 80260
Project: 80260
Buggy source:
/** 
 * @see #splitInt(String)
 */
public static boolean[] splitBoolean(String str){
  String[] ss=Strings.splitIgnoreBlank(str);
  if (null == ss)   return null;
  boolean[] ns=new boolean[ss.length];
  for (int i=0; i < ns.length; i++) {
    try {
      ns[i]=Pattern.matches("String_Node_Str",ss[i].toLowerCase());
    }
 catch (    NumberFormatException e) {
      ns[i]=false;
    }
  }
  return ns;
}

Fixed version (ground truth):
/** 
 * @see #splitInt(String)
 */
public static boolean[] splitBoolean(String str){
  String[] ss=Strings.splitIgnoreBlank(str);
  if (null == ss)   return null;
  boolean[] ns=new boolean[ss.length];
  for (int i=0; i < ns.length; i++) {
    try {
      ns[i]=Regex.match("String_Node_Str",ss[i].toLowerCase());
    }
 catch (    NumberFormatException e) {
      ns[i]=false;
    }
  }
  return ns;
}
Program: 80261
Project: 80261
Buggy source:
/** 
 * 判断日期是否有效,包括闰年的情况
 * @param date 日期格式YYYY-mm-dd
 * @return true,如果合法
 */
public static boolean isDate(String date){
  StringBuffer reg=new StringBuffer("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  Pattern p=Pattern.compile(reg.toString());
  return p.matcher(date).matches();
}

Fixed version (ground truth):
/** 
 * 判断日期是否有效,包括闰年的情况
 * @param date 日期格式YYYY-mm-dd
 * @return true,如果合法
 */
public static boolean isDate(String date){
  StringBuffer reg=new StringBuffer("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  reg.append("String_Node_Str");
  Pattern p=Regex.getPattern(reg.toString());
  return p.matcher(date).matches();
}
Program: 80262
Project: 80262
Buggy source:
/** 
 * 判断某个元素下是否有子元素
 * @param ele 元素
 * @param regex 子元素名称的正则表达式，如果为 null，则元素内如果有任意元素都会返回 false
 * @return 是否有子元素
 */
public static boolean hasChild(Element ele,String regex){
  NodeList nl=ele.getChildNodes();
  int len=nl.getLength();
  for (int i=0; i < len; i++) {
    Node nd=nl.item(i);
    if (nd instanceof Element) {
      if (null == regex)       return false;
      if (((Element)nd).getTagName().matches(regex))       return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * 判断某个元素下是否有子元素
 * @param ele 元素
 * @param regex 子元素名称的正则表达式，如果为 null，则元素内如果有任意元素都会返回 false
 * @return 是否有子元素
 */
public static boolean hasChild(Element ele,String regex){
  NodeList nl=ele.getChildNodes();
  int len=nl.getLength();
  for (int i=0; i < len; i++) {
    Node nd=nl.item(i);
    if (nd instanceof Element) {
      if (null == regex)       return false;
      if (Regex.match(regex,((Element)nd).getTagName()))       return true;
    }
  }
  return false;
}
Program: 80263
Project: 80263
Buggy source:
/** 
 * 遍历文件夹下以特定后缀结尾的文件(不包括文件夹,不包括.开头的文件)
 * @param path 根路径
 * @param regex 文件名的正则表达式
 * @param deep 是否深层遍历
 * @param fv 你所提供的访问器,当然就是你自己的逻辑咯
 */
public static final void visitFile(String path,final String regex,final boolean deep,final FileVisitor fv){
  File d=Files.findFile(path);
  if (null == d)   return;
  visitFile(d,new FileVisitor(){
    @Override public void visit(    File f){
      if (f.isDirectory())       return;
      fv.visit(f);
    }
  }
,new FileFilter(){
    @Override public boolean accept(    File f){
      if (f.isDirectory())       return deep;
      if (f.isHidden())       return false;
      if (Strings.isEmpty(regex))       return true;
      return f.getName().matches(regex);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * 遍历文件夹下以特定后缀结尾的文件(不包括文件夹,不包括.开头的文件)
 * @param path 根路径
 * @param regex 文件名的正则表达式
 * @param deep 是否深层遍历
 * @param fv 你所提供的访问器,当然就是你自己的逻辑咯
 */
public static final void visitFile(String path,final String regex,final boolean deep,final FileVisitor fv){
  File d=Files.findFile(path);
  if (null == d)   return;
  visitFile(d,new FileVisitor(){
    @Override public void visit(    File f){
      if (f.isDirectory())       return;
      fv.visit(f);
    }
  }
,new FileFilter(){
    @Override public boolean accept(    File f){
      if (f.isDirectory())       return deep;
      if (f.isHidden())       return false;
      if (Strings.isEmpty(regex))       return true;
      return Regex.match(regex,f.getName());
    }
  }
);
}
Program: 80264
Project: 80264
Buggy source:
private boolean __match_val(final Object mtc,Object val){
  Mirror<?> mi=Mirror.me(mtc);
  if (null == val) {
    return mi.isStringLike() && Strings.isEmpty(mtc.toString());
  }
  Pattern regex=mi.is(Pattern.class) ? (Pattern)mtc : null;
  if (mi.isStringLike()) {
    final String s=mtc.toString();
    if (s.startsWith("String_Node_Str")) {
      regex=Pattern.compile(s);
    }
 else {
      final boolean[] re=new boolean[1];
      Lang.each(val,new Each<Object>(){
        @Override public void invoke(        int index,        Object ele,        int length){
          if (null != ele && ele.equals(s)) {
            re[0]=true;
            Lang.Break();
          }
        }
      }
);
      return re[0];
    }
  }
  if (null != regex) {
    final boolean[] re=new boolean[1];
    final Pattern REG=regex;
    Lang.each(val,new Each<Object>(){
      @Override public void invoke(      int index,      Object ele,      int length){
        if (null != ele && REG.matcher(ele.toString()).matches()) {
          re[0]=true;
          Lang.Break();
        }
      }
    }
);
    return re[0];
  }
  if (mi.isSimple()) {
    final boolean[] re=new boolean[1];
    Lang.each(val,new Each<Object>(){
      @Override public void invoke(      int index,      Object ele,      int length){
        if (null != ele && ele.equals(mtc)) {
          re[0]=true;
          Lang.Break();
        }
      }
    }
);
    return re[0];
  }
 else   if (mi.is(Region.class)) {
    throw Lang.noImplement();
  }
  return false;
}

Fixed version (ground truth):
private boolean __match_val(final Object mtc,Object val){
  Mirror<?> mi=Mirror.me(mtc);
  if (null == val) {
    return mi.isStringLike() && Strings.isEmpty(mtc.toString());
  }
  Pattern regex=mi.is(Pattern.class) ? (Pattern)mtc : null;
  if (mi.isStringLike()) {
    final String s=mtc.toString();
    if (s.startsWith("String_Node_Str")) {
      regex=Regex.getPattern(s);
    }
 else {
      final boolean[] re=new boolean[1];
      Lang.each(val,new Each<Object>(){
        @Override public void invoke(        int index,        Object ele,        int length){
          if (null != ele && ele.equals(s)) {
            re[0]=true;
            Lang.Break();
          }
        }
      }
);
      return re[0];
    }
  }
  if (null != regex) {
    final boolean[] re=new boolean[1];
    final Pattern REG=regex;
    Lang.each(val,new Each<Object>(){
      @Override public void invoke(      int index,      Object ele,      int length){
        if (null != ele && REG.matcher(ele.toString()).matches()) {
          re[0]=true;
          Lang.Break();
        }
      }
    }
);
    return re[0];
  }
  if (mi.isSimple()) {
    final boolean[] re=new boolean[1];
    Lang.each(val,new Each<Object>(){
      @Override public void invoke(      int index,      Object ele,      int length){
        if (null != ele && ele.equals(mtc)) {
          re[0]=true;
          Lang.Break();
        }
      }
    }
);
    return re[0];
  }
 else   if (mi.is(Region.class)) {
    throw Lang.noImplement();
  }
  return false;
}
Program: 80265
Project: 80265
Buggy source:
private static List<Sql> createIndexs(Dao dao,Entity<?> en,Set<String> indexsHis,Object t){
  List<Sql> sqls=new ArrayList<Sql>();
  StringBuilder sb=new StringBuilder();
  List<EntityIndex> indexs=en.getIndexes();
  for (  EntityIndex index : indexs) {
    if (indexsHis.contains(index.getName())) {
      continue;
    }
    sb.setLength(0);
    if (index.isUnique())     sb.append("String_Node_Str");
 else     sb.append("String_Node_Str");
    if (index.getName().contains("String_Node_Str")) {
      final String name=index.getName();
      final Molecule<String> m=new Molecule<String>(){
        public void run(){
          setObj(TableName.render(new CharSegment(name)));
        }
      }
;
      TableName.run(t,m);
      sb.append(m.getObj());
    }
 else     sb.append(index.getName());
    sb.append("String_Node_Str").append(getTableName(dao,en,t)).append("String_Node_Str");
    for (    EntityField field : index.getFields()) {
      if (field instanceof MappingField) {
        MappingField mf=(MappingField)field;
        sb.append(mf.getColumnName()).append(',');
      }
 else {
        throw Lang.makeThrow(DaoException.class,"String_Node_Str",en.getClass(),field.getName());
      }
    }
    sb.setCharAt(sb.length() - 1,')');
    sqls.add(Sqls.create(sb.toString()));
  }
  return sqls;
}

Fixed version (ground truth):
private static List<Sql> createIndexs(Dao dao,Entity<?> en,Set<String> indexsHis,Object t){
  List<Sql> sqls=new ArrayList<Sql>();
  StringBuilder sb=new StringBuilder();
  List<EntityIndex> indexs=en.getIndexes();
  for (  EntityIndex index : indexs) {
    String indexName=index.getName();
    if (indexName.contains("String_Node_Str")) {
      final String name=index.getName();
      final Molecule<String> m=new Molecule<String>(){
        public void run(){
          setObj(TableName.render(new CharSegment(name)));
        }
      }
;
      TableName.run(t,m);
      indexName=m.getObj();
    }
    if (indexsHis.contains(indexName)) {
      continue;
    }
    sb.setLength(0);
    if (index.isUnique())     sb.append("String_Node_Str");
 else     sb.append("String_Node_Str");
    sb.append(indexName);
    sb.append("String_Node_Str").append(getTableName(dao,en,t)).append("String_Node_Str");
    for (    EntityField field : index.getFields()) {
      if (field instanceof MappingField) {
        MappingField mf=(MappingField)field;
        sb.append(mf.getColumnName()).append(',');
      }
 else {
        throw Lang.makeThrow(DaoException.class,"String_Node_Str",en.getClass(),field.getName());
      }
    }
    sb.setCharAt(sb.length() - 1,')');
    sqls.add(Sqls.create(sb.toString()));
  }
  return sqls;
}
Program: 80266
Project: 80266
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static <T extends Annotation>T getAnnotationDeep(Method method,Class<T> annotationClass){
  T t=method.getAnnotation(annotationClass);
  if (t != null)   return t;
  Class klass=method.getDeclaringClass();
  while (klass != null && klass != Object.class) {
    try {
      Method tmp=klass.getMethod(method.getName(),method.getParameterTypes());
      t=tmp.getAnnotation(annotationClass);
      if (t != null)       return t;
    }
 catch (    Exception e) {
      break;
    }
    klass=klass.getSuperclass();
  }
  for (  Class klass2 : method.getDeclaringClass().getInterfaces()) {
    try {
      Method tmp=klass2.getMethod(method.getName(),method.getParameterTypes());
      t=tmp.getAnnotation(annotationClass);
      if (t != null)       return t;
    }
 catch (    Exception e) {
    }
  }
  return null;
}

Fixed version (ground truth):
public static <T extends Annotation>T getAnnotationDeep(Class<?> type,Class<T> annotationClass){
  T t=type.getAnnotation(annotationClass);
  if (t != null)   return t;
  Class<?> klass=type.getSuperclass();
  while (klass != null && klass != Object.class) {
    try {
      t=klass.getAnnotation(annotationClass);
      if (t != null)       return t;
    }
 catch (    Exception e) {
      break;
    }
    klass=klass.getSuperclass();
  }
  for (  Class<?> klass2 : type.getInterfaces()) {
    try {
      t=klass2.getAnnotation(annotationClass);
      if (t != null)       return t;
    }
 catch (    Exception e) {
    }
  }
  return null;
}
Program: 80267
Project: 80267
Buggy source:
public static void evalModule(ActionInfo ai,Class<?> type){
  ai.setModuleType(type);
  String beanName=null;
  InjectName innm=type.getAnnotation(InjectName.class);
  IocBean iocBean=type.getAnnotation(IocBean.class);
  if (innm == null && iocBean == null)   return;
  if (iocBean != null) {
    beanName=iocBean.name();
  }
  if (Strings.isBlank(beanName)) {
    if (innm != null && !Strings.isBlank(innm.value())) {
      beanName=innm.value();
    }
 else {
      beanName=Strings.lowerFirst(type.getSimpleName());
    }
  }
  ai.setInjectName(beanName);
}

Fixed version (ground truth):
public static void evalModule(ActionInfo ai,Class<?> type){
  ai.setModuleType(type);
  String beanName=null;
  InjectName innm=Mirror.getAnnotationDeep(type,InjectName.class);
  IocBean iocBean=Mirror.getAnnotationDeep(type,IocBean.class);
  if (innm == null && iocBean == null)   return;
  if (iocBean != null) {
    beanName=iocBean.name();
  }
  if (Strings.isBlank(beanName)) {
    if (innm != null && !Strings.isBlank(innm.value())) {
      beanName=innm.value();
    }
 else {
      beanName=Strings.lowerFirst(type.getSimpleName());
    }
  }
  ai.setInjectName(beanName);
}
Program: 80268
Project: 80268
Buggy source:
public static void evalHttpMethod(ActionInfo ai,Method method,At at){
  if (method.getAnnotation(GET.class) != null)   ai.getHttpMethods().add("String_Node_Str");
  if (method.getAnnotation(POST.class) != null)   ai.getHttpMethods().add("String_Node_Str");
  if (method.getAnnotation(PUT.class) != null)   ai.getHttpMethods().add("String_Node_Str");
  if (method.getAnnotation(DELETE.class) != null)   ai.getHttpMethods().add("String_Node_Str");
  for (  String m : at.methods()) {
    ai.getHttpMethods().add(m.toUpperCase());
  }
}

Fixed version (ground truth):
public static void evalHttpMethod(ActionInfo ai,Method method,At at){
  if (Mirror.getAnnotationDeep(method,GET.class) != null)   ai.getHttpMethods().add("String_Node_Str");
  if (Mirror.getAnnotationDeep(method,POST.class) != null)   ai.getHttpMethods().add("String_Node_Str");
  if (Mirror.getAnnotationDeep(method,PUT.class) != null)   ai.getHttpMethods().add("String_Node_Str");
  if (Mirror.getAnnotationDeep(method,DELETE.class) != null)   ai.getHttpMethods().add("String_Node_Str");
  for (  String m : at.methods()) {
    ai.getHttpMethods().add(m.toUpperCase());
  }
}
Program: 80269
Project: 80269
Buggy source:
protected UrlMapping evalUrlMapping(NutConfig config,Class<?> mainModule,Ioc ioc) throws Exception {
  UrlMapping mapping=createUrlMapping(config);
  if (log.isInfoEnabled())   log.infof("String_Node_Str",mapping.getClass().getName());
  ViewMaker[] makers=createViewMakers(mainModule,ioc);
  ActionChainMaker maker=createChainMaker(config,mainModule);
  ActionInfo mainInfo=Loadings.createInfo(mainModule);
  Set<Class<?>> modules=Loadings.scanModules(ioc,mainModule);
  if (modules.isEmpty()) {
    if (log.isWarnEnabled())     log.warn("String_Node_Str");
  }
  int atMethods=0;
  for (  Class<?> module : modules) {
    ActionInfo moduleInfo=Loadings.createInfo(module).mergeWith(mainInfo);
    for (    Method method : module.getMethods()) {
      if (!Modifier.isPublic(method.getModifiers()) || !method.isAnnotationPresent(At.class))       continue;
      ActionInfo info=Loadings.createInfo(method).mergeWith(moduleInfo);
      info.setViewMakers(makers);
      mapping.add(maker,info,config);
      atMethods++;
    }
    if (null != moduleInfo.getPathMap()) {
      for (      Entry<String,String> en : moduleInfo.getPathMap().entrySet()) {
        config.getAtMap().add(en.getKey(),en.getValue());
      }
    }
  }
  if (atMethods == 0) {
    if (log.isWarnEnabled())     log.warn("String_Node_Str");
  }
 else {
    log.infof("String_Node_Str",atMethods);
  }
  return mapping;
}

Fixed version (ground truth):
protected UrlMapping evalUrlMapping(NutConfig config,Class<?> mainModule,Ioc ioc) throws Exception {
  UrlMapping mapping=createUrlMapping(config);
  if (log.isInfoEnabled())   log.infof("String_Node_Str",mapping.getClass().getName());
  ViewMaker[] makers=createViewMakers(mainModule,ioc);
  ActionChainMaker maker=createChainMaker(config,mainModule);
  ActionInfo mainInfo=Loadings.createInfo(mainModule);
  Set<Class<?>> modules=Loadings.scanModules(ioc,mainModule);
  if (modules.isEmpty()) {
    if (log.isWarnEnabled())     log.warn("String_Node_Str");
  }
  int atMethods=0;
  for (  Class<?> module : modules) {
    ActionInfo moduleInfo=Loadings.createInfo(module).mergeWith(mainInfo);
    for (    Method method : module.getMethods()) {
      if (!Modifier.isPublic(method.getModifiers()) || method.isBridge() || Mirror.getAnnotationDeep(method,At.class) == null || method.getDeclaringClass() != module)       continue;
      ActionInfo info=Loadings.createInfo(method).mergeWith(moduleInfo);
      info.setViewMakers(makers);
      mapping.add(maker,info,config);
      atMethods++;
    }
    if (null != moduleInfo.getPathMap()) {
      for (      Entry<String,String> en : moduleInfo.getPathMap().entrySet()) {
        config.getAtMap().add(en.getKey(),en.getValue());
      }
    }
  }
  if (atMethods == 0) {
    if (log.isWarnEnabled())     log.warn("String_Node_Str");
  }
 else {
    log.infof("String_Node_Str",atMethods);
  }
  return mapping;
}
Program: 80270
Project: 80270
Buggy source:
/** 
 * 首先,载入需要的配置信息, 分别从nutz.properties和ServletContext的上下文获取. <p/> 子类可以覆盖这个方法实现从任意方式加载配置
 */
@SuppressWarnings("String_Node_Str") protected void findConfig(){
  String propLocation=sc.getInitParameter(PROP_LOCATION);
  if (Strings.isBlank(propLocation)) {
    propLocation="String_Node_Str";
  }
  PropertiesProxy pp=new PropertiesProxy();
  Enumeration<String> params=sc.getInitParameterNames();
  while (params.hasMoreElements()) {
    String name=(String)params.nextElement();
    if (name.startsWith("String_Node_Str")) {
      pp.put(name,sc.getInitParameter(name).trim());
    }
  }
  InputStream in=getClass().getClassLoader().getResourceAsStream("String_Node_Str" + propLocation);
  if (in == null) {
    in=sc.getResourceAsStream("String_Node_Str" + propLocation);
  }
  if (in == null) {
    log.debug(propLocation + "String_Node_Str");
  }
 else {
    pp=new PropertiesProxy(in);
    Streams.safeClose(in);
    this.pp=pp;
  }
}

Fixed version (ground truth):
/** 
 * 首先,载入需要的配置信息, 分别从nutz.properties和ServletContext的上下文获取. <p/> 子类可以覆盖这个方法实现从任意方式加载配置
 */
@SuppressWarnings("String_Node_Str") protected void findConfig(){
  String propLocation=sc.getInitParameter(PROP_LOCATION);
  if (Strings.isBlank(propLocation)) {
    propLocation="String_Node_Str";
  }
  PropertiesProxy pp=new PropertiesProxy();
  Enumeration<String> params=sc.getInitParameterNames();
  while (params.hasMoreElements()) {
    String name=(String)params.nextElement();
    if (name.startsWith("String_Node_Str")) {
      pp.put(name,sc.getInitParameter(name).trim());
    }
  }
  InputStream in=getClass().getClassLoader().getResourceAsStream("String_Node_Str" + propLocation);
  if (in == null) {
    in=sc.getResourceAsStream("String_Node_Str" + propLocation);
  }
  if (in == null) {
    log.debug(propLocation + "String_Node_Str");
  }
 else {
    pp=new PropertiesProxy(in);
    Streams.safeClose(in);
  }
  this.pp=pp;
}
Program: 80271
Project: 80271
Buggy source:
public void set(Entity<?> en){
  this.map.put(en.getType(),en);
}

Fixed version (ground truth):
public void set(Entity<?> en){
synchronized (map) {
    this.map.put(en.getType(),en);
  }
}
Program: 80272
Project: 80272
Buggy source:
/** 
 * 重新载入
 */
public <T>Entity<T> reloadEntity(Dao dao,Class<T> classOfT){
  final Entity<T> re=maker.make(classOfT);
  map.put(classOfT,re);
  support.expert.createEntity(dao,re);
  support.run(new ConnCallback(){
    public void invoke(    Connection conn) throws Exception {
      support.expert.setupEntityField(conn,re);
    }
  }
);
  return re;
}

Fixed version (ground truth):
/** 
 * 重新载入
 */
public <T>Entity<T> reloadEntity(Dao dao,Class<T> classOfT){
  final Entity<T> re=maker.make(classOfT);
synchronized (map) {
    map.put(classOfT,re);
  }
  support.expert.createEntity(dao,re);
  support.run(new ConnCallback(){
    public void invoke(    Connection conn) throws Exception {
      support.expert.setupEntityField(conn,re);
    }
  }
);
  return re;
}
Program: 80273
Project: 80273
Buggy source:
public void remove(Entity<?> en){
  if (en == null || en.getType() == null)   return;
  this.map.remove(en.getType());
}

Fixed version (ground truth):
public void remove(Entity<?> en){
  if (en == null || en.getType() == null)   return;
synchronized (map) {
    this.map.remove(en.getType());
  }
}
Program: 80274
Project: 80274
Buggy source:
public boolean hasType(Class<?> typeName){
  return map.containsKey(typeName);
}

Fixed version (ground truth):
public boolean hasType(Class<?> typeName){
synchronized (map) {
    return map.containsKey(typeName);
  }
}
Program: 80275
Project: 80275
Buggy source:
/** 
 * 设置一个新的 Sql 管理接口实例
 * @param sqls Sql 管理接口实例
 */
public void setSqlManager(SqlManager sqls){
  this.sqlManager=sqls;
  int count=sqls.count();
  if (sqls != null)   log.debug("String_Node_Str" + count);
}

Fixed version (ground truth):
/** 
 * 设置一个新的 Sql 管理接口实例
 * @param sqls Sql 管理接口实例
 */
public void setSqlManager(SqlManager sqls){
  this.sqlManager=sqls;
  if (sqls != null) {
    int count=sqls.count();
    log.debug("String_Node_Str" + count);
  }
}
Program: 80276
Project: 80276
Buggy source:
JdbcExpertConfigFile init(){
  String home=config.get("String_Node_Str").toString();
  try {
    home=Disks.normalize(home);
    if (home == null)     home=config.get("String_Node_Str").toString();
    long max=config.containsKey("String_Node_Str") ? ((Number)config.get("String_Node_Str")).longValue() : 2000;
    if (home.contains("String_Node_Str")) {
      try {
        home.replace("String_Node_Str",Mvcs.getServletContext().getRealPath("String_Node_Str"));
      }
 catch (      Throwable e) {
      }
    }
    try {
      pool=new NutFilePool(home,max);
    }
 catch (    Exception e) {
      if (!home.startsWith("String_Node_Str") || Mvcs.getServletContext() == null)       throw e;
      try {
        String tmp=Mvcs.getServletContext().getRealPath("String_Node_Str") + home.substring(2);
        pool=new NutFilePool(tmp,max);
        log.info("String_Node_Str");
      }
 catch (      Exception e1) {
        throw e;
      }
    }
    pool=new SynchronizedFilePool(pool);
  }
 catch (  Throwable e) {
    if (log.isWarnEnabled())     log.warnf("String_Node_Str" + home,e);
  }
  return this;
}

Fixed version (ground truth):
JdbcExpertConfigFile init(){
  String home=config.get("String_Node_Str").toString();
  try {
    home=Disks.normalize(home);
    if (home == null)     home=config.get("String_Node_Str").toString();
    long max=config.containsKey("String_Node_Str") ? ((Number)config.get("String_Node_Str")).longValue() : 2000;
    if (home.contains("String_Node_Str")) {
      try {
        home=home.replace("String_Node_Str",Mvcs.getServletContext().getRealPath("String_Node_Str"));
      }
 catch (      Throwable e) {
      }
    }
    try {
      pool=new NutFilePool(home,max);
    }
 catch (    Exception e) {
      if (!home.startsWith("String_Node_Str") || Mvcs.getServletContext() == null)       throw e;
      try {
        String tmp=Mvcs.getServletContext().getRealPath("String_Node_Str") + home.substring(2);
        pool=new NutFilePool(tmp,max);
        log.info("String_Node_Str");
      }
 catch (      Exception e1) {
        throw e;
      }
    }
    pool=new SynchronizedFilePool(pool);
  }
 catch (  Throwable e) {
    if (log.isWarnEnabled())     log.warnf("String_Node_Str" + home,e);
  }
  return this;
}
Program: 80277
Project: 80277
Buggy source:
/** 
 * 首先,载入需要的配置信息, 分别从nutz.properties和ServletContext的上下文获取. <p/> 子类可以覆盖这个方法实现从任意方式加载配置
 */
@SuppressWarnings("String_Node_Str") protected void findConfig(){
  String propLocation=sc.getInitParameter(PROP_LOCATION);
  if (Strings.isBlank(propLocation)) {
    propLocation="String_Node_Str";
  }
  PropertiesProxy pp=new PropertiesProxy();
  Enumeration<String> params=sc.getInitParameterNames();
  while (params.hasMoreElements()) {
    String name=(String)params.nextElement();
    if (name.startsWith("String_Node_Str")) {
      pp.put(name,sc.getInitParameter(name).trim());
    }
  }
  InputStream in=getClass().getClassLoader().getResourceAsStream("String_Node_Str" + propLocation);
  if (in == null) {
    in=sc.getResourceAsStream("String_Node_Str" + propLocation);
  }
  if (in == null) {
    log.debug(propLocation + "String_Node_Str");
  }
 else {
    pp=new PropertiesProxy(in);
    Streams.safeClose(in);
  }
}

Fixed version (ground truth):
/** 
 * 首先,载入需要的配置信息, 分别从nutz.properties和ServletContext的上下文获取. <p/> 子类可以覆盖这个方法实现从任意方式加载配置
 */
@SuppressWarnings("String_Node_Str") protected void findConfig(){
  String propLocation=sc.getInitParameter(PROP_LOCATION);
  if (Strings.isBlank(propLocation)) {
    propLocation="String_Node_Str";
  }
  PropertiesProxy pp=new PropertiesProxy();
  Enumeration<String> params=sc.getInitParameterNames();
  while (params.hasMoreElements()) {
    String name=(String)params.nextElement();
    if (name.startsWith("String_Node_Str")) {
      pp.put(name,sc.getInitParameter(name).trim());
    }
  }
  InputStream in=getClass().getClassLoader().getResourceAsStream("String_Node_Str" + propLocation);
  if (in == null) {
    in=sc.getResourceAsStream("String_Node_Str" + propLocation);
  }
  if (in == null) {
    log.debug(propLocation + "String_Node_Str");
  }
 else {
    pp=new PropertiesProxy(in);
    Streams.safeClose(in);
    this.pp=pp;
  }
}
Program: 80278
Project: 80278
Buggy source:
private void insertRecords(int len){
  for (int i=0; i < len; i++) {
    Pet pet=Pet.create("String_Node_Str" + i);
    pet.setNickName("String_Node_Str" + i);
    pet.setPrice(R.random(30,100) / 3.1415f);
    dao.insert(pet);
  }
}

Fixed version (ground truth):
private void insertRecords(int len){
  for (int i=0; i < len; i++) {
    Pet pet=Pet.create("String_Node_Str" + i);
    pet.setNickName("String_Node_Str" + i);
    pet.setPrice((float)(R.random(30,100) / Math.PI));
    dao.insert(pet);
  }
}
Program: 80279
Project: 80279
Buggy source:
public void render(HttpServletRequest req,HttpServletResponse resp,Object obj) throws IOException {
  Mvcs.write(resp,null == obj ? data : obj,format);
}

Fixed version (ground truth):
public void render(HttpServletRequest req,HttpServletResponse resp,Object obj) throws IOException {
  resp.setContentType("String_Node_Str");
  Mvcs.write(resp,null == obj ? data : obj,format);
}
Program: 80280
Project: 80280
Buggy source:
public ValueAdaptor getAdaptor(MappingField ef){
  Mirror<?> mirror=ef.getTypeMirror();
  if (mirror.isBoolean())   return new OracleBooleanAdaptor();
  if (mirror.isOf(Clob.class))   return new OracleClobAdapter(Jdbcs.getFilePool());
  if (mirror.isOf(Blob.class))   return new OracleBlobAdaptor(Jdbcs.getFilePool());
  return super.getAdaptor(ef);
}

Fixed version (ground truth):
public ValueAdaptor getAdaptor(MappingField ef){
  Mirror<?> mirror=ef.getTypeMirror();
  if (mirror.isBoolean())   return new OracleBooleanAdaptor();
  if (mirror.isOf(Clob.class))   return new ClobValueAdapter2(Jdbcs.getFilePool());
  if (mirror.isOf(Blob.class))   return new BlobValueAdaptor2(Jdbcs.getFilePool());
  return super.getAdaptor(ef);
}