RAT-203: Replace licence by license

* Use license in documentation, javadoc and comments to not confuse users.
* TODO: Rename classes after this commit.
* Deprecated CLI option appendLicence will remain active,
  works like appendLicense.


git-svn-id: https://svn.apache.org/repos/asf/creadur/rat/trunk@1681534 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 757a562..057470f 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -52,6 +52,7 @@
     * [RAT-201] - BinaryGuesser should treat *.swf as binary. 
                   Furthermore BinaryGuesser falls back to UTF-8 encoding in case the encoding given via system property (-Dfile.encoding) was not found.
     * [RAT-202] - Report layout differs between successful RAT checks and existence of unapproved files.
+    * [RAT-203] - Using 'license' in README, source code, javadoc, comments and site instead of 'licence'; improve terminology to not confuse RAT consumers.
 
 Rat 0.11
 ========
@@ -264,6 +265,4 @@
  * This is the last release with the original hacked together plain test report.
    The new XML reporting code is present but is not yet the default.
  * Rat 0.3 is the first release with release notes. All previous releases are
-   now consigned to Ancient History. No record of them will be found here.
-
-
+   now consigned to Ancient History. No record of them will be found here.
\ No newline at end of file
diff --git a/apache-rat-core/src/main/java/org/apache/rat/Report.java b/apache-rat-core/src/main/java/org/apache/rat/Report.java
index 4bec1eb..c53fffd 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/Report.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/Report.java
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat;
 
 import org.apache.commons.cli.CommandLine;
@@ -42,7 +42,17 @@
 import org.apache.rat.walker.DirectoryWalker;
 
 import javax.xml.transform.TransformerConfigurationException;
-import java.io.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.io.PipedReader;
+import java.io.PipedWriter;
+import java.io.PrintStream;
+import java.io.Writer;
 import java.util.List;
 
 
@@ -90,8 +100,7 @@
                     final FilenameFilter filter = new NotFileFilter(new WildcardFileFilter(excludes));
                     report.setInputFileFilter(filter);
                 }
-            }
-            else if (cl.hasOption(EXCLUDE_FILE_CLI)) {
+            } else if (cl.hasOption(EXCLUDE_FILE_CLI)) {
                 String excludeFileName = cl.getOptionValue(EXCLUDE_FILE_CLI);
                 if (excludeFileName != null) {
                     List<String> excludes = FileUtils.readLines(new File(excludeFileName));
@@ -121,7 +130,7 @@
                                 configuration);
                     } catch (FileNotFoundException fnfe) {
                         System.err.println("stylesheet " + style[0]
-                                           + " doesn't exist");
+                                + " doesn't exist");
                         System.exit(1);
                     }
                 }
@@ -133,66 +142,69 @@
         Options opts = new Options();
 
         Option help = new Option("h", "help", false,
-        "Print help for the Rat command line interface and exit");
+                "Print help for the Rat command line interface and exit");
         opts.addOption(help);
 
-        OptionGroup addLicenceGroup = new OptionGroup();
-        String addLicenceDesc = "Add the default licence header to any file with an unknown licence that is not in the exclusion list. By default new files will be created with the licence header, to force the modification of existing files use the --force option.";
+        OptionGroup addLicenseGroup = new OptionGroup();
+        String addLicenseDesc = "Add the default license header to any file with an unknown license that is not in the exclusion list. " +
+                "By default new files will be created with the license header, " +
+                "to force the modification of existing files use the --force option.";
 
+        // RAT-85/RAT-203: Deprecated! added only for convenience and for backwards compatibility
         Option addLicence = new Option(
                 "a",
                 "addLicence",
                 false,
-                addLicenceDesc);
-        addLicenceGroup.addOption(addLicence);
+                addLicenseDesc);
+        addLicenseGroup.addOption(addLicence);
         Option addLicense = new Option(
                 "A",
                 "addLicense",
                 false,
-                addLicenceDesc);
-        addLicenceGroup.addOption(addLicense);
-        opts.addOptionGroup(addLicenceGroup);
+                addLicenseDesc);
+        addLicenseGroup.addOption(addLicense);
+        opts.addOptionGroup(addLicenseGroup);
 
         Option write = new Option(
                 "f",
                 "force",
                 false,
-        "Forces any changes in files to be written directly to the source files (i.e. new files are not created)");
+                "Forces any changes in files to be written directly to the source files (i.e. new files are not created)");
         opts.addOption(write);
 
         Option copyright = new Option(
                 "c",
                 "copyright",
                 true,
-        "The copyright message to use in the licence headers, usually in the form of \"Copyright 2008 Foo\"");
+                "The copyright message to use in the license headers, usually in the form of \"Copyright 2008 Foo\"");
         opts.addOption(copyright);
 
         @SuppressWarnings("static-access") // ignore OptionBuilder design fault
         final Option exclude = OptionBuilder
-                            .withArgName("expression")
-                            .withLongOpt("exclude")
-                            .hasArgs()
-                            .withDescription("Excludes files matching wildcard <expression>. " +
-                                    "Note that --dir is required when using this parameter. " +
-                                    "Allows multiple arguments.")
-                            .create(EXCLUDE_CLI);
+                .withArgName("expression")
+                .withLongOpt("exclude")
+                .hasArgs()
+                .withDescription("Excludes files matching wildcard <expression>. " +
+                        "Note that --dir is required when using this parameter. " +
+                        "Allows multiple arguments.")
+                .create(EXCLUDE_CLI);
         opts.addOption(exclude);
 
         @SuppressWarnings("static-access") // ignore OptionBuilder design fault
         final Option excludeFile = OptionBuilder
-                            .withArgName("fileName")
-                            .withLongOpt("exclude-file")
-                            .hasArgs()
-                            .withDescription("Excludes files matching regular expression in <file> " +
-                                    "Note that --dir is required when using this parameter. " )
-                            .create(EXCLUDE_FILE_CLI);
+                .withArgName("fileName")
+                .withLongOpt("exclude-file")
+                .hasArgs()
+                .withDescription("Excludes files matching regular expression in <file> " +
+                        "Note that --dir is required when using this parameter. ")
+                .create(EXCLUDE_FILE_CLI);
         opts.addOption(excludeFile);
 
         Option dir = new Option(
                 "d",
                 "dir",
                 false,
-        "Used to indicate source when using --exclude");
+                "Used to indicate source when using --exclude");
         opts.addOption(dir);
 
         OptionGroup outputType = new OptionGroup();
@@ -205,10 +217,10 @@
         outputType.addOption(xml);
 
         Option xslt = new Option(String.valueOf(STYLESHEET_CLI),
-                                 "stylesheet",
-                                 true,
-                                 "XSLT stylesheet to use when creating the"
-                                 + " report.  Not compatible with -x");
+                "stylesheet",
+                true,
+                "XSLT stylesheet to use when creating the"
+                        + " report.  Not compatible with -x");
         outputType.addOption(xslt);
         opts.addOptionGroup(outputType);
 
@@ -225,7 +237,7 @@
         footer.append("Rat is also rather memory hungry ATM\n");
         footer.append("Rat is very basic ATM\n");
         footer.append("Rat highlights possible issues\n");
-        footer.append("Rat reports require intepretation\n");
+        footer.append("Rat reports require interpretation\n");
         footer.append("Rat often requires some tuning before it runs well against a project\n");
         footer.append("Rat relies on heuristics: it may miss issues\n");
 
