Program: 43442
Project: 43442
Buggy source:
public List<NutResource> list(final String src,String filter){
  final Pattern regex=null == filter ? null : Pattern.compile(filter);
  final List<NutResource> list=new ArrayList<NutResource>();
  Set<String> jars=sc.getResourcePaths("String_Node_Str");
  if (jars != null)   for (  String path : jars) {
    if (!path.toLowerCase().endsWith("String_Node_Str"))     continue;
    list.addAll(scanInJar(checkSrc(src),regex,sc.getRealPath(path)));
  }
  File dir=Files.findFile(src);
  boolean flag=true;
  if (null != dir && dir.exists()) {
    String src2=Disks.getCanonicalPath(src);
    String dirPath=Disks.getCanonicalPath(dir.getAbsolutePath());
    int pos=dirPath.indexOf(src2,dirPath.indexOf("String_Node_Str") + 7);
    final String base=pos < 0 ? dirPath : dirPath.substring(0,pos);
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",dir,base);
    List<NutResource> list2=scanInDir(regex,base,dir,true);
    for (    NutResource nutResource : list2) {
      String name=nutResource.getName();
      if (name.indexOf(base) > -1)       nutResource.setName(name.substring(base.length()));
      list.add(nutResource);
    }
    flag=list2.isEmpty();
  }
  if (flag && (!src.startsWith("String_Node_Str"))) {
    try {
      String base=sc.getRealPath("String_Node_Str");
      String path=sc.getRealPath("String_Node_Str" + src);
      if (path != null) {
        List<NutResource> list2=scanInDir(regex,base,new File(path),true);
        for (        NutResource nutResource : list2) {
          String name=nutResource.getName();
          if (name.indexOf(base) > -1)           nutResource.setName(name.substring(base.length()));
          list.add(nutResource);
        }
        flag=list2.isEmpty();
      }
    }
 catch (    Throwable e) {
    }
  }
  if (flag && log.isInfoEnabled())   log.infof("String_Node_Str",src,sc.getServletContextName());
  return list;
}

Fixed version (ground truth):
public List<NutResource> list(final String src,String filter){
  final Pattern regex=null == filter ? null : Pattern.compile(filter);
  final List<NutResource> list=new ArrayList<NutResource>();
  Set<String> jars=sc.getResourcePaths("String_Node_Str");
  if (jars != null)   for (  String path : jars) {
    if (!path.toLowerCase().endsWith("String_Node_Str"))     continue;
    list.addAll(scanInJar(checkSrc(src),regex,sc.getRealPath(path)));
  }
  File dir=Files.findFile(src);
  boolean flag=true;
  if (null != dir && dir.exists()) {
    String src2=Disks.getCanonicalPath(src);
    String dirPath=Disks.getCanonicalPath(dir.getAbsolutePath());
    int pos=dirPath.indexOf(src2,dirPath.indexOf("String_Node_Str") + 7);
    final String base=pos < 0 ? dirPath : dirPath.substring(0,pos);
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",dir,base);
    List<NutResource> list2=scanInDir(regex,base,dir,true);
    for (    NutResource nutResource : list2) {
      String name=nutResource.getName();
      if (name.indexOf(base) > -1)       nutResource.setName(name.substring(base.length()));
      list.add(nutResource);
    }
    flag=list2.isEmpty();
  }
  if (flag && (!src.startsWith("String_Node_Str"))) {
    try {
      String base=sc.getRealPath("String_Node_Str");
      String path=sc.getRealPath("String_Node_Str" + src);
      if (path != null) {
        List<NutResource> list2=scanInDir(regex,base,new File(path),true);
        for (        NutResource nutResource : list2) {
          String name=nutResource.getName();
          if (name.indexOf(base) > -1)           nutResource.setName(name.substring(base.length()));
          list.add(nutResource);
        }
        flag=list2.isEmpty();
      }
    }
 catch (    Throwable e) {
    }
  }
  if (flag) {
    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,pathZ,new File(pathZ + "String_Node_Str" + src),true));
    }
    flag=list.isEmpty();
  }
  if (flag && log.isInfoEnabled())   log.infof("String_Node_Str",src,sc.getServletContextName());
  return list;
}