Program: 75456
Project: 75456
Buggy source:
/** 
 * copy resource to the platform.  If the resources is a folder, make the same folder into the platform and copy all resources into the dest folder.
 * @param resourcePath resource path.
 * @param platform platform folder
 */
private void copyResources(String resourcePath,String platform){
  Set paths=context.getResourcePaths(resourcePath);
  if (paths != null) {
    for (Iterator it=paths.iterator(); it.hasNext(); ) {
      String path=(String)it.next();
      File newFile=new File(platform,path.substring(RESOURCE_BASE.length()));
      if (path.endsWith("String_Node_Str")) {
        newFile.mkdir();
        copyResources(path,platform);
      }
 else {
        InputStream is=null;
        OutputStream os=null;
        try {
          if (newFile.createNewFile()) {
            is=context.getResourceAsStream(path);
            os=new FileOutputStream(newFile);
            byte[] buffer=new byte[8192];
            int bytesRead=is.read(buffer);
            while (bytesRead != -1) {
              os.write(buffer,0,bytesRead);
              bytesRead=is.read(buffer);
            }
          }
        }
 catch (        IOException e) {
          log.log(Level.WARNING,"String_Node_Str",e);
        }
 finally {
          try {
            if (is != null) {
              is.close();
            }
          }
 catch (          Exception ex) {
          }
          try {
            if (os != null) {
              os.close();
            }
          }
 catch (          Exception ex) {
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * copy resource to the platform.  If the resources is a folder, make the same folder into the platform and copy all resources into the dest folder.
 * @param resourcePath resource path.
 * @param platform platform folder
 */
private void copyResources(String resourcePath,String platform){
  Set paths=context.getResourcePaths(resourcePath);
  if (paths != null) {
    for (Iterator it=paths.iterator(); it.hasNext(); ) {
      String path=(String)it.next();
      File newFile=new File(platform,path.substring(RESOURCE_BASE.length()));
      if (path.endsWith("String_Node_Str")) {
        newFile.mkdir();
        copyResources(path,platform);
      }
 else {
        InputStream is=null;
        OutputStream os=null;
        try {
          if (newFile.createNewFile()) {
            is=context.getResourceAsStream(path);
            os=new FileOutputStream(newFile);
            byte[] buffer=new byte[8192];
            int bytesRead=is.read(buffer);
            while (bytesRead != -1) {
              os.write(buffer,0,bytesRead);
              bytesRead=is.read(buffer);
            }
          }
        }
 catch (        IOException e) {
          log.log(Level.WARNING,"String_Node_Str",e);
        }
 finally {
          if (is != null) {
            try {
              is.close();
            }
 catch (            Exception exin) {
              log.log(Level.WARNING,"String_Node_Str",exin);
            }
            is=null;
          }
          if (os != null) {
            try {
              os.close();
            }
 catch (            Exception exout) {
              log.log(Level.WARNING,"String_Node_Str",exout);
            }
            os=null;
          }
        }
      }
    }
  }
}