@@ -244,6 +256,7 @@
 
     /**
      * Gets the current filter used to select files.
+     *
      * @return current file filter, or null when no filter has been set
      */
     public FilenameFilter getInputFileFilter() {
@@ -252,6 +265,7 @@
 
     /**
      * Sets the current filter used to select files.
+     *
      * @param inputFileFilter filter, or null when no filter has been set
      */
     public void setInputFileFilter(FilenameFilter inputFileFilter) {
@@ -260,11 +274,9 @@
 
     /**
      * @param out - the output stream to receive the styled report
-     * @throws Exception in case of errors.
-     * 
-     * @deprecated use {@link #report(PrintStream, ReportConfiguration)} instead
-     * 
      * @return the currently collected numerical statistics.
+     * @throws Exception in case of errors.
+     * @deprecated use {@link #report(PrintStream, ReportConfiguration)} instead
      */
     @Deprecated
     public ClaimStatistic report(PrintStream out) throws Exception {
@@ -275,16 +287,15 @@
     }
 
     /**
-     * @param out - the output stream to receive the styled report
+     * @param out           - the output stream to receive the styled report
      * @param configuration - current configuration options.
-     * @throws Exception in case of errors.
-     * 
-     * @since Rat 0.8
      * @return the currently collected numerical statistics.
+     * @throws Exception in case of errors.
+     * @since Rat 0.8
      */
     public ClaimStatistic report(PrintStream out,
                                  ReportConfiguration configuration)
-        throws Exception {
+            throws Exception {
         final IReportable base = getDirectory(out);
         if (base != null) {
             return report(base, new OutputStreamWriter(out), configuration);
@@ -299,7 +310,7 @@
             out.print(baseDirectory);
             out.print(" does not exist.\n");
             return null;
-        } 
+        }
 
         if (base.isDirectory()) {
             return new DirectoryWalker(base, inputFileFilter);
@@ -316,9 +327,9 @@
     }
 
     /**
-     * Output a report in the default style and default licence
-     * header matcher. 
-     * 
+     * Output a report in the default style and default license
+     * header matcher.
+     *
      * @param out - the output stream to receive the styled report
      * @throws Exception in case of errors.
      * @deprecated use {@link #styleReport(PrintStream, ReportConfiguration)} instead
@@ -332,17 +343,17 @@
     }
 
     /**
-     * Output a report in the default style and default licence
-     * header matcher. 
-     * 
-     * @param out - the output stream to receive the styled report
+     * Output a report in the default style and default license
+     * header matcher.
+     *
+     * @param out           - the output stream to receive the styled report
      * @param configuration the configuration to use
      * @throws Exception in case of errors.
      * @since Rat 0.8
      */
     public void styleReport(PrintStream out,
                             ReportConfiguration configuration)
-        throws Exception {
+            throws Exception {
         final IReportable base = getDirectory(out);
         if (base != null) {
             InputStream style = Defaults.getDefaultStyleSheet();
@@ -352,42 +363,38 @@
 
     /**
      * Output a report that is styled using a defined stylesheet.
-     * 
-     * @param out the stream to write the report to
-     * @param base the files or directories to report on
-     * @param style an input stream representing the stylesheet to use for styling the report
+     *
+     * @param out            the stream to write the report to
+     * @param base           the files or directories to report on
+     * @param style          an input stream representing the stylesheet to use for styling the report
      * @param pConfiguration current report configuration.
-     * 
-     * @throws IOException in case of I/O errors.
+     * @throws IOException                       in case of I/O errors.
      * @throws TransformerConfigurationException in case of XML errors.
-     * @throws InterruptedException in case of threading errors.
-     * @throws RatException in case of internal errors.
+     * @throws InterruptedException              in case of threading errors.
+     * @throws RatException                      in case of internal errors.
      */
     public static void report(PrintStream out, IReportable base, final InputStream style,
-                              ReportConfiguration pConfiguration) 
-            throws IOException, TransformerConfigurationException,  InterruptedException, RatException {
+                              ReportConfiguration pConfiguration)
+            throws IOException, TransformerConfigurationException, InterruptedException, RatException {
         report(new OutputStreamWriter(out), base, style, pConfiguration);
     }
 
     /**
-     * 
      * Output a report that is styled using a defined stylesheet.
-     * 
-     * @param out the writer to write the report to
-     * @param base the files or directories to report on
-     * @param style an input stream representing the stylesheet to use for styling the report
+     *
+     * @param out            the writer to write the report to
+     * @param base           the files or directories to report on
+     * @param style          an input stream representing the stylesheet to use for styling the report
      * @param pConfiguration current report configuration.
-     * 
-     * @throws IOException in case of I/O errors.
-     * @throws TransformerConfigurationException in case of XML errors.
-     * @throws InterruptedException in case of threading errors.
-     * @throws RatException in case of internal errors.
-     * 
      * @return the currently collected numerical statistics.
+     * @throws IOException                       in case of I/O errors.
+     * @throws TransformerConfigurationException in case of XML errors.
+     * @throws InterruptedException              in case of threading errors.
+     * @throws RatException                      in case of internal errors.
      */
-    public static ClaimStatistic report(Writer out, IReportable base, final InputStream style, 
-            ReportConfiguration pConfiguration) 
-    throws IOException, TransformerConfigurationException, InterruptedException, RatException {
+    public static ClaimStatistic report(Writer out, IReportable base, final InputStream style,
+                                        ReportConfiguration pConfiguration)
+            throws IOException, TransformerConfigurationException, InterruptedException, RatException {
         PipedReader reader = new PipedReader();
         PipedWriter writer = new PipedWriter(reader);
         ReportTransformer transformer = new ReportTransformer(out, style, reader);
@@ -401,18 +408,15 @@
     }
 
     /**
-     * 
-     * @param container the files or directories to report on
-     * @param out the writer to write the report to
+     * @param container      the files or directories to report on
+     * @param out            the writer to write the report to
      * @param pConfiguration current report configuration.
-     * 
-     * @throws IOException in case of I/O errors.
-     * @throws RatException in case of internal errors.
-     * 
      * @return the currently collected numerical statistics.
+     * @throws IOException  in case of I/O errors.
+     * @throws RatException in case of internal errors.
      */
     public static ClaimStatistic report(final IReportable container, final Writer out,
-            ReportConfiguration pConfiguration) throws IOException, RatException {
+                                        ReportConfiguration pConfiguration) throws IOException, RatException {
         IXmlWriter writer = new XmlWriter(out);
         final ClaimStatistic statistic = new ClaimStatistic();
         RatReport report = XmlReportFactory.createStandardReport(writer, statistic, pConfiguration);
diff --git a/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL1License.java b/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL1License.java
index a1b6f27..5c94092 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL1License.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL1License.java
@@ -15,13 +15,13 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.analysis.license;
 
 import org.apache.rat.api.MetaData;
 
 /**
- * Licence matches GPL1 or later.
+ * License matches GPL1 or later.
  */
 public class GPL1License extends FullTextMatchingLicense {
     public static final String FIRST_LICENSE_LINE = "This program is free software; you can redistribute it and/or modify\n" +
diff --git a/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL2License.java b/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL2License.java
index 27ba217..ed92592 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL2License.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL2License.java
@@ -15,13 +15,13 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.analysis.license;
 
 import org.apache.rat.api.MetaData;
 
 /**
- * Licence matches GPL2 or later.
+ * License matches GPL2 or later.
  */
 public class GPL2License extends FullTextMatchingLicense {
     public static final String FIRST_LICENSE_LINE = "This program is free software; you can redistribute it and/or\n" +
diff --git a/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL3License.java b/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL3License.java
index f64acaa..c9a84fd 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL3License.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL3License.java
@@ -15,13 +15,13 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.analysis.license;
 
 import org.apache.rat.api.MetaData;
 
 /**
- * Licence matches GPL3 or later.
+ * License matches GPL3 or later.
  */
 public class GPL3License extends FullTextMatchingLicense {
     public static final String FIRST_LICENSE_LINE = "This program is free software: you can redistribute it and/or modify\n" +
diff --git a/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java b/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java
index c12a266..3675d4d 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java
@@ -32,11 +32,10 @@
 import java.util.Map;
 
 /**
- * Add a licence header to a document. This appender does not check for the
- * existence of an existing licence header, it is assumed that either a second
- * licence header is intentional or that there is no licence header present
+ * Add a license header to a document. This appender does not check for the
+ * existence of an existing license header, it is assumed that either a second
+ * license header is intentional or that there is no license header present
  * already.
- *
  */
 public abstract class AbstractLicenceAppender {
     private static final String DOT = ".";
@@ -67,47 +66,49 @@
     private static final int TYPE_JSP = 24;
     private static final int TYPE_FML = 25;
 
-    /** the line separator for this OS */
+    /**
+     * the line separator for this OS
+     */
     private static final String LINE_SEP = System.getProperty("line.separator");
 
-    private static final int[] FAMILY_C = new int[] {
-        TYPE_JAVA, TYPE_JAVASCRIPT, TYPE_C, TYPE_H, TYPE_SCALA,
-        TYPE_CSS, TYPE_CPP, TYPE_CSHARP, TYPE_PHP, TYPE_GROOVY,
-        TYPE_BEANSHELL,
+    private static final int[] FAMILY_C = new int[]{
+            TYPE_JAVA, TYPE_JAVASCRIPT, TYPE_C, TYPE_H, TYPE_SCALA,
+            TYPE_CSS, TYPE_CPP, TYPE_CSHARP, TYPE_PHP, TYPE_GROOVY,
+            TYPE_BEANSHELL,
     };
-    private static final int[] FAMILY_SGML = new int[] {
-        TYPE_XML, TYPE_HTML, TYPE_JSP, TYPE_FML,
+    private static final int[] FAMILY_SGML = new int[]{
+            TYPE_XML, TYPE_HTML, TYPE_JSP, TYPE_FML,
     };
-    private static final int[] FAMILY_SH = new int[] {
-        TYPE_PROPERTIES, TYPE_PYTHON, TYPE_SH, TYPE_RUBY, TYPE_PERL,
-        TYPE_TCL, TYPE_VISUAL_STUDIO_SOLUTION,
+    private static final int[] FAMILY_SH = new int[]{
+            TYPE_PROPERTIES, TYPE_PYTHON, TYPE_SH, TYPE_RUBY, TYPE_PERL,
+            TYPE_TCL, TYPE_VISUAL_STUDIO_SOLUTION,
     };
-    private static final int[] FAMILY_BAT = new int[] {
-        TYPE_BAT,
+    private static final int[] FAMILY_BAT = new int[]{
+            TYPE_BAT,
     };
-    private static final int[] FAMILY_APT = new int[] {
-        TYPE_APT,
+    private static final int[] FAMILY_APT = new int[]{
+            TYPE_APT,
     };
-    private static final int[] FAMILY_VELOCITY = new int[] {
-        TYPE_VM,
+    private static final int[] FAMILY_VELOCITY = new int[]{
+            TYPE_VM,
     };
-    private static final int[] EXPECTS_HASH_PLING = new int[] {
-        TYPE_PYTHON, TYPE_SH, TYPE_RUBY, TYPE_PERL, TYPE_TCL
+    private static final int[] EXPECTS_HASH_PLING = new int[]{
+            TYPE_PYTHON, TYPE_SH, TYPE_RUBY, TYPE_PERL, TYPE_TCL
     };
-    private static final int[] EXPECTS_AT_ECHO = new int[] {
-        TYPE_BAT,
+    private static final int[] EXPECTS_AT_ECHO = new int[]{
+            TYPE_BAT,
     };
-    private static final int[] EXPECTS_PACKAGE = new int[] {
-        TYPE_JAVA,
+    private static final int[] EXPECTS_PACKAGE = new int[]{
+            TYPE_JAVA,
     };
-    private static final int[] EXPECTS_XML_DECL = new int[] {
-        TYPE_XML,
+    private static final int[] EXPECTS_XML_DECL = new int[]{
+            TYPE_XML,
     };
-    private static final int[] EXPECTS_PHP_PI = new int[] {
-        TYPE_PHP,
+    private static final int[] EXPECTS_PHP_PI = new int[]{
+            TYPE_PHP,
     };
-    private static final int[] EXPECTS_MSVSSF_HEADER = new int[] {
-        TYPE_VISUAL_STUDIO_SOLUTION,
+    private static final int[] EXPECTS_MSVSSF_HEADER = new int[]{
+            TYPE_VISUAL_STUDIO_SOLUTION,
     };
 
     private static final Map<String, Integer> EXT2TYPE = new HashMap<String, Integer>();
@@ -187,11 +188,10 @@
     }
 
     /**
-     * Append the default licence header to the supplied document.
+     * Append the default license header to the supplied document.
      *
      * @param document document to append to.
-     * @throws IOException
-     *           if there is a problem while reading or writing the file
+     * @throws IOException if there is a problem while reading or writing the file
      */
     public void append(File document) throws IOException {
         int type = getType(document);
@@ -210,8 +210,8 @@
         FileWriter writer = new FileWriter(newDocument);
         try {
             if (!attachLicense(writer, document,
-                               expectsHashPling, expectsAtEcho, expectsPackage,
-                               expectsXMLDecl, expectsPhpPI, expectsMSVSSF)) {
+                    expectsHashPling, expectsAtEcho, expectsPackage,
+                    expectsXMLDecl, expectsPhpPI, expectsMSVSSF)) {
                 // Java File without package, XML file without decl or PHP
                 // file without PI
                 // for Java just place the license at the front, for XML add
@@ -223,7 +223,7 @@
                         writer.write(LINE_SEP);
                     }
                     attachLicense(writer, document,
-                                  false, false, false, false, false, false);
+                            false, false, false, false, false, false);
                 }
             }
         } finally {
@@ -242,6 +242,7 @@
     /**
      * Write document's content to writer attaching the license using
      * the given flags as hints for where to put it.
+     *
      * @return whether the license has actually been written
      */
     private boolean attachLicense(Writer writer, File document,
@@ -251,7 +252,7 @@
                                   boolean expectsXMLDecl,
                                   boolean expectsPhpPI,
                                   boolean expectsMSVSSF)
-        throws IOException {
+            throws IOException {
         boolean written = false;
         try {
             FileInputStream fis = new FileInputStream(document);
@@ -260,13 +261,13 @@
                 br = new BufferedReader(new InputStreamReader(new BOMInputStream(fis)));
 
                 if (!expectsHashPling
-                    && !expectsAtEcho
-                    && !expectsPackage
-                    && !expectsXMLDecl
-                    && !expectsPhpPI
-                    && !expectsMSVSSF) {
+                        && !expectsAtEcho
+                        && !expectsPackage
+                        && !expectsXMLDecl
+                        && !expectsPhpPI
+                        && !expectsMSVSSF) {
                     written = true;
-                    writer.write(getLicenceHeader(document));
+                    writer.write(getLicenseHeader(document));
                     writer.write(LINE_SEP);
                 }
 
@@ -285,7 +286,7 @@
                             line = passThroughReadNext(writer, line, br);
                         }
                         if (line.startsWith("Microsoft Visual Studio Solution"
-                                            + " File")) {
+                                + " File")) {
                             line = passThroughReadNext(writer, line, br);
                         }
                         doFirstLine(document, writer, line, "# Visual ");
@@ -297,17 +298,17 @@
                     if (expectsPackage && line.startsWith("package ")) {
                         written = true;
                         writer.write(LINE_SEP);
-                        writer.write(getLicenceHeader(document));
+                        writer.write(getLicenseHeader(document));
                         writer.write(LINE_SEP);
                     } else if (expectsXMLDecl && line.startsWith("<?xml ")) {
                         written = true;
                         writer.write(LINE_SEP);
-                        writer.write(getLicenceHeader(document));
+                        writer.write(getLicenseHeader(document));
                         writer.write(LINE_SEP);
                     } else if (expectsPhpPI && line.startsWith("<?php")) {
                         written = true;
                         writer.write(LINE_SEP);
-                        writer.write(getLicenceHeader(document));
+                        writer.write(getLicenseHeader(document));
                         writer.write(LINE_SEP);
                     }
                     first = false;
@@ -327,13 +328,13 @@
     /**
      * Check first line for specified text and process.
      */
-    private void doFirstLine(File document, Writer writer, String line, String lookfor) throws IOException  {
+    private void doFirstLine(File document, Writer writer, String line, String lookfor) throws IOException {
         if (line.startsWith(lookfor)) {
             writer.write(line);
             writer.write(LINE_SEP);
-            writer.write(getLicenceHeader(document));
+            writer.write(getLicenseHeader(document));
         } else {
-            writer.write(getLicenceHeader(document));
+            writer.write(getLicenseHeader(document));
             writer.write(line);
             writer.write(LINE_SEP);
         }
@@ -371,13 +372,13 @@
     }
 
     /**
-     * @return Get the licence header of a document.
      * @param document document to extract from.
+     * @return Get the license header of a document.
      */
-    public abstract String getLicenceHeader(File document);
+    public abstract String getLicenseHeader(File document);
 
     /**
-     * Get the first line of the licence header formatted
+     * Get the first line of the license header formatted
      * for the given type of file.
      *
      * @param type the type of file, see the TYPE_* constants
@@ -394,7 +395,7 @@
 
 
     /**
-     * Get the last line of the licence header formatted
+     * Get the last line of the license header formatted
      * for the given type of file.
      *
      * @param type the type of file, see the TYPE_* constants
@@ -411,10 +412,10 @@
 
 
     /**
-     * Get a line of the licence header formatted
+     * Get a line of the license header formatted
      * for the given type of file.
      *
-     * @param type the type of file, see the TYPE_* constants
+     * @param type    the type of file, see the TYPE_* constants
      * @param content the content for this line
      * @return not null
      */
@@ -438,39 +439,51 @@
     private static boolean isFamilyC(int type) {
         return isIn(FAMILY_C, type);
     }
+
     private static boolean isFamilySGML(int type) {
         return isIn(FAMILY_SGML, type);
     }
+
     private static boolean isFamilySH(int type) {
         return isIn(FAMILY_SH, type);
     }
+
     private static boolean isFamilyAPT(int type) {
         return isIn(FAMILY_APT, type);
     }
+
     private static boolean isFamilyBAT(int type) {
         return isIn(FAMILY_BAT, type);
     }
+
     private static boolean isFamilyVelocity(int type) {
         return isIn(FAMILY_VELOCITY, type);
     }
+
     private static boolean expectsHashPling(int type) {
         return isIn(EXPECTS_HASH_PLING, type);
     }
+
     private static boolean expectsAtEcho(int type) {
         return isIn(EXPECTS_AT_ECHO, type);
     }
+
     private static boolean expectsPackage(int type) {
         return isIn(EXPECTS_PACKAGE, type);
     }
+
     private static boolean expectsXMLDecl(int type) {
         return isIn(EXPECTS_XML_DECL, type);
     }
+
     private static boolean expectsPhpPI(int type) {
         return isIn(EXPECTS_PHP_PI, type);
     }
+
     private static boolean expectsMSVisualStudioSolutionFileHeader(int type) {
         return isIn(EXPECTS_MSVSSF_HEADER, type);
     }
+
     private static boolean isIn(int[] arr, int key) {
         return Arrays.binarySearch(arr, key) >= 0;
     }
@@ -492,9 +505,9 @@
     private int fbLength, fbIndex, markFbIndex;
     private boolean markedAtStart;
     private static final int[][] BOMS = {
-        new int[] { 0xEF, 0xBB, 0xBF }, // UTF-8
-        new int[] { 0xFE, 0xFF }, // UTF-16BE
-        new int[] { 0xFF, 0xFE }, // UTF-16LE
+            new int[]{0xEF, 0xBB, 0xBF}, // UTF-8
+            new int[]{0xFE, 0xFF}, // UTF-16BE
+            new int[]{0xFF, 0xFE}, // UTF-16LE
     };
 
     BOMInputStream(InputStream s) {
@@ -521,7 +534,7 @@
         }
         int secondCount = in.read(buf, off, len);
         return (secondCount < 0)
-            ? (firstCount > 0 ? firstCount : -1) : firstCount + secondCount;
+                ? (firstCount > 0 ? firstCount : -1) : firstCount + secondCount;
     }
 
     @Override
@@ -556,6 +569,7 @@
             }
         }
     }
+
     @Override
     public synchronized void mark(int readlimit) {
         markFbIndex = fbIndex;
diff --git a/apache-rat-core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java b/apache-rat-core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java
index 833a37a..eb84b1b 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java
@@ -22,79 +22,77 @@
 
 
 /**
- * Add an Apache Licence V2 licence header to a 
+ * Add an Apache License V2 license header to a
  * document. This appender does not check for the
- * existence of an existing licence header, it is assumed that either a second
- * licence header is intentional or that there is no licence header present
- * already. 
- * 
+ * existence of an existing license header, it is assumed that either a second
+ * license header is intentional or that there is no license header present
+ * already.
  */
 public class ApacheV2LicenceAppender extends AbstractLicenceAppender {
 
-  private String copyright;
+    private String copyright;
 
-  /**
-   * Create a licence appender with the standard ASF licence header.
-   */
-  public ApacheV2LicenceAppender() {
-    super();
-  }
-
-  /**
-   * Create a licence appender with the given copyright line. This should be of
-   * the form &quot;Copyright 2008 Foo&quot;
-   * 
-   * @param copyright copyright line. 
-   */
-  public ApacheV2LicenceAppender(String copyright) {
-    super();
-    this.copyright = copyright;
-  }
-
-  @Override
-  public String getLicenceHeader(File document) {
-    int type = getType(document);
-    StringBuilder sb = new StringBuilder();
-    if (copyright == null) {
-      sb.append(getFirstLine(type));
-      sb.append(getLine(type, "Licensed to the Apache Software Foundation (ASF) under one"));
-      sb.append(getLine(type, "or more contributor license agreements.  See the NOTICE file"));
-      sb.append(getLine(type, "distributed with this work for additional information"));
-      sb.append(getLine(type, "regarding copyright ownership.  The ASF licenses this file"));
-      sb.append(getLine(type, "to you under the Apache License, Version 2.0 (the"));
-      sb.append(getLine(type, "\"License\"); you may not use this file except in compliance"));
-      sb.append(getLine(type, "with the License.  You may obtain a copy of the License at"));
-      sb.append(getLine(type, ""));
-      sb.append(getLine(type, "  http://www.apache.org/licenses/LICENSE-2.0"));
-      sb.append(getLine(type, ""));
-      sb.append(getLine(type, "Unless required by applicable law or agreed to in writing,"));
-      sb.append(getLine(type, "software distributed under the License is distributed on an"));
-      sb.append(getLine(type, "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY"));
-      sb.append(getLine(type, "KIND, either express or implied.  See the License for the"));
-      sb.append(getLine(type, "specific language governing permissions and limitations"));
-      sb.append(getLine(type, "under the License."));
-      sb.append(getLastLine(type));
-    } else {
-      sb.append(getFirstLine(type));
-      sb.append(getLine(type, copyright));
-      sb.append(getLine(type, ""));
-      sb.append(getLine(type, "Licensed under the Apache License, Version 2.0 (the \"License\");"));
-      sb.append(getLine(type, "you may not use this file except in compliance with the License."));
-      sb.append(getLine(type, "You may obtain a copy of the License at"));
-      sb.append(getLine(type, ""));
-      sb.append(getLine(type, "  http://www.apache.org/licenses/LICENSE-2.0"));
-      sb.append(getLine(type, ""));
-      sb.append(getLine(type, "Unless required by applicable law or agreed to in writing,"));
-      sb.append(getLine(type, "software distributed under the License is distributed on an"));
-      sb.append(getLine(type, "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY"));
-      sb.append(getLine(type, "KIND, either express or implied.  See the License for the"));
-      sb.append(getLine(type, "specific language governing permissions and limitations"));
-      sb.append(getLine(type, "under the License."));
-      sb.append(getLastLine(type));
+    /**
+     * Create a license appender with the standard ASF license header.
+     */
+    public ApacheV2LicenceAppender() {
+        super();
     }
-    return sb.toString();
-  }
-  
-  
+
+    /**
+     * Create a license appender with the given copyright line. This should be of
+     * the form &quot;Copyright 2008 Foo&quot;
+     *
+     * @param copyright copyright line.
+     */
+    public ApacheV2LicenceAppender(String copyright) {
+        super();
+        this.copyright = copyright;
+    }
+
+    @Override
+    public String getLicenseHeader(File document) {
+        int type = getType(document);
+        StringBuilder sb = new StringBuilder();
+        if (copyright == null) {
+            sb.append(getFirstLine(type));
+            sb.append(getLine(type, "Licensed to the Apache Software Foundation (ASF) under one"));
+            sb.append(getLine(type, "or more contributor license agreements.  See the NOTICE file"));
+            sb.append(getLine(type, "distributed with this work for additional information"));
+            sb.append(getLine(type, "regarding copyright ownership.  The ASF licenses this file"));
+            sb.append(getLine(type, "to you under the Apache License, Version 2.0 (the"));
+            sb.append(getLine(type, "\"License\"); you may not use this file except in compliance"));
+            sb.append(getLine(type, "with the License.  You may obtain a copy of the License at"));
+            sb.append(getLine(type, ""));
+            sb.append(getLine(type, "  http://www.apache.org/licenses/LICENSE-2.0"));
+            sb.append(getLine(type, ""));
+            sb.append(getLine(type, "Unless required by applicable law or agreed to in writing,"));
+            sb.append(getLine(type, "software distributed under the License is distributed on an"));
+            sb.append(getLine(type, "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY"));
+            sb.append(getLine(type, "KIND, either express or implied.  See the License for the"));
+            sb.append(getLine(type, "specific language governing permissions and limitations"));
+            sb.append(getLine(type, "under the License."));
+            sb.append(getLastLine(type));
+        } else {
+            sb.append(getFirstLine(type));
+            sb.append(getLine(type, copyright));
+            sb.append(getLine(type, ""));
+            sb.append(getLine(type, "Licensed under the Apache License, Version 2.0 (the \"License\");"));
+            sb.append(getLine(type, "you may not use this file except in compliance with the License."));
+            sb.append(getLine(type, "You may obtain a copy of the License at"));
+            sb.append(getLine(type, ""));
+            sb.append(getLine(type, "  http://www.apache.org/licenses/LICENSE-2.0"));
+            sb.append(getLine(type, ""));
+            sb.append(getLine(type, "Unless required by applicable law or agreed to in writing,"));
+            sb.append(getLine(type, "software distributed under the License is distributed on an"));
+            sb.append(getLine(type, "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY"));
+            sb.append(getLine(type, "KIND, either express or implied.  See the License for the"));
+            sb.append(getLine(type, "specific language governing permissions and limitations"));
+            sb.append(getLine(type, "under the License."));
+            sb.append(getLastLine(type));
+        }
+        return sb.toString();
+    }
+
 
 }
diff --git a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java
index 8cbb023..813e5e5 100644
--- a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java
+++ b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java
@@ -18,12 +18,6 @@
  */
 package org.apache.rat.analysis.license;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.util.HashMap;
-import java.util.Map;
 import org.apache.rat.analysis.IHeaderMatcher;
 import org.apache.rat.api.Document;
 import org.apache.rat.document.MockLocation;
@@ -31,17 +25,24 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 public class CDDL1LicenseTest {
 
     private static final String LICENSE_LINE =
             " DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n\n"
-            + "Copyright 2011-2013 Tirasa. All rights reserved.\n\n"
-            + "The contents of this file are subject to the terms of the Common Development\n"
-            + "and Distribution License(\"CDDL\") (the \"License\"). You may not use this file\n"
-            + "except in compliance with the License.\n\n"
-            + "You can obtain a copy of the License at https://oss.oracle.com/licenses/CDDL\n"
-            + "See the License for the specific language governing permissions and limitations\n"
-            + "under the License.";
+                    + "Copyright 2011-2013 Tirasa. All rights reserved.\n\n"
+                    + "The contents of this file are subject to the terms of the Common Development\n"
+                    + "and Distribution License(\"CDDL\") (the \"License\"). You may not use this file\n"
+                    + "except in compliance with the License.\n\n"
+                    + "You can obtain a copy of the License at https://oss.oracle.com/licenses/CDDL\n"
+                    + "See the License for the specific language governing permissions and limitations\n"
+                    + "under the License.";
 
     /**
      * To ease testing provide a map with a given license version and the string to test for.
@@ -51,7 +52,7 @@
     private Document subject;
 
     @BeforeClass
-    public static void initLicencesUnderTest() {
+    public static void initLicensesUnderTest() {
         licenseStringMap = new HashMap<IHeaderMatcher, String>();
         licenseStringMap.put(new CDDL1License(), LICENSE_LINE);
         assertEquals(1, licenseStringMap.entrySet().size());
@@ -64,24 +65,24 @@
 
     @Test
     public void testNegativeMatches() throws Exception {
-        for (Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertFalse(licenceUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertFalse(licenseUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
         }
     }
 
     @Test
     public void testPositiveMatchInDocument() throws Exception {
-        for (Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertTrue(licenceUnderTest.getKey().match(subject, "\t" + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "     " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " * " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " // " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /* " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /** " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "    " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue() + " ##"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertTrue(licenseUnderTest.getKey().match(subject, "\t" + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "     " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " * " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " // " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /* " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /** " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "    " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue() + " ##"));
         }
     }
 }
diff --git a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java
index 4871f07..127d75a 100644
--- a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java
+++ b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.analysis.license;
 
 import org.apache.rat.analysis.IHeaderMatcher;
@@ -48,7 +48,7 @@
      * If you replace this with BeforeClass and make this method static the build fails at line 67.
      */
     @Before
-    public void initLicencesUnderTest() {
+    public void initLicensesUnderTest() {
         licenseStringMap = new HashMap<IHeaderMatcher, String>();
         licenseStringMap.put(new GPL1License(), GPL1License.FIRST_LICENSE_LINE);
         licenseStringMap.put(new GPL2License(), GPL2License.FIRST_LICENSE_LINE);
@@ -63,24 +63,24 @@
 
     @Test
     public void testNegativeMatches() throws Exception {
-        for(Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertFalse(licenceUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertFalse(licenseUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
         }
     }
 
     @Test
     public void testPositiveMatchInDocument() throws Exception {
-        for(Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertTrue(licenceUnderTest.getKey().match(subject, "\t" + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "     " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " * " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " // " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /* " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /** " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "    " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue() + " ##"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertTrue(licenseUnderTest.getKey().match(subject, "\t" + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "     " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " * " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " // " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /* " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /** " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "    " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue() + " ##"));
         }
     }
 
diff --git a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/MITLicenseTest.java b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/MITLicenseTest.java
index a62db38..8cb1f84 100644
--- a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/MITLicenseTest.java
+++ b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/MITLicenseTest.java
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.analysis.license;
 
 import org.apache.rat.analysis.IHeaderMatcher;
@@ -43,12 +43,12 @@
      * If you replace this with BeforeClass and make this method static the build fails at line 71.
      */
     @Before
-    public void initLicencesUnderTest() {
+    public void initLicensesUnderTest() {
         licenseStringMap = new HashMap<IHeaderMatcher, String>();
         licenseStringMap.put(new MITLicense(),
-                             MITLicense.FIRST_LICENSE_LINE
-                             + "\n" + MITLicense.MIDDLE_LICENSE_LINE
-                             + "\r\n * " + MITLicense.AS_IS_LICENSE_LINE);
+                MITLicense.FIRST_LICENSE_LINE
+                        + "\n" + MITLicense.MIDDLE_LICENSE_LINE
+                        + "\r\n * " + MITLicense.AS_IS_LICENSE_LINE);
         assertEquals(1, licenseStringMap.entrySet().size());
     }
 
@@ -60,24 +60,24 @@
 
     @Test
     public void testNegativeMatches() throws Exception {
-        for(Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertFalse(licenceUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertFalse(licenseUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
         }
     }
 
     @Test
     public void testPositiveMatchInDocument() throws Exception {
-        for(Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertTrue(licenceUnderTest.getKey().match(subject, "\t" + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "     " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " * " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " // " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /* " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /** " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "    " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue() + " ##"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertTrue(licenseUnderTest.getKey().match(subject, "\t" + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "     " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " * " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " // " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /* " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /** " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "    " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue() + " ##"));
         }
     }
 
diff --git a/apache-rat-core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java b/apache-rat-core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java
index dbc43bd..3046ab7 100644
--- a/apache-rat-core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java
+++ b/apache-rat-core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.annotation;
 
 import org.apache.rat.test.utils.Resources;
@@ -33,9 +33,16 @@
 import static org.junit.Assert.assertFalse;
 
 public class TestLicenceAppender {
-    private static final String FIRST_LICENSE_LINE  = " Licensed to the Apache Software Foundation (ASF) under one";
 
-    /** Used to ensure that temporary files have unq */
+    // TODO pottlinger refactor test to use:
+    //@Rule
+    //TemporaryFolder baseTempFolder = new TemporaryFolder();
+
+    private static final String FIRST_LICENSE_LINE = " Licensed to the Apache Software Foundation (ASF) under one";
+
+    /**
+     * Used to ensure that temporary files have unq
+     */
     private Random random = new Random();
 
     private interface FileCreator {
@@ -48,13 +55,13 @@
 
     private static String qualify(String fileName) {
         return new File(new File(System.getProperty("java.io.tmpdir")),
-                        fileName)
-            .getAbsolutePath();
+                fileName)
+                .getAbsolutePath();
     }
 
     private static void createTestFile(String fileName,
                                        FileCreator creator)
-        throws IOException {
+            throws IOException {
         FileWriter w = null;
         try {
             creator.createFile(w = new FileWriter(fileName));
@@ -74,13 +81,13 @@
     private static void commonTestTemplate(String relativeName,
                                            FileCreator creator,
                                            NewFileReader reader)
-        throws IOException {
+            throws IOException {
         String name = qualify(relativeName);
         try {
             createTestFile(name, creator);
 
             ApacheV2LicenceAppender appender =
-                new ApacheV2LicenceAppender();
+                    new ApacheV2LicenceAppender();
             appender.append(new File(name));
 
             BufferedReader r = null;
@@ -104,11 +111,11 @@
             public void readFile(BufferedReader r) throws IOException {
                 String line = r.readLine();
                 assertEquals("First line is incorrect",
-                             firstLine, line);
+                        firstLine, line);
                 if (secondLine != null) {
                     line = r.readLine();
                     assertEquals("Second line is incorrect",
-                                 secondLine, line);
+                            secondLine, line);
                 }
             }
         };
@@ -121,43 +128,43 @@
             public void readFile(BufferedReader r) throws IOException {
                 String line = r.readLine();
                 assertEquals("First line is incorrect",
-                             firstLine, line);
+                        firstLine, line);
                 if (secondLine != null) {
                     line = r.readLine();
                     assertEquals("Second line is incorrect",
-                                 secondLine, line);
+                            secondLine, line);
                 }
                 if (thirdLine != null) {
                     line = r.readLine();
                     assertEquals("Third line is incorrect",
-                                 thirdLine, line);
+                            thirdLine, line);
                 }
             }
         };
     }
 
     @Test
-    public void addLicenceToUnknownFile() throws IOException {
+    public void addLicenseToUnknownFile() throws IOException {
         String filename = qualify("tmp" + random.nextLong()
-                                  + ".unknownType");
+                + ".unknownType");
         File file = null;
         File newFile = null;
         try {
             createTestFile(filename, new FileCreator() {
-                    public void createFile(Writer writer)
+                public void createFile(Writer writer)
                         throws IOException {
-                        writer.write("Unknown file type\n");
-                    }
-                });
+                    writer.write("Unknown file type\n");
+                }
+            });
 
             file = new File(filename);
             ApacheV2LicenceAppender appender =
-                new ApacheV2LicenceAppender();
+                    new ApacheV2LicenceAppender();
             appender.append(file);
 
             newFile = new File(filename + ".new");
             assertFalse("No new file should have been written",
-                        newFile.exists());
+                    newFile.exists());
         } finally {
             tryToDelete(file);
             tryToDelete(newFile);
@@ -165,199 +172,199 @@
     }
 
     @Test
-    public void addLicenceToJava() throws IOException {
+    public void addLicenseToJava() throws IOException {
         String filename = "tmp.java";
         final String firstLine = "package foo;";
         final String secondLine = "";
         final String thirdLine = "/*";
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write("\n");
-                    writer.write("public class test {\n");
-                    writer.write("}\n");
-                }
-            },
-            checkLines(firstLine, secondLine, thirdLine));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write("\n");
+                        writer.write("public class test {\n");
+                        writer.write("}\n");
+                    }
+                },
+                checkLines(firstLine, secondLine, thirdLine));
     }
 
     @Test
-    public void addLicenceToJavaWithoutPackage() throws IOException {
+    public void addLicenseToJavaWithoutPackage() throws IOException {
         String filename = "tmp.java";
         String commentLine = "/*";
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("public class test {\n");
-                    writer.write("}\n");
-                }
-            },
-            checkLines(commentLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("public class test {\n");
+                        writer.write("}\n");
+                    }
+                },
+                checkLines(commentLine, null));
     }
 
     @Test
-    public void addLicenceToXML() throws IOException {
+    public void addLicenseToXML() throws IOException {
         String filename = "tmp.xml";
         final String firstLine = "<?xml version='1.0'?>";
         final String secondLine = "";
         final String thirdLine = "<!--";
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write("\n");
-                    writer.write("<xml>\n");
-                    writer.write("</xml>\n");
-                }
-            },
-            checkLines(firstLine, secondLine, thirdLine));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write("\n");
+                        writer.write("<xml>\n");
+                        writer.write("</xml>\n");
+                    }
+                },
+                checkLines(firstLine, secondLine, thirdLine));
     }
 
     @Test
-    public void addLicenceToXMLWithoutDecl() throws IOException {
+    public void addLicenseToXMLWithoutDecl() throws IOException {
         String filename = "tmp.xml";
         final String firstLine = "<?xml version='1.0'?>";
         final String secondLine = "<!--";
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("<xml>\n");
-                    writer.write("</xml>\n");
-                }
-            },
-            checkLines(firstLine, secondLine));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("<xml>\n");
+                        writer.write("</xml>\n");
+                    }
+                },
+                checkLines(firstLine, secondLine));
     }
 
     @Test
-    public void addLicenceToHTML() throws IOException {
+    public void addLicenseToHTML() throws IOException {
         String filename = "tmp.html";
         String commentLine = "<!--";
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("<html>\n");
-                    writer.write("\n");
-                    writer.write("</html>\n");
-                }
-            },
-            checkLines(commentLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("<html>\n");
+                        writer.write("\n");
+                        writer.write("</html>\n");
+                    }
+                },
+                checkLines(commentLine, null));
     }
 
     @Test
-    public void addLicenceToCSS() throws IOException {
+    public void addLicenseToCSS() throws IOException {
         String filename = "tmp.css";
         String firstLine = "/*";
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(".class {\n");
-                    writer.write(" background-color: red;");
-                    writer.write("}\n");
-                }
-            },
-            checkLines(firstLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(".class {\n");
+                        writer.write(" background-color: red;");
+                        writer.write("}\n");
+                    }
+                },
+                checkLines(firstLine, null));
     }
 
     @Test
-    public void addLicenceToJavascript() throws IOException {
+    public void addLicenseToJavascript() throws IOException {
         String filename = "tmp.js";
         String firstLine = "/*";
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("if (a ==b) {>\n");
-                    writer.write(" alert(\"how useful!\");");
-                    writer.write("}\n");
-                }
-            },
-            checkLines(firstLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("if (a ==b) {>\n");
+                        writer.write(" alert(\"how useful!\");");
+                        writer.write("}\n");
+                    }
+                },
+                checkLines(firstLine, null));
     }
 
     @Test
-    public void addLicenceToAPT() throws IOException {
+    public void addLicenseToAPT() throws IOException {
         String filename = "tmp.apt";
         String firstLine = "~~" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("A Simple APT file");
-                    writer.write(" This file contains nothing\n");
-                    writer.write(" of any importance\n");
-                }
-            },
-            checkLines(firstLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("A Simple APT file");
+                        writer.write(" This file contains nothing\n");
+                        writer.write(" of any importance\n");
+                    }
+                },
+                checkLines(firstLine, null));
     }
 
     @Test
-    public void addLicenceToProperties() throws IOException {
+    public void addLicenseToProperties() throws IOException {
         String filename = "tmp.properties";
         String firstLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("property = value\n");
-                    writer.write("fun = true\n");
-                    writer.write("cool = true\n");
-                }
-            },
-            checkLines(firstLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("property = value\n");
+                        writer.write("fun = true\n");
+                        writer.write("cool = true\n");
+                    }
+                },
+                checkLines(firstLine, null));
     }
 
     @Test
