final String diffFileName = pkg + ".diff";
final String diffFileName = pkg + ".pkgdiff";
    public void execute() {        if (destDir == null) {            throw new BuildException("The destdir attribute must be set");        }        final Map vmFiles = scanJavaFiles(vmDirs);        final Map classpathFiles = scanJavaFiles(classpathDirs);        final TreeSet allFiles = new TreeSet();        final Map packageDiffs = new TreeMap();        allFiles.addAll(vmFiles.keySet());        allFiles.addAll(classpathFiles.keySet());                try {            destDir.mkdirs();            final File outFile = new File(destDir, "classpath-compare.html");            final PrintWriter out = new PrintWriter(new FileWriter(outFile));            reportHeader(out);            int missingInCp = 0;            int missingInVm = 0;            int needsMerge = 0;            int diffVmSpecific = 0;            int diffClasspathBugfix = 0;            int diffNative = 0;            int diffJNode = 0;                        for (Iterator i = allFiles.iterator(); i.hasNext(); ) {                final String name = (String)i.next();                final JavaFile cpFile = (JavaFile)classpathFiles.get(name);                final JavaFile vmFile = (JavaFile)vmFiles.get(name);                                if (!vmFiles.containsKey(name)) {                    reportMissing(out, cpFile.getClassName(), "classpath", getFlags(cpFile));                    missingInCp++;                } else if (!classpathFiles.containsKey(name)) {                    reportMissing(out, vmFile.getClassName(), "vm", 0);                    missingInVm++;                } else {                                        final String diffFileName = vmFile.getClassName() + ".diff";                    int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs);                    switch (rc & ~FLAGS_MASK) {                    case NO_CHANGE: break;                    case NEEDS_MERGE:                        reportNeedsMerge(out, vmFile.getClassName(), diffFileName, rc & FLAGS_MASK);                        needsMerge++;                        break;                    default:                        throw new RuntimeException("Invalid rc " + rc);                    }                    if ((rc & FLAG_VM_SPECIFIC) != 0) {                        diffVmSpecific++;                    }                    if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) {                        diffClasspathBugfix++;                    }                    if ((rc & FLAG_NATIVE) != 0) {                        diffNative++;                    }                    if ((rc & FLAG_JNODE) != 0) {                        diffJNode++;                    }                    // Let's compare them                }            }            // Package diffs            for (Iterator i = packageDiffs.entrySet().iterator(); i.hasNext(); ) {                final Map.Entry entry = (Map.Entry)i.next();                final String pkg = (String)entry.getKey();                final String diff = (String)entry.getValue();                final String diffFileName = pkg + ".diff";                processPackageDiff(diffFileName, pkg, diff);                reportPackageDiff(out, pkg, diffFileName, getFlags(diff));            }                        out.println("</table><p/>");                        // Summary            out.println("<a name='summary'/><h2>Summary</h2>");            if (missingInCp > 0) {            	out.println("Found " + missingInCp + " files missing in classpath</br>");            	log("Found " + missingInCp + " files missing in classpath");            }            if (missingInVm > 0) {            	out.println("Found " + missingInVm + " files missing in vm<br/>");            	log("Found " + missingInVm + " files missing in vm");            }            if (needsMerge > 0) {            	out.println("Found " + needsMerge + " files that needs merging<br/>");            	log("Found " + needsMerge + " files that needs merging");			}                        if (diffVmSpecific > 0) {            	out.println("Found " + diffVmSpecific + " VM specific differences<br/>");            	log("Found " + diffVmSpecific + " VM specific differences");			}                        if (diffClasspathBugfix > 0) {            	out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>");            	log("Found " + diffClasspathBugfix + " local classpath bugfixes");			}                        if (diffNative > 0) {            	out.println("Found " + diffNative + " changes with native in it<br/>");            	log("Found " + diffNative + " changes with native in it");			}                        if (diffJNode > 0) {            	out.println("Found " + diffJNode + " changes with JNode in it<br/>");            	log("Found " + diffJNode + " changes with JNode in it");			}                                    reportFooter(out);            out.flush();            out.close();        } catch (IOException ex) {            throw new BuildException(ex);        } catch (InterruptedException ex) {            throw new BuildException(ex);        }    }