You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jl...@apache.org on 2017/09/21 18:08:51 UTC

[06/12] incubator-netbeans-tools git commit: Improving license header normalization, adding ability to rewrite a curated set of license headers to ASF headers.

Improving license header normalization, adding ability to rewrite a curated set of license headers to ASF headers.


Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-tools/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-tools/commit/7687b93f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-tools/tree/7687b93f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-tools/diff/7687b93f

Branch: refs/heads/master
Commit: 7687b93fb412b85afd4a42725dd702ec30c46ef7
Parents: aaa4ac0
Author: Jan Lahoda <jl...@netbeans.org>
Authored: Thu Sep 14 09:49:40 2017 +0200
Committer: Jan Lahoda <jl...@netbeans.org>
Committed: Thu Sep 14 09:49:40 2017 +0200

----------------------------------------------------------------------
 convert/nbproject/project.properties            |   2 +-
 convert/src/convert/CategorizeLicenses.java     |  73 +-
 convert/src/convert/Convert.java                | 200 ++++++
 .../src/javaapplication9/JavaApplication9.java  | 660 -------------------
 4 files changed, 258 insertions(+), 677 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-netbeans-tools/blob/7687b93f/convert/nbproject/project.properties
----------------------------------------------------------------------
diff --git a/convert/nbproject/project.properties b/convert/nbproject/project.properties
index 4b111c8..7fe4bb0 100644
--- a/convert/nbproject/project.properties
+++ b/convert/nbproject/project.properties
@@ -73,7 +73,7 @@ jlink.additionalmodules=
 jlink.additionalparam=
 jlink.launcher=true
 jlink.launcher.name=convert
-main.class=convert.CategorizeLicenses
+main.class=convert.Convert
 manifest.file=manifest.mf
 meta.inf.dir=${src.dir}/META-INF
 mkdist.disabled=false

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-tools/blob/7687b93f/convert/src/convert/CategorizeLicenses.java
----------------------------------------------------------------------
diff --git a/convert/src/convert/CategorizeLicenses.java b/convert/src/convert/CategorizeLicenses.java
index ee7d5c1..576a0d0 100644
--- a/convert/src/convert/CategorizeLicenses.java
+++ b/convert/src/convert/CategorizeLicenses.java
@@ -44,6 +44,7 @@ public class CategorizeLicenses {
             return ;
         }
         Path root = Paths.get(args[0]);
+        int[] recognizedCount = new int[1];
         Map<String, List<String>> licenses = new HashMap<>();
         Map<String, List<String>> paragraphs = new HashMap<>();
         Set<String> noCDDL = new HashSet<>();