-    public void addLicenceToScala() throws IOException {
+    public void addLicenseToScala() throws IOException {
         String filename = "tmp.scala";
         final String firstLine = "package foo {";
         final String newFirstLine = "/*";
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write("\n");
-                    writer.write("    object X { val x = 1; }\n");
-                    writer.write("}\n");
-                }
-            },
-            new NewFileReader() {
-                public void readFile(BufferedReader reader)
-                    throws IOException {
-                    String line = reader.readLine();
-                    assertEquals("First line is incorrect",
-                                 newFirstLine, line);
-                    while ((line = reader.readLine()) != null) {
-                        if (line.length() == 0) {
-                            line = reader.readLine();
-                            break;
-                        }
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write("\n");
+                        writer.write("    object X { val x = 1; }\n");
+                        writer.write("}\n");
                     }
-                    assertEquals("Package line is incorrect",
-                                 firstLine, line);
-                }
-            });
+                },
+                new NewFileReader() {
+                    public void readFile(BufferedReader reader)
+                            throws IOException {
+                        String line = reader.readLine();
+                        assertEquals("First line is incorrect",
+                                newFirstLine, line);
+                        while ((line = reader.readLine()) != null) {
+                            if (line.length() == 0) {
+                                line = reader.readLine();
+                                break;
+                            }
+                        }
+                        assertEquals("Package line is incorrect",
+                                firstLine, line);
+                    }
+                });
     }
 
     @Test
     public void addLicenseToRubyWithoutHashBang()
