Program: 74103
Project: 74103
Buggy source:
/** 
 * Given a jar URL, read in the resource and save it as a file in a similar directory in the classpath if possible.  In this context, by similar directory, we mean the directory where the file would found if it was not in the jar url. For example, if the jar url is jar:file:/ptII/doc/design.jar!/doc/design/design.pdf then this method will read design.pdf from design.jar and save it as /ptII/doc/design.pdf.
 * @param jarURLName The name of the jar URL to read.  jar URLS startwith "jar:" and have a "!/" in them.
 * @return the name of the file that was created ornull if the file cannot be created
 * @exception IOException If there is a problem saving the jar URL.
 */
public static String saveJarURLInClassPath(String jarURLName) throws IOException {
  URL jarURL=_lookupJarURL(jarURLName);
  jarURLName=jarURL.toString();
  int jarSeparatorIndex=jarURLName.indexOf("String_Node_Str");
  if (jarSeparatorIndex == -1) {
    return jarURLName;
  }
  String jarURLFileName=jarURLName.substring(0,jarSeparatorIndex);
  String entryFileName=jarURLName.substring(jarSeparatorIndex + 2);
  String jarURLParentFileName=jarURLFileName.substring(0,jarURLFileName.lastIndexOf("String_Node_Str"));
  String parentEntryFileName=entryFileName.substring(0,entryFileName.lastIndexOf("String_Node_Str"));
  if (jarURLParentFileName.endsWith(parentEntryFileName) && jarURLParentFileName.startsWith("String_Node_Str")) {
    String jarURLTop=jarURLParentFileName.substring(10,jarURLParentFileName.length() - parentEntryFileName.length());
    File temporaryFile=new File(jarURLTop,entryFileName);
    if (!temporaryFile.exists()) {
      FileUtilities.binaryCopyURLToFile(jarURL,temporaryFile);
    }
    return temporaryFile.toString();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Given a jar URL, read in the resource and save it as a file in a similar directory in the classpath if possible.  In this context, by similar directory, we mean the directory where the file would found if it was not in the jar url. For example, if the jar url is jar:file:/ptII/doc/design.jar!/doc/design/design.pdf then this method will read design.pdf from design.jar and save it as /ptII/doc/design.pdf.
 * @param jarURLName The name of the jar URL to read.  jar URLS startwith "jar:" and have a "!/" in them.
 * @return the name of the file that was created ornull if the file cannot be created
 * @exception IOException If there is a problem saving the jar URL.
 */
public static String saveJarURLInClassPath(String jarURLName) throws IOException {
  URL jarURL=_lookupJarURL(jarURLName);
  jarURLName=jarURL.toString();
  int jarSeparatorIndex=jarURLName.indexOf("String_Node_Str");
  if (jarSeparatorIndex == -1) {
    return jarURLName;
  }
  String jarURLFileName=jarURLName.substring(0,jarSeparatorIndex);
  String entryFileName=jarURLName.substring(jarSeparatorIndex + 2);
  String jarURLParentFileName=jarURLFileName.substring(0,jarURLFileName.lastIndexOf("String_Node_Str"));
  String parentEntryFileName=entryFileName.substring(0,entryFileName.lastIndexOf("String_Node_Str"));
  if (jarURLParentFileName.endsWith(parentEntryFileName) && jarURLParentFileName.startsWith("String_Node_Str")) {
    String jarURLTop=jarURLParentFileName.substring(9,jarURLParentFileName.length() - parentEntryFileName.length());
    File temporaryFile=new File(jarURLTop,entryFileName);
    if (!temporaryFile.exists()) {
      FileUtilities.binaryCopyURLToFile(jarURL,temporaryFile);
    }
    return temporaryFile.toString();
  }
  return null;
}