Merge pull request #3275 from jGauravGupta/FISH-5807-2

Filter jvm-options based on VM name
diff --git a/contrib/j2ee.jboss4/external/j2ee.jboss4-external-resources.txt b/contrib/j2ee.jboss4/external/j2ee.jboss4-external-resources-license.txt
similarity index 100%
rename from contrib/j2ee.jboss4/external/j2ee.jboss4-external-resources.txt
rename to contrib/j2ee.jboss4/external/j2ee.jboss4-external-resources-license.txt
diff --git a/contrib/j2ee.weblogic9/external/j2ee.weblogic9-generated-schema-classes-license.txt b/contrib/j2ee.weblogic9/external/j2ee.weblogic9-generated-schema-classes-license.txt
new file mode 100644
index 0000000..4af74c8
--- /dev/null
+++ b/contrib/j2ee.weblogic9/external/j2ee.weblogic9-generated-schema-classes-license.txt
@@ -0,0 +1,832 @@
+Name: Weblogic Schema Classes
+Version: 9
+Description: Classes generated from Weblogic deployment descriptors
+License: CDDL-GPL-2-CP
+Origin: From weblogic distribution
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that
+creates or contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the
+Original Software, prior Modifications used by a
+Contributor (if any), and the Modifications made by that
+particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or
+(b) Modifications, or (c) the combination of files
+containing Original Software with files containing
+Modifications, in each case including portions thereof.
+
+1.4. "Executable" means the Covered Software in any form
+other than Source Code.
+
+1.5. "Initial Developer" means the individual or entity
+that first makes Original Software available under this
+License.
+
+1.6. "Larger Work" means a work which combines Covered
+Software or portions thereof with code not governed by the
+terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the
+maximum extent possible, whether at the time of the initial
+grant or subsequently acquired, any and all of the rights
+conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable
+form of any of the following:
+
+A. Any file that results from an addition to,
+deletion from or modification of the contents of a
+file containing Original Software or previous
+Modifications;
+
+B. Any new file that contains any part of the
+Original Software or previous Modification; or
+
+C. Any new file that is contributed or otherwise made
+available under the terms of this License.
+
+1.10. "Original Software" means the Source Code and
+Executable form of computer software code that is
+originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned
+or hereafter acquired, including without limitation,
+method, process, and apparatus claims, in any patent
+Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer
+software code in which modifications are made and (b)
+associated documentation included in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal
+entity exercising rights under, and complying with all of
+the terms of, this License. For legal entities, "You"
+includes any entity which controls, is controlled by, or is
+under common control with You. For purposes of this
+definition, "control" means (a) the power, direct or
+indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (b) ownership
+of more than fifty percent (50%) of the outstanding shares
+or beneficial ownership of such entity.
+
+2. License Grants.
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and
+subject to third party intellectual property claims, the
+Initial Developer hereby grants You a world-wide,
+royalty-free, non-exclusive license:
+
+(a) under intellectual property rights (other than
+patent or trademark) Licensable by Initial Developer,
+to use, reproduce, modify, display, perform,
+sublicense and distribute the Original Software (or
+portions thereof), with or without Modifications,
+and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making,
+using or selling of Original Software, to make, have
+made, use, practice, sell, and offer for sale, and/or
+otherwise dispose of the Original Software (or
+portions thereof).
+
+(c) The licenses granted in Sections 2.1(a) and (b)
+are effective on the date Initial Developer first
+distributes or otherwise makes the Original Software
+available to a third party under the terms of this
+License.
+
+(d) Notwithstanding Section 2.1(b) above, no patent
+license is granted: (1) for code that You delete from
+the Original Software, or (2) for infringements
+caused by: (i) the modification of the Original
+Software, or (ii) the combination of the Original
+Software with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and
+subject to third party intellectual property claims, each
+Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than
+patent or trademark) Licensable by Contributor to
+use, reproduce, modify, display, perform, sublicense
+and distribute the Modifications created by such
+Contributor (or portions thereof), either on an
+unmodified basis, with other Modifications, as
+Covered Software and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making,
+using, or selling of Modifications made by that
+Contributor either alone and/or in combination with
+its Contributor Version (or portions of such
+combination), to make, use, sell, offer for sale,
+have made, and/or otherwise dispose of: (1)
+Modifications made by that Contributor (or portions
+thereof); and (2) the combination of Modifications
+made by that Contributor with its Contributor Version
+(or portions of such combination).
+
+(c) The licenses granted in Sections 2.2(a) and
+2.2(b) are effective on the date Contributor first
+distributes or otherwise makes the Modifications
+available to a third party.
+
+(d) Notwithstanding Section 2.2(b) above, no patent
+license is granted: (1) for any code that Contributor
+has deleted from the Contributor Version; (2) for
+infringements caused by: (i) third party
+modifications of Contributor Version, or (ii) the
+combination of Modifications made by that Contributor
+with other software (except as part of the
+Contributor Version) or other devices; or (3) under
+Patent Claims infringed by Covered Software in the
+absence of Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make
+available in Executable form must also be made available in
+Source Code form and that Source Code form must be
+distributed only under the terms of this License. You must
+include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or
+otherwise make available. You must inform recipients of any
+such Covered Software in Executable form as to how they can
+obtain such Covered Software in Source Code form in a
+reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You
+contribute are governed by the terms of this License. You
+represent that You believe Your Modifications are Your
+original creation(s) and/or You have sufficient rights to
+grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications
+that identifies You as the Contributor of the Modification.
+You may not remove or alter any copyright, patent or
+trademark notices contained within the Covered Software, or
+any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered
+Software in Source Code form that alters or restricts the
+applicable version of this License or the recipients'
+rights hereunder. You may choose to offer, and to charge a
+fee for, warranty, support, indemnity or liability
+obligations to one or more recipients of Covered Software.
+However, you may do so only on Your own behalf, and not on
+behalf of the Initial Developer or any Contributor. You
+must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by
+You alone, and You hereby agree to indemnify the Initial
+Developer and every Contributor for any liability incurred
+by the Initial Developer or such Contributor as a result of
+warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered
+Software under the terms of this License or under the terms
+of a license of Your choice, which may contain terms
+different from this License, provided that You are in
+compliance with the terms of this License and that the
+license for the Executable form does not attempt to limit
+or alter the recipient's rights in the Source Code form
+from the rights set forth in this License. If You
+distribute the Covered Software in Executable form under a
+different license, You must make it absolutely clear that
+any terms which differ from this License are offered by You
+alone, not by the Initial Developer or Contributor. You
+hereby agree to indemnify the Initial Developer and every
+Contributor for any liability incurred by the Initial
+Developer or such Contributor as a result of any such terms
+You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software
+with other code not governed by the terms of this License
+and distribute the Larger Work as a single product. In such
+a case, You must make sure the requirements of this License
+are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and
+may publish revised and/or new versions of this License
+from time to time. Each version will be given a
+distinguishing version number. Except as provided in
+Section 4.3, no one other than the license steward has the
+right to modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise
+make the Covered Software available under the terms of the
+version of the License under which You originally received
+the Covered Software. If the Initial Developer includes a
+notice in the Original Software prohibiting it from being
+distributed or otherwise made available under any
+subsequent version of the License, You must distribute and
+make the Covered Software available under the terms of the
+version of the License under which You originally received
+the Covered Software. Otherwise, You may also choose to
+use, distribute or otherwise make the Covered Software
+available under the terms of any subsequent version of the
+License published by the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a
+new license for Your Original Software, You may create and
+use a modified version of this License if You: (a) rename
+the license and remove any references to the name of the
+license steward (except to note that the license differs
+from this License); and (b) otherwise make it clear that
+the license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
+BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
+SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
+PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
+COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
+INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
+ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
+DISCLAIMER.
+
+6. TERMINATION.
+
+6.1. This License and the rights granted hereunder will
+terminate automatically if You fail to comply with terms
+herein and fail to cure such breach within 30 days of
+becoming aware of the breach. Provisions which, by their
+nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding
+declaratory judgment actions) against Initial Developer or
+a Contributor (the Initial Developer or Contributor against
+whom You assert such claim is referred to as "Participant")
+alleging that the Participant Software (meaning the
+Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the
+Initial Developer) directly or indirectly infringes any
+patent, then any and all rights granted directly or
+indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant)
+and all Contributors under Sections 2.1 and/or 2.2 of this
+License shall, upon 60 days notice from Participant
+terminate prospectively and automatically at the expiration
+of such 60 day notice period, unless if within such 60 day
+period You withdraw Your claim with respect to the
+Participant Software against such Participant either
+unilaterally or pursuant to a written agreement with
+Participant.
+
+6.3. If You assert a patent infringement claim against
+Participant alleging that the Participant Software directly
+or indirectly infringes any patent where such claim is
+resolved (such as by license or settlement) prior to the
+initiation of patent infringement litigation, then the
+reasonable value of the licenses granted by such Participant
+under Sections 2.1 or 2.2 shall be taken into account in
+determining the amount or value of any payment or license.
+
+6.4. In the event of termination under Sections 6.1 or 6.2
+above, all end user licenses that have been validly granted
+by You or any distributor hereunder prior to termination
+(excluding licenses granted to You by any distributor)
+shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
+INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
+COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
+LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
+CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK
+STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
+INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
+APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
+NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
+CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
+APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is
+defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
+computer software" (as that term is defined at 48 C.F.R.
+§ 252.227-7014(a)(1)) and "commercial computer software
+documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
+1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
+through 227.7202-4 (June 1995), all U.S. Government End Users
+acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes,
+any other FAR, DFAR, or other clause or provision that addresses
+Government rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the
+extent necessary to make it enforceable. This License shall be
+governed by the law of the jurisdiction specified in a notice
+contained within the Original Software (except to the extent
+applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation
+relating to this License shall be subject to the jurisdiction of
+the courts located in the jurisdiction and venue specified in a
+notice contained within the Original Software, with the losing
+party responsible for costs, including, without limitation, court
+costs and reasonable attorneys' fees and expenses. The
+application of the United Nations Convention on Contracts for the
+International Sale of Goods is expressly excluded. Any law or
+regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the
+United States export administration regulations (and the export
+control laws and regulation of any other countries) when You use,
+distribute or otherwise make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or
+indirectly, out of its utilization of rights under this License
+and You agree to work with Initial Developer and Contributors to
+distribute such responsibility on an equitable basis. Nothing
+herein is intended or shall be deemed to constitute any admission
+of liability.
+
+NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND
+DISTRIBUTION LICENSE (CDDL)
+
+The code released under the CDDL shall be governed by the laws
+of the State of California (excluding conflict-of-law provisions).
+Any litigation relating to this License shall be subject to the
+jurisdiction of the Federal Courts of the Northern District of
+California and the state courts of the State of California, with
+venue lying in Santa Clara County, California.
+
+
+The GNU General Public License (GPL)
+Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim
+ copies of this license document, but changing it is not
+ allowed.
+
+                      Preamble
+
+The licenses for most software are designed to take away
+your freedom to share and change it. By contrast, the GNU
+General Public License is intended to guarantee your freedom
+to share and change free software--to make sure the software
+is free for all its users. This General Public License
+applies to most of the Free Software Foundation's software
+and to any other program whose authors commit to using it.
+(Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can
+apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom,
+not price. Our General Public Licenses are designed to make
+sure that you have the freedom to distribute copies of free
+software (and charge for this service if you wish), that you
+receive source code or can get it if you want it, that you
+can change the software or use pieces of it in new free
+programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that
+forbid anyone to deny you these rights or to ask you to
+surrender the rights. These restrictions translate to
+certain responsibilities for you if you distribute copies of
+the software, or if you modify it.
+
+For example, if you distribute copies of such a program,
+whether gratis or for a fee, you must give the recipients
+all the rights that you have. You must make sure that they,
+too, receive or can get the source code. And you must show
+them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the
+software, and (2) offer you this license which gives you
+legal permission to copy, distribute and/or modify the
+software.
+
+Also, for each author's protection and ours, we want to make
+certain that everyone understands that there is no warranty
+for this free software. If the software is modified by
+someone else and passed on, we want its recipients to know
+that what they have is not the original, so that any
+problems introduced by others will not reflect on the
+original authors' reputations.
+
+Finally, any free program is threatened constantly by
+software patents. We wish to avoid the danger that
+redistributors of a free program will individually obtain
+patent licenses, in effect making the program proprietary.
+To prevent this, we have made it clear that any patent must
+be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution
+and modification follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
+MODIFICATION
+
+0. This License applies to any program or other work which
+contains a notice placed by the copyright holder saying it
+may be distributed under the terms of this General Public
+License. The "Program", below, refers to any such program or
+work, and a "work based on the Program" means either the
+Program or any derivative work under copyright law: that is
+to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into
+another language. (Hereinafter, translation is included
+without limitation in the term "modification".) Each
+licensee is addressed as "you".
+
+Activities other than copying, distribution and modification
+are not covered by this License; they are outside its scope.
+The act of running the Program is not restricted, and the
+output from the Program is covered only if its contents
+constitute a work based on the Program (independent of
+having been made by running the Program). Whether that is
+true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the
+Program's source code as you receive it, in any medium,
+provided that you conspicuously and appropriately publish on
+each copy an appropriate copyright notice and disclaimer of
+warranty; keep intact all the notices that refer to this
+License and to the absence of any warranty; and give any
+other recipients of the Program a copy of this License along
+with the Program.
+
+You may charge a fee for the physical act of transferring a
+copy, and you may at your option offer warranty protection
+in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any
+portion of it, thus forming a work based on the Program, and
+copy and distribute such modifications or work under the
+terms of Section 1 above, provided that you also meet all of
+these conditions:
+
+    a) You must cause the modified files to carry prominent
+    notices stating that you changed the files and the date
+    of any change.
+
+    b) You must cause any work that you distribute or
+    publish, that in whole or in part contains or is derived
+    from the Program or any part thereof, to be licensed as
+    a whole at no charge to all third parties under the
+    terms of this License.
+
+    c) If the modified program normally reads commands
+    interactively when run, you must cause it, when started
+    running for such interactive use in the most ordinary
+    way, to print or display an announcement including an
+    appropriate copyright notice and a notice that there is
+    no warranty (or else, saying that you provide a
+    warranty) and that users may redistribute the program
+    under these conditions, and telling the user how to view
+    a copy of this License. (Exception: if the Program
+    itself is interactive but does not normally print such
+    an announcement, your work based on the Program is not
+    required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the
+Program, and can be reasonably considered independent and
+separate works in themselves, then this License, and its
+terms, do not apply to those sections when you distribute
+them as separate works. But when you distribute the same
+sections as part of a whole which is a work based on the
+Program, the distribution of the whole must be on the terms
+of this License, whose permissions for other licensees
+extend to the entire whole, and thus to each and every part
+regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights
+or contest your rights to work written entirely by you;
+rather, the intent is to exercise the right to control the
+distribution of derivative or collective works based on the
+Program.
+
+In addition, mere aggregation of another work not based on
+the Program with the Program (or with a work based on the
+Program) on a volume of a storage or distribution medium
+does not bring the other work under the scope of this
+License.
+
+3. You may copy and distribute the Program (or a work based
+on it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you
+also do one of the following:
+
+    a) Accompany it with the complete corresponding
+    machine-readable source code, which must be distributed
+    under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least
+    three years, to give any third party, for a charge no
+    more than your cost of physically performing source
+    distribution, a complete machine-readable copy of the
+    corresponding source code, to be distributed under the
+    terms of Sections 1 and 2 above on a medium customarily
+    used for software interchange; or,
+
+    c) Accompany it with the information you received as to
+    the offer to distribute corresponding source code. (This
+    alternative is allowed only for noncommercial
+    distribution and only if you received the program in
+    object code or executable form with such an offer, in
+    accord with Subsection b above.)
+
+The source code for a work means the preferred form of the
+work for making modifications to it. For an executable work,
+complete source code means all the source code for all
+modules it contains, plus any associated interface
+definition files, plus the scripts used to control
+compilation and installation of the executable. However, as
+a special exception, the source code distributed need not
+include anything that is normally distributed (in either
+source or binary form) with the major components (compiler,
+kernel, and so on) of the operating system on which the
+executable runs, unless that component itself accompanies
+the executable.
+
+If distribution of executable or object code is made by
+offering access to copy from a designated place, then
+offering equivalent access to copy the source code from the
+same place counts as distribution of the source code, even
+though third parties are not compelled to copy the source
+along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the
+Program except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense or distribute
+the Program is void, and will automatically terminate your
+rights under this License. However, parties who have
+received copies, or rights, from you under this License will
+not have their licenses terminated so long as such parties
+remain in full compliance.
+
+5. You are not required to accept this License, since you
+have not signed it. However, nothing else grants you
+permission to modify or distribute the Program or its
+derivative works. These actions are prohibited by law if you
+do not accept this License. Therefore, by modifying or
+distributing the Program (or any work based on the Program),
+you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or
+modifying the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based
+on the Program), the recipient automatically receives a
+license from the original licensor to copy, distribute or
+modify the Program subject to these terms and conditions.
+You may not impose any further restrictions on the
+recipients' exercise of the rights granted herein. You are
+not responsible for enforcing compliance by third parties to
+this License.
+
+7. If, as a consequence of a court judgment or allegation of
+patent infringement or for any other reason (not limited to
+patent issues), conditions are imposed on you (whether by
+court order, agreement or otherwise) that contradict the
+conditions of this License, they do not excuse you from the
+conditions of this License. If you cannot distribute so as
+to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a
+consequence you may not distribute the Program at all. For
+example, if a patent license would not permit royalty-free
+redistribution of the Program by all those who receive
+copies directly or indirectly through you, then the only way
+you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or
+unenforceable under any particular circumstance, the balance
+of the section is intended to apply and the section as a
+whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to
+infringe any patents or other property right claims or to
+contest validity of any such claims; this section has the
+sole purpose of protecting the integrity of the free
+software distribution system, which is implemented by public
+license practices. Many people have made generous
+contributions to the wide range of software distributed
+through that system in reliance on consistent application of
+that system; it is up to the author/donor to decide if he or
+she is willing to distribute software through any other
+system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is
+believed to be a consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is
+restricted in certain countries either by patents or by
+copyrighted interfaces, the original copyright holder who
+places the Program under this License may add an explicit
+geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or
+among countries not thus excluded. In such case, this
+License incorporates the limitation as if written in the
+body of this License.
+
+9. The Free Software Foundation may publish revised and/or
+new versions of the General Public License from time to
+time. Such new versions will be similar in spirit to the
+present version, but may differ in detail to address new
+problems or concerns.
+
+Each version is given a distinguishing version number. If
+the Program specifies a version number of this License which
+applies to it and "any later version", you have the option
+of following the terms and conditions either of that version
+or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number
+of this License, you may choose any version ever published
+by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into
+other free programs whose distribution conditions are
+different, write to the author to ask for permission. For
+software which is copyrighted by the Free Software
+Foundation, write to the Free Software Foundation; we
+sometimes make exceptions for this. Our decision will be
+guided by the two goals of preserving the free status of all
+derivatives of our free software and of promoting the
+sharing and reuse of software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS
+NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
+COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
+"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
+IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
+OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
+DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED
+TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY
+WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED
+ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
+SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
+THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT
+LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
+LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
+PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
+HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+              END OF TERMS AND CONDITIONS
+
+       How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the
+greatest possible use to the public, the best way to achieve
+this is to make it free software which everyone can
+redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is
+safest to attach them to the start of each source file to
+most effectively convey the exclusion of warranty; and each
+file should have at least the "copyright" line and a pointer
+to where the full notice is found.
+
+    One line to give the program's name and a brief idea of
+    what it does. Copyright (C) <year> <name of author>
+
+    This program is free software; you can redistribute it
+    and/or modify it under the terms of the GNU General
+    Public License as published by the Free Software
+    Foundation; either version 2 of the License, or (at your
+    option) any later version.
+
+    This program is distributed in the hope that it will be
+    useful, but WITHOUT ANY WARRANTY; without even the
+    implied warranty of MERCHANTABILITY or FITNESS FOR A
+    PARTICULAR PURPOSE. See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General
+    Public License along with this program; if not, write to
+    the Free Software Foundation, Inc., 59 Temple Place,
+    Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and
+paper mail.
+
+If the program is interactive, make it output a short notice
+like this when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of
+    author Gnomovision comes with ABSOLUTELY NO WARRANTY;
+    for details type `show w'. This is free software, and
+    you are welcome to redistribute it under certain
+    conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show
+the appropriate parts of the General Public License. Of
+course, the commands you use may be called something other
+than `show w' and `show c'; they could even be mouse-clicks
+or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a
+programmer) or your school, if any, to sign a "copyright
+disclaimer" for the program, if necessary. Here is a sample;
+alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in
+  the program `Gnomovision' (which makes passes at
+  compilers) written by James Hacker.
+
+  signature of Ty Coon, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating
+your program into proprietary programs. If your program is a
+subroutine library, you may consider it more useful to
+permit linking proprietary applications with the library. If
+this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
+
+"CLASSPATH" EXCEPTION TO THE GPL VERSION 2
+
+
+Certain source files distributed by Sun Microsystems, Inc.
+are subject to the following clarification and special
+exception to the GPL Version 2, but only where Sun has expressly
+included in the particular source file's header the words
+"Sun designates this particular file as subject to the
+"Classpath" exception as provided by Sun in the License file
+that accompanied this code."
+
+Linking this library statically or dynamically with other
+modules is making a combined work based on this library.
+Thus, the terms and conditions of the GNU General Public
+License Version 2 cover the whole combination.
+
+As a special exception, the copyright holders of this
+library give you permission to link this library with
+independent modules to produce an executable, regardless of
+the license terms of these independent modules, and to copy
+and distribute the resulting executable under terms of your
+choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license
+of that module. An independent module is a module which is
+not derived from or based on this library. If you modify
+this library, you may extend this exception to your version
+of the library, but you are not obligated to do so. If you
+do not wish to do so, delete this exception statement from
+your version.
diff --git a/contrib/j2ee.weblogic9/external/j2ee.weblogic9-generated-schema-classes-netbeans-license.txt b/contrib/j2ee.weblogic9/external/j2ee.weblogic9-generated-schema-classes-netbeans-license.txt
deleted file mode 100644
index 0289ba9..0000000
--- a/contrib/j2ee.weblogic9/external/j2ee.weblogic9-generated-schema-classes-netbeans-license.txt
+++ /dev/null
@@ -1,141 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-1.1. "Contributor" means each individual or entity that creates or contributes to the creation of Modifications.
-1.2. "Contributor Version" means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
-1.3. "Covered Software" means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
-1.4. "Executable" means the Covered Software in any form other than Source Code.
-1.5. "Initial Developer" means the individual or entity that first makes Original Software available under this License.
-1.6. "Larger Work" means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
-1.7. "License" means this document.
-1.8. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
-1.9 "Modifications" means the Source Code and Executable form of any of the following:
-A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
-B. Any new file that contains any part of the Original Software or previous Modification; or
-C. Any new file that is contributed or otherwise made available under the terms of this License.
-1.10. "Original Software" means the Source Code and Executable form of computer software code that is originally released under this License.
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
-1.12. "Source Code" means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
-1.13. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
-2. License Grants.
-2.1. The Initial Developer Grant.
-Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
-(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
-(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
-(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
-(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
-2.2. Contributor Grant.
-Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
-(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
-(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
-(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
-(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
-3. Distribution Obligations.
-3.1. Availability of Source Code.
-Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
-3.2. Modifications.
-The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
-3.3. Required Notices.
-You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
-3.4. Application of Additional Terms.
-You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients� rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
-3.5. Distribution of Executable Versions.
-You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient�s rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
-3.6. Larger Works.
-You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
-4. Versions of the License.
-4.1. New Versions.
-Oracle Corp. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
-4.2. Effect of New Versions.
-You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
-4.3. Modified Versions.
-When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
-5. DISCLAIMER OF WARRANTY.
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-6. TERMINATION.
-6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
-6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as "Participant") alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant.
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
-7. LIMITATION OF LIABILITY.
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY�S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-8. U.S. GOVERNMENT END USERS.
-The Covered Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" (as that term is defined at 48 C.F.R. �252.227-7014(a)(1)) and "commercial computer software documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
-9. MISCELLANEOUS.
-This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction�s conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys� fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
-10. RESPONSIBILITY FOR CLAIMS.
-As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
-NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
-The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California.
-The GNU General Public License (GPL) Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-Preamble
-The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
-When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
-To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
-For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
-We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
-Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
-Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
-The precise terms and conditions for copying, distribution and modification follow.
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
-Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
-1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
-You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
-2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
-a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
-b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
-c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
-These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
-Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
-In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
-3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
-a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
-b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
-c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
-The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
-If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
-4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
-5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
-6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
-7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
-If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
-It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
-This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
-8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
-9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
-Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
-10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
-NO WARRANTY
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-END OF TERMS AND CONDITIONS
-How to Apply These Terms to Your New Programs
-If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
-To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
-One line to give the program's name and a brief idea of what it does.
-Copyright (C)
-This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-Also add information on how to contact you by electronic and paper mail.
-If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
-Gnomovision version 69, Copyright (C) year name of author
-Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
-The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
-You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
-Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
-signature of Ty Coon, 1 April 1989
-Ty Coon, President of Vice
-This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.
-"CLASSPATH" EXCEPTION TO THE GPL VERSION 2
-Certain source files distributed by Oracle America, Inc. and/or its affiliates are subject to the following clarification and special exception to the GPLv2, based on the GNU Project exception for its Classpath libraries, known as the GNU Classpath Exception, but only where Oracle has expressly included in the particular source file's header the words "Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the LICENSE file that accompanied this code."
-You should also note that Oracle includes multiple, independent programs in this software package. Some of those programs are provided under licenses deemed incompatible with the GPLv2 by the Free Software Foundation and others. For example, the package includes programs licensed under the Apache License, Version 2.0. Such programs are licensed to you under their original licenses.
-Oracle facilitates your further distribution of this package by adding the Classpath Exception to the necessary parts of its GPLv2 code, which permits you to use that code in combination with other independent modules not licensed under the GPLv2. However, note that this would not permit you to commingle code under an incompatible license with Oracle's GPLv2 licensed code by, for example, cutting and pasting such code into a file also containing Oracle's GPLv2 licensed code and then distributing the result.
-Additionally, if you were to remove the Classpath Exception from any of the files to which it applies and distribute the result, you would likely be required to license some or all of the other code in that distribution under the GPLv2 as well, and since the GPLv2 is incompatible with the license terms of some items included in the distribution by Oracle, removing the Classpath Exception could therefore effectively compromise your ability to further distribute the package.
-Proceed with caution and we recommend that you obtain the advice of a lawyer skilled in open source matters before removing the Classpath Exception or making modifications to this package which may subsequently be redistributed and/or involve the use of third party software.
-CLASSPATH EXCEPTION
-Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License version 2 cover the whole combination.
-As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
diff --git a/contrib/libs.oracle.jsparser/external/com.oracle.js.parser-ba7a8bc42268-license.txt b/contrib/libs.oracle.jsparser/external/com.oracle.js.parser-ba7a8bc42268-license.txt
index 8f314f5..8b91e8e 100644
--- a/contrib/libs.oracle.jsparser/external/com.oracle.js.parser-ba7a8bc42268-license.txt
+++ b/contrib/libs.oracle.jsparser/external/com.oracle.js.parser-ba7a8bc42268-license.txt
@@ -7,427 +7,349 @@
 Comment: This library is not intended for Apache distribution, is not part of any cluster and will not compile into the target NetBeans folder.
 
 The GNU General Public License (GPL)
+
 Version 2, June 1991
 
- Copyright 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim
- copies of this license document, but changing it is not
- allowed.
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
-                      Preamble
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
 
-The licenses for most software are designed to take away
-your freedom to share and change it. By contrast, the GNU
-General Public License is intended to guarantee your freedom
-to share and change free software--to make sure the software
-is free for all its users. This General Public License
-applies to most of the Free Software Foundation's software
-and to any other program whose authors commit to using it.
-(Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can
-apply it to your programs, too.
+Preamble
 
-When we speak of free software, we are referring to freedom,
-not price. Our General Public Licenses are designed to make
-sure that you have the freedom to distribute copies of free
-software (and charge for this service if you wish), that you
-receive source code or can get it if you want it, that you
-can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
+The licenses for most software are designed to take away your freedom to share
+and change it.  By contrast, the GNU General Public License is intended to
+guarantee your freedom to share and change free software--to make sure the
+software is free for all its users.  This General Public License applies to
+most of the Free Software Foundation's software and to any other program whose
+authors commit to using it.  (Some other Free Software Foundation software is
+covered by the GNU Library General Public License instead.) You can apply it to
+your programs, too.
 
-To protect your rights, we need to make restrictions that
-forbid anyone to deny you these rights or to ask you to
-surrender the rights. These restrictions translate to
-certain responsibilities for you if you distribute copies of
-the software, or if you modify it.
+When we speak of free software, we are referring to freedom, not price.  Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for this service if you wish),
+that you receive source code or can get it if you want it, that you can change
+the software or use pieces of it in new free programs; and that you know you
+can do these things.
 
-For example, if you distribute copies of such a program,
-whether gratis or for a fee, you must give the recipients
-all the rights that you have. You must make sure that they,
-too, receive or can get the source code. And you must show
-them these terms so they know their rights.
+To protect your rights, we need to make restrictions that forbid anyone to deny
+you these rights or to ask you to surrender the rights.  These restrictions
+translate to certain responsibilities for you if you distribute copies of the
+software, or if you modify it.
 
-We protect your rights with two steps: (1) copyright the
-software, and (2) offer you this license which gives you
-legal permission to copy, distribute and/or modify the
-software.
+For example, if you distribute copies of such a program, whether gratis or for
+a fee, you must give the recipients all the rights that you have.  You must
+make sure that they, too, receive or can get the source code.  And you must
+show them these terms so they know their rights.
 
-Also, for each author's protection and ours, we want to make
-certain that everyone understands that there is no warranty
-for this free software. If the software is modified by
-someone else and passed on, we want its recipients to know
-that what they have is not the original, so that any
-problems introduced by others will not reflect on the
-original authors' reputations.
+We protect your rights with two steps: (1) copyright the software, and (2)
+offer you this license which gives you legal permission to copy, distribute
+and/or modify the software.
 
-Finally, any free program is threatened constantly by
-software patents. We wish to avoid the danger that
-redistributors of a free program will individually obtain
-patent licenses, in effect making the program proprietary.
-To prevent this, we have made it clear that any patent must
-be licensed for everyone's free use or not licensed at all.
+Also, for each author's protection and ours, we want to make certain that
+everyone understands that there is no warranty for this free software.  If the
+software is modified by someone else and passed on, we want its recipients to
+know that what they have is not the original, so that any problems introduced
+by others will not reflect on the original authors' reputations.
 
-The precise terms and conditions for copying, distribution
-and modification follow.
+Finally, any free program is threatened constantly by software patents.  We
+wish to avoid the danger that redistributors of a free program will
+individually obtain patent licenses, in effect making the program proprietary.
+To prevent this, we have made it clear that any patent must be licensed for
+everyone's free use or not licensed at all.
 
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
-MODIFICATION
+The precise terms and conditions for copying, distribution and modification
+follow.
 
-0. This License applies to any program or other work which
-contains a notice placed by the copyright holder saying it
-may be distributed under the terms of this General Public
-License. The "Program", below, refers to any such program or
-work, and a "work based on the Program" means either the
-Program or any derivative work under copyright law: that is
-to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into
-another language. (Hereinafter, translation is included
-without limitation in the term "modification".) Each
-licensee is addressed as "you".
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
-Activities other than copying, distribution and modification
-are not covered by this License; they are outside its scope.
-The act of running the Program is not restricted, and the
-output from the Program is covered only if its contents
-constitute a work based on the Program (independent of
-having been made by running the Program). Whether that is
-true depends on what the Program does.
+0. This License applies to any program or other work which contains a notice
+placed by the copyright holder saying it may be distributed under the terms of
+this General Public License.  The "Program", below, refers to any such program
+or work, and a "work based on the Program" means either the Program or any
+derivative work under copyright law: that is to say, a work containing the
+Program or a portion of it, either verbatim or with modifications and/or
+translated into another language.  (Hereinafter, translation is included
+without limitation in the term "modification".) Each licensee is addressed as
+"you".
 
-1. You may copy and distribute verbatim copies of the
-Program's source code as you receive it, in any medium,
-provided that you conspicuously and appropriately publish on
-each copy an appropriate copyright notice and disclaimer of
-warranty; keep intact all the notices that refer to this
-License and to the absence of any warranty; and give any
-other recipients of the Program a copy of this License along
-with the Program.
+Activities other than copying, distribution and modification are not covered by
+this License; they are outside its scope.  The act of running the Program is
+not restricted, and the output from the Program is covered only if its contents
+constitute a work based on the Program (independent of having been made by
+running the Program).  Whether that is true depends on what the Program does.
 
-You may charge a fee for the physical act of transferring a
-copy, and you may at your option offer warranty protection
-in exchange for a fee.
+1. You may copy and distribute verbatim copies of the Program's source code as
+you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this License
+and to the absence of any warranty; and give any other recipients of the
+Program a copy of this License along with the Program.
 
-2. You may modify your copy or copies of the Program or any
-portion of it, thus forming a work based on the Program, and
-copy and distribute such modifications or work under the
-terms of Section 1 above, provided that you also meet all of
+You may charge a fee for the physical act of transferring a copy, and you may
+at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus
+forming a work based on the Program, and copy and distribute such modifications
+or work under the terms of Section 1 above, provided that you also meet all of
 these conditions:
 
-    a) You must cause the modified files to carry prominent
-    notices stating that you changed the files and the date
-    of any change.
+    a) You must cause the modified files to carry prominent notices stating
+    that you changed the files and the date of any change.
 
-    b) You must cause any work that you distribute or
-    publish, that in whole or in part contains or is derived
-    from the Program or any part thereof, to be licensed as
-    a whole at no charge to all third parties under the
-    terms of this License.
+    b) You must cause any work that you distribute or publish, that in whole or
+    in part contains or is derived from the Program or any part thereof, to be
+    licensed as a whole at no charge to all third parties under the terms of
+    this License.
 
-    c) If the modified program normally reads commands
-    interactively when run, you must cause it, when started
-    running for such interactive use in the most ordinary
-    way, to print or display an announcement including an
-    appropriate copyright notice and a notice that there is
-    no warranty (or else, saying that you provide a
-    warranty) and that users may redistribute the program
-    under these conditions, and telling the user how to view
-    a copy of this License. (Exception: if the Program
-    itself is interactive but does not normally print such
-    an announcement, your work based on the Program is not
-    required to print an announcement.)
+    c) If the modified program normally reads commands interactively when run,
+    you must cause it, when started running for such interactive use in the
+    most ordinary way, to print or display an announcement including an
+    appropriate copyright notice and a notice that there is no warranty (or
+    else, saying that you provide a warranty) and that users may redistribute
+    the program under these conditions, and telling the user how to view a copy
+    of this License.  (Exception: if the Program itself is interactive but does
+    not normally print such an announcement, your work based on the Program is
+    not required to print an announcement.)
 
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the
-Program, and can be reasonably considered independent and
-separate works in themselves, then this License, and its
-terms, do not apply to those sections when you distribute
-them as separate works. But when you distribute the same
-sections as part of a whole which is a work based on the
-Program, the distribution of the whole must be on the terms
-of this License, whose permissions for other licensees
-extend to the entire whole, and thus to each and every part
-regardless of who wrote it.
+These requirements apply to the modified work as a whole.  If identifiable
+sections of that work are not derived from the Program, and can be reasonably
+considered independent and separate works in themselves, then this License, and
+its terms, do not apply to those sections when you distribute them as separate
+works.  But when you distribute the same sections as part of a whole which is a
+work based on the Program, the distribution of the whole must be on the terms
+of this License, whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote it.
 
-Thus, it is not the intent of this section to claim rights
-or contest your rights to work written entirely by you;
-rather, the intent is to exercise the right to control the
-distribution of derivative or collective works based on the
-Program.
+Thus, it is not the intent of this section to claim rights or contest your
+rights to work written entirely by you; rather, the intent is to exercise the
+right to control the distribution of derivative or collective works based on
+the Program.
 
-In addition, mere aggregation of another work not based on
-the Program with the Program (or with a work based on the
-Program) on a volume of a storage or distribution medium
-does not bring the other work under the scope of this
+In addition, mere aggregation of another work not based on the Program with the
+Program (or with a work based on the Program) on a volume of a storage or
+distribution medium does not bring the other work under the scope of this
 License.
 
-3. You may copy and distribute the Program (or a work based
-on it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you
-also do one of the following:
+3. You may copy and distribute the Program (or a work based on it, under
+Section 2) in object code or executable form under the terms of Sections 1 and
+2 above provided that you also do one of the following:
 
-    a) Accompany it with the complete corresponding
-    machine-readable source code, which must be distributed
-    under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
+    a) Accompany it with the complete corresponding machine-readable source
+    code, which must be distributed under the terms of Sections 1 and 2 above
+    on a medium customarily used for software interchange; or,
 
-    b) Accompany it with a written offer, valid for at least
-    three years, to give any third party, for a charge no
-    more than your cost of physically performing source
-    distribution, a complete machine-readable copy of the
-    corresponding source code, to be distributed under the
-    terms of Sections 1 and 2 above on a medium customarily
-    used for software interchange; or,
+    b) Accompany it with a written offer, valid for at least three years, to
+    give any third party, for a charge no more than your cost of physically
+    performing source distribution, a complete machine-readable copy of the
+    corresponding source code, to be distributed under the terms of Sections 1
+    and 2 above on a medium customarily used for software interchange; or,
 
-    c) Accompany it with the information you received as to
-    the offer to distribute corresponding source code. (This
-    alternative is allowed only for noncommercial
-    distribution and only if you received the program in
-    object code or executable form with such an offer, in
-    accord with Subsection b above.)
+    c) Accompany it with the information you received as to the offer to
+    distribute corresponding source code.  (This alternative is allowed only
+    for noncommercial distribution and only if you received the program in
+    object code or executable form with such an offer, in accord with
+    Subsection b above.)
 
-The source code for a work means the preferred form of the
-work for making modifications to it. For an executable work,
-complete source code means all the source code for all
-modules it contains, plus any associated interface
-definition files, plus the scripts used to control
-compilation and installation of the executable. However, as
-a special exception, the source code distributed need not
-include anything that is normally distributed (in either
-source or binary form) with the major components (compiler,
-kernel, and so on) of the operating system on which the
-executable runs, unless that component itself accompanies
-the executable.
+The source code for a work means the preferred form of the work for making
+modifications to it.  For an executable work, complete source code means all
+the source code for all modules it contains, plus any associated interface
+definition files, plus the scripts used to control compilation and installation
+of the executable.  However, as a special exception, the source code
+distributed need not include anything that is normally distributed (in either
+source or binary form) with the major components (compiler, kernel, and so on)
+of the operating system on which the executable runs, unless that component
+itself accompanies the executable.
 
-If distribution of executable or object code is made by
-offering access to copy from a designated place, then
-offering equivalent access to copy the source code from the
-same place counts as distribution of the source code, even
-though third parties are not compelled to copy the source
-along with the object code.
+If distribution of executable or object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the source
+code from the same place counts as distribution of the source code, even though
+third parties are not compelled to copy the source along with the object code.
 
-4. You may not copy, modify, sublicense, or distribute the
-Program except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense or distribute
-the Program is void, and will automatically terminate your
-rights under this License. However, parties who have
-received copies, or rights, from you under this License will
-not have their licenses terminated so long as such parties
-remain in full compliance.
+4. You may not copy, modify, sublicense, or distribute the Program except as
+expressly provided under this License.  Any attempt otherwise to copy, modify,
+sublicense or distribute the Program is void, and will automatically terminate
+your rights under this License.  However, parties who have received copies, or
+rights, from you under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
 
-5. You are not required to accept this License, since you
-have not signed it. However, nothing else grants you
-permission to modify or distribute the Program or its
-derivative works. These actions are prohibited by law if you
-do not accept this License. Therefore, by modifying or
-distributing the Program (or any work based on the Program),
-you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or
-modifying the Program or works based on it.
+5. You are not required to accept this License, since you have not signed it.
+However, nothing else grants you permission to modify or distribute the Program
+or its derivative works.  These actions are prohibited by law if you do not
+accept this License.  Therefore, by modifying or distributing the Program (or
+any work based on the Program), you indicate your acceptance of this License to
+do so, and all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
 
-6. Each time you redistribute the Program (or any work based
-on the Program), the recipient automatically receives a
-license from the original licensor to copy, distribute or
-modify the Program subject to these terms and conditions.
-You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are
-not responsible for enforcing compliance by third parties to
-this License.
+6. Each time you redistribute the Program (or any work based on the Program),
+the recipient automatically receives a license from the original licensor to
+copy, distribute or modify the Program subject to these terms and conditions.
+You may not impose any further restrictions on the recipients' exercise of the
+rights granted herein.  You are not responsible for enforcing compliance by
+third parties to this License.
 
-7. If, as a consequence of a court judgment or allegation of
-patent infringement or for any other reason (not limited to
-patent issues), conditions are imposed on you (whether by
-court order, agreement or otherwise) that contradict the
-conditions of this License, they do not excuse you from the
-conditions of this License. If you cannot distribute so as
-to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a
-consequence you may not distribute the Program at all. For
-example, if a patent license would not permit royalty-free
-redistribution of the Program by all those who receive
-copies directly or indirectly through you, then the only way
-you could satisfy both it and this License would be to
+7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues), conditions
+are imposed on you (whether by court order, agreement or otherwise) that
+contradict the conditions of this License, they do not excuse you from the
+conditions of this License.  If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other pertinent
+obligations, then as a consequence you may not distribute the Program at all.
+For example, if a patent license would not permit royalty-free redistribution
+of the Program by all those who receive copies directly or indirectly through
+you, then the only way you could satisfy both it and this License would be to
 refrain entirely from distribution of the Program.
 
-If any portion of this section is held invalid or
-unenforceable under any particular circumstance, the balance
-of the section is intended to apply and the section as a
-whole is intended to apply in other circumstances.
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply and
+the section as a whole is intended to apply in other circumstances.
 
-It is not the purpose of this section to induce you to
-infringe any patents or other property right claims or to
-contest validity of any such claims; this section has the
-sole purpose of protecting the integrity of the free
-software distribution system, which is implemented by public
-license practices. Many people have made generous
-contributions to the wide range of software distributed
-through that system in reliance on consistent application of
-that system; it is up to the author/donor to decide if he or
-she is willing to distribute software through any other
-system and a licensee cannot impose that choice.
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this
+section has the sole purpose of protecting the integrity of the free software
+distribution system, which is implemented by public license practices.  Many
+people have made generous contributions to the wide range of software
+distributed through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing to
+distribute software through any other system and a licensee cannot impose that
+choice.
 
-This section is intended to make thoroughly clear what is
-believed to be a consequence of the rest of this License.
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
 
-8. If the distribution and/or use of the Program is
-restricted in certain countries either by patents or by
-copyrighted interfaces, the original copyright holder who
-places the Program under this License may add an explicit
-geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or
-among countries not thus excluded. In such case, this
-License incorporates the limitation as if written in the
-body of this License.
+8. If the distribution and/or use of the Program is restricted in certain
+countries either by patents or by copyrighted interfaces, the original
+copyright holder who places the Program under this License may add an explicit
+geographical distribution limitation excluding those countries, so that
+distribution is permitted only in or among countries not thus excluded.  In
+such case, this License incorporates the limitation as if written in the body
+of this License.
 
-9. The Free Software Foundation may publish revised and/or
-new versions of the General Public License from time to
-time. Such new versions will be similar in spirit to the
-present version, but may differ in detail to address new
-problems or concerns.
+9. The Free Software Foundation may publish revised and/or new versions of the
+General Public License from time to time.  Such new versions will be similar in
+spirit to the present version, but may differ in detail to address new problems
+or concerns.
 
-Each version is given a distinguishing version number. If
-the Program specifies a version number of this License which
-applies to it and "any later version", you have the option
-of following the terms and conditions either of that version
-or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number
-of this License, you may choose any version ever published
-by the Free Software Foundation.
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any later
+version", you have the option of following the terms and conditions either of
+that version or of any later version published by the Free Software Foundation.
+If the Program does not specify a version number of this License, you may
+choose any version ever published by the Free Software Foundation.
 
-10. If you wish to incorporate parts of the Program into
-other free programs whose distribution conditions are
-different, write to the author to ask for permission. For
-software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we
-sometimes make exceptions for this. Our decision will be
-guided by the two goals of preserving the free status of all
-derivatives of our free software and of promoting the
-sharing and reuse of software generally.
+10. If you wish to incorporate parts of the Program into other free programs
+whose distribution conditions are different, write to the author to ask for
+permission.  For software which is copyrighted by the Free Software Foundation,
+write to the Free Software Foundation; we sometimes make exceptions for this.
+Our decision will be guided by the two goals of preserving the free status of
+all derivatives of our free software and of promoting the sharing and reuse of
+software generally.
 
 NO WARRANTY
 
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS
-NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
-COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
-"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
-OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
-DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE,
+YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED
-TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY
-WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED
-ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
-SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
-THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT
-LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
-LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
-PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
-HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
+PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
+BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
+OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 
-              END OF TERMS AND CONDITIONS
+END OF TERMS AND CONDITIONS
 
-       How to Apply These Terms to Your New Programs
+How to Apply These Terms to Your New Programs
 
-If you develop a new program, and you want it to be of the
-greatest possible use to the public, the best way to achieve
-this is to make it free software which everyone can
-redistribute and change under these terms.
+If you develop a new program, and you want it to be of the greatest possible
+use to the public, the best way to achieve this is to make it free software
+which everyone can redistribute and change under these terms.
 
-To do so, attach the following notices to the program. It is
-safest to attach them to the start of each source file to
-most effectively convey the exclusion of warranty; and each
-file should have at least the "copyright" line and a pointer
-to where the full notice is found.
+To do so, attach the following notices to the program.  It is safest to attach
+them to the start of each source file to most effectively convey the exclusion
+of warranty; and each file should have at least the "copyright" line and a
+pointer to where the full notice is found.
 
-    One line to give the program's name and a brief idea of
-    what it does. Copyright (C) <year> <name of author>
+    One line to give the program's name and a brief idea of what it does.
 
-    This program is free software; you can redistribute it
-    and/or modify it under the terms of the GNU General
-    Public License as published by the Free Software
-    Foundation; either version 2 of the License, or (at your
-    option) any later version.
+    Copyright (C) <year> <name of author>
 
-    This program is distributed in the hope that it will be
-    useful, but WITHOUT ANY WARRANTY; without even the
-    implied warranty of MERCHANTABILITY or FITNESS FOR A
-    PARTICULAR PURPOSE. See the GNU General Public License
-    for more details.
+    This program is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the Free
+    Software Foundation; either version 2 of the License, or (at your option)
+    any later version.
 
-    You should have received a copy of the GNU General
-    Public License along with this program; if not, write to
-    the Free Software Foundation, Inc., 59 Temple Place,
-    Suite 330, Boston, MA 02111-1307 USA
+    This program is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+    more details.
 
-Also add information on how to contact you by electronic and
-paper mail.
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-If the program is interactive, make it output a short notice
-like this when it starts in an interactive mode:
+Also add information on how to contact you by electronic and paper mail.
 
-    Gnomovision version 69, Copyright (C) year name of
-    author Gnomovision comes with ABSOLUTELY NO WARRANTY;
-    for details type `show w'. This is free software, and
-    you are welcome to redistribute it under certain
-    conditions; type `show c' for details.
+If the program is interactive, make it output a short notice like this when it
+starts in an interactive mode:
 
-The hypothetical commands `show w' and `show c' should show
-the appropriate parts of the General Public License. Of
-course, the commands you use may be called something other
-than `show w' and `show c'; they could even be mouse-clicks
-or menu items--whatever suits your program.
+    Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
+    with ABSOLUTELY NO WARRANTY; for details type 'show w'.  This is free
+    software, and you are welcome to redistribute it under certain conditions;
+    type 'show c' for details.
 