-        throws IOException {
+            throws IOException {
         String filename = "tmp.rb";
         String firstLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("class Foo\n");
-                    writer.write("end\n");
-                }
-            },
-            checkLines(firstLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("class Foo\n");
+                        writer.write("end\n");
+                    }
+                },
+                checkLines(firstLine, null));
     }
 
     @Test
@@ -367,29 +374,29 @@
         String secondLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write("class Foo\n");
-                    writer.write("end\n");
-                }
-            },
-            checkLines(firstLine, secondLine));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write("class Foo\n");
+                        writer.write("end\n");
+                    }
+                },
+                checkLines(firstLine, secondLine));
     }
 
     @Test
     public void addLicenseToPerlWithoutHashBang()
-        throws IOException {
+            throws IOException {
         String filename = "tmp.pl";
         String firstLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("print \"Hello world\"\n");
-                }
-            },
-            checkLines(firstLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("print \"Hello world\"\n");
+                    }
+                },
+                checkLines(firstLine, null));
     }
 
     @Test
@@ -399,28 +406,28 @@
         String secondLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write("print \"Hello world\"\n");
-                }
-            },
-            checkLines(firstLine, secondLine));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write("print \"Hello world\"\n");
+                    }
+                },
+                checkLines(firstLine, secondLine));
     }
 
     @Test
     public void addLicenseToTclWithoutHashBang()
