int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) {
Flags rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc.asInt() & ~FLAGS_MASK) {
    public void execute() {        if (destDir == null) {            throw new BuildException("The destdir attribute must be set");        }        final Map<String, SourceFile> vmFiles = vmDirs                .scanJavaFiles(getProject());        final Map<String, SourceFile> classpathFiles = classpathDirs                .scanJavaFiles(getProject());        final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs                .scanJavaFiles(getProject());        final TreeSet<String> allFiles = new TreeSet<String>();        final Map<String, String> packageDiffs = new TreeMap<String, String>();        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;            int vmSpecific = 0;            for (String name : allFiles) {                SourceFile cpFile = classpathFiles.get(name);                final SourceFile vmFile = vmFiles.get(name);                final SourceFile vmSpecificFile = vmSpecificFiles                        .get(name);                if (vmSpecificFile != null) {                    // File is found as vm specific source                    reportVmSpecific(out, vmSpecificFile.getReportName(),                            "vm-specific");                    vmSpecific++;                } else if (vmFile == null) {                    // file is not found as vmspecific source, nor as vm source                    if (!cpFile.isIgnoreMissing()) {                        reportMissing(out, cpFile.getReportName(), "classpath",                                getFlags(cpFile));                        missingInCp++;                    }                } else if (cpFile == null) {                    // File is not found in classpath sources                    reportMissing(out, vmFile.getReportName(), "vm", 0);                    missingInVm++;                } else {                    // We have both the classpath version and the vm version.                    cpFile = cpFile.getBestFileForTarget(vmFile.getTarget());                    final String diffFileName = vmFile.getReportName() + ".diff";                    int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs);                    switch (rc & ~FLAGS_MASK) {                    case NO_CHANGE:                        break;                    case NEEDS_MERGE:                        reportNeedsMerge(out, vmFile.getReportName(), vmFile                                .getTarget(), 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 (Map.Entry<String, String> entry : packageDiffs.entrySet()) {                final String pkg = entry.getKey();                final String diff = entry.getValue();                final String diffFileName = pkg + ".pkgdiff";                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 (vmSpecific > 0) {                out.println("Found " + vmSpecific + " VM specific files<br/>");                log("Found " + vmSpecific + " VM specific files");            }            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);        }    }