-You should also get your employer (if you work as a
-programmer) or your school, if any, to sign a "copyright
-disclaimer" for the program, if necessary. Here is a sample;
-alter the names:
+The hypothetical commands 'show w' and 'show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may be
+called something other than 'show w' and 'show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
 
-  Yoyodyne, Inc., hereby disclaims all copyright interest in
-  the program `Gnomovision' (which makes passes at
-  compilers) written by James Hacker.
+You should also get your employer (if you work as a programmer) or your school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.  Here
+is a sample; alter the names:
 
-  signature of Ty Coon, 1 April 1989
-  Ty Coon, President of Vice
+    Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+    'Gnomovision' (which makes passes at compilers) written by James Hacker.
 
-This General Public License does not permit incorporating
-your program into proprietary programs. If your program is a
-subroutine library, you may consider it more useful to
-permit linking proprietary applications with the library. If
-this is what you want to do, use the GNU Library General
-Public License instead of this License.
+    signature of Ty Coon, 1 April 1989
+
+    Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General Public
+License instead of this License.
 
 
-"CLASSPATH" EXCEPTION TO THE GPL VERSION 2
+"CLASSPATH" EXCEPTION TO THE GPL
 
+Certain source files distributed by Oracle America and/or its affiliates are
+subject to the following clarification and special exception to the GPL, but
+only where Oracle has expressly included in the particular source file's header
+the words "Oracle designates this particular file as subject to the "Classpath"
+exception as provided by Oracle in the LICENSE file that accompanied this code."
 
-Certain source files distributed by Sun Microsystems, Inc.
-are subject to the following clarification and special
-exception to the GPL, but only where Sun has expressly
-included in the particular source file's header the words
-"Sun designates this particular file as subject to the
-"Classpath" exception as provided by Sun in the LICENSE file
-that accompanied this code."
+    Linking this library statically or dynamically with other modules is making
+    a combined work based on this library.  Thus, the terms and conditions of
+    the GNU General Public License cover the whole combination.
 
-Linking this library statically or dynamically with other
-modules is making a combined work based on this library.
-Thus, the terms and conditions of the GNU General Public
-License cover the whole combination.
-
-As a special exception, the copyright holders of this
-library give you permission to link this library with
-independent modules to produce an executable, regardless of
-the license terms of these independent modules, and to copy
-and distribute the resulting executable under terms of your
-choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license
-of that module. An independent module is a module which is
-not derived from or based on this library. If you modify
-this library, you may extend this exception to your version
-of the library, but you are not obligated to do so. If you
-do not wish to do so, delete this exception statement from
-your version.
+    As a special exception, the copyright holders of this library give you
+    permission to link this library with independent modules to produce an
+    executable, regardless of the license terms of these independent modules,
+    and to copy and distribute the resulting executable under terms of your
+    choice, provided that you also meet, for each linked independent module,
+    the terms and conditions of the license of that module.  An independent
+    module is a module which is not derived from or based on this library.  If
+    you modify this library, you may extend this exception to your version of
+    the library, but you are not obligated to do so.  If you do not wish to do
+    so, delete this exception statement from your version.
diff --git a/contrib/libs.svnClientAdapter.svnkit/external/com.trilead.ssh2_1.0.0.build220_r167_v20150618_1733-license.txt b/contrib/libs.svnClientAdapter.svnkit/external/com.trilead.ssh2_1.0.0.build220_r167_v20150618_1733-license.txt
index e7d0f90..9a977f6 100644
--- a/contrib/libs.svnClientAdapter.svnkit/external/com.trilead.ssh2_1.0.0.build220_r167_v20150618_1733-license.txt
+++ b/contrib/libs.svnClientAdapter.svnkit/external/com.trilead.ssh2_1.0.0.build220_r167_v20150618_1733-license.txt
@@ -91,4 +91,4 @@
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. 
+THE SOFTWARE.
diff --git a/contrib/libs.svnClientAdapter.svnkit/external/org.tmatesoft.svnkit_1.8.12.r10533_v20160129_0158-license.txt b/contrib/libs.svnClientAdapter.svnkit/external/org.tmatesoft.svnkit_1.8.12.r10533_v20160129_0158-license.txt
index 7ee5ea8..140e2b4 100644
--- a/contrib/libs.svnClientAdapter.svnkit/external/org.tmatesoft.svnkit_1.8.12.r10533_v20160129_0158-license.txt
+++ b/contrib/libs.svnClientAdapter.svnkit/external/org.tmatesoft.svnkit_1.8.12.r10533_v20160129_0158-license.txt
@@ -7,7 +7,7 @@
 
 The TMate License
 
-This license applies to all portions of TMate SVNKit library, which 
+This license applies to all portions of TMate SVNKit library, which
 are not externally-maintained libraries (e.g. Trilead SSH library).
 
 All the source code and compiled classes in package org.tigris.subversion.javahl
@@ -15,40 +15,40 @@
 
 Copyright (c) 2004-2013 TMate Software. All rights reserved.
 
-Redistribution and use in source and binary forms, with or without modification, 
+Redistribution and use in source and binary forms, with or without modification,
 are permitted provided that the following conditions are met:
 
-    * Redistributions of source code must retain the above copyright notice, 
+    * Redistributions of source code must retain the above copyright notice,
       this list of conditions and the following disclaimer.
-      
-    * Redistributions in binary form must reproduce the above copyright notice, 
-      this list of conditions and the following disclaimer in the documentation 
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
       and/or other materials provided with the distribution.
-      
-    * Redistributions in any form must be accompanied by information on how to 
-      obtain complete source code for the software that uses SVNKit and any 
-      accompanying software that uses the software that uses SVNKit. The source 
-      code must either be included in the distribution or be available for no 
-      more than the cost of distribution plus a nominal fee, and must be freely 
-      redistributable under reasonable conditions. For an executable file, complete 
-      source code means the source code for all modules it contains. It does not 
-      include source code for modules or files that typically accompany the major 
+
+    * Redistributions in any form must be accompanied by information on how to
+      obtain complete source code for the software that uses SVNKit and any
+      accompanying software that uses the software that uses SVNKit. The source
+      code must either be included in the distribution or be available for no
+      more than the cost of distribution plus a nominal fee, and must be freely
+      redistributable under reasonable conditions. For an executable file, complete
+      source code means the source code for all modules it contains. It does not
+      include source code for modules or files that typically accompany the major
       components of the operating system on which the executable file runs.
-      
-    * Redistribution in any form without redistributing source code for software 
-      that uses SVNKit is possible only when such redistribution is explictly permitted 
-      by TMate Software. Please, contact TMate Software at support@svnkit.com to 
+
+    * Redistribution in any form without redistributing source code for software
+      that uses SVNKit is possible only when such redistribution is explictly permitted
+      by TMate Software. Please, contact TMate Software at support@svnkit.com to
       get such permission.
 
 THIS SOFTWARE IS PROVIDED BY TMATE SOFTWARE ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE 
-DISCLAIMED. 
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE
+DISCLAIMED.
 
-IN NO EVENT SHALL TMATE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
+IN NO EVENT SHALL TMATE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/contrib/libs.svnClientAdapter.svnkit/external/sqljet-1.1.10-license.txt b/contrib/libs.svnClientAdapter.svnkit/external/sqljet-1.1.10-license.txt
index 9bb5e39..513b12f 100644
--- a/contrib/libs.svnClientAdapter.svnkit/external/sqljet-1.1.10-license.txt
+++ b/contrib/libs.svnClientAdapter.svnkit/external/sqljet-1.1.10-license.txt
@@ -9,12 +9,12 @@
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; version 2 of the License.
- 
+
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
- 
-For information on how to redistribute this software under 
-the terms of a license other than GNU General Public License 
-contact TMate Software at support@sqljet.com
\ No newline at end of file
+
+For information on how to redistribute this software under
+the terms of a license other than GNU General Public License
+contact TMate Software at support@sqljet.com
diff --git a/contrib/websvc.wsitmodelext/external/glassfish-license.txt b/contrib/websvc.wsitmodelext/external/websvc.wsitmodelext-glassfish-resources-license.txt
similarity index 99%
rename from contrib/websvc.wsitmodelext/external/glassfish-license.txt
rename to contrib/websvc.wsitmodelext/external/websvc.wsitmodelext-glassfish-resources-license.txt
index 833a843..f135dc5 100644
--- a/contrib/websvc.wsitmodelext/external/glassfish-license.txt
+++ b/contrib/websvc.wsitmodelext/external/websvc.wsitmodelext-glassfish-resources-license.txt
@@ -1,3 +1,9 @@
+Name: ?
+Version: ?
+Description: ?
+License: CDDL-1.1-GPL-2-CP
+Origin: ?
+
 COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)Version 1.1
 
 1. Definitions.
diff --git a/contrib/websvc.wsitmodelext/external/oasis-license.txt b/contrib/websvc.wsitmodelext/external/websvc.wsitmodelext-oasis-resources-license.txt
similarity index 95%
rename from contrib/websvc.wsitmodelext/external/oasis-license.txt
rename to contrib/websvc.wsitmodelext/external/websvc.wsitmodelext-oasis-resources-license.txt
index e89cfc8..94fa4fa 100644
--- a/contrib/websvc.wsitmodelext/external/oasis-license.txt
+++ b/contrib/websvc.wsitmodelext/external/websvc.wsitmodelext-oasis-resources-license.txt
@@ -1,3 +1,9 @@
+Name: ?
+Version: ?
+Description: ?
+License: BSD-OASIS
+Origin: ?
+
 Copyright (c) [YYYY], OASIS Open Repositories
 All rights reserved.
 
diff --git a/contrib/websvc.wsitmodelext/external/w3c_plus-license.txt b/contrib/websvc.wsitmodelext/external/websvc.wsitmodelext-w3c-resources-license.txt
similarity index 97%
rename from contrib/websvc.wsitmodelext/external/w3c_plus-license.txt
rename to contrib/websvc.wsitmodelext/external/websvc.wsitmodelext-w3c-resources-license.txt
index f03995a..dd668fc 100644
--- a/contrib/websvc.wsitmodelext/external/w3c_plus-license.txt
+++ b/contrib/websvc.wsitmodelext/external/websvc.wsitmodelext-w3c-resources-license.txt
@@ -1,3 +1,9 @@
+Name: ?
+Version: ?
+Description: ?
+License: W3C-?
+Origin: ?
+
 License
 By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
 Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties
index 95652be..d99b73f 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties
@@ -160,6 +160,7 @@
 STR_510_SERVER_NAME=GlassFish Server 5.1.0
 STR_6_SERVER_NAME=GlassFish Server 6
 STR_610_SERVER_NAME=GlassFish Server 6.1
+STR_621_SERVER_NAME=GlassFish Server 6.2.1
 
 # CommonServerSupport.java
 MSG_FLAKEY_NETWORK=<html>Network communication problem<br/>Could not establish \
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java
index d8199f0..93000f8 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java
@@ -224,6 +224,17 @@
         "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/6.1.0/glassfish-6.1.0.zip", // NOI18N
         "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/6.1.0/glassfish-6.1.0.zip", // NOI18N
         "http://www.eclipse.org/legal/epl-2.0" //NOI18N
+    ),
+
+    /**
+     * details for an instance of GlassFish Server 6.2.1
+     */
+    GLASSFISH_SERVER_6_2_1(NbBundle.getMessage(ServerDetails.class, "STR_621_SERVER_NAME", new Object[]{}), // NOI18N
+        "deployer:gfv610ee9", // NOI18N
+        621,
+        "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/6.2.1/glassfish-6.2.1.zip", // NOI18N
+        "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/6.2.1/glassfish-6.2.1.zip", // NOI18N
+        "http://www.eclipse.org/legal/epl-2.0" //NOI18N
     );
 
     /**
@@ -235,6 +246,7 @@
     public static WizardDescriptor.InstantiatingIterator
             getInstantiatingIterator() {
         return new ServerWizardIterator(new ServerDetails[]{
+                    GLASSFISH_SERVER_6_2_1,
                     GLASSFISH_SERVER_6_1_0,
                     GLASSFISH_SERVER_6,
                     GLASSFISH_SERVER_5_1_0,
@@ -252,6 +264,7 @@
                     GLASSFISH_SERVER_3_0_1,
                     GLASSFISH_SERVER_3},
                 new ServerDetails[]{
+                    GLASSFISH_SERVER_6_2_1,
                     GLASSFISH_SERVER_6_1_0,
                     GLASSFISH_SERVER_6,
                     GLASSFISH_SERVER_5_1_0,
@@ -298,6 +311,7 @@
                 case GF_5_1_0:   return GLASSFISH_SERVER_5_1_0.getVersion();
                 case GF_6:       return GLASSFISH_SERVER_6.getVersion();
                 case GF_6_1_0:   return GLASSFISH_SERVER_6_1_0.getVersion();
+                case GF_6_2_1:   return GLASSFISH_SERVER_6_2_1.getVersion();
                 default:         return -1;
             }
         }
diff --git a/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/spi/UtilsTest.java b/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/spi/UtilsTest.java
index 2f3c848..92efa60 100644
--- a/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/spi/UtilsTest.java
+++ b/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/spi/UtilsTest.java
@@ -60,6 +60,7 @@
         // Create dummy file to test version matcher - Apache policy makes it
         // difficult to have "jar" files in the repository, even if they are
         // just files, containing a newline ...
+        Files.createDirectories(dataDir.toPath().resolve("subdir"));
         Files.write(dataDir.toPath().resolve("nottaDir-4_1_2.jar"), new byte[] {'\n'}, CREATE, WRITE);
         Files.write(dataDir.toPath().resolve("subdir/nottaDir-5.0.jar"), new byte[] {'\n'}, CREATE, WRITE);
     }
diff --git a/enterprise/glassfish.tooling/nbproject/project.properties b/enterprise/glassfish.tooling/nbproject/project.properties
index ab06b41..0f4ec98 100644
--- a/enterprise/glassfish.tooling/nbproject/project.properties
+++ b/enterprise/glassfish.tooling/nbproject/project.properties
@@ -14,5 +14,5 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-javac.source=1.7
+javac.source=1.8
 javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java
index dd28724..2242ad4 100644
--- a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java
+++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java
@@ -18,12 +18,13 @@
  */
 package org.netbeans.modules.glassfish.tooling.data;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import org.netbeans.api.annotations.common.CheckForNull;
 import org.netbeans.api.annotations.common.NonNull;
-import org.netbeans.modules.glassfish.tooling.logging.Logger;
 import org.netbeans.modules.glassfish.tooling.utils.EnumUtils;
 import org.openide.util.Parameters;
 
@@ -83,7 +84,9 @@
     /** GlassFish 6. */
     GF_6       ((short) 6, (short) 0, (short) 0, (short) 0, GlassFishVersion.GF_6_STR),
     /** GlassFish 6.1.0 */
-    GF_6_1_0       ((short) 6, (short) 1, (short) 0, (short) 0, GlassFishVersion.GF_6_1_0_STR);
+    GF_6_1_0       ((short) 6, (short) 1, (short) 0, (short) 0, GlassFishVersion.GF_6_1_0_STR),
+    /** GlassFish 6.2.1 */
+    GF_6_2_1       ((short) 6, (short) 2, (short) 1, (short) 0, GlassFishVersion.GF_6_2_1_STR);
     ////////////////////////////////////////////////////////////////////////////
     // Class attributes                                                       //
     ////////////////////////////////////////////////////////////////////////////
@@ -201,6 +204,10 @@
     static final String GF_6_1_0_STR = "6.1.0";
     /** Additional <code>String</code> representations of GF_6_1_0 value. */
     static final String GF_6_1_0_STR_NEXT[] = {"6.1", "6.1.0"};
+    /** A <code>String</code> representation of GF_6_1_0 value. */
+    static final String GF_6_2_1_STR = "6.2.1";
+    /** Additional <code>String</code> representations of GF_6_2_1 value. */
+    static final String GF_6_2_1_STR_NEXT[] = {"6.2.1"};
 
     /**
      * Stored <code>String</code> values for backward <code>String</code>
@@ -232,6 +239,7 @@
         initStringValuesMapFromArray(GF_5_1_0, GF_5_1_0_STR_NEXT);
         initStringValuesMapFromArray(GF_6, GF_6_STR_NEXT);
         initStringValuesMapFromArray(GF_6_1_0, GF_6_1_0_STR_NEXT);
+        initStringValuesMapFromArray(GF_6_2_1, GF_6_2_1_STR_NEXT);
     }
 
     ////////////////////////////////////////////////////////////////////////////
@@ -272,50 +280,56 @@
         GlassFishVersion version
                 = stringValuesMap.get(versionStr.toUpperCase(Locale.ENGLISH));
         if (version == null) {
-            String[] versionNumbers = versionStr.split("\\"+SEPARATOR);
-            for (int i = versionNumbers.length - 1;
-                    version == null && i > 0; i--) {
-                int versionStrLen = i - 1;
-                for (int j = 0; j < i; j++) {
-                    versionStrLen += versionNumbers[j].length();
+            List<Integer> versionNumbers = new ArrayList<>(4);
+
+            String[] versionParts = versionStr.split("[^0-9.]", 2);
+            String[] versionNumberStrings = versionParts[0].split("\\.");
+            for (int i = 0; i < Math.min(4, versionNumberStrings.length); i++) {
+                try {
+                    int value = Integer.parseInt(versionNumberStrings[i]);
+                    versionNumbers.add(value);
+                } catch (NumberFormatException ex) {
+                    break;
                 }
-                StringBuilder sb = new StringBuilder(versionStrLen);
-                for (int j = 0; j < i; j++) {
-                    if (j > 0) {
-                        sb.append(SEPARATOR);
-                    }
-                    try {
-                        Integer.parseInt(versionNumbers[j]);
-                        sb.append(versionNumbers[j]);
-                    } catch (NumberFormatException ex) {
-                        break;
-                    }
-                }
-                version = stringValuesMap.get(sb.toString().toUpperCase(Locale.ENGLISH));
             }
-            if (version == null) {
-                // fallback attempt
-                int dot = versionStr.indexOf('.');
-                if (dot > 0) {
-                    try {
-                        int major = Integer.parseInt(versionStr.substring(0, dot));
-                        // this needs enum to be properly ordered latest versions last
-                        for (GlassFishVersion v : values()) {
-                            if (v.major <= major) {
-                                version = v;
-                            } else if (v.major > major) {
-                                break;
-                            }
-                        }
-                    } catch (NumberFormatException ex) {
-                        // noop
-                    }
+
+            for (int i = versionNumbers.size(); i < 4; i++ ) {
+                versionNumbers.add(0);
+            }
+
+            GlassFishVersion candidates[] = values();
+            for(int i = candidates.length - 1; i >= 0; i--) {
+                if(gfvSmallerOrEqual(candidates[i], versionNumbers)) {
+                    version = candidates[i];
+                    break;
                 }
             }
         }
         return version;
     }
 
+    private static boolean gfvSmallerOrEqual(GlassFishVersion gfv, List<Integer> versionNumbers) {
+        if (gfv.getMajor() < versionNumbers.get(0)) {
+            return true;
+        } else if (gfv.getMajor() == versionNumbers.get(0)) {
+            if (gfv.getMinor() < versionNumbers.get(1)) {
+                return true;
+            } else if (gfv.getMinor() == versionNumbers.get(1)) {
+                if(gfv.getUpdate() < versionNumbers.get(2)) {
+                    return true;
+                } else if (gfv.getUpdate() == versionNumbers.get(2)) {
+                    return gfv.getBuild() <= versionNumbers.get(3);
+                } else {
+                    return false;
+                }
+            } else {
+                return false;
+            }
+        } else {
+            return false;
+        }
+    }
+
     ////////////////////////////////////////////////////////////////////////////
     // Instance attributes                                                    //
     ////////////////////////////////////////////////////////////////////////////
diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java
index 8d9a845..7bfbe78 100644
--- a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java
+++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java
@@ -82,11 +82,18 @@
     /** Library builder configuration since GlassFish 6.1.0. */
     private static final Config.Next CONFIG_V6_1_0
             = new Config.Next(GlassFishVersion.GF_6_1_0,
-            ConfigBuilderProvider.class.getResource("GlassFishV6_1_0.xml"));
+                    ConfigBuilderProvider.class.getResource("GlassFishV6_1_0.xml"));
+
+    /** Library builder configuration since GlassFish 6.2.1. */
+    private static final Config.Next CONFIG_V6_2_1
+            = new Config.Next(GlassFishVersion.GF_6_2_1,
+                    ConfigBuilderProvider.class.getResource("GlassFishV6_2_1.xml"));
 
     /** Library builder configuration for GlassFish cloud. */
     private static final Config config
-            = new Config(CONFIG_V3, CONFIG_V4, CONFIG_V4_1, CONFIG_V5, CONFIG_V5_0_1, CONFIG_V5_1, CONFIG_V6, CONFIG_V6_1_0);
+            = new Config(CONFIG_V3, CONFIG_V4, CONFIG_V4_1, CONFIG_V5, 
+                         CONFIG_V5_0_1, CONFIG_V5_1, CONFIG_V6, CONFIG_V6_1_0,
+                         CONFIG_V6_2_1);
 
     /** Builders array for each server instance. */
     private static final Map<GlassFishServer, ConfigBuilder> builders
diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/GlassFishV6_2_1.xml b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/GlassFishV6_2_1.xml
new file mode 100644
index 0000000..7be14e0
--- /dev/null
+++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/GlassFishV6_2_1.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<server>
+    <tools lib="lib">
+        <asadmin jar="client/appserver-cli.jar"/>
+    </tools>
+    <java version="11">
+        <platform version="11"/>
+        <platform version="17"/>
+    </java>
+    <javaee version="1.8">
+        <profile version="1.3" type="full"/>
+        <profile version="1.4" type="full"/>
+        <profile version="1.5" type="full"/>
+        <profile version="1.6" type="web"/>
+        <profile version="1.6" type="full" check="full"/>
+        <profile version="1.7" type="web"/>
+        <profile version="1.7" type="full" check="full"/>
+        <profile version="1.8" type="web"/>
+        <profile version="1.8" type="full" check="full"/>
+        <profile version="8.0.0" type="web"/>
+        <profile version="8.0.0" type="full" check="full"/>
+        <profile version="9.0.0" type="web"/>
+        <profile version="9.0.0" type="full" check="full"/>
+        <module type="war"/>
+        <module type="car" check="full"/>
+        <module type="ear" check="full"/>
+        <module type="ejb" check="full"/>
+        <module type="rar" check="full"/>
+        <check name="full">
+            <file path="appclient-server-core.jar"/>
+        </check>
+    </javaee>
+    <library id="Java EE">
+        <classpath>
+            <fileset dir="modules">
+                <include name="jakarta\..+\.jar"/>
+                <include name="jakarta.validation-api-3.0.0.jar"/>
+                <include name="jakarta.enterprise.cdi-api-3.0.0.jar"/>
+                <include name="jaxb-osgi.jar"/>
+                <include name="jaxr-api-osgi.jar"/>
+                <include name="jaxrpc-api-osgi.jar"/>
+                <include name="webservices-osgi.jar"/>
+                <include name="weld-osgi-bundle.jar"/>
+            </fileset>
+            <fileset dir="modules/endorsed">
+                <include name=".+\.jar"/>
+            </fileset>
+            <fileset dir="../mq/lib">
+                <include name="jaxm-api.jar"/>
+            </fileset>
+        </classpath>
+        <javadocs>
+            <lookup path="docs/jakartaee9-doc-api.jar"/>
+        </javadocs>
+        <sources>
+        </sources>
+    </library>
+    <library id="Jersey 2">
+        <classpath>
+            <fileset dir="modules">
+                <include name="guava.+\.jar"/>
+                <include name="jackson.+\.jar"/>
+                <!-- include name="javax.ws.+\.jar"/ -->
+                <include name="jersey.+\.jar"/>
+                <include name="jettison.*\.jar"/>
+            </fileset>
+        </classpath>
+        <javadocs>
+            <link url="https://repo1.maven.org/maven2/org/glassfish/jersey/jersey-documentation/3.0.1/jersey-documentation-3.0.1-docbook.zip"/>
+        </javadocs>
+        <sources>
+        </sources>
+    </library>
+    <library id="JAX-RS">
+        <classpath>
+            <fileset dir="modules">
+                <include name="jakarta.ws.rs-api.jar"/>
+            </fileset>
+        </classpath>
+        <javadocs>
+        </javadocs>
+        <sources>
+        </sources>
+    </library>
+</server>
diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaSEPlatform.java b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaSEPlatform.java
index e562a84..e5fd23a 100644
--- a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaSEPlatform.java
+++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaSEPlatform.java
@@ -51,15 +51,17 @@
     /** JavaSE 11. */
     v11,
     /** JavaSE 16. */
-    v16;
-    
+    v16,
+    /** JavaSE 17. */
+    v17;
+
     ////////////////////////////////////////////////////////////////////////////
     // Class attributes                                                       //
     ////////////////////////////////////////////////////////////////////////////
 
     /** GlassFish JavaEE platform enumeration length. */
     public static final int length = JavaSEPlatform.values().length;
-    
+
     /** JavaEE platform version elements separator character. */
     public static final char SEPARATOR = '.';
 
@@ -91,10 +93,12 @@
     static final String V11_STR = "11";
 
     /**  A <code>String</code> representation of v16 value. */
-    static final String V16_STR = "16";    
-    
-    
-    /** 
+    static final String V16_STR = "16";
+
+    /**  A <code>String</code> representation of v17 value. */
+    static final String V17_STR = "17";
+
+    /**
      * Stored <code>String</code> values for backward <code>String</code>
      * conversion.
      */
@@ -153,9 +157,10 @@
             case v1_6:     return V1_6_STR;
             case v1_7:     return V1_7_STR;
             case v1_8:     return V1_8_STR;
-            case v11:     return V11_STR;            
-            case v16:     return V16_STR;                   
-                        
+            case v11:      return V11_STR;
+            case v16:      return V16_STR;
+            case v17:      return V17_STR;
+
             // This is unrecheable. Being here means this class does not handle
             // all possible values correctly.
             default:   throw new ServerConfigException(
diff --git a/enterprise/payara.common/src/org/netbeans/modules/payara/common/StartTask.java b/enterprise/payara.common/src/org/netbeans/modules/payara/common/StartTask.java
index a2f8e96..227dfa1 100644
--- a/enterprise/payara.common/src/org/netbeans/modules/payara/common/StartTask.java
+++ b/enterprise/payara.common/src/org/netbeans/modules/payara/common/StartTask.java
@@ -572,9 +572,10 @@
             return change.fireOperationStateChanged();
         }
         if (!PayaraState.isOnline(instance)) {
-              return fireOperationStateChanged(
-                      TaskState.FAILED, TaskEvent.CMD_FAILED,
-                      "StartTask.startDAS.startFailed", instanceName);
+            PayaraStatus.suspend(instance);
+            return fireOperationStateChanged(
+                    TaskState.FAILED, TaskEvent.CMD_FAILED,
+                    "StartTask.startDAS.startFailed", instanceName);
         } else {
             return startClusterOrInstance(adminHost, adminPort);
         }
diff --git a/extide/gradle/src/org/netbeans/modules/gradle/queries/Info.java b/extide/gradle/src/org/netbeans/modules/gradle/queries/Info.java
index 46e4e86..9789169 100644
--- a/extide/gradle/src/org/netbeans/modules/gradle/queries/Info.java
+++ b/extide/gradle/src/org/netbeans/modules/gradle/queries/Info.java
@@ -69,7 +69,11 @@
 
     @Override
     public String getName() {
+        final NbGradleProject nb = NbGradleProject.get(project);
         GradleBaseProject prj = GradleBaseProject.get(project);
+        if (!nb.isGradleProjectLoaded() || prj == null || prj.getName() == null) {
+            return project.getProjectDirectory().getNameExt();
+        }
 
         String ret = prj.isRoot() ? prj.getName() : prj.getRootDir().getName() + prj.getPath();
         return ret;
diff --git a/extide/gradle/test/unit/src/org/netbeans/modules/gradle/AbstractGradleProjectTestCase.java b/extide/gradle/test/unit/src/org/netbeans/modules/gradle/AbstractGradleProjectTestCase.java
index 2a948a7..8a3bfa2 100644
--- a/extide/gradle/test/unit/src/org/netbeans/modules/gradle/AbstractGradleProjectTestCase.java
+++ b/extide/gradle/test/unit/src/org/netbeans/modules/gradle/AbstractGradleProjectTestCase.java
@@ -87,6 +87,11 @@
         }).get();
     }
     
+    protected void dumpProject(Project project){
+        NbGradleProjectImpl impl = (NbGradleProjectImpl) project;
+        impl.dumpProject();
+    }
+    
     protected FileObject createGradleProject(String path, String buildScript, String settingsScript) throws IOException {
         FileObject ret = FileUtil.toFileObject(getWorkDir());
         if (path != null) {
diff --git a/extide/libs.gradle/external/binaries-list b/extide/libs.gradle/external/binaries-list
index 121211d..6b1f130 100644
--- a/extide/libs.gradle/external/binaries-list
+++ b/extide/libs.gradle/external/binaries-list
@@ -14,4 +14,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-B2123DF25C938DD072C7D07716629AABEF0ABD10 gradle-tooling-api-7.3-rc-1.jar
\ No newline at end of file
+526C85998C50C960237920A9D98580F35801525D gradle-tooling-api-7.3.jar
\ No newline at end of file
diff --git a/extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-license.txt b/extide/libs.gradle/external/gradle-tooling-api-7.3-license.txt
similarity index 99%
rename from extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-license.txt
rename to extide/libs.gradle/external/gradle-tooling-api-7.3-license.txt
index d6bae9d..d1d04e9 100644
--- a/extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-license.txt
+++ b/extide/libs.gradle/external/gradle-tooling-api-7.3-license.txt
@@ -1,7 +1,7 @@
 Name: Gradle Wrapper
 Description: Gradle Tooling API
-Version: 7.3-rc-1
-Files: gradle-tooling-api-7.3-rc-1.jar
+Version: 7.3
+Files: gradle-tooling-api-7.3.jar
 License: Apache-2.0
 Origin: Gradle Inc.
 URL: https://gradle.org/
diff --git a/extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-notice.txt b/extide/libs.gradle/external/gradle-tooling-api-7.3-notice.txt
similarity index 100%
rename from extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-notice.txt
rename to extide/libs.gradle/external/gradle-tooling-api-7.3-notice.txt
diff --git a/extide/libs.gradle/nbproject/project.properties b/extide/libs.gradle/nbproject/project.properties
index 17922b1..87d66a4 100644
--- a/extide/libs.gradle/nbproject/project.properties
+++ b/extide/libs.gradle/nbproject/project.properties
@@ -22,4 +22,4 @@
 # For more information, please see http://wiki.netbeans.org/SignatureTest
 sigtest.gen.fail.on.error=false
 
-release.external/gradle-tooling-api-7.3-rc-1.jar=modules/gradle/gradle-tooling-api.jar
+release.external/gradle-tooling-api-7.3.jar=modules/gradle/gradle-tooling-api.jar
diff --git a/extide/libs.gradle/nbproject/project.xml b/extide/libs.gradle/nbproject/project.xml
index ec8671c..05c2c38 100644
--- a/extide/libs.gradle/nbproject/project.xml
+++ b/extide/libs.gradle/nbproject/project.xml
@@ -39,7 +39,7 @@
             </public-packages>
             <class-path-extension>
                 <runtime-relative-path>gradle/gradle-tooling-api.jar</runtime-relative-path>
-                <binary-origin>external/gradle-tooling-api-7.3-rc-1.jar</binary-origin>
+                <binary-origin>external/gradle-tooling-api-7.3.jar</binary-origin>
             </class-path-extension>
         </data>
     </configuration>
diff --git a/groovy/groovy.support/src/org/netbeans/modules/groovy/support/api/GroovySources.java b/groovy/groovy.support/src/org/netbeans/modules/groovy/support/api/GroovySources.java
index c25953d..dee1865 100644
--- a/groovy/groovy.support/src/org/netbeans/modules/groovy/support/api/GroovySources.java
+++ b/groovy/groovy.support/src/org/netbeans/modules/groovy/support/api/GroovySources.java
@@ -22,6 +22,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import org.netbeans.api.java.project.JavaProjectConstants;
 import org.netbeans.api.project.SourceGroup;
 import org.netbeans.api.project.Sources;
 
@@ -60,6 +61,7 @@
     public static List<SourceGroup> getGroovySourceGroups(Sources sources) {
         List<SourceGroup> result = new ArrayList<SourceGroup>();
         result.addAll(Arrays.asList(sources.getSourceGroups(GroovySources.SOURCES_TYPE_GROOVY)));
+        result.addAll(Arrays.asList(sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA)));
         result.addAll(Arrays.asList(sources.getSourceGroups(GroovySources.SOURCES_TYPE_GRAILS)));
         result.addAll(Arrays.asList(sources.getSourceGroups(GroovySources.SOURCES_TYPE_GRAILS_UNKNOWN)));
         return result;
diff --git a/ide/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateInsertHandler.java b/ide/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateInsertHandler.java
index 87f794a..d902a87 100644
--- a/ide/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateInsertHandler.java
+++ b/ide/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateInsertHandler.java
@@ -226,6 +226,10 @@
         }
         // Insert the template into document
         insertTemplate();
+
+        if (masterParameters.stream().noneMatch(param -> param.isEditable())) {
+            SwingUtilities.invokeLater(Completion.get()::showCompletion);
+        }
     }
 
     void checkInsertTextBuilt() {
@@ -320,7 +324,7 @@
                 CodeTemplateParameterImpl masterImpl = CodeTemplateParameterImpl.get(master);
                 if (CodeTemplateParameter.CURSOR_PARAMETER_NAME.equals(master.getName())) {
                     // Add explicit ${cursor} as last into text sync group to jump to it by TAB as last param
-                    caretTextRegion = masterImpl.textRegion(); 
+                    caretTextRegion = masterImpl.textRegion();
                 } else {
                     textSyncGroup.addTextSync(masterImpl.textRegion().textSync());
                 }
@@ -503,7 +507,7 @@
             }
         }
     }
-    
+
     void release() {
         synchronized (this) {
             if (released) {
diff --git a/ide/git/src/org/netbeans/modules/git/ui/history/SearchHistoryAction.java b/ide/git/src/org/netbeans/modules/git/ui/history/SearchHistoryAction.java
index 0451477..8e1a08b 100644
--- a/ide/git/src/org/netbeans/modules/git/ui/history/SearchHistoryAction.java
+++ b/ide/git/src/org/netbeans/modules/git/ui/history/SearchHistoryAction.java
@@ -63,63 +63,54 @@
     }
     
     public static void openSearch (final File repository, final File[] roots, final String branchName, final String contextName) {
-        openSearch(repository, roots, branchName, contextName, roots != null && (roots.length == 1 && roots[0].isFile() || roots.length > 1 && Utils.shareCommonDataObject(roots)));
+        openSearch(repository, roots, branchName, contextName, roots != null && (roots.length == 1 || roots.length > 1 && Utils.shareCommonDataObject(roots)));
     }
     
     public static void openSearch (final File repository, final File[] roots, final String branchName, final String contextName, final boolean invokeSearch) {
         final String title = NbBundle.getMessage(SearchHistoryTopComponent.class, "LBL_SearchHistoryTopComponent.title", contextName);
         final RepositoryInfo info = RepositoryInfo.getInstance(repository);
-        EventQueue.invokeLater(new Runnable() {
-            @Override
-            public void run () {
-                SearchHistoryTopComponent tc = new SearchHistoryTopComponent(repository, info, roots);
-                tc.setBranch(branchName);
-                tc.setDisplayName(title);
-                tc.open();
-                tc.requestActive();
-                if (invokeSearch) {
-                    tc.search(false);
-                }
+        EventQueue.invokeLater(() -> {
+            SearchHistoryTopComponent tc = new SearchHistoryTopComponent(repository, info, roots);
+            tc.setBranch(branchName);
+            tc.setDisplayName(title);
+            tc.open();
+            tc.requestActive();
+            if (invokeSearch) {
+                tc.search(false);
             }
         });
     }
     
-    public static void openSearch (final File repository, final File root, final String contextName,
-            final String commitIdFrom, final String commitIdTo) {
+    public static void openSearch (final File repository, final File root, final String contextName, final String commitIdFrom, final String commitIdTo) {
         final String title = NbBundle.getMessage(SearchHistoryTopComponent.class, "LBL_SearchHistoryTopComponent.title", contextName);
         final RepositoryInfo info = RepositoryInfo.getInstance(repository);
-        Mutex.EVENT.readAccess(new Runnable() {
-            @Override
-            public void run () {
-                SearchHistoryTopComponent tc = new SearchHistoryTopComponent(repository, info, new File[] { root });
-                tc.setDisplayName(title);
-                tc.open();
-                tc.requestActive();
-                tc.setSearchCommitFrom(commitIdFrom);
-                tc.setSearchCommitTo(commitIdTo);
-                tc.search(true);
-            }
+        Mutex.EVENT.readAccess(() -> {
+            SearchHistoryTopComponent tc = new SearchHistoryTopComponent(repository, info, new File[] { root });
+            tc.setDisplayName(title);
+            tc.open();
+            tc.requestActive();
+            tc.setSearchCommitFrom(commitIdFrom);
+            tc.setSearchCommitTo(commitIdTo);
+            tc.search(true);
         });
     }
     
     public static void openSearch (final File repository, final File root, final String contextName, final int lineNumber) {
         final String title = NbBundle.getMessage(SearchHistoryTopComponent.class, "LBL_SearchHistoryTopComponent.title", contextName);
         final RepositoryInfo info = RepositoryInfo.getInstance(repository);
-        EventQueue.invokeLater(new Runnable() {
-            @Override
-            public void run () {
-                SearchHistoryTopComponent tc = new SearchHistoryTopComponent(repository, info, root, new SearchHistoryTopComponent.DiffResultsViewFactory() {
-                    @Override
-                    DiffResultsView createDiffResultsView(SearchHistoryPanel panel, List<RepositoryRevision> results) {
-                        return new DiffResultsViewForLine(panel, results, lineNumber);
-                    }
-                });
-                tc.setDisplayName(title);
-                tc.open();
-                tc.requestActive();
-                tc.search(true);
-                tc.activateDiffView(true);
-            }
+        EventQueue.invokeLater(() -> {
+            SearchHistoryTopComponent tc = new SearchHistoryTopComponent(repository, info, root,
+                    new SearchHistoryTopComponent.DiffResultsViewFactory() {
+                        @Override
+                        DiffResultsView createDiffResultsView(SearchHistoryPanel panel, List<RepositoryRevision> results) {
+                            return new DiffResultsViewForLine(panel, results, lineNumber);
+                        }
+                    });
+            tc.setDisplayName(title);
+            tc.open();
+            tc.requestActive();
+            tc.search(true);
+            tc.activateDiffView(true);
         });
     }
 
diff --git a/ide/libs.graalsdk/src/org/netbeans/libs/graalsdk/impl/GraalEngine.java b/ide/libs.graalsdk/src/org/netbeans/libs/graalsdk/impl/GraalEngine.java
index 15d8d35..6adc9cc 100644
--- a/ide/libs.graalsdk/src/org/netbeans/libs/graalsdk/impl/GraalEngine.java
+++ b/ide/libs.graalsdk/src/org/netbeans/libs/graalsdk/impl/GraalEngine.java
@@ -173,13 +173,17 @@
 
     @Override
     public <T> T getInterface(Object thiz, Class<T> clasz) {
-        if (thiz instanceof Value) {
-            return ((Value) thiz).as(clasz);
-        }
-        Value v = factory.ctx.ctx().asValue(thiz);
-        T ret = v.as(clasz);
-        if (ret != null) {
-            return ret;
+        try {
+            if (thiz instanceof Value) {
+                return ((Value) thiz).as(clasz);
+            }
+            Value v = factory.ctx.ctx().asValue(thiz);
+            T ret = v.as(clasz);
+            if (ret != null) {
+                return ret;
+            }
+        } catch (ClassCastException ex) {
+            // the interface is not supported on the value object; ignore.
         }
         if (clasz.isInstance(thiz)) {
             return clasz.cast(thiz);
diff --git a/ide/xml.retriever/licenseinfo.xml b/ide/xml.retriever/licenseinfo.xml
new file mode 100644
index 0000000..a69dccb
--- /dev/null
+++ b/ide/xml.retriever/licenseinfo.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<licenseinfo>
+    <fileset>
+        <file>test/unit/src/org/netbeans/modules/xml/retriever/impl/badssl.com-client.p12</file>
+        <license ref="Apache-2.0-ASF" />
+        <comment type="COMMENT_UNSUPPORTED" />
+    </fileset>
+</licenseinfo>
diff --git a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java
index 7730a71..c45511e 100644
--- a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java
+++ b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java
@@ -457,10 +457,11 @@
     private static HitBreakpointInfo[] getBreakpointInfos(ExecutionHaltedInfo haltedInfo, JPDAThread thread) {
         ObjectVariable[] breakpointsHit = haltedInfo.breakpointsHit;
         ObjectVariable[] breakpointConditionExceptions = haltedInfo.breakpointConditionExceptions;
-        int n = breakpointsHit.length;
+        int n = (breakpointsHit != null) ? breakpointsHit.length : 0;
         HitBreakpointInfo[] breakpointInfos = null;
         for (int i = 0; i < n; i++) {
-            HitBreakpointInfo breakpointInfo = HitBreakpointInfo.create(breakpointsHit[i], breakpointConditionExceptions[i]);
+            ObjectVariable exception = (breakpointConditionExceptions != null) ? breakpointConditionExceptions[i] : null;
+            HitBreakpointInfo breakpointInfo = HitBreakpointInfo.create(breakpointsHit[i], exception);
             if (breakpointInfo != null) {
                 if (breakpointInfos == null) {
                     breakpointInfos = new HitBreakpointInfo[] { breakpointInfo };
diff --git a/java/java.editor/src/org/netbeans/modules/java/editor/resources/fontsColors.xml b/java/java.editor/src/org/netbeans/modules/java/editor/resources/fontsColors.xml
index 64210da..7c20894 100644
--- a/java/java.editor/src/org/netbeans/modules/java/editor/resources/fontsColors.xml
+++ b/java/java.editor/src/org/netbeans/modules/java/editor/resources/fontsColors.xml
@@ -90,7 +90,7 @@
     <fontcolor name="mod-protected" />
     <fontcolor name="mod-public" />
     <fontcolor name="mod-keyword" default="keyword" />
-    <fontcolor name="mod-unindented-text-block" bgColor="EEDDDD" />
+    <fontcolor name="mod-unindented-text-block" />
     
     <!--currently not used:-->
 <!--    <fontcolor name="mod-type-parameter-declaration" bgColor="lightGray"/>
diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/jdk/CheckRegex.java b/java/java.hints/src/org/netbeans/modules/java/hints/jdk/CheckRegex.java
index 5d6179d..2b8f223 100644
--- a/java/java.hints/src/org/netbeans/modules/java/hints/jdk/CheckRegex.java
+++ b/java/java.hints/src/org/netbeans/modules/java/hints/jdk/CheckRegex.java
@@ -38,6 +38,7 @@
 import org.netbeans.api.annotations.common.CheckForNull;
 import org.netbeans.api.java.source.CompilationInfo;
 import org.netbeans.spi.editor.hints.ErrorDescription;
+import org.netbeans.spi.editor.hints.Severity;
 import org.netbeans.spi.java.hints.ConstraintVariableType;
 import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
 import org.netbeans.spi.java.hints.Hint;
@@ -47,7 +48,7 @@
 import org.netbeans.spi.java.hints.TriggerPatterns;
 import org.openide.util.NbBundle.Messages;
 
-@Hint(displayName = "#DN_CheckRegex", description = "#DESC_CheckRegex", category = "general")
+@Hint(displayName = "#DN_CheckRegex", description = "#DESC_CheckRegex", category = "general", severity = Severity.HINT)
 @Messages({
     "DN_CheckRegex=Check Regular Expression",
     "DESC_CheckRegex=Check Regular Expression"
diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/jdk/mapreduce/ForLoopToFunctionalHint.java b/java/java.hints/src/org/netbeans/modules/java/hints/jdk/mapreduce/ForLoopToFunctionalHint.java
index 41a3b13..c22faae 100644
--- a/java/java.hints/src/org/netbeans/modules/java/hints/jdk/mapreduce/ForLoopToFunctionalHint.java
+++ b/java/java.hints/src/org/netbeans/modules/java/hints/jdk/mapreduce/ForLoopToFunctionalHint.java
@@ -26,10 +26,10 @@
 import com.sun.source.tree.StatementTree;
 import com.sun.source.tree.Tree;
 import com.sun.source.util.TreePath;
-import javax.lang.model.SourceVersion;
 import org.netbeans.api.java.source.CompilationInfo;
 import org.netbeans.spi.editor.hints.ErrorDescription;
 import org.netbeans.spi.editor.hints.Fix;
+import org.netbeans.spi.editor.hints.Severity;
 import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
 import org.netbeans.spi.java.hints.Hint;
 import org.netbeans.spi.java.hints.HintContext;
@@ -37,8 +37,7 @@
 import org.netbeans.spi.java.hints.TriggerTreeKind;
 import org.openide.util.NbBundle.Messages;
 
-@Hint(displayName = "#DN_ForLoopToFunctionalHint", description = "#DESC_ForLoopToFunctionalHint", category = "general",
-        minSourceVersion = "8")
+@Hint(displayName = "#DN_ForLoopToFunctionalHint", description = "#DESC_ForLoopToFunctionalHint", category = "general", severity = Severity.HINT, minSourceVersion = "8")
 @Messages({
     "DN_ForLoopToFunctionalHint=Use Functional Operations",
     "DESC_ForLoopToFunctionalHint=Use functional operations instead of imperative style loop."
diff --git a/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/CheckRegexTest.java b/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/CheckRegexTest.java
index 22eb381..9b14902 100644
--- a/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/CheckRegexTest.java
+++ b/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/CheckRegexTest.java
@@ -34,7 +34,7 @@
                         + "    }\n"
                         + "}\n")
                 .run(CheckRegex.class)
-                .assertWarnings("4:34-4:41:verifier:" + Bundle.ERR_CheckRegex());
+                .assertWarnings("4:34-4:41:hint:" + Bundle.ERR_CheckRegex());
     }
     
     @Test
@@ -48,7 +48,7 @@
                         + "    }\n"
                         + "}\n")
                 .run(CheckRegex.class)
-                .assertWarnings("4:34-4:41:verifier:" + Bundle.ERR_CheckRegex());
+                .assertWarnings("4:34-4:41:hint:" + Bundle.ERR_CheckRegex());
     }
     
 }
diff --git a/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/mapreduce/ForLoopToFunctionalHintTest.java b/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/mapreduce/ForLoopToFunctionalHintTest.java
index 5cb20d2..093c376 100644
--- a/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/mapreduce/ForLoopToFunctionalHintTest.java
+++ b/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/mapreduce/ForLoopToFunctionalHintTest.java
@@ -56,7 +56,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("12:8-12:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("12:8-12:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -126,7 +126,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("12:8-12:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("12:8-12:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -180,7 +180,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("22:8-22:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("22:8-22:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("/*\n"
                 + " * To change this template, choose Tools | Templates\n"
@@ -237,7 +237,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("12:8-12:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("12:8-12:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -288,7 +288,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("12:8-12:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("12:8-12:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -341,7 +341,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("12:8-12:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("12:8-12:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -398,7 +398,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("12:8-12:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("12:8-12:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -455,7 +455,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("12:8-12:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("12:8-12:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -519,7 +519,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("12:8-12:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("12:8-12:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -583,7 +583,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("14:8-14:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("14:8-14:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -658,7 +658,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("12:8-12:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("12:8-12:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -725,7 +725,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("14:8-14:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("14:8-14:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -787,7 +787,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("14:8-14:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("14:8-14:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -859,7 +859,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("14:8-14:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("14:8-14:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package testdemo;\n"
                 + "\n"
@@ -928,7 +928,7 @@
                 + "")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("17:8-17:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("17:8-17:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package javatargettempapp;\n"
                 + "\n"
@@ -990,7 +990,7 @@
                 + "")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("17:8-17:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("17:8-17:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package javatargettempapp;\n"
                 + "\n"
@@ -1052,7 +1052,7 @@
                 + "")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("17:8-17:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("17:8-17:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("package javatargettempapp;\n"
                 + "\n"
@@ -1124,7 +1124,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("23:8-23:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("23:8-23:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("/*\n"
                 + " * To change this template, choose Tools | Templates\n"
@@ -1202,7 +1202,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("23:8-23:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("23:8-23:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("/*\n"
                 + " * To change this template, choose Tools | Templates\n"
@@ -1274,7 +1274,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("23:8-23:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("23:8-23:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("/*\n"
                 + " * To change this template, choose Tools | Templates\n"
@@ -1341,7 +1341,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .findWarning("23:8-23:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint())
+                .findWarning("23:8-23:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint())
                 .applyFix()
                 .assertOutput("/*\n"
                 + " * To change this template, choose Tools | Templates\n"
@@ -1406,7 +1406,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .assertNotContainsWarnings("23:8-23:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint());
+                .assertNotContainsWarnings("23:8-23:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint());
     }
 
     public void testNoHintDueToNEF() throws Exception {
@@ -1651,7 +1651,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .assertWarnings("15:8-15:11:verifier:" + Bundle.ERR_ForLoopToFunctionalHint());
+                .assertWarnings("15:8-15:11:hint:" + Bundle.ERR_ForLoopToFunctionalHint());
     }
 
     public void testNoHintDueToMethodThrowingException() throws Exception {
@@ -1789,7 +1789,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .assertNotContainsWarnings("23:8-23:11:verifier:Can use functional operation");
+                .assertNotContainsWarnings("23:8-23:11:hint:Can use functional operation");
 
     }
 
@@ -1832,7 +1832,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .assertNotContainsWarnings("23:8-23:11:verifier:Can use functional operation");
+                .assertNotContainsWarnings("23:8-23:11:hint:Can use functional operation");
 
     }
 
@@ -1873,7 +1873,7 @@
                 + "}")
                 .sourceLevel("1.8")
                 .run(ForLoopToFunctionalHint.class)
-                .assertNotContainsWarnings("23:8-23:11:verifier:Can use functional operation");
+                .assertNotContainsWarnings("23:8-23:11:hint:Can use functional operation");
 
     }
     
diff --git a/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/displayer/JavaVariablesDisplayer.java b/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/displayer/JavaVariablesDisplayer.java
index 191e2a9..5f7035e 100644
--- a/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/displayer/JavaVariablesDisplayer.java
+++ b/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/displayer/JavaVariablesDisplayer.java
@@ -47,6 +47,7 @@
     private static final String COMPRESSED_REF_REFIX = "_z_.";
     private static final String PUBLIC = "public";
     private static final String STRING_VALUE = "value";
+    private static final String STRING_CODER = "coder";
     private static final String HASH = "hash";
     private static final String UNSET = "<optimized out>";
 
@@ -240,6 +241,16 @@
         return null;
     }
 
+    private String readArray(NIVariable lengthVariable, int offset, int itemSize) {
+        int length = Integer.parseInt(lengthVariable.getValue());
+        String expressionPath = lengthVariable.getExpressionPath();
+        if (expressionPath != null && !expressionPath.isEmpty()) {
+            String addressExpr = "&" + expressionPath;
+            return debugger.readMemory(addressExpr, 4 + offset, length * itemSize); // length has 4 bytes
+        }
+        return null;
+    }
+
     private static NIVariable[] getObjectChildren(NIVariable[] children, int from, int to) {
         for (int i = 0; i < children.length; i++) {
             if (HUB.equals(children[i].getName())) {
@@ -290,16 +301,37 @@
         @Override
         public String getValue() {
             NIVariable pub = getVarsByName(var.getChildren()).get(PUBLIC);
-            Map<String, NIVariable> arrayInfo = getVarsByName(getVarsByName(pub.getChildren()).get(STRING_VALUE).getChildren());
+            Map<String, NIVariable> varChildren = getVarsByName(pub.getChildren());
+            Map<String, NIVariable> arrayInfo = getVarsByName(varChildren.get(STRING_VALUE).getChildren());
             arrayInfo = getVarsByName(arrayInfo.get(PUBLIC).getChildren());
             NIVariable arrayVariable = arrayInfo.get(ARRAY);
             NIVariable lengthVariable = arrayInfo.get(ARRAY_LENGTH);
-            String hexArray = readArray(lengthVariable, 2);
+            int length = Integer.parseInt(lengthVariable.getValue());
+            NIVariable coderVar = varChildren.get(STRING_CODER);
+            int coder = -1;
+            if (coderVar != null) {
+                String coderStr = coderVar.getValue();
+                int space = coderStr.indexOf(' ');
+                if (space > 0) {
+                    coderStr = coderStr.substring(0, space);
+                }
+                try {
+                    coder = Integer.parseInt(coderStr);
+                } catch (NumberFormatException ex) {
+                }
+            }
+            String hexArray = readArray(lengthVariable, coder == -1 ? 4 : 0, 2);
             if (hexArray != null) {
-                return parseUTF16(hexArray);
+                switch (coder) {
+                    case 0: // Compressed String on JDK 9+
+                        return parseLatin1(hexArray, length);
+                    case 1: // UTF-16 String on JDK 9+
+                        return parseUTF16(hexArray, length/2);
+                    default: // UTF-16 String on JDK 8
+                        return parseUTF16(hexArray, length);
+                }
             } else { // legacy code
                 String arrayExpression = getArrayExpression(arrayVariable);
-                int length = Integer.parseInt(lengthVariable.getValue());
                 char[] characters = new char[length];
                 try {
                     for (int i = 0; i < length; i++) {
@@ -313,10 +345,9 @@
             }
         }
 
-        private String parseUTF16(String hexArray) {
-            CharsetDecoder cd = Charset.forName("utf-16").newDecoder();
+        private String parseUTF16(String hexArray, int length) {
+            CharsetDecoder cd = Charset.forName("utf-16").newDecoder(); // NOI18N
             ByteBuffer buffer = ByteBuffer.allocate(2);
-            int length = hexArray.length() / 4;
             char[] characters = new char[length];
             int ih = 0;
             for (int i = 0; i < length; i++) {
@@ -337,6 +368,26 @@
             return new String(characters);
         }
 
+        private String parseLatin1(String hexArray, int length) {
+            CharsetDecoder cd = Charset.forName("latin1").newDecoder(); // NOI18N
+            ByteBuffer buffer = ByteBuffer.allocate(1);
+            char[] characters = new char[length];
+            int ih = 0;
+            for (int i = 0; i < length; i++) {
+                byte b = parseByte(hexArray, ih);
+                ih += 2;
+                buffer.rewind();
+                buffer.put(b);
+                buffer.rewind();
+                try {
+                    char c = cd.decode(buffer).get();
+                    characters[i] = c;
+                } catch (CharacterCodingException ex) {
+                }
+            }
+            return new String(characters);
+        }
+
         private byte parseByte(String hexArray, int offset) {
             String hex = new String(new char[] {hexArray.charAt(offset), hexArray.charAt(offset + 1)});
             return (byte) (Integer.parseInt(hex, 16) & 0xFF);
diff --git a/java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java b/java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java
index 3316ce9..b94657d 100644
--- a/java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java
+++ b/java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java
@@ -121,6 +121,8 @@
  */
 public final class TreeUtilities {
     
+    private static final Logger LOG = Logger.getLogger(TreeUtilities.class.getName());
+
     /**{@link Kind}s that are represented by {@link ClassTree}.
      * 
      * @since 0.67
@@ -932,7 +934,7 @@
             Method m = Enter.class.getDeclaredMethod("unenter", JCCompilationUnit.class, JCTree.class);
             m.invoke(Enter.instance(ctx), cut, tree);
         } catch (Throwable t) {
-            t.printStackTrace();
+            LOG.log(Level.FINE, null, t);
         }
     }
 
diff --git a/java/maven/src/org/netbeans/modules/maven/execute/CommandLineOutputHandler.java b/java/maven/src/org/netbeans/modules/maven/execute/CommandLineOutputHandler.java
index 303a218..d9d0cea 100644
--- a/java/maven/src/org/netbeans/modules/maven/execute/CommandLineOutputHandler.java
+++ b/java/maven/src/org/netbeans/modules/maven/execute/CommandLineOutputHandler.java
@@ -24,12 +24,13 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.io.Reader;
+import java.io.Writer;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.EnumMap;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.logging.Logger;
@@ -50,14 +51,15 @@
 import org.netbeans.modules.maven.api.output.OutputUtils;
 import org.netbeans.modules.maven.api.output.OutputVisitor;
 import org.netbeans.modules.maven.execute.AbstractMavenExecutor.ResumeFromFinder;
+
 import static org.netbeans.modules.maven.execute.AbstractOutputHandler.PRJ_EXECUTE;
 import static org.netbeans.modules.maven.execute.AbstractOutputHandler.SESSION_EXECUTE;
+
 import org.netbeans.modules.maven.execute.cmd.ExecMojo;
 import org.netbeans.modules.maven.execute.cmd.ExecProject;
 import org.netbeans.modules.maven.execute.cmd.ExecSession;
 import org.netbeans.modules.maven.options.MavenSettings;
 import org.netbeans.spi.project.ProjectContainerProvider;
-import org.netbeans.spi.project.SubprojectProvider;
 import org.openide.util.Exceptions;
 import org.openide.util.RequestProcessor;
 import org.openide.util.RequestProcessor.Task;
@@ -674,8 +676,8 @@
 
     static class Input implements Runnable {
 
-        private InputOutput inputOutput;
-        private OutputStream str;
+        private final InputOutput inputOutput;
+        private final OutputStream str;
         private boolean stopIn = false;
 
         public Input(OutputStream out, InputOutput inputOutput) {
@@ -698,29 +700,21 @@
 
         public @Override void run() {
             Reader in = inputOutput.getIn();
-            try {
+            try (Writer out = new OutputStreamWriter(str)) {
                 while (true) {
                     int read = in.read();
                     if (read != -1) {
-                        str.write(read);
-                        str.flush();
+                        out.write(read);
+                        out.flush();
                     } else {
-                        str.close();
                         return;
                     }
                     if (stopIn) {
                         return;
                     }
                 }
-
             } catch (IOException ex) {
                 ex.printStackTrace();
-            } finally {
-                try {
-                    str.close();
-                } catch (IOException ex) {
-                    ex.printStackTrace();
-                }
             }
         }
     }
diff --git a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JackpotTrees.java b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JackpotTrees.java
index 96d3e00..8515d68 100644
--- a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JackpotTrees.java
+++ b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JackpotTrees.java
@@ -33,6 +33,7 @@
 import com.sun.tools.javac.tree.JCTree.JCIdent;
 import com.sun.tools.javac.tree.JCTree.JCModifiers;
 import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
+import com.sun.tools.javac.tree.JCTree.JCCase;
 import com.sun.tools.javac.tree.JCTree.Visitor;
 import com.sun.tools.javac.tree.TreeMaker;
 import com.sun.tools.javac.util.Context;
@@ -40,9 +41,7 @@
 import com.sun.tools.javac.util.Name;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
@@ -61,7 +60,35 @@
 public class JackpotTrees {
 
     private static final Map<Class<?>, Class<?>> baseClass2Impl = new HashMap<>();
-    public static <T> T createInstance(Context ctx, Class<T> clazz, Name ident, JCIdent jcIdent, Class<?>[] requiredConstructor, Object[] params) {
+
+    // JDK 8-11
+    public static JCCase createJCCase(Name ident, JCIdent jcIdent, List<?> stats) {
+        return createInstance(JCCase.class, ident, jcIdent,
+                new Class<?>[] {JCExpression.class, List.class},
+                new Object[] {jcIdent, stats});
+    }
+
+    // JDK 12-17+
+    public static JCCase createJCCase(Name ident, JCIdent jcIdent, String caseKind, List<?> labels, List<?> stats, JCTree body) throws ReflectiveOperationException {
+        
+        @SuppressWarnings("rawtypes")
+        Class kindClass = Class.forName("com.sun.source.tree.CaseTree$CaseKind", false, JCCase.class.getClassLoader());
+        @SuppressWarnings("unchecked")
+        Object caseKindValue = Enum.valueOf(kindClass, caseKind);
+
+        return createInstance(JCCase.class, ident, jcIdent,
+                    new Class<?>[] {kindClass, List.class, List.class, JCTree.class},
+                    new Object[] {caseKindValue, labels, stats, body});
+    }
+
+    // JDK 8-17+
+    public static JCVariableDecl createJCVariableDecl(Name ident, JCIdent jcIdent, JCModifiers mods, Name param2, JCExpression vartype, JCExpression init, VarSymbol sym) {
+        return createInstance(JCVariableDecl.class, ident, jcIdent,
+                new Class<?>[] {JCModifiers.class, Name.class, JCExpression.class, JCExpression.class, VarSymbol.class},
+                new Object[] {mods, param2, vartype, init, sym});
+    }
+
+    private static <T> T createInstance(Class<T> clazz, Name ident, JCIdent jcIdent, Class<?>[] requiredConstructor, Object[] params) {
         try {
             Class<?> fake = baseClass2Impl.get(clazz);
 
@@ -84,37 +111,31 @@
                         .getLoaded();
                 baseClass2Impl.put(clazz, fake);
             }
-
-            NEXT: for (Constructor<?> c : fake.getDeclaredConstructors()) {
-                if (c.getParameterCount() < requiredConstructor.length)
-                    continue;
-                for (int e = 0; e < requiredConstructor.length; e++) {
-                    if (!c.getParameterTypes()[e].equals(requiredConstructor[e])) {
-                        continue NEXT;
-                    }
+            
+            Constructor<?> compatible = null;
+            for (Constructor<?> constructor : fake.getDeclaredConstructors()) {
+                if (Arrays.equals(constructor.getParameterTypes(), requiredConstructor)) {
+                    compatible = constructor;
+                    break;
                 }
-                java.util.List<Object> instances = new ArrayList<>();
-                instances.addAll(Arrays.asList(params));
-                for (int i = instances.size(); i < c.getParameterCount(); i++) {
-                    instances.add(null);
-                }
-
-                JCTree tree = (JCTree) c.newInstance(instances.toArray(new Object[0]));
+            }
+            
+            if (compatible != null) {
+                
+                JCTree tree = (JCTree) compatible.newInstance(params);
 
                 Field identField = fake.getDeclaredField("ident");
-
                 identField.set(tree, ident);
 
                 Field jcIdentField = fake.getDeclaredField("jcIdent");
-
                 jcIdentField.set(tree, jcIdent);
 
                 return clazz.cast(tree);
+            } else {
+                throw new IllegalStateException("no compatible constructors found in: "+Arrays.asList(fake.getDeclaredConstructors()).toString());
             }
-
-            throw new IllegalStateException(Arrays.asList(fake.getDeclaredConstructors()).toString());
-        } catch (IllegalAccessException | IllegalArgumentException | IllegalStateException | InstantiationException | NoSuchFieldException | NoSuchMethodException | SecurityException | InvocationTargetException ex) {
-            throw new IllegalStateException(ex);
+        } catch (ReflectiveOperationException | IllegalArgumentException | IllegalStateException | SecurityException ex) {
+            throw new IllegalStateException("can't instantiate "+Arrays.asList(requiredConstructor).toString()+" of "+clazz, ex);
         }
     }
 
@@ -202,27 +223,7 @@
 
         err.type = Symtab.instance(ctx).errType;
 
-        JCVariableDecl var;
-        
-        try {
-            var = createInstance(ctx,
-                                 JCVariableDecl.class,
-                                 name,
-                                 jcIdent,
-                                 new Class<?>[] {JCModifiers.class, Name.class, JCExpression.class, JCExpression.class, VarSymbol.class},
-                                 new Object[] {new FakeModifiers(), name, err, null, null});
-        } catch (IllegalStateException ex) {
-            try {
-                var = createInstance(ctx,
-                                     JCVariableDecl.class,
-                                     name,
-                                     jcIdent,
-                                     new Class<?>[] {JCModifiers.class, Name.class, JCExpression.class, JCExpression.class, VarSymbol.class, List.class},
-                                     new Object[] {new FakeModifiers(), name, err, null, null, List.nil()});
-            } catch (IllegalStateException ex2) {
-                throw ex;
-            }
-        }
+        JCVariableDecl var = createJCVariableDecl(name, jcIdent, new FakeModifiers(), name, err, null, null);
 
         var.sym = new VarSymbol(0, name, var.vartype.type, Symtab.instance(ctx).errSymbol);
         var.type = var.vartype.type;
diff --git a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Utilities.java b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Utilities.java
index 59d17bc..b41ef37 100644
--- a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Utilities.java
+++ b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Utilities.java
@@ -1525,8 +1525,7 @@
                         }
 
                         JCIdent identTree = F.at(pos).Ident(name);
-
-                        return JackpotTrees.createInstance(ctx, JCCase.class, name, identTree, new Class<?>[] {JCExpression.class, com.sun.tools.javac.util.List.class}, new Object[] {identTree, com.sun.tools.javac.util.List.nil()});
+                        return JackpotTrees.createJCCase(name, identTree, com.sun.tools.javac.util.List.nil());
                     }
                 }
             }
@@ -1555,17 +1554,9 @@
                             nextToken();
                         }
 
-                        @SuppressWarnings("rawtypes")
-                        Class caseKind = Class.forName("com.sun.source.tree.CaseTree$CaseKind", false, JCCase.class.getClassLoader());
-                        @SuppressWarnings("unchecked")
-                        Object statement = Enum.valueOf(caseKind, "STATEMENT");
-
                         JCIdent identTree = F.at(pos).Ident(name);
                         return com.sun.tools.javac.util.List.of(
-                                    JackpotTrees.createInstance(ctx, JCCase.class, name, identTree,
-                                        new Class<?>[] {caseKind, com.sun.tools.javac.util.List.class, com.sun.tools.javac.util.List.class, JCTree.class},
-                                        new Object[] {statement, com.sun.tools.javac.util.List.of(identTree), com.sun.tools.javac.util.List.nil(), null}
-                                    )
+                                    JackpotTrees.createJCCase(name, identTree, "STATEMENT", com.sun.tools.javac.util.List.of(identTree), com.sun.tools.javac.util.List.nil(), null)
                                 );
                     }
                 }
diff --git a/nbbuild/installer/jnlp/external/jnlp-definitions-7.0-license.txt b/nbbuild/installer/jnlp/external/jnlp-definitions-7.0-license.txt
index 98cd374..84d846e 100644
--- a/nbbuild/installer/jnlp/external/jnlp-definitions-7.0-license.txt
+++ b/nbbuild/installer/jnlp/external/jnlp-definitions-7.0-license.txt
@@ -7,427 +7,349 @@
 Comment: The usage in the compilation is unclear, but it is not packaged, so should be safe
 
 The GNU General Public License (GPL)
+
 Version 2, June 1991
 
- Copyright 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim
- copies of this license document, but changing it is not
- allowed.
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
-                      Preamble
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
 
-The licenses for most software are designed to take away
-your freedom to share and change it. By contrast, the GNU
-General Public License is intended to guarantee your freedom
-to share and change free software--to make sure the software
-is free for all its users. This General Public License
-applies to most of the Free Software Foundation's software
-and to any other program whose authors commit to using it.
-(Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can
-apply it to your programs, too.
+Preamble
 
-When we speak of free software, we are referring to freedom,
-not price. Our General Public Licenses are designed to make
-sure that you have the freedom to distribute copies of free
-software (and charge for this service if you wish), that you
-receive source code or can get it if you want it, that you
-can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
+The licenses for most software are designed to take away your freedom to share
+and change it.  By contrast, the GNU General Public License is intended to
+guarantee your freedom to share and change free software--to make sure the
+software is free for all its users.  This General Public License applies to
+most of the Free Software Foundation's software and to any other program whose
+authors commit to using it.  (Some other Free Software Foundation software is
+covered by the GNU Library General Public License instead.) You can apply it to
+your programs, too.
 
-To protect your rights, we need to make restrictions that
-forbid anyone to deny you these rights or to ask you to
-surrender the rights. These restrictions translate to
-certain responsibilities for you if you distribute copies of
-the software, or if you modify it.
+When we speak of free software, we are referring to freedom, not price.  Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for this service if you wish),
+that you receive source code or can get it if you want it, that you can change
+the software or use pieces of it in new free programs; and that you know you
+can do these things.
 
-For example, if you distribute copies of such a program,
-whether gratis or for a fee, you must give the recipients
-all the rights that you have. You must make sure that they,
-too, receive or can get the source code. And you must show
-them these terms so they know their rights.
+To protect your rights, we need to make restrictions that forbid anyone to deny
+you these rights or to ask you to surrender the rights.  These restrictions
+translate to certain responsibilities for you if you distribute copies of the
+software, or if you modify it.
 
-We protect your rights with two steps: (1) copyright the
-software, and (2) offer you this license which gives you
-legal permission to copy, distribute and/or modify the
-software.
+For example, if you distribute copies of such a program, whether gratis or for
+a fee, you must give the recipients all the rights that you have.  You must
+make sure that they, too, receive or can get the source code.  And you must
+show them these terms so they know their rights.
 
-Also, for each author's protection and ours, we want to make
-certain that everyone understands that there is no warranty
-for this free software. If the software is modified by
-someone else and passed on, we want its recipients to know
-that what they have is not the original, so that any
-problems introduced by others will not reflect on the
-original authors' reputations.
+We protect your rights with two steps: (1) copyright the software, and (2)
+offer you this license which gives you legal permission to copy, distribute
+and/or modify the software.
 
-Finally, any free program is threatened constantly by
-software patents. We wish to avoid the danger that
-redistributors of a free program will individually obtain
-patent licenses, in effect making the program proprietary.
-To prevent this, we have made it clear that any patent must
-be licensed for everyone's free use or not licensed at all.
+Also, for each author's protection and ours, we want to make certain that
+everyone understands that there is no warranty for this free software.  If the
+software is modified by someone else and passed on, we want its recipients to
+know that what they have is not the original, so that any problems introduced
+by others will not reflect on the original authors' reputations.
 
-The precise terms and conditions for copying, distribution
-and modification follow.
+Finally, any free program is threatened constantly by software patents.  We
+wish to avoid the danger that redistributors of a free program will
+individually obtain patent licenses, in effect making the program proprietary.
+To prevent this, we have made it clear that any patent must be licensed for
+everyone's free use or not licensed at all.
 
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
-MODIFICATION
+The precise terms and conditions for copying, distribution and modification
+follow.
 
-0. This License applies to any program or other work which
-contains a notice placed by the copyright holder saying it
-may be distributed under the terms of this General Public
-License. The "Program", below, refers to any such program or
-work, and a "work based on the Program" means either the
-Program or any derivative work under copyright law: that is
-to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into
-another language. (Hereinafter, translation is included
-without limitation in the term "modification".) Each
-licensee is addressed as "you".
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
-Activities other than copying, distribution and modification
-are not covered by this License; they are outside its scope.
-The act of running the Program is not restricted, and the
-output from the Program is covered only if its contents
-constitute a work based on the Program (independent of
-having been made by running the Program). Whether that is
-true depends on what the Program does.
+0. This License applies to any program or other work which contains a notice
+placed by the copyright holder saying it may be distributed under the terms of
+this General Public License.  The "Program", below, refers to any such program
+or work, and a "work based on the Program" means either the Program or any
+derivative work under copyright law: that is to say, a work containing the
+Program or a portion of it, either verbatim or with modifications and/or
+translated into another language.  (Hereinafter, translation is included
+without limitation in the term "modification".) Each licensee is addressed as
+"you".
 
-1. You may copy and distribute verbatim copies of the
-Program's source code as you receive it, in any medium,
-provided that you conspicuously and appropriately publish on
-each copy an appropriate copyright notice and disclaimer of
-warranty; keep intact all the notices that refer to this
-License and to the absence of any warranty; and give any
-other recipients of the Program a copy of this License along
-with the Program.
+Activities other than copying, distribution and modification are not covered by
+this License; they are outside its scope.  The act of running the Program is
+not restricted, and the output from the Program is covered only if its contents
+constitute a work based on the Program (independent of having been made by
+running the Program).  Whether that is true depends on what the Program does.
 
-You may charge a fee for the physical act of transferring a
-copy, and you may at your option offer warranty protection
-in exchange for a fee.
+1. You may copy and distribute verbatim copies of the Program's source code as
+you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this License
+and to the absence of any warranty; and give any other recipients of the
+Program a copy of this License along with the Program.
 
-2. You may modify your copy or copies of the Program or any
-portion of it, thus forming a work based on the Program, and
-copy and distribute such modifications or work under the
-terms of Section 1 above, provided that you also meet all of
+You may charge a fee for the physical act of transferring a copy, and you may
+at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus
+forming a work based on the Program, and copy and distribute such modifications
+or work under the terms of Section 1 above, provided that you also meet all of
 these conditions:
 
-    a) You must cause the modified files to carry prominent
-    notices stating that you changed the files and the date
-    of any change.
+    a) You must cause the modified files to carry prominent notices stating
+    that you changed the files and the date of any change.
 
-    b) You must cause any work that you distribute or
-    publish, that in whole or in part contains or is derived
-    from the Program or any part thereof, to be licensed as
-    a whole at no charge to all third parties under the
-    terms of this License.
+    b) You must cause any work that you distribute or publish, that in whole or
+    in part contains or is derived from the Program or any part thereof, to be
+    licensed as a whole at no charge to all third parties under the terms of
+    this License.
 
-    c) If the modified program normally reads commands
-    interactively when run, you must cause it, when started
-    running for such interactive use in the most ordinary
-    way, to print or display an announcement including an
-    appropriate copyright notice and a notice that there is
-    no warranty (or else, saying that you provide a
-    warranty) and that users may redistribute the program
-    under these conditions, and telling the user how to view
-    a copy of this License. (Exception: if the Program
-    itself is interactive but does not normally print such
-    an announcement, your work based on the Program is not
-    required to print an announcement.)
+    c) If the modified program normally reads commands interactively when run,
+    you must cause it, when started running for such interactive use in the
+    most ordinary way, to print or display an announcement including an
+    appropriate copyright notice and a notice that there is no warranty (or
+    else, saying that you provide a warranty) and that users may redistribute
+    the program under these conditions, and telling the user how to view a copy
+    of this License.  (Exception: if the Program itself is interactive but does
+    not normally print such an announcement, your work based on the Program is
+    not required to print an announcement.)
 
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the
-Program, and can be reasonably considered independent and
-separate works in themselves, then this License, and its
-terms, do not apply to those sections when you distribute
-them as separate works. But when you distribute the same
-sections as part of a whole which is a work based on the
-Program, the distribution of the whole must be on the terms
-of this License, whose permissions for other licensees
-extend to the entire whole, and thus to each and every part
-regardless of who wrote it.
+These requirements apply to the modified work as a whole.  If identifiable
+sections of that work are not derived from the Program, and can be reasonably
+considered independent and separate works in themselves, then this License, and
+its terms, do not apply to those sections when you distribute them as separate
+works.  But when you distribute the same sections as part of a whole which is a
+work based on the Program, the distribution of the whole must be on the terms
+of this License, whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote it.
 
-Thus, it is not the intent of this section to claim rights
-or contest your rights to work written entirely by you;
-rather, the intent is to exercise the right to control the
-distribution of derivative or collective works based on the
-Program.
+Thus, it is not the intent of this section to claim rights or contest your
+rights to work written entirely by you; rather, the intent is to exercise the
+right to control the distribution of derivative or collective works based on
+the Program.
 
-In addition, mere aggregation of another work not based on
-the Program with the Program (or with a work based on the
-Program) on a volume of a storage or distribution medium
-does not bring the other work under the scope of this
+In addition, mere aggregation of another work not based on the Program with the
+Program (or with a work based on the Program) on a volume of a storage or
+distribution medium does not bring the other work under the scope of this
 License.
 
-3. You may copy and distribute the Program (or a work based
-on it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you
-also do one of the following:
+3. You may copy and distribute the Program (or a work based on it, under
+Section 2) in object code or executable form under the terms of Sections 1 and
+2 above provided that you also do one of the following:
 
-    a) Accompany it with the complete corresponding
-    machine-readable source code, which must be distributed
-    under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
+    a) Accompany it with the complete corresponding machine-readable source
+    code, which must be distributed under the terms of Sections 1 and 2 above
+    on a medium customarily used for software interchange; or,
 
-    b) Accompany it with a written offer, valid for at least
-    three years, to give any third party, for a charge no
-    more than your cost of physically performing source
-    distribution, a complete machine-readable copy of the
-    corresponding source code, to be distributed under the
-    terms of Sections 1 and 2 above on a medium customarily
-    used for software interchange; or,
+    b) Accompany it with a written offer, valid for at least three years, to
+    give any third party, for a charge no more than your cost of physically
+    performing source distribution, a complete machine-readable copy of the
+    corresponding source code, to be distributed under the terms of Sections 1
+    and 2 above on a medium customarily used for software interchange; or,
 
-    c) Accompany it with the information you received as to
-    the offer to distribute corresponding source code. (This
-    alternative is allowed only for noncommercial
-    distribution and only if you received the program in
-    object code or executable form with such an offer, in
-    accord with Subsection b above.)
+    c) Accompany it with the information you received as to the offer to
+    distribute corresponding source code.  (This alternative is allowed only
+    for noncommercial distribution and only if you received the program in
+    object code or executable form with such an offer, in accord with
+    Subsection b above.)
 
-The source code for a work means the preferred form of the
-work for making modifications to it. For an executable work,
-complete source code means all the source code for all
-modules it contains, plus any associated interface
-definition files, plus the scripts used to control
-compilation and installation of the executable. However, as
-a special exception, the source code distributed need not
-include anything that is normally distributed (in either
-source or binary form) with the major components (compiler,
-kernel, and so on) of the operating system on which the
-executable runs, unless that component itself accompanies
-the executable.
+The source code for a work means the preferred form of the work for making
+modifications to it.  For an executable work, complete source code means all
+the source code for all modules it contains, plus any associated interface
+definition files, plus the scripts used to control compilation and installation
+of the executable.  However, as a special exception, the source code
+distributed need not include anything that is normally distributed (in either
+source or binary form) with the major components (compiler, kernel, and so on)
+of the operating system on which the executable runs, unless that component
+itself accompanies the executable.
 
-If distribution of executable or object code is made by
-offering access to copy from a designated place, then
-offering equivalent access to copy the source code from the
-same place counts as distribution of the source code, even
-though third parties are not compelled to copy the source
-along with the object code.
+If distribution of executable or object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the source
+code from the same place counts as distribution of the source code, even though
+third parties are not compelled to copy the source along with the object code.
 
-4. You may not copy, modify, sublicense, or distribute the
-Program except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense or distribute
-the Program is void, and will automatically terminate your
-rights under this License. However, parties who have
-received copies, or rights, from you under this License will
-not have their licenses terminated so long as such parties
-remain in full compliance.
+4. You may not copy, modify, sublicense, or distribute the Program except as
+expressly provided under this License.  Any attempt otherwise to copy, modify,
+sublicense or distribute the Program is void, and will automatically terminate
+your rights under this License.  However, parties who have received copies, or
+rights, from you under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
 
-5. You are not required to accept this License, since you
-have not signed it. However, nothing else grants you
-permission to modify or distribute the Program or its
-derivative works. These actions are prohibited by law if you
-do not accept this License. Therefore, by modifying or
-distributing the Program (or any work based on the Program),
-you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or
-modifying the Program or works based on it.
+5. You are not required to accept this License, since you have not signed it.
+However, nothing else grants you permission to modify or distribute the Program
+or its derivative works.  These actions are prohibited by law if you do not
+accept this License.  Therefore, by modifying or distributing the Program (or
+any work based on the Program), you indicate your acceptance of this License to
+do so, and all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
 
-6. Each time you redistribute the Program (or any work based
-on the Program), the recipient automatically receives a
-license from the original licensor to copy, distribute or
-modify the Program subject to these terms and conditions.
-You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are
-not responsible for enforcing compliance by third parties to
-this License.
+6. Each time you redistribute the Program (or any work based on the Program),
+the recipient automatically receives a license from the original licensor to
+copy, distribute or modify the Program subject to these terms and conditions.
+You may not impose any further restrictions on the recipients' exercise of the
+rights granted herein.  You are not responsible for enforcing compliance by
+third parties to this License.
 
-7. If, as a consequence of a court judgment or allegation of
-patent infringement or for any other reason (not limited to
-patent issues), conditions are imposed on you (whether by
-court order, agreement or otherwise) that contradict the
-conditions of this License, they do not excuse you from the
-conditions of this License. If you cannot distribute so as
-to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a
-consequence you may not distribute the Program at all. For
-example, if a patent license would not permit royalty-free
-redistribution of the Program by all those who receive
-copies directly or indirectly through you, then the only way
-you could satisfy both it and this License would be to
+7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues), conditions
+are imposed on you (whether by court order, agreement or otherwise) that
+contradict the conditions of this License, they do not excuse you from the
+conditions of this License.  If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other pertinent
+obligations, then as a consequence you may not distribute the Program at all.
+For example, if a patent license would not permit royalty-free redistribution
+of the Program by all those who receive copies directly or indirectly through
+you, then the only way you could satisfy both it and this License would be to
 refrain entirely from distribution of the Program.
 
-If any portion of this section is held invalid or
-unenforceable under any particular circumstance, the balance
-of the section is intended to apply and the section as a
-whole is intended to apply in other circumstances.
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply and
+the section as a whole is intended to apply in other circumstances.
 
-It is not the purpose of this section to induce you to
-infringe any patents or other property right claims or to
-contest validity of any such claims; this section has the
-sole purpose of protecting the integrity of the free
-software distribution system, which is implemented by public
-license practices. Many people have made generous
-contributions to the wide range of software distributed
-through that system in reliance on consistent application of
-that system; it is up to the author/donor to decide if he or
-she is willing to distribute software through any other
-system and a licensee cannot impose that choice.
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this
+section has the sole purpose of protecting the integrity of the free software
+distribution system, which is implemented by public license practices.  Many
+people have made generous contributions to the wide range of software
+distributed through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing to
+distribute software through any other system and a licensee cannot impose that
+choice.
 
-This section is intended to make thoroughly clear what is
-believed to be a consequence of the rest of this License.
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
 
-8. If the distribution and/or use of the Program is
-restricted in certain countries either by patents or by
-copyrighted interfaces, the original copyright holder who
-places the Program under this License may add an explicit
-geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or
-among countries not thus excluded. In such case, this
-License incorporates the limitation as if written in the
-body of this License.
+8. If the distribution and/or use of the Program is restricted in certain
+countries either by patents or by copyrighted interfaces, the original
+copyright holder who places the Program under this License may add an explicit
+geographical distribution limitation excluding those countries, so that
+distribution is permitted only in or among countries not thus excluded.  In
+such case, this License incorporates the limitation as if written in the body
+of this License.
 
-9. The Free Software Foundation may publish revised and/or
-new versions of the General Public License from time to
-time. Such new versions will be similar in spirit to the
-present version, but may differ in detail to address new
-problems or concerns.
+9. The Free Software Foundation may publish revised and/or new versions of the
+General Public License from time to time.  Such new versions will be similar in
+spirit to the present version, but may differ in detail to address new problems
+or concerns.
 
-Each version is given a distinguishing version number. If
-the Program specifies a version number of this License which
-applies to it and "any later version", you have the option
-of following the terms and conditions either of that version
-or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number
-of this License, you may choose any version ever published
-by the Free Software Foundation.
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any later
+version", you have the option of following the terms and conditions either of
+that version or of any later version published by the Free Software Foundation.
+If the Program does not specify a version number of this License, you may
+choose any version ever published by the Free Software Foundation.
 
-10. If you wish to incorporate parts of the Program into
-other free programs whose distribution conditions are
-different, write to the author to ask for permission. For
-software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we
-sometimes make exceptions for this. Our decision will be
-guided by the two goals of preserving the free status of all
-derivatives of our free software and of promoting the
-sharing and reuse of software generally.
+10. If you wish to incorporate parts of the Program into other free programs
+whose distribution conditions are different, write to the author to ask for
+permission.  For software which is copyrighted by the Free Software Foundation,
+write to the Free Software Foundation; we sometimes make exceptions for this.
+Our decision will be guided by the two goals of preserving the free status of
+all derivatives of our free software and of promoting the sharing and reuse of
+software generally.
 
 NO WARRANTY
 
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS
-NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
-COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
-"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
-OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
-DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE,
+YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED
-TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY
-WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED
-ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
-SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
-THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT
-LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
-LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
-PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
-HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
+PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
+BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
+OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 
-              END OF TERMS AND CONDITIONS
+END OF TERMS AND CONDITIONS
 
-       How to Apply These Terms to Your New Programs
+How to Apply These Terms to Your New Programs
 
-If you develop a new program, and you want it to be of the
-greatest possible use to the public, the best way to achieve
-this is to make it free software which everyone can
-redistribute and change under these terms.
+If you develop a new program, and you want it to be of the greatest possible
+use to the public, the best way to achieve this is to make it free software
+which everyone can redistribute and change under these terms.
 
-To do so, attach the following notices to the program. It is
-safest to attach them to the start of each source file to
-most effectively convey the exclusion of warranty; and each
-file should have at least the "copyright" line and a pointer
-to where the full notice is found.
+To do so, attach the following notices to the program.  It is safest to attach
+them to the start of each source file to most effectively convey the exclusion
+of warranty; and each file should have at least the "copyright" line and a
+pointer to where the full notice is found.
 
-    One line to give the program's name and a brief idea of
-    what it does. Copyright (C) <year> <name of author>
+    One line to give the program's name and a brief idea of what it does.
 
-    This program is free software; you can redistribute it
-    and/or modify it under the terms of the GNU General
-    Public License as published by the Free Software
-    Foundation; either version 2 of the License, or (at your
-    option) any later version.
+    Copyright (C) <year> <name of author>
 
-    This program is distributed in the hope that it will be
-    useful, but WITHOUT ANY WARRANTY; without even the
-    implied warranty of MERCHANTABILITY or FITNESS FOR A
-    PARTICULAR PURPOSE. See the GNU General Public License
-    for more details.
+    This program is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the Free
+    Software Foundation; either version 2 of the License, or (at your option)
+    any later version.
 
-    You should have received a copy of the GNU General
-    Public License along with this program; if not, write to
-    the Free Software Foundation, Inc., 59 Temple Place,
-    Suite 330, Boston, MA 02111-1307 USA
+    This program is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+    more details.
 
-Also add information on how to contact you by electronic and
-paper mail.
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-If the program is interactive, make it output a short notice
-like this when it starts in an interactive mode:
+Also add information on how to contact you by electronic and paper mail.
 
-    Gnomovision version 69, Copyright (C) year name of
-    author Gnomovision comes with ABSOLUTELY NO WARRANTY;
-    for details type `show w'. This is free software, and
-    you are welcome to redistribute it under certain
-    conditions; type `show c' for details.
+If the program is interactive, make it output a short notice like this when it
+starts in an interactive mode:
 
-The hypothetical commands `show w' and `show c' should show
-the appropriate parts of the General Public License. Of
-course, the commands you use may be called something other
-than `show w' and `show c'; they could even be mouse-clicks
-or menu items--whatever suits your program.
+    Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
+    with ABSOLUTELY NO WARRANTY; for details type 'show w'.  This is free
+    software, and you are welcome to redistribute it under certain conditions;
+    type 'show c' for details.
 