-        throws IOException {
+            throws IOException {
         String filename = "tmp.tcl";
         String firstLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("puts \"Hello world\"\n");
-                }
-            },
-            checkLines(firstLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("puts \"Hello world\"\n");
+                    }
+                },
+                checkLines(firstLine, null));
     }
 
     @Test
@@ -430,81 +437,81 @@
         String secondLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write("puts \"Hello world\"\n");
-                }
-            },
-            checkLines(firstLine, secondLine));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write("puts \"Hello world\"\n");
+                    }
+                },
+                checkLines(firstLine, secondLine));
     }
 
     @Test
-    public void addLicenceToPHP() throws IOException {
+    public void addLicenseToPHP() throws IOException {
         String filename = "tmp.php";
         final String firstLine = "<?php";
         final String secondLine = "";
         final String thirdLine = "/*";
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write("echo 'Hello World'\n");
-                    writer.write("?>\n");
-                }
-            },
-            checkLines(firstLine, secondLine, thirdLine));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write("echo 'Hello World'\n");
+                        writer.write("?>\n");
+                    }
+                },
+                checkLines(firstLine, secondLine, thirdLine));
     }
 
     @Test
-    public void addLicenceToCSharp() throws IOException {
+    public void addLicenseToCSharp() throws IOException {
         String filename = "tmp.cs";
         String firstLine = "/*";
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("namespace org.example {\n");
-                    writer.write("    public class Foo {\n");
-                    writer.write("    }\n");
-                    writer.write("}\n");
-                }
-            },
-            checkLines(firstLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("namespace org.example {\n");
+                        writer.write("    public class Foo {\n");
+                        writer.write("    }\n");
+                        writer.write("}\n");
+                    }
+                },
+                checkLines(firstLine, null));
     }
 
     @Test
