Program: 140664
Project: 140664
Buggy source:
/** 
 * Copy the files from srcPath to destination folder.
 * @param srcPath The path name in which to look. The path is always relative to the root of this bundle and maybegin with &quot;/&quot;. A path value of &quot;/&quot; indicates the root of this bundle.
 * @param srcFilePattern The file name pattern for selecting entries in the specified path. The pattern is onlymatched against the last element of the entry path and it supports substring matching, as specified in the Filter specification, using the wildcard character (&quot;*&quot;). If null is specified, this is equivalent to &quot;*&quot; and matches all files.
 * @param recurse If <code>true</code>, recurse into subdirectories. Otherwise only return entries from thespecified path.
 * @param desFolder The destination folder.
 * @throws IOException
 * @throws CoreException
 */
@SuppressWarnings("String_Node_Str") private void copyFilesToFolder(String srcPath,String srcFilePattern,boolean recurse,IFolder desFolder) throws IOException, CoreException {
  Enumeration patterns=null;
  patterns=CorePlugin.getDefault().getBundle().findEntries(srcPath,srcFilePattern,recurse);
  while (patterns.hasMoreElements()) {
    URL nextElement=(URL)patterns.nextElement();
    URL fileURL=null;
    try {
      fileURL=FileLocator.toFileURL(nextElement);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    String fileName=new Path(fileURL.getPath()).lastSegment();
    InputStream openStream=null;
    openStream=fileURL.openStream();
    copyFileToFolder(openStream,fileName,desFolder);
  }
}

Fixed version (ground truth):
/** 
 * Copy the files from srcPath to destination folder.
 * @param srcPath The path name in which to look. The path is always relative to the root of this bundle and maybegin with &quot;/&quot;. A path value of &quot;/&quot; indicates the root of this bundle.
 * @param srcPath
 * @param recurse If <code>true</code>, recurse into subdirectories(contains directories). Otherwise only returnentries from the specified path.
 * @param desFolder
 * @throws IOException
 * @throws CoreException
 */
@SuppressWarnings("String_Node_Str") private void copyFilesToFolder(String srcPath,boolean recurse,IFolder desFolder) throws IOException, CoreException {
  Enumeration paths=null;
  paths=CorePlugin.getDefault().getBundle().getEntryPaths(srcPath);
  while (paths.hasMoreElements()) {
    String nextElement=(String)paths.nextElement();
    String currentPath="String_Node_Str" + nextElement;
    URL resourceURL=CorePlugin.getDefault().getBundle().getEntry(currentPath);
    URL fileURL=null;
    File file=null;
    try {
      fileURL=FileLocator.toFileURL(resourceURL);
      file=new File(fileURL.getFile());
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    if (file.isDirectory() && recurse) {
      if (file.getName().startsWith("String_Node_Str")) {
        continue;
      }
      IFolder folder=desFolder.getFolder(file.getName());
      if (!folder.exists()) {
        folder.create(false,true,null);
      }
      copyFilesToFolder(currentPath,recurse,folder);
      continue;
    }
    String fileName=new Path(fileURL.getPath()).lastSegment();
    InputStream openStream=null;
    openStream=fileURL.openStream();
    copyFileToFolder(openStream,fileName,desFolder);
  }
}