-You should also get your employer (if you work as a
-programmer) or your school, if any, to sign a "copyright
-disclaimer" for the program, if necessary. Here is a sample;
-alter the names:
+The hypothetical commands 'show w' and 'show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may be
+called something other than 'show w' and 'show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
 
-  Yoyodyne, Inc., hereby disclaims all copyright interest in
-  the program `Gnomovision' (which makes passes at
-  compilers) written by James Hacker.
+You should also get your employer (if you work as a programmer) or your school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.  Here
+is a sample; alter the names:
 
-  signature of Ty Coon, 1 April 1989
-  Ty Coon, President of Vice
+    Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+    'Gnomovision' (which makes passes at compilers) written by James Hacker.
 
-This General Public License does not permit incorporating
-your program into proprietary programs. If your program is a
-subroutine library, you may consider it more useful to
-permit linking proprietary applications with the library. If
-this is what you want to do, use the GNU Library General
-Public License instead of this License.
+    signature of Ty Coon, 1 April 1989
+
+    Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General Public
+License instead of this License.
 
 
-"CLASSPATH" EXCEPTION TO THE GPL VERSION 2
+"CLASSPATH" EXCEPTION TO THE GPL
 
+Certain source files distributed by Oracle America and/or its affiliates are
+subject to the following clarification and special exception to the GPL, but
+only where Oracle has expressly included in the particular source file's header
+the words "Oracle designates this particular file as subject to the "Classpath"
+exception as provided by Oracle in the LICENSE file that accompanied this code."
 
-Certain source files distributed by Sun Microsystems, Inc.
-are subject to the following clarification and special
-exception to the GPL, but only where Sun has expressly
-included in the particular source file's header the words
-"Sun designates this particular file as subject to the
-"Classpath" exception as provided by Sun in the LICENSE file
-that accompanied this code."
+    Linking this library statically or dynamically with other modules is making
+    a combined work based on this library.  Thus, the terms and conditions of
+    the GNU General Public License cover the whole combination.
 
-Linking this library statically or dynamically with other
-modules is making a combined work based on this library.
-Thus, the terms and conditions of the GNU General Public
-License cover the whole combination.
-
-As a special exception, the copyright holders of this
-library give you permission to link this library with
-independent modules to produce an executable, regardless of
-the license terms of these independent modules, and to copy
-and distribute the resulting executable under terms of your
-choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license
-of that module. An independent module is a module which is
-not derived from or based on this library. If you modify
-this library, you may extend this exception to your version
-of the library, but you are not obligated to do so. If you
-do not wish to do so, delete this exception statement from
-your version.
+    As a special exception, the copyright holders of this library give you
+    permission to link this library with independent modules to produce an
+    executable, regardless of the license terms of these independent modules,
+    and to copy and distribute the resulting executable under terms of your
+    choice, provided that you also meet, for each linked independent module,
+    the terms and conditions of the license of that module.  An independent
+    module is a module which is not derived from or based on this library.  If
+    you modify this library, you may extend this exception to your version of
+    the library, but you are not obligated to do so.  If you do not wish to do
+    so, delete this exception statement from your version.
diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesAction.java b/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesAction.java
index 076d077..f3563b9 100644
--- a/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesAction.java
+++ b/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesAction.java
@@ -155,7 +155,7 @@
     private static ImportData computeUses(final PHPParseResult parserResult, final int caretPosition) {
         Map<String, List<UsedNamespaceName>> filteredExistingNames = new UsedNamesCollector(parserResult, caretPosition).collectNames();
         Index index = parserResult.getModel().getIndexScope().getIndex();
-        NamespaceScope namespaceScope = ModelUtils.getNamespaceScope(parserResult.getModel().getFileScope(), caretPosition);
+        NamespaceScope namespaceScope = ModelUtils.getNamespaceScope(parserResult, caretPosition);
         assert namespaceScope != null;
         ImportData importData = new ImportDataCreator(filteredExistingNames, index, namespaceScope.getNamespaceName(), createOptions(parserResult)).create();
         importData.caretPosition = caretPosition;
diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesPerformer.java b/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesPerformer.java
index 32a1823..24dbcfd 100644
--- a/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesPerformer.java
+++ b/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesPerformer.java
@@ -34,6 +34,7 @@
 import org.netbeans.editor.BaseDocument;
 import org.netbeans.modules.csl.api.EditList;
 import org.netbeans.modules.csl.api.OffsetRange;
+import org.netbeans.modules.csl.spi.support.CancelSupport;
 import org.netbeans.modules.editor.indent.api.IndentUtils;
 import org.netbeans.modules.php.api.PhpVersion;
 import org.netbeans.modules.php.editor.CodeUtils;
@@ -53,10 +54,14 @@
 import org.netbeans.modules.php.editor.parser.PHPParseResult;
 import org.netbeans.modules.php.editor.parser.UnusedUsesCollector;
 import org.netbeans.modules.php.editor.parser.UnusedUsesCollector.UnusedOffsetRanges;
+import org.netbeans.modules.php.editor.parser.astnodes.DeclareStatement;
+import org.netbeans.modules.php.editor.parser.astnodes.NamespaceDeclaration;
 import org.netbeans.modules.php.editor.parser.astnodes.Program;
 import org.netbeans.modules.php.editor.parser.astnodes.UseStatement;
 import org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor;
+import org.openide.awt.StatusDisplayer;
 import org.openide.util.Exceptions;
+import org.openide.util.NbBundle;
 
 /**
  *
@@ -109,11 +114,12 @@
         }
     }
 
+    @NbBundle.Messages("FixUsesPerformer.noChanges=Fix imports: No Changes")
     private void processSelections() {
         final List<ImportData.DataItem> dataItems = resolveDuplicateSelections();
-        NamespaceScope namespaceScope = ModelUtils.getNamespaceScope(parserResult.getModel().getFileScope(), importData.caretPosition);
+        NamespaceScope namespaceScope = ModelUtils.getNamespaceScope(parserResult, importData.caretPosition);
         assert namespaceScope != null;
-        int startOffset = getOffset(baseDocument, namespaceScope);
+        int startOffset = getOffset(baseDocument, namespaceScope, parserResult, importData.caretPosition);
         List<UsePart> useParts = new ArrayList<>();
         Collection<? extends GroupUseScope> declaredGroupUses = namespaceScope.getDeclaredGroupUses();
         for (GroupUseScope groupUseElement : declaredGroupUses) {
@@ -142,7 +148,13 @@
             }
         }
         replaceUnimportedItems();
-        editList.replace(startOffset, 0, createInsertString(useParts), false, 0);
+        String insertString = createInsertString(useParts);
+        // avoid being recognized as a modified file
+        if (insertString.isEmpty()) {
+            StatusDisplayer.getDefault().setStatusText(Bundle.FixUsesPerformer_noChanges());
+        } else {
+            editList.replace(startOffset, 0, insertString, false, 0);
+        }
     }
 
     private void replaceUnimportedItems() {
@@ -428,7 +440,7 @@
         return result;
     }
 
-    private static int getOffset(BaseDocument baseDocument, NamespaceScope namespaceScope) {
+    private static int getOffset(BaseDocument baseDocument, NamespaceScope namespaceScope, PHPParseResult parserResult, int caretPosition) {
         try {
             ModelElement lastSingleUse = getLastUse(namespaceScope, false);
             ModelElement lastGroupUse = getLastUse(namespaceScope, true);
@@ -447,7 +459,36 @@
                 // XXX is this correct?
                 return LineDocumentUtils.getLineEnd(baseDocument, lastGroupUse.getNameRange().getEnd());
             }
-            return LineDocumentUtils.getLineEnd(baseDocument, namespaceScope.getOffset());
+            // NETBEANS-4978 check whether declare statemens exist
+            // e.g. in the following case, insert the code(use statements) after the declare statement
+            // declare (strict_types=1);
+            // class TestClass
+            // {
+            //     public function __construct()
+            //     {
+            //         $test = new Foo();
+            //     }
+            // }
+            int offset = LineDocumentUtils.getLineEnd(baseDocument, namespaceScope.getOffset());
+            CheckVisitor checkVisitor = new CheckVisitor();
+            parserResult.getProgram().accept(checkVisitor);
+            if (namespaceScope.isDefaultNamespace()) {
+                List<NamespaceDeclaration> globalNamespaceDeclarations = checkVisitor.getGlobalNamespaceDeclarations();
+                if (!globalNamespaceDeclarations.isEmpty()) {
+                    offset = globalNamespaceDeclarations.get(0).getBody().getStartOffset() + 1; // +1: {
+                }
+                for (NamespaceDeclaration globalNamespace : globalNamespaceDeclarations) {
+                    if (globalNamespace.getStartOffset() <= caretPosition
+                            && caretPosition <= globalNamespace.getEndOffset()) {
+                        offset = globalNamespace.getBody().getStartOffset() + 1; // +1: {
+                        break;
+                    }
+                }
+            }
+            for (DeclareStatement declareStatement : checkVisitor.getDeclareStatements()) {
+                offset = Math.max(offset, declareStatement.getEndOffset());
+            }
+            return offset;
         } catch (BadLocationException ex) {
             Exceptions.printStackTrace(ex);
         }
@@ -467,6 +508,41 @@
         return offsetElement;
     }
 
+    //~ inner classes
+    private static class CheckVisitor extends DefaultVisitor {
+
+        private List<DeclareStatement> declareStatements = new ArrayList();
+        private List<NamespaceDeclaration> globalNamespaceDeclarations = new ArrayList();
+
+        public List<DeclareStatement> getDeclareStatements() {
+            return Collections.unmodifiableList(declareStatements);
+        }
+
+        public List<NamespaceDeclaration> getGlobalNamespaceDeclarations() {
+            return Collections.unmodifiableList(globalNamespaceDeclarations);
+        }
+
+        @Override
+        public void visit(DeclareStatement node) {
+            if (CancelSupport.getDefault().isCancelled()) {
+                return;
+            }
+            declareStatements.add(node);
+            super.visit(node);
+        }
+
+        @Override
+        public void visit(NamespaceDeclaration declaration) {
+            if (CancelSupport.getDefault().isCancelled()) {
+                return;
+            }
+            if (declaration.isBracketed() && declaration.getName() == null) {
+                globalNamespaceDeclarations.add(declaration);
+            }
+            super.visit(declaration);
+        }
+    }
+
     private interface AliasStrategy {
         String createAlias(final QualifiedName qualifiedName);
     }
diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/actions/UsedNamesCollector.java b/php/php.editor/src/org/netbeans/modules/php/editor/actions/UsedNamesCollector.java
index b981b3f..e49b369 100644
--- a/php/php.editor/src/org/netbeans/modules/php/editor/actions/UsedNamesCollector.java
+++ b/php/php.editor/src/org/netbeans/modules/php/editor/actions/UsedNamesCollector.java
@@ -18,6 +18,7 @@
  */
 package org.netbeans.modules.php.editor.actions;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -25,6 +26,7 @@
 import java.util.List;
 import java.util.Map;
 import org.netbeans.modules.csl.api.OffsetRange;
+import org.netbeans.modules.csl.spi.support.CancelSupport;
 import org.netbeans.modules.php.editor.api.AliasedName;
 import org.netbeans.modules.php.editor.api.QualifiedName;
 import org.netbeans.modules.php.editor.model.ModelUtils;
@@ -33,6 +35,7 @@
 import org.netbeans.modules.php.editor.model.impl.Type;
 import org.netbeans.modules.php.editor.parser.PHPParseResult;
 import org.netbeans.modules.php.editor.parser.astnodes.ASTNode;
+import org.netbeans.modules.php.editor.parser.astnodes.Block;
 import org.netbeans.modules.php.editor.parser.astnodes.NamespaceDeclaration;
 import org.netbeans.modules.php.editor.parser.astnodes.NamespaceName;
 import org.netbeans.modules.php.editor.parser.astnodes.PHPDocTypeNode;
@@ -62,9 +65,45 @@
     }
 
     public Map<String, List<UsedNamespaceName>> collectNames() {
-        NamespaceScope namespaceScope = ModelUtils.getNamespaceScope(parserResult.getModel().getFileScope(), caretPosition);
+        NamespaceScope namespaceScope = ModelUtils.getNamespaceScope(parserResult, caretPosition);
         assert namespaceScope != null;
         OffsetRange offsetRange = namespaceScope.getBlockRange();
+        // in the following case, avoid being inserted incorrect uses
+        // because default namespace range is whole file...
+        // // caret here^
+        // declare (strict_types=1);
+        //
+        // namespace {
+        //     class GlobalNamespace {}
+        // }
+        //
+        // namespace Test {
+        //     class TestClass {
+        //         public function __construct()
+        //         {
+        //             $test = new Foo();
+        //         }
+        //         public function test(?Foo $foo): ?Foo
+        //         {
+        //             return null;
+        //         }
+        //     }
+        // }
+        if (namespaceScope.isDefaultNamespace()) {
+            NamespaceDeclarationVisitor namespaceDeclarationVisitor = new NamespaceDeclarationVisitor();
+            parserResult.getProgram().accept(namespaceDeclarationVisitor);
+            List<NamespaceDeclaration> globalNamespaces = namespaceDeclarationVisitor.getGlobalNamespaceDeclarations();
+            if (!globalNamespaces.isEmpty()) {
+                Block body = globalNamespaces.get(0).getBody();
+                offsetRange = new OffsetRange(body.getStartOffset(), body.getEndOffset());
+            }
+            for (NamespaceDeclaration globalNamespace : globalNamespaces) {
+                if (globalNamespace.getBody().getStartOffset() <= caretPosition
+                        && caretPosition <= globalNamespace.getBody().getEndOffset()) {
+                    offsetRange = new OffsetRange(globalNamespace.getBody().getStartOffset(), globalNamespace.getBody().getEndOffset());
+                }
+            }
+        }
         Collection<? extends UseScope> declaredUses = namespaceScope.getAllDeclaredSingleUses();
         NamespaceNameVisitor namespaceNameVisitor = new NamespaceNameVisitor(offsetRange);
         parserResult.getProgram().accept(namespaceNameVisitor);
@@ -171,4 +210,24 @@
 
     }
 
+    private static class NamespaceDeclarationVisitor extends DefaultVisitor {
+
+        private final List<NamespaceDeclaration> globalNamespaceDeclarations = new ArrayList<>();
+
+        public List<NamespaceDeclaration> getGlobalNamespaceDeclarations() {
+            return Collections.unmodifiableList(globalNamespaceDeclarations);
+        }
+
+        @Override
+        public void visit(NamespaceDeclaration node) {
+            if (CancelSupport.getDefault().isCancelled()) {
+                return;
+            }
+            if (node.isBracketed() && node.getName() == null) {
+                globalNamespaceDeclarations.add(node);
+            }
+            super.visit(node);
+        }
+
+    }
 }
diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/model/ModelUtils.java b/php/php.editor/src/org/netbeans/modules/php/editor/model/ModelUtils.java
index ba45cf3..351f8a9 100644
--- a/php/php.editor/src/org/netbeans/modules/php/editor/model/ModelUtils.java
+++ b/php/php.editor/src/org/netbeans/modules/php/editor/model/ModelUtils.java
@@ -37,6 +37,7 @@
 import org.netbeans.api.annotations.common.NonNull;
 import org.netbeans.api.lexer.TokenSequence;
 import org.netbeans.modules.csl.api.OffsetRange;
+import org.netbeans.modules.csl.spi.support.CancelSupport;
 import org.netbeans.modules.parsing.api.ParserManager;
 import org.netbeans.modules.parsing.api.ResultIterator;
 import org.netbeans.modules.parsing.api.Source;
@@ -60,6 +61,7 @@
 import org.netbeans.modules.php.editor.parser.astnodes.NamespaceDeclaration;
 import org.netbeans.modules.php.editor.parser.astnodes.StaticDispatch;
 import org.netbeans.modules.php.editor.parser.astnodes.VariableBase;
+import org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor;
 import org.openide.filesystems.FileObject;
 import org.openide.util.RequestProcessor;
 
@@ -424,6 +426,70 @@
         return retval;
     }
 
+    public static NamespaceScope getNamespaceScope(PHPParseResult parserResult, int offset) {
+        // NETBEANS-4978
+        // if the caret position is not in each namespace scope, get the first namespace scope
+        // e.g.
+        // [original]
+        // // caret is here^
+        // declare (strict_types=1);
+        // namespace Foo;
+        // ...
+        // namespace Bar;
+        //
+        // [inserted]
+        // // caret is here
+        // declare (strict_types=1);
+        // namespace Foo;
+        // use ...;
+        // ...
+        // namespace Bar;
+        FileScope fileScope = parserResult.getModel().getFileScope();
+        List<NamespaceDeclaration> namespaceDeclarations = getNamespaceDeclarations(parserResult);
+        boolean isBracketed = false;
+        if (!namespaceDeclarations.isEmpty()) {
+            isBracketed = namespaceDeclarations.get(0).isBracketed();
+        }
+        NamespaceScope retval = ModelUtils.getNamespaceScope(fileScope, offset);
+        assert retval != null;
+        Collection<? extends NamespaceScope> declaredNamespaces = fileScope.getDeclaredNamespaces();
+        if (retval != null && retval.isDefaultNamespace()) {
+            // get the first namespace scope
+            if (isBracketed) {
+                for (NamespaceDeclaration namespaceDeclaration : namespaceDeclarations) {
+                    if (namespaceDeclaration.getName() == null
+                            && namespaceDeclaration.getStartOffset() <= offset && offset <= namespaceDeclaration.getEndOffset()) {
+                        return retval;
+                    }
+                }
+                if (namespaceDeclarations.get(0).getName() == null) {
+                    return retval;
+                }
+                retval = getFirstNamespaceScope(declaredNamespaces, retval);
+            }
+            if (!isBracketed && !namespaceDeclarations.isEmpty()) {
+                // if namespace is not bracketed,
+                // both the global namespace and another namespace don't exist in the same file
+                retval = getFirstNamespaceScope(declaredNamespaces, retval);
+            }
+        }
+        return retval;
+    }
+
+    private static NamespaceScope getFirstNamespaceScope(Collection<? extends NamespaceScope> declaredNamespaces, NamespaceScope namespace) {
+        NamespaceScope retval = namespace;
+        for (NamespaceScope namespaceScope : declaredNamespaces) {
+            if (!namespaceScope.isDefaultNamespace()) {
+                if (retval.isDefaultNamespace()) {
+                    retval = namespaceScope;
+                } else if (retval.getBlockRange().getStart() > namespaceScope.getBlockRange().getStart()) {
+                    retval = namespaceScope;
+                }
+            }
+        }
+        return retval;
+    }
+
     @CheckForNull
     public static TypeScope getTypeScope(ModelElement element) {
         TypeScope retval = (element instanceof TypeScope) ? (TypeScope) element : null;
@@ -653,4 +719,37 @@
         return scope instanceof FunctionScope
                 && ((FunctionScope) scope).isAnonymous();
     }
+
+    private static List<NamespaceDeclaration> getNamespaceDeclarations(PHPParseResult parserResult) {
+        NamespaceDeclarationVisitor checkVisitor = new NamespaceDeclarationVisitor();
+        parserResult.getProgram().accept(checkVisitor);
+        return checkVisitor.getNamespaceDeclarations();
+    }
+
+    private static class NamespaceDeclarationVisitor extends DefaultVisitor {
+
+        private final List<NamespaceDeclaration> namespaceDeclarations = new ArrayList<>();
+        private final List<NamespaceDeclaration> globalNamespaceDeclarations = new ArrayList<>();
+
+        public List<NamespaceDeclaration> getNamespaceDeclarations() {
+            return Collections.unmodifiableList(namespaceDeclarations);
+        }
+
+        public List<NamespaceDeclaration> getGlobalNamespaceDeclarations() {
+            return Collections.unmodifiableList(globalNamespaceDeclarations);
+        }
+
+        @Override
+        public void visit(NamespaceDeclaration node) {
+            if (CancelSupport.getDefault().isCancelled()) {
+                return;
+            }
+            namespaceDeclarations.add(node);
+            if (node.isBracketed() && node.getName() == null) {
+                globalNamespaceDeclarations.add(node);
+            }
+            super.visit(node);
+        }
+
+    }
 }
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_01.php b/php/php.editor/test/unit/data/testfiles/actions/nb4978_01.php
new file mode 100644
index 0000000..8784f66
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_01.php
@@ -0,0 +1,39 @@
+<?php
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace TestNamespace;
+
+class TestClass
+{
+
+    public function __construct()
+    {
+        $test = new Foo();
+    }
+
+    public function test(?Foo $foo): ?Foo
+    {
+        return null;
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_01.php.usedNames b/php/php.editor/test/unit/data/testfiles/actions/nb4978_01.php.usedNames
new file mode 100644
index 0000000..cb532de
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_01.php.usedNames
@@ -0,0 +1,4 @@
+Name: Foo
+ Foo --> Foo:955
+ Foo --> Foo:995
+ Foo --> Foo:1007
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_02.php b/php/php.editor/test/unit/data/testfiles/actions/nb4978_02.php
new file mode 100644
index 0000000..dc45f22
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_02.php
@@ -0,0 +1,37 @@
+<?php
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+class TestClass
+{
+
+    public function __construct()
+    {
+        $test = new Foo();
+    }
+
+    public function test(?Foo $foo): ?Foo
+    {
+        return null;
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_02.php.usedNames b/php/php.editor/test/unit/data/testfiles/actions/nb4978_02.php.usedNames
new file mode 100644
index 0000000..0c6fbf0
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_02.php.usedNames
@@ -0,0 +1,4 @@
+Name: Foo
+ Foo --> Foo:929
+ Foo --> Foo:969
+ Foo --> Foo:981
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_03.php b/php/php.editor/test/unit/data/testfiles/actions/nb4978_03.php
new file mode 100644
index 0000000..f88eef9
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_03.php
@@ -0,0 +1,43 @@
+<?php
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace TestNamespace;
+
+class TestClass
+{
+
+    public function __construct()
+    {
+        $test = new Foo();
+    }
+
+    public function test(?Foo $foo): ?Foo
+    {
+        return null;
+    }
+
+}
+
+namespace Foo\Foo;
+
+class Foo {}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_03.php.usedNames b/php/php.editor/test/unit/data/testfiles/actions/nb4978_03.php.usedNames
new file mode 100644
index 0000000..cb532de
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_03.php.usedNames
@@ -0,0 +1,4 @@
+Name: Foo
+ Foo --> Foo:955
+ Foo --> Foo:995
+ Foo --> Foo:1007
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_04.php b/php/php.editor/test/unit/data/testfiles/actions/nb4978_04.php
new file mode 100644
index 0000000..db1dca2
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_04.php
@@ -0,0 +1,45 @@
+<?php
+
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace Test {
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
+
+namespace Foo\Foo {
+    class Foo {}
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_04.php.usedNames b/php/php.editor/test/unit/data/testfiles/actions/nb4978_04.php.usedNames
new file mode 100644
index 0000000..c4fcf1a
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_04.php.usedNames
@@ -0,0 +1,4 @@
+Name: Foo
+ Foo --> Foo:964
+ Foo --> Foo:1012
+ Foo --> Foo:1024
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_05.php b/php/php.editor/test/unit/data/testfiles/actions/nb4978_05.php
new file mode 100644
index 0000000..faa032d
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_05.php
@@ -0,0 +1,44 @@
+<?php
+
+/*
+ * 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.
+ */
+
+declare (strict_types=1);
+
+namespace Foo\Foo {
+    class Foo {}
+}
+
+namespace Test {
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_05.php.usedNames b/php/php.editor/test/unit/data/testfiles/actions/nb4978_05.php.usedNames
new file mode 100644
index 0000000..32d6efa
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_05.php.usedNames
@@ -0,0 +1,4 @@
+Name: Foo
+ Foo --> Foo:996
+ Foo --> Foo:1044
+ Foo --> Foo:1056
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_06.php b/php/php.editor/test/unit/data/testfiles/actions/nb4978_06.php
new file mode 100644
index 0000000..de34c1d
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_06.php
@@ -0,0 +1,44 @@
+<?php
+
+/*
+ * 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.
+ */
+
+declare (strict_types=1);
+
+namespace Foo\Foo {
+    class Foo {}
+}
+
+namespace {
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_06.php.usedNames b/php/php.editor/test/unit/data/testfiles/actions/nb4978_06.php.usedNames
new file mode 100644
index 0000000..f434dda
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_06.php.usedNames
@@ -0,0 +1,4 @@
+Name: Foo
+ Foo --> Foo:991
+ Foo --> Foo:1039
+ Foo --> Foo:1051
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_07.php b/php/php.editor/test/unit/data/testfiles/actions/nb4978_07.php
new file mode 100644
index 0000000..2c9bb96
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_07.php
@@ -0,0 +1,45 @@
+<?php
+
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace {
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
+
+namespace Foo\Foo {
+    class Foo {}
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_07.php.usedNames b/php/php.editor/test/unit/data/testfiles/actions/nb4978_07.php.usedNames
new file mode 100644
index 0000000..a46893c
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_07.php.usedNames
@@ -0,0 +1,4 @@
+Name: Foo
+ Foo --> Foo:959
+ Foo --> Foo:1007
+ Foo --> Foo:1019
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_08.php b/php/php.editor/test/unit/data/testfiles/actions/nb4978_08.php
new file mode 100644
index 0000000..9e4d4c4
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_08.php
@@ -0,0 +1,50 @@
+<?php
+
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace {
+    class GlobalNamespace {
+    }
+}
+
+namespace Foo\Foo {
+    class Foo {}
+}
+
+namespace Test {
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/nb4978_08.php.usedNames b/php/php.editor/test/unit/data/testfiles/actions/nb4978_08.php.usedNames
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/nb4978_08.php.usedNames
@@ -0,0 +1 @@
+
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/01/testNB4978_01.php b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/01/testNB4978_01.php
new file mode 100644
index 0000000..8784f66
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/01/testNB4978_01.php
@@ -0,0 +1,39 @@
+<?php
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace TestNamespace;
+
+class TestClass
+{
+
+    public function __construct()
+    {
+        $test = new Foo();
+    }
+
+    public function test(?Foo $foo): ?Foo
+    {
+        return null;
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/01/testNB4978_01.php.fixUses b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/01/testNB4978_01.php.fixUses
new file mode 100644
index 0000000..6e16892
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/01/testNB4978_01.php.fixUses
@@ -0,0 +1,41 @@
+<?php
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace TestNamespace;
+
+use Foo\Foo\Foo;
+
+class TestClass
+{
+
+    public function __construct()
+    {
+        $test = new Foo();
+    }
+
+    public function test(?Foo $foo): ?Foo
+    {
+        return null;
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/02/testNB4978_02.php b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/02/testNB4978_02.php
new file mode 100644
index 0000000..dc45f22
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/02/testNB4978_02.php
@@ -0,0 +1,37 @@
+<?php
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+class TestClass
+{
+
+    public function __construct()
+    {
+        $test = new Foo();
+    }
+
+    public function test(?Foo $foo): ?Foo
+    {
+        return null;
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/02/testNB4978_02.php.fixUses b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/02/testNB4978_02.php.fixUses
new file mode 100644
index 0000000..1c7fb03
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/02/testNB4978_02.php.fixUses
@@ -0,0 +1,39 @@
+<?php
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+use Foo\Foo\Foo;
+
+class TestClass
+{
+
+    public function __construct()
+    {
+        $test = new Foo();
+    }
+
+    public function test(?Foo $foo): ?Foo
+    {
+        return null;
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/03/testNB4978_03.php b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/03/testNB4978_03.php
new file mode 100644
index 0000000..f88eef9
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/03/testNB4978_03.php
@@ -0,0 +1,43 @@
+<?php
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace TestNamespace;
+
+class TestClass
+{
+
+    public function __construct()
+    {
+        $test = new Foo();
+    }
+
+    public function test(?Foo $foo): ?Foo
+    {
+        return null;
+    }
+
+}
+
+namespace Foo\Foo;
+
+class Foo {}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/03/testNB4978_03.php.fixUses b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/03/testNB4978_03.php.fixUses
new file mode 100644
index 0000000..783faf5
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/03/testNB4978_03.php.fixUses
@@ -0,0 +1,45 @@
+<?php
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace TestNamespace;
+
+use Foo\Foo\Foo;
+
+class TestClass
+{
+
+    public function __construct()
+    {
+        $test = new Foo();
+    }
+
+    public function test(?Foo $foo): ?Foo
+    {
+        return null;
+    }
+
+}
+
+namespace Foo\Foo;
+
+class Foo {}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/04/testNB4978_04.php b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/04/testNB4978_04.php
new file mode 100644
index 0000000..db1dca2
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/04/testNB4978_04.php
@@ -0,0 +1,45 @@
+<?php
+
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace Test {
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
+
+namespace Foo\Foo {
+    class Foo {}
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/04/testNB4978_04.php.fixUses b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/04/testNB4978_04.php.fixUses
new file mode 100644
index 0000000..d3049ef
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/04/testNB4978_04.php.fixUses
@@ -0,0 +1,47 @@
+<?php
+
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace Test {
+
+use Foo\Foo\Foo;
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
+
+namespace Foo\Foo {
+    class Foo {}
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/05/testNB4978_05.php b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/05/testNB4978_05.php
new file mode 100644
index 0000000..faa032d
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/05/testNB4978_05.php
@@ -0,0 +1,44 @@
+<?php
+
+/*
+ * 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.
+ */
+
+declare (strict_types=1);
+
+namespace Foo\Foo {
+    class Foo {}
+}
+
+namespace Test {
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/05/testNB4978_05.php.fixUses b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/05/testNB4978_05.php.fixUses
new file mode 100644
index 0000000..02ad4b4
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/05/testNB4978_05.php.fixUses
@@ -0,0 +1,46 @@
+<?php
+
+/*
+ * 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.
+ */
+
+declare (strict_types=1);
+
+namespace Foo\Foo {
+    class Foo {}
+}
+
+namespace Test {
+
+use Foo\Foo\Foo;
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/06/testNB4978_06.php b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/06/testNB4978_06.php
new file mode 100644
index 0000000..de34c1d
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/06/testNB4978_06.php
@@ -0,0 +1,44 @@
+<?php
+
+/*
+ * 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.
+ */
+
+declare (strict_types=1);
+
+namespace Foo\Foo {
+    class Foo {}
+}
+
+namespace {
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/06/testNB4978_06.php.fixUses b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/06/testNB4978_06.php.fixUses
new file mode 100644
index 0000000..84041bd
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/06/testNB4978_06.php.fixUses
@@ -0,0 +1,46 @@
+<?php
+
+/*
+ * 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.
+ */
+
+declare (strict_types=1);
+
+namespace Foo\Foo {
+    class Foo {}
+}
+
+namespace {
+
+use Foo\Foo\Foo;
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/07/testNB4978_07.php b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/07/testNB4978_07.php
new file mode 100644
index 0000000..2c9bb96
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/07/testNB4978_07.php
@@ -0,0 +1,45 @@
+<?php
+
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace {
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
+
+namespace Foo\Foo {
+    class Foo {}
+}
diff --git a/php/php.editor/test/unit/data/testfiles/actions/testNB4978/07/testNB4978_07.php.fixUses b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/07/testNB4978_07.php.fixUses
new file mode 100644
index 0000000..2f656c1
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/actions/testNB4978/07/testNB4978_07.php.fixUses
@@ -0,0 +1,47 @@
+<?php
+
+/*
+ * 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.
+ */
+
+// test
+declare (strict_types=1);
+
+namespace {
+
+use Foo\Foo\Foo;
+
+    class TestClass {
+
+        public function __construct()
+        {
+            $test = new Foo();
+        }
+
+        public function test(?Foo $foo): ?Foo
+        {
+            return null;
+        }
+
+    }
+
+}
+
+namespace Foo\Foo {
+    class Foo {}
+}
diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/FixUsesPerformerTest.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/FixUsesPerformerTest.java
index b5400c8..7518c87 100644
--- a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/FixUsesPerformerTest.java
+++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/FixUsesPerformerTest.java
@@ -310,6 +310,48 @@
         performTest("$f = f($someVar);^", selections, false, options);
     }
 
+    public void testNB4978_01() throws Exception {
+        String[] selections = new String[] {"\\Foo\\Foo\\Foo"};
+        Options options = new Options(false, false, false, false, true);
+        performTest("// test^", createSelections(selections, ItemVariant.Type.CLASS), true, options);
+    }
+
+    public void testNB4978_02() throws Exception {
+        String[] selections = new String[] {"\\Foo\\Foo\\Foo"};
+        Options options = new Options(false, false, false, false, true);
+        performTest("// test^", createSelections(selections, ItemVariant.Type.CLASS), true, options);
+    }
+
+    public void testNB4978_03() throws Exception {
+        String[] selections = new String[] {"\\Foo\\Foo\\Foo"};
+        Options options = new Options(false, false, false, false, true);
+        performTest("// test^", createSelections(selections, ItemVariant.Type.CLASS), true, options);
+    }
+
+    public void testNB4978_04() throws Exception {
+        String[] selections = new String[] {"\\Foo\\Foo\\Foo"};
+        Options options = new Options(false, false, false, false, true);
+        performTest("// test^", createSelections(selections, ItemVariant.Type.CLASS), true, options);
+    }
+
+    public void testNB4978_05() throws Exception {
+        String[] selections = new String[] {"\\Foo\\Foo\\Foo"};
+        Options options = new Options(false, false, false, false, true);
+        performTest("public funct^ion test(?Foo $foo): ?Foo", createSelections(selections, ItemVariant.Type.CLASS), true, options);
+    }
+
+    public void testNB4978_06() throws Exception {
+        String[] selections = new String[] {"\\Foo\\Foo\\Foo"};
+        Options options = new Options(false, false, false, false, true);
+        performTest("public funct^ion test(?Foo $foo): ?Foo", createSelections(selections, ItemVariant.Type.CLASS), true, options);
+    }
+
+    public void testNB4978_07() throws Exception {
+        String[] selections = new String[] {"\\Foo\\Foo\\Foo"};
+        Options options = new Options(false, false, false, false, true);
+        performTest("// test^", createSelections(selections, ItemVariant.Type.CLASS), true, options);
+    }
+
     private String getTestResult(final String fileName, final String caretLine, final List<Selection> selections, final boolean removeUnusedUses, final Options options) throws Exception {
         FileObject testFile = getTestFile(fileName);
 
diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/UsedNamesCollectorTest.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/UsedNamesCollectorTest.java
index 7f46287..09dcb46 100644
--- a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/UsedNamesCollectorTest.java
+++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/UsedNamesCollectorTest.java
@@ -80,6 +80,38 @@
         performTest("issue209755", "class Class^Name {");
     }
 
+    public void testNB4978_01() throws Exception {
+        performTest("nb4978_01", "// test^");
+    }
+
+    public void testNB4978_02() throws Exception {
+        performTest("nb4978_02", "// test^");
+    }
+
+    public void testNB4978_03() throws Exception {
+        performTest("nb4978_03", "// test^");
+    }
+
+    public void testNB4978_04() throws Exception {
+        performTest("nb4978_04", "// test^");
+    }
+
+    public void testNB4978_05() throws Exception {
+        performTest("nb4978_05", "public funct^ion test(?Foo $foo): ?Foo");
+    }
+
+    public void testNB4978_06() throws Exception {
+        performTest("nb4978_06", "public funct^ion test(?Foo $foo): ?Foo");
+    }
+
+    public void testNB4978_07() throws Exception {
+        performTest("nb4978_07", "// test^");
+    }
+
+    public void testNB4978_08() throws Exception {
+        performTest("nb4978_08", "// test^");
+    }
+
     protected void performTest(String fileName, String caretLine) throws Exception {
         String exactFileName = "testfiles/actions/" + fileName + ".php";
         Map<String, List<UsedNamespaceName>> testResult = getTestResult(exactFileName, caretLine);
diff --git a/php/php.project/src/org/netbeans/modules/php/project/resources/layer.xml b/php/php.project/src/org/netbeans/modules/php/project/resources/layer.xml
index bc541af..cfc72ad 100644
--- a/php/php.project/src/org/netbeans/modules/php/project/resources/layer.xml
+++ b/php/php.project/src/org/netbeans/modules/php/project/resources/layer.xml
@@ -115,7 +115,7 @@
             <file name="PHPClass.php" url="nbresloc:/org/netbeans/modules/php/project/ui/resources/emptyClassPHP.php">
                 <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
                 <attr name="displayName" bundlevalue="org.netbeans.modules.php.project.ui.wizards.Bundle#Templates/Scripting/PHPClass"/>
-                <attr name="instantiatingIterator" methodvalue="org.netbeans.modules.php.project.ui.wizards.NewFileWizardIterator.withNamespace"/>
+                <attr name="instantiatingIterator" methodvalue="org.netbeans.modules.php.project.ui.wizards.NewFileWizardIteratorWithNamespace.create"/>
                 <attr name="template" boolvalue="true"/>
                 <attr name="templateWizardURL" urlvalue="nbresloc:/org/netbeans/modules/php/project/ui/resources/emptyPHPClassDescription.html"/>
                 <attr name="templateCategory" stringvalue="PHP"/>
@@ -124,7 +124,7 @@
             <file name="PHPInterface.php" url="nbresloc:/org/netbeans/modules/php/project/ui/resources/emptyInterfacePHP.php">
                 <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
                 <attr name="displayName" bundlevalue="org.netbeans.modules.php.project.ui.wizards.Bundle#Templates/Scripting/PHPInterface"/>
-                <attr name="instantiatingIterator" methodvalue="org.netbeans.modules.php.project.ui.wizards.NewFileWizardIterator.withNamespace"/>
+                <attr name="instantiatingIterator" methodvalue="org.netbeans.modules.php.project.ui.wizards.NewFileWizardIteratorWithNamespace.create"/>
                 <attr name="template" boolvalue="true"/>
                 <attr name="templateWizardURL" urlvalue="nbresloc:/org/netbeans/modules/php/project/ui/resources/emptyPHPInterfaceDescription.html"/>
                 <attr name="templateCategory" stringvalue="PHP"/>
@@ -133,7 +133,7 @@
             <file name="PHPTrait.php" url="nbresloc:/org/netbeans/modules/php/project/ui/resources/emptyTraitPHP.php">
                 <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
                 <attr name="displayName" bundlevalue="org.netbeans.modules.php.project.ui.wizards.Bundle#Templates/Scripting/PHPTrait"/>
-                <attr name="instantiatingIterator" methodvalue="org.netbeans.modules.php.project.ui.wizards.NewFileWizardIterator.withNamespace"/>
+                <attr name="instantiatingIterator" methodvalue="org.netbeans.modules.php.project.ui.wizards.NewFileWizardIteratorWithNamespace.create"/>
                 <attr name="template" boolvalue="true"/>
                 <attr name="templateWizardURL" urlvalue="nbresloc:/org/netbeans/modules/php/project/ui/resources/emptyPHPTraitDescription.html"/>
                 <attr name="templateCategory" stringvalue="PHP"/>
diff --git a/php/php.project/src/org/netbeans/modules/php/project/ui/wizards/NewFileWizardIteratorWithNamespace.java b/php/php.project/src/org/netbeans/modules/php/project/ui/wizards/NewFileWizardIteratorWithNamespace.java
new file mode 100644
index 0000000..5d9e7f2
--- /dev/null
+++ b/php/php.project/src/org/netbeans/modules/php/project/ui/wizards/NewFileWizardIteratorWithNamespace.java
@@ -0,0 +1,92 @@
+/*
+ * 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 org.netbeans.modules.php.project.ui.wizards;
+
+import java.io.IOException;
+import java.util.Set;
+import javax.swing.event.ChangeListener;
+import org.openide.WizardDescriptor;
+
+public final class NewFileWizardIteratorWithNamespace implements WizardDescriptor.AsynchronousInstantiatingIterator<WizardDescriptor> {
+
+    private final NewFileWizardIterator delegate = NewFileWizardIterator.withNamespace();
+
+    private NewFileWizardIteratorWithNamespace() {
+    }
+
+    public static NewFileWizardIteratorWithNamespace create() {
+        return new NewFileWizardIteratorWithNamespace();
+    }
+
+    @Override
+    public Set instantiate() throws IOException {
+        return delegate.instantiate();
+    }
+
+    @Override
+    public void initialize(WizardDescriptor wizard) {
+        delegate.initialize(wizard);
+    }
+
+    @Override
+    public void uninitialize(WizardDescriptor wizard) {
+        delegate.uninitialize(wizard);
+    }
+
+    @Override
+    public WizardDescriptor.Panel<WizardDescriptor> current() {
+        return delegate.current();
+    }
+
+    @Override
+    public String name() {
+        return delegate.name();
+    }
+
+    @Override
+    public boolean hasNext() {
+        return delegate.hasNext();
+    }
+
+    @Override
+    public boolean hasPrevious() {
+        return delegate.hasPrevious();
+    }
+
+    @Override
+    public void nextPanel() {
+        delegate.nextPanel();
+    }
+
+    @Override
+    public void previousPanel() {
+        delegate.previousPanel();
+    }
+
+    @Override
+    public void addChangeListener(ChangeListener l) {
+        delegate.addChangeListener(l);
+    }
+
+    @Override
+    public void removeChangeListener(ChangeListener l) {
+        delegate.removeChangeListener(l);
+    }
+
+}