-    public void addLicenceToGroovy() throws IOException {
+    public void addLicenseToGroovy() throws IOException {
         String filename = "tmp.groovy";
         String firstLine = "/*";
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("package org.example \n");
-                    writer.write("    class Foo {\n");
-                    writer.write("    }\n");
-                }
-            },
-            checkLines(firstLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("package org.example \n");
+                        writer.write("    class Foo {\n");
+                        writer.write("    }\n");
+                    }
+                },
+                checkLines(firstLine, null));
     }
 
     @Test
-    public void addLicenceToCPlusPlus() throws IOException {
+    public void addLicenseToCPlusPlus() throws IOException {
         String filename = "tmp.cpp";
         String firstLine = "/*";
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write("namespace org.example {\n");
-                    writer.write("    public class Foo {\n");
-                    writer.write("    }\n");
-                    writer.write("}\n");
-                }
-            },
-            checkLines(firstLine, null));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write("namespace org.example {\n");
+                        writer.write("    public class Foo {\n");
+                        writer.write("    }\n");
+                        writer.write("}\n");
+                    }
+                },
+                checkLines(firstLine, null));
     }
 
     @Test
@@ -512,13 +519,13 @@
         File f = Resources.getResourceFile("violations/FilterTest.cs");
         try {
             ApacheV2LicenceAppender appender =
-                new ApacheV2LicenceAppender();
+                    new ApacheV2LicenceAppender();
             appender.append(f);
 
             BufferedReader r = null;
             try {
                 r = new BufferedReader(new FileReader(f.getAbsolutePath()
-                                                      + ".new"));
+                        + ".new"));
                 assertEquals("/*", r.readLine());
                 String line = null;
                 while ((line = r.readLine()) != null) {
@@ -538,171 +545,171 @@
     }
 
     @Test
-    public void addLicenceToVS2003solution() throws IOException {
+    public void addLicenseToVS2003solution() throws IOException {
         String filename = "tmp.sln";
         final String firstLine = "Microsoft Visual Studio Solution File,"
-            + " Format Version 8.0";
+                + " Format Version 8.0";
         String secondLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ConsoleApp\", \"Tutorials\\ConsoleApp\\cs\\src\\ConsoleApp.csproj\", \"{933969DF-2BC5-44E6-8B1A-400FC276A23F}\"\n");
-                    writer.write("\tProjectSection(WebsiteProperties) = preProject\n");
-                    writer.write("\t\tDebug.AspNetCompiler.Debug = \"True\"\n");
-                    writer.write("\t\tRelease.AspNetCompiler.Debug = \"False\"\n");
-                    writer.write("\tEndProjectSection\n");
-                    writer.write("EndProject\n");
-                }
-            },
-            checkLines(firstLine, secondLine));
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ConsoleApp\", \"Tutorials\\ConsoleApp\\cs\\src\\ConsoleApp.csproj\", \"{933969DF-2BC5-44E6-8B1A-400FC276A23F}\"\n");
+                        writer.write("\tProjectSection(WebsiteProperties) = preProject\n");
+                        writer.write("\t\tDebug.AspNetCompiler.Debug = \"True\"\n");
+                        writer.write("\t\tRelease.AspNetCompiler.Debug = \"False\"\n");
+                        writer.write("\tEndProjectSection\n");
+                        writer.write("EndProject\n");
+                    }
+                },
+                checkLines(firstLine, secondLine));
     }
 
     @Test