@@ -55,14 +56,12 @@ public class CategorizeLicenses {
                     String code = new String(Files.readAllBytes(p));
 
                     if (code.contains("CDDL")) {
-                        String lic = snipLicense(code, p);
+                        Description lic = snipUnifiedLicenseOrNull(code, p);
 
-                        if (lic != null && lic.contains("CDDL")) {
-                            lic = YEARS_PATTERN.matcher(lic).replaceAll(Matcher.quoteReplacement("<YEARS>"));
-                            lic = lic.replaceAll("([^\n])\n([^\n])", "$1 $2");
-                            lic = lic.replaceAll("[ \t]+", " ");
-                            licenses.computeIfAbsent(lic, l -> new ArrayList<>()).add(path);
-                            for (String par : lic.split("\n")) {
+                        if (lic != null) {
+                            recognizedCount[0]++;
+                            licenses.computeIfAbsent(lic.header, l -> new ArrayList<>()).add(path);
+                            for (String par : lic.header.split("\n")) {
                                 paragraphs.computeIfAbsent(par, l -> new ArrayList<>()).add(path);
                             }
                             return ;
@@ -90,6 +89,7 @@ public class CategorizeLicenses {
                 }
             }
         }
+        System.err.println("files with recognized license headers: " + recognizedCount[0]);
         System.err.println("licenses count: " + licenses.size());
         System.err.println("paragraphs count: " + paragraphs.size());
         
@@ -121,7 +121,8 @@ public class CategorizeLicenses {
             }
         }
     }
-    private static String snipLicense(String code, Path file) {
+    
+    public static Description snipUnifiedLicenseOrNull(String code, Path file) {
         String fn = file.getFileName().toString();
         switch (fn.substring(fn.lastIndexOf('.') + 1)) {
             case "javx": case "c": case "h": case "cpp":
@@ -129,7 +130,7 @@ public class CategorizeLicenses {
             case "html": case "xsd": case "xsl": case "dtd":
             case "settings": case "wstcgrp": case "wstcref":
             case "wsgrp": 
-            case "xml": return snipLicense(code, "<!--+", "-+->", "^[ \t]*");
+            case "xml": return snipLicense(code, "<!--+", "-+->", "^[ \t]*(-[ \t]*)?");
             case "sh": return snipLicenseBundle(code, "#!.*");
             case "properties": return snipLicenseBundle(code, null);
         }
@@ -137,7 +138,7 @@ public class CategorizeLicenses {
         return null;
     }
 
-    private static String snipLicense(String code, String commentStart, String commentEnd, String normalizeLines) {
+    private static Description snipLicense(String code, String commentStart, String commentEnd, String normalizeLines) {
         Matcher startM = Pattern.compile(commentStart).matcher(code);
         if (!startM.find())
             return null;
@@ -150,25 +151,65 @@ public class CategorizeLicenses {
                         .map(l -> l.replaceAll(normalizeLines, ""))
                         .collect(Collectors.joining("\n"));
         }
-        return lic;
+        return createUnifiedDescriptionOrNull(startM.start(), endM.end(), lic);
     }
     
-    private static String snipLicenseBundle(String code, String firstLinePattern) {
+    private static Description snipLicenseBundle(String code, String firstLinePattern) {
         StringBuilder res = new StringBuilder();
         boolean firstLine = true;
-        for (String line : code.split("\n")) {
+        int start = -1;
+        int pos;
+        int next = 0;
+        String[] lines = code.split("\n");
+        for (int i = 0; i < lines.length; i++) {
+            String line = lines[i];
+            pos = next;
+            next += line.length() + ((i + 1) < lines.length ? 1 : 0);
             line = line.trim();
             if (firstLine && firstLinePattern != null && Pattern.compile(firstLinePattern).matcher(line).matches())
                 continue;
+            if (firstLine) {
+                start = pos;
+            }
             firstLine = false;
             if (line.startsWith("#")) {
                 res.append(line.substring(1).trim());
                 res.append("\n");
             } else {
-                return res.toString();
+                return createUnifiedDescriptionOrNull(start, next, res.toString());
             }
         }
-        return res.toString();
+        return createUnifiedDescriptionOrNull(start, next, res.toString());
     }
-    
+
+    private static Description createUnifiedDescriptionOrNull(int start, int end, String lic) {
+        if (lic != null && lic.contains("CDDL")) {
+            if (start == (-1)) {
+                System.err.println("!!!");
+            }
+            lic = YEARS_PATTERN.matcher(lic).replaceAll(Matcher.quoteReplacement("<YEARS>"));
+            lic = lic.replaceAll("\\Q<p/>\\E", "\n"); //normalize <p/> to newlines
+            lic = lic.replaceAll("([^\n])\n([^\n])", "$1 $2");
+            lic = lic.replaceAll("[ \t]+", " ");
+            lic = lic.replaceAll("\n+", "\n");
+            lic = lic.replaceAll("^\n+", "");
+            lic = lic.replaceAll("\n+$", "");
+            return new Description(start, end, lic);
+        }
+        
+        return null;
+    }
+
+    public static class Description {
+        public final int start;
+        public final int end;
+        public final String header;
+
+        public Description(int start, int end, String header) {
+            this.start = start;
+            this.end = end;
+            this.header = header;
+        }
+        
+    }    
 }

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-tools/blob/7687b93f/convert/src/convert/Convert.java
----------------------------------------------------------------------
diff --git a/convert/src/convert/Convert.java b/convert/src/convert/Convert.java
new file mode 100644
index 0000000..fcf6bb8
--- /dev/null
+++ b/convert/src/convert/Convert.java
@@ -0,0 +1,200 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package convert;
+
+import convert.CategorizeLicenses.Description;
+import java.io.IOException;
+import java.io.Writer;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.regex.Pattern;
+
+public class Convert {
+
+    private static final String LICENSE_INPUT_PATTERN1 =
+            "\\QDO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\\E\\s*" +
+            "(" +
+            "\\QCopyright <YEARS> Oracle and/or its affiliates. All rights reserved.\\E\\s*" +
+            "|" +
+            "\\QCopyright (c) <YEARS> Oracle and/or its affiliates. All rights reserved.\\E\\s*" +
+            "|" +
+            "\\QCopyright \u00A9 <YEARS> Oracle and/or its affiliates. All rights reserved.\\E\\s*" +
+            "|" +
+            "\\QCopyright <YEARS> Sun Microsystems, Inc. All rights reserved.\\E\\s*" +
+            ")" +
+            "(\\QOracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.\\E\\s*)?" +
+            "(" +
+            "\\QThe contents of this file are subject to the terms of either the GNU General Public License Version 2 only (\"GPL\") or the Common Development and Distribution License(\"CDDL\") (collectively, the \"License\"). You may not use this file except in compliance with the License. You can obtain a copy of the License at http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this particular file as subject to the \"Classpath\" exception as provided by Oracle in the GPL Version 2 section of the License file that accompanied this code. If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: \"Portions Copyrighted
  [year] [name of copyright owner]\"\\E\\s*" +
+            "|" +
+            "\\QThe contents of this file are subject to the terms of either the GNU General Public License Version 2 only (\"GPL\") or the Common Development and Distribution License(\"CDDL\") (collectively, the \"License\"). You may not use this file except in compliance with the License. You can obtain x copy of the License at http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this particular file as subject to the \"Classpath\" exception as provided by Oracle in the GPL Version 2 section of the License file that accompanied this code. If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: \"Portions Copyrighted
  [year] [name of copyright owner]\"\\E\\s*" + //note: typo "x copy" instead of "a copy"
+            "|" +
+            "\\QThe contents of this file are subject to the terms of either the GNU General Public License Version 2 only (\"GPL\") or the Common Development and Distribution License(\"CDDL\") (collectively, the \"License\"). You may not use this file except in compliance with the License. You can obtain a copy of the License at http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this particular file as subject to the \"Classpath\" exception as provided by Sun in the GPL Version 2 section of the License file that accompanied this code. If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: \"Portions Copyrighted [year
 ] [name of copyright owner]\"\\E\\s*" +
+            "|" +
+            "\\QThe contents of this file are subject to the terms of either the GNU General Public License Version 2 only (\"GPL\") or the Common Development and Distribution License(\"CDDL\") (collectively, the \"License\"). You may not use this file except in compliance with the License. You can obtain a copy of the License at http:www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this particular file as subject to the \"Classpath\" exception as provided by Sun in the GPL Version 2 section of the License file that accompanied this code. If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: \"Portions Copyrighted [year] 
 [name of copyright owner]\"\\E\\s*" + //note: mistake in URL (no '//'), otherwise as above
+            ")" +
+            "(" +
+            "\\QIf you wish your version of this file to be governed by only the CDDL or only the GPL Version 2, indicate your decision by adding \"[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 2] license.\" If you do not indicate a single choice of license, a recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 2 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the option applies only if the new code is made subject to such option by the copyright holder.\\E\\s*" +
+            "|" +
+            "\\QIf you wish your version of this file to be governed by only the CDDL or only the GPL Version 2, indicate your decision by adding \"[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 2] license.\" If you do not indicate x single choice of license, x recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 2 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the option applies only if the new code is made subject to such option by the copyright holder.\\E\\s*" + //note: typos "a single choice" -> "x single choice", "a recipient" -> "x recipient"
+            "|" +
+            //empty
+            ")" +
+            "(\\QContributor(s):\\E\\s*)?" +
+            "(" +
+            "\\QThe Original Software is NetBeans. The Initial Developer of the Original Software is Sun Microsystems, Inc. Portions Copyright <YEARS> Sun Microsystems, Inc. All Rights Reserved.\\E\\s*" +
+            "|" +
+            "\\QThe Original Software is NetBeans. The Initial Developer of the Original Software is Sun Microsystems, Inc. Portions created by Sun Microsystems, Inc. are Copyright (C) <YEARS> All Rights Reserved.\\E\\s*" +
+            "|" +
+            "\\QThe Original Software is NetBeans. The Initial Developer of the Original Code is Sun Microsystems, Inc. Portions Copyright <YEARS> Sun Microsystems, Inc. All Rights Reserved.\\E\\s*" +
+            "|" +
+            "\\QThe Original Software is NetBeans. The Initial Developer of the Original Software is Oracle. Portions Copyright <YEARS> Oracle. All Rights Reserved.\\E\\s*" +
+            "|" +
+            "\\QThe original software is NetBeans. The initial developer of the original software was Sun Microsystems, Inc.; portions copyright <YEARS> Sun Microsystems, Inc. All rights reserved.\\E\\s*" +
+            "|" +
+            "\\QThe Original Software is NetBeans. The Initial Developer of the Original Software is Sun Microsystems, Inc.\nPortions Copyrighted <YEARS> Sun Microsystems, Inc.\\E\\s*" +
+            "|" +
+            "\\QPortions Copyrighted <YEARS> Sun Microsystems, Inc.\\E\\s*" +
+            "|" +
+            "\\QPortions Copyrighted <YEARS> Oracle, Inc.\\E\\s*" +
+            "|" +
+            "\\QPortions Copyrighted <YEARS> Oracle\\E\\s*" +
+            "|)" +
+            "(\\QIf you wish your version of this file to be governed by only the CDDL or only the GPL Version 2, indicate your decision by adding \"[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 2] license.\" If you do not indicate a single choice of license, a recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 2 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the option applies only if the new code is made subject to such option by the copyright holder.\\E\\s*)?";
+
+    private static final String JAVA_OUTPUT =
+            "/**\n" +
+            " * Licensed to the Apache Software Foundation (ASF) under one\n" +
+            " * or more contributor license agreements.  See the NOTICE file\n" +
+            " * distributed with this work for additional information\n" +
+            " * regarding copyright ownership.  The ASF licenses this file\n" +
+            " * to you under the Apache License, Version 2.0 (the\n" +
+            " * \"License\"); you may not use this file except in compliance\n" +
+            " * with the License.  You may obtain a copy of the License at\n" +
+            " *\n" +
+            " *   http://www.apache.org/licenses/LICENSE-2.0\n" +
+            " *\n" +
+            " * Unless required by applicable law or agreed to in writing,\n" +
+            " * software distributed under the License is distributed on an\n" +
+            " * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n" +
+            " * KIND, either express or implied.  See the License for the\n" +
+            " * specific language governing permissions and limitations\n" +
+            " * under the License.\n" +
+            " */";
+
+    private static final String XML_OUTPUT =
+            "<!--\n" +
+            "\n" +
+            "    Licensed to the Apache Software Foundation (ASF) under one\n" +
+            "    or more contributor license agreements.  See the NOTICE file\n" +
+            "    distributed with this work for additional information\n" +
+            "    regarding copyright ownership.  The ASF licenses this file\n" +
+            "    to you under the Apache License, Version 2.0 (the\n" +
+            "    \"License\"); you may not use this file except in compliance\n" +
+            "    with the License.  You may obtain a copy of the License at\n" +
+            "\n" +
+            "      http://www.apache.org/licenses/LICENSE-2.0\n" +
+            "\n" +
+            "    Unless required by applicable law or agreed to in writing,\n" +
+            "    software distributed under the License is distributed on an\n" +
+            "    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n" +
+            "    KIND, either express or implied.  See the License for the\n" +
+            "    specific language governing permissions and limitations\n" +
+            "    under the License.\n" +
+            "\n" +
+            "-->";
+
+    private static final String BUNDLE_OUTPUT =
+            "#\n" +
+            "# Licensed to the Apache Software Foundation (ASF) under one\n" +
+            "# or more contributor license agreements.  See the NOTICE file\n" +
+            "# distributed with this work for additional information\n" +
+            "# regarding copyright ownership.  The ASF licenses this file\n" +
+            "# to you under the Apache License, Version 2.0 (the\n" +
+            "# \"License\"); you may not use this file except in compliance\n" +
+            "# with the License.  You may obtain a copy of the License at\n" +
+            "#\n" +
+            "#   http://www.apache.org/licenses/LICENSE-2.0\n" +
+            "#\n" +
+            "# Unless required by applicable law or agreed to in writing,\n" +
+            "# software distributed under the License is distributed on an\n" +
+            "# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n" +
+            "# KIND, either express or implied.  See the License for the\n" +
+            "# specific language governing permissions and limitations\n" +
+            "# under the License.\n" +
+            "#\n";
+
+    public static void main(String[] args) throws IOException {
+        if (args.length != 1) {
+            System.err.println("Use: Convert <source-directory>");
+            return ;
+        }
+        Pattern headerPattern = Pattern.compile(LICENSE_INPUT_PATTERN1, Pattern.MULTILINE);
+        Path root = Paths.get(args[0]);
+        int[] count = new int[1];
+        Files.find(root, Integer.MAX_VALUE, (p, attr) -> attr.isRegularFile())
+             .forEach(p -> {
+                try {
+                    String path = root.relativize(p).toString();
+                    String code = new String(Files.readAllBytes(p));
+
+                    if (code.contains("CDDL")) {
+                        CategorizeLicenses.Description lic = CategorizeLicenses.snipUnifiedLicenseOrNull(code, p);
+
+                        if (lic != null) {
+                            if (headerPattern.matcher(lic.header).matches()) {
+                                fixHeader(p, code, lic);
+                                count[0]++;
+                            }
+                        }
+                    }
+                } catch (IOException ex) {
+                    ex.printStackTrace();
+                }
+             });
+        
+        System.err.println("convertible: " + count[0]);
+    }
+    
+    private static void fixHeader(Path file, String code, Description desc) {
+        String fn = file.getFileName().toString();
+        String outputLicense;
+        switch (fn.substring(fn.lastIndexOf('.') + 1)) {
+            case "javx": case "c": case "h": case "cpp":
+            case "java": outputLicense = JAVA_OUTPUT; break;
+            case "html": case "xsd": case "xsl": case "dtd":
+            case "settings": case "wstcgrp": case "wstcref":
+            case "wsgrp": 
+            case "xml": outputLicense = XML_OUTPUT; break;
+            case "sh":
+            case "properties": outputLicense = BUNDLE_OUTPUT; break;
+            default:
+                System.err.println("cannot rewrite: " + file);
+                return ;
+        }
+        
+        try (Writer out = Files.newBufferedWriter(file)) {
+            String newCode = code.substring(0, desc.start) + outputLicense + code.substring(desc.end);
+            out.write(newCode);
+        } catch (IOException ex) {
+            throw new IllegalStateException(ex);
+        }
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-tools/blob/7687b93f/convert/src/javaapplication9/JavaApplication9.java
----------------------------------------------------------------------
diff --git a/convert/src/javaapplication9/JavaApplication9.java b/convert/src/javaapplication9/JavaApplication9.java
deleted file mode 100644
index 6be06b1..0000000
--- a/convert/src/javaapplication9/JavaApplication9.java
+++ /dev/null
@@ -1,660 +0,0 @@
-package javaapplication9;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class JavaApplication9 {
-
-    private static final String INPUT =
-"# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-"#\n" +
-"# Copyright 2010 Oracle and/or its affiliates. All rights reserved.\n" +
-"#\n" +
-"# Oracle and Java are registered trademarks of Oracle and/or its affiliates.\n" +
-"# Other names may be trademarks of their respective owners.\n" +
-"#\n" +
-"# The contents of this file are subject to the terms of either the GNU\n" +
-"# General Public License Version 2 only (\"GPL\") or the Common\n" +
-"# Development and Distribution License(\"CDDL\") (collectively, the\n" +
-"# \"License\"). You may not use this file except in compliance with the\n" +
-"# License. You can obtain a copy of the License at\n" +
-"# http://www.netbeans.org/cddl-gplv2.html\n" +
-"# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-"# specific language governing permissions and limitations under the\n" +
-"# License.  When distributing the software, include this License Header\n" +
-"# Notice in each file and include the License file at\n" +
-"# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this\n" +
-"# particular file as subject to the \"Classpath\" exception as provided\n" +
-"# by Oracle in the GPL Version 2 section of the License file that\n" +
-"# accompanied this code. If applicable, add the following below the\n" +
-"# License Header, with the fields enclosed by brackets [] replaced by\n" +
-"# your own identifying information:\n" +
-"# \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-"#\n" +
-"# If you wish your version of this file to be governed by only the CDDL\n" +
-"# or only the GPL Version 2, indicate your decision by adding\n" +
-"# \"[Contributor] elects to include this software in this distribution\n" +
-"# under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-"# single choice of license, a recipient has the option to distribute\n" +
-"# your version of this file under either the CDDL, the GPL Version 2 or\n" +
-"# to extend the choice of license to its licensees as provided above.\n" +
-"# However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-"# Version 2 license, then the option applies only if the new code is\n" +
-"# made subject to such option by the copyright holder.\n" +
-"#\n" +
-"# Contributor(s):\n" +
-"#\n" +
-"# Portions Copyrighted 2010 Sun Microsystems, Inc.";
-
-//    private static final String INPUT =
-//"# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-//"#\n" +
-//"# Copyright 2010 Sun Microsystems, Inc. All rights reserved.\n" +
-//"#\n" +
-//"# The contents of this file are subject to the terms of either the GNU\n" +
-//"# General Public License Version 2 only (\"GPL\") or the Common\n" +
-//"# Development and Distribution License(\"CDDL\") (collectively, the\n" +
-//"# \"License\"). You may not use this file except in compliance with the\n" +
-//"# License. You can obtain a copy of the License at\n" +
-//"# http://www.netbeans.org/cddl-gplv2.html\n" +
-//"# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-//"# specific language governing permissions and limitations under the\n" +
-//"# License.  When distributing the software, include this License Header\n" +
-//"# Notice in each file and include the License file at\n" +
-//"# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this\n" +
-//"# particular file as subject to the \"Classpath\" exception as provided\n" +
-//"# by Sun in the GPL Version 2 section of the License file that\n" +
-//"# accompanied this code. If applicable, add the following below the\n" +
-//"# License Header, with the fields enclosed by brackets [] replaced by\n" +
-//"# your own identifying information:\n" +
-//"# \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-//"#\n" +
-//"# Contributor(s):\n" +
-//"#\n" +
-//"#The Original Software is NetBeans. The Initial Developer of the Original\n" +
-//"# Software is Sun Microsystems, Inc. Portions Copyright 2010 Sun\n" +
-//"#Microsystems, Inc. All Rights Reserved.\n" +
-//"#\n" +
-//"# If you wish your version of this file to be governed by only the CDDL\n" +
-//"# or only the GPL Version 2, indicate your decision by adding\n" +
-//"# \"[Contributor] elects to include this software in this distribution\n" +
-//"# under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-//"# single choice of license, a recipient has the option to distribute\n" +
-//"# your version of this file under either the CDDL, the GPL Version 2 or\n" +
-//"# to extend the choice of license to its licensees as provided above.\n" +
-//"# However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-//"# Version 2 license, then the option applies only if the new code is\n" +
-//"# made subject to such option by the copyright holder.";
-
-//    private static final String INPUT =
-//" # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-//" #\n" +
-//" # Copyright 2010 Oracle and/or its affiliates. All rights reserved.\n" +
-//" #\n" +
-//" # Oracle and Java are registered trademarks of Oracle and/or its affiliates.\n" +
-//" # Other names may be trademarks of their respective owners.\n" +
-//" #\n" +
-//" # The contents of this file are subject to the terms of either the GNU\n" +
-//" # General Public License Version 2 only (\"GPL\") or the Common\n" +
-//" # Development and Distribution License(\"CDDL\") (collectively, the\n" +
-//" # \"License\"). You may not use this file except in compliance with the\n" +
-//" # License. You can obtain a copy of the License at\n" +
-//" # http://www.netbeans.org/cddl-gplv2.html\n" +
-//" # or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-//" # specific language governing permissions and limitations under the\n" +
-//" # License.  When distributing the software, include this License Header\n" +
-//" # Notice in each file and include the License file at\n" +
-//" # nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this\n" +
-//" # particular file as subject to the \"Classpath\" exception as provided\n" +
-//" # by Oracle in the GPL Version 2 section of the License file that\n" +
-//" # accompanied this code. If applicable, add the following below the\n" +
-//" # License Header, with the fields enclosed by brackets [] replaced by\n" +
-//" # your own identifying information:\n" +
-//" # \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-//" #\n" +
-//" # Contributor(s):\n" +
-//" #\n" +
-//" # The Original Software is NetBeans. The Initial Developer of the Original\n" +
-//" # Software is Sun Microsystems, Inc. Portions Copyright 2010 Sun\n" +
-//" # Microsystems, Inc. All Rights Reserved.\n" +
-//" #\n" +
-//" # If you wish your version of this file to be governed by only the CDDL\n" +
-//" # or only the GPL Version 2, indicate your decision by adding\n" +
-//" # \"[Contributor] elects to include this software in this distribution\n" +
-//" # under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-//" # single choice of license, a recipient has the option to distribute\n" +
-//" # your version of this file under either the CDDL, the GPL Version 2 or\n" +
-//" # to extend the choice of license to its licensees as provided above.\n" +
-//" # However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-//" # Version 2 license, then the option applies only if the new code is\n" +
-//" # made subject to such option by the copyright holder.";
-
-//    private static final String INPUT =
-//"# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-//"#\n" +
-//"# Copyright 2010 Sun Microsystems, Inc. All rights reserved.\n" +
-//"#\n" +
-//"# The contents of this file are subject to the terms of either the GNU\n" +
-//"# General Public License Version 2 only (\"GPL\") or the Common\n" +
-//"# Development and Distribution License(\"CDDL\") (collectively, the\n" +
-//"# \"License\"). You may not use this file except in compliance with the\n" +
-//"# License. You can obtain a copy of the License at\n" +
-//"# http://www.netbeans.org/cddl-gplv2.html\n" +
-//"# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-//"# specific language governing permissions and limitations under the\n" +
-//"# License.  When distributing the software, include this License Header\n" +
-//"# Notice in each file and include the License file at\n" +
-//"# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this\n" +
-//"# particular file as subject to the \"Classpath\" exception as provided\n" +
-//"# by Sun in the GPL Version 2 section of the License file that\n" +
-//"# accompanied this code. If applicable, add the following below the\n" +
-//"# License Header, with the fields enclosed by brackets [] replaced by\n" +
-//"# your own identifying information:\n" +
-//"# \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-//"#\n" +
-//"# If you wish your version of this file to be governed by only the CDDL\n" +
-//"# or only the GPL Version 2, indicate your decision by adding\n" +
-//"# \"[Contributor] elects to include this software in this distribution\n" +
-//"# under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-//"# single choice of license, a recipient has the option to distribute\n" +
-//"# your version of this file under either the CDDL, the GPL Version 2 or\n" +
-//"# to extend the choice of license to its licensees as provided above.\n" +
-//"# However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-//"# Version 2 license, then the option applies only if the new code is\n" +
-//"# made subject to such option by the copyright holder.\n" +
-//"#\n" +
-//"# Contributor(s):\n" +
-//"#\n" +
-//"# Portions Copyrighted 2010 Sun Microsystems, Inc.";
-
-//    private static final String INPUT =
-//"# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-//"#\n" +
-//"# Copyright 2010 Oracle and/or its affiliates. All rights reserved.\n" +
-//"#\n" +
-//"# Oracle and Java are registered trademarks of Oracle and/or its affiliates.\n" +
-//"# Other names may be trademarks of their respective owners.\n" +
-//"#\n" +
-//"# The contents of this file are subject to the terms of either the GNU\n" +
-//"# General Public License Version 2 only (\"GPL\") or the Common\n" +
-//"# Development and Distribution License(\"CDDL\") (collectively, the\n" +
-//"# \"License\"). You may not use this file except in compliance with the\n" +
-//"# License. You can obtain a copy of the License at\n" +
-//"# http://www.netbeans.org/cddl-gplv2.html\n" +
-//"# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-//"# specific language governing permissions and limitations under the\n" +
-//"# License.  When distributing the software, include this License Header\n" +
-//"# Notice in each file and include the License file at\n" +
-//"# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this\n" +
-//"# particular file as subject to the \"Classpath\" exception as provided\n" +
-//"# by Oracle in the GPL Version 2 section of the License file that\n" +
-//"# accompanied this code. If applicable, add the following below the\n" +
-//"# License Header, with the fields enclosed by brackets [] replaced by\n" +
-//"# your own identifying information:\n" +
-//"# \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-//"#\n" +
-//"# Contributor(s):\n" +
-//"#\n" +
-//"# The Original Software is NetBeans. The Initial Developer of the Original\n" +
-//"# Software is Sun Microsystems, Inc. Portions Copyright 2010 Sun\n" +
-//"# Microsystems, Inc. All Rights Reserved.\n" +
-//"#\n" +
-//"# If you wish your version of this file to be governed by only the CDDL\n" +
-//"# or only the GPL Version 2, indicate your decision by adding\n" +
-//"# \"[Contributor] elects to include this software in this distribution\n" +
-//"# under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-//"# single choice of license, a recipient has the option to distribute\n" +
-//"# your version of this file under either the CDDL, the GPL Version 2 or\n" +
-//"# to extend the choice of license to its licensees as provided above.\n" +
-//"# However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-//"# Version 2 license, then the option applies only if the new code is\n" +
-//"# made subject to such option by the copyright holder.";
-
-    private static final String OUTPUT =
-"# Licensed to the Apache Software Foundation (ASF) under one or more\n" +
-"# contributor license agreements.  See the NOTICE file distributed with\n" +
-"# this work for additional information regarding copyright ownership.\n" +
-"# The ASF licenses this file to You under the Apache License, Version 2.0\n" +
-"# (the \"License\"); you may not use this file except in compliance with\n" +
-"# the License.  You may obtain a copy of the License at\n" +
-"#\n" +
-"# http://www.apache.org/licenses/LICENSE-2.0\n" +
-"#\n" +
-"# Unless required by applicable law or agreed to in writing, software\n" +
-"# distributed under the License is distributed on an \"AS IS\" BASIS,\n" +
-"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" +
-"# See the License for the specific language governing permissions and\n" +
-"# limitations under the License.\n";
-
-//    private static final String INPUT =
-//"<!--\n" +
-//"DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-//"\n" +
-//"Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.\n" +
-//"\n" +
-//"Oracle and Java are registered trademarks of Oracle and/or its affiliates.\n" +
-//"Other names may be trademarks of their respective owners.\n" +
-//"\n" +
-//"The contents of this file are subject to the terms of either the GNU\n" +
-//"General Public License Version 2 only (\"GPL\") or the Common\n" +
-//"Development and Distribution License(\"CDDL\") (collectively, the\n" +
-//"\"License\"). You may not use this file except in compliance with the\n" +
-//"License. You can obtain a copy of the License at\n" +
-//"http://www.netbeans.org/cddl-gplv2.html\n" +
-//"or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-//"specific language governing permissions and limitations under the\n" +
-//"License.  When distributing the software, include this License Header\n" +
-//"Notice in each file and include the License file at\n" +
-//"nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this\n" +
-//"particular file as subject to the \"Classpath\" exception as provided\n" +
-//"by Oracle in the GPL Version 2 section of the License file that\n" +
-//"accompanied this code. If applicable, add the following below the\n" +
-//"License Header, with the fields enclosed by brackets [] replaced by\n" +
-//"your own identifying information:\n" +
-//"\"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-//"\n" +
-//"Contributor(s):\n" +
-//"\n" +
-//"The Original Software is NetBeans. The Initial Developer of the Original\n" +
-//"Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun\n" +
-//"Microsystems, Inc. All Rights Reserved.\n" +
-//"\n" +
-//"If you wish your version of this file to be governed by only the CDDL\n" +
-//"or only the GPL Version 2, indicate your decision by adding\n" +
-//"\"[Contributor] elects to include this software in this distribution\n" +
-//"under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-//"single choice of license, a recipient has the option to distribute\n" +
-//"your version of this file under either the CDDL, the GPL Version 2 or\n" +
-//"to extend the choice of license to its licensees as provided above.\n" +
-//"However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-//"Version 2 license, then the option applies only if the new code is\n" +
-//"made subject to such option by the copyright holder.\n" +
-//"-->";
-//
-////    private static final String INPUT =
-////"<!--\n" +
-////"DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-////"\n" +
-////"Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.\n" +
-////"\n" +
-////"\n" +
-////"The contents of this file are subject to the terms of either the GNU\n" +
-////"General Public License Version 2 only (\"GPL\") or the Common\n" +
-////"Development and Distribution License(\"CDDL\") (collectively, the\n" +
-////"\"License\"). You may not use this file except in compliance with the\n" +
-////"License. You can obtain a copy of the License at\n" +
-////"http://www.netbeans.org/cddl-gplv2.html\n" +
-////"or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-////"specific language governing permissions and limitations under the\n" +
-////"License.  When distributing the software, include this License Header\n" +
-////"Notice in each file and include the License file at\n" +
-////"nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this\n" +
-////"particular file as subject to the \"Classpath\" exception as provided\n" +
-////"by Sun in the GPL Version 2 section of the License file that\n" +
-////"accompanied this code. If applicable, add the following below the\n" +
-////"License Header, with the fields enclosed by brackets [] replaced by\n" +
-////"your own identifying information:\n" +
-////"\"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-////"\n" +
-////"Contributor(s):\n" +
-////"\n" +
-////"The Original Software is NetBeans. The Initial Developer of the Original\n" +
-////"Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun\n" +
-////"Microsystems, Inc. All Rights Reserved.\n" +
-////"\n" +
-////"If you wish your version of this file to be governed by only the CDDL\n" +
-////"or only the GPL Version 2, indicate your decision by adding\n" +
-////"\"[Contributor] elects to include this software in this distribution\n" +
-////"under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-////"single choice of license, a recipient has the option to distribute\n" +
-////"your version of this file under either the CDDL, the GPL Version 2 or\n" +
-////"to extend the choice of license to its licensees as provided above.\n" +
-////"However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-////"Version 2 license, then the option applies only if the new code is\n" +
-////"made subject to such option by the copyright holder.\n" +
-////"-->";
-//
-//    private static final String OUTPUT =
-//"<!--\n" +
-//"\n" +
-//"  Licensed to the Apache Software Foundation (ASF) under one or more\n" +
-//"  contributor license agreements.  See the NOTICE file distributed with\n" +
-//"  this work for additional information regarding copyright ownership.\n" +
-//"  The ASF licenses this file to You under the Apache License, Version 2.0\n" +
-//"  (the \"License\"); you may not use this file except in compliance with\n" +
-//"  the License.  You may obtain a copy of the License at\n" +
-//"\n" +
-//"  http://www.apache.org/licenses/LICENSE-2.0\n" +
-//"\n" +
-//"  Unless required by applicable law or agreed to in writing, software\n" +
-//"  distributed under the License is distributed on an \"AS IS\" BASIS,\n" +
-//"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" +
-//"  See the License for the specific language governing permissions and\n" +
-//"  limitations under the License.\n" +
-//"-->";
-
-////    private static final String INPUT =
-////"/*\n" +
-////" * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-////" *\n" +
-////" * Copyright 2010 Oracle and/or its affiliates. All rights reserved.\n" +
-////" *\n" +
-////" * Oracle and Java are registered trademarks of Oracle and/or its affiliates.\n" +
-////" * Other names may be trademarks of their respective owners.\n" +
-////" *\n" +
-////" * The contents of this file are subject to the terms of either the GNU\n" +
-////" * General Public License Version 2 only (\"GPL\") or the Common\n" +
-////" * Development and Distribution License(\"CDDL\") (collectively, the\n" +
-////" * \"License\"). You may not use this file except in compliance with the\n" +
-////" * License. You can obtain a copy of the License at\n" +
-////" * http://www.netbeans.org/cddl-gplv2.html\n" +
-////" * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-////" * specific language governing permissions and limitations under the\n" +
-////" * License.  When distributing the software, include this License Header\n" +
-////" * Notice in each file and include the License file at\n" +
-////" * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this\n" +
-////" * particular file as subject to the \"Classpath\" exception as provided\n" +
-////" * by Oracle in the GPL Version 2 section of the License file that\n" +
-////" * accompanied this code. If applicable, add the following below the\n" +
-////" * License Header, with the fields enclosed by brackets [] replaced by\n" +
-////" * your own identifying information:\n" +
-////" * \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-////" *\n" +
-////" * Contributor(s):\n" +
-////" *\n" +
-////" * Portions Copyrighted 2010 Sun Microsystems, Inc.\n" +
-////" */";
-//
-////    private static final String INPUT =
-////"/*\n" +
-////" * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-////" *\n" +
-////" * Copyright 2010 Oracle and/or its affiliates. All rights reserved.\n" +
-////" *\n" +
-////" * Oracle and Java are registered trademarks of Oracle and/or its affiliates.\n" +
-////" * Other names may be trademarks of their respective owners.\n" +
-////" *\n" +
-////" * The contents of this file are subject to the terms of either the GNU General\n" +
-////" * Public License Version 2 only (\"GPL\") or the Common Development and\n" +
-////" * Distribution License(\"CDDL\") (collectively, the \"License\"). You may not use\n" +
-////" * this file except in compliance with the License. You can obtain a copy of the\n" +
-////" * License at http://www.netbeans.org/cddl-gplv2.html or\n" +
-////" * nbbuild/licenses/CDDL-GPL-2-CP. See the License for the specific language\n" +
-////" * governing permissions and limitations under the License. When distributing\n" +
-////" * the software, include this License Header Notice in each file and include the\n" +
-////" * License file at nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this\n" +
-////" * particular file as subject to the \"Classpath\" exception as provided by Oracle\n" +
-////" * in the GPL Version 2 section of the License file that accompanied this code.\n" +
-////" * If applicable, add the following below the License Header, with the fields\n" +
-////" * enclosed by brackets [] replaced by your own identifying information:\n" +
-////" * \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-////" *\n" +
-////" * If you wish your version of this file to be governed by only the CDDL or only\n" +
-////" * the GPL Version 2, indicate your decision by adding \"[Contributor] elects to\n" +
-////" * include this software in this distribution under the [CDDL or GPL Version 2]\n" +
-////" * license.\" If you do not indicate a single choice of license, a recipient has\n" +
-////" * the option to distribute your version of this file under either the CDDL, the\n" +
-////" * GPL Version 2 or to extend the choice of license to its licensees as provided\n" +
-////" * above. However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-////" * Version 2 license, then the option applies only if the new code is made\n" +
-////" * subject to such option by the copyright holder.\n" +
-////" *\n" +
-////" * Contributor(s):\n" +
-////" *\n" +
-////" * Portions Copyrighted 2010 Sun Microsystems, Inc.\n" +
-////" */";
-//
-////    private static final String INPUT =
-////"/*\n" +
-////" * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-////" *\n" +
-////" * Copyright 2010 Sun Microsystems, Inc. All rights reserved.\n" +
-////" *\n" +
-////" * The contents of this file are subject to the terms of either the GNU\n" +
-////" * General Public License Version 2 only (\"GPL\") or the Common\n" +
-////" * Development and Distribution License(\"CDDL\") (collectively, the\n" +
-////" * \"License\"). You may not use this file except in compliance with the\n" +
-////" * License. You can obtain a copy of the License at\n" +
-////" * http://www.netbeans.org/cddl-gplv2.html\n" +
-////" * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-////" * specific language governing permissions and limitations under the\n" +
-////" * License.  When distributing the software, include this License Header\n" +
-////" * Notice in each file and include the License file at\n" +
-////" * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this\n" +
-////" * particular file as subject to the \"Classpath\" exception as provided\n" +
-////" * by Sun in the GPL Version 2 section of the License file that\n" +
-////" * accompanied this code. If applicable, add the following below the\n" +
-////" * License Header, with the fields enclosed by brackets [] replaced by\n" +
-////" * your own identifying information:\n" +
-////" * \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-////" *\n" +
-////" * Contributor(s):\n" +
-////" *\n" +
-////" * The Original Software is NetBeans. The Initial Developer of the Original\n" +
-////" * Software is Sun Microsystems, Inc. Portions Copyright 2010 Sun\n" +
-////" * Microsystems, Inc. All Rights Reserved.\n" +
-////" *\n" +
-////" * If you wish your version of this file to be governed by only the CDDL\n" +
-////" * or only the GPL Version 2, indicate your decision by adding\n" +
-////" * \"[Contributor] elects to include this software in this distribution\n" +
-////" * under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-////" * single choice of license, a recipient has the option to distribute\n" +
-////" * your version of this file under either the CDDL, the GPL Version 2 or\n" +
-////" * to extend the choice of license to its licensees as provided above.\n" +
-////" * However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-////" * Version 2 license, then the option applies only if the new code is\n" +
-////" * made subject to such option by the copyright holder.\n" +
-////" */";
-//
-////    private static final String INPUT =
-////"/*\n" +
-////" * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-////" *\n" +
-////" * Copyright 2010 Sun Microsystems, Inc. All rights reserved.\n" +
-////" *\n" +
-////" * The contents of this file are subject to the terms of either the GNU\n" +
-////" * General Public License Version 2 only (\"GPL\") or the Common\n" +
-////" * Development and Distribution License(\"CDDL\") (collectively, the\n" +
-////" * \"License\"). You may not use this file except in compliance with the\n" +
-////" * License. You can obtain a copy of the License at\n" +
-////" * http://www.netbeans.org/cddl-gplv2.html\n" +
-////" * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-////" * specific language governing permissions and limitations under the\n" +
-////" * License.  When distributing the software, include this License Header\n" +
-////" * Notice in each file and include the License file at\n" +
-////" * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this\n" +
-////" * particular file as subject to the \"Classpath\" exception as provided\n" +
-////" * by Sun in the GPL Version 2 section of the License file that\n" +
-////" * accompanied this code. If applicable, add the following below the\n" +
-////" * License Header, with the fields enclosed by brackets [] replaced by\n" +
-////" * your own identifying information:\n" +
-////" * \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-////" *\n" +
-////" * Contributor(s):\n" +
-////" *\n" +
-////" * Portions Copyrighted 2010 Sun Microsystems, Inc.\n" +
-////" */";
-//
-////    private static final String INPUT =
-////"/*\n" +
-////" * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-////" *\n" +
-////" * Copyright 2010 Oracle and/or its affiliates. All rights reserved.\n" +
-////" *\n" +
-////" * Oracle and Java are registered trademarks of Oracle and/or its affiliates.\n" +
-////" * Other names may be trademarks of their respective owners.\n" +
-////" *\n" +
-////" * The contents of this file are subject to the terms of either the GNU\n" +
-////" * General Public License Version 2 only (\"GPL\") or the Common\n" +
-////" * Development and Distribution License(\"CDDL\") (collectively, the\n" +
-////" * \"License\"). You may not use this file except in compliance with the\n" +
-////" * License. You can obtain a copy of the License at\n" +
-////" * http://www.netbeans.org/cddl-gplv2.html\n" +
-////" * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-////" * specific language governing permissions and limitations under the\n" +
-////" * License.  When distributing the software, include this License Header\n" +
-////" * Notice in each file and include the License file at\n" +
-////" * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this\n" +
-////" * particular file as subject to the \"Classpath\" exception as provided\n" +
-////" * by Oracle in the GPL Version 2 section of the License file that\n" +
-////" * accompanied this code. If applicable, add the following below the\n" +
-////" * License Header, with the fields enclosed by brackets [] replaced by\n" +
-////" * your own identifying information:\n" +
-////" * \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-////" *\n" +
-////" * Contributor(s):\n" +
-////" *\n" +
-////" * The Original Software is NetBeans. The Initial Developer of the Original\n" +
-////" * Software is Sun Microsystems, Inc. Portions Copyright 2010 Sun\n" +
-////" * Microsystems, Inc. All Rights Reserved.\n" +
-////" *\n" +
-////" * If you wish your version of this file to be governed by only the CDDL\n" +
-////" * or only the GPL Version 2, indicate your decision by adding\n" +
-////" * \"[Contributor] elects to include this software in this distribution\n" +
-////" * under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-////" * single choice of license, a recipient has the option to distribute\n" +
-////" * your version of this file under either the CDDL, the GPL Version 2 or\n" +
-////" * to extend the choice of license to its licensees as provided above.\n" +
-////" * However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-////" * Version 2 license, then the option applies only if the new code is\n" +
-////" * made subject to such option by the copyright holder.\n" +
-////" */";
-////    private static final String INPUT =
-////"/*\n" +
-////" * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-////" *\n" +
-////" * Copyright 2010 Oracle and/or its affiliates. All rights reserved.\n" +
-////" *\n" +
-////" * Oracle and Java are registered trademarks of Oracle and/or its affiliates.\n" +
-////" * Other names may be trademarks of their respective owners.\n" +
-////" *\n" +
-////" * The contents of this file are subject to the terms of either the GNU\n" +
-////" * General Public License Version 2 only (\"GPL\") or the Common\n" +
-////" * Development and Distribution License(\"CDDL\") (collectively, the\n" +
-////" * \"License\"). You may not use this file except in compliance with the\n" +
-////" * License. You can obtain a copy of the License at\n" +
-////" * http://www.netbeans.org/cddl-gplv2.html\n" +
-////" * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-////" * specific language governing permissions and limitations under the\n" +
-////" * License.  When distributing the software, include this License Header\n" +
-////" * Notice in each file and include the License file at\n" +
-////" * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this\n" +
-////" * particular file as subject to the \"Classpath\" exception as provided\n" +
-////" * by Oracle in the GPL Version 2 section of the License file that\n" +
-////" * accompanied this code. If applicable, add the following below the\n" +
-////" * License Header, with the fields enclosed by brackets [] replaced by\n" +
-////" * your own identifying information:\n" +
-////" * \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-////" *\n" +
-////" * If you wish your version of this file to be governed by only the CDDL\n" +
-////" * or only the GPL Version 2, indicate your decision by adding\n" +
-////" * \"[Contributor] elects to include this software in this distribution\n" +
-////" * under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-////" * single choice of license, a recipient has the option to distribute\n" +
-////" * your version of this file under either the CDDL, the GPL Version 2 or\n" +
-////" * to extend the choice of license to its licensees as provided above.\n" +
-////" * However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-////" * Version 2 license, then the option applies only if the new code is\n" +
-////" * made subject to such option by the copyright holder.\n" +
-////" *\n" +
-////" * Contributor(s):\n" +
-////" *\n" +
-////" * Portions Copyrighted 2010 Sun Microsystems, Inc.\n" +
-////" */";
-//
-////    private static final String INPUT =
-////"/*\n" +
-////" * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n" +
-////" *\n" +
-////" * Copyright 2010 Sun Microsystems, Inc. All rights reserved.\n" +
-////" *\n" +
-////" * The contents of this file are subject to the terms of either the GNU\n" +
-////" * General Public License Version 2 only (\"GPL\") or the Common\n" +
-////" * Development and Distribution License(\"CDDL\") (collectively, the\n" +
-////" * \"License\"). You may not use this file except in compliance with the\n" +
-////" * License. You can obtain a copy of the License at\n" +
-////" * http://www.netbeans.org/cddl-gplv2.html\n" +
-////" * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the\n" +
-////" * specific language governing permissions and limitations under the\n" +
-////" * License.  When distributing the software, include this License Header\n" +
-////" * Notice in each file and include the License file at\n" +
-////" * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this\n" +
-////" * particular file as subject to the \"Classpath\" exception as provided\n" +
-////" * by Sun in the GPL Version 2 section of the License file that\n" +
-////" * accompanied this code. If applicable, add the following below the\n" +
-////" * License Header, with the fields enclosed by brackets [] replaced by\n" +
-////" * your own identifying information:\n" +
-////" * \"Portions Copyrighted [year] [name of copyright owner]\"\n" +
-////" *\n" +
-////" * If you wish your version of this file to be governed by only the CDDL\n" +
-////" * or only the GPL Version 2, indicate your decision by adding\n" +
-////" * \"[Contributor] elects to include this software in this distribution\n" +
-////" * under the [CDDL or GPL Version 2] license.\" If you do not indicate a\n" +
-////" * single choice of license, a recipient has the option to distribute\n" +
-////" * your version of this file under either the CDDL, the GPL Version 2 or\n" +
-////" * to extend the choice of license to its licensees as provided above.\n" +
-////" * However, if you add GPL Version 2 code and therefore, elected the GPL\n" +
-////" * Version 2 license, then the option applies only if the new code is\n" +
-////" * made subject to such option by the copyright holder.\n" +
-////" *\n" +
-////" * Contributor(s):\n" +
-////" *\n" +
-////" * Portions Copyrighted 2010 Sun Microsystems, Inc.\n" +
-////" */";
-//    private static final String OUTPUT =
-//"/**\n" +
-//" * Licensed to the Apache Software Foundation (ASF) under one\n" +
-//" * or more contributor license agreements.  See the NOTICE file\n" +
-//" * distributed with this work for additional information\n" +
-//" * regarding copyright ownership.  The ASF licenses this file\n" +
-//" * to you under the Apache License, Version 2.0 (the\n" +
-//" * \"License\"); you may not use this file except in compliance\n" +
-//" * with the License.  You may obtain a copy of the License at\n" +
-//" *\n" +
-//" *   http://www.apache.org/licenses/LICENSE-2.0\n" +
-//" *\n" +
-//" * Unless required by applicable law or agreed to in writing,\n" +
-//" * software distributed under the License is distributed on an\n" +
-//" * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n" +
-//" * KIND, either express or implied.  See the License for the\n" +
-//" * specific language governing permissions and limitations\n" +
-//" * under the License.\n" +
-//" */";
-
-    public static void main(String[] args) throws IOException {
-        StringBuilder pattern = new StringBuilder();
-        
-        for (String piece : INPUT.split("2010")) {
-            if (pattern.length() != 0) {
-                pattern.append("[0-9][0-9][0-9][0-9](-[0-9][0-9][0-9][0-9])?");
-            }
-            pattern.append(Pattern.quote(piece));
-        }
-        
-        Pattern inputPattern = Pattern.compile(pattern.toString());
-//        Pattern inputPattern = Pattern.compile(Pattern.quote(INPUT), Pattern.MULTILINE);
-        
-        Path root = Paths.get("/home/lahvac/src/nb/apache-jackpot30/");
-//        Path root = Paths.get("/home/lahvac/src/nb/apache-jackpot30/cmdline/compiler/antsrc/org/netbeans/modules/jackpot30/compiler/ant/JackpotCompiler.java");
-        
-        Files.find(root, Integer.MAX_VALUE, (p, attr) -> attr.isRegularFile())
-             .forEach(p -> {
-                try {
-                    Matcher m = inputPattern.matcher(new String(Files.readAllBytes(p)));
-                    if (m.find()) {
-                        try (Writer w = Files.newBufferedWriter(p)) {
-                            w.write(m.replaceAll(Matcher.quoteReplacement(OUTPUT)));
-                        }
-                    }
-                } catch (IOException ex) {
-                    ex.printStackTrace();
-                }
-             });
-    }
-    
-}