CPD Report

=====================================================================
Found a 59 line (169 tokens) duplication in the following files: 
Starting at line 134 of C:\devroot\addam\main\src\main\java\net\sourceforge\addam\impexp\ExportDataTask.java
Starting at line 315 of C:\devroot\addam\main\src\main\java\net\sourceforge\addam\impexp\ImportDataTask.java
    }

    /**
     * this is a shortcut for having an <includeTables> subelement by simply providing a filename as an attribute to this task
     *
     * @param tableFile a file containing an ordered list of tables
     */
    public void setIncludeFile(File tableFile) {
        Tables tables = new Tables();
        tables.setFile(tableFile);
        includes.add(tables);
    }

    /**
     * this is a shortcut for having a <excludeTables> subelement by simply providing a filename as an attribute to this task
     *
     * @param tableFile a file containing an ordered list of tables
     */
    public void setExcludeFile(File tableFile) {
        Tables tables = new Tables();
        tables.setFile(tableFile);
        excludes.add(tables);
    }

    /**
     * @param pattern a regexp pattern to compare table names to
     */
    public void setIncludesPattern(String pattern) {
        Tables tables = new Tables();
        tables.setPattern(pattern);
        includes.add(tables);
    }

    /**
     * @param pattern a regexp pattern to compare table names to
     */
    public void setExcludesPattern(String pattern) {
        Tables tables = new Tables();
        tables.setPattern(pattern);
        excludes.add(tables);
    }

    /**
     * @param names a comma separated list of table names
     */
    public void setIncludes(String names) {
        Tables tables = new Tables();
        tables.setNames(names);
        includes.add(tables);
    }

    /**
     * @param names a comma separated list of table names
     */
    public void setExcludes(String names) {
        Tables tables = new Tables();
        tables.setNames(names);
        excludes.add(tables);
    }
=====================================================================
Found a 11 line (133 tokens) duplication in the following files: 
Starting at line 33 of C:\devroot\addam\main\src\main\java\net\sourceforge\addam\ddlgen\generic\VelocityGenerator.java
Starting at line 25 of C:\devroot\addam\main\src\main\java\net\sourceforge\addam\util\DatabaseMetaDataUtil.java
        if (metadata.storesUpperCaseIdentifiers()) {
            catalog = (catalog == null) ? null : catalog.toUpperCase();
            schema = (schema == null) ? null : schema.toUpperCase();
        } else if (metadata.storesLowerCaseIdentifiers()) {
            catalog = (catalog == null) ? null : catalog.toLowerCase();
            schema = (schema == null) ? null : schema.toLowerCase();
        }
        ResultSet tablesRS = metadata.getTables(catalog, schema, "%", new String[]{"TABLE"});
        List<String> objects = new ArrayList<String>();
        while (tablesRS.next()) {
            String dbObject = tablesRS.getString(3);
=====================================================================
Found a 20 line (116 tokens) duplication in the following files: 
Starting at line 59 of C:\devroot\addam\main\src\main\java\net\sourceforge\addam\ddlrun\InstallTask.java
Starting at line 69 of C:\devroot\addam\main\src\main\java\net\sourceforge\addam\ddlrun\UpgradeTask.java
            runner.addRunLogger(this);
            runner.run(script.getName());
        } catch (Exception e) {
            throw new BuildException(e);
        }
    }

    public void logRunScript(String script, long time) throws Exception {
        this.log("executed " + script + " (" + time + "ms)");
    }

    public void logRunComplete(String group, long time) throws Exception {
        this.log("completed execution of available scripts in " + group + " (" + time + "ms)");
    }

    public void logRunFailure(String group, String script, Exception e) throws Exception {
        this.log(group + "/" + script + " failed!");
    }

    private File script = null;