-    public void addLicenceToVS2005solution() throws IOException {
+    public void addLicenseToVS2005solution() throws IOException {
         String filename = "tmp.sln";
         final String firstLine = "Microsoft Visual Studio Solution File,"
-            + " Format Version 9.0";
+                + " Format Version 9.0";
         final String secondLine = "# Visual Studio 2005";
         final String thirdLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write(secondLine + "\n");
-                    writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ConsoleApp\", \"Tutorials\\ConsoleApp\\cs\\src\\ConsoleApp.csproj\", \"{933969DF-2BC5-44E6-8B1A-400FC276A23F}\"\n");
-                    writer.write("\tProjectSection(WebsiteProperties) = preProject\n");
-                    writer.write("\t\tDebug.AspNetCompiler.Debug = \"True\"\n");
-                    writer.write("\t\tRelease.AspNetCompiler.Debug = \"False\"\n");
-                    writer.write("\tEndProjectSection\n");
-                    writer.write("EndProject\n");
-                }
-            },
-            new NewFileReader() {
-                public void readFile(BufferedReader r) throws IOException {
-                    String line = r.readLine();
-                    assertEquals("First line is incorrect",
-                                 firstLine, line);
-                    line = r.readLine();
-                    assertEquals("Second line is incorrect",
-                                 secondLine, line);
-                    line = r.readLine();
-                    assertEquals("Third line is incorrect",
-                                 thirdLine, line);
-                }
-            });
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write(secondLine + "\n");
+                        writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ConsoleApp\", \"Tutorials\\ConsoleApp\\cs\\src\\ConsoleApp.csproj\", \"{933969DF-2BC5-44E6-8B1A-400FC276A23F}\"\n");
+                        writer.write("\tProjectSection(WebsiteProperties) = preProject\n");
+                        writer.write("\t\tDebug.AspNetCompiler.Debug = \"True\"\n");
+                        writer.write("\t\tRelease.AspNetCompiler.Debug = \"False\"\n");
+                        writer.write("\tEndProjectSection\n");
+                        writer.write("EndProject\n");
+                    }
+                },
+                new NewFileReader() {
+                    public void readFile(BufferedReader r) throws IOException {
+                        String line = r.readLine();
+                        assertEquals("First line is incorrect",
+                                firstLine, line);
+                        line = r.readLine();
+                        assertEquals("Second line is incorrect",
+                                secondLine, line);
+                        line = r.readLine();
+                        assertEquals("Third line is incorrect",
+                                thirdLine, line);
+                    }
+                });
     }
 
     @Test
-    public void addLicenceToVS2010ExpressSolution() throws IOException {
+    public void addLicenseToVS2010ExpressSolution() throws IOException {
         String filename = "tmp.sln";
         final String firstLine = "Microsoft Visual Studio Solution File, "
-            + "Format Version 11.00";
+                + "Format Version 11.00";
         final String secondLine = "# Visual C# Express 2010";
         final String thirdLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write(secondLine + "\n");
-                    writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Lucene.Net\", \"..\\..\\..\\src\\core\\Lucene.Net.csproj\", \"{5D4AD9BE-1FFB-41AB-9943-25737971BF57}\"\n");
-                    writer.write("EndProject\n");
-                    writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Contrib.Highlighter\", \"..\\..\\..\\src\\contrib\\Highlighter\\Contrib.Highlighter.csproj\", \"{901D5415-383C-4AA6-A256-879558841BEA}\"\n");
-                    writer.write("EndProject\n");
-                    writer.write("Global\n");
-                    writer.write("GlobalSection(SolutionConfigurationPlatforms) = preSolution\n");
-                    writer.write("Debug|Any CPU = Debug|Any CPU\n");
-                    writer.write("Release|Any CPU = Release|Any CPU\n");
-                    writer.write("EndGlobalSection\n");
-                    writer.write("GlobalSection(ProjectConfigurationPlatforms) = postSolution\n");
-                    writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n");
-                    writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Debug|Any CPU.Build.0 = Debug|Any CPU\n");
-                    writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Release|Any CPU.ActiveCfg = Release|Any CPU\n");
-                    writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Release|Any CPU.Build.0 = Release|Any CPU\n");
-                    writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n");
-                    writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Debug|Any CPU.Build.0 = Debug|Any CPU\n");
-                    writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Release|Any CPU.ActiveCfg = Release|Any CPU\n");
-                    writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Release|Any CPU.Build.0 = Release|Any CPU\n");
-                    writer.write("EndGlobalSection\n");
-                    writer.write("GlobalSection(SolutionProperties) = preSolution\n");
-                    writer.write("HideSolutionNode = FALSE\n");
-                    writer.write("EndGlobalSection\n");
-                    writer.write("EndGlobal \n");
-                }
-            },
-            new NewFileReader() {
-                public void readFile(BufferedReader r) throws IOException {
-                    String line = r.readLine();
-                    assertEquals("First line is incorrect",
-                                 firstLine, line);
-                    line = r.readLine();
-                    assertEquals("Second line is incorrect",
-                                 secondLine, line);
-                    line = r.readLine();
-                    assertEquals("Third line is incorrect",
-                                 thirdLine, line);
-                }
-            });
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write(secondLine + "\n");
+                        writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Lucene.Net\", \"..\\..\\..\\src\\core\\Lucene.Net.csproj\", \"{5D4AD9BE-1FFB-41AB-9943-25737971BF57}\"\n");
+                        writer.write("EndProject\n");
+                        writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Contrib.Highlighter\", \"..\\..\\..\\src\\contrib\\Highlighter\\Contrib.Highlighter.csproj\", \"{901D5415-383C-4AA6-A256-879558841BEA}\"\n");
+                        writer.write("EndProject\n");
+                        writer.write("Global\n");
+                        writer.write("GlobalSection(SolutionConfigurationPlatforms) = preSolution\n");
+                        writer.write("Debug|Any CPU = Debug|Any CPU\n");
+                        writer.write("Release|Any CPU = Release|Any CPU\n");
+                        writer.write("EndGlobalSection\n");
+                        writer.write("GlobalSection(ProjectConfigurationPlatforms) = postSolution\n");
+                        writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n");
+                        writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Debug|Any CPU.Build.0 = Debug|Any CPU\n");
+                        writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Release|Any CPU.ActiveCfg = Release|Any CPU\n");
+                        writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Release|Any CPU.Build.0 = Release|Any CPU\n");
+                        writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n");
+                        writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Debug|Any CPU.Build.0 = Debug|Any CPU\n");
+                        writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Release|Any CPU.ActiveCfg = Release|Any CPU\n");
+                        writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Release|Any CPU.Build.0 = Release|Any CPU\n");
+                        writer.write("EndGlobalSection\n");
+                        writer.write("GlobalSection(SolutionProperties) = preSolution\n");
+                        writer.write("HideSolutionNode = FALSE\n");
+                        writer.write("EndGlobalSection\n");
+                        writer.write("EndGlobal \n");
+                    }
+                },
+                new NewFileReader() {
+                    public void readFile(BufferedReader r) throws IOException {
+                        String line = r.readLine();
+                        assertEquals("First line is incorrect",
+                                firstLine, line);
+                        line = r.readLine();
+                        assertEquals("Second line is incorrect",
+                                secondLine, line);
+                        line = r.readLine();
+                        assertEquals("Third line is incorrect",
+                                thirdLine, line);
+                    }
+                });
     }
 
     @Test
-    public void addLicenceToVS2010SolutionWithBlankLine() throws IOException {
+    public void addLicenseToVS2010SolutionWithBlankLine() throws IOException {
         String filename = "tmp.sln";
         final String firstLine = "";
         final String secondLine = "Microsoft Visual Studio Solution File, "
-            + "Format Version 11.00";
+                + "Format Version 11.00";
         final String thirdLine = "# Visual C# Express 2010";
         final String forthLine = "#" + FIRST_LICENSE_LINE;
 
         commonTestTemplate(filename, new FileCreator() {
-                public void createFile(Writer writer)
-                    throws IOException {
-                    writer.write(firstLine + "\n");
-                    writer.write(secondLine + "\n");
-                    writer.write(thirdLine + "\n");
-                    writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Lucene.Net\", \"..\\..\\..\\src\\core\\Lucene.Net.csproj\", \"{5D4AD9BE-1FFB-41AB-9943-25737971BF57}\"\n");
-                    writer.write("EndProject\n");
-                    writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Contrib.Highlighter\", \"..\\..\\..\\src\\contrib\\Highlighter\\Contrib.Highlighter.csproj\", \"{901D5415-383C-4AA6-A256-879558841BEA}\"\n");
-                    writer.write("EndProject\n");
-                    writer.write("Global\n");
-                    writer.write("GlobalSection(SolutionConfigurationPlatforms) = preSolution\n");
-                    writer.write("Debug|Any CPU = Debug|Any CPU\n");
-                    writer.write("Release|Any CPU = Release|Any CPU\n");
-                    writer.write("EndGlobalSection\n");
-                    writer.write("GlobalSection(ProjectConfigurationPlatforms) = postSolution\n");
-                    writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n");
-                    writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Debug|Any CPU.Build.0 = Debug|Any CPU\n");
-                    writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Release|Any CPU.ActiveCfg = Release|Any CPU\n");
-                    writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Release|Any CPU.Build.0 = Release|Any CPU\n");
-                    writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n");
-                    writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Debug|Any CPU.Build.0 = Debug|Any CPU\n");
-                    writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Release|Any CPU.ActiveCfg = Release|Any CPU\n");
-                    writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Release|Any CPU.Build.0 = Release|Any CPU\n");
-                    writer.write("EndGlobalSection\n");
-                    writer.write("GlobalSection(SolutionProperties) = preSolution\n");
-                    writer.write("HideSolutionNode = FALSE\n");
-                    writer.write("EndGlobalSection\n");
-                    writer.write("EndGlobal \n");
-                }
-            },
-            new NewFileReader() {
-                public void readFile(BufferedReader r) throws IOException {
-                    String line = r.readLine();
-                    assertEquals("First line is incorrect",
-                                 firstLine, line);
-                    line = r.readLine();
-                    assertEquals("Second line is incorrect",
-                                 secondLine, line);
-                    line = r.readLine();
-                    assertEquals("Third line is incorrect",
-                                 thirdLine, line);
-                    line = r.readLine();
-                    assertEquals("Forth line is incorrect",
-                                 forthLine, line);
-                }
-            });
+                    public void createFile(Writer writer)
+                            throws IOException {
+                        writer.write(firstLine + "\n");
+                        writer.write(secondLine + "\n");
+                        writer.write(thirdLine + "\n");
+                        writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Lucene.Net\", \"..\\..\\..\\src\\core\\Lucene.Net.csproj\", \"{5D4AD9BE-1FFB-41AB-9943-25737971BF57}\"\n");
+                        writer.write("EndProject\n");
+                        writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Contrib.Highlighter\", \"..\\..\\..\\src\\contrib\\Highlighter\\Contrib.Highlighter.csproj\", \"{901D5415-383C-4AA6-A256-879558841BEA}\"\n");
+                        writer.write("EndProject\n");
+                        writer.write("Global\n");
+                        writer.write("GlobalSection(SolutionConfigurationPlatforms) = preSolution\n");
+                        writer.write("Debug|Any CPU = Debug|Any CPU\n");
+                        writer.write("Release|Any CPU = Release|Any CPU\n");
+                        writer.write("EndGlobalSection\n");
+                        writer.write("GlobalSection(ProjectConfigurationPlatforms) = postSolution\n");
+                        writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n");
+                        writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Debug|Any CPU.Build.0 = Debug|Any CPU\n");
+                        writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Release|Any CPU.ActiveCfg = Release|Any CPU\n");
+                        writer.write("{5D4AD9BE-1FFB-41AB-9943-25737971BF57}.Release|Any CPU.Build.0 = Release|Any CPU\n");
+                        writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n");
+                        writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Debug|Any CPU.Build.0 = Debug|Any CPU\n");
+                        writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Release|Any CPU.ActiveCfg = Release|Any CPU\n");
+                        writer.write("{901D5415-383C-4AA6-A256-879558841BEA}.Release|Any CPU.Build.0 = Release|Any CPU\n");
+                        writer.write("EndGlobalSection\n");
+                        writer.write("GlobalSection(SolutionProperties) = preSolution\n");
+                        writer.write("HideSolutionNode = FALSE\n");
+                        writer.write("EndGlobalSection\n");
+                        writer.write("EndGlobal \n");
+                    }
+                },
+                new NewFileReader() {
+                    public void readFile(BufferedReader r) throws IOException {
+                        String line = r.readLine();
+                        assertEquals("First line is incorrect",
+                                firstLine, line);
+                        line = r.readLine();
+                        assertEquals("Second line is incorrect",
+                                secondLine, line);
+                        line = r.readLine();
+                        assertEquals("Third line is incorrect",
+                                thirdLine, line);
+                        line = r.readLine();
+                        assertEquals("Forth line is incorrect",
+                                forthLine, line);
+                    }
+                });
     }
 }
diff --git a/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java b/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
index 33a93bb..f96fe0d 100644
--- a/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
+++ b/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
@@ -134,7 +134,7 @@
     }
 
     @Test
-    public void testFileEncodingSettable() {
+    public void testFileEncodingCanBeSetAndHasFallbackInCaseOfErrors() {
         System.setProperty(BinaryGuesser.FILE_ENCODING, "shouldThrowAnExceptionBecauseNotFound");
         assertEquals("UTF-8", BinaryGuesser.getFileEncodingOrUTF8AsFallback().displayName());
 
diff --git a/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java b/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
index e2d1ad2..064d498 100644
--- a/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
+++ b/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
@@ -188,7 +188,7 @@
     private boolean excludeSubProjects;
 
     /**
-     * Will skip the plugin execution, e.g. for technical builds that do not take licence compliance into account.
+     * Will skip the plugin execution, e.g. for technical builds that do not take license compliance into account.
      *
      * @since 0.11
      */
diff --git a/apache-rat-tasks/src/site/apt/examples/basic.apt.vm b/apache-rat-tasks/src/site/apt/examples/basic.apt.vm
index 174e6ed..c9a8546 100644
--- a/apache-rat-tasks/src/site/apt/examples/basic.apt.vm
+++ b/apache-rat-tasks/src/site/apt/examples/basic.apt.vm
@@ -54,12 +54,12 @@
 </rat:report>
 ---
 
-* Adding licence headers
+* Adding license headers
 
   The equivalent of
 
 +------------------------------------------+
-java -jar apache-rat-${project.version}.jar --addLicence
+java -jar apache-rat-${project.version}.jar --addlicense
   --copyright "Copyright 2008 Foo"
   /path/to/project
 +------------------------------------------+
diff --git a/apache-rat/README-CLI.txt b/apache-rat/README-CLI.txt
index 3d76d85..0e629a8 100644
--- a/apache-rat/README-CLI.txt
+++ b/apache-rat/README-CLI.txt
@@ -16,19 +16,19 @@
 
 This will output a help message detailing the command line options available to you.
 
-Adding licence headers
+Adding license headers
 ----------------------
 
-Rat can be used to automatically add licence headers to files that do not currently have them. 
+Rat can be used to automatically add license headers to files that do not currently have them. 
 Only files that are not excluded by the Rat configurations will be affected.
 
-To add licence headers use a command such as:
+To add license headers use a command such as:
 
-java -jar apache-rat-${project.version}.jar --addLicence
+java -jar apache-rat-${project.version}.jar --addlicense
   --copyright "Copyright 2008 Foo" --force
   /path/to/project
 
-This command will add the licence header directly to the source files. 
+This command will add the license header directly to the source files. 
 If you prefer to see which files will be changed and how then remove the "--force" option.
 Using multiple excludes from a file
 
@@ -46,20 +46,20 @@
 
 usage: java rat.report [options] [DIR|TARBALL]
 Options
- -A,--addLicense                Add the default licence header to any file
-                                with an unknown licence that is not in the
+ -A,--addLicense                Add the default license header to any file
+                                with an unknown license that is not in the
                                 exclusion list. By default new files will
-                                be created with the licence header, to
+                                be created with the license header, to
                                 force the modification of existing files
                                 use the --force option.
- -a,--addLicence                Add the default licence header to any file
-                                with an unknown licence that is not in the
+ -a,--addlicense                Add the default license header to any file
+                                with an unknown license that is not in the
                                 exclusion list. By default new files will
-                                be created with the licence header, to
+                                be created with the license header, to
                                 force the modification of existing files
                                 use the --force option.
  -c,--copyright <arg>           The copyright message to use in the
-                                licence headers, usually in the form of
+                                license headers, usually in the form of
                                 "Copyright 2008 Foo"
  -d,--dir                       Used to indicate source when using
                                 --exclude
diff --git a/apache-rat/pom.xml b/apache-rat/pom.xml
index 25c6ae0..50fe808 100644
--- a/apache-rat/pom.xml
+++ b/apache-rat/pom.xml
@@ -50,7 +50,7 @@
         <targetPath>META-INF</targetPath>
         <includes>
           <include>RELEASE_NOTES.txt</include>
-          <include>LICENCE</include>
+          <include>LICENSE</include>
           <include>NOTICE</include>
         </includes>
       </resource>
diff --git a/apache-rat/src/site/apt/index.apt.vm b/apache-rat/src/site/apt/index.apt.vm
index 0fc2876..03226d0 100644
--- a/apache-rat/src/site/apt/index.apt.vm
+++ b/apache-rat/src/site/apt/index.apt.vm
@@ -39,21 +39,21 @@
  This will output a help message detailing the command line
  options available to you.
 
-* Adding licence headers
+* Adding license headers
 
- Rat can be used to automatically add licence headers to
+ Rat can be used to automatically add license headers to
  files that do not currently have them. Only files that
  are not excluded by the Rat configurations will be affected.
 
- To add licence headers use a command such as:
+ To add license headers use a command such as:
 
 +------------------------------------------+
-java -jar apache-rat-${project.version}.jar --addLicence
+java -jar apache-rat-${project.version}.jar --addlicense
   --copyright "Copyright 2008 Foo" --force
   /path/to/project
 +------------------------------------------+
 
- This command will add the licence header directly to the
+ This command will add the license header directly to the
  source files. If you prefer to see which files will be
  changed and how then remove the "--force" option.
 
@@ -77,20 +77,20 @@
 +------------------------------------------+
 usage: java rat.report [options] [DIR|TARBALL]
 Options
- -A,--addLicense                Add the default licence header to any file
-                                with an unknown licence that is not in the
+ -A,--addLicense                Add the default license header to any file
+                                with an unknown license that is not in the
                                 exclusion list. By default new files will
-                                be created with the licence header, to
+                                be created with the license header, to
                                 force the modification of existing files
                                 use the --force option.
- -a,--addLicence                Add the default licence header to any file
-                                with an unknown licence that is not in the
+ -a,--addlicense                Add the default license header to any file
+                                with an unknown license that is not in the
                                 exclusion list. By default new files will
-                                be created with the licence header, to
+                                be created with the license header, to
                                 force the modification of existing files
                                 use the --force option.
  -c,--copyright <arg>           The copyright message to use in the
-                                licence headers, usually in the form of
+                                license headers, usually in the form of
                                 "Copyright 2008 Foo"
  -d,--dir                       Used to indicate source when using
                                 --exclude