WALA-R_1.5.1/000077500000000000000000000000001342410422700125225ustar00rootroot00000000000000WALA-R_1.5.1/.dir-locals.el000066400000000000000000000002061342410422700151510ustar00rootroot00000000000000((groovy-mode (c-file-style . "bsd"))) ;; Local variables: ;; flycheck-disabled-checkers: (emacs-lisp emacs-lisp-checkdoc) ;; End: WALA-R_1.5.1/.gitignore000066400000000000000000000027061342410422700145170ustar00rootroot00000000000000*.DS_Store *.class *.out *.swp */bin/ */bin/* */build/ *~ .classpath .metadata/ .project /*/.settings/org.eclipse.buildship.core.prefs /.gradle/ /.settings/org.eclipse.buildship.core.prefs /.vscode/settings.json /build/ /com.ibm.wala.*/out/ /com.ibm.wala.cast.java.jdt.test/ /com.ibm.wala.cast.java.polyglot/lib/ /com.ibm.wala.cast.java.test.data/src/JLex/ /com.ibm.wala.cast.java.test/testdata/ /com.ibm.wala.cast.js.html.nu_validator/lib/ /com.ibm.wala.cast.js.nodejs/lib/ /com.ibm.wala.cast.js.rhino.test/*.dump /com.ibm.wala.cast.js.rhino.test/*.html* /com.ibm.wala.cast.js.rhino.test/2009_swine_flu_outbreak /com.ibm.wala.cast.js.rhino.test/?game* /com.ibm.wala.cast.js.rhino.test/BunnyHunt /com.ibm.wala.cast.js.rhino.test/digg_attack /com.ibm.wala.cast.js.rhino.test/game.php* /com.ibm.wala.cast.js.rhino.test/xxxx /com.ibm.wala.cast.js.rhino/lib/ /com.ibm.wala.cast.js.test.data/examples-src/ajaxslt/ /com.ibm.wala.cast.js.test/examples-src/ajaxslt/ /com.ibm.wala.cast.js/lib/ /com.ibm.wala.cast/lib/ /com.ibm.wala.core.testdata/*.jar /com.ibm.wala.core.testdata/@dot/ /com.ibm.wala.core.testdata/lib/ /com.ibm.wala.core.tests/report /com.ibm.wala.core/@dot /com.ibm.wala.core/com.ibm.wala.core*.jar /com.ibm.wala.core/dat/wala.properties /com.ibm.wala.dalvik.test/data/sample.cup /com.ibm.wala.dalvik.test/parser.java /com.ibm.wala.dalvik.test/report /com.ibm.wala.dalvik.test/sym.java /com.ibm.wala.ide.jdt.test/testdata/ /edu.kit.wala.smali.test/out/ results target/ WALA-R_1.5.1/.idea/000077500000000000000000000000001342410422700135025ustar00rootroot00000000000000WALA-R_1.5.1/.idea/.gitignore000066400000000000000000000001241342410422700154670ustar00rootroot00000000000000*.iml /libraries/*.xml /modules.xml /tasks.xml /usage.statistics.xml /workspace.xml WALA-R_1.5.1/.idea/.name000066400000000000000000000000141342410422700144160ustar00rootroot00000000000000com.ibm.walaWALA-R_1.5.1/.idea/codeStyles/000077500000000000000000000000001342410422700156205ustar00rootroot00000000000000WALA-R_1.5.1/.idea/codeStyles/Project.xml000066400000000000000000000003741342410422700177540ustar00rootroot00000000000000 WALA-R_1.5.1/.idea/codeStyles/codeStyleConfig.xml000066400000000000000000000002161342410422700214220ustar00rootroot00000000000000 WALA-R_1.5.1/.idea/encodings.xml000066400000000000000000000002071342410422700161740ustar00rootroot00000000000000 WALA-R_1.5.1/.idea/gradle.xml000066400000000000000000000055641342410422700154740ustar00rootroot00000000000000 WALA-R_1.5.1/.idea/inspectionProfiles/000077500000000000000000000000001342410422700173615ustar00rootroot00000000000000WALA-R_1.5.1/.idea/inspectionProfiles/.gitignore000066400000000000000000000000271342410422700213500ustar00rootroot00000000000000/profiles_settings.xml WALA-R_1.5.1/.idea/inspectionProfiles/Java_Performance.xml000066400000000000000000002606201342410422700233130ustar00rootroot00000000000000 WALA-R_1.5.1/.idea/inspectionProfiles/Javadoc.xml000066400000000000000000002411221342410422700214540ustar00rootroot00000000000000 WALA-R_1.5.1/.idea/misc.xml000066400000000000000000000007061342410422700151620ustar00rootroot00000000000000 WALA-R_1.5.1/.idea/runConfigurations/000077500000000000000000000000001342410422700172215ustar00rootroot00000000000000WALA-R_1.5.1/.idea/runConfigurations/After_Opening_Pristine_Project.xml000066400000000000000000000013631342410422700260310ustar00rootroot00000000000000 WALA-R_1.5.1/.idea/vcs.xml000066400000000000000000000012341342410422700150170ustar00rootroot00000000000000 WALA-R_1.5.1/.travis.yml000066400000000000000000000236361342410422700146450ustar00rootroot00000000000000android: components: - build-tools-26.0.2 addons: apt: packages: - realpath - xvfb before_install: - set -e - source "travis/before-install-$BUILD_SYSTEM" install: source "travis/install-$BUILD_SYSTEM" script: source "travis/script-$BUILD_SYSTEM" before_cache: source "travis/before-cache-$BUILD_SYSTEM" cache: directories: - "$HOME/.goomph" - "$HOME/.gradle/caches" - "$HOME/.gradle/wrapper" - "$HOME/.m2" - "$HOME/apache-maven-3.5.0" - "$TRAVIS_BUILD_DIR/com.ibm.wala.core.testdata/ocaml/ocamljava-2.0-alpha1/lib" env: global: - secure: KcugjQYnBqeZ7XenZD5QY7jhekVPO0QpQyjDUteLytaokhyRK2g6eNvr/pPerN2uWUvsPwO18P9F+oOupge1cpPZf4cEY8RzLIromyUoRWd6JA0SKciUYdN2kSqnC4uZSJGXeGLoroyEEL4Q2sqimpkbIGxgxYtVniWgJULOyR4= - secure: jacvGPYX4ugG/HgwJEEpWnllWsS/ipX+qRJ7qM5mbDYryeqsz0eiaxBxQ6IpDyj0v6O4DUi74lSQs/UxCWcUxvOn/5AweCZfoF1U8vt1xivanR4MbC2kr6rJ6ohICuJ4PHDS4IffncgaP3Y8cfExHq6+d0tbibYkjRIiMUGpSik= matrix: include: - os: linux env: BUILD_SYSTEM=gradle language: java jdk: oraclejdk8 - os: linux env: BUILD_SYSTEM=maven language: android jdk: oraclejdk8 - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle language: java - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.ecj language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.test language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.test.data language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.html.nu_validator language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.nodejs language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.nodejs.test language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.rhino language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.rhino.test language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.test language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.test.data language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.test language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core.testdata language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core.tests language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.dalvik language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.dalvik.test language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jdt language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jdt.test language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jsdt language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jsdt.tests language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.tests language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.scandroid language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.shrike language: java jdk: oraclejdk8 if: type = cron - os: linux env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.util language: java jdk: oraclejdk8 if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.ecj language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.test language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.java.test.data language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.html.nu_validator language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.nodejs language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.nodejs.test language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.rhino language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.rhino.test language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.test language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.js.test.data language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.cast.test language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core.testdata language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.core.tests language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.dalvik language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.dalvik.test language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jdt language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jdt.test language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jsdt language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.jsdt.tests language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.ide.tests language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.scandroid language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.shrike language: java if: type = cron - os: osx osx_image: xcode8.3 env: BUILD_SYSTEM=gradle BUILD_ONLY_SUBMODULE=com.ibm.wala.util language: java if: type = cron WALA-R_1.5.1/After Importing WALA Into Eclipse.launch000066400000000000000000000017011342410422700216530ustar00rootroot00000000000000 WALA-R_1.5.1/LICENSE000066400000000000000000000335671342410422700135450ustar00rootroot00000000000000Eclipse Public License - v 2.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 1. DEFINITIONS "Contribution" means: a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and b) in the case of each subsequent Contributor: i) changes to the Program, and ii) additions to the Program; where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution "originates" from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works. "Contributor" means any person or entity that Distributes the Program. "Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. "Program" means the Contributions Distributed in accordance with this Agreement. "Recipient" means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors. "Derivative Works" shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. "Modified Works" shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof. "Distribute" means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy. "Source Code" means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files. "Secondary License" means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor. 2. GRANT OF RIGHTS a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works. b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3). 3. REQUIREMENTS 3.1 If a Contributor Distributes the Program in any form, then: a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license: i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3. 3.2 When the Program is Distributed as Source Code: a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and b) a copy of this Agreement must be included with each copy of the Program. 3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability ("notices") contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices. 4. COMMERCIAL DISTRIBUTION Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. 5. NO WARRANTY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. 6. DISCLAIMER OF LIABILITY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. GENERAL If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement. Exhibit A - Form of Secondary Licenses Notice "This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}." Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses. If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. WALA-R_1.5.1/README-Gradle.md000066400000000000000000000372641342410422700152110ustar00rootroot00000000000000This document describes some WALA-specific aspects of our new Gradle build system, plus a few general Gradle features that may be of particular interest to WALA developers. However, it is not a Gradle tutorial. # Pros and Cons of Switching to Gradle ## Selected Gradle Advantages in Brief - [more comprehensive management of external dependencies](#comprehensive-external-dependencies) - faster builds using [parallel task execution](https://docs.gradle.org/current/userguide/multi_project_builds.html#sec:parallel_execution) and [user-scoped caching](https://docs.gradle.org/current/userguide/build_cache.html) (both enabled by default) - [trustworthy dependencies for incremental builds](#trustworthy-dependencies-for-incremental-builds) - [composite builds](#composite-builds) for easier integration of WALA into larger projects - [automated Travis CI testing on macOS](#travis-ci-macos) ## Known Shortcomings The Gradle build system is not yet ready to replace Maven, due to a few [known shortcomings](https://github.com/liblit/WALA/milestone/1). Paramount among these is that [Gradle WALA builds do not yet package up Eclipse plug-ins / features in the proper manner](https://github.com/liblit/WALA/issues/6). I have [poked at this a bit](https://github.com/liblit/WALA/tree/gradle-artifact-publishing), but I simply do not understand Eclipse and/or OSGi well enough to get the job done. I welcome help from anyone with the right knowledge! Either Gradle or Maven can be used to build WALA from the command line. However, it was not possible to extend this dual-build-system support to Eclipse. Working with WALA in Eclipse *requires* [doing things the Gradle way](#eclipse). Fortunately, this is rather seamless; I see no reason why an Eclipse-using WALA developer should need to avoid this switch. As noted [below](#classpath-and-project-as-generated-files), Eclipse `.classpath` and `.project` files are now generated rather than being repository-tracked source files. However, a few Maven-run tests depend on having certain of these files present. One way to create them is to [import WALA into Eclipse](#importing-wala-projects-into-eclipse) before starting your Maven tests. If you prefer a non-interactive approach, you can instead run `./gradlew prepareMavenBuild` before starting your Maven tests. # Getting Started ## External Dependencies: Patience is a Virtue Gradle downloads many packages and supporting Java libraries as needed. Your first Gradle build may take a long time. On a fast workstation with a University-grade network and no local caches, my initial run of `./gradlew assemble processTestResources` took five minutes. On a decent laptop with residential DSL and no local caches, the same initial build took twenty minutes. Fortunately, user- and project-level Gradle caches will make incremental rebuilds much faster. Rerunning `./gradlew assemble processTestResources` with a warm cache in an already-built tree takes under three seconds. Maven is the same, really. You may already have most of what Maven needs downloaded and cached locally, but your first Maven WALA build was probably slow as well. Recent Travis CI runs have showed Gradle and Maven builds completing in fifteen to twenty minutes, without significant variation between the two build systems. The good news is that the Gradle build knows about all of its external dependencies and will download them as needed. This even includes some complex dependencies that the Maven build does not automate. For example, the Gradle build will automatically gather required Android SDK components: setting `$ANDROID_HOME` is not needed. Gradle builds will also download `/tmp/DroidBench` when needed to run tests; the Maven build system required that each developer do this by hand. ## Eclipse ### One-Time Eclipse Configuration To work with WALA inside Eclipse, first **install Eclipse Buildship** using either [the Eclipse Marketplace](http://www.vogella.com/tutorials/EclipseGradle/article.html#installation-via-the-marketplace) or [the Eclipse update manager](http://www.vogella.com/tutorials/EclipseGradle/article.html#installation-via-the-eclipse-update-manager). Buildship integrates Eclipse with Gradle, much like how M2Eclipse integrates Eclipse with Maven. Restart Eclipse after installing this feature. ### Importing WALA Projects Into Eclipse Once you are running a Buildship-enabled Eclipse, **[use the “Existing Gradle Project” import wizard](http://www.vogella.com/tutorials/EclipseGradle/article.html#import-an-existing-gradle-project) to import WALA into Eclipse.** Select and import the topmost level of your WALA source tree. On the “Import Options” page of the import wizard, leave all settings at their defaults: the “Override workspace settings” option should be off, and the grayed-out “Gradle distribution” choice should be set to “Gradle wrapper”. You do not need to select each of WALA’s sub-projects; import only the top-level WALA source tree, and the rest will follow. After the lengthy import process completes, **use “Run → After Importing WALA Into Eclipse” to perform some post-import cleanup and configuration.** Immediately after importing, you may see some errors in the Eclipse “Problems” view. These should all go away after running the “After Importing WALA Into Eclipse” step. Note: a pristine WALA source tree is *not* pre-configured as a group of Eclipse projects. Using the standard Eclipse “Existing Projects into Workspace” import wizard will not work correctly. You must [use the “Existing Gradle Project” import wizard](http://www.vogella.com/tutorials/EclipseGradle/article.html#import-an-existing-gradle-project) instead. ### `.classpath` and `.project` as Generated Files You will find no `.classpath` or `.project` files anywhere in [the Gradle fork of WALA’s git repository](https://github.com/liblit/WALA). Importing using the “Existing Gradle Project” wizard creates these Eclipse project configuration files automatically based on the underlying Gradle configuration. Therefore, when working with Eclipse + Gradle, you should **treat `.classpath` and `.project` files as *generated* artifacts,** not as files to edit directly or through the Eclipse project configuration GUI. For example, avoid using the Java Build Path settings dialog to make changes that are stored in a `.classpath` file: the modified `.classpath` file is not git-tracked, so your changes will eventually be lost or overwritten. The right way to change the contents of any of a `.classpath` or `.project` file is to change the Gradle configuration such that the generated `.classpath` and `.project` files will have the desired contents, likely by using [Gradle’s `eclipse` plugin](https://docs.gradle.org/current/userguide/eclipse_plugin.html). A few WALA sub-projects already use this: look for `eclipse.project` in `*/build.gradle` for examples. ## IntelliJ IDEA ### Opening WALA in IntelliJ IDEA WALA comes preconfigured as an openable IntelliJ IDEA project. Open the top-level WALA directory as a project; it should have a distinctive badge on its folder icon marking it as a directory containing a recognized IntelliJ IDEA project. Do *not* open the top-level WALA `build.gradle` in that directory as a project: this will begin an “Import Project from Gradle” process that is *not* the recommended way to bring WALA up in IntelliJ IDEA. The first time you open the WALA project, IntelliJ IDEA will synchronize its project model with the Gradle build configuration, including downloading some large supporting libraries. After the lengthy import process completes, **use “Run → Run… → After Opening Pristine Project” to perform some post-import configuration.** This also can take tens of minutes, but is only necessary in a clean, never-previously-built tree. Immediately after importing, you may see some Java compilation errors in the IntelliJ IDEA “Messages” view. These should all go away after running the “After Opening Pristine Project” step. [Be patient](#external-dependencies-patience-is-a-virtue) during the initial project open and also during the “After Opening Pristine Project” step, especially if you have a slow network connection. If you prefer a non-interactive approach, instead of using “After Opening Pristine Project” you can run `./gradlew prepareIntelliJIDEA` either before or after opening WALA in IntelliJ IDEA. ### Benign Warning About Non-Managed Maven Project Each time you open the WALA project, IntelliJ IDEA may report “Non-managed pom.xml file found” in its event log. This arises because WALA supports both Gradle and Maven, but WALA in IntelliJ IDEA needs only the Gradle configuration. You can safely ignore this notification, permanently disable it using the offered “Disable notification” link, or even disable the IntelliJ IDEA Maven plugin entirely if you have no other need for it. ### Project Configuration as Derived Model IntelliJ IDEA automatically derives its project models from the Gradle build configuration, including all information about both internal and external build dependencies. However, this synchronization only goes in one direction: from Gradle to IntelliJ IDEA, not from IntelliJ IDEA back into Gradle. If you manipulate the project structure using the IntelliJ IDEA’s user interface, your changes will likely be overwritten the next time IntelliJ IDEA scans the Gradle build configuration. This particularly applies to settings found in the “Modules” and “Libraries” sections of the “Project Structure” dialog. The right way to change module and library settings is to change the Gradle configuration such that the *derived* IntelliJ IDEA model is what you want it to be. ## Gradle Command Line You do not need to install Gradle separately. **WALA includes its own copy of Gradle, available as the `gradlew` script in the top-level WALA directory.** Use this script for all command-line Gradle actions. For example, to compile all of WALA’s main (non-test) code and gather it into jar archives, run `./gradlew assemble`. In general, most Gradle-generated artifacts will appear somewhere under `*/build`. For example the jar archives created by the `assemble` task can be found as `*/build/libs/*.jar`. Note, however, that Eclipse-generated artifacts will still appear in the same places as before, such as `*/bin` and `*/target`. ### Trustworthy Dependencies For Incremental Builds Gradle has excellent understanding of task and file dependencies. You can trust it to perform incremental rebuilds rather than always rebuilding from scratch. If you are used to always running `mvn clean compile` instead of `mvn compile`, or `mvn clean install` instead of `mvn install`, I recommend that you drop `clean` as a reflexive extra step and **trust Gradle to do incremental builds correctly.** ### Favorite Build Tasks Some useful Gradle tasks include: - `assemble`: build WALA’s main (non-test) code - `build`: build all WALA code and run all automated tests - `javadoc`: build all Javadoc documentation - `publishToMavenLocal`: install WALA’s jar files under `~/.m2` - `clean`: remove all Gradle-generated artifacts ### Tasks in Specific Sub-Projects When you run `./gradlew` in the top-level WALA directory, any tasks you list will be built in all sub-projects. For example, `./gradlew assemble` builds all non-test WALA jars in all sub-projects. If you want to build tasks only in specific sub-projects, you have two options: 1. Give the fully-qualified name of the sub-project task. For example, to assemble only the Dalvik jar, you could run `./gradlew :com.ibm.wala.dalvik:assemble`. 1. Run Gradle from within some sub-project directory. For example, to assemble only the Dalvik jar, you could `cd com.ibm.wala.dalvik` and then run `../gradlew assemble`. Note the proper relative path to the top-level Gradle script: `../gradle` instead of `./gradlew`. ### Task Name Abbreviation [Any build task can be abbreviated](https://docs.gradle.org/current/userguide/command_line_interface.html#_task_name_abbreviation) by shortening each camel-case-delimited word in its name. For example, the `processTestResources` task can probably be abbreviated as `procTeRes` or even `pTR`. ### Useful Command-Line Flags Among Gradle’s command-line flags, I have found the following particularly useful: - [`--continue`](https://docs.gradle.org/current/userguide/command_line_interface.html#sec:continue_build_on_failure): keep building non-dependent sub-tasks even after an initial failure. Especially useful in conjunction with the `build` or `test` tasks to see multiple test failures rather than giving up after the first failure. - [`-t`, `--continuous`](https://docs.gradle.org/current/userguide/command_line_interface.html#_continuous_build): keep Gradle process running and re-execute the given tasks whenever input files change. Similar to Eclipse’s behavior of updating the build whenever you change and save a file. - [`--tests=...`](https://docs.gradle.org/current/userguide/java_plugin.html#test_filtering): run only the selected tests. Use in conjunction with the `build` or `test` tasks for faster turnaround if you are focusing on getting just one or a few failing tests to pass. - [`--scan`](https://scans.gradle.com/): upload a detailed report of the build process to a Gradle-hosted server for further exploration and analysis. The only security here is the obscurity of the generated URL for the build report. If you are not concerned about potentially making your build details public, then `--scan` is a good way to gain insights into why Gradle did what it did, and how long each piece took. ### Composite Builds Gradle’s [composite builds](https://docs.gradle.org/current/userguide/composite_builds.html) allow a Gradle-managed project to recursively include other Gradle-managed projects, with Gradle managing the entire build process in a coherent, integrated manner. Thus, if you use Gradle to build your WALA-based project, you can easily have it use WALA from your own, private WALA tree instead of from `~/.m2` or the public Maven repository. This is especially useful if you frequently find yourself switching between multiple different personal or experimental WALA builds. By avoiding `~/.m2`, each WALA-based project can be its own composite build, with its own WALA subtree, and no project interferes with any other. # Travis CI I use a [Travis CI build matrix](https://docs.travis-ci.com/user/customizing-the-build/#Build-Matrix) to perform automated testing in three configurations: 1. Gradle build on Ubuntu 14 (Trusty Tahr) 1. Maven build on Ubuntu 14 (Trusty Tahr) 1. Gradle build on macOS 10.12 (Sierra) Until we are ready to completely replace Maven with Gradle, it is important that both keep working. Therefore, I use Travis CI to build and test WALA on Ubuntu using both Gradle and Maven. Every new pull request must be validated in both of these configurations before I will accept it onto the `gradle-and-buildship` branch. The official WALA repository has no macOS CI testing. However, [macOS is the main development platform for at least one WALA maintainer](https://github.com/liblit/WALA/issues/3#issuecomment-356823287), so it is great to have Travis CI helping us keep that platform working. I will not accept pull requests that introduce regressions into Gradle macOS builds. However, I am not using Travis CI to test Maven macOS builds. Initial attempts using [the official WALA master sources](https://github.com/wala/WALA) failed. As it is my goal to replace Maven entirely, investigating Maven+macOS failures further is not a priority. WALA-R_1.5.1/README.md000066400000000000000000000010621342410422700140000ustar00rootroot00000000000000WALA [![Build Status](https://travis-ci.org/wala/WALA.svg?branch=master)](https://travis-ci.org/wala/WALA) ===================== This is the main source repository for WALA. For more details on WALA, see the WALA home page and WALA Javadoc. **Note:** historically, WALA has used Maven as its build system. However, this WALA branch can also use Gradle as an alternative to Maven. See [the Gradle-specific README](README-Gradle.md) for more instructions and helpful tips. WALA-R_1.5.1/appveyor.yml.disabled000066400000000000000000000013721342410422700166630ustar00rootroot00000000000000os: Visual Studio 2015 install: - ps: | Add-Type -AssemblyName System.IO.Compression.FileSystem if (!(Test-Path -Path "C:\maven" )) { (new-object System.Net.WebClient).DownloadFile( 'http://www.us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip', 'C:\maven-bin.zip' ) [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven") } - cmd: SET PATH=C:\maven\apache-maven-3.3.9\bin;%JAVA_HOME%\bin;%PATH% - cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g - cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g build_script: - mvn clean verify -DskipTests=true -B -q test_script: - mvn clean verify -B -q cache: - C:\maven\ - C:\Users\appveyor\.m2WALA-R_1.5.1/build-maven-jars.py000077500000000000000000000017301342410422700162400ustar00rootroot00000000000000#!/usr/bin/env python # script to build jars for maven central import sys import subprocess import os # action should be either 'install' (for local test) # or 'deploy' (for deployment to maven central). # if current version is SNAPSHOT, will only be deployed # to sonatype's staging servers. otherwise, will be # deployed to maven central action = sys.argv[1] # projects for which we should build jars, in order # will be prefixed with 'com.ibm.wala.' projects = [ "util", "shrike", "core", "cast", "cast.java", "cast.java.ecj", "cast.js", "cast.js.rhino", "dalvik", "scandroid" ] for proj in projects: full_proj = "com.ibm.wala." + proj print(full_proj) os.chdir(full_proj) mvnCmd = "mvn -f mvncentral.xml clean " + action try: subprocess.check_output(mvnCmd, shell=True) except subprocess.CalledProcessError as e: print("OUTPUT") print(e.output) raise os.chdir("..") WALA-R_1.5.1/build.gradle000066400000000000000000000101211342410422700147740ustar00rootroot00000000000000//////////////////////////////////////////////////////////////////////// // // plugin configuration must precede everything else // plugins { id 'com.diffplug.gradle.p2.asmaven' version '3.17.0' id 'com.github.hauner.jarTest' version '1.0.1' apply false id 'de.undercouch.download' id 'nebula.lint' version '8.3.1' id 'nebula.source-jar' version '7.0.1' apply false id 'maven-publish' } //////////////////////////////////////////////////////////////////////// // // required Eclipse components // p2AsMaven { group 'eclipse-deps', { repoEclipse '4.7.2' slicingOption 'latestVersionOnly', 'true' iu 'org.eclipse.core.commands' iu 'org.eclipse.core.contenttype' iu 'org.eclipse.core.jobs' iu 'org.eclipse.core.resources' iu 'org.eclipse.core.runtime' iu 'org.eclipse.equinox.app' iu 'org.eclipse.equinox.common' iu 'org.eclipse.equinox.preferences' iu 'org.eclipse.jdt.core' iu 'org.eclipse.jface' iu 'org.eclipse.osgi' iu 'org.eclipse.pde.core' iu 'org.eclipse.swt' iu 'org.eclipse.ui.ide' iu 'org.eclipse.ui.workbench' } group 'wst-deps', { repo 'http://download.eclipse.org/releases/oxygen' slicingOption 'latestVersionOnly', 'true' iu 'org.eclipse.wst.jsdt.core' iu 'org.eclipse.wst.jsdt.ui' } } //////////////////////////////////////////////////////////////////////// // // common Java setup shared by multiple projects // group name version '1.5.1' subprojects { subproject -> // skip generic Java setup for the few projects that have no Java code whatsoever switch (subproject.name) { case 'com.ibm.wala-repository': case ~/.*_feature/: return } apply plugin: 'java' apply plugin: 'maven-publish' apply plugin: 'nebula.source-jar' version rootProject.version repositories { mavenCentral() maven { url "$rootProject.buildDir/p2asmaven/maven" } } jar.manifest.from('META-INF/MANIFEST.MF') publishing.publications { mavenJava(MavenPublication) { from components.java } } task afterEclipseBuildshipImport(dependsOn: processTestResources) task prepareIntelliJIDEA test { include '**/*Test.class' include '**/*TestCase.class' include '**/*Tests.class' include '**/Test*.class' exclude '**/*AndroidLibs*.class' maxParallelForks = Integer.MAX_VALUE } } task afterEclipseBuildshipImport(type: Exec) { commandLine './revert-launchers.sh' } //////////////////////////////////////////////////////////////////////// // // find platform-specific SWT implementations // def osgi_platform switch (System.getProperty('os.name')) { case ~/Mac OS X/: osgi_platform = 'cocoa.macosx.x86_64' break case ~/Windows.*/: osgi_platform = 'win32.win32.x86_64' break case ~/Linux/: osgi_platform = 'gtk.linux.x86_64' break } System.setProperty('osgi.platform', osgi_platform) subprojects { configurations.all { resolutionStrategy { // failOnVersionConflict() dependencySubstitution { substitute module('eclipse-deps:org.eclipse.swt.${osgi.platform}') with module("eclipse-deps:org.eclipse.swt.${System.getProperty('osgi.platform')}:3.+") } } } } //////////////////////////////////////////////////////////////////////// // // optional lint checking of Gradle scripts // allprojects { apply plugin: 'nebula.lint' gradleLint.alwaysRun = false gradleLint { rules = ['all-dependency'] excludedRules = [ 'duplicate-dependency-class', 'transitive-duplicate-dependency-class', 'unused-dependency', ] } } //////////////////////////////////////////////////////////////////////// // // disable Javadoc linter until documentation is in better shape // allprojects { tasks.withType(Javadoc) { options.addBooleanOption('Xdoclint:all,-missing', true) options.quiet() } } //////////////////////////////////////////////////////////////////////// // // Eclipse IDE integration // // workaround for allprojects { apply plugin: 'eclipse' eclipse.classpath.file.whenMerged { entries.each { if (it in org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry && it.entryAttributes['gradle_used_by_scope'] == 'test') it.entryAttributes['test'] = true } } } WALA-R_1.5.1/buildSrc/000077500000000000000000000000001342410422700142715ustar00rootroot00000000000000WALA-R_1.5.1/buildSrc/.gitignore000066400000000000000000000000121342410422700162520ustar00rootroot00000000000000/.gradle/ WALA-R_1.5.1/buildSrc/build.gradle000066400000000000000000000001471342410422700165520ustar00rootroot00000000000000repositories { mavenCentral() } dependencies { compile 'de.undercouch:gradle-download-task:3.4.3' } WALA-R_1.5.1/buildSrc/src/000077500000000000000000000000001342410422700150605ustar00rootroot00000000000000WALA-R_1.5.1/buildSrc/src/main/000077500000000000000000000000001342410422700160045ustar00rootroot00000000000000WALA-R_1.5.1/buildSrc/src/main/groovy/000077500000000000000000000000001342410422700173315ustar00rootroot00000000000000WALA-R_1.5.1/buildSrc/src/main/groovy/package-list.groovy000066400000000000000000000014711342410422700231470ustar00rootroot00000000000000import org.gradle.api.tasks.* //////////////////////////////////////////////////////////////////////// // // create a Javadoc-style "package-list" file // @CacheableTask class CreatePackageList extends org.gradle.api.DefaultTask { @PathSensitive(PathSensitivity.RELATIVE) @Input Object sourceSet @OutputFile File packageList = new File("$temporaryDir/package-list") @TaskAction def create() { sourceSet.sourceCollections.collect { collection -> def sourceRoot = collection.tree.dir.toPath() collection.collect { source -> def javaSourceFilePath = source.toPath() def parentPath = javaSourceFilePath.parent def relativePath = sourceRoot.relativize(parentPath) relativePath.toString().replace(File.separator, '.') } }.flatten().sort().unique().each { packageList << "$it\n" } } } WALA-R_1.5.1/buildSrc/src/main/groovy/verified-download.groovy000066400000000000000000000017761342410422700242150ustar00rootroot00000000000000import org.gradle.api.tasks.* //////////////////////////////////////////////////////////////////////// // // download and use checksum to verify that we got what we expected // @CacheableTask class VerifiedDownload extends org.gradle.api.DefaultTask { // URL of resource to download def @Input src // expected checksum of resource as hex digits def @Input checksum // algorithm to use for computing checksum def @Input algorithm = 'MD5' // whether to use ETag for selective downloading def @Input useETag = true // local file into which resource should be saved def @OutputFile dest File getDest() { return project.file(dest) } VerifiedDownload() { outputs.upToDateWhen { getDest().exists() } } @TaskAction downloadAndVerify() { def destFile = getDest() project.download { src this.src dest destFile overwrite true onlyIfModified true useETag this.useETag } project.verifyChecksum { src destFile algorithm this.algorithm checksum this.checksum } } } WALA-R_1.5.1/change-version.py000077500000000000000000000021211342410422700160030ustar00rootroot00000000000000#!/usr/bin/env python # specify versions as version number, optionally followed by # '-SNAPSHOT' for a snapshot version import sys import subprocess def runAndPrint(cmd): print cmd subprocess.check_output(cmd, shell=True) oldVersion = sys.argv[1] newVersion = sys.argv[2] print oldVersion + " --> " + newVersion oldVersion = oldVersion.replace(".", "\.") newVersion = newVersion.replace(".", "\.") runAndPrint("mvn clean -q") runAndPrint("find -E ./ -regex \".*(pom|mvncentral)\.xml\" | xargs -n 1 perl -pi -e \'s/" + oldVersion + "/" + newVersion + "/g\'") runAndPrint("perl -pi -e \'s/" + oldVersion + "/" + newVersion + "/g\' build.gradle") oldIsSnapshot = oldVersion.endswith("SNAPSHOT") newIsSnapShot = newVersion.endswith("SNAPSHOT") bundleOld = oldVersion if not oldIsSnapshot else oldVersion.replace("-SNAPSHOT","\.qualifier") bundleNew = newVersion if not newIsSnapShot else newVersion.replace("-SNAPSHOT","\.qualifier") runAndPrint("find -E ./ -regex \".*(MANIFEST\.MF|feature\.xml)\" | xargs -n 1 perl -pi -e \'s/" + bundleOld + "/" + bundleNew + "/g\'") print "done" WALA-R_1.5.1/com.ibm.wala-repository/000077500000000000000000000000001342410422700172065ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala-repository/.settings/000077500000000000000000000000001342410422700211245ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala-repository/.settings/org.eclipse.wst.validation.prefs000066400000000000000000000010761342410422700273500ustar00rootroot00000000000000DELEGATES_PREFERENCE=delegateValidatorList USER_BUILD_PREFERENCE=enabledBuildValidatorList USER_MANUAL_PREFERENCE=enabledManualValidatorList USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600 eclipse.preferences.version=1 override=true suspend=false vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03 vf.version=3 WALA-R_1.5.1/com.ibm.wala-repository/category.xml000066400000000000000000000007241342410422700215500ustar00rootroot00000000000000 WALA-R_1.5.1/com.ibm.wala-repository/pom.xml000066400000000000000000000010431342410422700205210ustar00rootroot00000000000000 4.0.0 com.ibm.wala WALA 1.5.1 com.ibm.wala-repository eclipse-repository WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/000077500000000000000000000000001342410422700174025ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/.settings/000077500000000000000000000000001342410422700213205ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/.settings/org.eclipse.jdt.core.prefs000066400000000000000000000174421342410422700263120ustar00rootroot00000000000000eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.APILeak=warning org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=error org.eclipse.jdt.core.compiler.problem.comparingIdentical=error org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=ignore org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=error org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=error org.eclipse.jdt.core.compiler.problem.finalParameterBound=error org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=error org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=error org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=error org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=error org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.rawTypeReference=error org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=error org.eclipse.jdt.core.compiler.problem.unusedLocal=error org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error org.eclipse.jdt.core.compiler.problem.unusedParameter=error org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error org.eclipse.jdt.core.compiler.source=1.8 WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/.settings/org.eclipse.pde.prefs000066400000000000000000000020161342410422700253410ustar00rootroot00000000000000compilers.f.unresolved-features=0 compilers.f.unresolved-plugins=0 compilers.incompatible-environment=0 compilers.p.build=0 compilers.p.build.bin.includes=0 compilers.p.build.encodings=0 compilers.p.build.java.compiler=0 compilers.p.build.java.compliance=0 compilers.p.build.missing.output=0 compilers.p.build.output.library=0 compilers.p.build.source.library=0 compilers.p.build.src.includes=0 compilers.p.deprecated=0 compilers.p.discouraged-class=0 compilers.p.internal=0 compilers.p.missing-packages=0 compilers.p.missing-version-export-package=2 compilers.p.missing-version-import-package=0 compilers.p.missing-version-require-bundle=2 compilers.p.no-required-att=0 compilers.p.not-externalized-att=0 compilers.p.unknown-attribute=0 compilers.p.unknown-class=0 compilers.p.unknown-element=0 compilers.p.unknown-identifier=0 compilers.p.unknown-resource=0 compilers.p.unresolved-ex-points=0 compilers.p.unresolved-import=0 compilers.s.create-docs=false compilers.s.doc-folder=doc compilers.s.open-tags=0 eclipse.preferences.version=1 WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/.settings/org.eclipse.wst.validation.prefs000066400000000000000000000021021342410422700275330ustar00rootroot00000000000000DELEGATES_PREFERENCE=delegateValidatorList USER_BUILD_PREFERENCE=enabledBuildValidatorList USER_MANUAL_PREFERENCE=enabledManualValidatorList USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600 eclipse.preferences.version=1 override=true suspend=false vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03 vals/org.eclipse.wst.xml.core.xml/groups=0107include05111contentType128org.eclipse.core.runtime.xmlT111contentType134org.eclipse.wst.xml.core.xmlsourceT111contentType134org.eclipse.wst.xml.core.xslsourceT111contentType134org.eclipse.jst.jsp.core.tldsourceT07fileext03xmlF0107exclude07113projectNature134org.eclipse.jst.j2ee.ejb.EJBNature113projectNature130org.eclipse.jst.j2ee.EARNature04file08.projectT0104file110.classpathT0104file110.settings/T0204file122target/p2artifacts.xmlT0304file120target/p2content.xmlT03 vf.version=3 WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/META-INF/000077500000000000000000000000001342410422700205425ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/META-INF/MANIFEST.MF000066400000000000000000000010311342410422700221670ustar00rootroot00000000000000Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.ibm.wala.cast.java.ecj Bundle-Version: 1.5.1 Bundle-Vendor: %Bundle-Vendor Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: com.ibm.wala.cast.java, com.ibm.wala.core, org.eclipse.core.runtime, org.eclipse.jdt.core, com.ibm.wala.cast, com.ibm.wala.shrike Export-Package: com.ibm.wala.cast.java.client, com.ibm.wala.cast.java.ecj.util, com.ibm.wala.cast.java.translator.jdt, com.ibm.wala.cast.java.translator.jdt.ecj WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/OSGI-INF/000077500000000000000000000000001342410422700205555ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/OSGI-INF/l10n/000077500000000000000000000000001342410422700213275ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/OSGI-INF/l10n/bundle.properties000066400000000000000000000001551342410422700247170ustar00rootroot00000000000000#Properties file for com.ibm.wala.cast.java.ecj Bundle-Name = WALA CAst Java ECJ frontend Bundle-Vendor = IBMWALA-R_1.5.1/com.ibm.wala.cast.java.ecj/build.gradle000066400000000000000000000006321342410422700216620ustar00rootroot00000000000000sourceSets.main.java.srcDirs = ['src'] dependencies { compile( 'eclipse-deps:org.eclipse.core.runtime:+', 'eclipse-deps:org.eclipse.equinox.common:+', 'eclipse-deps:org.eclipse.jdt.core:+', 'org.osgi:org.osgi.core:4.2.0', project(':com.ibm.wala.cast'), project(':com.ibm.wala.cast.java'), project(':com.ibm.wala.core'), project(':com.ibm.wala.shrike'), project(':com.ibm.wala.util'), ) } WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/build.properties000066400000000000000000000002031342410422700226120ustar00rootroot00000000000000source.. = src/ output.. = bin/ bin.includes = META-INF/,\ .,\ OSGI-INF/ javacProjectSettings = true WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/mvncentral.xml000066400000000000000000000120101342410422700222670ustar00rootroot00000000000000 4.0.0 com.ibm.wala com.ibm.wala.cast.java.ecj 1.5.1 jar WALA CAst Java ECJ WALA Common AST Java ECJ front-end http://wala.sourceforge.net Eclipse Public License, Version 1.0 https://www.eclipse.org/legal/epl-v10.html Manu Sridharan m.sridharan@samsung.com Samsung Research America http://www.sisa.samsung.com/ scm:git:git@github.com:wala/WALA.git scm:git:git@github.com:example/example-application.git git@github.com:example/example-application.git src ossrh https://oss.sonatype.org/content/repositories/snapshots com.ibm.wala com.ibm.wala.util 1.5.1 com.ibm.wala com.ibm.wala.cast 1.5.1 com.ibm.wala com.ibm.wala.cast.java 1.5.1 com.ibm.wala com.ibm.wala.core 1.5.1 com.ibm.wala com.ibm.wala.shrike 1.5.1 org.eclipse.core org.eclipse.core.runtime 3.7.0 org.eclipse.jdt org.eclipse.jdt.core 3.10.0 sonatype-snapshots https://oss.sonatype.org/content/repositories/snapshots/ jdk18 1.8 -Xdoclint:none ${src.dir} org.apache.maven.plugins maven-compiler-plugin 3.2 1.8 1.8 org.sonatype.plugins nexus-staging-maven-plugin 1.6.3 true ossrh https://oss.sonatype.org/ true org.apache.maven.plugins maven-source-plugin 2.2.1 attach-sources jar-no-fork org.apache.maven.plugins maven-javadoc-plugin ${javadoc.options} 2.9.1 attach-javadocs jar org.apache.maven.plugins maven-gpg-plugin 1.5 sign-artifacts verify sign WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/pom.xml000066400000000000000000000010201342410422700207100ustar00rootroot00000000000000 4.0.0 WALA com.ibm.wala 1.5.1 com.ibm.wala.cast.java.ecj eclipse-plugin WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/000077500000000000000000000000001342410422700201715ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/000077500000000000000000000000001342410422700207475ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/000077500000000000000000000000001342410422700215165ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/000077500000000000000000000000001342410422700224425ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/000077500000000000000000000000001342410422700233745ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/000077500000000000000000000000001342410422700243155ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/client/000077500000000000000000000000001342410422700255735ustar00rootroot00000000000000ECJJavaSourceAnalysisEngine.java000066400000000000000000000020261342410422700335750ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/client/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.java.client; import com.ibm.wala.cast.java.translator.jdt.ecj.ECJClassLoaderFactory; import com.ibm.wala.classLoader.ClassLoaderFactory; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.util.config.SetOfClasses; public class ECJJavaSourceAnalysisEngine extends JavaSourceAnalysisEngine { @Override protected ClassLoaderFactory getClassLoaderFactory(SetOfClasses exclusions) { return new ECJClassLoaderFactory(exclusions); } } WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/ecj/000077500000000000000000000000001342410422700250565ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/ecj/util/000077500000000000000000000000001342410422700260335ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/ecj/util/SourceDirCallGraph.java000066400000000000000000000073451342410422700323640ustar00rootroot00000000000000package com.ibm.wala.cast.java.ecj.util; import java.io.File; import java.io.IOException; import java.util.Properties; import java.util.jar.JarFile; import com.ibm.wala.cast.ir.ssa.AstIRFactory; import com.ibm.wala.cast.java.client.impl.ZeroOneContainerCFABuilderFactory; import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope; import com.ibm.wala.cast.java.translator.jdt.ecj.ECJClassLoaderFactory; import com.ibm.wala.classLoader.SourceDirectoryTreeModule; import com.ibm.wala.ipa.callgraph.AnalysisCacheImpl; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.CallGraphBuilder; import com.ibm.wala.ipa.callgraph.CallGraphBuilderCancelException; import com.ibm.wala.ipa.callgraph.CallGraphStats; import com.ibm.wala.ipa.callgraph.Entrypoint; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.impl.Util; import com.ibm.wala.ipa.cha.ClassHierarchyException; import com.ibm.wala.ipa.cha.ClassHierarchyFactory; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.properties.WalaProperties; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.util.io.CommandLine; import com.ibm.wala.util.warnings.Warnings; /** * Driver that constructs a call graph for an application specified as a directory of source code. * Example of using the JDT front-end based on ECJ. * Useful for getting some code to copy-paste. */ public class SourceDirCallGraph { /** * Usage: ScopeFileCallGraph -sourceDir file_path -mainClass class_name * * If given -mainClass, uses main() method of class_name as entrypoint. Class * name should start with an 'L'. * * Example args: -sourceDir /tmp/srcTest -mainClass LFoo * */ public static void main(String[] args) throws ClassHierarchyException, IllegalArgumentException, CallGraphBuilderCancelException, IOException { long start = System.currentTimeMillis(); Properties p = CommandLine.parse(args); String sourceDir = p.getProperty("sourceDir"); String mainClass = p.getProperty("mainClass"); AnalysisScope scope = new JavaSourceAnalysisScope(); // add standard libraries to scope String[] stdlibs = WalaProperties.getJ2SEJarFiles(); for (String stdlib : stdlibs) { scope.addToScope(ClassLoaderReference.Primordial, new JarFile(stdlib)); } // add the source directory scope.addToScope(JavaSourceAnalysisScope.SOURCE, new SourceDirectoryTreeModule(new File(sourceDir))); // build the class hierarchy IClassHierarchy cha = ClassHierarchyFactory.make(scope, new ECJClassLoaderFactory(scope.getExclusions())); System.out.println(cha.getNumberOfClasses() + " classes"); System.out.println(Warnings.asString()); Warnings.clear(); AnalysisOptions options = new AnalysisOptions(); Iterable entrypoints = Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha, new String[] { mainClass } ); options.setEntrypoints(entrypoints); // you can dial down reflection handling if you like // options.setReflectionOptions(ReflectionOptions.NONE); IAnalysisCacheView cache = new AnalysisCacheImpl(AstIRFactory.makeDefaultFactory()); //CallGraphBuilder builder = new ZeroCFABuilderFactory().make(options, cache, cha, scope, false); CallGraphBuilder builder = new ZeroOneContainerCFABuilderFactory().make(options, cache, cha, scope); System.out.println("building call graph..."); CallGraph cg = builder.makeCallGraph(options, null); long end = System.currentTimeMillis(); System.out.println("done"); System.out.println("took " + (end-start) + "ms"); System.out.println(CallGraphStats.getStats(cg)); } } WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/000077500000000000000000000000001342410422700265065ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/jdt/000077500000000000000000000000001342410422700272675ustar00rootroot00000000000000FakeExceptionTypeBinding.java000066400000000000000000000306431342410422700347430ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/jdt/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package com.ibm.wala.cast.java.translator.jdt; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.dom.IAnnotationBinding; import org.eclipse.jdt.core.dom.IBinding; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.IPackageBinding; import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.core.dom.IVariableBinding; import com.ibm.wala.util.debug.Assertions; /** * This is a hack to get around the fact that AST.resolveWellKnownTypes() doesn't know about some implicitly declared exceptions, * such as ArithmeticException (implicitly thrown in a division operation) and NullPointerException (implicitly thrown in a field * access). We need to know the lineage of these types to determine possible catch targets. * * @author evan * */ public class FakeExceptionTypeBinding implements ITypeBinding { static public final FakeExceptionTypeBinding arithmetic = new FakeExceptionTypeBinding("Ljava/lang/ArithmeticException;"); static public final FakeExceptionTypeBinding nullPointer = new FakeExceptionTypeBinding("Ljava/lang/NullPointerException;"); static public final FakeExceptionTypeBinding classCast = new FakeExceptionTypeBinding("Ljava/lang/ClassCastException;"); static public final FakeExceptionTypeBinding noClassDef = new FakeExceptionTypeBinding("Ljava/lang/NoClassDefFoundError;"); static public final FakeExceptionTypeBinding initException = new FakeExceptionTypeBinding( "Ljava/lang/ExceptionInInitializerError;"); static public final FakeExceptionTypeBinding outOfMemory = new FakeExceptionTypeBinding("Ljava/lang/OutOfMemoryError;"); private final String exceptionBinaryName; private FakeExceptionTypeBinding(String exceptionBinaryName) { this.exceptionBinaryName = exceptionBinaryName; } @Override public boolean isAssignmentCompatible(ITypeBinding variableType) { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean equals(Object o) { if (o instanceof FakeExceptionTypeBinding) return this == o; if (o instanceof ITypeBinding) return ((ITypeBinding) o).getBinaryName().equals(exceptionBinaryName); return false; } @Override public int hashCode() { return exceptionBinaryName.hashCode(); } // --- rest not needed @Override public ITypeBinding createArrayType(int dimension) { Assertions.UNREACHABLE("FakeExceptionTypeBinding createArrayType"); return null; } @Override public String getBinaryName() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding getBound() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding getComponentType() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public IVariableBinding[] getDeclaredFields() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public IMethodBinding[] getDeclaredMethods() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @SuppressWarnings("deprecation") @Override public int getDeclaredModifiers() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return 0; } @Override public ITypeBinding[] getDeclaredTypes() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding getDeclaringClass() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public IMethodBinding getDeclaringMethod() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public int getDimensions() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return 0; } @Override public ITypeBinding getElementType() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding getErasure() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding[] getInterfaces() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public int getModifiers() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return 0; } @Override public String getName() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public IPackageBinding getPackage() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public String getQualifiedName() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding getSuperclass() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding[] getTypeArguments() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding[] getTypeBounds() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding getTypeDeclaration() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding[] getTypeParameters() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public ITypeBinding getWildcard() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public boolean isAnnotation() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isAnonymous() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isArray() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isCapture() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isCastCompatible(ITypeBinding type) { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isClass() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isEnum() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isFromSource() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isGenericType() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isInterface() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } // add @Override here once Eclipse Mars is no longer supported public boolean isIntersectionType() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isLocal() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isMember() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isNested() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isNullType() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isParameterizedType() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isPrimitive() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isRawType() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isSubTypeCompatible(ITypeBinding type) { String name = type.getBinaryName(); if (exceptionBinaryName.endsWith("Error;")) { if (name.equals("Ljava/lang/Throwable;") || name.equals("Ljava/lang/Error;") || name.equals(exceptionBinaryName)) { return true; } } else { if (name.equals("Ljava/lang/Throwable;") || name.equals("Ljava/lang/Exception;") || name.equals("Ljava/lang/RuntimeException;") || name.equals(exceptionBinaryName)) { return true; } } return false; } @Override public boolean isTopLevel() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isTypeVariable() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isUpperbound() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isWildcardType() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public IAnnotationBinding[] getAnnotations() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public IJavaElement getJavaElement() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public String getKey() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public int getKind() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return 0; } @Override public boolean isDeprecated() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isEqualTo(IBinding binding) { return this.equals(binding); } @Override public boolean isRecovered() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public boolean isSynthetic() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return false; } @Override public ITypeBinding getGenericTypeOfWildcardType() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } @Override public int getRank() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return 0; } // do not put @Override here, to avoid breaking compilation on Juno @Override public IMethodBinding getFunctionalInterfaceMethod() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } // do not put @Override here, to avoid breaking compilation on Juno @Override public IAnnotationBinding[] getTypeAnnotations() { Assertions.UNREACHABLE("FakeExceptionTypeBinding "); return null; } // do not put @Override here, to avoid breaking compilation on older Eclipse versions public IBinding getDeclaringMember() { // TODO Auto-generated method stub return null; } } WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/jdt/JDT2CAstUtils.java000066400000000000000000000322441342410422700324360ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package com.ibm.wala.cast.java.translator.jdt; import java.util.Collection; import java.util.HashMap; import java.util.LinkedHashSet; import java.util.Set; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.AnonymousClassDeclaration; import org.eclipse.jdt.core.dom.Assignment; import org.eclipse.jdt.core.dom.Assignment.Operator; import org.eclipse.jdt.core.dom.EnumDeclaration; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.core.dom.InfixExpression; import org.eclipse.jdt.core.dom.Modifier; import org.eclipse.jdt.core.dom.TypeDeclaration; import com.ibm.wala.cast.tree.CAstQualifier; import com.ibm.wala.cast.tree.CAstSymbol; import com.ibm.wala.cast.tree.impl.CAstOperator; import com.ibm.wala.util.debug.Assertions; public class JDT2CAstUtils { public static Collection mapModifiersToQualifiers(int modifiers, boolean isInterface, boolean isAnnotation) { Set quals = new LinkedHashSet<>(); if (isInterface) quals.add(CAstQualifier.INTERFACE); if (isAnnotation) quals.add(CAstQualifier.ANNOTATION); if ((modifiers & Modifier.ABSTRACT) != 0) quals.add(CAstQualifier.ABSTRACT); if ((modifiers & Modifier.FINAL) != 0) quals.add(CAstQualifier.FINAL); if ((modifiers & Modifier.NATIVE) != 0) quals.add(CAstQualifier.NATIVE); // if (flags.isPackage()) quals.add(CAstQualifier.PACKAGE); if ((modifiers & Modifier.PRIVATE) != 0) quals.add(CAstQualifier.PRIVATE); if ((modifiers & Modifier.PROTECTED) != 0) quals.add(CAstQualifier.PROTECTED); if ((modifiers & Modifier.PUBLIC) != 0) quals.add(CAstQualifier.PUBLIC); if ((modifiers & Modifier.STATIC) != 0) quals.add(CAstQualifier.STATIC); if ((modifiers & Modifier.STRICTFP) != 0) quals.add(CAstQualifier.STRICTFP); if ((modifiers & Modifier.SYNCHRONIZED) != 0) quals.add(CAstQualifier.SYNCHRONIZED); if ((modifiers & Modifier.TRANSIENT) != 0) quals.add(CAstQualifier.TRANSIENT); if ((modifiers & Modifier.VOLATILE) != 0) quals.add(CAstQualifier.VOLATILE); return quals; } public static CAstOperator mapAssignOperator(Operator op) { if (op == Assignment.Operator.PLUS_ASSIGN) return CAstOperator.OP_ADD; else if (op == Assignment.Operator.BIT_AND_ASSIGN) return CAstOperator.OP_BIT_AND; else if (op == Assignment.Operator.BIT_OR_ASSIGN) return CAstOperator.OP_BIT_OR; else if (op == Assignment.Operator.BIT_XOR_ASSIGN) return CAstOperator.OP_BIT_XOR; else if (op == Assignment.Operator.DIVIDE_ASSIGN) return CAstOperator.OP_DIV; else if (op == Assignment.Operator.REMAINDER_ASSIGN) return CAstOperator.OP_MOD; else if (op == Assignment.Operator.TIMES_ASSIGN) return CAstOperator.OP_MUL; else if (op == Assignment.Operator.LEFT_SHIFT_ASSIGN) return CAstOperator.OP_LSH; else if (op == Assignment.Operator.RIGHT_SHIFT_SIGNED_ASSIGN) return CAstOperator.OP_RSH; else if (op == Assignment.Operator.MINUS_ASSIGN) return CAstOperator.OP_SUB; else if (op == Assignment.Operator.RIGHT_SHIFT_UNSIGNED_ASSIGN) return CAstOperator.OP_URSH; Assertions.UNREACHABLE("Unknown assignment operator"); return null; } protected static CAstOperator mapBinaryOpcode(InfixExpression.Operator operator) { if (operator == InfixExpression.Operator.PLUS) return CAstOperator.OP_ADD; // separate bitwise and logical AND / OR ? '&' / '|' ? if (operator == InfixExpression.Operator.AND) return CAstOperator.OP_BIT_AND; if (operator == InfixExpression.Operator.OR) return CAstOperator.OP_BIT_OR; if (operator == InfixExpression.Operator.XOR) return CAstOperator.OP_BIT_XOR; // TODO: shouldn't get here (conditional and handled differently); however should separate bitwise & logical '&' / '|', maybe. if (operator == InfixExpression.Operator.CONDITIONAL_AND) return CAstOperator.OP_REL_AND; if (operator == InfixExpression.Operator.CONDITIONAL_OR) return CAstOperator.OP_REL_OR; if (operator == InfixExpression.Operator.DIVIDE) return CAstOperator.OP_DIV; if (operator == InfixExpression.Operator.EQUALS) return CAstOperator.OP_EQ; if (operator == InfixExpression.Operator.GREATER_EQUALS) return CAstOperator.OP_GE; if (operator == InfixExpression.Operator.GREATER) return CAstOperator.OP_GT; if (operator == InfixExpression.Operator.LESS_EQUALS) return CAstOperator.OP_LE; if (operator == InfixExpression.Operator.LESS) return CAstOperator.OP_LT; if (operator == InfixExpression.Operator.REMAINDER) return CAstOperator.OP_MOD; if (operator == InfixExpression.Operator.TIMES) return CAstOperator.OP_MUL; if (operator == InfixExpression.Operator.NOT_EQUALS) return CAstOperator.OP_NE; if (operator == InfixExpression.Operator.LEFT_SHIFT) return CAstOperator.OP_LSH; if (operator == InfixExpression.Operator.RIGHT_SHIFT_SIGNED) return CAstOperator.OP_RSH; if (operator == InfixExpression.Operator.MINUS) return CAstOperator.OP_SUB; if (operator == InfixExpression.Operator.RIGHT_SHIFT_UNSIGNED) return CAstOperator.OP_URSH; Assertions.UNREACHABLE("Java2CAstTranslator.JavaTranslatingVisitorImpl.mapBinaryOpcode(): unrecognized binary operator."); return null; } /** * Returns true if type is char, byte, short, int, or long. Return false otherwise (including boolean!) */ public static boolean isLongOrLess(ITypeBinding type) { String t = type.getBinaryName(); return t.equals("C") || t.equals("B") || t.equals("S") || t.equals("I") || t.equals("J"); } /** * If isLongOrLess(type), returns Integer(0). If a float or double, returns Double(0.0) Otherwise (including boolean), returns * CAstSymbol.NULL_DEFAULT_VALUE. */ public static Object defaultValueForType(ITypeBinding type) { if (isLongOrLess(type)) return Integer.valueOf(0); else if (type.getBinaryName().equals("D") || type.getBinaryName().equals("F")) return new Double(0.0); else return CAstSymbol.NULL_DEFAULT_VALUE; } public static ITypeBinding promoteTypes(ITypeBinding t1, ITypeBinding t2, AST ast) { // JLS 5.6.2 ITypeBinding doble = ast.resolveWellKnownType("double"); if (t1.equals(doble) || t2.equals(doble)) return doble; ITypeBinding flotando = ast.resolveWellKnownType("float"); if (t1.equals(flotando) || t2.equals(flotando)) return flotando; ITypeBinding largo = ast.resolveWellKnownType("long"); if (t1.equals(largo) || t2.equals(largo)) return largo; return ast.resolveWellKnownType("int"); } public static ITypeBinding getDeclaringClassOfNode(ASTNode n) { ASTNode current = n; while (current != null) { if (current instanceof TypeDeclaration) return ((TypeDeclaration) current).resolveBinding(); else if (current instanceof AnonymousClassDeclaration) return ((AnonymousClassDeclaration) current).resolveBinding(); else if (current instanceof EnumDeclaration) return ((EnumDeclaration) current).resolveBinding(); current = current.getParent(); } Assertions.UNREACHABLE("Couldn't find declaring class of node"); return null; } static String anonTypeName(ITypeBinding ct) { String binName = ct.getBinaryName(); String dollarSignNumber = binName.substring(binName.indexOf('$')); return "' + dollarSignNumber; } /** * If a type variable, return the bound (getTypeVariablesBase()). If a parameterized type, return the generic type. */ public static ITypeBinding getErasedType(ITypeBinding returnType, AST ast) { if (returnType.isTypeVariable() || returnType.isCapture()) return getTypesVariablesBase(returnType, ast); return returnType.getTypeDeclaration(); // Things like "Collection" are parameterized types... } public static ITypeBinding getTypesVariablesBase(ITypeBinding returnType, AST ast) { assert returnType.isTypeVariable() || returnType.isCapture(); if (returnType.getTypeBounds().length > 0) return returnType.getTypeBounds()[0]; // TODO: why is there more than one bound? else return ast.resolveWellKnownType("java.lang.Object"); } public static InfixExpression.Operator mapAssignOperatorToInfixOperator(Assignment.Operator op) { if (op == Assignment.Operator.PLUS_ASSIGN) return InfixExpression.Operator.PLUS; else if (op == Assignment.Operator.BIT_AND_ASSIGN) return InfixExpression.Operator.AND; else if (op == Assignment.Operator.BIT_OR_ASSIGN) return InfixExpression.Operator.OR; else if (op == Assignment.Operator.BIT_XOR_ASSIGN) return InfixExpression.Operator.XOR; else if (op == Assignment.Operator.DIVIDE_ASSIGN) return InfixExpression.Operator.DIVIDE; else if (op == Assignment.Operator.REMAINDER_ASSIGN) return InfixExpression.Operator.REMAINDER; else if (op == Assignment.Operator.TIMES_ASSIGN) return InfixExpression.Operator.TIMES; else if (op == Assignment.Operator.LEFT_SHIFT_ASSIGN) return InfixExpression.Operator.LEFT_SHIFT; else if (op == Assignment.Operator.RIGHT_SHIFT_SIGNED_ASSIGN) return InfixExpression.Operator.RIGHT_SHIFT_SIGNED; else if (op == Assignment.Operator.MINUS_ASSIGN) return InfixExpression.Operator.MINUS; else if (op == Assignment.Operator.RIGHT_SHIFT_UNSIGNED_ASSIGN) return InfixExpression.Operator.RIGHT_SHIFT_UNSIGNED; Assertions.UNREACHABLE("Unknown assignment operator"); return null; } private static void getMethodInClassOrSuperclass(IMethodBinding met, ITypeBinding klass, boolean superclassonly, HashMap overridden) { if (!superclassonly) { for (IMethodBinding ourmet : klass.getDeclaredMethods()) if (met.overrides(ourmet)) { overridden.put(ourmet.getMethodDeclaration().getReturnType(), ourmet.getMethodDeclaration()); break; // there can only be one per class so don't bother looking for more } } for (ITypeBinding iface : klass.getInterfaces()) getMethodInClassOrSuperclass(met, iface, false, overridden); ITypeBinding superclass = klass.getSuperclass(); if (superclass != null) getMethodInClassOrSuperclass(met, superclass, false, overridden); } public static Collection getOverriddenMethod(IMethodBinding met) { HashMap overridden = new HashMap<>(); if (met == null) return null; getMethodInClassOrSuperclass(met, met.getDeclaringClass(), true, overridden); if (overridden.size() == 0) return null; return overridden.values(); } public static boolean sameErasedSignatureAndReturnType(IMethodBinding met1, IMethodBinding met2) { if (!met1.getReturnType().getErasure().isEqualTo(met2.getReturnType().getErasure())) return false; ITypeBinding[] params1 = met1.getParameterTypes(); ITypeBinding[] params2 = met2.getParameterTypes(); if (params1.length != params2.length) return false; for (int i = 0; i < params1.length; i++) if (!params1[i].getErasure().isEqualTo(params2[i].getErasure())) return false; return true; } } JDTIdentityMapper.java000066400000000000000000000220121342410422700333500ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/jdt/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package com.ibm.wala.cast.java.translator.jdt; import java.util.Map; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.core.dom.IVariableBinding; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.types.Descriptor; import com.ibm.wala.types.FieldReference; import com.ibm.wala.types.MethodReference; import com.ibm.wala.types.Selector; import com.ibm.wala.types.TypeName; import com.ibm.wala.types.TypeReference; import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.debug.Assertions; import com.ibm.wala.util.strings.Atom; /** * Class responsible for mapping JDT type system objects representing types, methods and fields to the corresponding WALA * TypeReferences, MethodReferences and FieldReferences. Used during translation and by clients to help correlate WALA analysis * results to the various AST nodes. * * In English: keeps a hashtable of WALA "type references", "field references", etc. which describe types, fields, etc. Creates * these from their JDT equivalents and keeps the hashtable linking the two representations. * * @author rfuhrer */ public class JDTIdentityMapper { private final Map fTypeMap = HashMapFactory.make(); private final Map fFieldMap = HashMapFactory.make(); private final Map fMethodMap = HashMapFactory.make(); private final ClassLoaderReference fClassLoaderRef; // TAGALONG private final AST fAst; public JDTIdentityMapper(ClassLoaderReference clr, AST ast) { fClassLoaderRef = clr; fAst = ast; } // TYPES /** * Create (or reuse) a TypeReference for the given JDT Type Binding.
* This method canonicalizes the TypeReferences */ public TypeReference getTypeRef(ITypeBinding type) { type = JDT2CAstUtils.getErasedType(type, fAst); // GENERICS: erasure... if (!fTypeMap.containsKey(type.getKey())) { TypeName typeName = TypeName.string2TypeName(typeToTypeID(type)); TypeReference ref = TypeReference.findOrCreate(fClassLoaderRef, typeName); fTypeMap.put(type.getKey(), ref); return ref; } return fTypeMap.get(type.getKey()); } /** * Translates the given Polyglot type to a name suitable for use in a DOMO TypeReference (i.e. a bytecode-compliant type name). */ public String typeToTypeID(ITypeBinding type) { if (type.isPrimitive()) return type.getBinaryName(); else if (type.isArray()) // arrays' binary names in JDT are like "[Ljava.lang.String;" return type.getBinaryName().replace('.', '/').replace(";", ""); else if (type.isLocal() || type.isAnonymous()) return anonLocalTypeToTypeID(type); else if (type.isClass() || type.isEnum() || type.isInterface()) // in polyglot interfaces are classes too. not in JDT // class binary names in JDT are like "java.lang.String" return 'L' + type.getBinaryName().replace('.', '/'); // TODO: else if (type.isTypeVariable()) { return typeToTypeID(JDT2CAstUtils.getTypesVariablesBase(type, fAst)); } Assertions.UNREACHABLE("typeToTypeID() encountered the type " + type + " that is neither primitive, array, nor class!"); return null; } public String anonLocalTypeToTypeID(ITypeBinding type) { String outerTypeID = typeToTypeID(type.getDeclaringClass()); String metSelectorName; IMethodBinding metBinding = type.getDeclaringMethod(); if (metBinding == null) // anonymous class declared in initializer or static initializer (rare case...) metSelectorName = ""; else metSelectorName = getMethodRef(metBinding).getSelector().toString(); String shortName = (type.isAnonymous()) ? JDT2CAstUtils.anonTypeName(type) : type.getName(); return outerTypeID + '/' + metSelectorName + '/' + shortName; } // FIELDS public FieldReference getFieldRef(IVariableBinding field) { if (!fFieldMap.containsKey(field.getKey())) { // create one ITypeBinding targetType = field.getDeclaringClass(); TypeReference targetTypeRef = TypeReference.findOrCreate(fClassLoaderRef, typeToTypeID(targetType)); ITypeBinding fieldType = field.getType(); TypeReference fieldTypeRef = TypeReference.findOrCreate(fClassLoaderRef, typeToTypeID(fieldType)); Atom fieldName = Atom.findOrCreateUnicodeAtom(field.getName()); FieldReference ref = FieldReference.findOrCreate(targetTypeRef, fieldName, fieldTypeRef); fFieldMap.put(field.getKey(), ref); return ref; } return fFieldMap.get(field.getKey()); } public MethodReference fakeMethodRefNoArgs(String key, String typeID, String metName, String returnTypeID) { if (!fMethodMap.containsKey(key)) { // create one TypeName ownerType = TypeName.string2TypeName(typeID); TypeReference ownerTypeRef = TypeReference.findOrCreate(fClassLoaderRef, ownerType); // FAKE SELECTOR Atom name = Atom.findOrCreateUnicodeAtom(metName); TypeName[] argTypeNames = null; TypeName retTypeName = TypeName.string2TypeName(returnTypeID); Descriptor desc = Descriptor.findOrCreate(argTypeNames, retTypeName); Selector selector = new Selector(name, desc); MethodReference ref = MethodReference.findOrCreate(ownerTypeRef, selector); fMethodMap.put(key, ref); return ref; } return fMethodMap.get(key); } // METHODS public MethodReference getMethodRef(IMethodBinding met) { if (!fMethodMap.containsKey(met.getKey())) { // create one TypeName ownerType = TypeName.string2TypeName(typeToTypeID(met.getDeclaringClass())); TypeReference ownerTypeRef = TypeReference.findOrCreate(fClassLoaderRef, ownerType); MethodReference ref = MethodReference.findOrCreate(ownerTypeRef, selectorForMethod(met)); fMethodMap.put(met.getKey(), ref); return ref; } return fMethodMap.get(met.getKey()); } private Selector selectorForMethod(IMethodBinding met) { // TODO: have to handle default constructors? // TODO: generics... Atom name = (met.isConstructor()) ? MethodReference.initAtom : Atom.findOrCreateUnicodeAtom(met.getName()); TypeName[] argTypeNames = null; ITypeBinding[] formalTypes = met.getParameterTypes(); int length = formalTypes.length; // ENUMS: hidden name and ID in constructor if (met.isConstructor() && met.getDeclaringClass().isEnum()) length += 2; // Descriptor prefers null to an empty array if (length > 0) { argTypeNames = new TypeName[length]; int i = 0; if (met.isConstructor() && met.getDeclaringClass().isEnum()) { argTypeNames[0] = TypeName.string2TypeName(typeToTypeID(fAst.resolveWellKnownType("java.lang.String"))); argTypeNames[1] = TypeName.string2TypeName(typeToTypeID(fAst.resolveWellKnownType("int"))); i = 2; } for (ITypeBinding argType : formalTypes) argTypeNames[i++] = TypeName.string2TypeName(typeToTypeID(argType)); } TypeName retTypeName = TypeName.string2TypeName(typeToTypeID(met.getReturnType())); Descriptor desc = Descriptor.findOrCreate(argTypeNames, retTypeName); return new Selector(name, desc); } } JDTJava2CAstTranslator.java000066400000000000000000004577011342410422700342230ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/jdt/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package com.ibm.wala.cast.java.translator.jdt; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.AbstractTypeDeclaration; import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration; import org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration; import org.eclipse.jdt.core.dom.AnonymousClassDeclaration; import org.eclipse.jdt.core.dom.ArrayAccess; import org.eclipse.jdt.core.dom.ArrayCreation; import org.eclipse.jdt.core.dom.ArrayInitializer; import org.eclipse.jdt.core.dom.AssertStatement; import org.eclipse.jdt.core.dom.Assignment; import org.eclipse.jdt.core.dom.Block; import org.eclipse.jdt.core.dom.BodyDeclaration; import org.eclipse.jdt.core.dom.BooleanLiteral; import org.eclipse.jdt.core.dom.BreakStatement; import org.eclipse.jdt.core.dom.CastExpression; import org.eclipse.jdt.core.dom.CatchClause; import org.eclipse.jdt.core.dom.CharacterLiteral; import org.eclipse.jdt.core.dom.ClassInstanceCreation; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.ConditionalExpression; import org.eclipse.jdt.core.dom.ConstructorInvocation; import org.eclipse.jdt.core.dom.ContinueStatement; import org.eclipse.jdt.core.dom.DoStatement; import org.eclipse.jdt.core.dom.EmptyStatement; import org.eclipse.jdt.core.dom.EnhancedForStatement; import org.eclipse.jdt.core.dom.EnumConstantDeclaration; import org.eclipse.jdt.core.dom.EnumDeclaration; import org.eclipse.jdt.core.dom.Expression; import org.eclipse.jdt.core.dom.ExpressionStatement; import org.eclipse.jdt.core.dom.FieldAccess; import org.eclipse.jdt.core.dom.FieldDeclaration; import org.eclipse.jdt.core.dom.ForStatement; import org.eclipse.jdt.core.dom.IAnnotationBinding; import org.eclipse.jdt.core.dom.IBinding; import org.eclipse.jdt.core.dom.IMemberValuePairBinding; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.core.dom.IVariableBinding; import org.eclipse.jdt.core.dom.IfStatement; import org.eclipse.jdt.core.dom.InfixExpression; import org.eclipse.jdt.core.dom.Initializer; import org.eclipse.jdt.core.dom.InstanceofExpression; import org.eclipse.jdt.core.dom.LabeledStatement; import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.MethodInvocation; import org.eclipse.jdt.core.dom.Modifier; import org.eclipse.jdt.core.dom.NullLiteral; import org.eclipse.jdt.core.dom.NumberLiteral; import org.eclipse.jdt.core.dom.PackageDeclaration; import org.eclipse.jdt.core.dom.ParenthesizedExpression; import org.eclipse.jdt.core.dom.PostfixExpression; import org.eclipse.jdt.core.dom.PrefixExpression; import org.eclipse.jdt.core.dom.QualifiedName; import org.eclipse.jdt.core.dom.ReturnStatement; import org.eclipse.jdt.core.dom.SimpleName; import org.eclipse.jdt.core.dom.SimpleType; import org.eclipse.jdt.core.dom.SingleVariableDeclaration; import org.eclipse.jdt.core.dom.Statement; import org.eclipse.jdt.core.dom.StringLiteral; import org.eclipse.jdt.core.dom.SuperConstructorInvocation; import org.eclipse.jdt.core.dom.SuperFieldAccess; import org.eclipse.jdt.core.dom.SuperMethodInvocation; import org.eclipse.jdt.core.dom.SwitchCase; import org.eclipse.jdt.core.dom.SwitchStatement; import org.eclipse.jdt.core.dom.SynchronizedStatement; import org.eclipse.jdt.core.dom.ThisExpression; import org.eclipse.jdt.core.dom.ThrowStatement; import org.eclipse.jdt.core.dom.TryStatement; import org.eclipse.jdt.core.dom.Type; import org.eclipse.jdt.core.dom.TypeDeclaration; import org.eclipse.jdt.core.dom.TypeDeclarationStatement; import org.eclipse.jdt.core.dom.TypeLiteral; import org.eclipse.jdt.core.dom.VariableDeclarationExpression; import org.eclipse.jdt.core.dom.VariableDeclarationFragment; import org.eclipse.jdt.core.dom.VariableDeclarationStatement; import org.eclipse.jdt.core.dom.WhileStatement; import com.ibm.wala.analysis.typeInference.JavaPrimitiveType; import com.ibm.wala.cast.ir.translator.AstTranslator.InternalCAstSymbol; import com.ibm.wala.cast.ir.translator.TranslatorToCAst; import com.ibm.wala.cast.ir.translator.TranslatorToCAst.DoLoopTranslator; import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl; import com.ibm.wala.cast.java.loader.Util; import com.ibm.wala.cast.java.translator.JavaProcedureEntity; import com.ibm.wala.cast.tree.CAst; import com.ibm.wala.cast.tree.CAstAnnotation; import com.ibm.wala.cast.tree.CAstControlFlowMap; import com.ibm.wala.cast.tree.CAstEntity; import com.ibm.wala.cast.tree.CAstNode; import com.ibm.wala.cast.tree.CAstNodeTypeMap; import com.ibm.wala.cast.tree.CAstQualifier; import com.ibm.wala.cast.tree.CAstSourcePositionMap; import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position; import com.ibm.wala.cast.tree.CAstType; import com.ibm.wala.cast.tree.impl.CAstControlFlowRecorder; import com.ibm.wala.cast.tree.impl.CAstImpl; import com.ibm.wala.cast.tree.impl.CAstNodeTypeMapRecorder; import com.ibm.wala.cast.tree.impl.CAstOperator; import com.ibm.wala.cast.tree.impl.CAstSourcePositionRecorder; import com.ibm.wala.cast.tree.impl.CAstSymbolImpl; import com.ibm.wala.cast.util.CAstPrinter; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.shrikeBT.IInvokeInstruction; import com.ibm.wala.types.FieldReference; import com.ibm.wala.types.MethodReference; import com.ibm.wala.types.TypeReference; import com.ibm.wala.util.collections.EmptyIterator; import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.collections.HashSetFactory; import com.ibm.wala.util.collections.Pair; import com.ibm.wala.util.debug.Assertions; // TOTEST: // "1/0" surrounded by catch ArithmeticException & RunTimeException (TryCatchContext.getCatchTypes" // another subtype of ArithmeticException surrounded by catch ArithmeticException // binary ops with all kinds of type conversions // simplenames: fields of this, fields of an enclosing class, fields of an enclosing method, static fields, fully qualified fields w/ package stuff // exceptional CFG edges, somehow. call nodes, new nodes, division by zero in binary ops, null pointer in field accesses, etc. // implicit constructors // FIXME 1.4: thing about / ask agout TAGALONG (JDT stuff tagging along in memory cos we keep it). // FIXME 1.4: find LEFTOUT and find out why polyglot has extra code / infrastructure, if it's used and what for, etc. // Java 1.6: // * type parameters/generics: see getArgumentTypes in ProcedureEntity$anon. also anywhere we use ITypeBinding.equals() may be affected // see anywhere in code labeled GENERICS for present "treat as raw types"/"pretend it's 1.4 and casts" solution. // * boxing (YUCK). see resolveBoxing() // * enums (probably in simplename or something. but using resolveConstantExpressionValue() possible) public abstract class JDTJava2CAstTranslator { protected boolean dump = false; protected final CAst fFactory = new CAstImpl(); // /////////////////////////////////////////// // / HANDLINGS OF VARIOUS THINGS // // /////////////////////////////////////////// protected final AST ast; // TAGALONG protected final JDTIdentityMapper fIdentityMapper; // TAGALONG protected final JDTTypeDictionary fTypeDict; protected final JavaSourceLoaderImpl fSourceLoader; protected final ITypeBinding fDivByZeroExcType; protected final ITypeBinding fNullPointerExcType; protected final ITypeBinding fClassCastExcType; protected final ITypeBinding fRuntimeExcType; protected final ITypeBinding NoClassDefFoundError; protected final ITypeBinding ExceptionInInitializerError; protected final ITypeBinding OutOfMemoryError; protected final DoLoopTranslator doLoopTranslator; protected final String fullPath; protected final CompilationUnit cu; // // COMPILATION UNITS & TYPES // public JDTJava2CAstTranslator(JavaSourceLoaderImpl sourceLoader, CompilationUnit astRoot, String fullPath, boolean replicateForDoLoops) { this(sourceLoader, astRoot, fullPath, replicateForDoLoops, false); } public JDTJava2CAstTranslator(JavaSourceLoaderImpl sourceLoader, CompilationUnit astRoot, String fullPath, boolean replicateForDoLoops, boolean dump) { fDivByZeroExcType = FakeExceptionTypeBinding.arithmetic; fNullPointerExcType = FakeExceptionTypeBinding.nullPointer; fClassCastExcType = FakeExceptionTypeBinding.classCast; NoClassDefFoundError = FakeExceptionTypeBinding.noClassDef; ExceptionInInitializerError = FakeExceptionTypeBinding.initException; OutOfMemoryError = FakeExceptionTypeBinding.outOfMemory; this.fSourceLoader = sourceLoader; this.cu = astRoot; this.fullPath = fullPath; this.ast = astRoot.getAST(); this.doLoopTranslator = new DoLoopTranslator(replicateForDoLoops, fFactory); this.dump = dump; // FIXME: we might need one AST (-> "Object" class) for all files. fIdentityMapper = new JDTIdentityMapper(fSourceLoader.getReference(), ast); fTypeDict = new JDTTypeDictionary(ast, fIdentityMapper); fRuntimeExcType = ast.resolveWellKnownType("java.lang.RuntimeException"); assert fRuntimeExcType != null; } public CAstEntity translateToCAst() { List declEntities = new ArrayList<>(); for (AbstractTypeDeclaration decl : (Iterable) cu.types()) { // can be of type AnnotationTypeDeclaration, EnumDeclaration, TypeDeclaration declEntities.add(visit(decl, new RootContext())); } if (dump) { for(CAstEntity d : declEntities) { CAstPrinter.printTo(d, new PrintWriter(System.err)); } } return new CompilationUnitEntity(cu.getPackage(), declEntities); } // // TYPES // protected final class ClassEntity implements CAstEntity { // TAGALONG (not static, will keep reference to ast, fIdentityMapper, etc) @Override public Position getPosition(int arg) { return null; } private final String fName; private final Collection fQuals; private final Collection fEntities; private final ITypeBinding fJdtType; // TAGALONG private final T fSourcePosition; private final T fNamePos; public ClassEntity(ITypeBinding jdtType, String name, Collection quals, Collection entities, T pos, T namePos) { fNamePos = namePos; fName = name; fQuals = quals; fEntities = entities; fJdtType = jdtType; fSourcePosition = pos; } @Override public Collection getAnnotations() { // TODO Auto-generated method stub return null; } @Override public int getKind() { return TYPE_ENTITY; } @Override public String getName() { return fName; // unqualified? } @Override public String getSignature() { return 'L' + fName.replace('.', '/') + ';'; } @Override public String[] getArgumentNames() { return new String[0]; } @Override public CAstNode[] getArgumentDefaults() { return new CAstNode[0]; } @Override public int getArgumentCount() { return 0; } @Override public CAstNode getAST() { // This entity has no AST nodes, really. return null; } @Override public Map> getAllScopedEntities() { return Collections.singletonMap(null, fEntities); } @Override public Iterator getScopedEntities(CAstNode construct) { Assertions.UNREACHABLE("Non-AST-bearing entity (ClassEntity) asked for scoped entities related to a given AST node"); return null; } @Override public CAstControlFlowMap getControlFlow() { // This entity has no AST nodes, really. return null; } @Override public CAstSourcePositionMap getSourceMap() { // This entity has no AST nodes, really. return null; } @Override public CAstSourcePositionMap.Position getPosition() { return fSourcePosition; } @Override public CAstNodeTypeMap getNodeTypeMap() { // This entity has no AST nodes, really. return new CAstNodeTypeMap() { @Override public CAstType getNodeType(CAstNode node) { throw new UnsupportedOperationException(); } @Override public Collection getMappedNodes() { throw new UnsupportedOperationException(); } }; } @Override public Collection getQualifiers() { return fQuals; } @Override public CAstType getType() { // return new JdtJavaType(fCT, getTypeDict(), fTypeSystem); return fTypeDict.new JdtJavaType(fJdtType); } @Override public Position getNamePosition() { return fNamePos; } } private static boolean isInterface(AbstractTypeDeclaration decl) { return decl instanceof AnnotationTypeDeclaration || (decl instanceof TypeDeclaration && ((TypeDeclaration)decl).isInterface()); } private CAstEntity visitTypeDecl(AbstractTypeDeclaration n, WalkContext context) { return createClassDeclaration(n, n.bodyDeclarations(), null, n.resolveBinding(), n.getName().getIdentifier(), n.getModifiers(), isInterface(n), n instanceof AnnotationTypeDeclaration, context, makePosition(n.getName())); } /** * @param name Used in creating default constructor, and passed into new ClassEntity() */ private CAstEntity createClassDeclaration(ASTNode n, List bodyDecls, List enumConstants, ITypeBinding typeBinding, String name, int modifiers, boolean isInterface, boolean isAnnotation, WalkContext context, T namePos) { final List memberEntities = new ArrayList<>(); // find and collect all initializers (type Initializer) and field initializers (type VariableDeclarationFragment). // instance initializer code will be inserted into each constructors. // all static initializer code will be grouped together in its own entity. ArrayList inits = new ArrayList<>(); ArrayList staticInits = new ArrayList<>(); if (enumConstants != null) { // always (implicitly) static,final (actually, no modifiers allowed) staticInits.addAll(enumConstants); } for (BodyDeclaration decl : bodyDecls) { if (decl instanceof Initializer) { Initializer initializer = (Initializer) decl; boolean isStatic = ((initializer.getModifiers() & Modifier.STATIC) != 0); (isStatic ? staticInits : inits).add(initializer); } else if (decl instanceof FieldDeclaration) { FieldDeclaration fd = (FieldDeclaration) decl; for (VariableDeclarationFragment frag : (Iterable) fd.fragments()) { if (frag.getInitializer() != null) { boolean isStatic = ((fd.getModifiers() & Modifier.STATIC) != 0); (isStatic ? staticInits : inits).add(frag); } } } } // process entities. initializers will be folded in here. if (enumConstants != null) { for (EnumConstantDeclaration decl : enumConstants) { memberEntities.add(visit(decl)); } } for (BodyDeclaration decl : bodyDecls) { if (decl instanceof FieldDeclaration) { FieldDeclaration fieldDecl = (FieldDeclaration) decl; Collection quals = JDT2CAstUtils.mapModifiersToQualifiers(fieldDecl.getModifiers(), false, false); for (VariableDeclarationFragment fieldFrag : (Iterable) fieldDecl.fragments()) { IVariableBinding fieldBinding = fieldFrag.resolveBinding(); memberEntities.add(new FieldEntity(fieldFrag.getName().getIdentifier(), fieldBinding.getType(), quals, makePosition(fieldFrag.getStartPosition(), fieldFrag.getStartPosition() + fieldFrag.getLength()), handleAnnotations(fieldBinding), makePosition(fieldFrag.getName()))); } } else if (decl instanceof Initializer) { // Initializers are inserted into constructors when making constructors. } else if (decl instanceof MethodDeclaration) { MethodDeclaration metDecl = (MethodDeclaration) decl; if (typeBinding.isEnum() && metDecl.isConstructor()) memberEntities.add(createEnumConstructorWithParameters(metDecl.resolveBinding(), metDecl, context, inits, metDecl)); else { memberEntities.add(visit(metDecl, typeBinding, context, inits)); // /////////////// Java 1.5 "overridden with subtype" thing (covariant return type) /////////// Collection overriddenMets = JDT2CAstUtils.getOverriddenMethod(metDecl.resolveBinding()); if (overriddenMets != null) { for (IMethodBinding overridden : overriddenMets) if (!JDT2CAstUtils.sameErasedSignatureAndReturnType(metDecl.resolveBinding(), overridden)) memberEntities.add(makeSyntheticCovariantRedirect(metDecl, metDecl.resolveBinding(), overridden, context)); } } } else if (decl instanceof AbstractTypeDeclaration) { memberEntities.add(visit((AbstractTypeDeclaration) decl, context)); } else if (decl instanceof AnnotationTypeMemberDeclaration) { // TODO: need to decide what to do with these } else { Assertions.UNREACHABLE("BodyDeclaration not Field, Initializer, or Method"); } } // add default constructor(s) if necessary // most default constructors have no parameters; however, those created by anonymous classes will have parameters // (they just call super with those parameters) for (IMethodBinding met : typeBinding.getDeclaredMethods()) { if (met.isDefaultConstructor()) { if (typeBinding.isEnum()) memberEntities.add(createEnumConstructorWithParameters(met, n, context, inits, null)); else if (met.getParameterTypes().length > 0) memberEntities.add(createDefaultConstructorWithParameters(met, n, context, inits)); else memberEntities.add(createDefaultConstructor(typeBinding, context, inits, n)); } } if (typeBinding.isEnum() && !typeBinding.isAnonymous()) doEnumHiddenEntities(typeBinding, memberEntities, context); // collect static inits if (!staticInits.isEmpty()) { Map childEntities = HashMapFactory.make(); final MethodContext newContext = new MethodContext(context, childEntities); // childEntities is the same one as in the ProcedureEntity. later visit(New), etc. may add to this. CAstNode[] bodyNodes = new CAstNode[staticInits.size()]; for (int i = 0; i < staticInits.size(); i++) bodyNodes[i] = visitFieldInitNode(staticInits.get(i), newContext); CAstNode staticInitAst = makeNode(newContext, fFactory, n, CAstNode.BLOCK_STMT, bodyNodes); memberEntities.add(new ProcedureEntity(staticInitAst, typeBinding, childEntities, newContext, null)); } Collection quals = JDT2CAstUtils.mapModifiersToQualifiers(modifiers, isInterface, isAnnotation); return new ClassEntity(typeBinding, name, quals, memberEntities, makePosition(n), namePos); } private CAstEntity visit(AnonymousClassDeclaration n, WalkContext context) { return createClassDeclaration(n, n.bodyDeclarations(), null, n.resolveBinding(), JDT2CAstUtils.anonTypeName(n.resolveBinding()), 0 /* no modifiers */, false, false, context, null); } private CAstNode visit(TypeDeclarationStatement n, WalkContext context) { // TODO 1.6: enums of course... AbstractTypeDeclaration decl = n.getDeclaration(); assert decl instanceof TypeDeclaration : "Local enum declaration not yet supported"; CAstEntity classEntity = visitTypeDecl(decl, context); // these statements doin't actually do anything, just define a type final CAstNode lcdNode = makeNode(context, fFactory, n, CAstNode.EMPTY); // so define it! context.addScopedEntity(lcdNode, classEntity); return lcdNode; } // //////////////////////////////// // METHODS // //////////////////////////////// /** * @param n for positioning. * * Make a constructor with parameters that calls super(...) with parameters. Used for anonymous classes with arguments to a * constructor, like new Foo(arg1,arg2) { } */ private CAstEntity createDefaultConstructorWithParameters(IMethodBinding ctor, ASTNode n, WalkContext oldContext, ArrayList inits) { // PART I: find super ctor to call ITypeBinding newType = ctor.getDeclaringClass(); ITypeBinding superType = newType.getSuperclass(); IMethodBinding superCtor = null; for (IMethodBinding m : superType.getDeclaredMethods()) if (m.isConstructor() && Arrays.equals(m.getParameterTypes(), ctor.getParameterTypes())) superCtor = m; assert superCtor != null : "couldn't find constructor for anonymous class"; // PART II: make ctor with simply "super(a,b,c...)" final Map memberEntities = new LinkedHashMap<>(); final MethodContext context = new MethodContext(oldContext, memberEntities); MethodDeclaration fakeCtor = ast.newMethodDeclaration(); fakeCtor.setConstructor(true); fakeCtor.setSourceRange(n.getStartPosition(), n.getLength()); fakeCtor.setBody(ast.newBlock()); // PART IIa: make a fake JDT constructor method with the proper number of args // Make fake args that will be passed String[] fakeArguments = new String[superCtor.getParameterTypes().length + 1]; ArrayList paramTypes = new ArrayList<>(superCtor.getParameterTypes().length); for (int i = 0; i < fakeArguments.length; i++) fakeArguments[i] = (i == 0) ? "this" : ("argument" + i); // TODO: change to invalid name and don't use // singlevariabledeclaration below for (int i = 1; i < fakeArguments.length; i++) { // the name SingleVariableDeclaration svd = ast.newSingleVariableDeclaration(); svd.setName(ast.newSimpleName(fakeArguments[i])); fakeCtor.parameters().add(svd); // the type paramTypes.add(fTypeDict.getCAstTypeFor(ctor.getParameterTypes()[i - 1])); } // PART IIb: create the statements in the constructor // one super() call plus the inits CAstNode[] bodyNodes = new CAstNode[inits.size() + 1]; // make super(...) call // this, call ref, args CAstNode[] children = new CAstNode[fakeArguments.length + 1]; children[0] = makeNode(context, fFactory, n, CAstNode.SUPER); CallSiteReference callSiteRef = CallSiteReference.make(0, fIdentityMapper.getMethodRef(superCtor), IInvokeInstruction.Dispatch.SPECIAL); children[1] = fFactory.makeConstant(callSiteRef); for (int i = 1; i < fakeArguments.length; i++) { CAstNode argName = fFactory.makeConstant(fakeArguments[i]); CAstNode argType = fFactory.makeConstant(paramTypes.get(i-1)); children[i + 1] = makeNode(context, fFactory, n, CAstNode.VAR, argName, argType); } bodyNodes[0] = makeNode(context, fFactory, n, CAstNode.CALL, children); // QUESTION: no handleExceptions? for (int i = 0; i < inits.size(); i++) bodyNodes[i + 1] = visitFieldInitNode(inits.get(i), context); // finally, make the procedure entity CAstNode ast = makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, bodyNodes); return new ProcedureEntity(ast, fakeCtor, newType, memberEntities, context, paramTypes, null, null); } private CAstEntity createDefaultConstructor(ITypeBinding classBinding, WalkContext oldContext, ArrayList inits, ASTNode positioningNode) { MethodDeclaration fakeCtor = ast.newMethodDeclaration(); fakeCtor.setConstructor(true); // fakeCtor.setName(ast.newSimpleName(className)); will crash on anonymous types... fakeCtor.setSourceRange(positioningNode.getStartPosition(), positioningNode.getLength()); fakeCtor.setBody(ast.newBlock()); return visit(fakeCtor, classBinding, oldContext, inits); } private static IMethodBinding findDefaultCtor(ITypeBinding superClass) { for (IMethodBinding met : superClass.getDeclaredMethods()) { if (met.isConstructor() && met.getParameterTypes().length == 0) return met; } Assertions.UNREACHABLE("Couldn't find default ctor"); return null; } /** * Setup constructor body. Here we add the initializer code (both initalizer blocks and initializers in field declarations). We * may also need to add an implicit super() call. * * @param classBinding Used so we can use this with fake MethodDeclaration nodes, as in the case of creating a default * constructor. */ private CAstNode createConstructorBody(MethodDeclaration n, ITypeBinding classBinding, WalkContext context, ArrayList inits) { // three possibilites: has super(), has this(), has neither. Statement firstStatement = null; if (!n.getBody().statements().isEmpty()) firstStatement = (Statement) n.getBody().statements().get(0); if (firstStatement instanceof SuperConstructorInvocation) { // Split at call to super: // super(); // field initializer code // remainder of ctor body ArrayList origStatements = createBlock(n.getBody(), context); CAstNode[] bodyNodes = new CAstNode[inits.size() + origStatements.size()]; int idx = 0; bodyNodes[idx++] = origStatements.get(0); for (ASTNode init : inits) bodyNodes[idx++] = visitFieldInitNode(init, context); // visit each in this constructor's context, ensuring // proper handling of exceptions (we can't just reuse the // CAstNodes) for (int i = 1; i < origStatements.size(); i++) bodyNodes[idx++] = origStatements.get(i); return makeNode(context, fFactory, n.getBody(), CAstNode.BLOCK_STMT, bodyNodes); // QUESTION: why no LOCAL_SCOPE? // that's the way it is in // polyglot. } else if (firstStatement instanceof ConstructorInvocation) { return visitNode(n.getBody(), context); // has this(...) call; initializers will be set somewhere else. } else { // add explicit call to default super() // QUESTION their todo: following superClass lookup of default ctor won't work if we // process Object in source... ITypeBinding superType = classBinding.getSuperclass(); // find default constructor. IT is an error to have a constructor // without super() when the default constructor of the superclass does not exist. IMethodBinding defaultSuperCtor = findDefaultCtor(superType); CallSiteReference callSiteRef = CallSiteReference.make(0, fIdentityMapper.getMethodRef(defaultSuperCtor), IInvokeInstruction.Dispatch.SPECIAL); // QUESTION: why isn't first arg this like in visit(ConstructorInvocation) ? // why don't we handle exceptions like in visit(ConstructorInvocation) ? (these two things are same in polyglot // implementation) CAstNode superCall = makeNode(context, fFactory, n.getBody(), CAstNode.CALL, makeNode(context, fFactory, n.getBody(), CAstNode.SUPER), fFactory.makeConstant(callSiteRef)); Object mapper = new Object(); // dummy used for mapping this node in CFG handleThrowsFromCall(defaultSuperCtor, mapper, context); context.cfg().map(mapper, superCall); ArrayList origStatements = createBlock(n.getBody(), context); CAstNode[] bodyNodes = new CAstNode[inits.size() + origStatements.size() + 1]; // superCall, inits, ctor body int idx = 0; bodyNodes[idx++] = superCall; for (ASTNode init : inits) bodyNodes[idx++] = visitFieldInitNode(init, context); for (int i = 0; i < origStatements.size(); i++) bodyNodes[idx++] = origStatements.get(i); return makeNode(context, fFactory, n.getBody(), CAstNode.BLOCK_STMT, bodyNodes); } } /** * Make a "fake" function (it doesn't exist in source code but it does in bytecode) for covariant return types. * * @param overriding Declaration of the overriding method. * @param overridden Binding of the overridden method, in a a superclass or implemented interface. */ private CAstEntity makeSyntheticCovariantRedirect(MethodDeclaration overriding, IMethodBinding overridingBinding, IMethodBinding overridden, WalkContext oldContext) { // SuperClass foo(A, B, C...) // SubClass foo(A,B,C...) // // add a method exactly like overridden that calls overriding final Map memberEntities = new LinkedHashMap<>(); final MethodContext context = new MethodContext(oldContext, memberEntities); CAstNode calltarget; if ((overridingBinding.getModifiers() & Modifier.STATIC) == 0) calltarget = makeNode(context, fFactory, null, CAstNode.SUPER); else calltarget = makeNode(context, fFactory, null, CAstNode.VOID); ITypeBinding paramTypes[] = overridden.getParameterTypes(); ArrayList arguments = new ArrayList<>(); int i = 0; for (SingleVariableDeclaration svd : (Iterable) overriding.parameters()) { CAstNode varNode = makeNode(context, fFactory, null, CAstNode.VAR, fFactory.makeConstant(svd.getName().getIdentifier())); ITypeBinding fromType = JDT2CAstUtils.getErasedType(paramTypes[i], ast); ITypeBinding toType = JDT2CAstUtils.getErasedType(overridingBinding.getParameterTypes()[i], ast); if (fromType.equals(toType)) { arguments.add(varNode); } else { arguments.add(createCast(null, varNode, fromType, toType, context)); } i++; } CAstNode callnode = createMethodInvocation(null, overridingBinding, calltarget, arguments, context); CAstNode mdast = makeNode(context, fFactory, null, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, null, CAstNode.BLOCK_STMT, makeNode(context, fFactory, null, CAstNode.RETURN, callnode))); // make parameters to new synthetic method // use RETURN TYPE of overridden, everything else from overriding (including parameter names) ArrayList paramCAstTypes = new ArrayList<>(overridden.getParameterTypes().length); for (ITypeBinding paramType : overridden.getParameterTypes()) paramCAstTypes.add(fTypeDict.getCAstTypeFor(paramType)); return new ProcedureEntity(mdast, overriding, overridingBinding.getDeclaringClass(), memberEntities, context, paramCAstTypes, overridden.getReturnType(), null); } /** * @param inits Instance intializers & field initializers. Only used if method is a constructor, in which case the initializers * will be inserted in. */ private CAstEntity visit(MethodDeclaration n, ITypeBinding classBinding, WalkContext oldContext, ArrayList inits) { // pass in memberEntities to the context, later visit(New) etc. may add classes final Map memberEntities = new LinkedHashMap<>(); final MethodContext context = new MethodContext(oldContext, memberEntities); // LEFTOUT: in polyglot there is a // class context in between method and // root CAstNode mdast; if (n.isConstructor()) mdast = createConstructorBody(n, classBinding, context, inits); else if ((n.getModifiers() & Modifier.ABSTRACT) != 0) // abstract mdast = null; else if (n.getBody() == null || n.getBody().statements().size() == 0) // empty mdast = makeNode(context, fFactory, n, CAstNode.RETURN); else mdast = visitNode(n.getBody(), context); // Polyglot comment: Presumably the MethodContext's parent is a ClassContext, // and he has the list of initializers. Hopefully the following // will glue that stuff in the right place in any constructor body. Set annotations = null; if (n.resolveBinding() != null) { annotations = handleAnnotations(n.resolveBinding()); } return new ProcedureEntity(mdast, n, classBinding, memberEntities, context, annotations); } private Set handleAnnotations(IBinding binding) { IAnnotationBinding[] annotations = binding.getAnnotations(); if(annotations == null || annotations.length == 0) { return null; } Set castAnnotations = HashSetFactory.make(); for(IAnnotationBinding annotation : annotations) { ITypeBinding annotationTypeBinding = annotation.getAnnotationType(); final CAstType annotationType = fTypeDict.getCAstTypeFor(annotationTypeBinding); final Map args = HashMapFactory.make(); for(IMemberValuePairBinding mvpb : annotation.getAllMemberValuePairs()) { String name = mvpb.getName(); Object value = mvpb.getValue(); args.put(name, value); } castAnnotations.add(new CAstAnnotation() { @Override public CAstType getType() { return annotationType; } @Override public Map getArguments() { return args; } @Override public String toString() { return annotationType.getName() + args; } }); } return castAnnotations; } protected final class ProcedureEntity implements JavaProcedureEntity { // TAGALONG (make static, access ast) // From Code Body Entity private final Map> fEntities; @Override public Map> getAllScopedEntities() { return Collections.unmodifiableMap(fEntities); } @Override public Iterator getScopedEntities(CAstNode construct) { if (fEntities.containsKey(construct)) { return (fEntities.get(construct)).iterator(); } else { return EmptyIterator.instance(); } } @Override public String getSignature() { return Util.methodEntityToSelector(this).toString(); } private final CAstNode fAst; MethodDeclaration fDecl; // TAGALONG serious tagalong... private String[] fParameterNames; // INCLUDING this private ArrayList fParameterTypes; private MethodContext fContext; // possibly TAGALONG, maybe not private ITypeBinding fType; // TAGALONG protected ITypeBinding fReturnType; private int fModifiers; private final Set annotations; // can be method, constructor, "fake" default constructor, or null decl = static initializer /** * For a static initializer, pass a null decl. */ // FIXME: get rid of decl and pass in everything instead of having to do two different things with parameters // regular case private ProcedureEntity(CAstNode mdast, MethodDeclaration decl, ITypeBinding type, Map entities, MethodContext context, Set annotations) { this(mdast, decl, type, entities, context, null, null, decl.getModifiers(), annotations); } // static init private ProcedureEntity(CAstNode mdast, ITypeBinding type, Map entities, MethodContext context, Set annotations) { this(mdast, null, type, entities, context, null, null, 0, annotations); } private ProcedureEntity(CAstNode mdast, MethodDeclaration decl, ITypeBinding type, Map entities, MethodContext context, ArrayList parameterTypes, ITypeBinding returnType, Set annotations) { this(mdast, decl, type, entities, context, parameterTypes, returnType, decl.getModifiers(), annotations); } private ProcedureEntity(CAstNode mdast, MethodDeclaration decl, ITypeBinding type, Map entities, MethodContext context, ArrayList parameterTypes, ITypeBinding returnType, int modifiers, Set annotations) { // TypeSystem system, CodeInstance pd, String[] argumentNames, // } // Map entities, MethodContext mc) { fDecl = decl; fAst = mdast; // "procedure decl ast" fContext = context; fType = type; fReturnType = returnType; fModifiers = modifiers; this.annotations = annotations; // from CodeBodyEntity fEntities = new LinkedHashMap<>(); for (Map.Entry entry : entities.entrySet()) { fEntities.put(entry.getKey(), Collections.singleton(entry.getValue())); } if (fDecl != null) { int i = 0; // index to start filling up with real params if ((fModifiers & Modifier.STATIC) != 0) { fParameterNames = new String[fDecl.parameters().size()]; i = 0; } else { fParameterNames = new String[fDecl.parameters().size() + 1]; fParameterNames[0] = "this"; i = 1; } if (parameterTypes == null) { fParameterTypes = new ArrayList<>(fDecl.parameters().size()); for (SingleVariableDeclaration p : (Iterable) fDecl.parameters()) { fParameterNames[i++] = p.getName().getIdentifier(); fParameterTypes.add(fTypeDict.getCAstTypeFor(p.resolveBinding().getType())); } } else { // currently this is only used in making a default constructor with arguments (anonymous classes). // this is because we cannot synthesize bindings. fParameterTypes = parameterTypes; for (SingleVariableDeclaration p : (Iterable) fDecl.parameters()) { fParameterNames[i++] = p.getName().getIdentifier(); } } } else { fParameterNames = new String[0]; fParameterTypes = new ArrayList<>(0); // static initializer } } @Override public Collection getAnnotations() { return annotations; } @Override public String toString() { return fDecl == null ? "" : fDecl.toString(); } @Override public int getKind() { return CAstEntity.FUNCTION_ENTITY; } @Override public String getName() { if (fDecl == null) return MethodReference.clinitName.toString(); else if (fDecl.isConstructor()) return MethodReference.initAtom.toString(); else return fDecl.getName().getIdentifier(); } /** * INCLUDING first parameter 'this' (for non-static methods) */ @Override public String[] getArgumentNames() { return fParameterNames; } @Override public CAstNode[] getArgumentDefaults() { return new CAstNode[0]; } /** * INCLUDING first parameter 'this' (for non-static methods) */ @Override public int getArgumentCount() { return fParameterNames.length; } @Override public CAstNode getAST() { return fAst; } @Override public CAstControlFlowMap getControlFlow() { return fContext.cfg(); } @Override public CAstSourcePositionMap getSourceMap() { return fContext.pos(); } @Override public CAstSourcePositionMap.Position getPosition() { return fDecl==null? getSourceMap().getPosition(fAst): makePosition(fDecl); } @Override public CAstNodeTypeMap getNodeTypeMap() { return fContext.getNodeTypeMap(); } @Override public Collection getQualifiers() { if (fDecl == null) return JDT2CAstUtils.mapModifiersToQualifiers(Modifier.STATIC, false, false); // static init else return JDT2CAstUtils.mapModifiersToQualifiers(fModifiers, false, false); } @Override public CAstType getType() { return new CAstType.Method() { private Collection fExceptionTypes = null; @Override public boolean isStatic() { return getQualifiers().contains(CAstQualifier.STATIC); } @Override public CAstType getReturnType() { if (fReturnType != null) return fTypeDict.getCAstTypeFor(fReturnType); @SuppressWarnings("deprecation") Type type = fDecl == null ? null : (ast.apiLevel() == 2 ? fDecl.getReturnType() : fDecl.getReturnType2()); if (type == null) return fTypeDict.getCAstTypeFor(ast.resolveWellKnownType("void")); else return fTypeDict.getCAstTypeFor(type.resolveBinding()); } /** * NOT INCLUDING first parameter 'this' (for non-static methods) */ @Override public List getArgumentTypes() { return fParameterTypes; } /** * NOT INCLUDING first parameter 'this' (for non-static methods) */ @Override public int getArgumentCount() { return fDecl == null ? 0 : fParameterTypes.size(); } @Override public String getName() { Assertions.UNREACHABLE("CAstType.FunctionImpl#getName() called???"); return "?"; } @Override public Collection getSupertypes() { Assertions.UNREACHABLE("CAstType.FunctionImpl#getSupertypes() called???"); return null; } @Override public Collection/* */getExceptionTypes() { if (fExceptionTypes == null) { fExceptionTypes = new LinkedHashSet<>(); if (fDecl != null) for (SimpleType exception : (Iterable) fDecl.thrownExceptionTypes()) fExceptionTypes.add(fTypeDict.getCAstTypeFor(exception.resolveBinding())); } return fExceptionTypes; } @Override public CAstType getDeclaringType() { return fTypeDict.getCAstTypeFor(fType); } }; } @Override public Position getPosition(int arg) { // TODO Auto-generated method stub SingleVariableDeclaration p = (SingleVariableDeclaration) fDecl.parameters().get(arg); return makePosition(p); } @Override public Position getNamePosition() { if (fDecl == null) { return null; } else { return makePosition(fDecl); } } } // //////////////////////////////////// // FIELDS //////////////////////////// // //////////////////////////////////// // FIELDS ADDED DIRECTLY IN visit(TypeDeclaration,WalkContext) private CAstNode visitFieldInitNode(ASTNode node, WalkContext context) { // there are gathered by createClassDeclaration and can only be of two types: if (node instanceof Initializer) { return visitNode(((Initializer) node).getBody(), context); } else if (node instanceof VariableDeclarationFragment) { VariableDeclarationFragment f = (VariableDeclarationFragment) node; // this is guaranteed to have an initializer // Generate CAST node for the initializer (init()) // Type targetType = f.memberInstance().container(); // Type fieldType = f.type().type(); FieldReference fieldRef = fIdentityMapper.getFieldRef(f.resolveBinding()); // We use null to indicate an OBJECT_REF to a static field, as the // FieldReference doesn't // hold enough info to determine this. In this case, (unlike field ref) // we don't have a // target expr to evaluate. boolean isStatic = ((f.resolveBinding().getModifiers() & Modifier.STATIC) != 0); CAstNode thisNode = isStatic ? makeNode(context, fFactory, null, CAstNode.VOID) : makeNode(context, fFactory, f, CAstNode.THIS); CAstNode lhsNode = makeNode(context, fFactory, f, CAstNode.OBJECT_REF, thisNode, fFactory.makeConstant(fieldRef)); Expression init = f.getInitializer(); CAstNode rhsNode = visitNode(init, context); CAstNode assNode = makeNode(context, fFactory, f, CAstNode.ASSIGN, lhsNode, rhsNode); return assNode; // their naming, not mine } else if (node instanceof EnumConstantDeclaration) { return createEnumConstantDeclarationInit((EnumConstantDeclaration) node, context); } else { Assertions.UNREACHABLE("invalid init node gathered by createClassDeclaration"); return null; } } protected final class FieldEntity implements CAstEntity { private final ITypeBinding type; private final String name; private final Collection quals; private final T position; private final T namePos; private final Set annotations; private FieldEntity(String name, ITypeBinding type, Collection quals, T position, Set annotations, T namePos) { super(); this.type = type; this.quals = quals; this.name = name; this.namePos = namePos; this.position = position; this.annotations = annotations; } @Override public Collection getAnnotations() { return annotations; } @Override public int getKind() { return CAstEntity.FIELD_ENTITY; } @Override public String getName() { return name; } @Override public String getSignature() { return name + fIdentityMapper.typeToTypeID(type); } @Override public String[] getArgumentNames() { return new String[0]; } @Override public CAstNode[] getArgumentDefaults() { return new CAstNode[0]; } @Override public int getArgumentCount() { return 0; } @Override public Iterator getScopedEntities(CAstNode construct) { return EmptyIterator.instance(); } @Override public Map> getAllScopedEntities() { return Collections.emptyMap(); } @Override public CAstNode getAST() { // No AST for a field decl; initializers folded into // constructor processing... return null; } @Override public CAstControlFlowMap getControlFlow() { // No AST for a field decl; initializers folded into // constructor processing... return null; } @Override public CAstSourcePositionMap getSourceMap() { // No AST for a field decl; initializers folded into // constructor processing... return null; } @Override public CAstSourcePositionMap.Position getPosition() { return position; } @Override public CAstNodeTypeMap getNodeTypeMap() { // No AST for a field decl; initializers folded into // constructor processing... return null; } @Override public Collection getQualifiers() { return quals; } @Override public CAstType getType() { return fTypeDict.getCAstTypeFor(type); } @Override public Position getPosition(int arg) { return namePos; } @Override public Position getNamePosition() { // TODO Auto-generated method stub return null; } } // ///////////////////////////////////// // / NODES ///////////////////////////// // ///////////////////////////////////// /** * Visit all the statements in the block and return an arraylist of the statements. Some statements * (VariableDeclarationStatements) may expand to more than one CAstNode. */ private ArrayList createBlock(Block n, WalkContext context) { ArrayList stmtNodes = new ArrayList<>(); for (ASTNode s : (Iterable) n.statements()) visitNodeOrNodes(s, context, stmtNodes); return stmtNodes; } private CAstNode visit(Block n, WalkContext context) { ArrayList stmtNodes = createBlock(n, context); CAstNode stmtNodesArray[] = stmtNodes.toArray(new CAstNode[0]); return makeNode(context, fFactory, n, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, stmtNodesArray)); } private CAstNode visit(VariableDeclarationFragment n, WalkContext context) { int modifiers; if (n.getParent() instanceof VariableDeclarationStatement) modifiers = ((VariableDeclarationStatement) n.getParent()).getModifiers(); else if (n.getParent() instanceof VariableDeclarationExpression) modifiers = ((VariableDeclarationExpression) n.getParent()).getModifiers(); else modifiers = ((FieldDeclaration) n.getParent()).getModifiers(); boolean isFinal = (modifiers & Modifier.FINAL) != 0; assert n.resolveBinding() != null : n; ITypeBinding type = n.resolveBinding().getType(); Expression init = n.getInitializer(); CAstNode initNode; String t = type.getBinaryName(); if (init == null) { if (JDT2CAstUtils.isLongOrLess(type)) // doesn't include boolean initNode = fFactory.makeConstant(0); else if (t.equals("D") || t.equals("F")) initNode = fFactory.makeConstant(0.0); else initNode = fFactory.makeConstant(null); } else initNode = visitNode(init, context); Object defaultValue = JDT2CAstUtils.defaultValueForType(type); return makeNode(context, fFactory, n, CAstNode.DECL_STMT, fFactory.makeConstant(new CAstSymbolImpl(n.getName().getIdentifier(), fTypeDict.getCAstTypeFor(type), isFinal, defaultValue)), initNode); } /* * One VariableDeclarationStatement represents more than one CAstNode statement. */ private ArrayList visit(VariableDeclarationStatement n, WalkContext context) { ArrayList result = new ArrayList<>(); for (VariableDeclarationFragment o : (Iterable) n.fragments()) result.add(visit(o, context)); return result; } private CAstNode visit(ArrayInitializer n, WalkContext context) { ITypeBinding type = n.resolveTypeBinding(); assert type != null : "Could not determine type of ArrayInitializer"; TypeReference newTypeRef = fIdentityMapper.getTypeRef(type); CAstNode[] eltNodes = new CAstNode[n.expressions().size() + 1]; int idx = 0; eltNodes[idx++] = makeNode(context, fFactory, n, CAstNode.NEW, fFactory.makeConstant(newTypeRef), fFactory.makeConstant(n .expressions().size())); for (Expression element : (Iterable) n.expressions()) { eltNodes[idx] = visitNode(element, context); if (eltNodes[idx] == null) assert eltNodes[idx] != null : element.toString(); ++idx; } return makeNode(context, fFactory, n, CAstNode.ARRAY_LITERAL, eltNodes); } private CAstNode visit(ClassInstanceCreation n, WalkContext context) { return createClassInstanceCreation(n, n.arguments(), n.resolveConstructorBinding(), n.getExpression(), n .getAnonymousClassDeclaration(), context); } private CAstNode createClassInstanceCreation(ASTNode nn, List arguments, IMethodBinding ctorBinding, Expression qual, AnonymousClassDeclaration anonDecl, WalkContext context) { // a new instruction is actually two things: a NEW object and a CALL to a constructor CAstNode newNode; CAstNode callNode; final String tmpName = "ctor temp"; // this name is an illegal Java identifier. this var will hold the new object so we can call the constructor on it // GENERICS getMethodDeclaration() ctorBinding = ctorBinding.getMethodDeclaration(); // unlike polyglot, this will // point to a default // constructor in the anon class MethodReference ctorRef = fIdentityMapper.getMethodRef(ctorBinding); // ////////////// PART I: make the NEW expression /////////////////////////////////////////////////////// ITypeBinding newType = ctorBinding.getDeclaringClass(); TypeReference newTypeRef = fIdentityMapper.getTypeRef(newType); // new nodes with an explicit enclosing argument, e.g. "outer.new Inner()". They are mostly treated the same, except // in JavaCAst2IRTranslator.doNewObject CAstNode qualNode = null; if (qual == null && newType.getDeclaringClass() != null && ((newType.getModifiers() & Modifier.STATIC) == 0) && !newType.isLocal()) { // "new X()" expanded into "new this.X()" or "new MyClass.this.X" // check isLocal because anonymous classes and local classes are not included. ITypeBinding plainThisType = JDT2CAstUtils.getDeclaringClassOfNode(nn); // type of "this" ITypeBinding implicitThisType = findClosestEnclosingClassSubclassOf(plainThisType, newType.getDeclaringClass(), ((newType .getModifiers() & Modifier.PRIVATE) != 0)); if (implicitThisType.isEqualTo(plainThisType)) qualNode = makeNode(context, fFactory, nn, CAstNode.THIS); // "new this.X()" else qualNode = makeNode(context, fFactory, nn, CAstNode.THIS, fFactory.makeConstant(fIdentityMapper .getTypeRef(implicitThisType))); // "new Bla.this.X()" } else if (qual != null) qualNode = visitNode(qual, context); if (qualNode != null) newNode = makeNode(context, fFactory, nn, CAstNode.NEW_ENCLOSING, fFactory.makeConstant(newTypeRef), qualNode); else newNode = makeNode(context, fFactory, nn, CAstNode.NEW, fFactory.makeConstant(newTypeRef)); ITypeBinding[] newExceptions = new ITypeBinding[] { NoClassDefFoundError, ExceptionInInitializerError, OutOfMemoryError }; context.cfg().map(newNode, newNode); for (ITypeBinding exp : newExceptions) { for (Pair catchTarget : context.getCatchTargets(exp)) { context.cfg().add(newNode, catchTarget.snd, catchTarget.fst); } } // ANONYMOUS CLASSES // ctor already points to right place, so should type ref, so all we have to do is make the entity if (anonDecl != null) context.addScopedEntity(newNode, visit(anonDecl, context)); // ////////////// PART II: make the CALL expression /////////////////////////////////////////////////////// // setup args & handle exceptions CAstNode[] argNodes = new CAstNode[arguments.size() + 2]; int idx = 0; // args: [ this, callsiteref, ] // arg 0: this argNodes[idx++] = makeNode(context, fFactory, nn, CAstNode.VAR, fFactory.makeConstant(tmpName), fFactory.makeConstant(fTypeDict.getCAstTypeFor(newType))); // contains output from newNode (see part III) // arg 1: call site ref (WHY?) int dummyPC = 0; // Just want to wrap the kind of call; the "rear end" won't care about anything else CallSiteReference callSiteRef = CallSiteReference.make(dummyPC, ctorRef, IInvokeInstruction.Dispatch.SPECIAL); argNodes[idx++] = fFactory.makeConstant(callSiteRef); // rest of args for (Object arg : arguments) { argNodes[idx++] = (arg instanceof CAstNode) ? ((CAstNode) arg) : visitNode((Expression) arg, context); } callNode = makeNode(context, fFactory, nn, CAstNode.CALL, argNodes); context.cfg().map(nn, callNode); handleThrowsFromCall(ctorBinding, nn, context); // PART III: make a node with both NEW and CALL // Make a LOCAL_SCOPE with a BLOCK_EXPR node child which does three things: // 1) declare a temporary variable and assign the new object to it (LOCAL_SCOPE is needed to chain this new variable // to this block) // 2) CALL the constructor on the new variable // 3) access this temporary variable. Since the value of the block is the last thing in the block, the resultant // value will be the variable return makeNode(context, fFactory, nn, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, nn, CAstNode.BLOCK_EXPR, makeNode( context, fFactory, nn, CAstNode.DECL_STMT, fFactory.makeConstant(new InternalCAstSymbol(tmpName, fTypeDict.getCAstTypeFor(newType), true)), newNode), callNode, makeNode(context, fFactory, nn, CAstNode.VAR, fFactory.makeConstant(tmpName)))); } /** * @param mappedAstNode An AST node or object mapped in the CFG: we will call context.cfg().add() on it. Caller must worry about * mapping it with context.cfg().map(). */ private void handleThrowsFromCall(IMethodBinding met, Object mappedAstNode, WalkContext context) { ITypeBinding[] throwTypes = met.getExceptionTypes(); for (ITypeBinding thrownType : throwTypes) { Collection> catchTargets = context.getCatchTargets(thrownType); for (Pair catchTarget : catchTargets) context.cfg().add(mappedAstNode, catchTarget.snd, catchTarget.fst); } // can also throw runtime exception for (Pair catchTarget : context.getCatchTargets(fRuntimeExcType)) context.cfg().add(mappedAstNode, catchTarget.snd, catchTarget.fst); } private CAstNode visit(ExpressionStatement n, WalkContext context) { return visitNode(n.getExpression(), context); } private CAstNode visit(SuperMethodInvocation n, WalkContext context) { CAstNode target; if (n.getQualifier() == null) target = makeNode(context, fFactory, n, CAstNode.SUPER); else { TypeReference owningTypeRef = fIdentityMapper.getTypeRef(n.getQualifier().resolveTypeBinding()); target = makeNode(context, fFactory, n, CAstNode.SUPER, fFactory.makeConstant(owningTypeRef)); } // GENERICS getMethodDeclaration() return createMethodInvocation(n, n.resolveMethodBinding().getMethodDeclaration(), target, n.arguments(), context); } // FIXME: implicit this private CAstNode visit(MethodInvocation n, WalkContext context) { // GENERICS getMethodDeclaration() IMethodBinding binding = n.resolveMethodBinding().getMethodDeclaration(); if ((binding.getModifiers() & Modifier.STATIC) != 0) { CAstNode target; // JLS says: evaluate qualifier & throw away unless of course it's just a class name (or null), // in which case we replace the EMPTY with a VOID // of course, "this" has no side effects either. target = visitNode(n.getExpression(), context); if (target.getKind() == CAstNode.EMPTY || target.getKind() == CAstNode.THIS) return createMethodInvocation(n, binding, makeNode(context, fFactory, null, CAstNode.VOID), n.arguments(), context); else return makeNode(context, fFactory, n, CAstNode.BLOCK_EXPR, target, createMethodInvocation(n, binding, makeNode(context, fFactory, null, CAstNode.VOID), n.arguments(), context)); // target is evaluated but thrown away, and only result of method invocation is kept } else { CAstNode target; if (n.getExpression() != null) { target = visitNode(n.getExpression(), context); } else { ITypeBinding typeOfThis = JDT2CAstUtils.getDeclaringClassOfNode(n); boolean methodIsPrivate = (binding.getModifiers() & Modifier.PRIVATE) != 0; // how could it be in the subtype and private? this only happens the supertype is also an // enclosing type. in that case the variable refers to the field in the enclosing instance. // NOTE: method may be defined in MyClass's superclass, but we still want to expand // this into MyClass, so we have to find the enclosing class which defines this function. ITypeBinding implicitThisClass = findClosestEnclosingClassSubclassOf(typeOfThis, binding.getDeclaringClass(), methodIsPrivate); if (typeOfThis.isEqualTo(implicitThisClass)) // "foo = 5" -> "this.foo = 5": expand into THIS + class target = makeNode(context, fFactory, n, CAstNode.THIS); else // "foo = 5" -> "MyClass.this.foo = 5" -- inner class: expand into THIS + class target = makeNode(context, fFactory, n, CAstNode.THIS, fFactory.makeConstant(fIdentityMapper .getTypeRef(implicitThisClass))); // NOTE: method may be defined in MyClass's superclass, but we still want to expand // this into MyClass, so we have to find the enclosing class which defines this function. } CAstNode node = createMethodInvocation(n, binding, target, n.arguments(), context); // TODO: maybe not exactly right... what if it's a capture? we may have to cast it down a little bit. if (binding.getReturnType().isTypeVariable()) { // GENERICS: add a cast ITypeBinding realtype = JDT2CAstUtils.getErasedType(n.resolveMethodBinding().getReturnType(), ast); ITypeBinding fromtype = JDT2CAstUtils.getTypesVariablesBase(binding.getReturnType(), ast); if (!realtype.isEqualTo(fromtype)) return createCast(n, node, fromtype, realtype, context); } return node; } } private CAstNode createMethodInvocation(ASTNode pos, IMethodBinding methodBinding, CAstNode target, List arguments, WalkContext context) { // MethodMethodInstance methodInstance = n.methodInstance(); boolean isStatic = (methodBinding.getModifiers() & Modifier.STATIC) != 0; ITypeBinding methodOwner = methodBinding.getDeclaringClass(); if (!(methodOwner.isInterface() || methodOwner.isClass() || methodOwner.isEnum())) { assert false : "owner " + methodOwner + " of " + methodBinding + " is not a class"; } // POPULATE PARAMETERS // this (or void for static), method reference, rest of args int nFormals = methodBinding.getParameterTypes().length; CAstNode[] children = new CAstNode[2 + nFormals]; // this (or void for static) assert target != null : "no receiver for " + methodBinding; children[0] = target; // method reference // unlike polyglot, expression will never be super here. this is handled in SuperMethodInvocation. IInvokeInstruction.IDispatch dispatchType; if (isStatic) dispatchType = IInvokeInstruction.Dispatch.STATIC; else if (methodOwner.isInterface()) dispatchType = IInvokeInstruction.Dispatch.INTERFACE; else if ((methodBinding.getModifiers() & Modifier.PRIVATE) != 0 || target.getKind() == CAstNode.SUPER) // only one possibility, not a virtual call (I guess?) dispatchType = IInvokeInstruction.Dispatch.SPECIAL; else dispatchType = IInvokeInstruction.Dispatch.VIRTUAL; // pass 0 for dummyPC: Just want to wrap the kind of call; the "rear end" won't care about anything else... CallSiteReference callSiteRef = CallSiteReference.make(0, fIdentityMapper.getMethodRef(methodBinding), dispatchType); children[1] = fFactory.makeConstant(callSiteRef); populateArguments(children, methodBinding, arguments, context); Object fakeCfgMap = new Object(); handleThrowsFromCall(methodBinding, fakeCfgMap, context); CAstNode result = makeNode(context, fFactory, pos, CAstNode.CALL, children); context.cfg().map(fakeCfgMap, result); return result; } /** * Populate children, starting at index 2, for the invocation of methodBinding. If varargs are used this function will collapse * the proper arguments into an array. * * If the number of actuals equals the number of formals and the function is varargs, we have to check the type of the last * argument to see if we should "box" it in an array. If the arguments[arguments.length-1] is not an Expression, we cannot get the * type, so we do not box it. (Making covariant varargs functions require this behavior) */ private void populateArguments(CAstNode[] children, IMethodBinding methodBinding, List arguments, WalkContext context) { int nFormals = methodBinding.getParameterTypes().length; assert children.length == nFormals + 2; int nActuals = arguments.size(); ITypeBinding lastArgType = null; if (nActuals > 0 && arguments.get(nActuals - 1) instanceof Expression) lastArgType = ((Expression) arguments.get(nActuals - 1)).resolveTypeBinding(); // if the # of actuals equals the # of formals, AND the function is varargs, we have to check // to see if the lastArgType is subtype compatible with the type of last parameter (which will be an array). // If it is, we pass this array in directly. Otherwise this it is wrapped in an array init. // Example: 'void foo(int... x)' can be run via 'foo(5)' or 'foo(new int[] { 5, 6 })' -- both have one argument so we must check // the type if (nActuals == nFormals && (!methodBinding.isVarargs() || lastArgType == null || lastArgType .isSubTypeCompatible(methodBinding.getParameterTypes()[nFormals - 1]))) { int i = 2; for (Object arg : arguments) children[i++] = (arg instanceof CAstNode) ? ((CAstNode) arg) : visitNode((Expression) arg, context); } else { assert nActuals >= (nFormals - 1) && methodBinding.isVarargs() : "Invalid number of parameters for constructor call"; for (int i = 0; i < nFormals - 1; i++) { Object arg = arguments.get(i); children[i + 2] = (arg instanceof CAstNode) ? ((CAstNode) arg) : visitNode((Expression) arg, context); } CAstNode subargs[] = new CAstNode[nActuals - nFormals + 2]; // nodes for args and one extra for NEW expression TypeReference newTypeRef = fIdentityMapper.getTypeRef(methodBinding.getParameterTypes()[nFormals - 1]); subargs[0] = makeNode(context, fFactory, null, CAstNode.NEW, fFactory.makeConstant(newTypeRef), fFactory .makeConstant(subargs.length - 1)); for (int j = 1; j < subargs.length; j++) { Object arg = arguments.get(j + nFormals - 2); subargs[j] = (arg instanceof CAstNode) ? ((CAstNode) arg) : visitNode((Expression) arg, context); } children[nFormals + 1] = makeNode(context, fFactory, (ASTNode) null, CAstNode.ARRAY_LITERAL, subargs); } } private CAstNode visit(ReturnStatement r, WalkContext context) { Expression retExpr = r.getExpression(); if (retExpr == null) return makeNode(context, fFactory, r, CAstNode.RETURN); else return makeNode(context, fFactory, r, CAstNode.RETURN, visitNode(retExpr, context)); } private CAstNode visit(Assignment n, WalkContext context) { if (n.getOperator() == Assignment.Operator.ASSIGN) return makeNode(context, fFactory, n, CAstNode.ASSIGN, visitNode(n.getLeftHandSide(), new AssignmentContext(context)), visitNode(n.getRightHandSide(), context)); else { CAstNode left = visitNode(n.getLeftHandSide(), context); // GENERICs lvalue for pre op hack if (left.getKind() == CAstNode.CAST) { return doFunkyGenericAssignPreOpHack(n, context); } // +=, %=, &=, etc. CAstNode result = makeNode(context, fFactory, n, CAstNode.ASSIGN_PRE_OP, left, visitNode(n.getRightHandSide(), context), JDT2CAstUtils.mapAssignOperator(n.getOperator())); // integer division by zero if (JDT2CAstUtils.isLongOrLess(n.resolveTypeBinding()) && (n.getOperator() == Assignment.Operator.DIVIDE_ASSIGN || n.getOperator() == Assignment.Operator.REMAINDER_ASSIGN)) { Collection> excTargets = context.getCatchTargets(fDivByZeroExcType); if (!excTargets.isEmpty()) { for (Pair catchPair : excTargets) context.cfg().add(result, catchPair.snd, fDivByZeroExcType); } else { context.cfg().add(result, CAstControlFlowMap.EXCEPTION_TO_EXIT, fDivByZeroExcType); } } return result; } } /** * Consider the case: * *
   * String real_oneheyya = (((returnObjectWithSideEffects().y))+="hey")+"ya"
   * 
* * where field 'y' is parameterized to type string. then += is not defined for type 'object'. This function is a hack that expands * the code into an assignment and binary operation. */ private CAstNode doFunkyGenericAssignPreOpHack(Assignment assign, WalkContext context) { Expression left = assign.getLeftHandSide(); Expression right = assign.getRightHandSide(); // consider the case: // String real_oneheyya = (((returnObjectWithSideEffects().y))+="hey")+"ya"; // this is going to be a MAJOR pain... // where field 'y' is parameterized to type string. then += is not defined for type 'object'. we want to transform // it kind of like this, except we have to define temp. // String real_oneheyya = (String)((temp=cg2WithSideEffects()).y = (String)temp.y + "hey")+"ya"; // ---------------------------------------------------------------- // // we are responsible for underlined portion // CAST(LOCAL SCOPE(BLOCK EXPR(DECL STMT(temp, // left.target),ASSIGN(OBJECT_REF(temp,y),BINARY_EXPR(CAST(OBJECT_REF(Temp,y)),RIGHT))))) // yeah, I know, it's cheating, LOCAL SCOPE / DECL STMT inside an expression ... will it work? while (left instanceof ParenthesizedExpression) left = ((ParenthesizedExpression) left).getExpression(); assert left instanceof FieldAccess : "Cast in assign pre-op but no field access?!"; FieldAccess field = (FieldAccess) left; InfixExpression.Operator infixop = JDT2CAstUtils.mapAssignOperatorToInfixOperator(assign.getOperator()); // DECL_STMT: temp = ...; final String tmpName = "temp generic preop hack"; // illegal Java identifier CAstNode exprNode = visitNode(field.getExpression(), context); CAstNode tmpDeclNode = makeNode(context, fFactory, left, CAstNode.DECL_STMT, fFactory.makeConstant(new InternalCAstSymbol( tmpName, fTypeDict.getCAstTypeFor(field.getExpression().resolveTypeBinding()), true)), exprNode); // need two object refndoes "temp.y" CAstNode obref1 = createFieldAccess(makeNode(context, fFactory, left, CAstNode.VAR, fFactory.makeConstant(tmpName), fFactory.makeConstant(fTypeDict.getCAstTypeFor(field.resolveFieldBinding().getType()))), field .getName().getIdentifier(), field.resolveFieldBinding(), left, new AssignmentContext(context)); CAstNode obref2 = createFieldAccess(makeNode(context, fFactory, left, CAstNode.VAR, fFactory.makeConstant(tmpName), fFactory.makeConstant(fTypeDict.getCAstTypeFor(field.resolveFieldBinding().getType()))), field .getName().getIdentifier(), field.resolveFieldBinding(), left, context); ITypeBinding realtype = JDT2CAstUtils.getErasedType(field.resolveFieldBinding().getType(), ast); ITypeBinding fromtype = JDT2CAstUtils .getTypesVariablesBase(field.resolveFieldBinding().getVariableDeclaration().getType(), ast); CAstNode castedObref = obref2;// createCast(left, obref2, fromtype, realtype, context); // put it all together // CAST(LOCAL SCOPE(BLOCK EXPR(DECL STMT(temp, // left.target),ASSIGN(OBJECT_REF(temp,y),BINARY_EXPR(CAST(OBJECT_REF(Temp,y)),RIGHT))))) CAstNode result = makeNode(context, fFactory, assign, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, assign, CAstNode.BLOCK_EXPR, tmpDeclNode, makeNode(context, fFactory, assign, CAstNode.ASSIGN, obref1, createInfixExpression( infixop, realtype, left.getStartPosition(), left.getLength(), castedObref, right, context)))); return createCast(assign, result, fromtype, realtype, context); } private CAstNode visit(ParenthesizedExpression n, WalkContext context) { return visitNode(n.getExpression(), context); } private CAstNode visit(BooleanLiteral n) { return fFactory.makeConstant(n.booleanValue()); } private CAstNode visit(CharacterLiteral n) { return fFactory.makeConstant(n.charValue()); } private CAstNode visit() { return fFactory.makeConstant(null); } private CAstNode visit(StringLiteral n) { return fFactory.makeConstant(n.getLiteralValue()); } private CAstNode visit(TypeLiteral n, WalkContext context) { String typeName = fIdentityMapper.typeToTypeID(n.resolveTypeBinding()); return makeNode(context, fFactory, n, CAstNode.TYPE_LITERAL_EXPR, fFactory.makeConstant(typeName)); } private CAstNode visit(NumberLiteral n) { return fFactory.makeConstant(n.resolveConstantExpressionValue()); } /** * SimpleName can be a field access, local, or class name (do nothing case) */ private CAstNode visit(SimpleName n, WalkContext context) { // class name, handled above in either method invocation, qualified name, or qualified this if (n.resolveBinding() instanceof ITypeBinding) return makeNode(context, fFactory, null, CAstNode.EMPTY); assert n.resolveBinding() instanceof IVariableBinding : "SimpleName's binding, " + n.resolveBinding() + ", is not a variable or a type binding!"; IVariableBinding binding = (IVariableBinding) n.resolveBinding(); binding = binding.getVariableDeclaration(); // ignore weird generic stuff // TODO: enum constants if (binding.isField()) { // enum constants ... // implicit field access -- implicit this or class CAstNode targetNode; if ((binding.getModifiers() & Modifier.STATIC) != 0) { // "foo = 5" -> "MyClass.foo = 5" or "SomeEnclosingClass.foo" = 5 targetNode = makeNode(context, fFactory, null, CAstNode.EMPTY); // we will get type from binding. no side // effects in evaluating a class name, so NOP // here. } else { ITypeBinding typeOfThis = JDT2CAstUtils.getDeclaringClassOfNode(n); boolean fieldIsPrivate = (binding.getModifiers() & Modifier.PRIVATE) != 0; // how could it be in the subtype and private? this only happens the supertype is also an // enclosing type. in that case the variable refers to the field in the enclosing instance. // NOTE: method may be defined in MyClass's superclass, but we still want to expand // this into MyClass, so we have to find the enclosing class which defines this function. ITypeBinding implicitThisClass = findClosestEnclosingClassSubclassOf(typeOfThis, binding.getDeclaringClass(), fieldIsPrivate); if (typeOfThis.isEqualTo(implicitThisClass)) // "foo = 5" -> "this.foo = 5": expand into THIS + class targetNode = makeNode(context, fFactory, n, CAstNode.THIS); else // "foo = 5" -> "MyClass.this.foo = 5" -- inner class: expand into THIS + class targetNode = makeNode(context, fFactory, n, CAstNode.THIS, fFactory.makeConstant(fIdentityMapper .getTypeRef(implicitThisClass))); // NOTE: method may be defined in MyClass's superclass, but we still want to expand // this into MyClass, so we have to find the enclosing class which defines this function. // fFactory.makeConstant(owningTypeRef)); } return createFieldAccess(targetNode, n.getIdentifier(), binding, n, context); } else { // local CAstType t = fTypeDict.getCAstTypeFor(((IVariableBinding)n.resolveBinding()).getType()); return makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(n.getIdentifier()), fFactory.makeConstant(t)); } } /** * Sees if a field defined in owningTypeRef is contained & accessible to a type of typeOfThis. That is, if owningTypeRef == * typeOfThis or typeOfThis is a subtype and isPrivate is false. If this is not that case, looks in the enclosing class of * typeOfThis and tries again, and its enclosing class, ... * * Essentially if we have a field/method referenced only by name and we know its type (owningTypeRef), this function will return * owningTypeRef or the subtype that the field is accessed thru, for expanding "f = 5" into "TheClass.this.f = 5". */ private static ITypeBinding findClosestEnclosingClassSubclassOf(ITypeBinding typeOfThis, ITypeBinding owningType, boolean isPrivate) { // GENERICS // if (owningType.isParameterizedType()) // owningType = owningType.getTypeDeclaration(); // if (typeOfThis.isParameterizedType()) // typeOfThis = typeOfThis.getTypeDeclaration(); // // typeOfThis.getTypeDeclaration() owningType = owningType.getErasure(); ITypeBinding current = typeOfThis; while (current != null) { current = current.getErasure(); // Walk the hierarchy rather than using isSubTypeCompatible to handle // generics -- we need to perform erasure of super types boolean isInSubtype = false;//current.isSubTypeCompatible(owningType); ITypeBinding supertp = current; while (supertp != null){ supertp = supertp.getErasure(); // Use isSubTypeCompatible even though we are manually walking type hierarchy -- // that way interfaces are handled without us having to do it manually. if (supertp.isSubTypeCompatible(owningType)){ isInSubtype = true; break; } supertp = supertp.getSuperclass(); } // how could it be in the subtype and private? this only happens the supertype is also an // enclosing type. in that case the variable refers to the field in the enclosing instance. if (current.isEqualTo(owningType) || (isInSubtype && !isPrivate)) return current; current = current.getDeclaringClass(); } Assertions.UNREACHABLE("Couldn't find field in class or enclosing class or superclasses of these"); return null; } /** * Process a field access. Semantics differ for static and instance fields. Fields can throw null pointer exceptions so we must * connect proper exceptional edges in the CFG. */ private CAstNode visit(FieldAccess n, WalkContext context) { CAstNode targetNode = visitNode(n.getExpression(), context); return createFieldAccess(targetNode, n.getName().getIdentifier(), n.resolveFieldBinding(), n, context); } /** * Used by visit(FieldAccess) and visit(SimpleName) -- implicit "this" / static field access. things from 'this' cannot throw an * exception. maybe handle this in here as a special case? i don't know... or check if targetNode is THIS, that should even work * for this.x = 5 and (this).x = 5 * * @param targetNode Used to evaluate the field access. In the case of static field accesses, this is included in the first part of a * block -- thus it is evaluated for any side effects but thrown away. * @param fieldName Name of the field. * @param positioningNode Used only for making a JdtPosition. */ private CAstNode createFieldAccess(CAstNode targetNode, String fieldName, IVariableBinding possiblyParameterizedBinding, ASTNode positioningNode, WalkContext context) { IVariableBinding fieldBinding = possiblyParameterizedBinding.getVariableDeclaration(); ITypeBinding targetType = fieldBinding.getDeclaringClass(); if (targetType == null) { // array assert fieldName.equals("length") : "null targetType but not aray length access"; return makeNode(context, fFactory, positioningNode, CAstNode.ARRAY_LENGTH, targetNode); } assert fieldBinding.isField() : "Field binding is not a field?!"; // we can probably safely delete this // check // translate JDT field ref to WALA field ref FieldReference fieldRef = fIdentityMapper.getFieldRef(fieldBinding); if ((fieldBinding.getModifiers() & Modifier.STATIC) != 0) { // JLS says: evaluate the target of the field ref and throw it away. // Hence the following block expr, whose 2 children are the target // evaluation // followed by the OBJECT_REF with a null target child (which the // "back-end" // CAst -> IR translator interprets as a static ref). // TODO: enum constants // don't worry about generics (can't declare static fields with type variables) if (fieldBinding.getConstantValue() != null) { return makeNode(context, fFactory, positioningNode, CAstNode.BLOCK_EXPR, targetNode, fFactory.makeConstant(fieldBinding .getConstantValue())); } else { return makeNode(context, fFactory, positioningNode, CAstNode.BLOCK_EXPR, targetNode, makeNode(context, fFactory, positioningNode, CAstNode.OBJECT_REF, makeNode(context, fFactory, null, CAstNode.VOID), fFactory.makeConstant(fieldRef))); } } else { CAstNode refNode = makeNode(context, fFactory, positioningNode, CAstNode.OBJECT_REF, targetNode, fFactory .makeConstant(fieldRef)); if (targetNode.getKind() != CAstNode.THIS) { // this.x will never throw a null pointer exception, because this // can never be null Collection> excTargets = context.getCatchTargets(fNullPointerExcType); if (!excTargets.isEmpty()) { // connect NPE exception edge to relevant catch targets // (presumably only one) for (Pair catchPair : excTargets) { context.cfg().add(refNode, catchPair.snd, fNullPointerExcType); } } else { // connect exception edge to exit context.cfg().add(refNode, CAstControlFlowMap.EXCEPTION_TO_EXIT, fNullPointerExcType); } context.cfg().map(refNode, refNode); } if (fieldBinding.getConstantValue() != null) { // don't have to worry about generics, a constant of generic type can only be null return makeNode(context, fFactory, positioningNode, CAstNode.BLOCK_EXPR, refNode, // evaluating 'refNode' can have side effects, so we must still evaluate it! fFactory.makeConstant(fieldBinding.getConstantValue())); } else { if (fieldBinding.getType().isTypeVariable() && !context.needLValue()) { // GENERICS: add a cast ITypeBinding realtype = JDT2CAstUtils.getErasedType(possiblyParameterizedBinding.getType(), ast); ITypeBinding fromtype = JDT2CAstUtils.getTypesVariablesBase(fieldBinding.getType(), ast); if (!realtype.isEqualTo(fromtype)) return createCast(positioningNode, refNode, fromtype, realtype, context); } return refNode; } } } private CAstNode visit(ThisExpression n, WalkContext context) { if (n.getQualifier() != null) { ITypeBinding owningType = n.getQualifier().resolveTypeBinding(); TypeReference owningTypeRef = fIdentityMapper.getTypeRef(owningType); return makeNode(context, fFactory, n, CAstNode.THIS, fFactory.makeConstant(owningTypeRef)); } else return makeNode(context, fFactory, n, CAstNode.THIS); } /** * QualifiedNames may be: 1) static of non-static field accesses -- we handle this case here 2) type names used in the context of: * a) field access (QualifiedName) b) method invocation c) qualifier of "this" in these cases we get the binding info in each of * these three functions and use them there, thus we return an EMPTY (no-op) here. 3) package names used in the context of a * QualifiedName class we return a EMPTY (no-op) here. */ private CAstNode visit(QualifiedName n, WalkContext context) { // "package.Class" is a QualifiedName, but also is "Class.staticField" // only handle if it's a "Class.staticField" ("Field" in polyglot AST) if (n.resolveBinding() instanceof IVariableBinding) { IVariableBinding binding = (IVariableBinding) n.resolveBinding(); assert binding.isField() : "Non-field variable QualifiedName!"; // if field access is static, visitNode(n.getQualifier()) will come back here // and we will return an EMPTY node return createFieldAccess(visitNode(n.getQualifier(), context), n.getName().getIdentifier(), binding, n, context); } else return makeNode(context, fFactory, null, CAstNode.EMPTY); // type name, handled in surrounding context } private CAstNode visit(InfixExpression n, WalkContext context) { Expression left = n.getLeftOperand(); ITypeBinding leftType = left.resolveTypeBinding(); int leftStartPosition = left.getStartPosition(); CAstNode leftNode = visitNode(left, context); int leftLength = n.getLeftOperand().getLength(); CAstNode result = createInfixExpression(n.getOperator(), leftType, leftStartPosition, leftLength, leftNode, n.getRightOperand(), context); if (n.hasExtendedOperands()) { // keep on adding operands on the right side leftLength = n.getRightOperand().getStartPosition() + n.getRightOperand().getLength() - leftStartPosition; for (Expression operand : (Iterable) n.extendedOperands()) { result = createInfixExpression(n.getOperator(), leftType, leftStartPosition, leftLength, result, operand, context); if (leftType.isPrimitive() && operand.resolveTypeBinding().isPrimitive()) leftType = JDT2CAstUtils.promoteTypes(leftType, operand.resolveTypeBinding(), ast); // TODO: boxing else leftType = operand.resolveTypeBinding(); // leftStartPosition doesn't change, beginning is always the first operand leftLength = operand.getStartPosition() + operand.getLength() - leftStartPosition; } } return result; } private CAstNode createInfixExpression(InfixExpression.Operator op, ITypeBinding leftType, int leftStartPosition, int leftLength, CAstNode leftNode, Expression right, WalkContext context) { CAstNode rightNode = visitNode(right, context); int start = leftStartPosition; int end = right.getStartPosition() + right.getLength(); T pos = makePosition(start, end); T rightPos = makePosition(leftStartPosition, leftStartPosition + leftLength); T leftPos = makePosition(right.getStartPosition(), right.getStartPosition() + right.getLength()); if (op == InfixExpression.Operator.CONDITIONAL_AND) { return makeNode(context, fFactory, pos, CAstNode.IF_EXPR, leftNode, rightNode, fFactory.makeConstant(false)); } else if (op == InfixExpression.Operator.CONDITIONAL_OR) { return makeNode(context, fFactory, pos, CAstNode.IF_EXPR, leftNode, fFactory.makeConstant(true), rightNode); } else { ITypeBinding rightType = right.resolveTypeBinding(); if (leftType.isPrimitive() && rightType.isPrimitive()) { // TODO: boxing ITypeBinding result = JDT2CAstUtils.promoteTypes(leftType, rightType, ast); // cast to proper type if (!result.isEqualTo(leftType)) leftNode = makeNode(context, fFactory, leftPos, CAstNode.CAST, fFactory.makeConstant(fTypeDict.getCAstTypeFor(result)), leftNode, fFactory.makeConstant(fTypeDict.getCAstTypeFor(leftType))); if (!result.isEqualTo(rightType)) rightNode = makeNode(context, fFactory, rightPos, CAstNode.CAST, fFactory.makeConstant(fTypeDict.getCAstTypeFor(result)), rightNode, fFactory.makeConstant(fTypeDict.getCAstTypeFor(rightType))); CAstNode opNode = makeNode(context, fFactory, pos, CAstNode.BINARY_EXPR, JDT2CAstUtils.mapBinaryOpcode(op), leftNode, rightNode); // divide by zero exception implicitly thrown if (JDT2CAstUtils.isLongOrLess(leftType) && JDT2CAstUtils.isLongOrLess(rightType) && (JDT2CAstUtils.mapBinaryOpcode(op) == CAstOperator.OP_DIV || JDT2CAstUtils.mapBinaryOpcode(op) == CAstOperator.OP_MOD)) { Collection> excTargets = context.getCatchTargets(fDivByZeroExcType); if (!excTargets.isEmpty()) { for (Pair catchPair : excTargets) { context.cfg().add(op, catchPair.snd, fDivByZeroExcType); } } else { context.cfg().add(op, CAstControlFlowMap.EXCEPTION_TO_EXIT, fDivByZeroExcType); } } return opNode; } else { return makeNode(context, fFactory, pos, CAstNode.BINARY_EXPR, JDT2CAstUtils.mapBinaryOpcode(op), leftNode, rightNode); } } } private CAstNode visit(ConstructorInvocation n, WalkContext context) { // GENERICS getMethodDeclaration() return createConstructorInvocation(n.resolveConstructorBinding().getMethodDeclaration(), n.arguments(), n, context, false); } private CAstNode visit(SuperConstructorInvocation n, WalkContext context) { // FIXME: use expression?! polyglot doesn't handle it and it seems to be a very rare case. // class E { class X {} } // class Y extends E.X { Y(E e) { e.super(); } } // GENERICS getMethodDeclaration() return createConstructorInvocation(n.resolveConstructorBinding().getMethodDeclaration(), n.arguments(), n, context, true); } private CAstNode visit(SuperFieldAccess n, WalkContext context) { CAstNode targetNode; if (n.getQualifier() == null) targetNode = makeNode(context, fFactory, n, CAstNode.SUPER); else { TypeReference owningTypeRef = fIdentityMapper.getTypeRef(n.getQualifier().resolveTypeBinding()); targetNode = makeNode(context, fFactory, n, CAstNode.SUPER, fFactory.makeConstant(owningTypeRef)); } return createFieldAccess(targetNode, n.getName().getIdentifier(), n.resolveFieldBinding(), n, context); } /** * callerNode: used for positioning and also in CFG (handleThrowsFrom Call) */ private CAstNode createConstructorInvocation(IMethodBinding ctorBinding, List arguments, ASTNode callerNode, WalkContext context, boolean isSuper) { ITypeBinding ctorType = ctorBinding.getDeclaringClass(); assert ctorType.isClass(); // dummy PC = 0 -- Just want to wrap the kind of call; the "rear end" // won't care about anything else... CallSiteReference callSiteRef = CallSiteReference.make(0, fIdentityMapper.getMethodRef(ctorBinding), IInvokeInstruction.Dispatch.SPECIAL); int nFormals = ctorBinding.getParameterTypes().length; CAstNode[] children = new CAstNode[2 + nFormals]; // this, call site ref, args CAstNode targetNode = makeNode(context, fFactory, callerNode, isSuper ? CAstNode.SUPER : CAstNode.THIS); children[0] = targetNode; children[1] = fFactory.makeConstant(callSiteRef); populateArguments(children, ctorBinding, arguments, context); handleThrowsFromCall(ctorBinding, callerNode, context); CAstNode result = makeNode(context, fFactory, callerNode, CAstNode.CALL, children); context.cfg().map(context, result); return result; } private CAstNode visit(IfStatement n, WalkContext context) { return makeNode(context, fFactory, n, CAstNode.IF_STMT, visitNode(n.getExpression(), context), visitNode(n.getThenStatement(), context), visitNode(n.getElseStatement(), context)); } private CAstNode visit(InstanceofExpression n, WalkContext context) { return makeNode(context, fFactory, n, CAstNode.INSTANCEOF, fFactory.makeConstant(fTypeDict.getCAstTypeFor(n.getRightOperand() .resolveBinding())), visitNode(n.getLeftOperand(), context)); } private CAstNode visit(CastExpression n, WalkContext context) { Expression arg = n.getExpression(); ITypeBinding castedFrom = arg.resolveTypeBinding(); ITypeBinding castedTo = n.getType().resolveBinding(); return createCast(n, visitNode(arg, context), castedFrom, castedTo, context); } private CAstNode createCast(ASTNode pos, CAstNode argNode, ITypeBinding castedFrom, ITypeBinding castedTo, WalkContext context) { Object cfgMapDummy = new Object(); // safer as 'pos' may be used for another purpose (i.e., this could be an implicit cast) // null can go into anything (e.g. in "((Foobar) null)" null can be assumed to be of type Foobar already) if (castedFrom.isNullType()) castedFrom = castedTo; CAstNode ast = makeNode(context, fFactory, pos, CAstNode.CAST, fFactory.makeConstant(fTypeDict.getCAstTypeFor(castedTo)), argNode, fFactory.makeConstant(fTypeDict.getCAstTypeFor(castedFrom))); Collection> excTargets = context.getCatchTargets(fClassCastExcType); if (!excTargets.isEmpty()) { // connect ClassCastException exception edge to relevant catch targets // (presumably only one) for (Pair catchPair : excTargets) { context.cfg().add(cfgMapDummy, catchPair.snd, fClassCastExcType); } } else { // connect exception edge to exit context.cfg().add(cfgMapDummy, CAstControlFlowMap.EXCEPTION_TO_EXIT, fClassCastExcType); } context.cfg().map(cfgMapDummy, ast); return ast; } private CAstNode visit(ConditionalExpression n, WalkContext context) { return makeNode(context, fFactory, n, CAstNode.IF_EXPR, visitNode(n.getExpression(), context), visitNode(n.getThenExpression(), context), visitNode(n.getElseExpression(), context)); } private CAstNode visit(PostfixExpression n, WalkContext context) { CAstOperator op = (n.getOperator() == PostfixExpression.Operator.DECREMENT) ? CAstOperator.OP_SUB : CAstOperator.OP_ADD; return makeNode(context, fFactory, n, CAstNode.ASSIGN_POST_OP, visitNode(n.getOperand(), context), fFactory.makeConstant(1), op); } private CAstNode visit(PrefixExpression n, WalkContext context) { PrefixExpression.Operator op = n.getOperator(); if (op == PrefixExpression.Operator.DECREMENT || op == PrefixExpression.Operator.INCREMENT) { CAstOperator castOp = (n.getOperator() == PrefixExpression.Operator.DECREMENT) ? CAstOperator.OP_SUB : CAstOperator.OP_ADD; return makeNode(context, fFactory, n, CAstNode.ASSIGN_PRE_OP, visitNode(n.getOperand(), context), fFactory.makeConstant(1), castOp); } else if (op == PrefixExpression.Operator.PLUS) { return visitNode(n.getOperand(), context); // drop useless unary plus operator } else if (op == PrefixExpression.Operator.MINUS) { CAstNode zero; if (JDT2CAstUtils.isLongOrLess(n.getOperand().resolveTypeBinding())) zero = fFactory.makeConstant(0L); else zero = fFactory.makeConstant(0.0); return makeNode(context, fFactory, n, CAstNode.BINARY_EXPR, CAstOperator.OP_SUB, zero, visitNode(n.getOperand(), context)); } else { // ! and ~ CAstOperator castOp = (n.getOperator() == PrefixExpression.Operator.NOT) ? CAstOperator.OP_NOT : CAstOperator.OP_BITNOT; return makeNode(context, fFactory, n, CAstNode.UNARY_EXPR, castOp, visitNode(n.getOperand(), context)); } } private CAstNode visit(EmptyStatement n, WalkContext context) { CAstNode result = makeNode(context, fFactory, n, CAstNode.EMPTY); context.cfg().map(n, result); // why is this necessary? for break / continue targets? (they use an empty statement) return result; } private CAstNode visit(AssertStatement n, WalkContext context) { return makeNode(context, fFactory, n, CAstNode.ASSERT, visitNode(n.getExpression(), context)); } // //////////////// // LOOPS -- special handling of for and continue // //////////////// private CAstNode visit(LabeledStatement n, WalkContext context) { // find the first non-block statement ant set-up the label map (useful for breaking many fors) ASTNode stmt = n.getBody(); while (stmt instanceof Block) stmt = (ASTNode) ((Block) stmt).statements().iterator().next(); if (n.getParent() != null) // if not a synthetic node from a break/continue -- don't pollute namespace with label, we get it thru the context context.getLabelMap().put(stmt, n.getLabel().getIdentifier()); CAstNode result; if (!(n.getBody() instanceof EmptyStatement)) { ASTNode breakTarget = makeBreakOrContinueTarget(n, n.getLabel().getIdentifier()); CAstNode breakNode = visitNode(breakTarget, context); WalkContext child = new BreakContext(context, n.getLabel().getIdentifier(), breakTarget); result = makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, makeNode(context, fFactory, n, CAstNode.LABEL_STMT, fFactory .makeConstant(n.getLabel().getIdentifier()), visitNode(n.getBody(), child)), breakNode); } else { result = makeNode(context, fFactory, n, CAstNode.LABEL_STMT, fFactory.makeConstant(n.getLabel().getIdentifier()), visitNode(n .getBody(), context)); } context.cfg().map(n, result); if (n.getParent() != null) // if not a synthetic node from a break/continue -- don't pollute namespace with label, we get it thru the context context.getLabelMap().remove(stmt); return result; } /** * Make a fake labeled node with no body, as an anchor to go to */ private ASTNode makeBreakOrContinueTarget(ASTNode loop, String name) { LabeledStatement labeled = ast.newLabeledStatement(); labeled.setBody(ast.newEmptyStatement()); labeled.setSourceRange(loop.getStartPosition(), loop.getLength()); labeled.setLabel(ast.newSimpleName(name)); // we don't have to worry about namespace conflicts as it is only // definedwithin return labeled; } private CAstNode visit(BreakStatement n, WalkContext context) { String label = n.getLabel() == null ? null : n.getLabel().getIdentifier(); ASTNode target = context.getBreakFor(label); assert target != null; CAstNode result = makeNode(context, fFactory, n, CAstNode.GOTO); context.cfg().map(n, result); context.cfg().add(n, target, null); return result; } private CAstNode visit(ContinueStatement n, WalkContext context) { String label = n.getLabel() == null ? null : n.getLabel().getIdentifier(); ASTNode target = context.getContinueFor(label); assert target != null; CAstNode result = makeNode(context, fFactory, n, CAstNode.GOTO); context.cfg().map(n, result); context.cfg().add(n, target, null); return result; } private CAstNode visit(WhileStatement n, WalkContext context) { Expression cond = n.getExpression(); Statement body = n.getBody(); ASTNode breakTarget = makeBreakOrContinueTarget(n, "breakLabel" + n.getStartPosition()); CAstNode breakNode = visitNode(breakTarget, context); ASTNode continueTarget = makeBreakOrContinueTarget(n, "continueLabel" + n.getStartPosition()); CAstNode continueNode = visitNode(continueTarget, context); String loopLabel = context.getLabelMap().get(n); LoopContext lc = new LoopContext(context, loopLabel, breakTarget, continueTarget); /* * The following loop is created sligtly differently than in jscore. It doesn't have a specific target for continue. */ return makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, makeNode(context, fFactory, n, CAstNode.LOOP, visitNode(cond, context), makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, visitNode(body, lc), continueNode)), breakNode); } private CAstNode getSwitchCaseConstant(SwitchCase n, WalkContext context) { // TODO: enums Expression expr = n.getExpression(); Object constant = (expr == null) ? Integer.valueOf(0) : expr.resolveConstantExpressionValue(); // default case label of // "0" (what polyglot // does). we also set // SWITCH_DEFAULT // somewhere else // polyglot converts all labels to longs. why? who knows... if (constant instanceof Character) constant = new Long(((Character) constant).charValue()); else if (constant instanceof Byte) constant = new Long(((Byte) constant).longValue()); else if (constant instanceof Integer) constant = new Long(((Integer) constant).longValue()); else if (constant instanceof Short) constant = new Long(((Short) constant).longValue()); if (constant != null) { return fFactory.makeConstant(constant); } else if (expr instanceof SimpleName) { // enum constant return visit((SimpleName) expr, context); } else { Assertions.UNREACHABLE("null constant for non-enum switch case!"); return null; } } private CAstNode visit(SwitchCase n, WalkContext context) { CAstNode label = makeNode(context, fFactory, n, CAstNode.LABEL_STMT, getSwitchCaseConstant(n, context)); context.cfg().map(n, label); return label; } private CAstNode visit(SwitchStatement n, WalkContext context) { ASTNode breakTarget = makeBreakOrContinueTarget(n, "breakLabel" + n.getStartPosition()); CAstNode breakAst = visitNode(breakTarget, context); String loopLabel = context.getLabelMap().get(n); // set by labeled statement (if there is one before this // switch statement) WalkContext childContext = new BreakContext(context, loopLabel, breakTarget); Expression cond = n.getExpression(); List cases = n.statements(); // First compute the control flow edges for the various case labels for (int i = 0; i < cases.size(); i++) { Statement se = cases.get(i); if (se instanceof SwitchCase) { SwitchCase c = (SwitchCase) se; if (c.isDefault()) context.cfg().add(n, c, CAstControlFlowMap.SWITCH_DEFAULT); else context.cfg().add(n, c, getSwitchCaseConstant(c, context)); // if we don't do this, we may not get a constant but a // block expression or something else } } ArrayList caseNodes = new ArrayList<>(); // polyglot bundles all statements in between two statements into a block. // this is temporary place to hold current bundle of nodes. ArrayList currentBlock = new ArrayList<>(); // Now produce the CAst representation for each case for (Statement s : cases) { if (s instanceof SwitchCase) { if (!currentBlock.isEmpty()) { // bundle up statements before this case CAstNode stmtNodes[] = currentBlock.toArray(new CAstNode[0]); // make position from start of first statement to end of last statement T positionOfAll = makePosition(childContext.pos().getPosition(stmtNodes[0]).getFirstOffset(), childContext .pos().getPosition(stmtNodes[stmtNodes.length - 1]).getLastOffset()); caseNodes.add(makeNode(childContext, fFactory, positionOfAll, CAstNode.BLOCK_STMT, stmtNodes)); currentBlock.clear(); } caseNodes.add(visitNode(s, childContext)); } else { visitNodeOrNodes(s, childContext, currentBlock); } } if (!currentBlock.isEmpty()) { // bundle up statements before this case CAstNode stmtNodes[] = currentBlock.toArray(new CAstNode[0]); // make position from start of first statement to end of last statement T positionOfAll = makePosition(childContext.pos().getPosition(stmtNodes[0]).getFirstOffset(), childContext.pos() .getPosition(stmtNodes[stmtNodes.length - 1]).getLastOffset()); caseNodes.add(makeNode(childContext, fFactory, positionOfAll, CAstNode.BLOCK_STMT, stmtNodes)); } // Now produce the switch stmt itself CAstNode switchAst = makeNode(context, fFactory, n, CAstNode.SWITCH, visitNode(cond, context), makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, caseNodes.toArray(new CAstNode[0]))); context.cfg().map(n, switchAst); // Finally, wrap the entire switch in a block so that we have a // well-defined place to 'break' to. return makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, switchAst, breakAst); } private CAstNode visit(DoStatement n, WalkContext context) { String loopLabel = context.getLabelMap().get(n); // set by visit(LabeledStatement) String token = loopLabel==null? "at_" + n.getStartPosition(): loopLabel; ASTNode breakTarget = makeBreakOrContinueTarget(n, "breakLabel_" + token); CAstNode breakNode = visitNode(breakTarget, context); ASTNode continueTarget = makeBreakOrContinueTarget(n, "continueLabel_" + token); CAstNode continueNode = visitNode(continueTarget, context); CAstNode loopTest = visitNode(n.getExpression(), context); WalkContext loopContext = new LoopContext(context, loopLabel, breakTarget, continueTarget); CAstNode loopBody = visitNode(n.getBody(), loopContext); CAstNode madeNode = doLoopTranslator.translateDoLoop(loopTest, loopBody, continueNode, breakNode, context); context.pos().setPosition(madeNode, makePosition(n)); return madeNode; } /** * Expands the form: for ( [final] Type var: iterable ) { ... } Into something equivalent to: for ( Iterator iter = * iterable.iter(); iter.hasNext(); ) { [final] Type var = (Type) iter.next(); ... } Or, in the case of an array: for ( int idx = * 0; i < iterable.length; i++ ) { [final] Type var = iterable[idx]; ... } Except that the expression "iterable" is only evaluate * once (or is it?) */ private CAstNode visit(EnhancedForStatement n, WalkContext context) { if (n.getExpression().resolveTypeBinding().isArray()) return makeArrayEnhancedForLoop(n, context); else return makeIteratorEnhancedForLoop(n, context); } private CAstNode makeIteratorEnhancedForLoop(EnhancedForStatement n, WalkContext context) { // case 1: iterator CAstNode exprNode = visitNode(n.getExpression(), context); SingleVariableDeclaration svd = n.getParameter(); Statement body = n.getBody(); // expand into: // typical for loop: // { [inits]; while (cond) { [body]; [label continueTarget]; iters } [label breakTarget] // BLOCK(BLOCK(init1,init2,...),LOOP(cond,BLOCK(bodyblock,continuetarget,BLOCK(iter1,iter2,...))),breaktarget // in our case: // the only init is "Iterator iter = iterable.iter()" // cond is "iter.hasNext()" // bodyblock should be prepended with "[final] Type var = iter.next()" (put in the block that body belongs to) // iter is null // continuetarget and breaktarget are the same as in a regular for loop // BLOCK(iterassign,LOOP(cond,BLOCK(paramassign,bodyblock,continuetarget)),breaktarget) final String tmpName = "iter tmp"; // this is an illegal Java identifier, we will use this variable to hold the "invisible" // iterator /*-------- make "iter = iterator.iter()" ---------*/ // make a fake method ref MethodReference iterMethodRef = fIdentityMapper.fakeMethodRefNoArgs("Ljava/lang/Iterable;.iterator()Ljava/util/Iterator;", "Ljava/lang/Iterable", "iterator", "Ljava/util/Iterator"); CAstNode iterCallSiteRef = fFactory.makeConstant(CallSiteReference .make(0, iterMethodRef, IInvokeInstruction.Dispatch.INTERFACE)); // Iterable.iter() throws no exceptions. CAstNode iterCallNode = makeNode(context, fFactory, n, CAstNode.CALL, exprNode, iterCallSiteRef); // handle runtimeexception Object o1 = new Object(); // dummy object used for mapping / exceptions for (Pair catchTarget : context.getCatchTargets(fRuntimeExcType)) context.cfg().add(o1, catchTarget.snd, catchTarget.fst); context.cfg().map(o1, iterCallNode); // TODO: this might not work, lots of calls in this one statement. CAstNode iterAssignNode = makeNode(context, fFactory, n, CAstNode.DECL_STMT, fFactory.makeConstant(new InternalCAstSymbol( tmpName, fTypeDict.getCAstTypeFor(ast.resolveWellKnownType("int")), true)), iterCallNode); // MATCHUP: wrap in a block iterAssignNode = makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, iterAssignNode); // TODO: TOTEST: using this and Iterable.hasNext() explicitly in same file. /*---------- cond: iter.hasNext(); -----------*/ MethodReference hasNextMethodRef = fIdentityMapper.fakeMethodRefNoArgs("Ljava/util/Iterator;.hasNext()Z", "Ljava/util/Iterator", "hasNext", "Z"); CAstNode iterVar = makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(tmpName)); CAstNode hasNextCallSiteRef = fFactory.makeConstant(CallSiteReference.make(0, hasNextMethodRef, IInvokeInstruction.Dispatch.INTERFACE)); // throws no exceptions. CAstNode hasNextCallNode = makeNode(context, fFactory, n, CAstNode.CALL, iterVar, hasNextCallSiteRef); // handle runtimeexception Object o2 = new Object(); // dummy object used for mapping / exceptions for (Pair catchTarget : context.getCatchTargets(fRuntimeExcType)) context.cfg().add(o2, catchTarget.snd, catchTarget.fst); context.cfg().map(o2, hasNextCallNode); // TODO: this might not work, lots of calls in this one statement. /*---------- paramassign: var = (Type) iter.next() ---------*/ MethodReference nextMethodRef = fIdentityMapper.fakeMethodRefNoArgs("Ljava/util/Iterator;.next()TE;", "Ljava/util/Iterator", "next", "Ljava/lang/Object"); CAstNode nextCallSiteRef = fFactory.makeConstant(CallSiteReference .make(0, nextMethodRef, IInvokeInstruction.Dispatch.INTERFACE)); // throws no exceptions. CAstNode iterVar2 = makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(tmpName)); CAstNode nextCallNode = makeNode(context, fFactory, n, CAstNode.CALL, iterVar2, nextCallSiteRef); for (Pair catchTarget : context.getCatchTargets(fRuntimeExcType)) context.cfg().add(svd, catchTarget.snd, catchTarget.fst); context.cfg().map(svd, nextCallNode); // TODO: another cfg edge associated with svd! is this okay? prolly not... associate it with the cast, somehow... CAstNode castedNode = createCast(svd, nextCallNode, ast.resolveWellKnownType("java.lang.Object"), svd.resolveBinding() .getType(), context); Object defaultValue = JDT2CAstUtils.defaultValueForType(svd.resolveBinding().getType()); CAstNode nextAssignNode = makeNode(context, fFactory, n, CAstNode.DECL_STMT, fFactory.makeConstant(new CAstSymbolImpl(svd .getName().getIdentifier(), fTypeDict.getCAstTypeFor(svd.resolveBinding().getType()), (svd.getModifiers() & Modifier.FINAL) != 0, defaultValue)), castedNode); /*----------- put it all together ----------*/ ASTNode breakTarget = makeBreakOrContinueTarget(n, "breakLabel" + n.getStartPosition()); ASTNode continueTarget = makeBreakOrContinueTarget(n, "continueLabel" + n.getStartPosition()); String loopLabel = context.getLabelMap().get(n); WalkContext loopContext = new LoopContext(context, loopLabel, breakTarget, continueTarget); // LOCAL_SCOPE(BLOCK(iterassign,LOOP(cond,BLOCK(BLOCK(paramassign,bodyblock),continuetarget,BLOCK())),breaktarget)) return makeNode(context, fFactory, n, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, iterAssignNode, makeNode(context, fFactory, n, CAstNode.LOOP, hasNextCallNode, makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, makeNode(context, fFactory, n, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, nextAssignNode, visitNode(body, loopContext))), visitNode(continueTarget, context), makeNode(context, fFactory, n, CAstNode.BLOCK_STMT))), visitNode(breakTarget, context))); } private CAstNode makeArrayEnhancedForLoop(EnhancedForStatement n, WalkContext context) { // ********* BEFORE: // for ( String x: doSomething() ) { ... } // ********* AFTER: // { // String tmparray[] = doSomething(); // for ( int tmpindex = 0; i < tmparray.length; tmpindex++ ) { // String x = tmparray[tmpindex]; // ... // } // } // simplest: // LOCAL_SCOPE(BLOCK(arrayDecl,indexDecl,LOOP(cond,BLOCK(nextAssign,bodyblock,continuetarget,iter)),breaktarget)) // match up exactly: // LOCAL_SCOPE(BLOCK(arrayDecl,LOCAL_SCOPE(BLOCK(BLOCK(indexDecl),LOOP(cond,BLOCK(LOCAL_SCOPE(BLOCK(nextAssign,bodyblock)),continuetarget,BLOCK(iter))),breaktarget)))) /*------ arrayDecl --------- String tmparray[] = doSomething() ------*/ final String tmpArrayName = "for temp array"; // illegal java identifier CAstNode exprNode = visitNode(n.getExpression(), context); CAstNode arrayDeclNode = makeNode(context, fFactory, n, CAstNode.DECL_STMT, fFactory.makeConstant(new InternalCAstSymbol( tmpArrayName, fTypeDict.getCAstTypeFor(n.getExpression().resolveTypeBinding()), true)), exprNode); /*------ indexDecl --------- int tmpindex = 0 ------*/ final String tmpIndexName = "for temp index"; CAstNode indexDeclNode = makeNode(context, fFactory, n, CAstNode.DECL_STMT, fFactory.makeConstant(new InternalCAstSymbol( tmpIndexName, fTypeDict.getCAstTypeFor(ast.resolveWellKnownType("int")), true)), fFactory.makeConstant(Integer.valueOf(0))); /*------ cond ------------- tmpindex < tmparray.length ------*/ CAstNode tmpArrayLengthNode = makeNode(context, fFactory, n, CAstNode.ARRAY_LENGTH, makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(tmpArrayName), fFactory.makeConstant(fTypeDict.getCAstTypeFor(n.getExpression().resolveTypeBinding())))); CAstNode condNode = makeNode(context, fFactory, n, CAstNode.BINARY_EXPR, CAstOperator.OP_LT, makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(tmpIndexName), fFactory.makeConstant(JavaPrimitiveType.INT)), tmpArrayLengthNode); /*------ tmpIndexInc -------- tmpindex++ ------*/ CAstNode tmpArrayIncNode = makeNode(context, fFactory, n, CAstNode.ASSIGN_POST_OP, makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(tmpIndexName)), fFactory.makeConstant(1), CAstOperator.OP_ADD); /*------ tmpArrayAccess ----- String x = tmparray[tmpindex] ------*/ CAstNode tmpArrayAccessNode = makeNode(context, fFactory, n, CAstNode.ARRAY_REF, makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(tmpArrayName)), fFactory.makeConstant(fIdentityMapper.getTypeRef(n.getExpression() .resolveTypeBinding().getComponentType())), makeNode(context, fFactory, n, CAstNode.VAR, fFactory .makeConstant(tmpIndexName))); SingleVariableDeclaration svd = n.getParameter(); Object defaultValue = JDT2CAstUtils.defaultValueForType(svd.resolveBinding().getType()); CAstNode nextAssignNode = makeNode(context, fFactory, n, CAstNode.DECL_STMT, fFactory.makeConstant(new CAstSymbolImpl(svd .getName().getIdentifier(), fTypeDict.getCAstTypeFor(n.getExpression() .resolveTypeBinding().getComponentType()), (svd.getModifiers() & Modifier.FINAL) != 0, defaultValue)), tmpArrayAccessNode); // LOCAL_SCOPE(BLOCK(arrayDecl,LOCAL_SCOPE(BLOCK(BLOCK(indexDecl),LOOP(cond,BLOCK(LOCAL_SCOPE(BLOCK(nextAssign,bodyblock)),continuetarget,BLOCK(iter))),breaktarget)))) // more complicated than it has to be, but it matches up exactly with the Java expansion above. ASTNode breakTarget = makeBreakOrContinueTarget(n, "breakLabel" + n.getStartPosition()); ASTNode continueTarget = makeBreakOrContinueTarget(n, "continueLabel" + n.getStartPosition()); String loopLabel = context.getLabelMap().get(n); WalkContext loopContext = new LoopContext(context, loopLabel, breakTarget, continueTarget); return makeNode(context, fFactory, n, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, arrayDeclNode, makeNode(context, fFactory, n, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, indexDeclNode), makeNode(context, fFactory, n, CAstNode.LOOP, condNode, makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, makeNode(context, fFactory, n, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, nextAssignNode, visitNode(n.getBody(), loopContext))), visitNode(continueTarget, context), makeNode( context, fFactory, n, CAstNode.BLOCK_STMT, tmpArrayIncNode))), visitNode(breakTarget, context))))); } private CAstNode visit(ForStatement n, WalkContext context) { ASTNode breakTarget = makeBreakOrContinueTarget(n, "breakLabel" + n.getStartPosition()); ASTNode continueTarget = makeBreakOrContinueTarget(n, "continueLabel" + n.getStartPosition()); String loopLabel = context.getLabelMap().get(n); WalkContext loopContext = new LoopContext(context, loopLabel, breakTarget, continueTarget); ArrayList inits = new ArrayList<>(); for (int i = 0; i < n.initializers().size(); i++) { ASTNode init = (ASTNode) n.initializers().get(i); if (init instanceof VariableDeclarationExpression) { for (ASTNode o : (Iterable) ((VariableDeclarationExpression) init).fragments()) inits.add(visitNode(o, context)); } else inits.add(visitNode(init, context)); } CAstNode[] iters = new CAstNode[n.updaters().size()]; for (int i = 0; i < iters.length; i++) iters[i] = visitNode((ASTNode) n.updaters().get(i), context); CAstNode initsBlock = makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, inits.toArray(new CAstNode[0])); CAstNode itersBlock = makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, iters); // { [inits]; while (cond) { [body]; [label continueTarget]; iters } [label breakTarget] return makeNode(context, fFactory, n, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, initsBlock, makeNode(context, fFactory, n, CAstNode.LOOP, visitNode(n.getExpression(), context), makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, visitNode(n.getBody(), loopContext), visitNode(continueTarget, context), itersBlock)), visitNode( breakTarget, context))); } private CAstNode visit(TryStatement n, WalkContext context) { List catchBlocks = n.catchClauses(); Block finallyBlock = n.getFinally(); Block tryBlock = n.getBody(); // try/finally if (catchBlocks.isEmpty()) { return makeNode(context, fFactory, n, CAstNode.UNWIND, visitNode(tryBlock, context), visitNode(finallyBlock, context)); // try/catch/[finally] } else { TryCatchContext tc = new TryCatchContext(context, n); CAstNode tryNode = visitNode(tryBlock, tc); for (CatchClause catchClause : catchBlocks) { tryNode = makeNode(context, fFactory, n, CAstNode.TRY, tryNode, visitNode(catchClause, context)); } // try/catch if (finallyBlock == null) { return tryNode; // try/catch/finally } else { return makeNode(context, fFactory, n, CAstNode.UNWIND, tryNode, visitNode(finallyBlock, context)); } } } private CAstNode visit(CatchClause n, WalkContext context) { Block body = n.getBody(); SingleVariableDeclaration formal = n.getException(); CAstNode excDecl = makeNode(context, fFactory, n, CAstNode.CATCH, fFactory.makeConstant(formal.getName().getIdentifier()), visitNode(body, context)); CAstNode localScope = makeNode(context, fFactory, n, CAstNode.LOCAL_SCOPE, excDecl); context.cfg().map(n, excDecl); context.getNodeTypeMap().add(excDecl, fTypeDict.getCAstTypeFor(n.getException().resolveBinding().getType())); return localScope; } private CAstNode visit(ThrowStatement n, WalkContext context) { CAstNode result = makeNode(context, fFactory, n, CAstNode.THROW, visitNode(n.getExpression(), context)); ITypeBinding label = n.getExpression().resolveTypeBinding(); context.cfg().map(n, result); Collection> catchNodes = context.getCatchTargets(label); for (Pair catchNode : catchNodes) { context.cfg().add(n, catchNode.snd, catchNode.fst); } return result; } private void hookUpNPETargets(ASTNode n, WalkContext wc) { Collection> excTargets = wc.getCatchTargets(fNullPointerExcType); if (!excTargets.isEmpty()) { // connect NPE exception edge to relevant catch targets // (presumably only one) for (Pair catchPair : excTargets) { wc.cfg().add(n, catchPair.snd, fNullPointerExcType); } } else { // connect exception edge to exit wc.cfg().add(n, CAstControlFlowMap.EXCEPTION_TO_EXIT, fNullPointerExcType); } } // // ARRAYS // private CAstNode visit(ArrayAccess n, WalkContext context) { TypeReference eltTypeRef = fIdentityMapper.getTypeRef(n.resolveTypeBinding()); CAstNode cast = makeNode(context, fFactory, n, CAstNode.ARRAY_REF, visitNode(n.getArray(), context), fFactory.makeConstant(eltTypeRef), visitNode(n.getIndex(), context)); hookUpNPETargets(n, context); context.cfg().map(n, cast); return cast; } // FIXME: inner classes here, probably too... private CAstNode visit(ArrayCreation n, WalkContext context) { ITypeBinding newType = n.resolveTypeBinding(); ArrayInitializer ai = n.getInitializer(); assert newType.isArray(); if (ai != null) { return visitNode(ai, context); } else { TypeReference arrayTypeRef = fIdentityMapper.getTypeRef(newType); List dims = n.dimensions(); CAstNode[] args = new CAstNode[dims.size() + 1]; int idx = 0; args[idx++] = fFactory.makeConstant(arrayTypeRef); for (Expression dimExpr : dims) { args[idx++] = visitNode(dimExpr, context); } return makeNode(context, fFactory, n, CAstNode.NEW, args); } } private CAstNode visit(SynchronizedStatement n, WalkContext context) { CAstNode exprNode = visitNode(n.getExpression(), context); String exprName = fFactory.makeUnique(); CAstNode declStmt = makeNode(context, fFactory, n, CAstNode.DECL_STMT, fFactory .makeConstant(new CAstSymbolImpl(exprName, fTypeDict.getCAstTypeFor(n.getExpression().resolveTypeBinding()), true)), exprNode); CAstNode monitorEnterNode = makeNode(context, fFactory, n, CAstNode.MONITOR_ENTER, makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(exprName))); context.cfg().map(monitorEnterNode, monitorEnterNode); for (Pair catchTarget : context.getCatchTargets(fNullPointerExcType)) context.cfg().add(monitorEnterNode, catchTarget.snd, catchTarget.fst); CAstNode bodyNodes = visitNode(n.getBody(), context); CAstNode monitorExitNode = makeNode(context, fFactory, n, CAstNode.MONITOR_EXIT, makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(exprName))); context.cfg().map(monitorExitNode, monitorExitNode); for (Pair catchTarget : context.getCatchTargets(fNullPointerExcType)) context.cfg().add(monitorExitNode, catchTarget.snd, catchTarget.fst); CAstNode tryBody = makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, monitorEnterNode, bodyNodes); CAstNode bigBody = makeNode(context, fFactory, n, CAstNode.UNWIND, tryBody, monitorExitNode); return makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, declStmt, bigBody); } // /////////////////////////////////////////// // / THE GIANT SWITCH STATEMENT ( BORING ) /// // /////////////////////////////////////////// /** * Giant switch statement. */ private CAstEntity visit(AbstractTypeDeclaration n, WalkContext context) { // handling of compilationunit in translate() if (n instanceof TypeDeclaration) { return visitTypeDecl(n, context); } else if (n instanceof EnumDeclaration) { return visit((EnumDeclaration) n, context); } else if (n instanceof AnnotationTypeDeclaration) { return visitTypeDecl(n, context); } else { Assertions.UNREACHABLE("Unhandled type declaration type"); return null; } } /** * Giant switch statement, part deux */ private CAstNode visitNode(ASTNode n, WalkContext context) { if (n == null) return makeNode(context, fFactory, null, CAstNode.EMPTY); if (n instanceof ArrayAccess) { return visit((ArrayAccess) n, context); } else if (n instanceof ArrayCreation) { return visit((ArrayCreation) n, context); } else if (n instanceof ArrayInitializer) { return visit((ArrayInitializer) n, context); } else if (n instanceof AssertStatement) { return visit((AssertStatement) n, context); } else if (n instanceof Assignment) { return visit((Assignment) n, context); } else if (n instanceof Block) { return visit((Block) n, context); } else if (n instanceof BooleanLiteral) { return visit((BooleanLiteral) n); } else if (n instanceof BreakStatement) { return visit((BreakStatement) n, context); } else if (n instanceof CastExpression) { return visit((CastExpression) n, context); } else if (n instanceof CatchClause) { return visit((CatchClause) n, context); } else if (n instanceof CharacterLiteral) { return visit((CharacterLiteral) n); } else if (n instanceof ClassInstanceCreation) { return visit((ClassInstanceCreation) n, context); } else if (n instanceof ConditionalExpression) { return visit((ConditionalExpression) n, context); } else if (n instanceof ConstructorInvocation) { return visit((ConstructorInvocation) n, context); } else if (n instanceof ContinueStatement) { return visit((ContinueStatement) n, context); } else if (n instanceof DoStatement) { return visit((DoStatement) n, context); } else if (n instanceof EmptyStatement) { return visit((EmptyStatement) n, context); } else if (n instanceof EnhancedForStatement) { return visit((EnhancedForStatement) n, context); } else if (n instanceof ExpressionStatement) { return visit((ExpressionStatement) n, context); } else if (n instanceof FieldAccess) { return visit((FieldAccess) n, context); } else if (n instanceof ForStatement) { return visit((ForStatement) n, context); } else if (n instanceof IfStatement) { return visit((IfStatement) n, context); } else if (n instanceof InfixExpression) { return visit((InfixExpression) n, context); } else if (n instanceof InstanceofExpression) { return visit((InstanceofExpression) n, context); } else if (n instanceof LabeledStatement) { return visit((LabeledStatement) n, context); } else if (n instanceof MethodInvocation) { return visit((MethodInvocation) n, context); } else if (n instanceof NumberLiteral) { return visit((NumberLiteral) n); } else if (n instanceof NullLiteral) { return visit(); } else if (n instanceof ParenthesizedExpression) { return visit((ParenthesizedExpression) n, context); } else if (n instanceof PostfixExpression) { return visit((PostfixExpression) n, context); } else if (n instanceof PrefixExpression) { return visit((PrefixExpression) n, context); } else if (n instanceof QualifiedName) { return visit((QualifiedName) n, context); } else if (n instanceof ReturnStatement) { return visit((ReturnStatement) n, context); } else if (n instanceof SimpleName) { return visit((SimpleName) n, context); } else if (n instanceof StringLiteral) { return visit((StringLiteral) n); } else if (n instanceof SuperConstructorInvocation) { return visit((SuperConstructorInvocation) n, context); } else if (n instanceof SuperFieldAccess) { return visit((SuperFieldAccess) n, context); } else if (n instanceof SuperMethodInvocation) { return visit((SuperMethodInvocation) n, context); } else if (n instanceof SynchronizedStatement) { return visit((SynchronizedStatement) n, context); } else if (n instanceof SwitchStatement) { return visit((SwitchStatement) n, context); } else if (n instanceof SwitchCase) { return visit((SwitchCase) n, context); } else if (n instanceof ThisExpression) { return visit((ThisExpression) n, context); } else if (n instanceof TypeLiteral) { return visit((TypeLiteral) n, context); } else if (n instanceof ThrowStatement) { return visit((ThrowStatement) n, context); } else if (n instanceof TryStatement) { return visit((TryStatement) n, context); } else if (n instanceof TypeDeclarationStatement) { return visit((TypeDeclarationStatement) n, context); } else if (n instanceof VariableDeclarationFragment) { return visit((VariableDeclarationFragment) n, context); } else if (n instanceof WhileStatement) { return visit((WhileStatement) n, context); } // VariableDeclarationStatement handled as special case (returns multiple statements) Assertions.UNREACHABLE("Unhandled JDT node type " + n.getClass().getCanonicalName()); return null; } private void visitNodeOrNodes(ASTNode n, WalkContext context, Collection coll) { if (n instanceof VariableDeclarationStatement) coll.addAll(visit((VariableDeclarationStatement) n, context)); else coll.add(visitNode(n, context)); } // ///////////////////////////////////////// // SPECIALIZED CASTENTITYs AND CASTNODEs // // ///////////////////////////////////////// protected static final class CompilationUnitEntity implements CAstEntity { private final String fName; private final Collection fTopLevelDecls; public CompilationUnitEntity(PackageDeclaration packageDeclaration, List topLevelDecls) { fName = (packageDeclaration == null) ? "" : packageDeclaration.getName().getFullyQualifiedName().replace('.', '/'); fTopLevelDecls = topLevelDecls; } @Override public Collection getAnnotations() { return null; } @Override public int getKind() { return FILE_ENTITY; } @Override public String getName() { return fName; } @Override public String getSignature() { Assertions.UNREACHABLE(); return null; } @Override public String[] getArgumentNames() { return new String[0]; } @Override public CAstNode[] getArgumentDefaults() { return new CAstNode[0]; } @Override public int getArgumentCount() { return 0; } @Override public Map> getAllScopedEntities() { return Collections.singletonMap(null, fTopLevelDecls); } @Override public Iterator getScopedEntities(CAstNode construct) { Assertions.UNREACHABLE("CompilationUnitEntity asked for AST-related entities, but it has no AST."); return null; } @Override public CAstNode getAST() { return null; } @Override public CAstControlFlowMap getControlFlow() { Assertions.UNREACHABLE("CompilationUnitEntity.getControlFlow()"); return null; } @Override public CAstSourcePositionMap getSourceMap() { Assertions.UNREACHABLE("CompilationUnitEntity.getSourceMap()"); return null; } @Override public CAstSourcePositionMap.Position getPosition() { return null; } @Override public CAstNodeTypeMap getNodeTypeMap() { Assertions.UNREACHABLE("CompilationUnitEntity.getNodeTypeMap()"); return null; } @Override public Collection getQualifiers() { return Collections.emptyList(); } @Override public CAstType getType() { Assertions.UNREACHABLE("CompilationUnitEntity.getType()"); return null; } @Override public Position getPosition(int arg) { return null; } @Override public Position getNamePosition() { return null; } } // ///////////////////////////// // WALK CONTEXTS // WHY???? // //////////////////////////////// /** * Contains things needed by in the visit() of some nodes to process the nodes. For example, pos() contains the source position * mapping which each node registers */ public static interface WalkContext extends TranslatorToCAst.WalkContext { public Collection> getCatchTargets(ITypeBinding type); public Map getLabelMap(); public boolean needLValue(); } /** * Default context functions. When one context doesn't handle something, it the next one up does. For example, there is only one * source pos. mapping per MethodContext, so loop contexts delegate it up. */ public static class DelegatingContext extends TranslatorToCAst.DelegatingContext implements WalkContext { public DelegatingContext(WalkContext parent) { super(parent); } @Override public Collection> getCatchTargets(ITypeBinding type) { return parent.getCatchTargets(type); } @Override public Map getLabelMap() { return parent.getLabelMap(); } @Override public boolean needLValue() { return parent.needLValue(); } } /* * Root context. Doesn't do anything. */ public static class RootContext extends TranslatorToCAst.RootContext implements WalkContext { @Override public Collection> getCatchTargets(ITypeBinding type) { Assertions.UNREACHABLE("RootContext.getCatchTargets()"); return null; } @Override public Map getLabelMap() { Assertions.UNREACHABLE("RootContext.getLabelMap()"); return null; } @Override public boolean needLValue() { Assertions.UNREACHABLE("Rootcontext.needLValue()"); return false; } } private class AssignmentContext extends DelegatingContext { protected AssignmentContext(WalkContext parent) { super(parent); } @Override public boolean needLValue() { return true; } } private static class TryCatchContext extends DelegatingContext { Collection> fCatchNodes = new ArrayList<>(); TryCatchContext(WalkContext parent, TryStatement tryNode) { super(parent); for (CatchClause c : (Iterable) tryNode.catchClauses()) { Pair p = Pair.make(c.getException().resolveBinding().getType(), (Object) c); fCatchNodes.add(p); } } @Override public Collection> getCatchTargets(ITypeBinding label) { // Look for all matching targets for this thrown type: // if supertpe match, then return only matches at this catch // if subtype match, then matches here and parent matches Collection> catchNodes = new ArrayList<>(); for (Pair p : fCatchNodes) { ITypeBinding catchType = p.fst; // catchType here should NEVER be FakeExceptionTypeBinary, because these can only be thrown (not caught) by // "1/0", implicit null pointer exceptions, etc. assert !(catchNodes instanceof FakeExceptionTypeBinding) : "catchNodes instanceof FakeExceptionTypeBinary!"; if (label.isSubTypeCompatible(catchType) || label.isEqualTo(catchType)) { catchNodes.add(p); return catchNodes; // _might_ get caught } else if (catchType.isSubTypeCompatible(label)) { catchNodes.add(p); continue; } } catchNodes.addAll(parent.getCatchTargets(label)); return catchNodes; } } private class BreakContext extends DelegatingContext { protected final String label; private final ASTNode breakTo; BreakContext(WalkContext parent, String label, ASTNode breakTo) { super(parent); this.label = label; this.breakTo = breakTo; } @Override public ASTNode getBreakFor(String label) { return (label == null || label.equals(this.label)) ? breakTo : super.getBreakFor(label); } } private class LoopContext extends BreakContext { private final ASTNode continueTo; protected LoopContext(WalkContext parent, String label, ASTNode breakTo, ASTNode continueTo) { super(parent, label, breakTo); this.continueTo = continueTo; } @Override public ASTNode getContinueFor(String label) { return (label == null || label.equals(this.label)) ? continueTo : super.getContinueFor(label); } } public class MethodContext extends DelegatingContext { private final Map fEntities; private final Map labelMap = HashMapFactory.make(2); public MethodContext(WalkContext parent, Map entities) { // constructor did take: pd.procedureInstance(), memberEntities, context super(parent); fEntities = entities; } @Override public Map getLabelMap() { return labelMap; // labels are kept within a method. } final CAstSourcePositionRecorder fSourceMap = new CAstSourcePositionRecorder(); final CAstControlFlowRecorder fCFG = new CAstControlFlowRecorder(fSourceMap); final CAstNodeTypeMapRecorder fNodeTypeMap = new CAstNodeTypeMapRecorder(); @Override public CAstControlFlowRecorder cfg() { return fCFG; } @Override public void addScopedEntity(CAstNode node, CAstEntity entity) { fEntities.put(node, entity); } @Override public CAstSourcePositionRecorder pos() { return fSourceMap; } @Override public CAstNodeTypeMapRecorder getNodeTypeMap() { return fNodeTypeMap; } @Override public Collection> getCatchTargets(ITypeBinding label) { // TAGALONG (need fRuntimeExcType) // Why do we seemingly catch a RuntimeException in every method? this won't catch the RuntimeException above where // it is supposed to be caught? Collection> result = Collections.singleton(Pair. make(fRuntimeExcType, CAstControlFlowMap.EXCEPTION_TO_EXIT)); return result; } @Override public boolean needLValue() { return false; } } // //////////////////////////////////// // MAKE NODE VARIATIONS & POSITIONS (BORING) // maybe moved to different file. // makeNode() simply calls Ast.makeNode() and sets the position for the node // //////////////////////////////////// protected CAstNode makeNode(WalkContext wc, CAst Ast, ASTNode n, int kind) { CAstNode cn = Ast.makeNode(kind); setPos(wc, cn, n); return cn; } protected CAstNode makeNode(WalkContext wc, CAst Ast, ASTNode n, int kind, CAstNode c[]) { CAstNode cn = Ast.makeNode(kind, c); setPos(wc, cn, n); return cn; } protected CAstNode makeNode(WalkContext wc, CAst Ast, T pos, int kind, CAstNode c[]) { CAstNode cn = Ast.makeNode(kind, c); wc.pos().setPosition(cn, pos); return cn; } protected CAstNode makeNode(WalkContext wc, CAst Ast, ASTNode n, int kind, CAstNode c1, CAstNode c2) { CAstNode cn = Ast.makeNode(kind, c1, c2); setPos(wc, cn, n); return cn; } protected CAstNode makeNode(WalkContext wc, CAst Ast, ASTNode n, int kind, CAstNode c) { CAstNode cn = Ast.makeNode(kind, c); setPos(wc, cn, n); return cn; } protected CAstNode makeNode(WalkContext wc, CAst Ast, ASTNode n, int kind, CAstNode c1, CAstNode c2, CAstNode c3) { CAstNode cn = Ast.makeNode(kind, c1, c2, c3); setPos(wc, cn, n); return cn; } protected CAstNode makeNode(WalkContext wc, CAst Ast, ASTNode n, int kind, CAstNode c1, CAstNode c2, CAstNode c3, CAstNode c4) { CAstNode cn = Ast.makeNode(kind, c1, c2, c3, c4); setPos(wc, cn, n); return cn; } protected CAstNode makeNode(WalkContext wc, CAst Ast, T pos, int kind, CAstNode c1, CAstNode c2, CAstNode c3) { CAstNode cn = Ast.makeNode(kind, c1, c2, c3); wc.pos().setPosition(cn, pos); return cn; } protected void setPos(WalkContext wc, CAstNode cn, ASTNode jdtNode) { if (jdtNode != null) wc.pos().setPosition(cn, makePosition(jdtNode)); } public T makePosition(ASTNode n) { return makePosition(n.getStartPosition(), n.getStartPosition() + n.getLength()); } public abstract T makePosition(int start, int end); // ///////////////////////////////////////////////////////////////// // // ENUM TRANSFORMATION ////////////////////////////////////////// // ///////////////////////////////////////////////////////////////// private static final ArrayList enumQuals = new ArrayList<>(3); static { enumQuals.add(CAstQualifier.PUBLIC); enumQuals.add(CAstQualifier.STATIC); enumQuals.add(CAstQualifier.FINAL); } /** * Only called from createClassDeclaration. */ private CAstEntity visit(EnumConstantDeclaration decl) { return new FieldEntity(decl.getName().getIdentifier(), decl.resolveVariable().getType(), enumQuals, makePosition(decl .getStartPosition(), decl.getStartPosition() + decl.getLength()), null, makePosition(decl.getName())); } /** * Called only from visitFieldInitNode(node,context) */ private CAstNode createEnumConstantDeclarationInit(EnumConstantDeclaration node, WalkContext context) { String hiddenVariableName = (String) node.getProperty("com.ibm.wala.cast.java.translator.jdt.fakeValuesDeclName"); if (hiddenVariableName == null) { FieldReference fieldRef = fIdentityMapper.getFieldRef(node.resolveVariable()); // We use null to indicate an OBJECT_REF to a static field CAstNode lhsNode = makeNode(context, fFactory, node, CAstNode.OBJECT_REF, makeNode(context, fFactory, null, CAstNode.VOID), fFactory.makeConstant(fieldRef)); // CONSTRUCT ARGUMENTS & "new MyEnum(...)" statement ArrayList arguments = new ArrayList<>(); arguments.add(fFactory.makeConstant(node.getName().getIdentifier())); // name of constant arguments.add(fFactory.makeConstant(node.resolveVariable().getVariableId())); // id arguments.addAll(node.arguments()); CAstNode rhsNode = createClassInstanceCreation(node, arguments, node.resolveConstructorBinding(), null, node .getAnonymousClassDeclaration(), context); CAstNode assNode = makeNode(context, fFactory, node, CAstNode.ASSIGN, lhsNode, rhsNode); return assNode; // their naming, not mine } else { // String[] x = (new Direction[] { // NORTH, EAST, SOUTH, WEST, $VALUES, $VALUES$ // }); return null; } } private CAstEntity createEnumValueOfMethod(ITypeBinding enumType, WalkContext oldContext) { IMethodBinding met = null, superMet = null; // find our valueOf(String) for (IMethodBinding m : enumType.getDeclaredMethods()) if (m.getName().equals("valueOf") && m.getParameterTypes().length == 1 && m.getParameterTypes()[0].isEqualTo(ast.resolveWellKnownType("java.lang.String"))) met = m; // find Enum.valueOf(Class, String) for (IMethodBinding m : enumType.getSuperclass().getTypeDeclaration().getDeclaredMethods()) if (m.getName().equals("valueOf") && m.getParameterTypes().length == 2) superMet = m; assert met != null && superMet != null : "Couldn't find enum values() function in JDT bindings!"; Map memberEntities = new LinkedHashMap<>(); final MethodContext context = new MethodContext(oldContext, memberEntities); MethodDeclaration fakeMet = ast.newMethodDeclaration(); fakeMet.setName(ast.newSimpleName("valueOf")); fakeMet.setSourceRange(-1, 0); fakeMet.setBody(ast.newBlock()); SingleVariableDeclaration stringS = ast.newSingleVariableDeclaration(); stringS.setName(ast.newSimpleName("s")); fakeMet.parameters().add(stringS); // TODO: probably uses reflection so isn't very useful for analyses. Is there something more useful we could put in here? // return (MyEnum)Enum.valueOf(MyEnum.class, s); // cast(call(type_literal, var))) CAstNode typeLit = makeNode(context, fFactory, fakeMet, CAstNode.TYPE_LITERAL_EXPR, fFactory.makeConstant(fIdentityMapper .typeToTypeID(enumType))); CAstNode stringSvar = makeNode(context, fFactory, fakeMet, CAstNode.VAR, fFactory.makeConstant("s"), fFactory.makeConstant(fTypeDict.getCAstTypeFor(ast.resolveWellKnownType("java.lang.String")))); ArrayList args = new ArrayList<>(); args.add(typeLit); args.add(stringSvar); CAstNode call = createMethodInvocation(fakeMet, superMet, makeNode(context, fFactory, fakeMet, CAstNode.VOID), args, context); CAstNode cast = createCast(fakeMet, call, enumType, superMet.getReturnType(), context); CAstNode bodyNode = makeNode(context, fFactory, fakeMet, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, fakeMet, CAstNode.BLOCK_STMT, makeNode(context, fFactory, fakeMet, CAstNode.RETURN, cast))); ArrayList paramTypes = new ArrayList<>(1); paramTypes.add(fTypeDict.getCAstTypeFor(ast.resolveWellKnownType("java.lang.String"))); return new ProcedureEntity(bodyNode, fakeMet, enumType, memberEntities, context, paramTypes, enumType, met.getModifiers(), handleAnnotations(met)); } private CAstEntity createEnumValuesMethod(ITypeBinding enumType, ArrayList constants, WalkContext oldContext) { IMethodBinding met = null; for (IMethodBinding m : enumType.getDeclaredMethods()) if (m.getName().equals("values") && m.getParameterTypes().length == 0) met = m; assert met != null : "Couldn't find enum values() function in JDT bindings!"; Map memberEntities = new LinkedHashMap<>(); final MethodContext context = new MethodContext(oldContext, memberEntities); MethodDeclaration fakeMet = ast.newMethodDeclaration(); fakeMet.setName(ast.newSimpleName("values")); fakeMet.setSourceRange(-1, 0); fakeMet.setBody(ast.newBlock()); // make enum constant values array: new MyEnum() { MYENUMCST1, MYENUMCST2, ... } CAstNode[] eltNodes = new CAstNode[constants.size() + 1]; int idx = 0; TypeReference arrayTypeRef = fIdentityMapper.getTypeRef(enumType.createArrayType(1)); eltNodes[idx++] = makeNode(context, fFactory, fakeMet, CAstNode.NEW, fFactory.makeConstant(arrayTypeRef), fFactory .makeConstant(constants.size())); for (IVariableBinding cst : constants) eltNodes[idx++] = createFieldAccess(makeNode(context, fFactory, fakeMet, CAstNode.VOID), cst.getName(), cst, fakeMet, context); CAstNode bodyNode = makeNode(context, fFactory, fakeMet, CAstNode.LOCAL_SCOPE, makeNode(context, fFactory, fakeMet, CAstNode.BLOCK_STMT, makeNode(context, fFactory, fakeMet, CAstNode.RETURN, makeNode(context, fFactory, fakeMet, CAstNode.ARRAY_LITERAL, eltNodes)))); ArrayList paramTypes = new ArrayList<>(0); return new ProcedureEntity(bodyNode, fakeMet, enumType, memberEntities, context, paramTypes, enumType.createArrayType(1), met .getModifiers(), handleAnnotations(enumType)); } private void doEnumHiddenEntities(ITypeBinding typeBinding, List memberEntities, WalkContext context) { // PART I: create a $VALUES field // collect constants // ArrayList constants = new ArrayList(); // for ( ASTNode n: staticInits ) // if ( n instanceof EnumConstantDeclaration ) // constants.add(((EnumConstantDeclaration)n).getName().getIdentifier()); // figure out a suitable untaken name // String hiddenFieldName = "hidden values field"; // illegal name // // public static final MyEnum[] $VALUES; // memberEntities.add(new FieldEntity(hiddenFieldName, // typeBinding.createArrayType(1), enumQuals, // makePosition(-1,-1))); // // EnumConstantDeclaration fakeValuesDecl = ast.newEnumConstantDeclaration(); // // pass along values that we will use in createEnumConstantDeclarationInit() in creating static initializer // fakeValuesDecl.setProperty("com.ibm.wala.cast.java.translator.jdt.fakeValuesDeclName", hiddenFieldName); // fakeValuesDecl.setProperty("com.ibm.wala.cast.java.translator.jdt.fakeValuesDeclConstants", constants); // staticInits.add(fakeValuesDecl); ArrayList constants = new ArrayList<>(); for (IVariableBinding var : typeBinding.getDeclaredFields()) if (var.isEnumConstant()) constants.add(var); // constants are unsorted by default Collections.sort(constants, (arg0, arg1) -> arg0.getVariableId() - arg1.getVariableId()); // PART II: create values() memberEntities.add(createEnumValuesMethod(typeBinding, constants, context)); // PART III: create valueOf() memberEntities.add(createEnumValueOfMethod(typeBinding, context)); } private CAstEntity visit(EnumDeclaration n, WalkContext context) { // JDT contains correct type info / class / subclass info for the enum return createClassDeclaration(n, n.bodyDeclarations(), n.enumConstants(), n.resolveBinding(), n.getName().getIdentifier(), n .resolveBinding().getModifiers(), false, false, context, makePosition(n.getName())); } /** * @param n for positioning. */ private CAstEntity createEnumConstructorWithParameters(IMethodBinding ctor, ASTNode n, WalkContext oldContext, ArrayList inits, MethodDeclaration nonDefaultCtor) { // PART I: find super ctor to call ITypeBinding newType = ctor.getDeclaringClass(); ITypeBinding javalangenumType = newType.getSuperclass(); IMethodBinding superCtor = null; if (newType.isEnum()) { for (IMethodBinding met : javalangenumType.getDeclaredMethods()) if (met.isConstructor()) { superCtor = met; break; } } assert superCtor != null : "enum"; // PART II: make ctor with simply "super(a,b,c...)" // TODO: extra CAstNodes final Map memberEntities = new LinkedHashMap<>(); final MethodContext context = new MethodContext(oldContext, memberEntities); MethodDeclaration fakeCtor = ast.newMethodDeclaration(); fakeCtor.setConstructor(true); fakeCtor.setSourceRange(n.getStartPosition(), n.getLength()); fakeCtor.setBody(ast.newBlock()); // PART IIa: make a fake JDT constructor method with the proper number of args // Make fake args that will be passed String[] fakeArguments = new String[3 + ctor.getParameterTypes().length]; if (nonDefaultCtor == null) { for (int i = 3; i < fakeArguments.length; i++) fakeArguments[i] = "__wala_jdtcast_argument" + i; // this is in the case of an anonymous class with parameters, eg NORTH in // the following example: public enum A { NORTH("south") { ...} A(String // s){} } } else { for (int i = 3; i < fakeArguments.length; i++) fakeArguments[i] = ((SingleVariableDeclaration) nonDefaultCtor.parameters().get(i - 3)).getName().getIdentifier(); } ArrayList paramTypes = new ArrayList<>(superCtor.getParameterTypes().length); fakeArguments[0] = "this"; fakeArguments[1] = "__wala_jdtcast_argument1"; // TODO FIXME: change to invalid name in the case that nonDefaultCtor != null fakeArguments[2] = "__wala_jdtcast_argument2"; // otherwise there will be conflicts if we name our variable // __wala_jdtcast_argument1!!! for (int i = 1; i < fakeArguments.length; i++) { // the name SingleVariableDeclaration svd = ast.newSingleVariableDeclaration(); svd.setName(ast.newSimpleName(fakeArguments[i])); fakeCtor.parameters().add(svd); // the type if (i == 1) paramTypes.add(fTypeDict.getCAstTypeFor(ast.resolveWellKnownType("java.lang.String"))); else if (i == 2) paramTypes.add(fTypeDict.getCAstTypeFor(ast.resolveWellKnownType("int"))); else paramTypes.add(fTypeDict.getCAstTypeFor(ctor.getParameterTypes()[i - 3])); } // PART IIb: create the statements in the constructor // one super() call plus the inits CAstNode[] bodyNodes; if (nonDefaultCtor == null) bodyNodes = new CAstNode[inits.size() + 1]; else bodyNodes = new CAstNode[inits.size() + 2]; // make super(...) call // this, call ref, args CAstNode[] children; if (ctor.isDefaultConstructor()) children = new CAstNode[4 + ctor.getParameterTypes().length]; // anonymous class' implicit constructors call constructors with // more than standard two enum args else children = new CAstNode[4]; // explicit constructor children[0] = makeNode(context, fFactory, n, CAstNode.SUPER); CallSiteReference callSiteRef = CallSiteReference.make(0, fIdentityMapper.getMethodRef(superCtor), IInvokeInstruction.Dispatch.SPECIAL); children[1] = fFactory.makeConstant(callSiteRef); children[2] = makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(fakeArguments[1]), fFactory.makeConstant(paramTypes.get(0))); children[3] = makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(fakeArguments[2]), fFactory.makeConstant(paramTypes.get(1))); if (ctor.isDefaultConstructor()) for (int i = 0; i < ctor.getParameterTypes().length; i++) children[i + 4] = makeNode(context, fFactory, n, CAstNode.VAR, fFactory.makeConstant(fakeArguments[i + 3]), fFactory.makeConstant(paramTypes.get(i+2))); bodyNodes[0] = makeNode(context, fFactory, n, CAstNode.CALL, children); // QUESTION: no handleExceptions? for (int i = 0; i < inits.size(); i++) bodyNodes[i + 1] = visitFieldInitNode(inits.get(i), context); if (nonDefaultCtor != null) bodyNodes[bodyNodes.length - 1] = visitNode(nonDefaultCtor.getBody(), context); // finally, make the procedure entity CAstNode ast = makeNode(context, fFactory, n, CAstNode.BLOCK_STMT, bodyNodes); return new ProcedureEntity(ast, fakeCtor, newType, memberEntities, context, paramTypes, null, handleAnnotations(ctor)); } } JDTTypeDictionary.java000066400000000000000000000156231342410422700333730ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/jdt/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package com.ibm.wala.cast.java.translator.jdt; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ITypeBinding; import com.ibm.wala.cast.java.types.JavaPrimitiveTypeMap; import com.ibm.wala.cast.java.types.JavaType; import com.ibm.wala.cast.tree.CAstQualifier; import com.ibm.wala.cast.tree.CAstType; import com.ibm.wala.cast.tree.impl.CAstTypeDictionaryImpl; import com.ibm.wala.util.debug.Assertions; public class JDTTypeDictionary extends CAstTypeDictionaryImpl { // TODO: better way of getting type "ObjecT" that doesn't require us to keep AST? although this is similar to // polyglot. protected final AST fAst; // TAGALONG protected final JDTIdentityMapper fIdentityMapper; // TAGALONG /** * * @param ast Needed to get root type "java.lang.Object" */ public JDTTypeDictionary(AST ast, JDTIdentityMapper identityMapper) { fAst = ast; fIdentityMapper = identityMapper; } @Override public CAstType getCAstTypeFor(Object astType) { ITypeBinding jdtType = JDT2CAstUtils.getErasedType((ITypeBinding) astType, fAst); CAstType type = super.getCAstTypeFor(astType); // check cache first // Handle the case where we haven't seen an AST decl for some type before // processing a reference. This can certainly happen with classes in byte- // code libraries, for which we never see an AST decl. // In this case, just create a new type and return that. if (type == null) { if (jdtType.isClass() || jdtType.isEnum() || jdtType.isInterface()) // in JDT interfaces are not classes type = new JdtJavaType(jdtType); else if (jdtType.isPrimitive()) { type = JavaPrimitiveTypeMap.lookupType(jdtType.getName()); } else if (jdtType.isArray()) { type = new JdtJavaArrayType(jdtType); } else Assertions.UNREACHABLE("getCAstTypeFor() passed type that is not primitive, array, or class?"); super.map((ITypeBinding)astType, type); // put in cache } return type; } private final class JdtJavaArrayType implements CAstType.Array { private final ITypeBinding fEltJdtType; private final CAstType fEltCAstType; private JdtJavaArrayType(ITypeBinding arrayType) { super(); fEltJdtType = arrayType.getComponentType(); fEltCAstType = getCAstTypeFor(fEltJdtType); } @Override public int getNumDimensions() { return 1; // always 1 for Java } @Override public CAstType getElementType() { return fEltCAstType; } @Override public String getName() { return '[' + fEltCAstType.getName(); } @Override public Collection getSupertypes() { if (fEltJdtType.isPrimitive()) return Collections.singleton(getCAstTypeFor(fAst.resolveWellKnownType("java.lang.Object"))); // TODO: there is no '.isReference()' as in Polyglot: is this right? enum? I think if it's another array it will // just ignore it // TEST DOUBLE ARRAYS! and maybe ask someone? assert fEltJdtType.isArray() || fEltJdtType.isClass() : "Non-primitive, non-reference array element type!"; Collection supers = new ArrayList<>(); for (ITypeBinding type : fEltJdtType.getInterfaces()) { supers.add(getCAstTypeFor(type)); } if (fEltJdtType.getSuperclass() != null) supers.add(getCAstTypeFor(fEltJdtType.getSuperclass())); return supers; } } public final class JdtJavaType implements JavaType { private final ITypeBinding fType; private Collection fSuperTypes = null; @Override public String toString() { return super.toString() + ':' + getName(); } public JdtJavaType(ITypeBinding type) { super(); fType = type; } @Override public String getName() { return fIdentityMapper.getTypeRef(fType).getName().toString(); } @Override public Collection getSupertypes() { if (fSuperTypes == null) { buildSuperTypes(); } return fSuperTypes; } private void buildSuperTypes() { // TODO this is a source entity, but it might actually be the root type // (Object), so assume # intfs + 1 ITypeBinding superType = (fType.getSuperclass() == null) ? fAst.resolveWellKnownType("java.lang.Object") : fType .getSuperclass(); int N = fType.getInterfaces().length + 1; fSuperTypes = new ArrayList<>(N); // Following assumes that noone can call getSupertypes() before we have // created CAstType's for every type in the program being analyzed. fSuperTypes.add(getCAstTypeFor(superType)); for (ITypeBinding t : fType.getInterfaces()) fSuperTypes.add(getCAstTypeFor(t)); } @Override public Collection getQualifiers() { return JDT2CAstUtils.mapModifiersToQualifiers(fType.getModifiers(), fType.isInterface(), fType.isAnnotation()); } @Override public boolean isInterface() { return fType.isInterface(); } } } WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/jdt/ecj/000077500000000000000000000000001342410422700300305ustar00rootroot00000000000000ECJClassLoaderFactory.java000066400000000000000000000027451342410422700346720ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/jdt/ecjpackage com.ibm.wala.cast.java.translator.jdt.ecj; import java.io.IOException; import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope; import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl; import com.ibm.wala.classLoader.ClassLoaderFactoryImpl; import com.ibm.wala.classLoader.ClassLoaderImpl; import com.ibm.wala.classLoader.IClassLoader; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.util.config.SetOfClasses; public class ECJClassLoaderFactory extends ClassLoaderFactoryImpl { public ECJClassLoaderFactory(SetOfClasses exclusions) { super(exclusions); } // TODO remove code duplication with JDTClassLoaderFactory @Override protected IClassLoader makeNewClassLoader(ClassLoaderReference classLoaderReference, IClassHierarchy cha, IClassLoader parent, AnalysisScope scope) throws IOException { if (classLoaderReference.equals(JavaSourceAnalysisScope.SOURCE)) { ClassLoaderImpl cl = makeSourceLoader(classLoaderReference, cha, parent); cl.init(scope.getModules(classLoaderReference)); return cl; } else { return super.makeNewClassLoader(classLoaderReference, cha, parent, scope); } } protected JavaSourceLoaderImpl makeSourceLoader(ClassLoaderReference classLoaderReference, IClassHierarchy cha, IClassLoader parent) { return new ECJSourceLoaderImpl(classLoaderReference, parent, cha, false); } } ECJSourceLoaderImpl.java000066400000000000000000000053631342410422700343560ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/jdt/ecj/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package com.ibm.wala.cast.java.translator.jdt.ecj; import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl; import com.ibm.wala.cast.java.translator.SourceModuleTranslator; import com.ibm.wala.classLoader.IClassLoader; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.types.ClassLoaderReference; public class ECJSourceLoaderImpl extends JavaSourceLoaderImpl { private final boolean dump; public ECJSourceLoaderImpl(ClassLoaderReference loaderRef, IClassLoader parent, IClassHierarchy cha) { this(loaderRef, parent, cha, false); } public ECJSourceLoaderImpl(ClassLoaderReference loaderRef, IClassLoader parent, IClassHierarchy cha, boolean dump) { super(loaderRef, parent, cha); this.dump = dump; } @Override protected SourceModuleTranslator getTranslator() { return new ECJSourceModuleTranslator(cha.getScope(), this, dump); } } ECJSourceModuleTranslator.java000066400000000000000000000202341342410422700356170ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.ecj/src/com/ibm/wala/cast/java/translator/jdt/ecj/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package com.ibm.wala.cast.java.translator.jdt.ecj; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.Hashtable; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.compiler.IProblem; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTParser; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.FileASTRequestor; import com.ibm.wala.cast.java.translator.Java2IRTranslator; import com.ibm.wala.cast.java.translator.SourceModuleTranslator; import com.ibm.wala.cast.java.translator.jdt.JDTJava2CAstTranslator; import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position; import com.ibm.wala.cast.tree.impl.RangePosition; import com.ibm.wala.classLoader.DirectoryTreeModule; import com.ibm.wala.classLoader.JarFileModule; import com.ibm.wala.classLoader.JarStreamModule; import com.ibm.wala.classLoader.Module; import com.ibm.wala.classLoader.ModuleEntry; import com.ibm.wala.classLoader.SourceFileModule; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.collections.Pair; import com.ibm.wala.util.config.SetOfClasses; import com.ibm.wala.util.io.TemporaryFile; /** * A SourceModuleTranslator whose implementation of loadAllSources() uses the PolyglotFrontEnd pseudo-compiler to generate DOMO IR * for the sources in the compile-time classpath. * * @author rfuhrer */ // remove me comment: Jdt little-case = not OK, upper case = OK public class ECJSourceModuleTranslator implements SourceModuleTranslator { private final class ECJAstToIR extends FileASTRequestor { private final Map sourceMap; public ECJAstToIR(Map sourceMap) { this.sourceMap = sourceMap; } @Override public void acceptAST(String source, CompilationUnit ast) { JDTJava2CAstTranslator jdt2cast = makeCAstTranslator(ast, source); final Java2IRTranslator java2ir = makeIRTranslator(); java2ir.translate(sourceMap.get(source), jdt2cast.translateToCAst()); if (! "true".equals(System.getProperty("wala.jdt.quiet"))) { IProblem[] problems = ast.getProblems(); int length = problems.length; if (length > 0) { StringBuilder buffer = new StringBuilder(); for (int i = 0; i < length; i++) { buffer.append(problems[i].getMessage()); buffer.append('\n'); } if (length != 0) System.err.println("Unexpected problems in " + source + "\n " + buffer); } } } } protected boolean dump; protected ECJSourceLoaderImpl sourceLoader; private final String[] sources; private final String[] libs; private final SetOfClasses exclusions; public ECJSourceModuleTranslator(AnalysisScope scope, ECJSourceLoaderImpl sourceLoader) { this(scope, sourceLoader, false); } public ECJSourceModuleTranslator(AnalysisScope scope, ECJSourceLoaderImpl sourceLoader, boolean dump) { this.sourceLoader = sourceLoader; this.dump = dump; Pair paths = computeClassPath(scope); sources = paths.fst; libs = paths.snd; this.exclusions = scope.getExclusions(); } private static Pair computeClassPath(AnalysisScope scope) { List sources = new LinkedList<>(); List libs = new LinkedList<>(); for (ClassLoaderReference cl : scope.getLoaders()) { while (cl != null) { List modules = scope.getModules(cl); for (Module m : modules) { if (m instanceof JarFileModule) { JarFileModule jarFileModule = (JarFileModule) m; libs.add(jarFileModule.getAbsolutePath()); } else if (m instanceof JarStreamModule) { try { File F = File.createTempFile("tmp", "jar"); F.deleteOnExit(); TemporaryFile.streamToFile(F, ((JarStreamModule)m)); libs.add(F.getAbsolutePath()); } catch (IOException e) { assert false : e; } } else if (m instanceof DirectoryTreeModule) { DirectoryTreeModule directoryTreeModule = (DirectoryTreeModule) m; sources.add(directoryTreeModule.getPath()); } else { //Assertions.UNREACHABLE("Module entry is neither jar file nor directory"); } } cl = cl.getParent(); } } return Pair.make(sources.toArray(new String[0]), libs.toArray(new String[0])); } /* * Project -> AST code from org.eclipse.jdt.core.tests.performance */ @Override public void loadAllSources(Set modules) { List sources = new LinkedList<>(); Map sourceMap = HashMapFactory.make(); for(ModuleEntry m : modules) { if (m.isSourceFile()) { SourceFileModule s = (SourceFileModule)m; sourceMap.put(s.getAbsolutePath(), s); sources.add(s.getAbsolutePath()); } } String[] sourceFiles = sources.toArray(new String[0]); @SuppressWarnings("deprecation") final ASTParser parser = ASTParser.newParser(AST.JLS8); parser.setResolveBindings(true); parser.setEnvironment(libs, this.sources, null, false); Hashtable options = JavaCore.getOptions(); options.put(JavaCore.COMPILER_SOURCE, "1.8"); parser.setCompilerOptions(options); parser.createASTs(sourceFiles, null, new String[0], new ECJAstToIR(sourceMap), new NullProgressMonitor()); } protected Java2IRTranslator makeIRTranslator() { return new Java2IRTranslator(sourceLoader, exclusions); } protected JDTJava2CAstTranslator makeCAstTranslator(CompilationUnit cu, String fullPath) { return new JDTJava2CAstTranslator(sourceLoader, cu, fullPath, false, dump) { @Override public Position makePosition(int start, int end) { try { return new RangePosition(new URL("file://" + fullPath), this.cu.getLineNumber(start), start, end); } catch (MalformedURLException e) { throw new RuntimeException("bad file: " + fullPath, e); } } }; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/000077500000000000000000000000001342410422700205305ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/.externalToolBuilders/000077500000000000000000000000001342410422700247605ustar00rootroot00000000000000java.test.data JLex download.launch000066400000000000000000000022051342410422700333160ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/.externalToolBuilders WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/.settings/000077500000000000000000000000001342410422700224465ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/.settings/org.eclipse.jdt.core.prefs000066400000000000000000000752621342410422700274440ustar00rootroot00000000000000eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.problem.APILeak=error org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=ignore org.eclipse.jdt.core.compiler.problem.deadCode=ignore org.eclipse.jdt.core.compiler.problem.deprecation=error org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error org.eclipse.jdt.core.compiler.problem.noEffectAssignment=ignore org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=ignore org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=error org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.terminalDeprecation=error org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=ignore org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=132 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/.settings/org.eclipse.pde.prefs000066400000000000000000000020161342410422700264670ustar00rootroot00000000000000compilers.f.unresolved-features=1 compilers.f.unresolved-plugins=1 compilers.incompatible-environment=1 compilers.p.build=1 compilers.p.build.bin.includes=1 compilers.p.build.encodings=1 compilers.p.build.java.compiler=0 compilers.p.build.java.compliance=1 compilers.p.build.missing.output=1 compilers.p.build.output.library=1 compilers.p.build.source.library=1 compilers.p.build.src.includes=1 compilers.p.deprecated=1 compilers.p.discouraged-class=1 compilers.p.internal=1 compilers.p.missing-packages=2 compilers.p.missing-version-export-package=1 compilers.p.missing-version-import-package=1 compilers.p.missing-version-require-bundle=1 compilers.p.no-required-att=0 compilers.p.not-externalized-att=1 compilers.p.unknown-attribute=1 compilers.p.unknown-class=1 compilers.p.unknown-element=1 compilers.p.unknown-identifier=1 compilers.p.unknown-resource=1 compilers.p.unresolved-ex-points=0 compilers.p.unresolved-import=0 compilers.s.create-docs=false compilers.s.doc-folder=doc compilers.s.open-tags=1 eclipse.preferences.version=1 WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/.settings/org.eclipse.wst.validation.prefs000066400000000000000000000021521342410422700306660ustar00rootroot00000000000000DELEGATES_PREFERENCE=delegateValidatorList USER_BUILD_PREFERENCE=enabledBuildValidatorList USER_MANUAL_PREFERENCE=enabledManualValidatorList USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600 eclipse.preferences.version=1 override=true suspend=false vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03 vals/org.eclipse.wst.xml.core.xml/groups=0107include05111contentType128org.eclipse.core.runtime.xmlT111contentType134org.eclipse.wst.xml.core.xmlsourceT111contentType134org.eclipse.wst.xml.core.xslsourceT111contentType134org.eclipse.jst.jsp.core.tldsourceT07fileext03xmlF0107exclude08113projectNature134org.eclipse.jst.j2ee.ejb.EJBNature113projectNature130org.eclipse.jst.j2ee.EARNature04file08.projectT0104file110.classpathT0104file110.settings/T0204file122target/p2artifacts.xmlT0304file120target/p2content.xmlT0304file128target/antrun/build-main.xmlT03 vf.version=3 WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/Java60RegressionExclusions.txt000066400000000000000000000001201342410422700264270ustar00rootroot00000000000000java\/awt\/.* javax\/swing\/.* sun\/awt\/.* sun\/swing\/.* com\/sun\/.* sun\/.* WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/META-INF/000077500000000000000000000000001342410422700216705ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/META-INF/.zip000066400000000000000000011472261342410422700225100ustar00rootroot00000000000000PK ZZZpȨm(S(6MZړଊ C:p#Q\UO:Qʑx9'.S^kyG.uZ^m!Z*FPHeܗo_Zz G]}Ш7PK ZI .bin/alreadywalaunittests/InnerClassAA$AA.classUT l(T *Tux V[S[U6$xrI[&FcbS mRs>9C;>A 32s:p^;k?0=AYrLd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+`6fϽR[E*6k=Jc* ?gwqώLS>r)#CӹpW2" Qxb[VWcBbp-SXHsEQUZ]4%pb,YƁ,?BUz-T[^S%eO`q0 9&ܸPX UUn7U Ncҩq!&y7!i R&*lQ Uo򚲦ӆ9* )!-aD}:kZ``cU -s k0#(Pd`(V U)LK쬀~+7B'7țg#HTI x1繍syD.6u*Ed*:y:YҸVxlE>ơBG۫ѹhr@\iԍY {ȗT^•AEΒק{ÜDgA x7" Ac s}U'|&r%GFphl );Yy%$, @7J~_)TFip'{5/m%W ڃC2Rc7K>lK PZʳ, Iko(36J"f{fWᓱ.@*3X.Ⳇ_q"yDo G7`]G3=@B?n 壆pȅ! %v tqR" _Ht2 gOҐv8i.!ruQ [ bʼ b&=c!?ő[=0Q$v^T{HP$\`ὓNOt_Ϩcj8>KM Xru^]r3FЬnl {-nd1Fg_쟒SPK Zbin/A.classUTl(Tux PK ZI .bin/alreadywalaunittests/InnerClassAA$AA.classUTl(Tux PKZ0`2 bin/alreadywalaunittests/InnerClassAA$AB$ABA.classUTl(Tux PKZJ3*bin/ArrayLiteral1.classUTl(Tux PKZ0bin/BadLanguageExceptionF1.classUTl(Tux PKZ@,,ibin/foo/bar/hello/world/InnerClasses$1.classUTl(Tux PKZ6fbin/FooEx2.classUTl(Tux PKZbin/javaonepointfive/OverridesOnePointFour$Super.classUTl(Tux PKZsrc/Exception2.javaUTTux PK,U+EJc-Dٽsrc/Finally1.javaUTTux PK,U+E}*src/Finally2.javaUTTux PK ,U+EAOsrc/foo/UTTux PK ,U+E Asrc/foo/bar/UTTux PK ,U+EAsrc/foo/bar/hello/UTTux PK ,U+EA#src/foo/bar/hello/world/UTTux PK,U+E#D[ *usrc/foo/bar/hello/world/ArraysAndSuch.javaUTTux PK,U+E28< 8lsrc/foo/bar/hello/world/ConstructorsAndInitializers.javaUTTux PK,U+ED\$1^src/foo/bar/hello/world/CopyOfLoopsAndLabels.javaUTTux PK,U+E-h:7%src/foo/bar/hello/world/DefaultCtorInitializerTest.javaUTTux PK,U+En8BL)Hsrc/foo/bar/hello/world/InnerClasses.javaUTTux PK,U+ETFg +src/foo/bar/hello/world/LoopsAndLabels.javaUTTux PK,U+EMhYD*(src/foo/bar/hello/world/MethodMadness.javaUTTux PK,U+EzUQQ*src/foo/bar/hello/world/MiniaturList2.javaUTTux PK,U+Ea1 !src/foo/bar/hello/world/Misc.javaUTTux PK,U+EC 'src/foo/bar/hello/world/SwitchCase.javaUTTux PK,U+Eun src/foo/QualifiedNames.javaUTTux PK,U+EwT> Psrc/foo/SimpleNames.javaUTTux PK,U+E])src/FunkySupers.javaUTTux PK,U+Et@ src/Inheritance1.javaUTTux PK,U+EDI src/InheritedField.javaUTTux PK,U+Et^ src/InnerClass.javaUTTux PK,U+E, { 6src/InnerClassA.javaUTTux PK,U+E7 ,src/InnerClassLexicalReads.javaUTTux PK,U+EÏ5yRsrc/InnerClassSuper.javaUTTux PK,U+EC=src/InterfaceTest1.javaUTTux PK ,U+EA+src/javaonepointfive/UTTux PK,U+E>=%zsrc/javaonepointfive/Annotations.javaUTTux PK,U+E\Bv /src/javaonepointfive/AnonGeneNullarySimple.javaUTTux PK,U+Ez +B%src/javaonepointfive/AnonymousGenerics.javaUTTux PK,U+E%8$(+src/javaonepointfive/BasicsGenerics.javaUTTux PK,U+E.Cz %2src/javaonepointfive/Cocovariant.javaUTTux PK,U+E^1 G167src/javaonepointfive/CustomGenericsAndFields.javaUTTux PK,U+Ei X $>src/javaonepointfive/EnumSwitch.javaUTTux PK,U+E*]Vi ,Dsrc/javaonepointfive/ExplicitBoxingTest.javaUTTux PK,U+EF$;' 'Isrc/javaonepointfive/GenericArrays.javaUTTux PK,U+E>  .,Osrc/javaonepointfive/GenericMemberClasses.javaUTTux PK,U+E'x *Tsrc/javaonepointfive/GenericSuperSink.javaUTTux PK,U+E>!8!$ (Ysrc/javaonepointfive/MethodGenerics.javaUTTux PK,U+E3" 0j_src/javaonepointfive/MoreOverriddenGenerics.javaUTTux PK,U+E`@ *dsrc/javaonepointfive/NotSoSimpleEnums.javaUTTux PK,U+E08  /pjsrc/javaonepointfive/OverridesOnePointFour.javaUTTux PK,U+EG %osrc/javaonepointfive/SimpleEnums.javaUTTux PK,U+E`3l &tsrc/javaonepointfive/SimpleEnums2.javaUTTux PK,U+EF\6~zsrc/javaonepointfive/TypeInferencePrimAndStringOp.javaUTTux PK,U+E׈)ha- !J|src/javaonepointfive/Varargs.javaUTTux PK,U+EFuc *src/javaonepointfive/VarargsCovariant.javaUTTux PK,U+EE +4src/javaonepointfive/VarargsOverriding.javaUTTux PK,U+EZ29. #ތsrc/javaonepointfive/Wildcards.javaUTTux PK Q,E Atsrc/JLex/UT Tux PKQ,E̗^ src/JLex/Main.javaUT Tux PK,U+EfW#+src/LocalClass.javaUTTux PK,U+EIU9-src/MiniaturList.javaUTTux PK,U+Evx/src/MiniaturSliceBug.javaUTTux PK,U+EWY'3src/Monitor.javaUTTux PK,U+EQ~4src/Monitor2.javaUTTux PK,U+EU56src/NullArrayInit.javaUTTux PK ,U+EAr8src/p/UTTux PK,U+E|'Y8src/p/NonPrimaryTopLevel.javaUTTux PK,U+Ej,db:src/QualifiedStatic.javaUTTux PK,U+E71;d<src/Scoping1.javaUTTux PK,U+E1p=src/Scoping2.javaUTTux PK,U+E3?src/Simple1.javaUTTux PK,U+E&Asrc/SimpleCalls.javaUTTux PK,U+EP$Csrc/StaticInitializers.javaUTTux PK,U+E#jmEsrc/StaticNesting.javaUTTux PK,U+E?[VGsrc/Switch1.javaUTTux PK,U+E)ΐNJsrc/Thread1.javaUTTux PK,U+Ew!Ksrc/TwoClasses.javaUTTux PK,U+EQ}1INsrc/WelcomeInitializers.javaUTTux PK,U+EZ͞nPsrc/WhileTest1.javaUTTux PK<<y|RWALA-R_1.5.1/com.ibm.wala.cast.java.test.data/META-INF/MANIFEST.MF000066400000000000000000000003441342410422700233230ustar00rootroot00000000000000Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.ibm.wala.cast.java.test.data Bundle-Version: 1.5.1 Bundle-Vendor: %Bundle-Vendor Bundle-RequiredExecutionEnvironment: JavaSE-1.8 WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/OSGI-INF/000077500000000000000000000000001342410422700217035ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/OSGI-INF/l10n/000077500000000000000000000000001342410422700224555ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/OSGI-INF/l10n/bundle.properties000066400000000000000000000001441342410422700260430ustar00rootroot00000000000000#Properties file for com.ibm.wala.cast.java.test.data Bundle-Vendor = IBM Bundle-Name = Data Plug-inWALA-R_1.5.1/com.ibm.wala.cast.java.test.data/build.gradle000066400000000000000000000014761342410422700230170ustar00rootroot00000000000000plugins { id 'eclipse' } sourceSets.test.java.srcDirs = ['src'] //////////////////////////////////////////////////////////////////////// // // download JLex // task downloadJLex(type: VerifiedDownload) { src 'http://www.cs.princeton.edu/~appel/modern/java/JLex/current/Main.java' checksum 'fe0cff5db3e2f0f5d67a153cf6c783af' dest 'src/JLex/Main.java' } task cleanDownloadJLex(type: Delete) { delete downloadJLex.dest.parent } compileTestJava.dependsOn downloadJLex clean.dependsOn cleanDownloadJLex //////////////////////////////////////////////////////////////////////// // // create Eclipse metadata for use by Maven when running // com.ibm.wala.cast.java.test.JDTJavaIRTests and // com.ibm.wala.cast.java.test.JDTJava15IRTests tests // task prepareMavenBuild(dependsOn: [eclipseClasspath, eclipseProject]) { } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/build.properties000066400000000000000000000002641342410422700237470ustar00rootroot00000000000000source.. = src/ output.. = bin/ bin.includes = META-INF/,\ .,\ OSGI-INF/l10n/bundle.properties,\ OSGI-INF/ javacProjectSettings = true WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/build.xml000066400000000000000000000077651342410422700223700ustar00rootroot00000000000000 WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/pom.xml000066400000000000000000000026171342410422700220530ustar00rootroot00000000000000 4.0.0 com.ibm.wala WALA 1.5.1 com.ibm.wala.cast.java.test.data eclipse-plugin maven-antrun-plugin 1.7 process-resources run com.sun tools 1.7 system ${java.home}/../lib/tools.jar WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/000077500000000000000000000000001342410422700213175ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/AnonymousClass.java000066400000000000000000000030551342410422700251430ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class AnonymousClass { private interface Foo { public int getValue(); public int getValueBase(); } public static void main(String[] args) { final Integer base = Integer.valueOf(6); Foo f= new Foo() { int value = 3; @Override public int getValue() { return value; } @Override public int getValueBase() { return value - base.intValue(); } }; System.out.println(f.getValue()); System.out.println(f.getValueBase()); (new AnonymousClass()).method(); } public void method() { final Integer base = Integer.valueOf(7); abstract class FooImpl implements Foo { int y; @Override public abstract int getValue(); FooImpl(int _y) { y = _y; } @Override public int getValueBase() { return y + getValue() - base.intValue(); } } Foo f= new FooImpl(-4) { @Override public int getValue() { return 7; } }; System.out.println(f.getValue()); System.out.println(f.getValueBase()); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Array1.java000066400000000000000000000014741342410422700233270ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Array1 { public static void main(String[] args) { Array1 f= new Array1(); f.foo(); } public void foo() { int[] ary = new int[5]; for(int i= 0; i < ary.length; i++) { ary[i]= i; } int sum = 0; for(int j= 0; j < ary.length; j++) { sum += ary[j]; } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/ArrayLiteral1.java000066400000000000000000000014271342410422700246420ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class ArrayLiteral1 { public static void main(String[] args) { ArrayLiteral1 al1= new ArrayLiteral1(); int[] a= new int[] { 0, 1, 2, 3, 5 }; Object[] b= new Object[] { null, "hi", Integer.valueOf(55), new int[] { 3, 1, 4 } }; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/ArrayLiteral2.java000066400000000000000000000012631342410422700246410ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class ArrayLiteral2 { public static void main(String[] args) { ArrayLiteral2 al2= new ArrayLiteral2(); int[] x= {}; int[] y= { 1, 2, 3, 4 }; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Breaks.java000066400000000000000000000023511342410422700233720ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Breaks { private static class Ref { String[] classes; String[] getClasses() { return classes; } private Ref(String[] classes) { this.classes = classes; } } private void testBreakFromIf(String objectClass, Ref reference) { objectClassCheck: if (objectClass != null) { String[] classes = reference.getClasses(); int size = classes.length; for (int i = 0; i < size; i++) { if (classes[i] == objectClass) break objectClassCheck; } return; } if (objectClass == null) { reference.classes = null; } } public static void main(String[] args) { (new Breaks()).testBreakFromIf("whatever", new Ref(args)); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/CastFromNull.java000066400000000000000000000012611342410422700245330ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class CastFromNull { public static void main(String args[]) { new CastFromNull(); Object x = (Object) null; String y = (String) null; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Casts.java000066400000000000000000000020731342410422700232410ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Casts { public static void main(String[] args) { (new Casts()).test(args); } private void test(String[] args) { long l1 = Long.parseLong(args[0]); int i1 = Integer.parseInt(args[1]); short s1 = Short.parseShort(args[2]); float f1 = Float.parseFloat(args[3]); double d1 = Double.parseDouble(args[4]); double d2 = d1 + f1; double d3 = d1 + l1; double d4 = d1 + i1; float f2 = f1 + i1; float f3 = f1 + s1; long l2 = l1 + i1; long l3 = l1 + s1; int i2 = i1 + s1; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/DefaultConstructors.java000066400000000000000000000025061342410422700262020ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class DefaultConstructors { public static void main(String args[]) { E e = new E(); // System.out.println(e.x); // System.out.println(e.y); e = new E(7,8); // System.out.println(e.x); // System.out.println(e.y); Object x[] = new Object[4]; x.clone(); x.equals(new Object()); x.toString(); } } class dcA { int x; dcA() { x = 5; } dcA(int a) { x = a; } } class dcB extends dcA { dcB() { super(); } } class C extends dcA { C() { // implicit call to super(). we want to see if it's the same as above } } class D extends dcA { // implicit constructor, should be same as above } class E extends dcA { int y; E() { // no implicit call this(6); } E(int z) { // implicit call to A() this.y = z; } E(int a, int b) { // no implicit call super(a); y = b; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Exception1.java000066400000000000000000000022741342410422700242060ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Exception1 { public static void main(String[] args) { Exception1 e1= new Exception1(); try { FooEx1 f = new FooEx1(); f.bar(); } catch(BadLanguageExceptionEx1 e) { e.printStackTrace(); } try { FooEx2 f = new FooEx2(); f.bar(); } catch(Throwable e) { e.printStackTrace(); } } } class FooEx1 { public void bar() throws BadLanguageExceptionEx1 { throw new BadLanguageExceptionEx1(); } } class FooEx2 { public void bar() { throw new NullPointerException(); } } class BadLanguageExceptionEx1 extends Exception { public BadLanguageExceptionEx1() { super("Try using a real language, like Perl"); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Exception2.java000066400000000000000000000027611342410422700242100ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; public final class Exception2 { @SuppressWarnings("resource") public static void main(String[] args) { Exception2 e2= new Exception2(); FileInputStream fis = null; FileOutputStream fos = null; try { fis = new FileInputStream( args[0] ); fos = new FileOutputStream( args[1] ); int data; while ( (data = fis.read()) != -1 ) { fos.write(data); } } catch (FileNotFoundException e) { System.err.println( "File not found" ); // whatever } catch (IOException e) { System.err.print( "I/O problem " ); System.err.println( e.getMessage() ); } finally { if (fis != null) { try { fis.close(); } catch (IOException e) { System.exit(-1); } } if (fos != null) { try { fos.close(); } catch (IOException e) { System.exit(-1); } } } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Exclusions.java000066400000000000000000000007231342410422700243200ustar00rootroot00000000000000 public class Exclusions { public static class Included { private final int f; private Included(int f) { this.f = f; } public int doit() { return f + 1; } } public static class Excluded { private final int f; private Excluded(int f) { this.f = f; } public int doit() { return f + 1; } } public static void main(String[] args) { int i = new Included(5).doit(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Finally1.java000066400000000000000000000021041342410422700236360ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Finally1 { public static void main(String[] args) throws BadLanguageExceptionF1 { Finally1 f1= new Finally1(); try { FooF1 f = new FooF1(); f.bar(); } finally { System.out.println("blah"); } System.out.println("feep"); } } class FooF1 { public void bar() throws BadLanguageExceptionF1 { if (true) throw new BadLanguageExceptionF1(); System.out.println("feh"); } } class BadLanguageExceptionF1 extends Exception { public BadLanguageExceptionF1() { super("Try using a real language, like Perl"); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Finally2.java000066400000000000000000000022261342410422700236440ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ import java.io.IOException; public class Finally2 { public static void main(String[] args) throws IOException { try { FooF2 f = new FooF2(); f.bar(); f.bletch(); } catch (BadLanguageExceptionF2 e) { e.printStackTrace(); } finally { System.out.println("blah"); } } } class FooF2 { public void bar() throws BadLanguageExceptionF2 { throw new BadLanguageExceptionF2(); } public void bletch() throws IOException { throw new IOException("Burp!"); } } class BadLanguageExceptionF2 extends Exception { public BadLanguageExceptionF2() { super("Try using a real language, like Perl"); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/FunkySupers.java000066400000000000000000000020661342410422700244640ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class FunkySupers { int y; int funky(FunkySupers fs) { return 5; } public static void main(String args[]) { new SubFunkySupers().funky(new FunkySupers()); } } class SubFunkySupers extends FunkySupers { @Override int funky(FunkySupers fs) { SubFunkySupers.super.funky(fs); SubFunkySupers.this.funky(fs); SubFunkySupers.this.y = 7; SubFunkySupers.super.y = 7; super.y = 7; super.funky(fs); return 6; } } //class EE { class X {} } //class Y extends EE.X { Y(EE e) { e.super(); } } // DOESNT WORK IN POLYGLOT!!! WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Inheritance1.java000066400000000000000000000020351342410422700244740ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Inheritance1 { public static void main(String[] args) { Inheritance1 ih1= new Inheritance1(); Base b1 = new Base(); Base b2 = new Derived(); b1.foo(); b2.foo(); b1.bar(3); b2.bar(5); } } class Base { public void foo() { int i= 0; } public String bar(int x) { return Integer.toOctalString(x); } } class Derived extends Base { @Override public void foo() { super.foo(); } @Override public String bar(int x) { return Integer.toHexString(x); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/InheritedField.java000066400000000000000000000015111342410422700250370ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class InheritedField { public static void main(String[] args) { InheritedField if1= new InheritedField(); B b = new B(); b.foo(); b.bar(); } } class A { protected int value; } class B extends A { public void foo() { value = 10; } public void bar() { this.value *= 2; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/InnerClass.java000066400000000000000000000023301342410422700242210ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class InnerClass { public static void main(String[] args) { (new InnerClass()).method(); } public int fromInner(int v) { return v + 1; } public int fromInner2(int v) { return v + 3; } public void method() { WhatsIt w= new WhatsIt(); } class WhatsThat { private int otherValue; WhatsThat() { otherValue = 3; fromInner2( otherValue ); } } class WhatsIt { private int value; public WhatsIt() { value= 0; fromInner(value); anotherMethod(); } private NotAgain anotherMethod() { return new NotAgain(); } class NotAgain { Object x; public NotAgain() { x = new WhatsThat(); } } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/InnerClassA.java000066400000000000000000000067231342410422700243340ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ // other stranger test cases // // combininations of: // o.new() form // function calls // getting enclosings from one AND multiple levels up // new Foo() which requires an enclosing instruction before (ie calling new Inner() from ReallyInner() // invariants and non-invariants (immediate 'new' in that function) // subclasses public class InnerClassA { int a_x; public static void main(String args[]) { // prints out 5 5 9 7 5 5 7 5 7 5 InnerClassA a = new InnerClassA(); AA aa = a.new AA(); AB ab = aa.makeAB(); a.a_x = 5; // tests int myx = ab.getA_X_from_AB(); System.out.println(myx); // 5 int myx2 = ab.getA_X_thru_AB(); System.out.println(myx2); // 5 aa.doSomeCrazyStuff(); } public int getA_X() { return a_x; } class AA { int a2a_var; public AB makeAB() { return new AB(); } public void doSomeCrazyStuff() { AB ab = new AB(); AB.ABSubA absuba = ab.new ABSubA(); absuba.aba_x = 7; AB.ABA.ABAA abaa2 = ab.new ABA().new ABAA(); // just used to add ABA instance key in ABAA.getABA_X() AB.ABA aba = ab.new ABA(); aba.aba_x = 9; AB.ABA.ABAB abab = aba.new ABAB(); System.out.println(abab.getABA_X()); // 9 AB.ABA.ABAA abaa = absuba.new ABAA(); int myaba_x = abaa.getABA_X(); int mya_x = abaa.getA_X(); System.out.println(myaba_x); // 7 System.out.println(mya_x); // 5 doMoreWithABSubA(absuba); } private void doMoreWithABSubA(InnerClassA.AB.ABSubA absuba) { System.out.println(absuba.getA_X()); // 5 AB.ABSubA.ABSubAA absubaa = absuba.new ABSubAA(); int myaba_x2 = absubaa.getABA_X(); int mya_x2 = absubaa.getA_X(); System.out.println(myaba_x2); // 7 System.out.println(mya_x2); // 5 // TODO Auto-generated method stub AB.ABA.ABAA abaa = absubaa.makeABAA(); int myaba_x3 = abaa.getABA_X(); int mya_x3 = abaa.getA_X(); System.out.println(myaba_x3); // 7 System.out.println(mya_x3); // 5 } } class AB { public int getA_X_from_AB() { return a_x; // CHECK enclosing is an A } public int getA_X_thru_AB() { return getA_X(); // CHECK enclosing is an A } class ABA { int aba_x; class ABAA { int getABA_X() { return aba_x; // CHECK enclosing is an ABA or ABSubA } int getA_X() { return a_x; // CHECK enclosing is an A } } class ABAB { int getABA_X() { return aba_x; // CHECK enclosing is an ABA } } } class ABSubA extends ABA { class ABSubAA { int getABA_X() { return aba_x; // CHECK enclosing is an ABSubA } int getA_X() { return a_x; // CHECK enclosing is an A } ABA.ABAA makeABAA() { return new ABAA(); // this new instruction requires us to know that ABSubA is a subclass of ABA. // thus when we call getABA_X() on the result, it will need to find a EORK(this site,class ABA) -> THIS (of type ABSubAA) } } int getA_X() { return a_x; // CHECK enclosing is an A } } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/InnerClassLexicalReads.java000066400000000000000000000047251342410422700265140ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ interface IntConstant { int getConstant(); } public class InnerClassLexicalReads { /* * CAst Instructions: * 2 v3 = new $9$9>@2[9:9] -> [13:3] * 3 invokespecial < Source, LInnerClassLexicalReads/makeIntConstant(I)LIntConstant;/$9$9, ()V > v3 @3 exception:v5[9:9] -> [13:3] * 4 return v3 [9:2] -> [13:4] */ public static IntConstant makeIntConstant(int x) { final int y = x * x; return new IntConstant() { // CAst CONSTRUCTOR Instructions: // 1 invokespecial < Source, Ljava/lang/Object, ()V > v1 @1 exception:v3[20:9] -> [32:3] /* * CAst Instructions: * 0 v2:com.ibm.wala.ssa.SymbolTable$1@16b18b6 = lexical:y@LInnerClassLexicalReads/makeIntConstant(I)LIntConstant; * 1 return v2:com.ibm.wala.ssa.SymbolTable$1@16b18b6[11:4] -> [11:13] */ @Override public int getConstant() { return y; } }; } /* * CAst Instructions: * 1 v2:com.ibm.wala.ssa.SymbolTable$1@4272b2 = invokestatic < Source, LInnerClassLexicalReads, makeIntConstant(I)LIntConstant; > v3:#123 @1 exception:v4[17:19] -> [17:39] * 2 v7 = getstatic < Source, Ljava/lang/System, out, >[18:2] -> [18:12] * 3 v8 = invokeinterface < Source, LIntConstant, getConstant()I > v2:com.ibm.wala.ssa.SymbolTable$1@4272b2 @3 exception:v9[18:21] -> [18:37] * 4 invokevirtual < Source, Ljava/io/PrintStream, println(I)V > v7,v8 @4 exception:v10[18:2] -> [18:38] */ public static void main(String args[]) { InnerClassLexicalReads ignored = new InnerClassLexicalReads(); // call this just to make reachable (test checks for unreachable methods) int foo = 5; int haha = foo * foo; IntConstant ic = makeIntConstant(haha); System.out.println(ic.getConstant()); int x = ic.getConstant(); System.out.println(x); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/InnerClassSuper.java000066400000000000000000000015721342410422700252470ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class InnerClassSuper { int x = 5; class SuperOuter { public void test() { System.out.println(x); } } public static void main(String args[]) { new Sub().new SubInner(); } } class Sub extends InnerClassSuper { class SubInner { public SubInner() { InnerClassSuper.SuperOuter so = new InnerClassSuper.SuperOuter(); so.test(); } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/InterfaceTest1.java000066400000000000000000000016341342410422700250070ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class InterfaceTest1 { public static void main(String[] args) { InterfaceTest1 it= new InterfaceTest1(); IFoo foo = new FooIT1('a'); char ch2 = foo.getValue(); } } interface IFoo { char getValue(); } class FooIT1 implements IFoo { private char fValue; public FooIT1(char ch) { fValue= ch; } @Override public char getValue() { return fValue; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/LocalClass.java000066400000000000000000000024361342410422700242070ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class LocalClass { public static void main(String[] args) { final Integer base = Integer.valueOf(6); class Foo { int value; public Foo(int v) { value= v; } public int getValue() { return value; } public int getValueBase() { return value - base.intValue(); } } Foo f= new Foo(3); System.out.println(f.getValue()); System.out.println(f.getValueBase()); (new LocalClass()).method(); } public void method() { final Integer base = Integer.valueOf(6); class Foo { int value; public Foo(int v) { value= v; } public int getValue() { return value; } public int getValueBase() { return value - base.intValue(); } } Foo f= new Foo(3); System.out.println(f.getValue()); System.out.println(f.getValueBase()); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/MiniaturList.java000066400000000000000000000027271342410422700246160ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class MiniaturList { MiniaturList next; int data; public MiniaturList remove(int elt) { MiniaturList xp = null; MiniaturList head = this; MiniaturList x = head; while (x != null) { if (x.data == elt) { if (xp == null) head = x.next; else xp.next = x.next; break; } xp = x; x = x.next; } return head; } public static MiniaturList cons(int elt, MiniaturList l) { MiniaturList ret = new MiniaturList(); ret.data = elt; ret.next = l; return ret; } public boolean contains(int elt) { MiniaturList head = this; while (head != null) { if (head.data == elt) return true; head = head.next; } return false; } public static void main(String[] args) { MiniaturList l1 = cons(1, cons(2, cons(3, cons(2, null)))); MiniaturList l2 = cons(5, null); l1 = l1.remove(2); //assert 2 !in l1.*next.data System.out.println(l1.contains(3)); System.out.println(l2.contains(6)); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/MiniaturSliceBug.java000066400000000000000000000033411342410422700253710ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ abstract class PrimitiveWrapper { /** * Sets the integer representation of the underlying primitive * to the given value. */ public abstract void setIntValue(int i); /** * Returns the integer representation of the underlying primitive. * @return this.intVal */ public abstract int intValue(); /** * Returns true if this and the given object are * pri * {@inheritDoc} */ @Override abstract public boolean equals(Object o); } final class IntWrapper extends PrimitiveWrapper { private int val; /** * Constructs a wrapper for the given int. */ public IntWrapper(int val) { this.val = val; } @Override public int intValue() { return val; } @Override public void setIntValue(int i) { this.val = i; } @Override public boolean equals(Object o) { return o instanceof IntWrapper && ((IntWrapper)o).val==val; } } public class MiniaturSliceBug { public void validNonDispatchedCall(IntWrapper wrapper) { wrapper.setIntValue(3); assert wrapper.intValue() == 3; wrapper.equals(wrapper); } public static void main(String[] args) { (new MiniaturSliceBug()).validNonDispatchedCall(new IntWrapper(-1)); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Monitor.java000066400000000000000000000013131342410422700236070ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Monitor { int i = 0; public Monitor() { } public void incr() { synchronized(this) { i++; } } public static void main(String[] a) { new Monitor().incr(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Monitor2.java000066400000000000000000000014371342410422700237000ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Monitor2 { private static boolean randomIsolate() { return Math.random() > .5; } int i = 0; public Monitor2() { } public void incr() { synchronized(this) { i++; } } public static void main(String[] a) { new Monitor2().incr(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/NullArrayInit.java000066400000000000000000000016621342410422700247240ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class NullArrayInit { String[] x = {null}; public static void main(String[] args) { new NullArrayInit(); Object a[] = new Object[] {null,null}; Object b[] = {null}; String c[] = {null}; String d[] = {null,null}; String e[] = {null,"hello",null}; String f[] = new String[] {null}; String g[] = new String[] {null,null,null}; String j[][] = { {null,null}, {null} }; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/QualifiedStatic.java000066400000000000000000000013431342410422700252360ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class QualifiedStatic { public static void main(String[] args) { QualifiedStatic qs= new QualifiedStatic(); FooQ fq= new FooQ(); int x = FooQ.value; } } class FooQ { static int value= 0; } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Scoping1.java000066400000000000000000000013431342410422700236460ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Scoping1 { public static void main(String[] args) { Scoping1 s1= new Scoping1(); { int x= 5; System.out.println(x); } { double x= 3.14; System.out.println(x); } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Scoping2.java000066400000000000000000000015611342410422700236510ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Scoping2 { public static void main(String[] args) { Scoping2 s2 = new Scoping2(); { final int x = 5; System.out.println(x); (new Object() { public void foo() { System.out.println("x = " + x); } }).foo(); } { double x = 3.14; System.out.println(x); } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Simple1.java000066400000000000000000000022001342410422700234660ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Simple1 { private int value; private final float fval = 3.14F; private float fval1 = 3.2F; public Simple1(int x) { value = x; } public Simple1() { this(0); } public static void doStuff(int N) { int prod = 1; for(int j=0; j < N; j++) prod *= j; } public static void main(String[] args) { int sum= 0; for(int i=0; i < 10; i++) { sum += i; } Simple1.doStuff(sum); Simple1 s = new Simple1(); s.instanceMethod1(); } public void instanceMethod1() { instanceMethod2(); } public float instanceMethod2() { return fval * fval1; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/SimpleCalls.java000066400000000000000000000017711342410422700244000ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ interface ISimpleCalls { public void helloWorld(); } public class SimpleCalls implements ISimpleCalls { @Override public void helloWorld() { System.out.println("hello world!"); } public int anotherCall() { this.helloWorld(); ((this)).helloWorld(); System.out.println("another call"); return 5; } public static void main (String args[]) { SimpleCalls sc = new SimpleCalls(); ISimpleCalls isc = sc; isc.helloWorld(); int y = sc.anotherCall(); y = y + y; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/StaticInitializers.java000066400000000000000000000016741342410422700260100ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class StaticInitializers { static class X { int x; int y; int sum() { return x+y; } int diff() { return x+-y; } } private static X x = new X(); private static X y; static { y = new X(); } private int sum() { return x.sum() * y.diff(); } public static void main(String[] args) { StaticInitializers SI = new StaticInitializers(); SI.sum(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/StaticNesting.java000066400000000000000000000014001342410422700247340ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class StaticNesting { public static void main(String[] args) { StaticNesting sn= new StaticNesting(); WhatsIt w= new WhatsIt(); } static class WhatsIt { private int value; public WhatsIt() { value= 0; } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Switch1.java000066400000000000000000000036751342410422700235170ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class Switch1 { public static void main(String[] args) { Switch1 s1= new Switch1(); s1.testOne(args); s1.testTwo(args); s1.testThree(args); } public void testOne(String[] args) { char ch; switch(Integer.parseInt(args[0])) { case 0: ch=Character.forDigit(Integer.parseInt(args[1]), 10); break; case 1: ch=Character.forDigit(Integer.parseInt(args[2]), 10); break; case 2: ch=Character.forDigit(Integer.parseInt(args[3]), 10); break; case 3: ch=Character.forDigit(Integer.parseInt(args[4]), 10); break; default: ch= '?'; break; } System.out.println(ch); } public char testTwo(String[] args) { switch(Integer.parseInt(args[0])) { case 0: return Character.forDigit(Integer.parseInt(args[1]), 10); case 1: return Character.forDigit(Integer.parseInt(args[2]), 10); case 2: return Character.forDigit(Integer.parseInt(args[3]), 10); case 3: return Character.forDigit(Integer.parseInt(args[4]), 10); default: return '?'; } } public void testThree(String[] args) { char ch = '?'; switch(Integer.parseInt(args[0])) { case 0: ch=Character.forDigit(Integer.parseInt(args[1]), 10); break; case 1: ch=Character.forDigit(Integer.parseInt(args[2]), 10); break; case 2: ch=Character.forDigit(Integer.parseInt(args[3]), 10); break; case 3: ch=Character.forDigit(Integer.parseInt(args[4]), 10); break; } System.out.println(ch); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/Thread1.java000066400000000000000000000015321342410422700234530ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ class R implements Runnable { public int i; R(int i) { this.i = i; } @Override public void run() { return; } } public class Thread1 { private void test() { R r = new R(2); Thread t = new Thread(r); t.start(); } public static void main(String[] a) { (new Thread1()).test(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/TwoClasses.java000066400000000000000000000023771342410422700242620ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class TwoClasses { private int value; private float fval= 3.14F; public TwoClasses(int x) { value = x; } public TwoClasses() { this(0); } public static void doStuff(int N) { int prod= 1; TwoClasses tc= new TwoClasses(); tc.instanceMethod1(); for(int j=0; j < N; j++) prod *= j; } public static void main(String[] args) { int sum= 0; for(int i=0; i < 10; i++) { sum += i; } TwoClasses.doStuff(sum); } public void instanceMethod1() { instanceMethod2(); } public void instanceMethod2() { Bar b= Bar.create('a'); } } class Bar { private final char fChar; private Bar(char c) { fChar= c; } public static Bar create(char c) { return new Bar(c); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/WelcomeInitializers.java000066400000000000000000000014611342410422700261460ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class WelcomeInitializers { int x; int y = 6; static int sX; static int sY = 6; { x = 7 / 7; } static { sX = 9 / 3; } public WelcomeInitializers() { } public void hey() {} public static void main(String args[]) { new WelcomeInitializers().hey(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/WhileTest1.java000066400000000000000000000015561342410422700241620ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ public class WhileTest1 { public static void main(String[] args) { WhileTest1 wt1= new WhileTest1(); int x= 235834; boolean stop= false; while (!stop) { x += 3; x ^= 0xAAAA5555; stop= (x & 0x1248) != 0; } while (!stop) { x += 3; if (x < 7) continue; x ^= 0xAAAA5555; stop= (x & 0x1248) != 0; } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/alreadywalaunittests/000077500000000000000000000000001342410422700255705ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/alreadywalaunittests/InnerClassAA.java000066400000000000000000000116751342410422700307100ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package alreadywalaunittests; //other stranger test cases // // combininations of: // o.new() form // function calls // getting enclosings from one AND multiple levels up // new Foo() which requires an enclosing instruction before (ie calling new Inner() from ReallyInner() // invariants and non-invariants (immediate 'new' in that function) // subclasses public class InnerClassAA { int a_x; public static void main(String args[]) { // prints out 5 5 9 7 5 5 7 5 7 5 InnerClassAA a = new InnerClassAA(); a.doAllThis(); } public void doAllThis() { InnerClassAA a = this; AA aa = new AA(); aa = a.new AA(); AB ab = aa.makeAB(); a.a_x = 5; // tests int myx = ab.getA_X_from_AB(); System.out.println(myx); // 5 int myx2 = ab.getA_X_thru_AB(); System.out.println(myx2); // 5 aa.doSomeCrazyStuff(); } public int getA_X() { return a_x; } class AA { int a2a_var; public AB makeAB() { return new AB(); } public void doSomeCrazyStuff() { AB ab = new AB(); AB.ABSubA absuba = ab.new ABSubA(); absuba.aba_x = 7; AB.ABA.ABAA abaa2 = ab.new ABA().new ABAA(); // just used to add ABA instance key in ABAA.getABA_X() AB.ABA aba = ab.new ABA(); aba.aba_x = 9; AB.ABA.ABAB abab = aba.new ABAB(); System.out.println(abab.getABA_X()); // 9 AB.ABA.ABAA abaa = absuba.new ABAA(); int myaba_x = abaa.getABA_X(); int mya_x = abaa.getA_X(); System.out.println(myaba_x); // 7 System.out.println(mya_x); // 5 doMoreWithABSubA(absuba); } private void doMoreWithABSubA(InnerClassAA.AB.ABSubA absuba) { System.out.println(absuba.getA_X()); // 5 AB.ABSubA.ABSubAA absubaa = absuba.new ABSubAA(); int myaba_x2 = absubaa.getABA_X(); int mya_x2 = absubaa.getA_X(); System.out.println(myaba_x2); // 7 System.out.println(mya_x2); // 5 // TODO Auto-generated method stub AB.ABA.ABAA abaa = absubaa.makeABAA(); int myaba_x3 = abaa.getABA_X(); int mya_x3 = abaa.getA_X(); System.out.println(myaba_x3); // 7 System.out.println(mya_x3); // 5 } } class AB { public int getA_X_from_AB() { return a_x; // CHECK enclosing is an A } public int getA_X_thru_AB() { return getA_X(); // CHECK enclosing is an A } class ABA { int aba_x; class ABAA { int getABA_X() { return aba_x; // CHECK enclosing is an ABA or ABSubA } int getA_X() { return a_x; // CHECK enclosing is an A } } class ABAB { int getABA_X() { return aba_x; // CHECK enclosing is an ABA } } } class ABSubA extends ABA { class ABSubAA { int getABA_X() { return aba_x; // CHECK enclosing is an ABSubA } int getA_X() { return a_x; // CHECK enclosing is an A } ABA.ABAA makeABAA() { return new ABAA(); // this new instruction requires us to know that ABSubA is a subclass of ABA. // thus when we call getABA_X() on the result, it will need to find a EORK(this site,class ABA) -> THIS (of type ABSubAA) } } int getA_X() { return a_x; // CHECK enclosing is an A } } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/alreadywalaunittests/InnerClassSuperA.java000066400000000000000000000044121342410422700316150ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package alreadywalaunittests; public class InnerClassSuperA { int x = 5; class SuperOuter { public void test() { System.out.println(x); } } public static void main(String args[]) { new Sub().new SubInner(); } } class Sub extends InnerClassSuperA { class SubInner { public SubInner() { InnerClassSuperA.SuperOuter so = new InnerClassSuperA.SuperOuter(); so.test(); } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/bugfixes/000077500000000000000000000000001342410422700231335ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/bugfixes/DoWhileInCase.java000066400000000000000000000004551342410422700264200ustar00rootroot00000000000000package bugfixes; public class DoWhileInCase { static int x = 3; public static void main(String[] args) { switch(x) { case 1: do { System.out.println("Problem"); x ++; } while (x < 3); break; default: System.out.println("Default"); } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/bugfixes/VarDeclInSwitch.java000066400000000000000000000042421342410422700267710ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package bugfixes; public class VarDeclInSwitch { static int y = 7; public static void main(String args[]) { int x = 5; x = x + x; switch ( x ) { case 5: break; case 10: int y = 6; System.out.println(y); default: y = 7; System.out.println(y); break; } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/000077500000000000000000000000001342410422700221025ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/QualifiedNames.java000066400000000000000000000055561342410422700256470ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo; public class QualifiedNames { static int field; int x; public QualifiedNames(int xx) { x = xx; } public static void main(String args[]) { QualifiedNames qn = new QualifiedNames(5); int y = 3; y = y + qn.x; } public void test() { int x = 2; x = x / x / x; field = 5; field = QualifiedNames.field + field; this.x = 6; QualifiedNames.field = 6; QualifiedNames.this.x = 6; foo.QualifiedNames.field = 6; foo.QualifiedNames.this.x = 7; // TODO FIXME IMPORTANT: ENABLE WHEN WE SUPPORT FUNCTIONSIN JDT BRIDGE!!! foo.QualifiedNames.empty(); emptyInstance(); foo.QualifiedNames.this.emptyInstance(); } public static void empty() {} public void emptyInstance() {} } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/SimpleNames.java000066400000000000000000000053441342410422700251700ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo; // need inner classes to run this test public class SimpleNames { int f; static int s; public void hello() { f = 3; // this.f = 3 s = 4; // SimpleNames.f = 4 SimpleNames.s = foo.SimpleNames.s; if ( false ) { foo.SimpleNames.this.hello(); hello(); this.hello(); } final int i = 5; new Object() { @Override public int hashCode() { f = 5; // SimpleNames.this = 5 s = 6; // SimpleNames.s = 6 SimpleNames.this.f = 5; SimpleNames.s = 6; if ( false ) { foo.SimpleNames.this.hello(); SimpleNames.this.hello(); hello(); // this should expand to above this.hashCode(); hashCode(); // should expand to above } return i; // just plain "i" in polyglot, treats like local. } }; } public static void main(String args[]) { new SimpleNames().hello(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/000077500000000000000000000000001342410422700226465ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/000077500000000000000000000000001342410422700237515ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/000077500000000000000000000000001342410422700251005ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/ArraysAndSuch.java000066400000000000000000000055571342410422700304660ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo.bar.hello.world; public class ArraysAndSuch { public static void main(String args[]) { ArraysAndSuch.main(); } public static void main() { Object o1 = null; Object[] os1 = new Object[] { null, o1, null }; Object[] os2 = { null }; os1 = new Object[] { null }; os1 = new String[][] { { null, null }, { null} }; os1 = new Object[][] { { null, o1 }, { null}, {os2}, {null,os1,null} }; System.out.println(os1[1]); os1[1] = null; os1.clone(); if ( os1.equals(os2) ) { Class x = os1.getClass(); os1.notify(); os1.toString(); try { x.getClasses().wait(x.getClasses().length,o1.hashCode()); os1.wait(os1.length); } catch (InterruptedException e) { e.printStackTrace(); } } float x[] = new float[4+5]; int[][][][] y = new int[2][x.length][1][1+1]; int z[] = new int[] { 2+3, 4+3 }; boolean[] a = new boolean[] { }; Object b = new String[] { }; Object c[] = new String[] {}; String d[] = new String[3]; } } ConstructorsAndInitializers.java000066400000000000000000000055751342410422700334220ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo.bar.hello.world; class Super { String s; Super(String x) { super(); s = x; } } @SuppressWarnings("ClassInitializerMayBeStatic") public class ConstructorsAndInitializers extends Super { static int iX; static int sX; Object x; static { sX = 11; } { iX = 55 + 33; sX = 6; } ConstructorsAndInitializers() { this("hello"); } { int y = 5; iX = y + 9; x = new Super("yo wassup") { { s += " i say wassup!"; iX = 55 + 12; } @Override public String toString() { return s + " -- from an anon class in " + iX + "," + sX + ": " + ConstructorsAndInitializers.this.s; } { s += " i say i say"; } }; } protected ConstructorsAndInitializers(String x) { super("yo"); iX = 99; } static { sX = 22; } public static void main(String args[]) { System.out.println(new ConstructorsAndInitializers().x.toString()); // yo wassup i say wassup! i say i say -- from an anon class in 99,6: yo class T{ } T t = new T(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/CopyOfLoopsAndLabels.java000066400000000000000000000040441342410422700317270ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo.bar.hello.world; public class CopyOfLoopsAndLabels { static int X=5; public static void main(String args[]) { int k=X; for (; ; k++) break; } } DefaultCtorInitializerTest.java000066400000000000000000000043451342410422700331520ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo.bar.hello.world; public class DefaultCtorInitializerTest { String x; public static void main(String args[]) { // MAKE SURE initializer added to default ctor!!! System.out.println(new DefaultCtorInitializerTest().x + z); // hellohellogoodbye } static String z; static { z = "goodbye"; } { String y = "hello"; x = y + y; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/InnerClasses.java000066400000000000000000000110641342410422700303360ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo.bar.hello.world; class Temp { } public class InnerClasses extends Temp { Object supportLocalBusiness() { final int x = 54; class FooBar { @Override public int hashCode() { return x; } } return new FooBar(); } static Object anonymousCoward() { final int x = 5; return new Object() { @Override public int hashCode() { return x; } }; } static String xxxx = "odd"; public static void main(String args[]) { new Outie("eenie").new Innie().meenie(); System.out.println(anonymousCoward().hashCode()); final String xx = "crazy"; Outie outie = new Outie("weird") { @Override public String toString() { return "bogus" + x + xx + xxxx; } }; System.out.println(outie); ABC a = new ABC("hello") { }; System.out.println(new InnerClasses().supportLocalBusiness().hashCode()); System.out.println(a); System.out.println(new SuperEnclosing().new SubEnclosed().hello()); System.out.println(new SuperEnclosing().new SubEnclosed().seVar); System.out.println(new SuperEnclosing().new SubEnclosed().hello2()); System.out.println(new SuperEnclosing().new SubEnclosed().seVar2); SuperEnclosing2 se2 = new SuperEnclosing2(); SuperEnclosing2.SubEnclosed2 sub2 = se2.new SubEnclosed2(); System.out.println(sub2.hello()); //13 sub2.setSEVar(); System.out.println(sub2.hello()); //still 13 se2.setSEVar(); System.out.println(sub2.hello()); //1001 int foo = 12; foo++; --foo; } } class ABC { ABC(Object x) {} } class Outie { String x; Outie(String s) { x = s; } class Innie { public void meenie() { System.out.println(x); } } } class SuperEnclosing { int seVar = 6; int seVar2 = 10; class SubEnclosed extends SuperEnclosing { int seVar2 = 11; SubEnclosed() { this.seVar = 5; SuperEnclosing.this.seVar = 7; this.seVar2 = 12; SuperEnclosing.this.seVar2 = 13; } int hello() { return seVar; // this is ours from SuperEnclosing, not the enlosing SuperEnclosing's // so even though the variable is defined in SuperEnclosing, this is NOT the same as // SuperEnclosing.this.x } int helloAgain() { return SubEnclosed.this.seVar; // this is ours from SuprEnclosing, not the enclosing SuperEnclosing's } int hello2() { return seVar2; } } } class SuperEnclosing2 { private int seVar = 6; public void setSEVar() { seVar= 1001; } class SubEnclosed2 extends SuperEnclosing2 { SubEnclosed2() { // this.seVar = 5; // illegal SuperEnclosing2.this.seVar += -(-(+7)); // makes 13 } int hello() { return seVar; // since seVar is private, this now refers to the enclosing one // PROOF: callind setSEVar() on the SubEnclosed2 above does nothing. } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/LoopsAndLabels.java000066400000000000000000000062441342410422700306130ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo.bar.hello.world; public class LoopsAndLabels { @SuppressWarnings("unused") public static void main(String args[]) { aaa: do { while (null instanceof String) { String x = (String) null; Object a = (Object) x; Object b = (Object) "hello"; x = (String) a; x = "hello"; x = (String) b.toString(); x = ((String)((Object) b.toString())); x = (String)(Object) b.toString(); b = (Object) b.toString(); b = (String) b.toString(); if (true) break aaa; } if ("war".equals("peace")) continue; else if (1 == 0) break; int x = 6; x ++; } while (false); if (false) return; for (int i = 0; i < 3; i++) { for (int j = 0; i < 4; i++) { System.out.println(i + "*" + j + "=" + (i * j)); } } a: for (int i = 0; i < 3; i++) { b: for (int j = 0; j < 10; j++) { c: for (int k = 0; k < 10; k++) { if (true) break c; } if ('c' == 'd') continue b; } if (null instanceof Object) break a; } a: for (int i = 0; i < 3; i++) { b: for (int j = 0; j < i; i++) { c: for (int k = 0; k < j; k++) { if (true) ; else continue c; } if ("freedom".equals("slavery")) break b; } if ("ignorance" == "strength") continue a; } foo: ; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/MethodMadness.java000066400000000000000000000101671342410422700305030ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo.bar.hello.world; public class MethodMadness { public static int s = 12345; public int x = 100000; public MethodMadness() { System.out.println("constructor"); } public MethodMadness(String ss) { System.out.println("hello world"+ ss); } public static void staticTest() { System.out.println("staticTest"); } protected int protectedInteger() { this.s = 5; new MethodMadness("thrownaway").staticTest(); // MethodMadness object evaluated but thrown away new MethodMadness("thrownaway").s++; // MethodMadness object evaluated but thrown away staticTest(); MethodMadness nullmm = null; System.out.println("s from nullmm: "+nullmm.s); // static refs cannot cause NPEs return 6 + x; } protected int protectedInteger2() { return 66 + x; } void defaultVoid() { if ( true ) return; return; } private void privateVoid() { System.out.println("privateVoid "+x); } protected void protectedVoid() { System.out.println("protectedVoid "+x); } private int privateInteger() { return 7 + x; } private int privateInteger2() { return 77 + x; } class Inner extends MethodMadness { public Inner() { x = 200000; } private int privateInteger() { return 13 + x; } @Override protected int protectedInteger() { return 233 + x; } @SuppressWarnings("static-access") public void hello() { System.out.println(privateInteger()); // inner function, inner this, 200013 System.out.println(MethodMadness.this.privateInteger()); // outer function, outer this, 100007 System.out.println(privateInteger2()); // outer function, outer this, 200077 // WRONG IN POLYGLOT (private) System.out.println(protectedInteger()); // inner function, inner this, 200233 System.out.println(MethodMadness.this.protectedInteger()); // outer function, outer this System.out.println(protectedInteger2()); // outer function, inner this, 200066 // the interesting one privateVoid(); // outer function, outer this, 100000 // WRONG IN POLYGLOT (private) protectedVoid(); // outer function, inner this, 200000 defaultVoid(); staticTest(); this.staticTest(); MethodMadness.this.staticTest(); } } public static void main(String args[]) { new MethodMadness().new Inner().hello(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/MiniaturList2.java000066400000000000000000000041211342410422700304470ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo.bar.hello.world; public class MiniaturList2 { public static void main(String[] args) { int a; for ( ;; ) { break; } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/Misc.java000066400000000000000000000044031342410422700266370ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo.bar.hello.world; public class Misc { public static void main(String args[]) { if ( "hello" instanceof Object ) { System.out.println("strings are objects in java"); Object x = (Object) "hello"; String y = (String) x; String z = (String) null; x = (String) null; char a = 'a'; switch (a) { case 'c': case 'b': case 'a': break; } } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/SwitchCase.java000066400000000000000000000046111342410422700300020ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package foo.bar.hello.world; public class SwitchCase { public static final int X = 10; public static void main(String args[]) { int x = 5+X; // int y =6 +7; switch (x) { case 0: case 32: System.out.println("escucha"); case 2: System.out.println("ve"); break; case X: if ( false ) { System.out.println("Hello world"); } break; case 4: { int z = 3; System.out.println("es un charm la vez " + z + "a"); break; } default: System.out.println("default"); } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/000077500000000000000000000000001342410422700246665ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/Annotations.java000066400000000000000000000022561342410422700300330ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package javaonepointfive; @interface TestAnnotation { String doSomething(); int count(); String date(); int[] stuff(); } @interface AnotherTestAnnotation { String value(); } @AnotherTestAnnotation("string") @TestAnnotation (doSomething="The class", count=-1, date="09-09-2001", stuff={0,1}) public class Annotations { @TestAnnotation (doSomething="What to do", count=1, date="09-09-2005", stuff={}) public int mymethod() { @AnotherTestAnnotation("i") int i = 0; return i; } @TestAnnotation (doSomething="What not to do", count=0, date="12-14-2010", stuff={1,2,3,4,5}) public static void main(String[] args) { (new Annotations()).mymethod(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/AnonGeneNullarySimple.java000066400000000000000000000046711342410422700317540ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class AnonGeneNullarySimple { static interface Ops { public E nullary(); } static class StrTripler implements Ops { @Override public String nullary() { String x = "talk about it "; return x+x+x; } } public static void main(String args[]) { (new AnonGeneNullarySimple()).doit(); } private void doit() { Ops ops = new StrTripler(); String globalEconomy = ops.nullary(); String localEconomy = new StrTripler().nullary(); System.out.println(globalEconomy+localEconomy); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/AnonymousGenerics.java000066400000000000000000000063551342410422700312120ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class AnonymousGenerics { static interface Ops { public E nullary(); public E unary(E x); } static class StrTripler implements Ops { // if has type parameters, find overriding method and // get erasures for all of those types and make a new method // that calls this one (with casts). no worries about return values. @Override public String unary(String x) { return x + x + x; } @Override public String nullary() { String x = "talk about it "; return x+x+x; } } public static void main(String args[]) { (new AnonymousGenerics()).doit(); } private void doit() { Ops strQuadrupler = new Ops() { @Override public String unary(String x) { return x+x+x+x; } @Override public String nullary() { String x = "time to make a move to the global economy "; return x+x+x+x; } }; System.out.println(strQuadrupler.unary("hi")); System.out.println(new StrTripler().unary("hi")); String globalEconomy = strQuadrupler.nullary(); System.out.println(globalEconomy); Ops ops = new StrTripler(); globalEconomy = ops.nullary(); System.out.println(globalEconomy); Ops hack = ops; hack.unary("whatever"); hack.nullary(); hack = strQuadrupler; hack.unary("whatever"); hack.nullary(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/BasicsGenerics.java000066400000000000000000000070551342410422700304240ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; import java.util.ArrayList; import java.util.Iterator; public class BasicsGenerics { static ArrayList strs = new ArrayList<>(); static ArrayList ints = new ArrayList<>(); public BasicsGenerics() { strs.add("Coucou, monde!"); } public BasicsGenerics(String s) { strs.add(s); } public static void main(String args[]) { BasicsGenerics a = new BasicsGenerics(); String frenchy = a.part1(); // // String s = "mondo"; String sicilian = new BasicsGenerics("ciao "+s).part2(); // System.out.println(frenchy); System.out.println(sicilian); strs.add("hello"); ints.add(Integer.valueOf(3)); String qqq; for (Iterator iter = ((Iterable)ints).iterator(); iter.hasNext(); iter.next()); for (Iterator iter = strs.iterator(); iter.hasNext();) { qqq = iter.next(); System.out.println(qqq); } Iterable s1 = strs; for (Iterator itertmp = s1.iterator(); itertmp.hasNext();) { String rrr = (String) itertmp.next(); { System.out.println("la vida pasaba y sentia " + rrr); } } for (String rrr: strs) { System.out.println("la vida pasaba y sentia " + rrr); } for (String rrr: strs) { System.out.println("la vida pasaba y sentia " + rrr); } for ( String x: makeArray() ) System.out.println(x); // // System.out.println("---break time---"); // for ( int i = 0; i < makeArray().length; i++ ) // System.out.println(makeArray()[i]); } public static String[] makeArray() { String[] hey = {"hey","whats","up"}; System.out.println("give a hoot"); return hey; } public String part1() { return strs.get(0); } public String part2() { return strs.get(0); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/Cocovariant.java000066400000000000000000000052561342410422700300110ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class Cocovariant { static class A { A foo(String x) { return null; } } static class B extends A { @Override B foo(String x) { return null; } } static class C extends B { @Override C foo(String x) { return null; } } public static void main(String[] args) { (new Cocovariant()).doit(); } private void doit() { A a = new A(); a.foo(""); a = new B(); a.foo(""); a = new C(); a.foo(""); B b = new B(); b.foo(""); b = new C(); b.foo(""); C c = new C(); c.foo(""); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/CustomGenericsAndFields.java000066400000000000000000000100271342410422700322350ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; // what IS illegal and we don't have to worry about: // "x instanceof E" // y = new Q(); interface IGeneric { E foo(); E bar(E x, E y); } // Y: "implements IGeneric" (no ) // TOTRY: two arguments class ConcreteGeneric implements IGeneric { Q x; @Override public Q bar(Q a, Q b) { x = a; if (b.hashCode() == a.hashCode() || b.toString().equals(a.toString())) return a; return b; } @Override public Q foo() { return x; } } class ConcreteGeneric2 extends ConcreteGeneric { Q y; public void setFoo(Q a) { y = a; } @Override public Q foo() { return y; } } class MyGeneric> { A a; B b; // TODO: check field type public MyGeneric(A a, B b) { // TODO: check parameter type this.a = a; this.b = b; } public A doFoo() { // TODO: check return value type return b.foo(); } public B getB() { return b; } } public class CustomGenericsAndFields { static ConcreteGeneric2 cg2 = new ConcreteGeneric2<>(); static public ConcreteGeneric2 cg2WithSideEffects() { System.out.println("look at me! I'm a side effect!"); return cg2; } public static void main(String args[]) { (new CustomGenericsAndFields()).doit(); } private void doit() { // Simple: concrete generic ConcreteGeneric absinthe = new ConcreteGeneric<>(); IGeneric rye = absinthe; String foo = rye.bar("hello", "world"); System.out.println(absinthe.foo() + foo); ///////////////////////////// String thrownaway = cg2.bar("a","b"); cg2.setFoo("real one"); MyGeneric> mygeneric = new MyGeneric<>("useless",cg2); String x = mygeneric.doFoo(); System.out.println(x); String y = cg2.x; System.out.println(mygeneric.getB().y); System.out.println(mygeneric.b.y); // TODO: fields are going to be a pain... watch out for Lvalues in context? cg2.x = null; cg2.x = "hello"; // mygeneric.getB().y+="hey"; // TODO: this is going to be a MAJOR pain... String real_oneheyya = (((cg2WithSideEffects().y))+="hey")+"ya"; // TODO: this is going to be a MAJOR pain... System.out.println(real_oneheyya); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/EnumSwitch.java000066400000000000000000000054261342410422700276260ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class EnumSwitch { public enum Palo { OROS, COPAS, ESPADAS, BASTOS; } public static void main(String args[]) { for(Palo p : Palo.values()) { (new EnumSwitch()).doit(p); } } private void doit(Palo caballo) { int x = 5; int y = 3, z = 2; int total = 0; switch ( caballo ) { case OROS: total = x - y; System.out.println("gold"); break; case COPAS: total = x * x; y = y + y; System.out.println("cups"); break; case ESPADAS: total = z + z; y = 2 + 4; System.out.println("swords"); break; case BASTOS: total = x / y + z; z = x + y; System.out.println("clubs"); break; default: total = x + x + x + x; System.out.println("baraja inglesa"); } System.out.println(x); System.out.println(y); System.out.println(z); System.out.println(total); System.out.println(Palo.valueOf(caballo.toString())); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/ExplicitBoxingTest.java000066400000000000000000000045611342410422700313270ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class ExplicitBoxingTest { public static void main(String[] args) { (new ExplicitBoxingTest()).doit(); } private void doit() { int a = 6; a = a + a; System.out.println(a); Integer useless1 = Integer.valueOf(5+6); Integer aa = Integer.valueOf(a+a); int aaa = aa.intValue(); System.out.println(aaa); int b = 6; b = b + b; System.out.println(b); Integer useless2 = 5+6; Integer bb = b+b; int bbb = bb; System.out.println(bbb); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/GenericArrays.java000066400000000000000000000045741342410422700303010ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; import java.util.ArrayList; import java.util.List; public class GenericArrays { public static void main(String args[]) { (new GenericArrays()).doit(); } private void doit() { List[] lsa = new List[10]; // ok, array of unbounded wildcard type Object o = lsa; Object[] oa = (Object[]) o; List li = new ArrayList<>(); li.add(Integer.valueOf(3)); oa[1] = li; // correct String s = (String) lsa[1].get(0); // run time error, but cast is explicit } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/GenericMemberClasses.java000066400000000000000000000050461342410422700315600ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; import java.util.Iterator; public class GenericMemberClasses { protected class A implements Iterator { T x = null; private int localChangeID; @Override public boolean hasNext() { return ( localChangeID == 5 ); } @Override public T next() { localChangeID = 5; return x; } @Override public void remove() { } } public static void main(String args[]) { (new GenericMemberClasses<>()).doit(); } private void doit() { A a = new A(); while (a.hasNext()) { Object x = a.next(); a.remove(); System.out.println(x); } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/GenericSuperSink.java000066400000000000000000000046021342410422700307530ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; import java.util.ArrayList; import java.util.Collection; public class GenericSuperSink { public static void main(String args[]) { (new GenericSuperSink()).doit(); } private void doit() { Collection sink; Collection cs = new ArrayList<>(); cs.add("hello"); sink = new ArrayList(); sink.add(cs.iterator().next()); System.out.println(sink); sink = new ArrayList<>(); sink.add(cs.iterator().next()); System.out.println(sink); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/MethodGenerics.java000066400000000000000000000050141342410422700304310ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; import java.util.ArrayList; import java.util.Collection; public class MethodGenerics { static void fromArrayToCollection(T[] a, Collection c) { c.add(a[0]); } static void foo(String x, T y) { x = y; System.out.println(x); } public static void main(String args[]) { (new MethodGenerics()).doit(); } private void doit() { ArrayList list = new ArrayList<>(); String array[] = new String[] { "coucou monde", "ciao mondo", "guten tag welt", "hola mundo", "shalom olam" }; fromArrayToCollection(array, list); System.out.println(list); foo("whatever", "whatever"); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/MoreOverriddenGenerics.java000066400000000000000000000051021342410422700321330ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class MoreOverriddenGenerics { class Super { T x; public T get() { return x; } } class Sub extends Super { @Override public Number get() { return super.get(); } } class SubSub extends Sub { @Override public Long get() { return Long.valueOf(6); } } private void doit() { String x = new Super().get(); System.err.println(x); Super s = new Sub(); Number n = s.get(); SubSub sss = new SubSub(); n = sss.get(); Sub ss = sss; n = ss.get(); s = sss; n = s.get(); System.err.println(n); } public static void main(String args[]) { (new MoreOverriddenGenerics()).doit(); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/NotSoSimpleEnums.java000066400000000000000000000055311342410422700307610ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class NotSoSimpleEnums { public enum Direction { NORTH("nord") { @Override public Direction getOpposite() { return SOUTH; }}, EAST("est") { @Override public Direction getOpposite() { return WEST; }}, SOUTH("sud") { @Override public Direction getOpposite() { return NORTH; }}, WEST("ouest") { @Override public Direction getOpposite() { return EAST; }}; public abstract Direction getOpposite(); String translation; Direction(String translation) { this.translation = translation; } public String getTranslation() { return translation; } } private void doit(Direction d) { System.out.println(d.getTranslation() + " " + Direction.valueOf(d.getOpposite().toString())); } public static void main(String args[]) { System.out.println("never eat shredded wheat"); for(Direction d : Direction.values()) { (new NotSoSimpleEnums()).doit(d); } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/OverridesOnePointFour.java000066400000000000000000000044421342410422700320070ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class OverridesOnePointFour { static interface Super { public Number get(); } static class Sub implements Super { @Override public Long get() { return Long.valueOf(6); } } public static void main(String args[]) { (new OverridesOnePointFour()).doit(); } private void doit() { Super sup = new Sub(); Number x = sup.get(); System.out.println(x); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/SimpleEnums.java000066400000000000000000000044271342410422700300010ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class SimpleEnums { public enum Direction { NORTH, EAST, SOUTH, WEST; } private void doit(Direction d) { System.out.println(d + " " + Direction.valueOf(d.toString())); } public static void main(String args[]) { System.out.println("never eat shredded wheat"); for(Direction d : Direction.values()) { (new SimpleEnums()).doit(d); } } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/SimpleEnums2.java000066400000000000000000000057641342410422700300700ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class SimpleEnums2 { public enum Direction { NORTH, EAST, SOUTH, WEST; public static void hello() { System.out.println(NORTH); } public static Direction[] myValues() { return new Direction[] { NORTH, EAST, SOUTH, WEST }; } } public static void main(String args[]) { (new SimpleEnums2()).doit(); } private void doit() { System.out.println("never eat shredded wheat"); System.out.println(Direction.NORTH); System.out.println(Direction.EAST); System.out.println(Direction.SOUTH); System.out.println(Direction.WEST); Direction abc = Enum.valueOf(Direction.class, "NORTH"); Direction efg = Direction.valueOf("NORTH"); System.out.println(abc); System.out.println(efg); Direction x = Direction.values()[0]; System.out.println(x); Direction y = Direction.myValues()[0]; System.out.println(y); } // public static class Foo { // public static final Foo foo = new Foo("NORTH",1); // public Foo(String string, int i) { // } // } // public static void main(String args[]) { // System.out.println(Foo.foo); // } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/TypeInferencePrimAndStringOp.java000066400000000000000000000012611342410422700332320ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package javaonepointfive; public class TypeInferencePrimAndStringOp { public static void main(String[] args) { int a = 2; String result = "a" + a; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/Varargs.java000066400000000000000000000054551342410422700271470ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class Varargs { public Varargs(int... x) { System.out.println(x[0]==x[1]); } public Varargs() { this(1,1); } public static void varargs(int x, int y, Object... foo) { System.out.println(x); System.out.println(y); for (int i = 0; i < foo.length; i++) System.out.println(foo[i]); new Varargs(); } // try overriding a function and causing havoc (i assume it knows at compile time whether to expand varargs) public static void varargs(int x, int y, String foo, String xa, String ya, String z) { System.out.println("gotcha!"); } public static void main(String args[]) { varargs(2, 3, new String[] { "hello", "world" }); varargs(2, 3, (Object) new String[] { "hello", "world" }); varargs(2, 3, (Object[]) new String[] { "hello", "world" }); varargs(2, 3); varargs(2, 3, "hi"); varargs(2, 3, "hello", "there"); varargs(4, 5, "coucou", "monde", "shalom", "'olam"); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/VarargsCovariant.java000066400000000000000000000045611342410422700310130ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; public class VarargsCovariant { static class A { A hello(int... x) { System.out.println("a hello"); return this; } } static class B extends A { @Override B hello(int... x) { System.out.println("b hello"); return this; } } public static void main(String args[]) { (new VarargsCovariant()).doit(); } private void doit() { A a = new A(); a.hello(3114, 35, 74, 51617054); a = new B(); a.hello(3114, 35, 74, 51617054); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/VarargsOverriding.java000066400000000000000000000057631342410422700312020ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; class Alef { void foo(String... args) { System.out.println("var args not overridden"); } } class Bet extends Alef { void foo(String a, String b) { System.out.println("non-varargs overrides varargs"); } } class Alpha { void foo(String a, String b) { System.out.println("non-varargs not overridden"); } } class Beta extends Alpha { void foo(String... args) { System.out.println("varargs overrides non-varargs"); } } //// class VarityTestSuper { void bar(String... args) {} } class VarityTestSub extends VarityTestSuper { @Override void bar(String... args) {} } public class VarargsOverriding { public static void main(String args[]) { (new VarargsOverriding()).doit(); } private void doit() { Bet b = new Bet(); Alef a = b; a.foo("hello", "world"); b.foo("hello", "world"); Beta bb = new Beta(); Alpha aa = bb; aa.foo("hello", "world"); bb.foo("hello", "world"); bb.foo("hello", "world", "and", "more"); VarityTestSuper x = new VarityTestSuper(); x.bar("Hello", "world", "howareya"); x = new VarityTestSub(); x.bar("Hello", "world", "howareya"); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/javaonepointfive/Wildcards.java000066400000000000000000000054511342410422700274520ustar00rootroot00000000000000/* * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * * This file is a derivative of code released by the University of * California under the terms listed below. * * WALA JDT Frontend is Copyright (c) 2008 The Regents of the * University of California (Regents). Provided that this notice and * the following two paragraphs are included in any distribution of * Refinement Analysis Tools or its derivative work, Regents agrees * not to assert any of Regents' copyright rights in Refinement * Analysis Tools against recipient for recipient's reproduction, * preparation of derivative works, public display, public * performance, distribution or sublicensing of Refinement Analysis * Tools and derivative works, in source code and object code form. * This agreement not to assert does not confer, by implication, * estoppel, or otherwise any license or rights in any intellectual * property of Regents, including, but not limited to, any patents * of Regents or Regents' employees. * * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ package javaonepointfive; import java.util.ArrayList; public class Wildcards { public void printCollection(ArrayList c) { // for (Object e : c) { // for (Iterator tmp = c.iterator(); tmp.hasNext(); ) { // Object e = tmp.next(); Object e = c.get(0); System.out.println(e); // } } public void printCollection1(ArrayList c) { Object e = c.get(0); System.out.println(e); } public void printCollection2(ArrayList c) { String e = c.get(0); System.out.println(e); } public static void main(String args[]) { (new Wildcards()).doit(); } private void doit() { ArrayList e = new ArrayList<>(); e.add("hello"); e.add("goodbye"); printCollection(e); printCollection1(e); printCollection2(e); ArrayList e3 = new ArrayList<>(); e3.add(Integer.valueOf(123)); e3.add(Integer.valueOf(42)); printCollection(e3); printCollection1(e3); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/p/000077500000000000000000000000001342410422700215565ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test.data/src/p/NonPrimaryTopLevel.java000066400000000000000000000013131342410422700261700ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package p; public class NonPrimaryTopLevel { public static void main(String[] args) { NonPrimaryTopLevel nptl= new NonPrimaryTopLevel(); Foo f = new Foo(); } } class Foo { } WALA-R_1.5.1/com.ibm.wala.cast.java.test/000077500000000000000000000000001342410422700176205ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/.launchConfigurations/000077500000000000000000000000001342410422700240635ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/.launchConfigurations/WALA-CAst-Java-Test-Downloads.launch000066400000000000000000000007161342410422700323630ustar00rootroot00000000000000 WALA-R_1.5.1/com.ibm.wala.cast.java.test/.settings/000077500000000000000000000000001342410422700215365ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/.settings/org.eclipse.jdt.core.prefs000066400000000000000000000751501342410422700265300ustar00rootroot00000000000000eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=error org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=error org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=error org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=error org.eclipse.jdt.core.compiler.problem.finalParameterBound=error org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=error org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=error org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=error org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=error org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=error org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=error org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.rawTypeReference=error org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=error org.eclipse.jdt.core.compiler.problem.unusedLocal=error org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error org.eclipse.jdt.core.compiler.problem.unusedParameter=error org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=132 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true WALA-R_1.5.1/com.ibm.wala.cast.java.test/.settings/org.eclipse.jdt.ui.prefs000066400000000000000000000002661342410422700262110ustar00rootroot00000000000000#Thu Jan 03 11:24:43 EST 2008 eclipse.preferences.version=1 formatter_profile=_WALA formatter_settings_version=11 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true WALA-R_1.5.1/com.ibm.wala.cast.java.test/.settings/org.eclipse.pde.prefs000066400000000000000000000020161342410422700255570ustar00rootroot00000000000000compilers.f.unresolved-features=0 compilers.f.unresolved-plugins=0 compilers.incompatible-environment=0 compilers.p.build=0 compilers.p.build.bin.includes=0 compilers.p.build.encodings=0 compilers.p.build.java.compiler=0 compilers.p.build.java.compliance=0 compilers.p.build.missing.output=0 compilers.p.build.output.library=0 compilers.p.build.source.library=0 compilers.p.build.src.includes=0 compilers.p.deprecated=0 compilers.p.discouraged-class=0 compilers.p.internal=0 compilers.p.missing-packages=0 compilers.p.missing-version-export-package=2 compilers.p.missing-version-import-package=0 compilers.p.missing-version-require-bundle=2 compilers.p.no-required-att=0 compilers.p.not-externalized-att=0 compilers.p.unknown-attribute=0 compilers.p.unknown-class=0 compilers.p.unknown-element=0 compilers.p.unknown-identifier=0 compilers.p.unknown-resource=0 compilers.p.unresolved-ex-points=0 compilers.p.unresolved-import=0 compilers.s.create-docs=false compilers.s.doc-folder=doc compilers.s.open-tags=0 eclipse.preferences.version=1 WALA-R_1.5.1/com.ibm.wala.cast.java.test/.settings/org.eclipse.wst.validation.prefs000066400000000000000000000021021342410422700277510ustar00rootroot00000000000000DELEGATES_PREFERENCE=delegateValidatorList USER_BUILD_PREFERENCE=enabledBuildValidatorList USER_MANUAL_PREFERENCE=enabledManualValidatorList USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600 eclipse.preferences.version=1 override=true suspend=false vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03 vals/org.eclipse.wst.xml.core.xml/groups=0107include05111contentType128org.eclipse.core.runtime.xmlT111contentType134org.eclipse.wst.xml.core.xmlsourceT111contentType134org.eclipse.wst.xml.core.xslsourceT111contentType134org.eclipse.jst.jsp.core.tldsourceT07fileext03xmlF0107exclude07113projectNature134org.eclipse.jst.j2ee.ejb.EJBNature113projectNature130org.eclipse.jst.j2ee.EARNature04file08.projectT0104file110.classpathT0104file110.settings/T0204file122target/p2artifacts.xmlT0304file120target/p2content.xmlT03 vf.version=3 WALA-R_1.5.1/com.ibm.wala.cast.java.test/META-INF/000077500000000000000000000000001342410422700207605ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/META-INF/MANIFEST.MF000066400000000000000000000011221342410422700224060ustar00rootroot00000000000000Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.ibm.wala.cast.java.test Bundle-Version: 1.5.1 Bundle-Activator: com.ibm.wala.cast.java.test.TestPlugin Bundle-Vendor: %Bundle-Vendor Require-Bundle: com.ibm.wala.core.tests, com.ibm.wala.cast.java, com.ibm.wala.cast, com.ibm.wala.core, com.ibm.wala.shrike, org.eclipse.core.runtime, org.junit;bundle-version="4.0.0" Bundle-ActivationPolicy: lazy Export-Package: com.ibm.wala.cast.java.test Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Automatic-Module-Name: com.ibm.wala.cast.java.test WALA-R_1.5.1/com.ibm.wala.cast.java.test/OSGI-INF/000077500000000000000000000000001342410422700207735ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/OSGI-INF/l10n/000077500000000000000000000000001342410422700215455ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/OSGI-INF/l10n/bundle.properties000066400000000000000000000001551342410422700251350ustar00rootroot00000000000000#Properties file for com.ibm.wala.cast.java.test Bundle-Vendor = IBM Bundle-Name = Java AST WALA Test Plug-inWALA-R_1.5.1/com.ibm.wala.cast.java.test/build.gradle000066400000000000000000000012031342410422700220730ustar00rootroot00000000000000plugins { id 'com.github.hauner.jarTest' id 'eclipse' } eclipse.project.natures 'org.eclipse.pde.PluginNature' sourceSets.test { java.srcDirs = ['src'] resources.srcDirs = ['data'] } publishing.publications { mavenJava(MavenPublication) { artifact jarTest } } dependencies { testCompile( 'junit:junit:4.12', 'org.osgi:org.osgi.core:4.2.0', project(':com.ibm.wala.cast'), project(':com.ibm.wala.cast.java'), project(':com.ibm.wala.core'), project(':com.ibm.wala.shrike'), project(':com.ibm.wala.util'), project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests'), ) } test { maxHeapSize = '800M' } WALA-R_1.5.1/com.ibm.wala.cast.java.test/build.properties000066400000000000000000000002071342410422700230340ustar00rootroot00000000000000source.. = src/ output.. = bin/test bin.includes = META-INF/,\ .,\ OSGI-INF/ javacProjectSettings = true WALA-R_1.5.1/com.ibm.wala.cast.java.test/pom.xml000066400000000000000000000025661342410422700211460ustar00rootroot00000000000000 4.0.0 com.ibm.wala WALA 1.5.1 com.ibm.wala.cast.java.test eclipse-plugin org.apache.maven.plugins maven-surefire-plugin test test ${project.build.outputDirectory} -Xmx800M -ea true test junit junit 4.12 test WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/000077500000000000000000000000001342410422700204075ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/000077500000000000000000000000001342410422700211655ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/ibm/000077500000000000000000000000001342410422700217345ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/ibm/wala/000077500000000000000000000000001342410422700226605ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/ibm/wala/cast/000077500000000000000000000000001342410422700236125ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/ibm/wala/cast/java/000077500000000000000000000000001342410422700245335ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/ibm/wala/cast/java/test/000077500000000000000000000000001342410422700255125ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/ibm/wala/cast/java/test/IRTests.java000066400000000000000000000435441342410422700277240ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ /* * Created on Oct 3, 2005 */ package com.ibm.wala.cast.java.test; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.jar.JarFile; import org.junit.Assert; import com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine; import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope; import com.ibm.wala.cast.loader.AstClass; import com.ibm.wala.cast.loader.AstMethod; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.IClassLoader; import com.ibm.wala.classLoader.IMethod; import com.ibm.wala.classLoader.JarFileModule; import com.ibm.wala.classLoader.Language; import com.ibm.wala.classLoader.SourceDirectoryTreeModule; import com.ibm.wala.classLoader.SourceFileModule; import com.ibm.wala.client.AbstractAnalysisEngine; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.CallGraphBuilder; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.properties.WalaProperties; import com.ibm.wala.ssa.IR; import com.ibm.wala.ssa.SSAInstruction; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.types.MethodReference; import com.ibm.wala.types.TypeName; import com.ibm.wala.types.TypeReference; import com.ibm.wala.types.annotations.Annotation; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.collections.HashSetFactory; import com.ibm.wala.util.collections.Iterator2Iterable; import com.ibm.wala.util.collections.Pair; import com.ibm.wala.util.debug.Assertions; import com.ibm.wala.util.strings.Atom; public abstract class IRTests { protected boolean dump = false; protected IRTests(String projectName) { this.projectName = projectName; } protected final String projectName; protected static String javaHomePath; private String testSrcPath = "." + File.separator + "src"; public static final List rtJar = Arrays.asList(WalaProperties.getJ2SEJarFiles()); protected static List emptyList = Collections.emptyList(); // TODO delete this code; leaving just in case --MS // static { // boolean found = false; // try { // rtJar = new LinkedList(); // // Properties p = WalaProperties.loadProperties(); // javaHomePath = p.getProperty(WalaProperties.J2SE_DIR); // // if (new File(javaHomePath).isDirectory()) { // if ("Mac OS X".equals(System.getProperty("os.name"))) { // nick // /** // * todo: {@link WalaProperties#getJ2SEJarFiles()} // */ // rtJar.add(javaHomePath + "/classes.jar"); // rtJar.add(javaHomePath + "/ui.jar"); // } else { // rtJar.add(javaHomePath + File.separator + "classes.jar"); // rtJar.add(javaHomePath + File.separator + "rt.jar"); // rtJar.add(javaHomePath + File.separator + "core.jar"); // rtJar.add(javaHomePath + File.separator + "vm.jar"); // } // found = true; // } // } catch (Exception e) { // // no properties // } // // if (!found) { // javaHomePath = System.getProperty("java.home"); // if ("Mac OS X".equals(System.getProperty("os.name"))) { // nick // rtJar.add(javaHomePath + "/../Classes/classes.jar"); // rtJar.add(javaHomePath + "/../Classes/ui.jar"); // } else { // rtJar.add(javaHomePath + File.separator + "lib" + File.separator + "rt.jar"); // rtJar.add(javaHomePath + File.separator + "lib" + File.separator + "core.jar"); // rtJar.add(javaHomePath + File.separator + "lib" + File.separator + "vm.jar"); // rtJar.add(javaHomePath + File.separator + "lib" + File.separator + "classes.jar"); // } // } // } public interface IRAssertion { void check(CallGraph cg); } protected static class EdgeAssertions implements IRAssertion { public final String srcDescriptor; public final List/* */ tgtDescriptors = new ArrayList<>(); public EdgeAssertions(String srcDescriptor) { this.srcDescriptor = srcDescriptor; } public static EdgeAssertions make(String srcDescriptor, String tgtDescriptor) { EdgeAssertions ea = new EdgeAssertions(srcDescriptor); ea.tgtDescriptors.add(tgtDescriptor); return ea; } public static EdgeAssertions make(String srcDescriptor, String tgtDescriptor1, String tgtDescriptor2) { EdgeAssertions ea = new EdgeAssertions(srcDescriptor); ea.tgtDescriptors.add(tgtDescriptor1); ea.tgtDescriptors.add(tgtDescriptor2); return ea; } public static EdgeAssertions make(String srcDescriptor, String tgtDescriptor1, String tgtDescriptor2, String tgtDescriptor3) { EdgeAssertions ea = new EdgeAssertions(srcDescriptor); ea.tgtDescriptors.add(tgtDescriptor1); ea.tgtDescriptors.add(tgtDescriptor2); ea.tgtDescriptors.add(tgtDescriptor3); return ea; } public static EdgeAssertions make(String srcDescriptor, String tgtDescriptor1, String tgtDescriptor2, String tgtDescriptor3, String tgtDescriptor4) { EdgeAssertions ea = new EdgeAssertions(srcDescriptor); ea.tgtDescriptors.add(tgtDescriptor1); ea.tgtDescriptors.add(tgtDescriptor2); ea.tgtDescriptors.add(tgtDescriptor3); ea.tgtDescriptors.add(tgtDescriptor4); return ea; } @Override public void check(CallGraph callGraph) { MethodReference srcMethod = descriptorToMethodRef(this.srcDescriptor, callGraph.getClassHierarchy()); Set srcNodes = callGraph.getNodes(srcMethod); if (srcNodes.size() == 0) { System.err.println(("Unreachable/non-existent method: " + srcMethod)); return; } if (srcNodes.size() > 1) { System.err.println("Context-sensitive call graph?"); } // Assume only one node for src method CGNode srcNode = srcNodes.iterator().next(); for (String target : this.tgtDescriptors) { MethodReference tgtMethod = descriptorToMethodRef(target, callGraph.getClassHierarchy()); // Assume only one node for target method Set tgtNodes = callGraph.getNodes(tgtMethod); if (tgtNodes.size() == 0) { System.err.println(("Unreachable/non-existent method: " + tgtMethod)); continue; } CGNode tgtNode = tgtNodes.iterator().next(); boolean found = false; for (CGNode succ : Iterator2Iterable.make(callGraph.getSuccNodes(srcNode))) { if (tgtNode == succ) { found = true; break; } } if (!found) { System.err.println(("Missing edge: " + srcMethod + " -> " + tgtMethod)); } } } } protected static class SourceMapAssertion implements IRAssertion { private final String method; private final String variableName; private final int definingLineNumber; protected SourceMapAssertion(String method, String variableName, int definingLineNumber) { this.method = method; this.variableName = variableName; this.definingLineNumber = definingLineNumber; } @Override public void check(CallGraph cg) { MethodReference mref = descriptorToMethodRef(method, cg.getClassHierarchy()); for (CGNode cgNode : cg.getNodes(mref)) { Assert.assertTrue("failed for " + this.variableName + " in " + cgNode + "\n" + cgNode.getIR(), this.check(cgNode.getMethod(), cgNode.getIR())); } } boolean check(IMethod m, IR ir) { System.err.println(("check for " + variableName + " defined at " + definingLineNumber)); SSAInstruction[] insts = ir.getInstructions(); for (int i = 0; i < insts.length; i++) { if (insts[i] != null) { int ln = m.getLineNumber(i); if (ln == definingLineNumber) { System.err.println((" found " + insts[i] + " at " + ln)); for (int j = 0; j < insts[i].getNumberOfDefs(); j++) { int def = insts[i].getDef(j); System.err.println((" looking at def " + j + ": " + def)); String[] names = ir.getLocalNames(i, def); if (names != null) { for (String name : names) { System.err.println((" looking at name " + name)); if (name.equals(variableName)) { return true; } } } } } } } return false; } } protected static class AnnotationAssertions implements IRAssertion { public static class ClassAnnotation { private final String className; private final String annotationTypeName; public ClassAnnotation(String className, String annotationTypeName) { super(); this.className = className; this.annotationTypeName = annotationTypeName; } } public static class MethodAnnotation { private final String methodSig; private final String annotationTypeName; public MethodAnnotation(String methodSig, String annotationTypeName) { super(); this.methodSig = methodSig; this.annotationTypeName = annotationTypeName; } } public final Set classAnnotations = HashSetFactory.make(); public final Set methodAnnotations = HashSetFactory.make(); @Override public void check(CallGraph cg) { classes: for(ClassAnnotation ca : classAnnotations) { IClass cls = cg.getClassHierarchy().lookupClass(TypeReference.findOrCreate(ClassLoaderReference.Application, ca.className)); IClass at = cg.getClassHierarchy().lookupClass(TypeReference.findOrCreate(ClassLoaderReference.Application, ca.annotationTypeName)); for(Annotation a : cls.getAnnotations()) { if (a.getType().equals(at.getReference())) { continue classes; } } Assert.assertFalse("cannot find " + at + " in " + cls, false); } annot: for(MethodAnnotation ma : methodAnnotations) { IClass at = cg.getClassHierarchy().lookupClass(TypeReference.findOrCreate(ClassLoaderReference.Application, ma.annotationTypeName)); for(CGNode n : cg) { if (n.getMethod().getSignature().equals(ma.methodSig)) { for(Annotation a : n.getMethod().getAnnotations()) { if (a.getType().equals(at.getReference())) { continue annot; } } Assert.assertFalse("cannot find " + at, false); } } } } } protected Collection singleTestSrc() { return Collections.singletonList(getTestSrcPath() + File.separator + singleJavaInputForTest()); } protected Collection singleTestSrc(final String folder) { return Collections.singletonList(getTestSrcPath() + File.separator + folder + File.separator + singleJavaInputForTest()); } protected Collection singlePkgTestSrc(String pkgName) { return Collections.singletonList(getTestSrcPath() + File.separator + singleJavaPkgInputForTest(pkgName)); } protected String getTestName() { StackTraceElement stack[] = new Throwable().getStackTrace(); for(int i = 0; i <= stack.length; i++) { if (stack[i].getMethodName().startsWith("test")) { return stack[i].getMethodName(); } } throw new Error("test method not found"); } protected String[] simpleTestEntryPoint() { return new String[] { 'L' + getTestName().substring(4) }; } protected String[] simplePkgTestEntryPoint(String pkgName) { return new String[] { "L" + pkgName + "/" + getTestName().substring(4) }; } protected abstract AbstractAnalysisEngine, ?> getAnalysisEngine(String[] mainClassDescriptors, Collection sources, List libs); public Pair> runTest(Collection sources, List libs, String[] mainClassDescriptors, List ca, boolean assertReachable, String exclusionsFile) throws IllegalArgumentException, CancelException, IOException { AbstractAnalysisEngine, ?> engine = getAnalysisEngine(mainClassDescriptors, sources, libs); if (exclusionsFile != null) { engine.setExclusionsFile(exclusionsFile); } CallGraph callGraph; callGraph = engine.buildDefaultCallGraph(); //System.err.println(callGraph.toString()); // If we've gotten this far, IR has been produced. if (dump) { dumpIR(callGraph, sources, assertReachable); } // Now check any assertions as to source mapping for (IRAssertion IRAssertion : ca) { IRAssertion.check(callGraph); } return Pair.make(callGraph, engine.getPointerAnalysis()); } protected static void dumpIR(CallGraph cg, Collection sources, boolean assertReachable) { Set sourcePaths = HashSetFactory.make(); for(String src : sources) { sourcePaths.add(src.substring(src.lastIndexOf(File.separator)+1)); } Set unreachable = HashSetFactory.make(); IClassHierarchy cha = cg.getClassHierarchy(); IClassLoader sourceLoader = cha.getLoader(JavaSourceAnalysisScope.SOURCE); for (IClass clazz : Iterator2Iterable.make(sourceLoader.iterateAllClasses())) { System.err.println(clazz); if (clazz.isInterface()) continue; for (IMethod m : clazz.getDeclaredMethods()) { if (m.isAbstract()) { System.err.println(m); } else { Iterator nodeIter = cg.getNodes(m.getReference()).iterator(); if (!nodeIter.hasNext()) { if (m instanceof AstMethod) { String fn = ((AstClass)m.getDeclaringClass()).getSourcePosition().getURL().getFile(); if (sourcePaths.contains(fn.substring(fn.lastIndexOf(File.separator)+1))) { System.err.println(("Method " + m.getReference() + " not reachable?")); unreachable.add(m); } } continue; } CGNode node = nodeIter.next(); System.err.println(node.getIR()); } } } if (assertReachable) { Assert.assertTrue("unreachable methods: " + unreachable.toString(), unreachable.isEmpty()); } } /** * @param srcMethodDescriptor a full method descriptor of the form ldr#type#methName#methSig example: * Source#Simple1#main#([Ljava/lang/String;)V */ public static MethodReference descriptorToMethodRef(String srcMethodDescriptor, IClassHierarchy cha) { String[] ldrTypeMeth = srcMethodDescriptor.split("\\#"); String loaderName = ldrTypeMeth[0]; String typeStr = ldrTypeMeth[1]; String methName = ldrTypeMeth[2]; String methSig = ldrTypeMeth[3]; TypeReference typeRef = findOrCreateTypeReference(loaderName, typeStr, cha); Language l = cha.getLoader(typeRef.getClassLoader()).getLanguage(); return MethodReference.findOrCreate(l, typeRef, methName, methSig); } static TypeReference findOrCreateTypeReference(String loaderName, String typeStr, IClassHierarchy cha) { ClassLoaderReference clr = findLoader(loaderName, cha); TypeName typeName = TypeName.string2TypeName('L' + typeStr); TypeReference typeRef = TypeReference.findOrCreate(clr, typeName); return typeRef; } private static ClassLoaderReference findLoader(String loaderName, IClassHierarchy cha) { Atom loaderAtom = Atom.findOrCreateUnicodeAtom(loaderName); IClassLoader[] loaders = cha.getLoaders(); for (IClassLoader loader : loaders) { if (loader.getName() == loaderAtom) { return loader.getReference(); } } Assertions.UNREACHABLE(); return null; } public static void populateScope(JavaSourceAnalysisEngine engine, Collection sources, List libs) { boolean foundLib = false; for (String lib : libs) { File libFile = new File(lib); if (libFile.exists()) { foundLib = true; try { engine.addSystemModule(new JarFileModule(new JarFile(libFile, false))); } catch (IOException e) { Assert.fail(e.getMessage()); } } } assert foundLib : "couldn't find library file from " + libs; for (String srcFilePath : sources) { String srcFileName = srcFilePath.substring(srcFilePath.lastIndexOf(File.separator) + 1); File f = new File(srcFilePath); Assert.assertTrue("couldn't find " + srcFilePath, f.exists()); if (f.isDirectory()) { engine.addSourceModule(new SourceDirectoryTreeModule(f)); } else { engine.addSourceModule(new SourceFileModule(f, srcFileName, null)); } } } protected void setTestSrcPath(String testSrcPath) { this.testSrcPath = testSrcPath; } protected String getTestSrcPath() { return testSrcPath; } protected String singleJavaInputForTest() { return getTestName().substring(4) + ".java"; } protected String singleInputForTest() { return getTestName().substring(4); } protected String singleJavaPkgInputForTest(String pkgName) { return pkgName + File.separator + getTestName().substring(4) + ".java"; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/ibm/wala/cast/java/test/JLexTest.java000066400000000000000000000021461342410422700300620ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.test; import java.io.IOException; import org.junit.Test; import com.ibm.wala.util.CancelException; public abstract class JLexTest extends IRTests { public JLexTest() { super(null); } @Override protected String singleJavaInputForTest() { return "JLex"; } @Test public void testJLex() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, new String[] { "LJLex/Main" }, emptyList, false, null); } @Override protected String singleJavaPkgInputForTest(String pkgName) { return ""; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/ibm/wala/cast/java/test/JavaIRTests.java000066400000000000000000000634071342410422700305260ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ /* * Created on Oct 21, 2005 */ package com.ibm.wala.cast.java.test; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Set; import org.junit.Assert; import org.junit.Test; import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope; import com.ibm.wala.cast.java.ipa.slicer.AstJavaSlicer; import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl; import com.ibm.wala.cast.java.ssa.EnclosingObjectReference; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.Language; import com.ibm.wala.core.tests.slicer.SlicerTest; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.LocalPointerKey; import com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.ipa.slicer.SDG; import com.ibm.wala.ipa.slicer.Statement; import com.ibm.wala.ssa.SSAArrayLengthInstruction; import com.ibm.wala.ssa.SSAArrayReferenceInstruction; import com.ibm.wala.ssa.SSAArrayStoreInstruction; import com.ibm.wala.ssa.SSAGetInstruction; import com.ibm.wala.ssa.SSAInstruction; import com.ibm.wala.ssa.SSANewInstruction; import com.ibm.wala.ssa.SymbolTable; import com.ibm.wala.types.Descriptor; import com.ibm.wala.types.FieldReference; import com.ibm.wala.types.MethodReference; import com.ibm.wala.types.TypeName; import com.ibm.wala.types.TypeReference; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.collections.Pair; import com.ibm.wala.util.io.TemporaryFile; import com.ibm.wala.util.strings.Atom; public abstract class JavaIRTests extends IRTests { public JavaIRTests(String projectName) { super(projectName); } public JavaIRTests() { this(null); } @Test public void testSimple1() throws IllegalArgumentException, CancelException, IOException { List assertions = Arrays.asList( new SourceMapAssertion("Source#Simple1#doStuff#(I)V", "prod", 24), new SourceMapAssertion("Source#Simple1#doStuff#(I)V", "j", 23), new SourceMapAssertion("Source#Simple1#main#([Ljava/lang/String;)V", "s", 32), new SourceMapAssertion("Source#Simple1#main#([Ljava/lang/String;)V", "i", 28), new SourceMapAssertion("Source#Simple1#main#([Ljava/lang/String;)V", "sum", 29), EdgeAssertions.make("Source#Simple1#main#([Ljava/lang/String;)V", "Source#Simple1#doStuff#(I)V"), EdgeAssertions.make("Source#Simple1#instanceMethod1#()V", "Source#Simple1#instanceMethod2#()V")); // this needs soure positions to work too runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), assertions, true, null); } @Test public void testTwoClasses() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Collections.singletonList( cg -> { final String typeStr = singleInputForTest(); final TypeReference type = findOrCreateTypeReference("Source", typeStr, cg.getClassHierarchy()); final IClass iClass = cg.getClassHierarchy().lookupClass(type); Assert.assertNotNull("Could not find class " + typeStr, iClass); /* Assert.assertEquals("Expected two classes.", iClass.getClassLoader().getNumberOfClasses(), 2); for (IClass cls : Iterator2Iterable.make(iClass.getClassLoader().iterateAllClasses())) { Assert.assertTrue("Expected class to be either " + typeStr + " or " + "Bar", cls.getName().getClassName().toString() .equals(typeStr) || cls.getName().getClassName().toString().equals("Bar")); } */ }), true, null); } @Test public void testInterfaceTest1() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Arrays.asList( cg -> { final String typeStr = "IFoo"; final TypeReference type = findOrCreateTypeReference("Source", typeStr, cg.getClassHierarchy()); final IClass iClass = cg.getClassHierarchy().lookupClass(type); Assert.assertNotNull("Could not find class " + typeStr, iClass); Assert.assertTrue("Expected IFoo to be an interface.", iClass.isInterface()); }, cg -> { final String typeStr = "FooIT1"; final TypeReference type = findOrCreateTypeReference("Source", typeStr, cg.getClassHierarchy()); final IClass iClass = cg.getClassHierarchy().lookupClass(type); Assert.assertNotNull("Could not find class " + typeStr, iClass); final Collection interfaces = iClass.getDirectInterfaces(); Assert.assertEquals("Expected one single interface.", interfaces.size(), 1); Assert.assertTrue("Expected Foo to implement IFoo", interfaces.contains(cg.getClassHierarchy().lookupClass( findOrCreateTypeReference("Source", "IFoo", cg.getClassHierarchy())))); }), true, null); } @Test public void testInheritance1() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Collections.singletonList( cg -> { final String typeStr = "Derived"; final TypeReference type = findOrCreateTypeReference("Source", typeStr, cg.getClassHierarchy()); final IClass derivedClass = cg.getClassHierarchy().lookupClass(type); Assert.assertNotNull("Could not find class " + typeStr, derivedClass); final TypeReference baseType = findOrCreateTypeReference("Source", "Base", cg.getClassHierarchy()); final IClass baseClass = cg.getClassHierarchy().lookupClass(baseType); Assert.assertTrue("Expected 'Base' to be the superclass of 'Derived'", derivedClass.getSuperclass().equals(baseClass)); Collection subclasses = cg.getClassHierarchy().computeSubClasses(baseType); Assert.assertTrue("Expected subclasses of 'Base' to be 'Base' and 'Derived'.", subclasses.contains(derivedClass) && subclasses.contains(baseClass)); }), true, null); } @Test public void testArray1() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Collections.singletonList( /** * 'foo' has four array instructions: - 2 SSAArrayLengthInstruction - 1 * SSAArrayLoadInstruction - 1 SSAArrayStoreInstruction */ new IRAssertion() { @Override public void check(CallGraph cg) { MethodReference mref = descriptorToMethodRef("Source#Array1#foo#()V", cg.getClassHierarchy()); int count = 0; CGNode node = cg.getNodes(mref).iterator().next(); for (SSAInstruction s : node.getIR().getInstructions()) { if (isArrayInstruction(s)) { count++; } } Assert.assertEquals("Unexpected number of array instructions in 'foo'.", count, 4); } private boolean isArrayInstruction(SSAInstruction s) { return s instanceof SSAArrayReferenceInstruction || s instanceof SSAArrayLengthInstruction; } }), true, null); } @Test public void testArrayLiteral1() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Collections.singletonList( cg -> { MethodReference mref = descriptorToMethodRef("Source#ArrayLiteral1#main#([Ljava/lang/String;)V", cg.getClassHierarchy()); CGNode node = cg.getNodes(mref).iterator().next(); SSAInstruction s = node.getIR().getInstructions()[2]; Assert.assertTrue("Did not find new array instruction.", s instanceof SSANewInstruction); Assert.assertTrue("", ((SSANewInstruction) s).getNewSite().getDeclaredType().isArrayType()); }), true, null); } @Test public void testArrayLiteral2() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Collections.singletonList( cg -> { MethodReference mref = descriptorToMethodRef("Source#ArrayLiteral2#main#([Ljava/lang/String;)V", cg.getClassHierarchy()); CGNode node = cg.getNodes(mref).iterator().next(); final SSAInstruction[] instructions = node.getIR().getInstructions(); // test 1 { SSAInstruction s1 = instructions[2]; if (s1 instanceof SSANewInstruction) { Assert.assertTrue("", ((SSANewInstruction) s1).getNewSite().getDeclaredType().isArrayType()); } else { Assert.assertTrue("Expected 3rd to be a new array instruction.", false); } } // test 2 { SSAInstruction s2 = instructions[3]; if (s2 instanceof SSANewInstruction) { Assert.assertTrue("", ((SSANewInstruction) s2).getNewSite().getDeclaredType().isArrayType()); } else { Assert.assertTrue("Expected 4th to be a new array instruction.", false); } } // test 3: the last 4 instructions are of the form y[i] = i+1; { final SymbolTable symbolTable = node.getIR().getSymbolTable(); for (int i = 4; i <= 7; i++) { Assert.assertTrue("Expected only array stores.", instructions[i] instanceof SSAArrayStoreInstruction); SSAArrayStoreInstruction as = (SSAArrayStoreInstruction) instructions[i]; Assert.assertEquals("Expected an array store to 'y'.", node.getIR().getLocalNames(i, as.getArrayRef())[0], "y"); final Integer valueOfArrayIndex = ((Integer) symbolTable.getConstantValue(as.getIndex())); final Integer valueAssigned = (Integer) symbolTable.getConstantValue(as.getValue()); Assert.assertEquals("Expected an array store to 'y' with value " + (valueOfArrayIndex + 1), valueAssigned.intValue(), valueOfArrayIndex + 1); } } }), true, null); } @Test public void testInheritedField() throws IllegalArgumentException, CancelException, IOException { List edgeAssertionses = Arrays.asList(EdgeAssertions.make("Source#InheritedField#main#([Ljava/lang/String;)V", "Source#B#foo#()V"), EdgeAssertions.make("Source#InheritedField#main#([Ljava/lang/String;)V", "Source#B#bar#()V")); runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), edgeAssertionses, true, null); } @Test public void testQualifiedStatic() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Collections.singletonList( cg -> { MethodReference mref = descriptorToMethodRef("Source#QualifiedStatic#main#([Ljava/lang/String;)V", cg.getClassHierarchy()); CGNode node = cg.getNodes(mref).iterator().next(); SSAInstruction s = node.getIR().getInstructions()[4]; Assert.assertTrue("Did not find a getstatic instruction.", s instanceof SSAGetInstruction && ((SSAGetInstruction) s).isStatic()); final FieldReference field = ((SSAGetInstruction) s).getDeclaredField(); Assert.assertEquals("Expected a getstatic for 'value'.", field.getName().toString(), "value"); Assert.assertEquals("Expected a getstatic for 'value'.", field.getDeclaringClass().getName().toString(), "LFooQ"); }), true, null); } @Test public void testStaticNesting() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Collections.singletonList( cg -> { final String typeStr = singleInputForTest() + "$WhatsIt"; final TypeReference type = findOrCreateTypeReference("Source", typeStr, cg.getClassHierarchy()); final IClass iClass = cg.getClassHierarchy().lookupClass(type); Assert.assertNotNull("Could not find class " + typeStr, iClass); // todo: this fails: Assert.assertNotNull("Expected to be enclosed in // 'StaticNesting'.", // ((JavaSourceLoaderImpl.JavaClass)iClass).getEnclosingClass()); // todo: is there the concept of CompilationUnit? /** * {@link JavaCAst2IRTranslator#getEnclosingType} return null for static * inner classes..? */ }), true, null); } @Test public void testCastFromNull() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), new ArrayList(), true, null); } @Test public void testInnerClass() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Collections.singletonList( cg -> { final String typeStr = singleInputForTest(); final TypeReference type = findOrCreateTypeReference("Source", typeStr + "$WhatsIt", cg.getClassHierarchy()); final IClass iClass = cg.getClassHierarchy().lookupClass(type); Assert.assertNotNull("Could not find class " + typeStr, iClass); Assert.assertEquals("Expected to be enclosed in 'InnerClass'.", ((JavaSourceLoaderImpl.JavaClass) iClass) .getEnclosingClass(), // todo is there another way? cg.getClassHierarchy().lookupClass(findOrCreateTypeReference("Source", typeStr, cg.getClassHierarchy()))); }), true, null); } @Test public void testNullArrayInit() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), new ArrayList(), true, null); } @Test public void testInnerClassA() throws IllegalArgumentException, CancelException, IOException { Pair> x = runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), new ArrayList(), true, null); // can't do an IRAssertion() -- we need the pointer analysis CallGraph cg = x.fst; PointerAnalysis pa = x.snd; Iterator iter = cg.iterator(); while ( iter.hasNext() ) { CGNode n = iter.next(); // assume in the test we have one enclosing instruction for each of the methods here. String methodSigs[] = { "InnerClassA$AB.getA_X_from_AB()I", "InnerClassA$AB.getA_X_thru_AB()I", "InnerClassA$AB$ABSubA.getA_X()I", "InnerClassA$AB$ABA$ABAA.getABA_X()I", "InnerClassA$AB$ABA$ABAA.getA_X()I", "InnerClassA$AB$ABA$ABAB.getABA_X()I", "InnerClassA$AB$ABSubA$ABSubAA.getABA_X()I", "InnerClassA$AB$ABSubA$ABSubAA.getA_X()I", }; // each type suffixed by "," String ikConcreteTypeStrings[ ]= { "LInnerClassA,", "LInnerClassA,", "LInnerClassA,", "LInnerClassA$AB$ABSubA,LInnerClassA$AB$ABA,", "LInnerClassA,", "LInnerClassA$AB$ABA,", "LInnerClassA$AB$ABSubA,", "LInnerClassA,", }; Assert.assertTrue ( "Buggy test", methodSigs.length == ikConcreteTypeStrings.length ); for ( int i = 0; i < methodSigs.length; i++ ) { if ( n.getMethod().getSignature().equals(methodSigs[i]) ) { // find enclosing instruction for ( SSAInstruction instr: n.getIR().getInstructions() ) { if ( instr instanceof EnclosingObjectReference ) { StringBuilder allIksBuilder = new StringBuilder(); for (InstanceKey ik: pa.getPointsToSet(new LocalPointerKey(n,instr.getDef()))) allIksBuilder.append(ik.getConcreteType().getName()).append(','); // System.out.printf("in method %s, got ik %s\n", methodSigs[i], allIks); final String allIks = allIksBuilder.toString(); Assert.assertTrue("assertion failed: expecting ik " + ikConcreteTypeStrings[i] + " in method " + methodSigs[i] + ", got " + allIks + "\n", allIks.equals(ikConcreteTypeStrings[i])); break; } } } } } } @Test public void testInnerClassSuper() throws IllegalArgumentException, CancelException, IOException { Pair> x = runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), new ArrayList(), true, null); // can't do an IRAssertion() -- we need the pointer analysis CallGraph cg = x.fst; PointerAnalysis pa = x.snd; Iterator iter = cg.iterator(); while ( iter.hasNext() ) { CGNode n = iter.next(); if ( n.getMethod().getSignature().equals("LInnerClassSuper$SuperOuter.test()V") ) { // find enclosing instruction for ( SSAInstruction instr: n.getIR().getInstructions() ) { if ( instr instanceof EnclosingObjectReference ) { StringBuilder allIksBuilder = new StringBuilder(); for (InstanceKey ik: pa.getPointsToSet(new LocalPointerKey(n,instr.getDef()))) allIksBuilder.append(ik.getConcreteType().getName()).append(','); final String allIks = allIksBuilder.toString(); Assert.assertTrue("assertion failed: expecting ik \"LSub,\" in method, got \"" + allIks + "\"\n", allIks.equals("LSub,")); break; } } } } } @Test public void testLocalClass() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Collections.singletonList( cg -> { final String typeStr = singleInputForTest(); final String localClassStr = "Foo"; // Observe the descriptor for a class local to a method. final TypeReference mainFooType = findOrCreateTypeReference("Source", typeStr + "/main([Ljava/lang/String;)V/" + localClassStr, cg.getClassHierarchy()); // Observe the descriptor for a class local to a method. final IClass mainFooClass = cg.getClassHierarchy().lookupClass(mainFooType); Assert.assertNotNull("Could not find class " + mainFooType, mainFooClass); final TypeReference methodFooType = findOrCreateTypeReference("Source", typeStr + "/method()V/" + localClassStr, cg .getClassHierarchy()); final IClass methodFooClass = cg.getClassHierarchy().lookupClass(methodFooType); Assert.assertNotNull("Could not find class " + methodFooType, methodFooClass); final IClass localClass = cg.getClassHierarchy().lookupClass( findOrCreateTypeReference("Source", typeStr, cg.getClassHierarchy())); Assert.assertSame("'Foo' is enclosed in 'Local'", ((JavaSourceLoaderImpl.JavaClass) methodFooClass).getEnclosingClass(), localClass); // todo: is this failing because 'main' is static? // Assert.assertSame("'Foo' is enclosed in 'Local'", // ((JavaSourceLoaderImpl.JavaClass)mainFooClass).getEnclosingClass(), // localClass); }), true, null); } @Test public void testAnonymousClass() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), Collections.singletonList( cg -> { final String typeStr = singleInputForTest(); final TypeReference type = findOrCreateTypeReference("Source", typeStr, cg.getClassHierarchy()); final IClass iClass = cg.getClassHierarchy().lookupClass(type); Assert.assertNotNull("Could not find class " + typeStr, iClass); // todo what to check?? could not find anything in the APIs for // anonymous }), true, null); } @Test public void testWhileTest1() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testSwitch1() { try { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (CancelException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Test public void testException1() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testException2() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testFinally1() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testScoping1() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testScoping2() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testNonPrimaryTopLevel() throws IllegalArgumentException, CancelException, IOException { runTest(singlePkgTestSrc("p"), rtJar, simplePkgTestEntryPoint("p"), emptyList, true, null); } @Test public void testMiniaturList() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testMonitor() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testStaticInitializers() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testThread1() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testCasts() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } @Test public void testBreaks() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); } private static MethodReference getSliceRootReference(String className, String methodName, String methodDescriptor) { TypeName clsName = TypeName.string2TypeName('L' + className.replace('.', '/')); TypeReference clsRef = TypeReference.findOrCreate(JavaSourceAnalysisScope.SOURCE, clsName); Atom nameAtom = Atom.findOrCreateUnicodeAtom(methodName); Descriptor descr = Descriptor.findOrCreateUTF8(Language.JAVA, methodDescriptor); return MethodReference.findOrCreate(clsRef, nameAtom, descr); } @Test public void testMiniaturSliceBug() throws IllegalArgumentException, CancelException, IOException { Pair> x = runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); PointerAnalysis pa = x.snd; CallGraph cg = x.fst; // test partial slice MethodReference sliceRootRef = getSliceRootReference("MiniaturSliceBug", "validNonDispatchedCall", "(LIntWrapper;)V"); Set roots = cg.getNodes(sliceRootRef); Pair,SDG> y = AstJavaSlicer.computeAssertionSlice(cg, pa, roots, false); Collection slice = y.fst; SlicerTest.dumpSlice(slice); Assert.assertEquals(0, SlicerTest.countAllocations(slice)); Assert.assertEquals(1, SlicerTest.countPutfields(slice)); // test slice from main sliceRootRef = getSliceRootReference("MiniaturSliceBug", "main", "([Ljava/lang/String;)V"); roots = cg.getNodes(sliceRootRef); y = AstJavaSlicer.computeAssertionSlice(cg, pa, roots, false); slice = y.fst; // SlicerTest.dumpSlice(slice); Assert.assertEquals(2, SlicerTest.countAllocations(slice)); Assert.assertEquals(2, SlicerTest.countPutfields(slice)); } @Test public void testDoWhileInCase() throws IllegalArgumentException, CancelException, IOException { runTest(singleTestSrc("bugfixes"), rtJar, simplePkgTestEntryPoint("bugfixes"), emptyList, true, null); } @Test public void testExclusions() throws IllegalArgumentException, CancelException, IOException { File exclusions = TemporaryFile.stringToFile(File.createTempFile("exl", "txt"), "Exclusions.Excluded\n"); Pair> x = runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, exclusions.getAbsolutePath()); IClassHierarchy cha = x.fst.getClassHierarchy(); TypeReference topType = TypeReference.findOrCreate(JavaSourceAnalysisScope.SOURCE, TypeName.findOrCreate("LExclusions")); assert cha.lookupClass(topType) != null; TypeReference inclType = TypeReference.findOrCreate(JavaSourceAnalysisScope.SOURCE, TypeName.findOrCreate("LExclusions$Included")); assert cha.lookupClass(inclType) != null; TypeReference exclType = TypeReference.findOrCreate(JavaSourceAnalysisScope.SOURCE, TypeName.findOrCreate("LExclusions$Excluded")); assert cha.lookupClass(exclType) == null; } } WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/ibm/wala/cast/java/test/SyncDuplicatorTests.java000066400000000000000000000040101342410422700323360ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.test; import java.io.IOException; import org.junit.Test; import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.classLoader.Language; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis; import com.ibm.wala.shrikeBT.IInvokeInstruction; import com.ibm.wala.types.Descriptor; import com.ibm.wala.types.MethodReference; import com.ibm.wala.types.TypeName; import com.ibm.wala.types.TypeReference; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.collections.Pair; import com.ibm.wala.util.strings.Atom; public abstract class SyncDuplicatorTests extends IRTests { public SyncDuplicatorTests() { super(null); } protected final static CallSiteReference testMethod = CallSiteReference.make(0, MethodReference.findOrCreate(TypeReference .findOrCreate(JavaSourceAnalysisScope.SOURCE, TypeName.string2TypeName("LMonitor2")), Atom.findOrCreateUnicodeAtom("test"), Descriptor.findOrCreateUTF8(Language.JAVA, "(Ljava/lang/Object;)Z")), IInvokeInstruction.Dispatch.STATIC); @Test public void testMonitor2() throws IllegalArgumentException, CancelException, IOException { Pair> result = runTest(singleTestSrc(), rtJar, simpleTestEntryPoint(), emptyList, true, null); System.err.println(result.fst); } } WALA-R_1.5.1/com.ibm.wala.cast.java.test/src/com/ibm/wala/cast/java/test/TestPlugin.java000066400000000000000000000024661342410422700304630ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.test; import org.eclipse.core.runtime.Plugin; import org.osgi.framework.BundleContext; /** * The main plugin class to be used in the desktop. */ public class TestPlugin extends Plugin { //The shared instance. private static TestPlugin plugin; /** * The constructor. */ public TestPlugin() { plugin = this; } /** * This method is called upon plug-in activation */ @Override public void start(BundleContext context) throws Exception { super.start(context); } /** * This method is called when the plug-in is stopped */ @Override public void stop(BundleContext context) throws Exception { super.stop(context); plugin = null; } /** * Returns the shared instance. */ public static TestPlugin getDefault() { return plugin; } } WALA-R_1.5.1/com.ibm.wala.cast.java/000077500000000000000000000000001342410422700166425ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/.launchConfigurations/000077500000000000000000000000001342410422700231055ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/.launchConfigurations/WALA-CAst-Java-Library-Downloads.launch000066400000000000000000000007121342410422700320660ustar00rootroot00000000000000 WALA-R_1.5.1/com.ibm.wala.cast.java/.settings/000077500000000000000000000000001342410422700205605ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/.settings/org.eclipse.jdt.core.prefs000066400000000000000000000753401342410422700255530ustar00rootroot00000000000000eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.problem.APILeak=error org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=error org.eclipse.jdt.core.compiler.problem.comparingIdentical=error org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=error org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=error org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=error org.eclipse.jdt.core.compiler.problem.finalParameterBound=error org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=error org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=error org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=error org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=error org.eclipse.jdt.core.compiler.problem.rawTypeReference=error org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.terminalDeprecation=error org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=error org.eclipse.jdt.core.compiler.problem.unusedLocal=error org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error org.eclipse.jdt.core.compiler.problem.unusedParameter=error org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=132 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true WALA-R_1.5.1/com.ibm.wala.cast.java/.settings/org.eclipse.jdt.launching.prefs000066400000000000000000000001521342410422700265600ustar00rootroot00000000000000eclipse.preferences.version=1 org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore WALA-R_1.5.1/com.ibm.wala.cast.java/.settings/org.eclipse.jdt.ui.prefs000066400000000000000000000002661342410422700252330ustar00rootroot00000000000000#Thu Jan 03 11:24:43 EST 2008 eclipse.preferences.version=1 formatter_profile=_WALA formatter_settings_version=11 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true WALA-R_1.5.1/com.ibm.wala.cast.java/.settings/org.eclipse.pde.prefs000066400000000000000000000020161342410422700246010ustar00rootroot00000000000000compilers.f.unresolved-features=0 compilers.f.unresolved-plugins=0 compilers.incompatible-environment=0 compilers.p.build=0 compilers.p.build.bin.includes=0 compilers.p.build.encodings=0 compilers.p.build.java.compiler=0 compilers.p.build.java.compliance=0 compilers.p.build.missing.output=0 compilers.p.build.output.library=0 compilers.p.build.source.library=0 compilers.p.build.src.includes=0 compilers.p.deprecated=0 compilers.p.discouraged-class=0 compilers.p.internal=0 compilers.p.missing-packages=0 compilers.p.missing-version-export-package=2 compilers.p.missing-version-import-package=0 compilers.p.missing-version-require-bundle=2 compilers.p.no-required-att=0 compilers.p.not-externalized-att=0 compilers.p.unknown-attribute=0 compilers.p.unknown-class=0 compilers.p.unknown-element=0 compilers.p.unknown-identifier=0 compilers.p.unknown-resource=0 compilers.p.unresolved-ex-points=0 compilers.p.unresolved-import=0 compilers.s.create-docs=false compilers.s.doc-folder=doc compilers.s.open-tags=0 eclipse.preferences.version=1 WALA-R_1.5.1/com.ibm.wala.cast.java/.settings/org.eclipse.wst.validation.prefs000066400000000000000000000021021342410422700267730ustar00rootroot00000000000000DELEGATES_PREFERENCE=delegateValidatorList USER_BUILD_PREFERENCE=enabledBuildValidatorList USER_MANUAL_PREFERENCE=enabledManualValidatorList USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600 eclipse.preferences.version=1 override=true suspend=false vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03 vals/org.eclipse.wst.xml.core.xml/groups=0107include05111contentType128org.eclipse.core.runtime.xmlT111contentType134org.eclipse.wst.xml.core.xmlsourceT111contentType134org.eclipse.wst.xml.core.xslsourceT111contentType134org.eclipse.jst.jsp.core.tldsourceT07fileext03xmlF0107exclude07113projectNature134org.eclipse.jst.j2ee.ejb.EJBNature113projectNature130org.eclipse.jst.j2ee.EARNature04file08.projectT0104file110.classpathT0104file110.settings/T0204file122target/p2artifacts.xmlT0304file120target/p2content.xmlT03 vf.version=3 WALA-R_1.5.1/com.ibm.wala.cast.java/META-INF/000077500000000000000000000000001342410422700200025ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/META-INF/MANIFEST.MF000066400000000000000000000014361342410422700214400ustar00rootroot00000000000000Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.ibm.wala.cast.java Bundle-Version: 1.5.1 Bundle-Vendor: %Bundle-Vendor Require-Bundle: com.ibm.wala.cast, com.ibm.wala.core, com.ibm.wala.shrike Bundle-ActivationPolicy: lazy Export-Package: com.ibm.wala.cast.java.analysis.typeInference, com.ibm.wala.cast.java.client, com.ibm.wala.cast.java.client.impl, com.ibm.wala.cast.java.examples.ast, com.ibm.wala.cast.java.ipa.callgraph, com.ibm.wala.cast.java.ipa.modref, com.ibm.wala.cast.java.ipa.slicer, com.ibm.wala.cast.java.loader, com.ibm.wala.cast.java.ssa, com.ibm.wala.cast.java.translator, com.ibm.wala.cast.java.types Bundle-ClassPath: . Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Automatic-Module-Name: com.ibm.wala.cast.java WALA-R_1.5.1/com.ibm.wala.cast.java/OSGI-INF/000077500000000000000000000000001342410422700200155ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/OSGI-INF/l10n/000077500000000000000000000000001342410422700205675ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/OSGI-INF/l10n/bundle.properties000066400000000000000000000001731342410422700241570ustar00rootroot00000000000000#Properties file for com.ibm.wala.cast.java Bundle-Vendor = rfuhrer@watson.ibm.com Bundle-Name = Java Source WALA Front EndWALA-R_1.5.1/com.ibm.wala.cast.java/build.gradle000066400000000000000000000004401342410422700211170ustar00rootroot00000000000000plugins { id 'eclipse' } eclipse.project.natures 'org.eclipse.pde.PluginNature' sourceSets.main.java.srcDirs = ['src'] dependencies { compile( project(':com.ibm.wala.cast'), project(':com.ibm.wala.core'), project(':com.ibm.wala.shrike'), project(':com.ibm.wala.util'), ) } WALA-R_1.5.1/com.ibm.wala.cast.java/build.properties000066400000000000000000000002701342410422700220560ustar00rootroot00000000000000source.. = src/ output.. = bin/main bin.includes = META-INF/,\ .,\ OSGI-INF/l10n/bundle.properties,\ OSGI-INF/ javacProjectSettings = true WALA-R_1.5.1/com.ibm.wala.cast.java/mvncentral.xml000066400000000000000000000110511342410422700215330ustar00rootroot00000000000000 4.0.0 com.ibm.wala com.ibm.wala.cast.java 1.5.1 jar WALA CAst WALA Common AST core Java front-end functionality http://wala.sourceforge.net Eclipse Public License, Version 1.0 https://www.eclipse.org/legal/epl-v10.html Manu Sridharan m.sridharan@samsung.com Samsung Research America http://www.sisa.samsung.com/ scm:git:git@github.com:wala/WALA.git scm:git:git@github.com:example/example-application.git git@github.com:example/example-application.git src ossrh https://oss.sonatype.org/content/repositories/snapshots com.ibm.wala com.ibm.wala.util 1.5.1 com.ibm.wala com.ibm.wala.cast 1.5.1 com.ibm.wala com.ibm.wala.core 1.5.1 com.ibm.wala com.ibm.wala.shrike 1.5.1 sonatype-snapshots https://oss.sonatype.org/content/repositories/snapshots/ jdk18 1.8 -Xdoclint:none ${src.dir} org.apache.maven.plugins maven-compiler-plugin 3.2 1.8 1.8 org.sonatype.plugins nexus-staging-maven-plugin 1.6.3 true ossrh https://oss.sonatype.org/ true org.apache.maven.plugins maven-source-plugin 2.2.1 attach-sources jar-no-fork org.apache.maven.plugins maven-javadoc-plugin ${javadoc.options} 2.9.1 attach-javadocs jar org.apache.maven.plugins maven-gpg-plugin 1.5 sign-artifacts verify sign WALA-R_1.5.1/com.ibm.wala.cast.java/pom.xml000066400000000000000000000010141342410422700201530ustar00rootroot00000000000000 4.0.0 WALA com.ibm.wala 1.5.1 com.ibm.wala.cast.java eclipse-plugin WALA-R_1.5.1/com.ibm.wala.cast.java/src/000077500000000000000000000000001342410422700174315ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/000077500000000000000000000000001342410422700202075ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/000077500000000000000000000000001342410422700207565ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/000077500000000000000000000000001342410422700217025ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/000077500000000000000000000000001342410422700226345ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/000077500000000000000000000000001342410422700235555ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/analysis/000077500000000000000000000000001342410422700254005ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/analysis/typeInference/000077500000000000000000000000001342410422700302005ustar00rootroot00000000000000AstJavaTypeInference.java000066400000000000000000000136121342410422700350010ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/analysis/typeInference/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.analysis.typeInference; import com.ibm.wala.analysis.typeInference.ConeType; import com.ibm.wala.analysis.typeInference.JavaPrimitiveType; import com.ibm.wala.analysis.typeInference.PointType; import com.ibm.wala.analysis.typeInference.PrimitiveType; import com.ibm.wala.analysis.typeInference.TypeAbstraction; import com.ibm.wala.analysis.typeInference.TypeVariable; import com.ibm.wala.cast.analysis.typeInference.AstTypeInference; import com.ibm.wala.cast.ir.ssa.CAstBinaryOp; import com.ibm.wala.cast.java.ssa.AstJavaInstructionVisitor; import com.ibm.wala.cast.java.ssa.AstJavaInvokeInstruction; import com.ibm.wala.cast.java.ssa.EnclosingObjectReference; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.fixpoint.IVariable; import com.ibm.wala.shrikeBT.IBinaryOpInstruction; import com.ibm.wala.ssa.IR; import com.ibm.wala.ssa.SSABinaryOpInstruction; import com.ibm.wala.ssa.SymbolTable; import com.ibm.wala.types.TypeReference; import com.ibm.wala.util.debug.Assertions; public class AstJavaTypeInference extends AstTypeInference { protected IClass stringClass; protected class AstJavaTypeOperatorFactory extends AstTypeOperatorFactory implements AstJavaInstructionVisitor { @Override public void visitBinaryOp(SSABinaryOpInstruction instruction) { if (doPrimitives) { IBinaryOpInstruction.IOperator op = instruction.getOperator(); if (op == CAstBinaryOp.EQ || op == CAstBinaryOp.NE || op == CAstBinaryOp.LT || op == CAstBinaryOp.GE || op == CAstBinaryOp.GT || op == CAstBinaryOp.LE) { result = new DeclaredTypeOperator(language.getPrimitive(language.getConstantType(Boolean.TRUE))); } else { result = new PrimAndStringOp(); } } } @Override public void visitEnclosingObjectReference(EnclosingObjectReference inst) { TypeReference type = inst.getEnclosingType(); IClass klass = cha.lookupClass(type); if (klass == null) { Assertions.UNREACHABLE(); } else { result = new DeclaredTypeOperator(new ConeType(klass)); } } @Override public void visitJavaInvoke(AstJavaInvokeInstruction instruction) { TypeReference type = instruction.getDeclaredResultType(); if (type.isReferenceType()) { IClass klass = cha.lookupClass(type); if (klass == null) { // a type that cannot be loaded. // be pessimistic result = new DeclaredTypeOperator(BOTTOM); } else { result = new DeclaredTypeOperator(new ConeType(klass)); } } else { if (doPrimitives && type.isPrimitiveType()) { result = new DeclaredTypeOperator(PrimitiveType.getPrimitive(type)); } else { result = null; } } } } public class AstJavaTypeVarFactory extends TypeVarFactory { @Override public IVariable makeVariable(int valueNumber) { SymbolTable st = ir.getSymbolTable(); if (st.isStringConstant(valueNumber)) { IClass klass = cha.lookupClass(TypeReference.JavaLangString); TypeAbstraction stringTypeAbs = new PointType(klass); return new TypeVariable(stringTypeAbs); } else { return super.makeVariable(valueNumber); } } } public AstJavaTypeInference(IR ir, boolean doPrimitives) { super(ir, JavaPrimitiveType.BOOLEAN, doPrimitives); } IClass getStringClass() { if (stringClass == null) { this.stringClass = cha.lookupClass(TypeReference.JavaLangString); } return stringClass; } @Override protected void initialize() { init(ir, new AstJavaTypeVarFactory(), new AstJavaTypeOperatorFactory()); } @Override public TypeAbstraction getConstantPrimitiveType(int valueNumber) { SymbolTable st = ir.getSymbolTable(); if (st.isBooleanConstant(valueNumber)) { return language.getPrimitive(language.getConstantType(Boolean.TRUE)); } else { return super.getConstantPrimitiveType(valueNumber); } } protected class PrimAndStringOp extends PrimitivePropagateOperator { private PrimAndStringOp() { } @Override public byte evaluate(TypeVariable lhs, TypeVariable[] rhs) { TypeAbstraction meet = null; for (TypeVariable r : rhs) { if (r != null) { TypeAbstraction ta = r.getType(); if (ta instanceof PointType) { if (ta.getType().equals(getStringClass())) { meet = new PointType(ta.getType()); break; } } else if (ta instanceof ConeType) { if (ta.getType().equals(getStringClass())) { meet = new PointType(ta.getType()); break; } } } } if (meet == null) { return super.evaluate(lhs, rhs); } else { TypeVariable L = lhs; TypeAbstraction lhsType = L.getType(); if (lhsType.equals(meet)) { return NOT_CHANGED; } else { L.setType(meet); return CHANGED; } } } /* * (non-Javadoc) * * @see com.ibm.wala.dataflow.Operator#hashCode() */ @Override public int hashCode() { return 71292; } /* * (non-Javadoc) * * @see com.ibm.wala.dataflow.Operator#equals(java.lang.Object) */ @Override public boolean equals(Object o) { return o != null && o.getClass().equals(getClass()); } } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/client/000077500000000000000000000000001342410422700250335ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/client/JavaSourceAnalysisEngine.java000066400000000000000000000131431342410422700325740ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.client; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Set; import com.ibm.wala.cast.ir.ssa.AstIRFactory; import com.ibm.wala.cast.java.client.impl.ZeroCFABuilderFactory; import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope; import com.ibm.wala.classLoader.ClassLoaderFactory; import com.ibm.wala.classLoader.Module; import com.ibm.wala.client.AbstractAnalysisEngine; import com.ibm.wala.ipa.callgraph.AnalysisCacheImpl; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.ipa.callgraph.CallGraphBuilder; import com.ibm.wala.ipa.callgraph.Entrypoint; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.impl.Util; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.cha.ClassHierarchyException; import com.ibm.wala.ipa.cha.ClassHierarchyFactory; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.ssa.SSAOptions; import com.ibm.wala.ssa.SymbolTable; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.util.collections.HashSetFactory; import com.ibm.wala.util.config.FileOfClasses; import com.ibm.wala.util.config.SetOfClasses; import com.ibm.wala.util.io.FileProvider; /** */ public abstract class JavaSourceAnalysisEngine extends AbstractAnalysisEngine, Void> { /** * Modules which are user-space code */ private final Set userEntries = HashSetFactory.make(); /** * Modules which are source code */ private final Set sourceEntries = HashSetFactory.make(); /** * Modules which are system or library code TODO: what about extension loader? */ private final Set systemEntries = HashSetFactory.make(); public JavaSourceAnalysisEngine() { super(); } /** * Adds the given source module to the source loader's module list. Clients * should/may call this method if they don't supply an IJavaProject to the * constructor. */ public void addSourceModule(Module M) { sourceEntries.add(M); } /** * Adds the given compiled module to the application loader's module list. * Clients should/may call this method if they don't supply an IJavaProject to * the constructor. */ public void addCompiledModule(Module M) { userEntries.add(M); } /** * Adds the given module to the primordial loader's module list. Clients * should/may call this method if they don't supply an IJavaProject to the * constructor. */ public void addSystemModule(Module M) { systemEntries.add(M); } @Override protected void addApplicationModulesToScope() { ClassLoaderReference app = scope.getApplicationLoader(); for (Module M : userEntries) { scope.addToScope(app, M); } ClassLoaderReference src = ((JavaSourceAnalysisScope) scope).getSourceLoader(); for (Module M : sourceEntries) { scope.addToScope(src, M); } } @Override public void buildAnalysisScope() throws IOException { scope = makeSourceAnalysisScope(); if (getExclusionsFile() != null) { try (final InputStream is = new File(getExclusionsFile()).exists()? new FileInputStream(getExclusionsFile()): FileProvider.class.getClassLoader().getResourceAsStream(getExclusionsFile())) { scope.setExclusions(new FileOfClasses(is)); } } for (Module M : this.systemEntries) { scope.addToScope(scope.getPrimordialLoader(), M); } // add user stuff addApplicationModulesToScope(); } protected AnalysisScope makeSourceAnalysisScope() { return new JavaSourceAnalysisScope(); } protected abstract ClassLoaderFactory getClassLoaderFactory(SetOfClasses exclusions); @Override public IClassHierarchy buildClassHierarchy() { IClassHierarchy cha = null; ClassLoaderFactory factory = getClassLoaderFactory(scope.getExclusions()); try { cha = ClassHierarchyFactory.make(getScope(), factory); } catch (ClassHierarchyException e) { System.err.println("Class Hierarchy construction failed"); System.err.println(e.toString()); e.printStackTrace(); } return cha; } @Override protected Iterable makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha) { return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha); } @Override public IAnalysisCacheView makeDefaultCache() { return new AnalysisCacheImpl(AstIRFactory.makeDefaultFactory()); } @Override public AnalysisOptions getDefaultOptions(Iterable entrypoints) { AnalysisOptions options = new AnalysisOptions(getScope(), entrypoints); SSAOptions ssaOptions = new SSAOptions(); ssaOptions.setDefaultValues(SymbolTable::getDefaultValue); options.setSSAOptions(ssaOptions); return options; } @Override protected CallGraphBuilder getCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) { return new ZeroCFABuilderFactory().make(options, cache, cha, scope); } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/client/impl/000077500000000000000000000000001342410422700257745ustar00rootroot00000000000000ZeroCFABuilderFactory.java000066400000000000000000000030561342410422700326540ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/client/impl/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.client.impl; import com.ibm.wala.cast.java.ipa.callgraph.AstJavaZeroXCFABuilder; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.ipa.callgraph.CallGraphBuilder; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.impl.Util; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.cfa.ZeroXInstanceKeys; import com.ibm.wala.ipa.cha.IClassHierarchy; /** * @author Julian Dolby (dolby@us.ibm.com) * * A factory to create call graph builders using 0-CFA */ public class ZeroCFABuilderFactory { public CallGraphBuilder make(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) { Util.addDefaultSelectors(options, cha); Util.addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha); return new AstJavaZeroXCFABuilder(cha, options, cache, null, null, ZeroXInstanceKeys.NONE); } } ZeroOneContainerCFABuilderFactory.java000066400000000000000000000027631342410422700351650ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/client/impl/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.client.impl; import com.ibm.wala.cast.java.ipa.callgraph.AstJavaZeroOneContainerCFABuilder; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.ipa.callgraph.CallGraphBuilder; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.impl.Util; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.cha.IClassHierarchy; /** * @author Julian Dolby (dolby@us.ibm.com) * * A factory to create call graph builders using 0-CFA */ public class ZeroOneContainerCFABuilderFactory { public CallGraphBuilder make(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) { Util.addDefaultSelectors(options, cha); Util.addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha); return new AstJavaZeroOneContainerCFABuilder(cha, options, cache, null, null); } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/examples/000077500000000000000000000000001342410422700253735ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/examples/ast/000077500000000000000000000000001342410422700261625ustar00rootroot00000000000000SynchronizedBlockDuplicator.java000066400000000000000000000177701342410422700344430ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/examples/ast/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.java.examples.ast; import java.util.Map; import com.ibm.wala.cast.java.types.JavaPrimitiveTypeMap; import com.ibm.wala.cast.tree.CAst; import com.ibm.wala.cast.tree.CAstControlFlowMap; import com.ibm.wala.cast.tree.CAstEntity; import com.ibm.wala.cast.tree.CAstNode; import com.ibm.wala.cast.tree.CAstSourcePositionMap; import com.ibm.wala.cast.tree.impl.CAstOperator; import com.ibm.wala.cast.tree.rewrite.CAstRewriter; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.util.collections.Pair; /** * transforms each synchronized block to execute under a conditional test * calling some method m(), where the block is duplicated in both the if and * else branches. The transformation enables a static analysis to separately * analyze the synchronized block for true and false return values from m(). * * See "Finding Concurrency-Related Bugs using Random Isolation," Kidd et al., * VMCAI'09, Section 3 */ public class SynchronizedBlockDuplicator extends CAstRewriter, SynchronizedBlockDuplicator.UnwindKey> { /** * key type used for cloning the synchronized blocks and the true and false * branches of the introduced conditional */ class UnwindKey implements CAstRewriter.CopyKey { /** * are we on the true or false branch? */ private boolean testDirection; /** * the AST node representing the synchronized block */ private CAstNode syncNode; /** * key associated with the {@link com.ibm.wala.cast.tree.rewrite.CAstRewriter.RewriteContext context} of the parent * AST node of the synchronized block */ private UnwindKey rest; private UnwindKey(boolean testDirection, CAstNode syncNode, UnwindKey rest) { this.rest = rest; this.syncNode = syncNode; this.testDirection = testDirection; } @Override public int hashCode() { return (testDirection ? 1 : -1) * System.identityHashCode(syncNode) * (rest == null ? 1 : rest.hashCode()); } @Override public UnwindKey parent() { return rest; } @Override public boolean equals(Object o) { return (o instanceof UnwindKey) && ((UnwindKey) o).testDirection == testDirection && ((UnwindKey) o).syncNode == syncNode && (rest == null ? ((UnwindKey) o).rest == null : rest.equals(((UnwindKey) o).rest)); } @Override public String toString() { return "#" + testDirection + ((rest == null) ? "" : rest.toString()); } } // private static final boolean DEBUG = false; /** * method to be invoked in the conditional test (program counter is ignored? * --MS) */ private final CallSiteReference f; public SynchronizedBlockDuplicator(CAst Ast, boolean recursive, CallSiteReference f) { super(Ast, recursive, new RootContext()); this.f = f; } public CAstEntity translate(CAstEntity original) { return rewrite(original); } /** * context used for nodes not contained in a synchronized block */ private static class RootContext implements RewriteContext { @Override public UnwindKey key() { return null; } } /** * context used within synchronized blocks */ class SyncContext implements RewriteContext { /** * context used for the parent AST node of the synchronized block */ private final CAstRewriter.RewriteContext parent; /** * are we on the true or false branch of the introduced conditional? */ private final boolean testDirection; /** * the AST node representing the synchronized block */ private final CAstNode syncNode; private SyncContext(boolean testDirection, CAstNode syncNode, RewriteContext parent) { this.testDirection = testDirection; this.syncNode = syncNode; this.parent = parent; } @Override public UnwindKey key() { return new UnwindKey(testDirection, syncNode, parent.key()); } /** * is n our synchronized block node or the synchronized block node of a * parent? */ private boolean containsNode(CAstNode n) { if (n == syncNode) { return true; } else if (parent != null) { return contains(parent, n); } else { return false; } } } @Override protected CAstNode flowOutTo(Map, CAstNode> nodeMap, CAstNode oldSource, Object label, CAstNode oldTarget, CAstControlFlowMap orig, CAstSourcePositionMap src) { assert oldTarget == CAstControlFlowMap.EXCEPTION_TO_EXIT; return oldTarget; } private static boolean contains(RewriteContext c, CAstNode n) { if (c instanceof SyncContext) { return ((SyncContext) c).containsNode(n); } else { return false; } } /** * does root represent a synchronized block? if so, return the variable whose * lock is acquired. otherwise, return {@code null} */ private static String isSynchronizedOnVar(CAstNode root) { if (root.getKind() == CAstNode.UNWIND) { CAstNode unwindBody = root.getChild(0); if (unwindBody.getKind() == CAstNode.BLOCK_STMT) { CAstNode firstStmt = unwindBody.getChild(0); if (firstStmt.getKind() == CAstNode.MONITOR_ENTER) { CAstNode expr = firstStmt.getChild(0); if (expr.getKind() == CAstNode.VAR) { String varName = (String) expr.getChild(0).getValue(); CAstNode protectBody = root.getChild(1); if (protectBody.getKind() == CAstNode.MONITOR_EXIT) { CAstNode expr2 = protectBody.getChild(0); if (expr2.getKind() == CAstNode.VAR) { String varName2 = (String) expr2.getChild(0).getValue(); if (varName.equals(varName2)) { return varName; } } } } } } } return null; } @Override protected CAstNode copyNodes(CAstNode n, final CAstControlFlowMap cfg, RewriteContext c, Map, CAstNode> nodeMap) { String varName; // don't copy operators or constants (presumably since they are immutable?) if (n instanceof CAstOperator) { return n; } else if (n.getValue() != null) { return Ast.makeConstant(n.getValue()); } else if (!contains(c, n) && (varName = isSynchronizedOnVar(n)) != null) { // we call contains() above since we pass n to copyNodes() below for the // true and false branches of the conditional, and in those recursive // calls we want n to be copied normally // the conditional test CAstNode test = Ast.makeNode(CAstNode.CALL, Ast.makeNode(CAstNode.VOID), Ast.makeConstant(f), Ast.makeNode(CAstNode.VAR, Ast.makeConstant(varName), Ast.makeConstant(JavaPrimitiveTypeMap.lookupType("boolean")))); // the new if conditional return Ast.makeNode(CAstNode.IF_STMT, test, copyNodes(n, cfg, new SyncContext(true, n, c), nodeMap), copyNodes(n, cfg, new SyncContext(false, n, c), nodeMap)); } else { // invoke copyNodes() on the children with context c, ensuring, e.g., that // the body of a synchronized block gets cloned CAstNode[] newChildren = new CAstNode[n.getChildCount()]; for (int i = 0; i < newChildren.length; i++) newChildren[i] = copyNodes(n.getChild(i), cfg, c, nodeMap); CAstNode newN = Ast.makeNode(n.getKind(), newChildren); nodeMap.put(Pair.make(n, c.key()), newN); return newN; } } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/000077500000000000000000000000001342410422700243265ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/callgraph/000077500000000000000000000000001342410422700262635ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/callgraph/AstJavaCFABuilder.java000066400000000000000000000022701342410422700323010ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.ipa.callgraph; import com.ibm.wala.classLoader.Language; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.propagation.cfa.DefaultPointerKeyFactory; import com.ibm.wala.ipa.cha.IClassHierarchy; /** * Common utilities for CFA-style call graph builders. */ public class AstJavaCFABuilder extends AstJavaSSAPropagationCallGraphBuilder { public AstJavaCFABuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) { super(Language.JAVA.getFakeRootMethod(cha, options, cache), options, cache, new DefaultPointerKeyFactory()); } } AstJavaSSAPropagationCallGraphBuilder.java000066400000000000000000000276731342410422700362570ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/callgraph/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.ipa.callgraph; import com.ibm.wala.analysis.typeInference.TypeInference; import com.ibm.wala.cast.ipa.callgraph.AstSSAPropagationCallGraphBuilder; import com.ibm.wala.cast.ipa.callgraph.GlobalObjectKey; import com.ibm.wala.cast.java.analysis.typeInference.AstJavaTypeInference; import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl.JavaClass; import com.ibm.wala.cast.java.ssa.AstJavaInstructionVisitor; import com.ibm.wala.cast.java.ssa.AstJavaInvokeInstruction; import com.ibm.wala.cast.java.ssa.AstJavaNewEnclosingInstruction; import com.ibm.wala.cast.java.ssa.EnclosingObjectReference; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.IMethod; import com.ibm.wala.fixpoint.IntSetVariable; import com.ibm.wala.fixpoint.UnaryOperator; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.propagation.AbstractFieldPointerKey; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.LocalPointerKey; import com.ibm.wala.ipa.callgraph.propagation.PointerKey; import com.ibm.wala.ipa.callgraph.propagation.PointerKeyFactory; import com.ibm.wala.ipa.callgraph.propagation.PointsToSetVariable; import com.ibm.wala.ssa.IR; import com.ibm.wala.ssa.SSANewInstruction; import com.ibm.wala.ssa.SymbolTable; import com.ibm.wala.types.MethodReference; import com.ibm.wala.util.debug.Assertions; import com.ibm.wala.util.strings.Atom; public class AstJavaSSAPropagationCallGraphBuilder extends AstSSAPropagationCallGraphBuilder { protected AstJavaSSAPropagationCallGraphBuilder(IMethod fakeRootClass, AnalysisOptions options, IAnalysisCacheView cache, PointerKeyFactory pointerKeyFactory) { super(fakeRootClass, options, cache, pointerKeyFactory); } // /////////////////////////////////////////////////////////////////////////// // // language specialization interface // // /////////////////////////////////////////////////////////////////////////// @Override protected boolean useObjectCatalog() { return false; } @Override protected AbstractFieldPointerKey fieldKeyForUnknownWrites(AbstractFieldPointerKey fieldKey) { assert false; return null; } // /////////////////////////////////////////////////////////////////////////// // // enclosing object pointer flow support // // /////////////////////////////////////////////////////////////////////////// public static class EnclosingObjectReferenceKey extends AbstractFieldPointerKey { private final IClass outer; public EnclosingObjectReferenceKey(InstanceKey inner, IClass outer) { super(inner); this.outer = outer; } @Override public int hashCode() { return getInstanceKey().hashCode() * outer.hashCode(); } @Override public boolean equals(Object o) { return (o instanceof EnclosingObjectReferenceKey) && ((EnclosingObjectReferenceKey) o).outer.equals(outer) && ((EnclosingObjectReferenceKey) o).getInstanceKey().equals(getInstanceKey()); } } // /////////////////////////////////////////////////////////////////////////// // // top-level node constraint generation // // /////////////////////////////////////////////////////////////////////////// protected TypeInference makeTypeInference(IR ir) { TypeInference ti = new AstJavaTypeInference(ir, false); if (DEBUG_TYPE_INFERENCE) { System.err.println(("IR of " + ir.getMethod())); System.err.println(ir); System.err.println(("TypeInference of " + ir.getMethod())); for (int i = 0; i <= ir.getSymbolTable().getMaxValueNumber(); i++) { if (ti.isUndefined(i)) { System.err.println((" value " + i + " is undefined")); } else { System.err.println((" value " + i + " has type " + ti.getType(i))); } } } return ti; } protected class AstJavaInterestingVisitor extends AstInterestingVisitor implements AstJavaInstructionVisitor { protected AstJavaInterestingVisitor(int vn) { super(vn); } @Override public void visitEnclosingObjectReference(EnclosingObjectReference inst) { Assertions.UNREACHABLE(); } @Override public void visitJavaInvoke(AstJavaInvokeInstruction instruction) { bingo = true; } } @Override protected InterestingVisitor makeInterestingVisitor(CGNode node, int vn) { return new AstJavaInterestingVisitor(vn); } // /////////////////////////////////////////////////////////////////////////// // // specialized pointer analysis // // /////////////////////////////////////////////////////////////////////////// protected static class AstJavaConstraintVisitor extends AstConstraintVisitor implements AstJavaInstructionVisitor { public AstJavaConstraintVisitor( AstSSAPropagationCallGraphBuilder builder, CGNode node) { super(builder, node); } /** * For each of objKey's instance keys ik, adds the constraint lvalKey = EORK(ik,cls), * where EORK(ik,cls) will be made equivalent to the actual enclosing class by * the handleNew() function below. */ private void handleEnclosingObject(final PointerKey lvalKey, final IClass cls, final PointerKey objKey) { SymbolTable symtab = ir.getSymbolTable(); int objVal; if (objKey instanceof LocalPointerKey) { objVal = ((LocalPointerKey) objKey).getValueNumber(); } else { objVal = 0; } if (objVal > 0 && contentsAreInvariant(symtab, du, objVal)) { system.recordImplicitPointsToSet(objKey); InstanceKey[] objs = getInvariantContents(objVal); for (InstanceKey obj : objs) { PointerKey enclosing = new EnclosingObjectReferenceKey(obj, cls); system.newConstraint(lvalKey, assignOperator, enclosing); } } else { system.newSideEffect(new UnaryOperator() { @Override public byte evaluate(PointsToSetVariable lhs, PointsToSetVariable rhs) { IntSetVariable tv = rhs; if (tv.getValue() != null) { tv.getValue().foreach(ptr -> { InstanceKey iKey = system.getInstanceKey(ptr); PointerKey enclosing = new EnclosingObjectReferenceKey(iKey, cls); system.newConstraint(lvalKey, assignOperator, enclosing); }); } return NOT_CHANGED; } @Override public int hashCode() { return System.identityHashCode(this); } @Override public boolean equals(Object o) { return o == this; } @Override public String toString() { return "enclosing objects of " + objKey; } }, objKey); } } @Override public void visitEnclosingObjectReference(EnclosingObjectReference inst) { PointerKey lvalKey = getPointerKeyForLocal(inst.getDef()); PointerKey objKey = getPointerKeyForLocal(1); IClass cls = getClassHierarchy().lookupClass(inst.getEnclosingType()); handleEnclosingObject(lvalKey, cls, objKey); } @Override public void visitNew(SSANewInstruction instruction) { super.visitNew(instruction); InstanceKey iKey = getInstanceKeyForAllocation(instruction.getNewSite()); if (iKey != null) { IClass klass = iKey.getConcreteType(); // in the case of a AstJavaNewEnclosingInstruction (a new instruction like outer.new Bla()), // we may need to record the instance keys if the pointer key outer is invariant (and thus implicit) InstanceKey enclosingInvariantKeys[] = null; if (klass instanceof JavaClass) { IClass enclosingClass = ((JavaClass) klass).getEnclosingClass(); // the immediate enclosing class. if (enclosingClass != null) { IClass currentCls = node.getMethod().getDeclaringClass(); PointerKey objKey; if ( instruction instanceof AstJavaNewEnclosingInstruction ) { int enclosingVal = ((AstJavaNewEnclosingInstruction) instruction).getEnclosing(); SymbolTable symtab = ir.getSymbolTable(); // pk 'outer' is invariant, which means it's implicit, so can't add a constraint with the pointer key. // we should just add constraints directly to the instance keys (below) if ( contentsAreInvariant(symtab, du, enclosingVal) ) enclosingInvariantKeys = getInvariantContents(enclosingVal); // what happens if objKey is implicit but the contents aren't invariant?! (it this possible?) big trouble! objKey = getPointerKeyForLocal(enclosingVal); } else objKey = getPointerKeyForLocal(1); System.err.println(("class is " + klass + ", enclosing is " + enclosingClass + ", method is " + node.getMethod())); if (node.getMethod().isWalaSynthetic()) { return; } currentCls = enclosingClass; PointerKey x = new EnclosingObjectReferenceKey(iKey, currentCls); if ( enclosingInvariantKeys != null ) for ( InstanceKey obj: enclosingInvariantKeys ) system.newConstraint(x, obj); else system.newConstraint(x, assignOperator, objKey); // If the immediate inclosing class is not a top-level class, we must make EORKs for all enclosing classes up to the top level. // for instance, if we have "D d = c.new D()", and c is of type A$B$C, methods in D may reference variables and functions from // A, B, and C. Therefore we must also make the links from EORK(allocsite of d,enc class B) and EORK(allocsite of d,en class A). // We do this by getting the enclosing class of C and making a link from EORK(d,B) -> EORK(c,B), etc. currentCls = ((JavaClass) currentCls).getEnclosingClass(); while (currentCls != null) { x = new EnclosingObjectReferenceKey(iKey, currentCls); // make EORK(d,B), EORK(d,A), etc. handleEnclosingObject(x, currentCls, objKey); // objKey is the pointer key representing the immediate inner class. // handleEnclosingObject finds x's instance keys and for each one "ik" links x to EORK(ik,currentCls) // thus, for currentCls=B, it will find the allocation site of c and make a link from EORK(d,B) to EORK(c,B) currentCls = ((JavaClass) currentCls).getEnclosingClass(); } } } } } @Override public void visitJavaInvoke(AstJavaInvokeInstruction instruction) { visitInvokeInternal(instruction, new DefaultInvariantComputer()); } } @Override public ConstraintVisitor makeVisitor(CGNode node) { return new AstJavaConstraintVisitor(this, node); } @Override protected boolean sameMethod(CGNode opNode, String definingMethod) { MethodReference reference = opNode.getMethod().getReference(); String selector = reference.getSelector().toString(); String containingClass = reference.getDeclaringClass().getName().toString(); return definingMethod.equals(containingClass + '/' + selector); } @Override public GlobalObjectKey getGlobalObject(Atom language) { Assertions.UNREACHABLE(); return null; } } AstJavaZeroOneContainerCFABuilder.java000066400000000000000000000063521342410422700353740ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/callgraph/******************************************************************************* * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.java.ipa.callgraph; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.ContextSelector; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.impl.DefaultContextSelector; import com.ibm.wala.ipa.callgraph.impl.DelegatingContextSelector; import com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter; import com.ibm.wala.ipa.callgraph.propagation.cfa.ContainerContextSelector; import com.ibm.wala.ipa.callgraph.propagation.cfa.ZeroXInstanceKeys; import com.ibm.wala.ipa.cha.IClassHierarchy; /** * * 0-1-CFA Call graph builder which analyzes calls to "container methods" in a context which is defined by the receiver * instance. * * @author sfink */ public class AstJavaZeroOneContainerCFABuilder extends AstJavaCFABuilder { /** * @param cha governing class hierarchy * @param options call graph construction options * @param appContextSelector application-specific logic to choose contexts * @param appContextInterpreter application-specific logic to interpret a method in context */ public AstJavaZeroOneContainerCFABuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter) { super(cha, options, cache); ContextSelector def = new DefaultContextSelector(options, cha); ContextSelector contextSelector = appContextSelector == null ? def : new DelegatingContextSelector(appContextSelector, def); SSAContextInterpreter contextInterpreter = makeDefaultContextInterpreters(appContextInterpreter, options, cha); setContextInterpreter(contextInterpreter); ZeroXInstanceKeys zik = makeInstanceKeys(cha, options, contextInterpreter); setInstanceKeys(new JavaScopeMappingInstanceKeys(this, zik)); ContextSelector CCS = makeContainerContextSelector(cha, zik); DelegatingContextSelector DCS = new DelegatingContextSelector(CCS, contextSelector); setContextSelector(DCS); } protected ZeroXInstanceKeys makeInstanceKeys(IClassHierarchy cha, AnalysisOptions options, SSAContextInterpreter contextInterpreter) { ZeroXInstanceKeys zik = new ZeroXInstanceKeys(options, cha, contextInterpreter, ZeroXInstanceKeys.ALLOCATIONS | ZeroXInstanceKeys.SMUSH_PRIMITIVE_HOLDERS | ZeroXInstanceKeys.SMUSH_STRINGS | ZeroXInstanceKeys.SMUSH_MANY | ZeroXInstanceKeys.SMUSH_THROWABLES); return zik; } /** * @return an object which creates contexts for call graph nodes based on the container disambiguation policy */ protected ContextSelector makeContainerContextSelector(IClassHierarchy cha, ZeroXInstanceKeys keys) { return new ContainerContextSelector(cha, keys); } } AstJavaZeroXCFABuilder.java000066400000000000000000000055771342410422700332270ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/callgraph/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.ipa.callgraph; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.ipa.callgraph.ContextSelector; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.impl.DefaultContextSelector; import com.ibm.wala.ipa.callgraph.impl.DelegatingContextSelector; import com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter; import com.ibm.wala.ipa.callgraph.propagation.cfa.ZeroXInstanceKeys; import com.ibm.wala.ipa.cha.IClassHierarchy; /** * 0-1-CFA Call graph builder, optimized to not disambiguate instances of "uninteresting" types. */ public class AstJavaZeroXCFABuilder extends AstJavaCFABuilder { public AstJavaZeroXCFABuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter, int instancePolicy) { super(cha, options, cache); SSAContextInterpreter contextInterpreter = makeDefaultContextInterpreters(appContextInterpreter, options, cha); setContextInterpreter(contextInterpreter); ContextSelector def = new DefaultContextSelector(options, cha); ContextSelector contextSelector = appContextSelector == null ? def : new DelegatingContextSelector(appContextSelector, def); setContextSelector(contextSelector); setInstanceKeys(new JavaScopeMappingInstanceKeys(this, new ZeroXInstanceKeys(options, cha, contextInterpreter, instancePolicy))); } /** * @param options options that govern call graph construction * @param cha governing class hierarchy * @param cl classloader that can find DOMO resources * @param scope representation of the analysis scope * @param xmlFiles set of Strings that are names of XML files holding bypass logic specifications. * @return a 0-1-Opt-CFA Call Graph Builder. */ public static AstJavaCFABuilder make(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, ClassLoader cl, AnalysisScope scope, String[] xmlFiles, byte instancePolicy) { com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha); for (String xmlFile : xmlFiles) { com.ibm.wala.ipa.callgraph.impl.Util.addBypassLogic(options, scope, cl, xmlFile, cha); } return new AstJavaZeroXCFABuilder(cha, options, cache, null, null, instancePolicy); } } JavaScopeMappingInstanceKeys.java000066400000000000000000000057021342410422700345630ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/callgraph/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.ipa.callgraph; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Set; import com.ibm.wala.cast.ipa.callgraph.ScopeMappingInstanceKeys; import com.ibm.wala.cast.ir.translator.AstTranslator; import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl.JavaClass; import com.ibm.wala.cast.loader.AstMethod; import com.ibm.wala.cast.loader.AstMethod.LexicalParent; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.IMethod; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.InstanceKeyFactory; import com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder; import com.ibm.wala.util.collections.HashSetFactory; import com.ibm.wala.util.collections.Pair; public class JavaScopeMappingInstanceKeys extends ScopeMappingInstanceKeys { public JavaScopeMappingInstanceKeys(PropagationCallGraphBuilder builder, InstanceKeyFactory basic) { super(builder, basic); } protected LexicalParent[] getParents(InstanceKey base) { IClass cls = base.getConcreteType(); if (isPossiblyLexicalClass(cls)) { Set result = HashSetFactory.make(); for (IMethod m : cls.getAllMethods()) { if ((m instanceof AstMethod) && !m.isStatic()) { AstMethod M = (AstMethod) m; LexicalParent[] parents = M.getParents(); result.addAll(Arrays.asList(parents)); } } if (!result.isEmpty()) { if (AstTranslator.DEBUG_LEXICAL) System.err.println((base + " has parents: " + result)); return result.toArray(new LexicalParent[0]); } } if (AstTranslator.DEBUG_LEXICAL) System.err.println((base + " has no parents")); return new LexicalParent[0]; } protected boolean isPossiblyLexicalClass(IClass cls) { return cls instanceof JavaClass; } @Override protected boolean needsScopeMappingKey(InstanceKey base) { boolean result = getParents(base).length > 0; if (AstTranslator.DEBUG_LEXICAL) System.err.println(("does " + base + " need scope mapping? " + result)); return result; } @Override protected Collection getConstructorCallers(ScopeMappingInstanceKey smik, Pair name) { // for Java, the creator node is exactly what we want return Collections.singleton(smik.getCreator()); } } JavaSourceAnalysisScope.java000066400000000000000000000037571342410422700336230ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/callgraph/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ /* * Created on Sep 27, 2005 */ package com.ibm.wala.cast.java.ipa.callgraph; import java.util.Collection; import java.util.Collections; import com.ibm.wala.classLoader.Language; import com.ibm.wala.classLoader.Module; import com.ibm.wala.classLoader.SourceDirectoryTreeModule; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.util.strings.Atom; public class JavaSourceAnalysisScope extends AnalysisScope { public final static ClassLoaderReference SOURCE = new ClassLoaderReference(Atom.findOrCreateAsciiAtom("Source"), Atom .findOrCreateAsciiAtom("Java"), ClassLoaderReference.Application); public JavaSourceAnalysisScope() { this(Collections.singleton(Language.JAVA)); } protected void initCoreForJavaSource() { initCoreForJava(); loadersByName.put(SOURCE.getName(),SOURCE); setLoaderImpl(SOURCE, "com.ibm.wala.cast.java.translator.polyglot.PolyglotSourceLoaderImpl"); } protected JavaSourceAnalysisScope(Collection languages) { super(languages); initCoreForJavaSource(); initSynthetic(SOURCE); } public ClassLoaderReference getSourceLoader() { return SOURCE; } @Override public void addToScope(ClassLoaderReference loader, Module m) { if (m instanceof SourceDirectoryTreeModule && loader.equals(ClassLoaderReference.Application)) { super.addToScope(SOURCE, m); } else { super.addToScope(loader, m); } } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/modref/000077500000000000000000000000001342410422700256025ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/modref/AstJavaModRef.java000066400000000000000000000053111342410422700310730ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.java.ipa.modref; import java.util.Collection; import com.ibm.wala.cast.ipa.callgraph.AstHeapModel; import com.ibm.wala.cast.ipa.modref.AstModRef; import com.ibm.wala.cast.java.ssa.AstJavaInstructionVisitor; import com.ibm.wala.cast.java.ssa.AstJavaInvokeInstruction; import com.ibm.wala.cast.java.ssa.EnclosingObjectReference; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis; import com.ibm.wala.ipa.callgraph.propagation.PointerKey; import com.ibm.wala.ipa.modref.ExtendedHeapModel; public class AstJavaModRef extends AstModRef { protected static class AstJavaRefVisitor extends AstRefVisitor implements AstJavaInstructionVisitor { protected AstJavaRefVisitor(CGNode n, Collection result, PointerAnalysis pa, ExtendedHeapModel h) { super(n, result, pa, (AstHeapModel)h); } @Override public void visitJavaInvoke(AstJavaInvokeInstruction instruction) { } @Override public void visitEnclosingObjectReference(EnclosingObjectReference inst) { } } @Override protected RefVisitor makeRefVisitor(CGNode n, Collection result, PointerAnalysis pa, ExtendedHeapModel h) { return new AstJavaRefVisitor<>(n, result, pa, h); } protected static class AstJavaModVisitor extends AstModVisitor implements AstJavaInstructionVisitor { protected AstJavaModVisitor(CGNode n, Collection result, ExtendedHeapModel h, PointerAnalysis pa) { super(n, result, (AstHeapModel)h, pa); } @Override public void visitJavaInvoke(AstJavaInvokeInstruction instruction) { } @Override public void visitEnclosingObjectReference(EnclosingObjectReference inst) { } } @Override protected ModVisitor makeModVisitor(CGNode n, Collection result, PointerAnalysis pa, ExtendedHeapModel h, boolean ignoreAllocHeapDefs) { return new AstJavaModVisitor<>(n, result, h, pa); } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/slicer/000077500000000000000000000000001342410422700256075ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/slicer/AstJavaSlicer.java000066400000000000000000000106211342410422700311450ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.java.ipa.slicer; import java.util.Collection; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; import java.util.function.Predicate; import com.ibm.wala.cast.ir.ssa.AstAssertInstruction; import com.ibm.wala.cast.java.ipa.modref.AstJavaModRef; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.impl.PartialCallGraph; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis; import com.ibm.wala.ipa.slicer.NormalStatement; import com.ibm.wala.ipa.slicer.SDG; import com.ibm.wala.ipa.slicer.Slicer; import com.ibm.wala.ipa.slicer.Statement; import com.ibm.wala.ssa.IR; import com.ibm.wala.ssa.SSAArrayLoadInstruction; import com.ibm.wala.ssa.SSAArrayStoreInstruction; import com.ibm.wala.ssa.SSAGetInstruction; import com.ibm.wala.ssa.SSAInstruction; import com.ibm.wala.ssa.SSAMonitorInstruction; import com.ibm.wala.ssa.SSAPutInstruction; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.collections.Pair; import com.ibm.wala.util.graph.traverse.DFS; public class AstJavaSlicer extends Slicer { /* * Use the passed-in SDG */ public static Collection computeBackwardSlice(SDG sdg, Collection ss) throws IllegalArgumentException, CancelException { return computeSlice(sdg, ss, true); } /** * @param ss a collection of statements of interest */ public static Collection computeSlice(SDG sdg, Collection ss, boolean backward) throws CancelException { return new AstJavaSlicer().slice(sdg, ss, backward); } public static Set gatherStatements(CallGraph CG, Collection partialRoots, Predicate filter) { Set result = new HashSet<>(); for (CGNode n : DFS.getReachableNodes(CG, partialRoots)) { IR nir = n.getIR(); if (nir != null) { SSAInstruction insts[] = nir.getInstructions(); for (int i = 0; i < insts.length; i++) { if (filter.test(insts[i])) { result.add(new NormalStatement(n, i)); } } } } return result; } public static Set gatherAssertions(CallGraph CG, Collection partialRoots) { return gatherStatements(CG, partialRoots, AstAssertInstruction.class::isInstance); } public static Set gatherMonitors(CallGraph CG, Collection partialRoots) { return gatherStatements(CG, partialRoots, SSAMonitorInstruction.class::isInstance); } public static Set gatherWrites(CallGraph CG, Collection partialRoots) { return gatherStatements(CG, partialRoots, o -> (o instanceof SSAPutInstruction) || (o instanceof SSAArrayStoreInstruction)); } public static Set gatherReads(CallGraph CG, Collection partialRoots) { return gatherStatements(CG, partialRoots, o -> (o instanceof SSAGetInstruction) || (o instanceof SSAArrayLoadInstruction)); } public static Pair, SDG> computeAssertionSlice(CallGraph CG, PointerAnalysis pa, Collection partialRoots, boolean multiThreadedCode) throws IllegalArgumentException, CancelException { CallGraph pcg = PartialCallGraph.make(CG, new LinkedHashSet<>(partialRoots)); SDG sdg = new SDG<>(pcg, pa, new AstJavaModRef<>(), DataDependenceOptions.FULL, ControlDependenceOptions.FULL); //System.err.println(("SDG:\n" + sdg)); Set stmts = gatherAssertions(CG, partialRoots); if (multiThreadedCode) { // Grab anything that has "side effects" under JMM stmts.addAll(gatherReads(CG, partialRoots)); stmts.addAll(gatherWrites(CG, partialRoots)); stmts.addAll(gatherMonitors(CG, partialRoots)); } return Pair.make(AstJavaSlicer.computeBackwardSlice(sdg, stmts), sdg); } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/loader/000077500000000000000000000000001342410422700250235ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/loader/JavaSourceLoaderImpl.java000066400000000000000000000623651342410422700317150ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ /* * Created on Aug 22, 2005 */ package com.ibm.wala.cast.java.loader; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import com.ibm.wala.cast.ir.ssa.AssignInstruction; import com.ibm.wala.cast.ir.ssa.AstAssertInstruction; import com.ibm.wala.cast.ir.ssa.AstEchoInstruction; import com.ibm.wala.cast.ir.ssa.AstGlobalRead; import com.ibm.wala.cast.ir.ssa.AstGlobalWrite; import com.ibm.wala.cast.ir.ssa.AstIsDefinedInstruction; import com.ibm.wala.cast.ir.ssa.AstLexicalAccess.Access; import com.ibm.wala.cast.ir.ssa.AstLexicalRead; import com.ibm.wala.cast.ir.ssa.AstLexicalWrite; import com.ibm.wala.cast.ir.ssa.AstPropertyRead; import com.ibm.wala.cast.ir.ssa.AstPropertyWrite; import com.ibm.wala.cast.ir.ssa.AstYieldInstruction; import com.ibm.wala.cast.ir.translator.AstTranslator; import com.ibm.wala.cast.ir.translator.AstTranslator.AstLexicalInformation; import com.ibm.wala.cast.java.ssa.AstJavaInstructionFactory; import com.ibm.wala.cast.java.ssa.AstJavaInvokeInstruction; import com.ibm.wala.cast.java.ssa.AstJavaNewEnclosingInstruction; import com.ibm.wala.cast.java.ssa.EnclosingObjectReference; import com.ibm.wala.cast.java.translator.SourceModuleTranslator; import com.ibm.wala.cast.loader.AstClass; import com.ibm.wala.cast.loader.AstField; import com.ibm.wala.cast.loader.AstMethod; import com.ibm.wala.cast.loader.AstMethod.DebuggingInformation; import com.ibm.wala.cast.tree.CAstAnnotation; import com.ibm.wala.cast.tree.CAstEntity; import com.ibm.wala.cast.tree.CAstQualifier; import com.ibm.wala.cast.tree.CAstSourcePositionMap; import com.ibm.wala.cast.tree.CAstType; import com.ibm.wala.cast.tree.CAstType.Function; import com.ibm.wala.cfg.AbstractCFG; import com.ibm.wala.cfg.IBasicBlock; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.classLoader.ClassLoaderImpl; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.IClassLoader; import com.ibm.wala.classLoader.IField; import com.ibm.wala.classLoader.IMethod; import com.ibm.wala.classLoader.JavaLanguage.JavaInstructionFactory; import com.ibm.wala.classLoader.Language; import com.ibm.wala.classLoader.Module; import com.ibm.wala.classLoader.ModuleEntry; import com.ibm.wala.classLoader.NewSiteReference; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.shrikeCT.AnnotationsReader.ConstantElementValue; import com.ibm.wala.shrikeCT.AnnotationsReader.ElementValue; import com.ibm.wala.shrikeCT.ClassConstants; import com.ibm.wala.ssa.SSAInstruction; import com.ibm.wala.ssa.SymbolTable; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.types.Descriptor; import com.ibm.wala.types.FieldReference; import com.ibm.wala.types.MethodReference; import com.ibm.wala.types.Selector; import com.ibm.wala.types.TypeName; import com.ibm.wala.types.TypeReference; import com.ibm.wala.types.annotations.Annotation; import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.collections.HashSetFactory; import com.ibm.wala.util.debug.Assertions; import com.ibm.wala.util.strings.Atom; /** * A {@link ClassLoaderImpl} that processes source file entities in the * compile-time classpath. */ public abstract class JavaSourceLoaderImpl extends ClassLoaderImpl { public Map fTypeMap = HashMapFactory.make(); /** BEGIN Custom change: Common superclass is optional */ private final boolean existsCommonSuperclass; // extension to deal with X10 that has no common superclass /** END Custom change: Common superclass is optional */ /** * WALA representation of a Java class residing in a source file * * @author rfuhrer */ public class JavaClass extends AstClass { protected final IClass enclosingClass; protected final Collection superTypeNames; private final Collection annotations; public JavaClass(String typeName, Collection superTypeNames, CAstSourcePositionMap.Position position, Collection qualifiers, JavaSourceLoaderImpl loader, IClass enclosingClass, Collection annotations) { super(position, TypeName.string2TypeName(typeName), loader, (short) mapToInt(qualifiers), new HashMap(), new HashMap()); this.superTypeNames = superTypeNames; this.enclosingClass = enclosingClass; this.annotations = annotations; } @Override public Collection getAnnotations() { return annotations; } @Override public IClassHierarchy getClassHierarchy() { return cha; } @Override public IClass getSuperclass() { boolean excludedSupertype=false; for (TypeName name : superTypeNames) { IClass domoType = lookupClass(name); if (domoType != null && !domoType.isInterface()) { return domoType; } if (domoType == null && getClassHierarchy().getScope().getExclusions().contains(name.toString().substring(1))){ excludedSupertype = true; } } // The following test allows the root class to reside in source; without // it, the assertion requires all classes represented by a JavaClass to // have a superclass. /** BEGIN Custom change: Common superclass is optional */ // Is no longer true in new X10 - no common object super class if (existsCommonSuperclass && !getName().equals(JavaSourceLoaderImpl.this.getLanguage().getRootType().getName()) && !excludedSupertype) { /** END Custom change: Common superclass is optional */ Assertions.UNREACHABLE("Cannot find super class for " + this + " in " + superTypeNames); } if (excludedSupertype){ System.err.println("Not tracking calls through excluded superclass of " + getName() + " extends " + superTypeNames); } return null; } @Override public Collection getDirectInterfaces() { List result = new ArrayList<>(); for (TypeName name : superTypeNames) { IClass domoType = lookupClass(name); if (domoType != null && domoType.isInterface()) { result.add(domoType); } if (domoType == null && !getClassHierarchy().getScope().getExclusions().contains(name.toString().substring(1))){ assert false : "Failed to find non-excluded interface: " + name; } } return result; } protected void addMethod(CAstEntity methodEntity, IClass owner, AbstractCFG cfg, SymbolTable symtab, boolean hasCatchBlock, Map, TypeReference[]> caughtTypes, boolean hasMonitorOp, AstLexicalInformation lexicalInfo, DebuggingInformation debugInfo) { declaredMethods.put(Util.methodEntityToSelector(methodEntity), new ConcreteJavaMethod(methodEntity, owner, cfg, symtab, hasCatchBlock, caughtTypes, hasMonitorOp, lexicalInfo, debugInfo)); } protected void addMethod(CAstEntity methodEntity, IClass owner) { declaredMethods.put(Util.methodEntityToSelector(methodEntity), new AbstractJavaMethod(methodEntity, owner)); } protected void addField(CAstEntity fieldEntity) { declaredFields.put(Util.fieldEntityToAtom(fieldEntity), new JavaField(fieldEntity, JavaSourceLoaderImpl.this, this, JavaSourceLoaderImpl.this.getAnnotations(fieldEntity))); } public IClass getEnclosingClass() { return enclosingClass; } @Override public String toString() { StringBuilder sb = new StringBuilder(" getAnnotations(CAstEntity e) { Collection annotations = e.getAnnotations(); if (annotations == null || annotations.isEmpty()) { return null; } else { Collection result = HashSetFactory.make(); for(CAstAnnotation ca : annotations) { TypeName walaTypeName = toWALATypeName(ca.getType()); TypeReference ref = TypeReference.findOrCreate(getReference(), walaTypeName); if (ca.getArguments() == null || ca.getArguments().isEmpty()) { result.add(Annotation.make(ref)); } else { Map args = HashMapFactory.make(); for(Map.Entry a : ca.getArguments().entrySet()) { args.put(a.getKey(), new ConstantElementValue(a.getValue())); } result.add(Annotation.makeWithNamed(ref, args)); } } return result; } } /** * WALA representation of a field on a Java type that resides in a source file * * @author rfuhrer */ protected class JavaField extends AstField { protected JavaField(CAstEntity fieldEntity, IClassLoader loader, IClass declaringClass, Collection annotations) { super(FieldReference.findOrCreate(declaringClass.getReference(), Atom.findOrCreateUnicodeAtom(fieldEntity.getName()), TypeReference.findOrCreate(loader.getReference(), TypeName.string2TypeName(fieldEntity.getType().getName()))), fieldEntity.getQualifiers(), declaringClass, declaringClass.getClassHierarchy(), annotations); } } /** * Generic DOMO representation of a method on a Java type that resides in a * source file * * @author rfuhrer */ protected abstract class JavaEntityMethod extends AstMethod { private final TypeReference[] parameterTypes; private final TypeReference[] exceptionTypes; public JavaEntityMethod(CAstEntity methodEntity, IClass owner, AbstractCFG cfg, SymbolTable symtab, boolean hasCatchBlock, Map, TypeReference[]> caughtTypes, boolean hasMonitorOp, AstLexicalInformation lexicalInfo, DebuggingInformation debugInfo) { super(owner, methodEntity.getQualifiers(), cfg, symtab, MethodReference.findOrCreate(owner.getReference(), Util .methodEntityToSelector(methodEntity)), hasCatchBlock, caughtTypes, hasMonitorOp, lexicalInfo, debugInfo, JavaSourceLoaderImpl.this.getAnnotations(methodEntity)); this.parameterTypes = computeParameterTypes(methodEntity); this.exceptionTypes = computeExceptionTypes(methodEntity); } public JavaEntityMethod(CAstEntity methodEntity, IClass owner) { super(owner, methodEntity.getQualifiers(), MethodReference.findOrCreate(owner.getReference(), Util .methodEntityToSelector(methodEntity)), JavaSourceLoaderImpl.this.getAnnotations(methodEntity)); this.parameterTypes = computeParameterTypes(methodEntity); this.exceptionTypes = computeExceptionTypes(methodEntity); } public int getMaxLocals() { Assertions.UNREACHABLE("AbstractJavaMethod.getMaxLocals() called"); return 0; } public int getMaxStackHeight() { Assertions.UNREACHABLE("AbstractJavaMethod.getMaxStackHeight() called"); return 0; } @Override public TypeReference getParameterType(int i) { return parameterTypes[i]; } protected TypeReference[] computeParameterTypes(CAstEntity methodEntity) { TypeReference[] types; CAstType.Function type = (Function) methodEntity.getType(); int argCount = type.getArgumentTypes().size(); if (isStatic()) { types = new TypeReference[argCount]; for (int i = 0; i < argCount; i++) { types[i] = TypeReference.findOrCreate(JavaSourceLoaderImpl.this.getReference(), type.getArgumentTypes() .get(i).getName()); } } else { types = new TypeReference[argCount + 1]; types[0] = cls.getReference(); for (int i = 0; i < argCount; i++) { types[i + 1] = TypeReference.findOrCreate(JavaSourceLoaderImpl.this.getReference(), type.getArgumentTypes() .get(i).getName()); } } return types; } @Override public TypeReference[] getDeclaredExceptions() { return exceptionTypes; } protected TypeReference[] computeExceptionTypes(CAstEntity methodEntity) { CAstType.Function fType = (Function) methodEntity.getType(); Collection exceptionTypes = fType.getExceptionTypes(); TypeReference[] result = new TypeReference[exceptionTypes.size()]; int i = 0; for (CAstType type : exceptionTypes) { result[i] = TypeReference.findOrCreate(JavaSourceLoaderImpl.this.getReference(), type.getName()); ++i; } return result; } @Override public String toString() { return "'; } } /** * DOMO representation of an abstract (body-less) method on a Java type that * resides in a source file * * @author rfuhrer */ protected class AbstractJavaMethod extends JavaEntityMethod { public AbstractJavaMethod(CAstEntity methodEntity, IClass owner) { super(methodEntity, owner); } @Override public String getLocalVariableName(int bcIndex, int localNumber) { Assertions.UNREACHABLE("AbstractJavaMethod.getLocalVariableName() called"); return null; } @Override public boolean hasLocalVariableTable() { Assertions.UNREACHABLE("AbstractJavaMethod.hasLocalVariableTable() called"); return false; } @Override public LexicalParent[] getParents() { return new LexicalParent[0]; } @Override public IClassHierarchy getClassHierarchy() { return cha; } } /** * DOMO representation of a concrete method (which has a body) on a Java type * that resides in a source file * * @author rfuhrer */ public class ConcreteJavaMethod extends JavaEntityMethod { public ConcreteJavaMethod(CAstEntity methodEntity, IClass owner, AbstractCFG cfg, SymbolTable symtab, boolean hasCatchBlock, Map, TypeReference[]> caughtTypes, boolean hasMonitorOp, AstLexicalInformation lexicalInfo, DebuggingInformation debugInfo) { super(methodEntity, owner, cfg, symtab, hasCatchBlock, caughtTypes, hasMonitorOp, lexicalInfo, debugInfo); } @Override public IClassHierarchy getClassHierarchy() { return cha; } @Override public String getLocalVariableName(int bcIndex, int localNumber) { return null; } @Override public boolean hasLocalVariableTable() { return false; } @Override public LexicalParent[] getParents() { if (AstTranslator.DEBUG_LEXICAL) { System.err.println(("resolving parents of " + this)); } if (lexicalInfo() == null) { if (AstTranslator.DEBUG_LEXICAL) System.err.println("no info"); return new LexicalParent[0]; } final String[] parents = lexicalInfo().getScopingParents(); if (parents == null) { if (AstTranslator.DEBUG_LEXICAL) System.err.println("no parents"); return new LexicalParent[0]; } LexicalParent result[] = new LexicalParent[parents.length]; for (int i = 0; i < parents.length; i++) { int lastLeftParen = parents[i].lastIndexOf('('); int lastQ = parents[i].lastIndexOf('/', lastLeftParen); String typeName = parents[i].substring(0, lastQ); final IClass cls = lookupClass(TypeName.string2TypeName(typeName)); String sig = parents[i].substring(lastQ); int nameEnd = sig.indexOf('('); String nameStr = sig.substring(1, nameEnd); Atom name = Atom.findOrCreateUnicodeAtom(nameStr); String descStr = sig.substring(nameEnd); Descriptor desc = Descriptor.findOrCreateUTF8(Language.JAVA, descStr); final Selector sel = new Selector(name, desc); if (AstTranslator.DEBUG_LEXICAL) System.err.println(("get " + typeName + ", " + nameStr + ", " + descStr)); final int hack = i; result[i] = new LexicalParent() { @Override public String getName() { return parents[hack]; } @Override public AstMethod getMethod() { return (AstMethod) cls.getMethod(sel); } }; if (AstTranslator.DEBUG_LEXICAL) System.err.println(("parent " + result[i].getName() + " is " + result[i].getMethod())); } return result; } } public static int mapToInt(Collection qualifiers) { int result = 0; for (CAstQualifier q : qualifiers) { if (q == CAstQualifier.PUBLIC) result |= ClassConstants.ACC_PUBLIC; if (q == CAstQualifier.PROTECTED) result |= ClassConstants.ACC_PROTECTED; if (q == CAstQualifier.PRIVATE) result |= ClassConstants.ACC_PRIVATE; if (q == CAstQualifier.STATIC) result |= ClassConstants.ACC_STATIC; if (q == CAstQualifier.FINAL) result |= ClassConstants.ACC_FINAL; if (q == CAstQualifier.SYNCHRONIZED) result |= ClassConstants.ACC_SYNCHRONIZED; if (q == CAstQualifier.TRANSIENT) result |= ClassConstants.ACC_TRANSIENT; if (q == CAstQualifier.NATIVE) result |= ClassConstants.ACC_NATIVE; if (q == CAstQualifier.INTERFACE) result |= ClassConstants.ACC_INTERFACE; if (q == CAstQualifier.ABSTRACT) result |= ClassConstants.ACC_ABSTRACT; if (q == CAstQualifier.VOLATILE) result |= ClassConstants.ACC_VOLATILE; if (q == CAstQualifier.STRICTFP) result |= ClassConstants.ACC_STRICT; } return result; } /** BEGIN Custom change: Common superclass is optional */ public JavaSourceLoaderImpl(boolean existsCommonSuperClass, ClassLoaderReference loaderRef, IClassLoader parent, IClassHierarchy cha) { super(loaderRef, cha.getScope().getArrayClassLoader(), parent, cha.getScope().getExclusions(), cha); this.existsCommonSuperclass = existsCommonSuperClass; } public JavaSourceLoaderImpl(ClassLoaderReference loaderRef, IClassLoader parent, IClassHierarchy cha) { // standard case: we have a common super class this(true, loaderRef, parent, cha); } /** END Custom change: Common superclass is optional */ public IClassHierarchy getClassHierarchy() { return cha; } @Override protected void loadAllSources(Set modules) { getTranslator().loadAllSources(modules); } protected abstract SourceModuleTranslator getTranslator(); /** BEGIN Custom change: Optional deletion of fTypeMap */ public static volatile boolean deleteTypeMapAfterInit = true; /** END Custom change: Optional deletion of fTypeMap */ @Override public void init(List modules) throws IOException { super.init(modules); /** BEGIN Custom change: Optional deletion of fTypeMap */ if (deleteTypeMapAfterInit) { fTypeMap = null; } /** END Custom change: Optional deletion of fTypeMap */ } public void defineFunction(CAstEntity n, IClass owner, AbstractCFG cfg, SymbolTable symtab, boolean hasCatchBlock, Map, TypeReference[]> caughtTypes, boolean hasMonitorOp, AstLexicalInformation lexicalInfo, DebuggingInformation debugInfo) { ((JavaClass) owner).addMethod(n, owner, cfg, symtab, hasCatchBlock, caughtTypes, hasMonitorOp, lexicalInfo, debugInfo); } public void defineAbstractFunction(CAstEntity n, IClass owner) { ((JavaClass) owner).addMethod(n, owner); } public void defineField(CAstEntity n, IClass owner) { ((JavaClass) owner).addField(n); } protected static TypeName toWALATypeName(CAstType type) { return TypeName.string2TypeName(type.getName()); } public IClass defineType(CAstEntity type, String typeName, CAstEntity owner) { Collection superTypeNames = new ArrayList<>(); for (CAstType superType : type.getType().getSupertypes()) { superTypeNames.add(toWALATypeName(superType)); } JavaClass javaClass = new JavaClass(typeName, superTypeNames, type.getPosition(), type.getQualifiers(), this, (owner != null) ? (JavaClass) fTypeMap.get(owner) : (JavaClass) null, getAnnotations(type)); if (getParent().lookupClass(javaClass.getName()) != null) { return null; } fTypeMap.put(type, javaClass); loadedClasses.put(javaClass.getName(), javaClass); return javaClass; } @Override public String toString() { return "Java Source Loader (classes " + loadedClasses.values() + ')'; } public static class InstructionFactory extends JavaInstructionFactory implements AstJavaInstructionFactory { @Override public com.ibm.wala.cast.java.ssa.EnclosingObjectReference EnclosingObjectReference(int iindex, int lval, TypeReference type) { return new EnclosingObjectReference(iindex, lval, type); } @Override public AstJavaNewEnclosingInstruction JavaNewEnclosingInstruction(int iindex, int result, NewSiteReference site, int enclosing) { return new AstJavaNewEnclosingInstruction(iindex, result, site, enclosing); } @Override public AstJavaInvokeInstruction JavaInvokeInstruction(int iindex, int result[], int[] params, int exception, CallSiteReference site) { return result == null ? new AstJavaInvokeInstruction(iindex, params, exception, site) : new AstJavaInvokeInstruction(iindex, result[0], params, exception, site); } @Override public AstAssertInstruction AssertInstruction(int iindex, int value, boolean fromSpecification) { return new AstAssertInstruction(iindex, value, fromSpecification); } @Override public com.ibm.wala.cast.ir.ssa.AssignInstruction AssignInstruction(int iindex, int result, int val) { return new AssignInstruction(iindex, result, val); } @Override public com.ibm.wala.cast.ir.ssa.EachElementGetInstruction EachElementGetInstruction(int iindex, int value, int objectRef, int propRef) { throw new UnsupportedOperationException(); } @Override public com.ibm.wala.cast.ir.ssa.EachElementHasNextInstruction EachElementHasNextInstruction(int iindex, int value, int objectRef, int propRef) { throw new UnsupportedOperationException(); } @Override public AstEchoInstruction EchoInstruction(int iindex, int[] rvals) { throw new UnsupportedOperationException(); } @Override public AstGlobalRead GlobalRead(int iindex, int lhs, FieldReference global) { throw new UnsupportedOperationException(); } @Override public AstGlobalWrite GlobalWrite(int iindex, FieldReference global, int rhs) { throw new UnsupportedOperationException(); } @Override public AstIsDefinedInstruction IsDefinedInstruction(int iindex, int lval, int rval, int fieldVal, FieldReference fieldRef) { throw new UnsupportedOperationException(); } @Override public AstIsDefinedInstruction IsDefinedInstruction(int iindex, int lval, int rval, FieldReference fieldRef) { throw new UnsupportedOperationException(); } @Override public AstIsDefinedInstruction IsDefinedInstruction(int iindex, int lval, int rval, int fieldVal) { throw new UnsupportedOperationException(); } @Override public AstIsDefinedInstruction IsDefinedInstruction(int iindex, int lval, int rval) { throw new UnsupportedOperationException(); } @Override public AstLexicalRead LexicalRead(int iindex, Access[] accesses) { return new AstLexicalRead(iindex, accesses); } @Override public AstLexicalRead LexicalRead(int iindex, Access access) { return new AstLexicalRead(iindex, access); } @Override public AstLexicalRead LexicalRead(int iindex, int lhs, String definer, String globalName, TypeReference type) { return new AstLexicalRead(iindex, lhs, definer, globalName, type); } @Override public AstLexicalWrite LexicalWrite(int iindex, Access[] accesses) { return new AstLexicalWrite(iindex, accesses); } @Override public AstLexicalWrite LexicalWrite(int iindex, Access access) { return new AstLexicalWrite(iindex, access); } @Override public AstLexicalWrite LexicalWrite(int iindex, String definer, String globalName, TypeReference type, int rhs) { return new AstLexicalWrite(iindex, definer, globalName, type, rhs); } @Override public AstYieldInstruction YieldInstruction(int iindex, int[] rvals) { return new AstYieldInstruction(iindex, rvals); } @Override public AstPropertyRead PropertyRead(int iindex, int result, int objectRef, int memberRef) { assert false; return null; } @Override public AstPropertyWrite PropertyWrite(int iindex, int objectRef, int memberRef, int value) { assert false; return null; } } protected static final InstructionFactory insts = new InstructionFactory(); @Override public InstructionFactory getInstructionFactory() { return insts; } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/loader/Util.java000066400000000000000000000033521342410422700266060ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.loader; import com.ibm.wala.cast.tree.CAstEntity; import com.ibm.wala.cast.tree.CAstType; import com.ibm.wala.types.Descriptor; import com.ibm.wala.types.Selector; import com.ibm.wala.types.TypeName; import com.ibm.wala.util.strings.Atom; public class Util { public static Selector methodEntityToSelector(CAstEntity methodEntity) { Atom name= Atom.findOrCreateUnicodeAtom(methodEntity.getName()); CAstType.Function signature= (CAstType.Function) methodEntity.getType(); // Use signature to determine # of args; (entity's args includes 'this') TypeName retTypeName= TypeName.string2TypeName(signature.getReturnType().getName()); TypeName[] argTypeNames= (signature.getArgumentCount() == 0) ? null : new TypeName[signature.getArgumentCount()]; int i= 0; for (CAstType argType : signature.getArgumentTypes()) { argTypeNames[i]= TypeName.string2TypeName(argType.getName()); ++i; } Descriptor desc= Descriptor.findOrCreate(argTypeNames, retTypeName); return new Selector(name, desc); } public static Atom fieldEntityToAtom(CAstEntity fieldEntity) { return Atom.findOrCreateUnicodeAtom(fieldEntity.getName()); } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/000077500000000000000000000000001342410422700243435ustar00rootroot00000000000000AstJavaAbstractInstructionVisitor.java000066400000000000000000000016661342410422700337770ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.ssa; import com.ibm.wala.cast.ir.ssa.AstAbstractInstructionVisitor; public class AstJavaAbstractInstructionVisitor extends AstAbstractInstructionVisitor implements AstJavaInstructionVisitor { @Override public void visitJavaInvoke(AstJavaInvokeInstruction instruction) { } @Override public void visitEnclosingObjectReference(EnclosingObjectReference inst) { } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/AstJavaInstructionFactory.java000066400000000000000000000022521342410422700323320ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.java.ssa; import com.ibm.wala.cast.ir.ssa.AstInstructionFactory; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.classLoader.NewSiteReference; import com.ibm.wala.types.TypeReference; public interface AstJavaInstructionFactory extends AstInstructionFactory { AstJavaInvokeInstruction JavaInvokeInstruction(int iindex, int result[], int[] params, int exception, CallSiteReference site); EnclosingObjectReference EnclosingObjectReference(int iindex, int lval, TypeReference type); AstJavaNewEnclosingInstruction JavaNewEnclosingInstruction(int iindex, int result, NewSiteReference site, int enclosing); } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/AstJavaInstructionVisitor.java000066400000000000000000000015161342410422700323640ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.ssa; import com.ibm.wala.cast.ir.ssa.AstInstructionVisitor; public interface AstJavaInstructionVisitor extends AstInstructionVisitor { public void visitJavaInvoke(AstJavaInvokeInstruction instruction); public void visitEnclosingObjectReference(EnclosingObjectReference inst); } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/AstJavaInvokeInstruction.java000066400000000000000000000043401342410422700321560ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.ssa; import java.util.Collection; import com.ibm.wala.cast.ir.ssa.FixedParametersInvokeInstruction; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.classLoader.JavaLanguage; import com.ibm.wala.ssa.SSAInstruction; import com.ibm.wala.ssa.SSAInstructionFactory; import com.ibm.wala.ssa.SSAInvokeInstruction; import com.ibm.wala.types.TypeReference; public class AstJavaInvokeInstruction extends FixedParametersInvokeInstruction { protected AstJavaInvokeInstruction(int iindex, int results[], int[] params, int exception, CallSiteReference site) { super(iindex, results, params, exception, site); } public AstJavaInvokeInstruction(int iindex, int result, int[] params, int exception, CallSiteReference site) { this(iindex, new int[] { result }, params, exception, site); SSAInvokeInstruction.assertParamsKosher(result, params, site); } /** * Constructor InvokeInstruction. This case for void return values */ public AstJavaInvokeInstruction(int iindex, int[] params, int exception, CallSiteReference site) { this(iindex, null, params, exception, site); } @Override protected SSAInstruction copyInstruction(SSAInstructionFactory insts, int results[], int[] params, int exception) { return ((AstJavaInstructionFactory) insts).JavaInvokeInstruction(iindex, results, params, exception, getCallSite()); } @Override public void visit(IVisitor v) { ((AstJavaInstructionVisitor) v).visitJavaInvoke(this); } @Override public Collection getExceptionTypes() { return JavaLanguage.getNullPointerException(); } @Override public int hashCode() { return (site.hashCode() * 7529) + (exception * 9823); } } AstJavaNewEnclosingInstruction.java000066400000000000000000000036621342410422700332450ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.java.ssa; import java.util.Collection; import com.ibm.wala.classLoader.JavaLanguage; import com.ibm.wala.classLoader.NewSiteReference; import com.ibm.wala.ssa.SSAInstruction; import com.ibm.wala.ssa.SSAInstructionFactory; import com.ibm.wala.ssa.SSANewInstruction; import com.ibm.wala.types.TypeReference; // A new instruction with an explicit outer class, i.e. "Inner inner = outer.new Inner();" public class AstJavaNewEnclosingInstruction extends SSANewInstruction { int enclosing; @Override public int getNumberOfUses() { return 1; } @Override public int getUse(int i) { assert i == 0; return enclosing; } public AstJavaNewEnclosingInstruction(int iindex, int result, NewSiteReference site, int enclosing) throws IllegalArgumentException { super(iindex, result, site); this.enclosing = enclosing; } public int getEnclosing() { return this.enclosing; } @Override public String toString() { return super.toString() + " ENCLOSING v" + enclosing; } @Override public SSAInstruction copyForSSA(SSAInstructionFactory insts, int[] defs, int[] uses) { return ((AstJavaInstructionFactory)insts).JavaNewEnclosingInstruction(iindex, defs==null? getDef(0): defs[0], getNewSite(), uses==null? enclosing: uses[0]); } @Override public Collection getExceptionTypes() { return JavaLanguage.getNewScalarExceptions(); } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/EnclosingObjectReference.java000066400000000000000000000047521342410422700321050ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.java.ssa; import java.util.Collection; import java.util.Collections; import com.ibm.wala.ssa.SSAInstruction; import com.ibm.wala.ssa.SSAInstructionFactory; import com.ibm.wala.ssa.SymbolTable; import com.ibm.wala.types.TypeReference; /** * The CAst source language front end for Java has explicit support for lexically-enclosing objects, rather than compiling them * away into extra fields and access-control thwarting accessor methods as is done in bytecode. This instruction represents a read * of the object of the given type that lexically encloses its use value. * * @author Julian Dolby (dolby@us.ibm.com) */ public class EnclosingObjectReference extends SSAInstruction { private final TypeReference type; private final int lval; public EnclosingObjectReference(int iindex, int lval, TypeReference type) { super(iindex); this.lval = lval; this.type = type; } @Override public boolean hasDef() { return true; } @Override public int getDef() { return lval; } @Override public int getDef(int i) { assert i == 0; return lval; } @Override public int getNumberOfDefs() { return 1; } public TypeReference getEnclosingType() { return type; } @Override public SSAInstruction copyForSSA(SSAInstructionFactory insts, int[] defs, int[] uses) { return ((AstJavaInstructionFactory) insts).EnclosingObjectReference(iindex, defs == null ? lval : defs[0], type); } @Override public String toString(SymbolTable symbolTable) { return getValueString(symbolTable, lval) + " = enclosing " + type.getName(); } @Override public void visit(IVisitor v) { ((AstJavaInstructionVisitor) v).visitEnclosingObjectReference(this); } @Override public int hashCode() { return lval * type.hashCode(); } @Override public Collection getExceptionTypes() { return Collections.emptySet(); } @Override public boolean isFallThrough() { return true; } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/translator/000077500000000000000000000000001342410422700257465ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/translator/Java2IRTranslator.java000066400000000000000000000047701342410422700320710ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ /* * Created on Aug 22, 2005 */ package com.ibm.wala.cast.java.translator; import java.io.PrintWriter; import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl; import com.ibm.wala.cast.tree.CAst; import com.ibm.wala.cast.tree.CAstEntity; import com.ibm.wala.cast.tree.impl.CAstImpl; import com.ibm.wala.cast.tree.rewrite.CAstRewriter; import com.ibm.wala.cast.tree.rewrite.CAstRewriterFactory; import com.ibm.wala.cast.util.CAstPrinter; import com.ibm.wala.classLoader.ModuleEntry; import com.ibm.wala.util.config.SetOfClasses; public class Java2IRTranslator { private final boolean DEBUG; protected final JavaSourceLoaderImpl fLoader; protected final SetOfClasses exclusions; CAstRewriterFactory castRewriterFactory = null; public Java2IRTranslator(JavaSourceLoaderImpl srcLoader, SetOfClasses exclusions) { this(srcLoader, null, exclusions); } public Java2IRTranslator(JavaSourceLoaderImpl srcLoader, CAstRewriterFactory castRewriterFactory, SetOfClasses exclusions) { this(srcLoader, castRewriterFactory, false, exclusions); } public Java2IRTranslator(JavaSourceLoaderImpl srcLoader, CAstRewriterFactory castRewriterFactory, boolean debug, SetOfClasses exclusions) { DEBUG = debug; fLoader = srcLoader; this.castRewriterFactory = castRewriterFactory; this.exclusions = exclusions; } public void translate(ModuleEntry module, CAstEntity ce) { if (DEBUG) { PrintWriter printWriter = new PrintWriter(System.out); CAstPrinter.printTo(ce, printWriter); printWriter.flush(); } if (castRewriterFactory != null) { CAst cast = new CAstImpl(); CAstRewriter rw = castRewriterFactory.createCAstRewriter(cast); ce = rw.rewrite(ce); if (DEBUG) { PrintWriter printWriter = new PrintWriter(System.out); CAstPrinter.printTo(ce, printWriter); printWriter.flush(); } } new JavaCAst2IRTranslator(module, ce, fLoader, exclusions).translate(); } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/translator/JavaCAst2IRTranslator.java000066400000000000000000000417731342410422700326500ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ /* * Created on Aug 22, 2005 */ package com.ibm.wala.cast.java.translator; import java.util.Collection; import java.util.Collections; import java.util.Map; import com.ibm.wala.cast.ir.translator.AstTranslator; import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl; import com.ibm.wala.cast.java.ssa.AstJavaInvokeInstruction; import com.ibm.wala.cast.java.ssa.AstJavaNewEnclosingInstruction; import com.ibm.wala.cast.java.ssa.EnclosingObjectReference; import com.ibm.wala.cast.loader.AstMethod.DebuggingInformation; import com.ibm.wala.cast.tree.CAstControlFlowMap; import com.ibm.wala.cast.tree.CAstEntity; import com.ibm.wala.cast.tree.CAstNode; import com.ibm.wala.cast.tree.CAstQualifier; import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position; import com.ibm.wala.cast.tree.CAstType; import com.ibm.wala.cast.tree.CAstType.Method; import com.ibm.wala.cast.tree.visit.CAstVisitor; import com.ibm.wala.cfg.AbstractCFG; import com.ibm.wala.cfg.IBasicBlock; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.ModuleEntry; import com.ibm.wala.classLoader.NewSiteReference; import com.ibm.wala.ssa.SSAInstruction; import com.ibm.wala.ssa.SymbolTable; import com.ibm.wala.types.FieldReference; import com.ibm.wala.types.TypeName; import com.ibm.wala.types.TypeReference; import com.ibm.wala.util.config.SetOfClasses; import com.ibm.wala.util.debug.Assertions; public class JavaCAst2IRTranslator extends AstTranslator { private final CAstEntity fSourceEntity; private final ModuleEntry module; private final SetOfClasses exclusions; public JavaCAst2IRTranslator(ModuleEntry module, CAstEntity sourceFileEntity, JavaSourceLoaderImpl loader, SetOfClasses exclusions) { super(loader); fSourceEntity = sourceFileEntity; this.module = module; this.exclusions = exclusions; } public void translate() { translate(fSourceEntity, module); } public CAstEntity sourceFileEntity() { return fSourceEntity; } public JavaSourceLoaderImpl loader() { return (JavaSourceLoaderImpl) loader; } @Override protected boolean useDefaultInitValues() { return true; } // Java does not have standalone global variables, and let's not // adopt the nasty JavaScript practice of creating globals without // explicit definitions @Override protected boolean hasImplicitGlobals() { return false; } @Override protected TypeReference defaultCatchType() { return TypeReference.JavaLangThrowable; } @Override protected TypeReference makeType(CAstType type) { return TypeReference.findOrCreate(loader.getReference(), TypeName.string2TypeName(type.getName())); } // Java globals are disguised as fields (statics), so we should never // ask this question when parsing Java code @Override protected boolean treatGlobalsAsLexicallyScoped() { Assertions.UNREACHABLE(); return false; } @Override protected void doThrow(WalkContext context, int exception) { context.cfg().addInstruction(insts.ThrowInstruction(context.cfg().getCurrentInstruction(), exception)); } @Override public void doArrayRead(WalkContext context, int result, int arrayValue, CAstNode arrayRefNode, int[] dimValues) { TypeReference arrayTypeRef = (TypeReference) arrayRefNode.getChild(1).getValue(); context.cfg().addInstruction(insts.ArrayLoadInstruction(context.cfg().getCurrentInstruction(), result, arrayValue, dimValues[0], arrayTypeRef)); processExceptions(arrayRefNode, context); } @Override public void doArrayWrite(WalkContext context, int arrayValue, CAstNode arrayRefNode, int[] dimValues, int rval) { TypeReference arrayTypeRef = arrayRefNode.getKind() == CAstNode.ARRAY_LITERAL ? ((TypeReference) arrayRefNode.getChild(0) .getChild(0).getValue()).getArrayElementType() : (TypeReference) arrayRefNode.getChild(1).getValue(); context.cfg().addInstruction(insts.ArrayStoreInstruction(context.cfg().getCurrentInstruction(), arrayValue, dimValues[0], rval, arrayTypeRef)); processExceptions(arrayRefNode, context); } @Override protected void doFieldRead(WalkContext context, int result, int receiver, CAstNode elt, CAstNode parent) { // elt is a constant CAstNode whose value is a FieldReference. FieldReference fieldRef = (FieldReference) elt.getValue(); if (receiver == -1) { // a static field: AstTranslator.getValue() produces // -1 for null, we hope context.cfg().addInstruction(insts.GetInstruction(context.cfg().getCurrentInstruction(), result, fieldRef)); } else { context.cfg().addInstruction(insts.GetInstruction(context.cfg().getCurrentInstruction(), result, receiver, fieldRef)); processExceptions(parent, context); } } @Override protected void doFieldWrite(WalkContext context, int receiver, CAstNode elt, CAstNode parent, int rval) { FieldReference fieldRef = (FieldReference) elt.getValue(); if (receiver == -1) { // a static field: AstTranslator.getValue() produces // -1 for null, we hope context.cfg().addInstruction(insts.PutInstruction(context.cfg().getCurrentInstruction(), rval, fieldRef)); } else { context.cfg().addInstruction(insts.PutInstruction(context.cfg().getCurrentInstruction(), receiver, rval, fieldRef)); processExceptions(parent, context); } } @Override protected void doMaterializeFunction(CAstNode n, WalkContext context, int result, int exception, CAstEntity fn) { // Not possible in Java (no free-standing functions) Assertions.UNREACHABLE("Real functions in Java??? I don't think so!"); } @Override protected void doNewObject(WalkContext context, CAstNode newNode, int result, Object type, int[] arguments) { TypeReference typeRef = (TypeReference) type; NewSiteReference site = NewSiteReference.make(context.cfg().getCurrentInstruction(), typeRef); if (newNode.getKind() == CAstNode.NEW_ENCLOSING) { context.cfg().addInstruction(new AstJavaNewEnclosingInstruction(context.cfg().getCurrentInstruction(), result, site, arguments[0])); } else { context.cfg().addInstruction( (arguments == null) ? insts.NewInstruction(context.cfg().getCurrentInstruction(), result, site) : insts.NewInstruction(context.cfg().getCurrentInstruction(), result, site, arguments)); } processExceptions(newNode, context); } private static void processExceptions(CAstNode n, WalkContext context) { context.cfg().addPreNode(n, context.getUnwindState()); context.cfg().newBlock(true); Collection labels = context.getControlFlow().getTargetLabels(n); for (Object label : labels) { CAstNode target = context.getControlFlow().getTarget(n, label); if (target == CAstControlFlowMap.EXCEPTION_TO_EXIT) context.cfg().addPreEdgeToExit(n, true); else context.cfg().addPreEdge(n, target, true); } } @Override protected void doCall(WalkContext context, CAstNode call, int result, int exception, CAstNode name, int receiver, int[] arguments) { assert name.getKind() == CAstNode.CONSTANT; CallSiteReference dummySiteRef = (CallSiteReference) name.getValue(); int pc = context.cfg().getCurrentInstruction(); boolean isStatic = (receiver == -1); int[] realArgs = isStatic ? arguments : new int[arguments.length + 1]; if (!isStatic) { realArgs[0] = receiver; System.arraycopy(arguments, 0, realArgs, 1, arguments.length); } CallSiteReference realSiteRef = CallSiteReference.make(pc, dummySiteRef.getDeclaredTarget(), dummySiteRef.getInvocationCode()); if (realSiteRef.getDeclaredTarget().getReturnType().equals(TypeReference.Void)) context.cfg().addInstruction(new AstJavaInvokeInstruction(context.cfg().getCurrentInstruction(), realArgs, exception, realSiteRef)); else context.cfg().addInstruction(new AstJavaInvokeInstruction(context.cfg().getCurrentInstruction(), result, realArgs, exception, realSiteRef)); processExceptions(call, context); } @Override protected void doGlobalWrite(WalkContext context, String name, TypeReference type, int rval) { Assertions.UNREACHABLE("doGlobalWrite() called for Java code???"); } @Override protected void defineField(CAstEntity topEntity, WalkContext definingContext, CAstEntity n) { assert topEntity.getKind() == CAstEntity.TYPE_ENTITY; assert n.getKind() == CAstEntity.FIELD_ENTITY; // N.B.: base class may actually ask to create a synthetic type to wrap // code bodies, so we may see other things than TYPE_ENTITY here. TypeName ownerName = makeType(topEntity.getType()).getName(); IClass owner = loader.lookupClass(ownerName); assert owner != null || exclusions.contains(ownerName.toString()) : ownerName + " not found in " + loader; if (owner != null) { ((JavaSourceLoaderImpl) loader).defineField(n, owner); } } // handles abstract method declarations, which do not get defineFunction // called for them @Override protected void declareFunction(CAstEntity N, WalkContext definingContext) { CAstType.Method methodType = (Method) N.getType(); CAstType owningType = methodType.getDeclaringType(); IClass owner = loader.lookupClass(makeType(owningType).getName()); assert owner != null || exclusions.contains(owningType.getName()) : makeType(owningType).getName().toString() + " not found in " + loader; if (owner != null && N.getQualifiers().contains(CAstQualifier.ABSTRACT)) { ((JavaSourceLoaderImpl) loader).defineAbstractFunction(N, owner); } } @Override protected void defineFunction(CAstEntity N, WalkContext definingContext, AbstractCFG> cfg, SymbolTable symtab, boolean hasCatchBlock, Map,TypeReference[]> caughtTypes, boolean hasMonitorOp, AstLexicalInformation lexicalInfo, DebuggingInformation debugInfo) { // N.B.: base class may actually ask to create a synthetic type to wrap // code bodies, so we may see other things than TYPE_ENTITY here. CAstType.Method methodType = (Method) N.getType(); CAstType owningType = methodType.getDeclaringType(); TypeName typeName = makeType(owningType).getName(); IClass owner = loader.lookupClass(typeName); assert owner != null || exclusions.contains(owningType.getName()) : typeName.toString() + " not found in " + loader; if (owner != null) { symtab.getConstant(0); symtab.getNullConstant(); ((JavaSourceLoaderImpl) loader).defineFunction(N, owner, cfg, symtab, hasCatchBlock, caughtTypes, hasMonitorOp, lexicalInfo, debugInfo); } } @Override protected void doPrimitive(int resultVal, WalkContext context, CAstNode primitiveCall) { // For now, no-op (no primitives in normal Java code) Assertions.UNREACHABLE("doPrimitive() called for Java code???"); } @Override protected String composeEntityName(WalkContext parent, CAstEntity f) { switch (f.getKind()) { case CAstEntity.TYPE_ENTITY: { return (parent.getName().length() == 0) ? f.getName() : parent.getName() + '/' + f.getName(); } case CAstEntity.FUNCTION_ENTITY: { // TODO properly handle types with clashing names/signatures within a // given method return parent.getName() + '/' + f.getSignature(); } default: { return parent.getName(); } } } private CAstEntity getEnclosingType(CAstEntity entity) { if (entity.getQualifiers().contains(CAstQualifier.STATIC)) return null; else return getEnclosingTypeInternal(getParent(entity)); } private CAstEntity getEnclosingTypeInternal(CAstEntity entity) { switch (entity.getKind()) { case CAstEntity.TYPE_ENTITY: { return entity; } case CAstEntity.FUNCTION_ENTITY: { if (entity.getQualifiers().contains(CAstQualifier.STATIC)) return null; else return getEnclosingTypeInternal(getParent(entity)); } case CAstEntity.FILE_ENTITY: { return null; } default: { return getEnclosingTypeInternal(getParent(entity)); } } } @Override protected boolean defineType(CAstEntity type, WalkContext wc) { CAstEntity parentType = getEnclosingType(type); // ((JavaSourceLoaderImpl)loader).defineType(type, // composeEntityName(wc,type), parentType); if (exclusions != null && exclusions.contains(type.getType().getName().substring(1))) { return false; } else { return ((JavaSourceLoaderImpl) loader).defineType(type, type.getType().getName(), parentType) != null; } } @Override protected void leaveThis(CAstNode n, WalkContext c, CAstVisitor visitor) { if (n.getChildCount() == 0) { super.leaveThis(n, c, visitor); } else { int result = c.currentScope().allocateTempValue(); c.setValue(n, result); c.cfg().addInstruction(new EnclosingObjectReference(c.cfg().getCurrentInstruction(), result, (TypeReference) n.getChild(0).getValue())); } } @Override protected boolean visitCast(CAstNode n, WalkContext context, CAstVisitor visitor) { int result = context.currentScope().allocateTempValue(); context.setValue(n, result); return false; } @Override protected void leaveCast(CAstNode n, WalkContext context, CAstVisitor visitor) { int result = context.getValue(n); CAstType toType = (CAstType) n.getChild(0).getValue(); TypeReference toRef = makeType(toType); CAstType fromType = (CAstType) n.getChild(2).getValue(); TypeReference fromRef = makeType(fromType); if (toRef.isPrimitiveType()) { context.cfg().addInstruction( insts.ConversionInstruction( context.cfg().getCurrentInstruction(), result, context.getValue(n.getChild(1)), fromRef, toRef, false)); } else { context.cfg().addInstruction( insts.CheckCastInstruction( context.cfg().getCurrentInstruction(), result, context.getValue(n.getChild(1)), toRef, true)); processExceptions(n, context); } } @Override protected boolean visitInstanceOf(CAstNode n, WalkContext context, CAstVisitor visitor) { int result = context.currentScope().allocateTempValue(); context.setValue(n, result); return false; } @Override protected void leaveInstanceOf(CAstNode n, WalkContext context, CAstVisitor visitor) { int result = context.getValue(n); CAstType type = (CAstType) n.getChild(0).getValue(); TypeReference ref = makeType( type ); context.cfg().addInstruction( insts.InstanceofInstruction( context.cfg().getCurrentInstruction(), result, context.getValue(n.getChild(1)), ref)); } @Override protected boolean doVisit(CAstNode n, WalkContext wc, CAstVisitor visitor) { if (n.getKind() == CAstNode.MONITOR_ENTER) { visitor.visit(n.getChild(0), wc, visitor); wc.cfg().addInstruction(insts.MonitorInstruction(wc.cfg().getCurrentInstruction(), wc.getValue(n.getChild(0)), true)); processExceptions(n, wc); return true; } else if (n.getKind() == CAstNode.MONITOR_EXIT) { visitor.visit(n.getChild(0), wc, visitor); wc.cfg().addInstruction(insts.MonitorInstruction(wc.cfg().getCurrentInstruction(), wc.getValue(n.getChild(0)), false)); processExceptions(n, wc); return true; } else { return super.doVisit(n, wc, visitor); } } private static CAstType getType(final String name) { return new CAstType.Class() { @Override public Collection getSupertypes() { return Collections.emptySet(); } @Override public String getName() { return name; } @Override public boolean isInterface() { return false; } @Override public Collection getQualifiers() { return Collections.emptySet(); } }; } @Override protected CAstType topType() { return getType("java.lang.Object"); } @Override protected CAstType exceptionType() { return getType("java.lang.Exception"); } @Override protected Position[] getParameterPositions(CAstEntity n) { int offset = 0; Position[] parameterPositions = new Position[ n.getArgumentCount() ]; if ((n.getType() instanceof CAstType.Method) && !((CAstType.Method)n.getType()).isStatic()) { offset = 1; } for(int i = 0; i < n.getArgumentCount() - offset; i++) { parameterPositions[i+offset] = n.getPosition(i); } return parameterPositions; } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/translator/JavaProcedureEntity.java000066400000000000000000000013211342410422700325350ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.java.translator; import com.ibm.wala.cast.tree.CAstEntity; public interface JavaProcedureEntity extends CAstEntity { @Override public String getSignature(); } SourceModuleTranslator.java000066400000000000000000000017031342410422700332130ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/translator/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ /* * Created on Oct 6, 2005 */ package com.ibm.wala.cast.java.translator; import java.util.Set; import com.ibm.wala.classLoader.ModuleEntry; /** * An interface used by the JavaSourceLoaderImpl to encapsulate the loading of source * entities on the compile-time classpath into the DOMO analysis infrastructure. * @author rfuhrer */ public interface SourceModuleTranslator { void loadAllSources(Set modules); } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/types/000077500000000000000000000000001342410422700247215ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/types/JavaPrimitiveTypeMap.java000066400000000000000000000043731342410422700316450ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ /* * Created on Sep 28, 2005 */ package com.ibm.wala.cast.java.types; import java.util.Collection; import java.util.Collections; import java.util.Map; import com.ibm.wala.cast.tree.CAstType; import com.ibm.wala.util.collections.HashMapFactory; public class JavaPrimitiveTypeMap { public static final Map primNameMap = HashMapFactory.make(); public static class JavaPrimitiveType implements CAstType.Primitive { String fLongName; String fShortName; private JavaPrimitiveType(String longName, String shortName) { fLongName = longName; fShortName = shortName; } @Override public String getName() { return fShortName; } public String getLongName() { return fLongName; } @Override public Collection getSupertypes() { return Collections.EMPTY_LIST; } } public static String getShortName(String longName) { return primNameMap.get(longName).getName(); } public static JavaPrimitiveType lookupType(String longName) { return primNameMap.get(longName); } public static final JavaPrimitiveType VoidType = new JavaPrimitiveType("void", "V"); static { primNameMap.put("int", new JavaPrimitiveType("int", "I")); primNameMap.put("long", new JavaPrimitiveType("long", "J")); primNameMap.put("short", new JavaPrimitiveType("short", "S")); primNameMap.put("char", new JavaPrimitiveType("char", "C")); primNameMap.put("byte", new JavaPrimitiveType("byte", "B")); primNameMap.put("boolean", new JavaPrimitiveType("boolean", "Z")); primNameMap.put("float", new JavaPrimitiveType("float", "F")); primNameMap.put("double", new JavaPrimitiveType("double", "D")); primNameMap.put("void", VoidType); } } WALA-R_1.5.1/com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/types/JavaType.java000066400000000000000000000013401342410422700273050ustar00rootroot00000000000000/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ /* * Created on Sep 21, 2005 */ package com.ibm.wala.cast.java.types; import com.ibm.wala.cast.tree.CAstType; public interface JavaType extends CAstType.Class { @Override boolean isInterface(); } WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/000077500000000000000000000000001342410422700217665ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/.gitignore000066400000000000000000000000101342410422700237450ustar00rootroot00000000000000/*.html WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/.settings/000077500000000000000000000000001342410422700237045ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/.settings/org.eclipse.jdt.core.prefs000066400000000000000000000750201342410422700306720ustar00rootroot00000000000000eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=error org.eclipse.jdt.core.compiler.problem.comparingIdentical=error org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=error org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=error org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=error org.eclipse.jdt.core.compiler.problem.finalParameterBound=error org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=error org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=error org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=error org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=error org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=error org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=error org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=error org.eclipse.jdt.core.compiler.problem.rawTypeReference=error org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=error org.eclipse.jdt.core.compiler.problem.unusedLocal=error org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error org.eclipse.jdt.core.compiler.problem.unusedParameter=error org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=132 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/.settings/org.eclipse.pde.prefs000066400000000000000000000020161342410422700277250ustar00rootroot00000000000000compilers.f.unresolved-features=0 compilers.f.unresolved-plugins=0 compilers.incompatible-environment=0 compilers.p.build=0 compilers.p.build.bin.includes=0 compilers.p.build.encodings=0 compilers.p.build.java.compiler=0 compilers.p.build.java.compliance=0 compilers.p.build.missing.output=0 compilers.p.build.output.library=0 compilers.p.build.source.library=0 compilers.p.build.src.includes=0 compilers.p.deprecated=0 compilers.p.discouraged-class=0 compilers.p.internal=0 compilers.p.missing-packages=0 compilers.p.missing-version-export-package=2 compilers.p.missing-version-import-package=0 compilers.p.missing-version-require-bundle=0 compilers.p.no-required-att=0 compilers.p.not-externalized-att=0 compilers.p.unknown-attribute=0 compilers.p.unknown-class=0 compilers.p.unknown-element=0 compilers.p.unknown-identifier=0 compilers.p.unknown-resource=0 compilers.p.unresolved-ex-points=0 compilers.p.unresolved-import=0 compilers.s.create-docs=false compilers.s.doc-folder=doc compilers.s.open-tags=0 eclipse.preferences.version=1 WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/.settings/org.eclipse.wst.validation.prefs000066400000000000000000000021651342410422700321300ustar00rootroot00000000000000DELEGATES_PREFERENCE=delegateValidatorList USER_BUILD_PREFERENCE=enabledBuildValidatorList USER_MANUAL_PREFERENCE=enabledManualValidatorList USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600 eclipse.preferences.version=1 override=true suspend=false vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03 vals/org.eclipse.wst.xml.core.xml/groups=0107include05111contentType128org.eclipse.core.runtime.xmlT111contentType134org.eclipse.wst.xml.core.xmlsourceT111contentType134org.eclipse.wst.xml.core.xslsourceT111contentType134org.eclipse.jst.jsp.core.tldsourceT07fileext03xmlF0107exclude08113projectNature134org.eclipse.jst.j2ee.ejb.EJBNature113projectNature130org.eclipse.jst.j2ee.EARNature04file08.projectT0104file110.classpathT0104file110.settings/T02111contentType133org.eclipse.jdt.junit.JUnitResultF04file122target/p2artifacts.xmlT0304file120target/p2content.xmlT03 vf.version=3 WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/META-INF/000077500000000000000000000000001342410422700231265ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/META-INF/MANIFEST.MF000066400000000000000000000013161342410422700245610ustar00rootroot00000000000000Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.ibm.wala.cast.js.html.nu_validator Bundle-Version: 1.5.1 Export-Package: com.ibm.wala.cast.js.html.nu_validator, com.ibm.wala.cast.js.test Require-Bundle: com.ibm.wala.cast.js;bundle-version="1.0.0", com.ibm.wala.cast.js.rhino.test;bundle-version="1.0.0", com.ibm.wala.cast.js.test;bundle-version="1.0.0", com.ibm.wala.cast.test;bundle-version="1.0.0", com.ibm.wala.cast;bundle-version="1.0.0", com.ibm.wala.core.tests;bundle-version="1.1.3", com.ibm.wala.core;bundle-version="1.1.3", org.junit;bundle-version="4.8.1" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ClassPath: ., lib/htmlparser-1.4.jar WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/OSGI-INF/000077500000000000000000000000001342410422700231415ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/OSGI-INF/l10n/000077500000000000000000000000001342410422700237135ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/OSGI-INF/l10n/bundle.properties000066400000000000000000000001261342410422700273010ustar00rootroot00000000000000#Properties file for com.ibm.wala.cast.js.html.nu_validator Bundle-Name = Nu_validatorWALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/build.gradle000066400000000000000000000012711342410422700242460ustar00rootroot00000000000000sourceSets { main.java.srcDirs = ['src'] test.java.srcDirs = ['tests'] } dependencies { compile( 'nu.validator.htmlparser:htmlparser:1.4', project(':com.ibm.wala.cast'), project(':com.ibm.wala.cast.js'), project(':com.ibm.wala.util'), ) testCompile( project(':com.ibm.wala.cast.test'), project(':com.ibm.wala.core.tests'), project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.rhino.test'), project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.test'), ) } processTestResources { def data = project(':com.ibm.wala.cast.js.test.data') dependsOn data.processTestResources from data.sourceSets.test.resources } test { maxHeapSize = '800M' } WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/build.properties000066400000000000000000000004561342410422700252100ustar00rootroot00000000000000source.. = src/,\ tests/ bin.includes = META-INF/,\ .,\ lib/htmlparser-1.4.jar,\ OSGI-INF/l10n/bundle.properties,\ OSGI-INF/ jars.extra.classpath = lib/htmlparser-1.4.jar javacProjectSettings = true output.. = bin/ WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/pom.xml000066400000000000000000000047131342410422700233100ustar00rootroot00000000000000 4.0.0 WALA com.ibm.wala 1.5.1 com.ibm.wala.cast.js.html.nu_validator eclipse-plugin maven-dependency-plugin copy nu.validator.htmlparser htmlparser 1.4 jar false ${basedir}/lib org.apache.maven.plugins maven-surefire-plugin test test ${project.build.outputDirectory} -Xmx800M -ea true ${basedir}/../com.ibm.wala.cast.js.test.data/examples-src test junit junit 4.12 test nu.validator.htmlparser htmlparser 1.4 WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/src/000077500000000000000000000000001342410422700225555ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/src/com/000077500000000000000000000000001342410422700233335ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/src/com/ibm/000077500000000000000000000000001342410422700241025ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/src/com/ibm/wala/000077500000000000000000000000001342410422700250265ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/src/com/ibm/wala/cast/000077500000000000000000000000001342410422700257605ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/src/com/ibm/wala/cast/js/000077500000000000000000000000001342410422700263745ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/src/com/ibm/wala/cast/js/html/000077500000000000000000000000001342410422700273405ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/src/com/ibm/wala/cast/js/html/nu_validator/000077500000000000000000000000001342410422700320275ustar00rootroot00000000000000NuValidatorHtmlParser.java000066400000000000000000000151531342410422700370520ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/src/com/ibm/wala/cast/js/html/nu_validator/****************************************************************************** * Copyright (c) 2002 - 2011 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.js.html.nu_validator; import java.io.IOException; import java.io.InputStream; import java.io.LineNumberReader; import java.io.Reader; import java.io.StringReader; import java.net.MalformedURLException; import java.net.URL; import java.util.AbstractMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.Stack; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; import org.xml.sax.InputSource; import org.xml.sax.Locator; import org.xml.sax.SAXException; import com.ibm.wala.cast.js.html.IHtmlCallback; import com.ibm.wala.cast.js.html.IHtmlParser; import com.ibm.wala.cast.js.html.ITag; import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position; import com.ibm.wala.cast.tree.impl.LineNumberPosition; import com.ibm.wala.util.collections.Pair; import nu.validator.htmlparser.common.XmlViolationPolicy; import nu.validator.htmlparser.sax.HtmlParser; public class NuValidatorHtmlParser implements IHtmlParser { @Override public void parse(final URL url, final Reader reader, final IHtmlCallback handler, final String fileName) { URL xx = null; try { xx = new URL("file://" + fileName); } catch (MalformedURLException e1) { e1.printStackTrace(); } final URL localFileName = xx; HtmlParser parser = new HtmlParser(); parser.setXmlPolicy(XmlViolationPolicy.ALLOW); parser.setContentHandler(new ContentHandler() { private Locator locator; private Stack tags = new Stack<>(); private int countLines(char[] ch, int start, int length) { LineNumberReader r = new LineNumberReader(new StringReader (new String(ch, start, length))); try { while (r.read() > -1); } catch (IOException e) { throw new RuntimeException("cannot read from string", e); } return r.getLineNumber(); } @Override public void setDocumentLocator(Locator locator) { this.locator = locator; } @Override public void startElement(String uri, final String localName, String qName, final Attributes atts) throws SAXException { final Position line = new LineNumberPosition(url, localFileName, locator.getLineNumber()); tags.push(new ITag() { @Override public String getName() { return localName; } @Override public Pair getAttributeByName(String name) { if (atts.getValue(name) != null) { return Pair.make(atts.getValue(name), line); } else { return null; } } @Override public Map> getAllAttributes() { return new AbstractMap>() { private Set>> es = null; @Override public Set>> entrySet() { if (es == null) { es = new HashSet<>(); for(int i = 0; i < atts.getLength(); i++) { final int index = i; es.add(new Map.Entry>() { @Override public String getKey() { return atts.getLocalName(index).toLowerCase(); } @Override public Pair getValue() { if (atts.getValue(index) != null) { return Pair.make(atts.getValue(index), line); } else { return null; } } @Override public Pair setValue(Pair value) { throw new UnsupportedOperationException(); } }); } } return es; } }; } @Override public Position getElementPosition() { return line; } @Override public Position getContentPosition() { return line; } }); handler.handleStartTag(tags.peek()); } @Override public void endElement(String uri, String localName, String qName) throws SAXException { handler.handleEndTag(tags.pop()); } @Override public void characters(char[] ch, int start, int length) throws SAXException { handler.handleText(new LineNumberPosition(url, localFileName, locator.getLineNumber() - countLines(ch, start, length)), new String(ch, start, length)); } @Override public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { handler.handleText(new LineNumberPosition(url, localFileName, locator.getLineNumber()), new String(ch, start, length)); } @Override public void startDocument() throws SAXException { // do nothing } @Override public void endDocument() throws SAXException { // do nothing } @Override public void startPrefixMapping(String prefix, String uri) throws SAXException { // do nothing } @Override public void endPrefixMapping(String prefix) throws SAXException { // do nothing } @Override public void processingInstruction(String target, String data) throws SAXException { // do nothing } @Override public void skippedEntity(String name) throws SAXException { // do nothing } }); try { parser.parse(new InputSource(new InputStream() { @Override public int read() throws IOException { int v; do { v = reader.read(); } while (v == '\r'); return v; } })); } catch (IOException e) { assert false : e.toString(); } catch (SAXException e) { assert false : e.toString(); } } } WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/tests/000077500000000000000000000000001342410422700231305ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/tests/com/000077500000000000000000000000001342410422700237065ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/tests/com/ibm/000077500000000000000000000000001342410422700244555ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/tests/com/ibm/wala/000077500000000000000000000000001342410422700254015ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/tests/com/ibm/wala/cast/000077500000000000000000000000001342410422700263335ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/tests/com/ibm/wala/cast/js/000077500000000000000000000000001342410422700267475ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/tests/com/ibm/wala/cast/js/test/000077500000000000000000000000001342410422700277265ustar00rootroot00000000000000TestSimplePageCallGraphShapeRhinoNu.java000066400000000000000000000017061342410422700374460ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.html.nu_validator/tests/com/ibm/wala/cast/js/test/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.test; import com.ibm.wala.cast.js.html.IHtmlParser; import com.ibm.wala.cast.js.html.nu_validator.NuValidatorHtmlParser; public class TestSimplePageCallGraphShapeRhinoNu extends TestSimplePageCallGraphShapeRhino { public static void main(String[] args) { justThisTest(TestSimplePageCallGraphShapeRhinoNu.class); } @Override protected IHtmlParser getParser() { return new NuValidatorHtmlParser(); } } WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/000077500000000000000000000000001342410422700205745ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/.settings/000077500000000000000000000000001342410422700225125ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/.settings/org.eclipse.jdt.core.prefs000066400000000000000000000750171342410422700275060ustar00rootroot00000000000000eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=error org.eclipse.jdt.core.compiler.problem.comparingIdentical=error org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=error org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=error org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=error org.eclipse.jdt.core.compiler.problem.finalParameterBound=error org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=error org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=error org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=error org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=error org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=error org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=error org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=error org.eclipse.jdt.core.compiler.problem.rawTypeReference=error org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=error org.eclipse.jdt.core.compiler.problem.unusedLocal=error org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error org.eclipse.jdt.core.compiler.problem.unusedParameter=error org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=132 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/.settings/org.eclipse.pde.prefs000066400000000000000000000020161342410422700265330ustar00rootroot00000000000000compilers.f.unresolved-features=0 compilers.f.unresolved-plugins=0 compilers.incompatible-environment=0 compilers.p.build=0 compilers.p.build.bin.includes=0 compilers.p.build.encodings=0 compilers.p.build.java.compiler=0 compilers.p.build.java.compliance=0 compilers.p.build.missing.output=0 compilers.p.build.output.library=0 compilers.p.build.source.library=0 compilers.p.build.src.includes=0 compilers.p.deprecated=0 compilers.p.discouraged-class=0 compilers.p.internal=0 compilers.p.missing-packages=0 compilers.p.missing-version-export-package=2 compilers.p.missing-version-import-package=0 compilers.p.missing-version-require-bundle=2 compilers.p.no-required-att=0 compilers.p.not-externalized-att=0 compilers.p.unknown-attribute=0 compilers.p.unknown-class=0 compilers.p.unknown-element=0 compilers.p.unknown-identifier=0 compilers.p.unknown-resource=0 compilers.p.unresolved-ex-points=0 compilers.p.unresolved-import=0 compilers.s.create-docs=false compilers.s.doc-folder=doc compilers.s.open-tags=0 eclipse.preferences.version=1 WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/META-INF/000077500000000000000000000000001342410422700217345ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/META-INF/MANIFEST.MF000066400000000000000000000017361342410422700233750ustar00rootroot00000000000000Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.ibm.wala.cast.js.nodejs.test Bundle-Version: 1.5.1 Export-Package: NodejsRequireJsonTest, NodejsRequireTargetSelectorResolve, NodejsRequireTargetSelectorResolve.requireDynamic, NodejsRequireTargetSelectorResolve.requireNodeModules, NodejsRequireTargetSelectorResolve.requireNodeModules.node_modules.lib, NodejsRequireTargetSelectorResolve.requireNodeModules.node_modules.lib.node_modules.sublib, NodejsRequireTargetSelectorResolve.requireNodeModules.node_modules.lib2, NodejsRequireTargetSelectorResolve.requireSimple, NodejsRequireTargetSelectorResolve.requireStaticCircular, com.ibm.wala.cast.js.nodejs.test Require-Bundle: com.ibm.wala.cast.js.nodejs;bundle-version="1.3.10", com.ibm.wala.cast.js;bundle-version="1.3.10", com.ibm.wala.cast.js.rhino;bundle-version="1.3.10", com.ibm.wala.core;bundle-version="1.3.10", org.junit Bundle-RequiredExecutionEnvironment: JavaSE-1.8 WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/OSGI-INF/000077500000000000000000000000001342410422700217475ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/OSGI-INF/l10n/000077500000000000000000000000001342410422700225215ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/OSGI-INF/l10n/bundle.properties000066400000000000000000000001101342410422700261000ustar00rootroot00000000000000#Properties file for com.ibm.wala.cast.js.nodejs.test Bundle-Name = TestWALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/build.gradle000066400000000000000000000005561342410422700230610ustar00rootroot00000000000000sourceSets.test { java.srcDirs = ['src'] resources.srcDirs = ['testdata'] } dependencies { testCompile( 'junit:junit:4.12', project(':com.ibm.wala.cast.js.nodejs'), project(':com.ibm.wala.core'), ) } test { maxHeapSize = '800M' // fails with java.lang.OutOfMemoryError for unknown reasons exclude '**/NodejsRequireTargetSelectorResolveTest.class' } WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/build.properties000066400000000000000000000003131342410422700240060ustar00rootroot00000000000000source.. = src/,\ testdata/ bin.includes = META-INF/,\ .,\ OSGI-INF/l10n/bundle.properties,\ OSGI-INF/ javacProjectSettings = true output.. = bin/ WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/pom.xml000066400000000000000000000027741342410422700221230ustar00rootroot00000000000000 4.0.0 com.ibm.wala WALA 1.5.1 com.ibm.wala.cast.js.nodejs.test eclipse-plugin org.apache.maven.plugins maven-surefire-plugin test test ${project.build.outputDirectory} -Xmx800M -ea true test junit junit 4.12 test org.json json 20160212 WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/src/000077500000000000000000000000001342410422700213635ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/src/com/000077500000000000000000000000001342410422700221415ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/src/com/ibm/000077500000000000000000000000001342410422700227105ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/src/com/ibm/wala/000077500000000000000000000000001342410422700236345ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/src/com/ibm/wala/cast/000077500000000000000000000000001342410422700245665ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/src/com/ibm/wala/cast/js/000077500000000000000000000000001342410422700252025ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/src/com/ibm/wala/cast/js/nodejs/000077500000000000000000000000001342410422700264645ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/src/com/ibm/wala/cast/js/nodejs/test/000077500000000000000000000000001342410422700274435ustar00rootroot00000000000000NodejsRequireJsonTest.java000066400000000000000000000030211342410422700344740ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/src/com/ibm/wala/cast/js/nodejs/test/****************************************************************************** * Copyright (c) 2002 - 2016 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Brian Pfretzschner - initial implementation *****************************************************************************/ package com.ibm.wala.cast.js.nodejs.test; import static org.junit.Assert.assertTrue; import java.io.File; import java.net.URL; import org.junit.Test; import com.ibm.wala.cast.js.nodejs.NodejsCallGraphBuilderUtil; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder; /** * @author Brian Pfretzschner <brian.pfretzschner@gmail.com> */ public class NodejsRequireJsonTest { @Test public void test() throws Exception { URL fileUrl = getClass().getClassLoader().getResource("NodejsRequireJsonTest/index.js"); File file = new File(fileUrl.toURI()); PropagationCallGraphBuilder builder = NodejsCallGraphBuilderUtil.makeCGBuilder(file); CallGraph CG = builder.makeCallGraph(builder.getOptions()); String cgString = CG.toString(); assertTrue(cgString.contains("Lempty/jsonModule>")); assertTrue(cgString.contains("Lnested/jsonModule>")); assertTrue(cgString.contains("Lpackage/jsonModule>")); assertTrue(!cgString.contains("?")); } } NodejsRequireTargetSelectorResolveTest.java000066400000000000000000000076641342410422700400730ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/src/com/ibm/wala/cast/js/nodejs/test/****************************************************************************** * Copyright (c) 2002 - 2016 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Brian Pfretzschner - initial implementation *****************************************************************************/ package com.ibm.wala.cast.js.nodejs.test; import static org.junit.Assert.assertTrue; import java.io.File; import java.net.URL; import org.junit.Test; import com.ibm.wala.cast.js.nodejs.NodejsCallGraphBuilderUtil; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder; /** * @author Brian Pfretzschner <brian.pfretzschner@gmail.com> */ public class NodejsRequireTargetSelectorResolveTest { @Test public void testRequireSimple() throws Exception { URL fileUrl = getClass().getClassLoader().getResource("NodejsRequireTargetSelectorResolve/requireSimple/index.js"); File file = new File(fileUrl.toURI()); PropagationCallGraphBuilder builder = NodejsCallGraphBuilderUtil.makeCGBuilder(file); CallGraph CG = builder.makeCallGraph(builder.getOptions()); String cgString = CG.toString(); assertTrue(cgString.contains("Lmod/nodejsModule/moduleSource/exec>")); assertTrue(cgString.contains("Lmod/nodejsModule/moduleSource/SomeClass/hello>")); assertTrue(!cgString.contains("?")); } @Test public void testRequireStaticCircular() throws Exception { URL fileUrl = getClass().getClassLoader().getResource("NodejsRequireTargetSelectorResolve/requireStaticCircular/index.js"); File file = new File(fileUrl.toURI()); PropagationCallGraphBuilder builder = NodejsCallGraphBuilderUtil.makeCGBuilder(file); CallGraph CG = builder.makeCallGraph(builder.getOptions()); String cgString = CG.toString(); assertTrue(cgString.contains("Llib1/nodejsModule/moduleSource/lib1>")); assertTrue(cgString.contains("Llib2/nodejsModule/moduleSource/lib2>")); assertTrue(!cgString.contains("?")); } @Test public void testRequireDynamic() throws Exception { URL fileUrl = getClass().getClassLoader().getResource("NodejsRequireTargetSelectorResolve/requireDynamic/index.js"); File file = new File(fileUrl.toURI()); PropagationCallGraphBuilder builder = NodejsCallGraphBuilderUtil.makeCGBuilder(file); CallGraph CG = builder.makeCallGraph(builder.getOptions()); String cgString = CG.toString(); assertTrue(cgString.contains("Llib1/nodejsModule/moduleSource/lib1>")); assertTrue(cgString.contains("Llib2/nodejsModule/moduleSource/lib2>")); assertTrue(!cgString.contains("?")); } @Test public void testRequireNodeModules() throws Exception { URL fileUrl = getClass().getClassLoader().getResource("NodejsRequireTargetSelectorResolve/requireNodeModules/index.js"); File file = new File(fileUrl.toURI()); PropagationCallGraphBuilder builder = NodejsCallGraphBuilderUtil.makeCGBuilder(file); CallGraph CG = builder.makeCallGraph(builder.getOptions()); String cgString = CG.toString(); assertTrue(cgString.contains("Lnode_modules_lib_node_modules_sublib_sublib/nodejsModule/moduleSource")); assertTrue(!cgString.contains("?")); } @Test public void testRequireCoreModules() throws Exception { URL fileUrl = getClass().getClassLoader().getResource("NodejsRequireTargetSelectorResolve/requireCoreModules.js"); File file = new File(fileUrl.toURI()); PropagationCallGraphBuilder builder = NodejsCallGraphBuilderUtil.makeCGBuilder(file); CallGraph CG = builder.makeCallGraph(builder.getOptions()); String cgString = CG.toString(); assertTrue(cgString.contains("Lutil/nodejsModule/moduleSource/util")); assertTrue(cgString.contains("Lhttps/nodejsModule/moduleSource/https")); assertTrue(cgString.contains("Lhttp/nodejsModule/moduleSource/http")); } } WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/000077500000000000000000000000001342410422700224055ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireJsonTest/000077500000000000000000000000001342410422700266565ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireJsonTest/empty.json000066400000000000000000000000021342410422700306770ustar00rootroot00000000000000{}WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireJsonTest/index.js000066400000000000000000000001611342410422700303210ustar00rootroot00000000000000var empty = require('./empty.json'); var empty = require('./nested.json'); var empty = require('./package.json');WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireJsonTest/nested.json000066400000000000000000000000531342410422700310310ustar00rootroot00000000000000{ num: 7, obj: { val1: "hello", num: 77 } }WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireJsonTest/package.json000066400000000000000000000004401342410422700311420ustar00rootroot00000000000000{ "name": "test2", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "poc-lettersonly-gm": "^1.0.1", "validator": "^5.5.0" } } WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/000077500000000000000000000000001342410422700313745ustar00rootroot00000000000000requireCoreModules.js000066400000000000000000000000701342410422700354660ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolvevar util = require('util'); var util = require('https');requireDynamic/000077500000000000000000000000001342410422700342765ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolveindex.js000066400000000000000000000002351342410422700357430ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireDynamicvar lib1 = myRequire('lib1', true); lib1(); function myRequire(name, local) { var prefix = ''; if (local) prefix = './'; return require(prefix+name); }lib1.js000066400000000000000000000001151342410422700354600ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireDynamicvar lib2 = require('./lib2'); module.exports = function lib1() { lib2(); };lib2.js000066400000000000000000000001151342410422700354610ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireDynamicvar lib1 = require('./lib1'); module.exports = function lib2() { lib1(); };requireNodeModules/000077500000000000000000000000001342410422700351305ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolveindex.js000066400000000000000000000000171342410422700365730ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModulesrequire('lib');node_modules/000077500000000000000000000000001342410422700376055ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModuleslib/000077500000000000000000000000001342410422700403535ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModules/node_moduleshelper.js000066400000000000000000000000001342410422700421560ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModules/node_modules/libindex.js000066400000000000000000000000471342410422700420210ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModules/node_modules/librequire('./helper'); require('sublib');node_modules/000077500000000000000000000000001342410422700430305ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModules/node_modules/libsublib/000077500000000000000000000000001342410422700443105ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModules/node_modules/lib/node_modulespackage.json000066400000000000000000000000321342410422700465710ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModules/node_modules/lib/node_modules/sublib{ "main": "sublib.js" } sublib.js000066400000000000000000000000201342410422700461160ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModules/node_modules/lib/node_modules/sublibrequire('lib2');lib2/000077500000000000000000000000001342410422700404355ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModules/node_modulesindex.js000066400000000000000000000000461342410422700421020ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireNodeModules/node_modules/lib2module.exports = function lib2() { }; requireSimple/000077500000000000000000000000001342410422700341435ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolveindex.js000066400000000000000000000000471342410422700356110ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireSimplevar mod = require('./mod'); mod.exec();mod.js000066400000000000000000000002051342410422700352550ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireSimplefunction SomeClass() { this.hello = function hello() {} } exports.exec = function exec() { var c = new SomeClass(); c.hello(); };requireStaticCircular/000077500000000000000000000000001342410422700356265ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolveindex.js000066400000000000000000000000451342410422700372720ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireStaticCircularvar lib1 = require('./lib1'); lib1();lib1.js000066400000000000000000000001151342410422700370100ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireStaticCircularvar lib2 = require('./lib2'); module.exports = function lib1() { lib2(); };lib2.js000066400000000000000000000001151342410422700370110ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs.test/testdata/NodejsRequireTargetSelectorResolve/requireStaticCircularvar lib1 = require('./lib1'); module.exports = function lib2() { lib1(); };WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/000077500000000000000000000000001342410422700176165ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/.settings/000077500000000000000000000000001342410422700215345ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/.settings/org.eclipse.jdt.core.prefs000066400000000000000000000751651342410422700265340ustar00rootroot00000000000000eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=error org.eclipse.jdt.core.compiler.problem.comparingIdentical=error org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=error org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=error org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=error org.eclipse.jdt.core.compiler.problem.finalParameterBound=error org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=error org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=error org.eclipse.jdt.core.compiler.problem.rawTypeReference=error org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=error org.eclipse.jdt.core.compiler.problem.unusedLocal=error org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error org.eclipse.jdt.core.compiler.problem.unusedParameter=error org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=132 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/.settings/org.eclipse.pde.prefs000066400000000000000000000020161342410422700255550ustar00rootroot00000000000000compilers.f.unresolved-features=0 compilers.f.unresolved-plugins=0 compilers.incompatible-environment=0 compilers.p.build=0 compilers.p.build.bin.includes=0 compilers.p.build.encodings=0 compilers.p.build.java.compiler=0 compilers.p.build.java.compliance=0 compilers.p.build.missing.output=0 compilers.p.build.output.library=0 compilers.p.build.source.library=0 compilers.p.build.src.includes=0 compilers.p.deprecated=0 compilers.p.discouraged-class=0 compilers.p.internal=0 compilers.p.missing-packages=0 compilers.p.missing-version-export-package=2 compilers.p.missing-version-import-package=0 compilers.p.missing-version-require-bundle=0 compilers.p.no-required-att=0 compilers.p.not-externalized-att=0 compilers.p.unknown-attribute=0 compilers.p.unknown-class=0 compilers.p.unknown-element=0 compilers.p.unknown-identifier=0 compilers.p.unknown-resource=0 compilers.p.unresolved-ex-points=0 compilers.p.unresolved-import=0 compilers.s.create-docs=false compilers.s.doc-folder=doc compilers.s.open-tags=0 eclipse.preferences.version=1 WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/META-INF/000077500000000000000000000000001342410422700207565ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/META-INF/MANIFEST.MF000066400000000000000000000006261342410422700224140ustar00rootroot00000000000000Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.ibm.wala.cast.js.nodejs Bundle-Version: 1.5.1 Export-Package: com.ibm.wala.cast.js.nodejs, org.json Require-Bundle: com.ibm.wala.cast.js;bundle-version="1.3.10", com.ibm.wala.cast.js.rhino;bundle-version="1.3.10" Bundle-ClassPath: lib/json-20160212.jar, . Bundle-RequiredExecutionEnvironment: JavaSE-1.8 WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/OSGI-INF/000077500000000000000000000000001342410422700207715ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/OSGI-INF/l10n/000077500000000000000000000000001342410422700215435ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/OSGI-INF/l10n/bundle.properties000066400000000000000000000001051342410422700251260ustar00rootroot00000000000000#Properties file for com.ibm.wala.cast.js.nodejs Bundle-Name = NodejsWALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/build.gradle000066400000000000000000000020101342410422700220660ustar00rootroot00000000000000dependencies { compile( 'commons-io:commons-io:2.4', 'org.json:json:20160212', project(':com.ibm.wala.cast'), project(':com.ibm.wala.cast.js'), project(':com.ibm.wala.cast.js.rhino'), project(':com.ibm.wala.core'), project(':com.ibm.wala.util'), ) } task downloadNodeJS(type: VerifiedDownload) { src 'https://api.github.com/repos/nodejs/node/zipball/0a604e92e258c5ee2752d763e50721e35053f135' dest "$temporaryDir/nodejs.zip" checksum '33c5ba7a5d45644e70d268d8ad3e57df' } task unpackNodeJSLib(type: Copy, dependsOn: downloadNodeJS) { from(zipTree(downloadNodeJS.dest)) { include 'nodejs-node-0a604e9/lib/*.js' eachFile { relativePath new RelativePath(!directory, relativePath.lastName) } } into 'dat/core-modules' includeEmptyDirs false } task cleanUnpackNodeJSLib(type: Delete) { delete fileTree(dir: 'dat/core-modules', include: '*.js') } processResources.dependsOn unpackNodeJSLib clean.dependsOn cleanUnpackNodeJSLib sourceSets.main { java.srcDirs = ['src'] resources.srcDirs = ['dat'] } WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/build.properties000066400000000000000000000006441342410422700230370ustar00rootroot00000000000000bin.includes = META-INF/,\ .,\ lib/json-20160212.jar,\ OSGI-INF/l10n/bundle.properties,\ OSGI-INF/,\ dat/ output.. = bin/ source.. = dat/,\ src/ javacProjectSettings = true bin.excludes = dat/core-modules/.eslintrc,\ dat/core-modules/.gitignore,\ dat/core-modules/.gitkeep javacDefaultEncoding.. = UTF-8 WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/build.xml000066400000000000000000000023421342410422700214400ustar00rootroot00000000000000 WALA Nodejs Front-end WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/dat/000077500000000000000000000000001342410422700203665ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/dat/core-modules/000077500000000000000000000000001342410422700227645ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/dat/core-modules/.eslintrc000066400000000000000000000001321342410422700246040ustar00rootroot00000000000000rules: # Custom rules in tools/eslint-rules require-buffer: 2 buffer-constructor: 2 WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/dat/core-modules/.gitignore000066400000000000000000000000041342410422700247460ustar00rootroot00000000000000*.jsWALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/dat/core-modules/.gitkeep000066400000000000000000000000001342410422700244030ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/dat/extended-prologue.js000066400000000000000000000002621342410422700243560ustar00rootroot00000000000000var timerId = 0; function setTimeout(cb, t) { cb(); return timerId++; } function setInterval(cb, t) { return setTimeout(function () { cb(); setInterval(cb, t); }, t); }WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/dat/json-wrapper.js000066400000000000000000000001051342410422700233470ustar00rootroot00000000000000(function jsonModule() { return /*/ WALA-INSERT-CODE-HERE /*/; })();WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/dat/module-wrapper.js000066400000000000000000000005531342410422700236720ustar00rootroot00000000000000(function nodejsModule() { var module = { require: function __WALA__require(id) {}, exports: {} }; (function moduleSource(exports, require, module, __filename, __dirname) { /*/ WALA-INSERT-CODE-HERE /*/ })(module.exports, module.require, module, '/*/ WALA-INSERT-FILENAME-HERE /*/', '/*/ WALA-INSERT-DIRNAME-HERE /*/'); return module.exports; })();WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/pom.xml000066400000000000000000000037441342410422700211430ustar00rootroot00000000000000 4.0.0 com.ibm.wala WALA 1.5.1 eclipse-plugin com.ibm.wala.cast.js.nodejs maven-antrun-plugin 1.7 process-resources run maven-dependency-plugin copy org.mozilla rhino 1.7.6 jar false org.json json 20160212 ${basedir}/lib WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/000077500000000000000000000000001342410422700204055ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/com/000077500000000000000000000000001342410422700211635ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/com/ibm/000077500000000000000000000000001342410422700217325ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/com/ibm/wala/000077500000000000000000000000001342410422700226565ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/com/ibm/wala/cast/000077500000000000000000000000001342410422700236105ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/com/ibm/wala/cast/js/000077500000000000000000000000001342410422700242245ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/com/ibm/wala/cast/js/nodejs/000077500000000000000000000000001342410422700255065ustar00rootroot00000000000000NodejsCallGraphBuilderUtil.java000066400000000000000000000122201342410422700334340ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/com/ibm/wala/cast/js/nodejs/****************************************************************************** * Copyright (c) 2002 - 2016 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Brian Pfretzschner - initial implementation *****************************************************************************/ package com.ibm.wala.cast.js.nodejs; import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.Collections; import com.ibm.wala.cast.ipa.callgraph.CAstAnalysisScope; import com.ibm.wala.cast.ipa.callgraph.CAstCallGraphUtil; import com.ibm.wala.cast.ipa.callgraph.StandardFunctionTargetSelector; import com.ibm.wala.cast.ir.ssa.AstIRFactory; import com.ibm.wala.cast.js.ipa.callgraph.JSAnalysisOptions; import com.ibm.wala.cast.js.ipa.callgraph.JSCFABuilder; import com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil; import com.ibm.wala.cast.js.ipa.callgraph.JSZeroOrOneXCFABuilder; import com.ibm.wala.cast.js.ipa.callgraph.JavaScriptEntryPoints; import com.ibm.wala.cast.js.ipa.callgraph.PropertyNameContextSelector; import com.ibm.wala.cast.js.loader.JavaScriptLoader; import com.ibm.wala.cast.js.loader.JavaScriptLoaderFactory; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.cast.js.translator.JavaScriptTranslatorFactory; import com.ibm.wala.classLoader.IMethod; import com.ibm.wala.classLoader.Language; import com.ibm.wala.classLoader.Module; import com.ibm.wala.classLoader.SourceFileModule; import com.ibm.wala.ipa.callgraph.AnalysisCacheImpl; import com.ibm.wala.ipa.callgraph.ContextSelector; import com.ibm.wala.ipa.callgraph.Entrypoint; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.MethodTargetSelector; import com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder; import com.ibm.wala.ipa.callgraph.propagation.cfa.ZeroXInstanceKeys; import com.ibm.wala.ipa.cha.ClassHierarchyFactory; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.ssa.IRFactory; import com.ibm.wala.util.WalaException; /** * @author Brian Pfretzschner <brian.pfretzschner@gmail.com> */ public class NodejsCallGraphBuilderUtil extends JSCallGraphUtil { public static PropagationCallGraphBuilder makeCGBuilder(File mainFile) throws IOException, IllegalArgumentException, WalaException { return makeCGBuilder(mainFile.getParentFile(), mainFile); } public static PropagationCallGraphBuilder makeCGBuilder(File workingDir, File mainFile) throws IOException, IllegalArgumentException, WalaException { JavaScriptTranslatorFactory translatorFactory = new CAstRhinoTranslatorFactory(); JSCallGraphUtil.setTranslatorFactory(translatorFactory); Language language = JavaScriptLoader.JS; Collection languages = Collections.singleton(language); IRFactory irFactory = new AstIRFactory.AstDefaultIRFactory<>(); IAnalysisCacheView cache = new AnalysisCacheImpl(irFactory); JavaScriptLoaderFactory loaders = new JavaScriptLoaderFactory(translatorFactory, null); SourceFileModule mainSourceModule = CAstCallGraphUtil.makeSourceModule(mainFile.toURI().toURL(), mainFile.getName()); String mainFileClassName = NodejsRequiredSourceModule.convertFileToClassName(workingDir, mainFile); Module[] files = new Module[] { JSCallGraphUtil.getPrologueFile("prologue.js"), JSCallGraphUtil.getPrologueFile("extended-prologue.js"), new NodejsRequiredSourceModule(mainFileClassName, mainFile, mainSourceModule) }; CAstAnalysisScope scope = new CAstAnalysisScope(files, loaders, languages); IClassHierarchy cha = ClassHierarchyFactory.make(scope, loaders, language, null); com.ibm.wala.cast.util.Util.checkForFrontEndErrors(cha); // Make Script Roots Iterable roots = new JavaScriptEntryPoints(cha, loaders.getTheLoader()); // Make Options JSAnalysisOptions options = new JSAnalysisOptions(scope, roots); options.setUseConstantSpecificKeys(true); options.setUseStacksForLexicalScoping(true); options.setHandleCallApply(true); // Important to be able to identify what file are required options.setTraceStringConstants(true); com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha); MethodTargetSelector baseSelector = new StandardFunctionTargetSelector(cha, options.getMethodTargetSelector()); NodejsRequireTargetSelector requireTargetSelector = new NodejsRequireTargetSelector(workingDir, baseSelector); options.setSelector(requireTargetSelector); JSCFABuilder builder = new JSZeroOrOneXCFABuilder(cha, options, cache, null, null, ZeroXInstanceKeys.ALLOCATIONS, true); // A little hacky, but the instance of RequireTargetSelector is required to build the CallGraphBuilder // and the RequireTargetSelector also needs the CallGraphBuilder instance. requireTargetSelector.setCallGraphBuilder(builder); ContextSelector contextSelector = new PropertyNameContextSelector(cache, 2, builder.getContextSelector()); builder.setContextSelector(contextSelector); return builder; } } NodejsRequireTargetSelector.java000066400000000000000000000260161342410422700337260ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/com/ibm/wala/cast/js/nodejs/****************************************************************************** * Copyright (c) 2002 - 2016 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Brian Pfretzschner - initial implementation *****************************************************************************/ package com.ibm.wala.cast.js.nodejs; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import org.apache.commons.io.FileUtils; import org.json.JSONObject; import com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil; import com.ibm.wala.cast.js.loader.JavaScriptLoader; import com.ibm.wala.cast.js.ssa.JavaScriptInvoke; import com.ibm.wala.cast.js.types.JavaScriptTypes; import com.ibm.wala.cast.types.AstMethodReference; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.IMethod; import com.ibm.wala.classLoader.SourceFileModule; import com.ibm.wala.classLoader.SourceModule; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.MethodTargetSelector; import com.ibm.wala.ipa.callgraph.propagation.ConcreteTypeKey; import com.ibm.wala.ipa.callgraph.propagation.ConstantKey; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis; import com.ibm.wala.ipa.callgraph.propagation.PointerKey; import com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder; import com.ibm.wala.ssa.IR; import com.ibm.wala.ssa.SSAAbstractInvokeInstruction; import com.ibm.wala.types.TypeReference; import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.collections.HashSetFactory; import com.ibm.wala.util.intset.OrdinalSet; import com.ibm.wala.util.ssa.ClassLookupException; /** * This class is used by WALA internals to resolve to what functions a call * could potentially invoke. * * @author Brian Pfretzschner <brian.pfretzschner@gmail.com> */ public class NodejsRequireTargetSelector implements MethodTargetSelector { private File rootDir; private MethodTargetSelector base; private PropagationCallGraphBuilder builder; private HashMap previouslyRequired = HashMapFactory.make(); public NodejsRequireTargetSelector(File rootDir, MethodTargetSelector base) { this.rootDir = rootDir; this.base = base; } public void setCallGraphBuilder(PropagationCallGraphBuilder builder) { this.builder = builder; } /** * Basic idea: If the called method is named "__WALA__require", it is most likely * the require-function mock from the module-wrapper. To figure out what file * shall be required, pointer analysis is used to identify strings that can * flow into the require call. That file is than loaded, wrapped into the * module wrapper and returned as method that will be invoked. Therefore, * there will never be an call graph edge to the require function call, * the require function is replaced by the file that is included through * the require call. * * {@inheritDoc} */ @Override public IMethod getCalleeTarget(CGNode caller, CallSiteReference site, IClass receiver) { PointerAnalysis pointerAnalysis = builder.getPointerAnalysis(); JavaScriptLoader jsLoader = (JavaScriptLoader) builder.getClassHierarchy().getLoader(JavaScriptTypes.jsLoader); IMethod calledMethod = base.getCalleeTarget(caller, site, receiver); if (calledMethod != null && calledMethod.getDeclaringClass().toString().endsWith("/__WALA__require")) { JavaScriptInvoke callInstr = getInvokeInstruction(caller, site); Set targets = getRequireTargets(pointerAnalysis, caller, callInstr); if (targets.size() == 0) { // There is no possible call target throw new RuntimeException("No require target found in method: "+caller.getMethod()); } for (String target : targets) { try { File workingDir = new File(receiver.getSourceFileName()).getParentFile(); SourceModule sourceModule = resolve(rootDir, workingDir, target); if (previouslyRequired.containsKey(sourceModule.getClassName())) { return previouslyRequired.get(sourceModule.getClassName()); } String className = 'L' + sourceModule.getClassName() + "/nodejsModule"; if (sourceModule instanceof NodejsRequiredSourceModule && ((NodejsRequiredSourceModule) sourceModule).getFile().toString().endsWith(".json")) { className = 'L' + sourceModule.getClassName() + "/jsonModule"; } JSCallGraphUtil.loadAdditionalFile(builder.getClassHierarchy(), jsLoader, sourceModule); IClass script = builder.getClassHierarchy() .lookupClass(TypeReference.findOrCreate(jsLoader.getReference(), className)); IMethod method = script.getMethod(AstMethodReference.fnSelector); previouslyRequired.put(sourceModule.getClassName(), method); return method; } catch (IOException e) { e.printStackTrace(); } } } return calledMethod; } private static JavaScriptInvoke getInvokeInstruction(CGNode caller, CallSiteReference site) { IR callerIR = caller.getIR(); SSAAbstractInvokeInstruction callInstrs[] = callerIR.getCalls(site); assert callInstrs.length == 1; return (JavaScriptInvoke) callInstrs[0]; } private Set getRequireTargets(PointerAnalysis pointerAnalysis, CGNode caller, JavaScriptInvoke callInstr) { HashSet set = HashSetFactory.make(); PointerKey pk = builder.getPointerKeyForLocal(caller, callInstr.getUse(2)); OrdinalSet instanceKeys = pointerAnalysis.getPointsToSet(pk); for (InstanceKey instanceKey : instanceKeys) { if (instanceKey instanceof ConstantKey) { Object value = ((ConstantKey) instanceKey).getValue(); if (value instanceof String) { set.add((String) value); } else { System.err.println("NodejsRequireTargetSelector: Unexpected value: " + value); return HashSetFactory.make(); } } else if (instanceKey instanceof ConcreteTypeKey) { // Cannot do anything with this information... } else { System.err.println("NodejsRequireTargetSelector: Unexpected instanceKey: " + instanceKey.getClass() + " -- " + instanceKey); return HashSetFactory.make(); } } return set; } /** * Implements the Nodejs require.resolve algorithm, * see https://nodejs.org/api/modules.html#modules_all_together * * require(X) from module at path Y * 1. If X is a core module, * a. return the core module * b. STOP * 2. If X begins with './' or '/' or '../' * a. LOAD_AS_FILE(Y + X) * b. LOAD_AS_DIRECTORY(Y + X) * 3. LOAD_NODE_MODULES(X, dirname(Y)) * 4. THROW "not found" * * @param dir Y in the pseudo algorithm * @param target X in the pseudo algorithm */ public static SourceFileModule resolve(File rootDir, File dir, String target) throws IOException { if (NodejsRequiredCoreModule.isCoreModule(target)) return NodejsRequiredCoreModule.make(target); if (target.startsWith("./") || target.startsWith("/") || target.startsWith("../")) { SourceFileModule module = loadAsFile(rootDir, new File(dir, target)); if (module != null) return module; module = loadAsDirectory(rootDir, new File(dir, target)); if (module != null) return module; } SourceFileModule module = loadNodeModules(rootDir, dir, target); if (module != null) return module; throw new ClassLookupException("Required module not found: "+target+" in "+dir); } /** * LOAD_AS_FILE(X) * 1. If X is a file, load X as JavaScript text. STOP * 2. If X.js is a file, load X.js as JavaScript text. STOP * 3. If X.json is a file, parse X.json to a JavaScript Object. STOP * 4. If X.node is a file, load X.node as binary addon. STOP */ private static SourceFileModule loadAsFile(File rootDir, File f) throws IOException { // 1. if (f.isFile()) return NodejsRequiredSourceModule.make(rootDir, f); // 2. File jsFile = new File(f+".js"); if (jsFile.isFile()) return NodejsRequiredSourceModule.make(rootDir, jsFile); // 3. File jsonFile = new File(f+".json"); if (jsonFile.isFile()) return NodejsRequiredSourceModule.make(rootDir, jsonFile); // Skip 4. step return null; } /** * LOAD_AS_DIRECTORY(X) * 1. If X/package.json is a file, * a. Parse X/package.json, and look for "main" field. * b. let M = X + (json main field) * c. LOAD_AS_FILE(M) * 2. If X/index.js is a file, load X/index.js as JavaScript text. STOP * 3. If X/index.json is a file, parse X/index.json to a JavaScript object. STOP * 4. If X/index.node is a file, load X/index.node as binary addon. STOP */ private static SourceFileModule loadAsDirectory(File rootDir, File d) throws IOException { // 1. File packageJsonFile = new File(d, "package.json"); if (packageJsonFile.isFile()) { // 1.a. String packageJsonContent = FileUtils.readFileToString(packageJsonFile); JSONObject packageJson = new JSONObject(packageJsonContent); if (packageJson.has("main")) { String mainFileName = packageJson.getString("main"); // 1.b. File mainFile = new File(d, mainFileName); // 1.c. return loadAsFile(rootDir, mainFile); } } // 2. File jsFile = new File(d, "index.js"); if (jsFile.isFile()) return NodejsRequiredSourceModule.make(rootDir, jsFile); // 3. File jsonFile = new File(d, "index.json"); if (jsonFile.isFile()) return NodejsRequiredSourceModule.make(rootDir, jsonFile); // Skip 4. step return null; } /** * LOAD_NODE_MODULES(X, START) * 1. let DIRS=NODE_MODULES_PATHS(START) * 2. for each DIR in DIRS: * a. LOAD_AS_FILE(DIR/X) * b. LOAD_AS_DIRECTORY(DIR/X) */ private static SourceFileModule loadNodeModules(File rootDir, File d, String target) throws IOException { List dirs = nodeModulePaths(rootDir, d); for (File dir : dirs) { SourceFileModule module = loadAsFile(rootDir, new File(dir, target)); if (module != null) return module; module = loadAsDirectory(rootDir, new File(dir, target)); if (module != null) return module; } return null; } /** * NODE_MODULES_PATHS(START) * 1. let PARTS = path split(START) * 2. let I = count of PARTS - 1 * 3. let DIRS = [] * 4. while I >= 0, * a. if PARTS[I] = "node_modules" CONTINUE * b. DIR = path join(PARTS[0 .. I] + "node_modules") * c. DIRS = DIRS + DIR * d. let I = I - 1 * 5. return DIRS */ private static List nodeModulePaths(File rootDir, File d) throws IOException { LinkedList dirs = new LinkedList<>(); while (d.getCanonicalPath().startsWith(rootDir.getCanonicalPath()) && d.toPath().getNameCount() > 0) { // 4.a. if (!d.getName().equals("node_modules")) { // 4.b. and 4.c. dirs.add(new File(d, "node_modules")); } // 4.d. d = d.getParentFile(); } return dirs; } } NodejsRequiredCoreModule.java000066400000000000000000000060611342410422700331770ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/com/ibm/wala/cast/js/nodejs/****************************************************************************** * Copyright (c) 2002 - 2016 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Brian Pfretzschner - initial implementation *****************************************************************************/ package com.ibm.wala.cast.js.nodejs; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.util.Arrays; import java.util.Map; import java.util.Set; import org.apache.commons.io.FilenameUtils; import com.ibm.wala.cast.ipa.callgraph.CAstCallGraphUtil; import com.ibm.wala.classLoader.SourceFileModule; import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.collections.HashSetFactory; import com.ibm.wala.util.io.TemporaryFile; /** * @author Brian Pfretzschner <brian.pfretzschner@gmail.com> */ public class NodejsRequiredCoreModule extends NodejsRequiredSourceModule { /** * Core modules list for Nodejs v6.2.2 * https://github.com/nodejs/node/blob/v6.2.2/lib/internal/module.js */ private static final Set CORE_MODULES = HashSetFactory.make(Arrays.asList( "assert", "buffer", "child_process", "cluster", "crypto", "dgram", "dns", "domain", "events", "fs", "http", "https", "net", "os", "path", "punycode", "querystring", "readline", "repl", "stream", "string_decoder", "tls", "tty", "url", "util", "v8", "vm", "zlib", // Non-public files "timers", "constants", "freelist", "smalloc", "_debugger", "_http_agent", "_http_client", "_http_common", "_http_incoming", "_http_outgoing", "_http_server", "_linklist", "_stream_duplex", "_stream_passthrough", "_stream_readable", "_stream_transform", "_stream_writable", "_tls_common", "_tls_legacy", "_tls_wrap")); protected NodejsRequiredCoreModule(File f, SourceFileModule clonedFrom) throws IOException { super(FilenameUtils.getBaseName(f.getName()), f, clonedFrom); } private static InputStream getModule(String name) { return NodejsRequiredCoreModule.class.getClassLoader().getResourceAsStream("core-modules/" + name + ".js"); } private static final Map names = HashMapFactory.make(); public static NodejsRequiredCoreModule make(String name) throws IOException { if (! names.containsKey(name)) { java.nio.file.Path p = Files.createTempDirectory("nodejs"); File f = new File(p.toFile(), name + ".js"); f.deleteOnExit(); p.toFile().deleteOnExit(); names.put(name, f); } File file = names.get(name); TemporaryFile.streamToFile(file, getModule(name)); SourceFileModule sourceFileModule = CAstCallGraphUtil.makeSourceModule(file.toURI().toURL(), file.getName()); return new NodejsRequiredCoreModule(file, sourceFileModule); } public static boolean isCoreModule(String name) { return CORE_MODULES.contains(name); } } NodejsRequiredSourceModule.java000066400000000000000000000121161342410422700335450ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.nodejs/src/com/ibm/wala/cast/js/nodejs/****************************************************************************** * Copyright (c) 2002 - 2016 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Brian Pfretzschner - initial implementation *****************************************************************************/ package com.ibm.wala.cast.js.nodejs; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URI; import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; import com.ibm.wala.cast.ipa.callgraph.CAstCallGraphUtil; import com.ibm.wala.classLoader.SourceFileModule; import com.ibm.wala.util.debug.Assertions; import com.ibm.wala.util.io.Streams; /** * This class is intended to be used whenever a JavaScript module is dynamically * required by JavaScript (CommonJS). The required file will be loaded and * wrapped in a function call to simulate the real behavior of a CommonJS * environment. The resulting function will be named GLOBAL_PREFIX + relative * file-name. To retrieve the final function name, use getFunctioName(). * * @author Brian Pfretzschner <brian.pfretzschner@gmail.com> */ public class NodejsRequiredSourceModule extends SourceFileModule { private final static String MODULE_WRAPPER_FILENAME = "module-wrapper.js"; private final static String JSON_WRAPPER_FILENAME = "json-wrapper.js"; private final static String FILENAME_PLACEHOLDER = "/*/ WALA-INSERT-FILENAME-HERE /*/"; private final static String DIRNAME_PLACEHOLDER = "/*/ WALA-INSERT-DIRNAME-HERE /*/"; private final static String CODE_PLACEHOLDER = "/*/ WALA-INSERT-CODE-HERE /*/"; private static String MODULE_WRAPPER_SOURCE = null; private static String JSON_WRAPPER_SOURCE = null; private final String className; /** * @param f * Must be a file located below folder workingDir. */ protected NodejsRequiredSourceModule(String className, File f, SourceFileModule clonedFrom) throws IOException { super(f, clonedFrom); // Generate className based on the given file name this.className = className; assert className.matches("[a-zA-Z_$][0-9a-zA-Z_$]*") : "Invalid className: " + className; if (MODULE_WRAPPER_SOURCE == null || JSON_WRAPPER_SOURCE == null) { // Populate the cache that hold the module wrapper source code loadWrapperSources(); } } @Override public InputStream getInputStream() { String moduleSource = null; try (final InputStream inputStream = super.getInputStream()) { moduleSource = IOUtils.toString(inputStream); } catch (IOException e) { Assertions.UNREACHABLE(e.getMessage()); } String wrapperSource = null; String ext = FilenameUtils.getExtension(getFile().toString()).toLowerCase(); if (ext.equals("js")) { // JS file -> use module wrapper wrapperSource = MODULE_WRAPPER_SOURCE; } else if (ext.equals("json")) { // JSON file -> use JSON wrapper wrapperSource = JSON_WRAPPER_SOURCE; } else { // No clue -> try module wrapper System.err.println("NodejsRequiredSourceModule: Unsupported file type ("+ext+"), continue anyway."); wrapperSource = MODULE_WRAPPER_SOURCE; } String wrappedModuleSource = wrapperSource .replace(FILENAME_PLACEHOLDER, getFile().getName()) .replace(DIRNAME_PLACEHOLDER, getFile().getParent()) .replace(CODE_PLACEHOLDER, moduleSource); return IOUtils.toInputStream(wrappedModuleSource); } @Override public String getClassName() { return className; } @Override public String getName() { return className; } private static void loadWrapperSources() throws IOException { MODULE_WRAPPER_SOURCE = loadWrapperSource(MODULE_WRAPPER_FILENAME); JSON_WRAPPER_SOURCE = loadWrapperSource(JSON_WRAPPER_FILENAME); } private static String loadWrapperSource(String filename) throws IOException { try (final InputStream url = NodejsRequiredSourceModule.class.getClassLoader().getResourceAsStream(filename)) { return new String(Streams.inputStream2ByteArray(url)); } } /** * Generate a className based on the file name and path of the module file. * The path should be encoded in the className since the file name is not unique. */ public static String convertFileToClassName(File rootDir, File file) { URI normalizedWorkingDirURI = rootDir.getAbsoluteFile().toURI().normalize(); URI normalizedFileURI = file.getAbsoluteFile().toURI().normalize(); String relativePath = normalizedWorkingDirURI.relativize(normalizedFileURI).getPath(); return FilenameUtils.removeExtension(relativePath) .replace("/", "_") .replace("-", "__") .replace(".", "__"); } public static NodejsRequiredSourceModule make(File rootDir, File file) throws IOException { String className = convertFileToClassName(rootDir, file); SourceFileModule sourceFileModule = CAstCallGraphUtil.makeSourceModule(file.toURI().toURL(), file.getName()); return new NodejsRequiredSourceModule(className, file, sourceFileModule); } } WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/000077500000000000000000000000001342410422700204315ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/.gitignore000066400000000000000000000000071342410422700224160ustar00rootroot00000000000000*.html WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/.settings/000077500000000000000000000000001342410422700223475ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/.settings/org.eclipse.jdt.core.prefs000066400000000000000000000751521342410422700273430ustar00rootroot00000000000000eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=error org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=error org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=error org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=error org.eclipse.jdt.core.compiler.problem.finalParameterBound=error org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=error org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=error org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=error org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=error org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=error org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=error org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=error org.eclipse.jdt.core.compiler.problem.rawTypeReference=error org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=error org.eclipse.jdt.core.compiler.problem.unusedLocal=warning org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error org.eclipse.jdt.core.compiler.problem.unusedParameter=error org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=132 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/.settings/org.eclipse.pde.prefs000066400000000000000000000020161342410422700263700ustar00rootroot00000000000000compilers.f.unresolved-features=0 compilers.f.unresolved-plugins=0 compilers.incompatible-environment=0 compilers.p.build=0 compilers.p.build.bin.includes=0 compilers.p.build.encodings=0 compilers.p.build.java.compiler=0 compilers.p.build.java.compliance=0 compilers.p.build.missing.output=0 compilers.p.build.output.library=0 compilers.p.build.source.library=0 compilers.p.build.src.includes=0 compilers.p.deprecated=0 compilers.p.discouraged-class=0 compilers.p.internal=0 compilers.p.missing-packages=0 compilers.p.missing-version-export-package=2 compilers.p.missing-version-import-package=0 compilers.p.missing-version-require-bundle=0 compilers.p.no-required-att=0 compilers.p.not-externalized-att=0 compilers.p.unknown-attribute=0 compilers.p.unknown-class=0 compilers.p.unknown-element=0 compilers.p.unknown-identifier=0 compilers.p.unknown-resource=0 compilers.p.unresolved-ex-points=0 compilers.p.unresolved-import=0 compilers.s.create-docs=false compilers.s.doc-folder=doc compilers.s.open-tags=0 eclipse.preferences.version=1 WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/.settings/org.eclipse.wst.validation.prefs000066400000000000000000000021651342410422700305730ustar00rootroot00000000000000DELEGATES_PREFERENCE=delegateValidatorList USER_BUILD_PREFERENCE=enabledBuildValidatorList USER_MANUAL_PREFERENCE=enabledManualValidatorList USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600 eclipse.preferences.version=1 override=true suspend=false vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03 vals/org.eclipse.wst.xml.core.xml/groups=0107include05111contentType128org.eclipse.core.runtime.xmlT111contentType134org.eclipse.wst.xml.core.xmlsourceT111contentType134org.eclipse.wst.xml.core.xslsourceT111contentType134org.eclipse.jst.jsp.core.tldsourceT07fileext03xmlF0107exclude08113projectNature134org.eclipse.jst.j2ee.ejb.EJBNature113projectNature130org.eclipse.jst.j2ee.EARNature04file08.projectT0104file110.classpathT0104file110.settings/T02111contentType133org.eclipse.jdt.junit.JUnitResultF04file122target/p2artifacts.xmlT0304file120target/p2content.xmlT03 vf.version=3 WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/META-INF/000077500000000000000000000000001342410422700215715ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/META-INF/MANIFEST.MF000066400000000000000000000016501342410422700232250ustar00rootroot00000000000000Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.ibm.wala.cast.js.rhino.test Bundle-Version: 1.5.1 Bundle-Vendor: %Bundle-Vendor Require-Bundle: com.ibm.wala.cast.js.rhino;bundle-version="1.0.0", com.ibm.wala.cast.js;bundle-version="1.0.0", com.ibm.wala.cast;bundle-version="1.0.0", com.ibm.wala.core;bundle-version="1.1.3", com.ibm.wala.cast.js.test;bundle-version="1.0.0", com.ibm.wala.cast.test;bundle-version="1.0.0", com.ibm.wala.core.tests;bundle-version="1.1.3", com.ibm.wala.cast.js.test.data;bundle-version="1.3.4", com.ibm.wala.shrike;bundle-version="1.3.4", org.junit;bundle-version="4.0.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Export-Package: com.ibm.wala.cast.js.examples.hybrid, com.ibm.wala.cast.js.rhino.callgraph.fieldbased.test, com.ibm.wala.cast.js.rhino.test, com.ibm.wala.cast.js.test, com.ibm.wala.cast.js.vis WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/OSGI-INF/000077500000000000000000000000001342410422700216045ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/OSGI-INF/l10n/000077500000000000000000000000001342410422700223565ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/OSGI-INF/l10n/bundle.properties000066400000000000000000000001431342410422700257430ustar00rootroot00000000000000#Properties file for com.ibm.wala.cast.js.rhino.test Bundle-Vendor = IBM Bundle-Name = Test Plug-inWALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/build.gradle000066400000000000000000000020771342410422700227160ustar00rootroot00000000000000plugins { id 'com.github.hauner.jarTest' } sourceSets.test.java.srcDirs = ['harness-src'] publishing.publications { mavenJava(MavenPublication) { artifact jarTest } } dependencies { testCompile( 'junit:junit:4.12', project(':com.ibm.wala.cast'), project(':com.ibm.wala.cast.js'), project(':com.ibm.wala.cast.js.rhino'), project(':com.ibm.wala.core'), project(':com.ibm.wala.shrike'), project(':com.ibm.wala.util'), project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.test'), project(configuration: 'testArchives', path: ':com.ibm.wala.cast.test'), project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests'), ) } processTestResources { def data = project(':com.ibm.wala.cast.js.test.data') dependsOn data.processTestResources from data.sourceSets.test.resources } test { environment 'TRAVIS', 1 maxHeapSize = '800M' if (gradle.startParameter.offline) exclude '**/FieldBasedJQueryTest.class' } task cleanTestExtras(type: Delete) { delete 'actual.dump' delete 'expected.dump' } cleanTest.dependsOn cleanTestExtras WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/build.properties000066400000000000000000000002741342410422700236510ustar00rootroot00000000000000source.. = harness-src/ output.. = bin/ bin.includes = META-INF/,\ .,\ OSGI-INF/l10n/bundle.properties,\ OSGI-INF/ javacProjectSettings = true WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/000077500000000000000000000000001342410422700226615ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/000077500000000000000000000000001342410422700234375ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/000077500000000000000000000000001342410422700242065ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/000077500000000000000000000000001342410422700251325ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/000077500000000000000000000000001342410422700260645ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/000077500000000000000000000000001342410422700265005ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/examples/000077500000000000000000000000001342410422700303165ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/examples/hybrid/000077500000000000000000000000001342410422700315775ustar00rootroot00000000000000Driver.java000066400000000000000000000100351342410422700336150ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/examples/hybridpackage com.ibm.wala.cast.js.examples.hybrid; import java.io.IOException; import java.net.URL; import java.util.Map; import com.ibm.wala.cast.ipa.callgraph.CrossLanguageCallGraph; import com.ibm.wala.cast.ipa.callgraph.CrossLanguageMethodTargetSelector; import com.ibm.wala.cast.ipa.callgraph.StandardFunctionTargetSelector; import com.ibm.wala.cast.ipa.cha.CrossLanguageClassHierarchy; import com.ibm.wala.cast.ir.ssa.AstIRFactory; import com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil; import com.ibm.wala.cast.js.ipa.callgraph.JavaScriptConstructTargetSelector; import com.ibm.wala.cast.js.ipa.callgraph.JavaScriptEntryPoints; import com.ibm.wala.cast.js.loader.JavaScriptLoader; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.classLoader.IMethod; import com.ibm.wala.classLoader.Language; import com.ibm.wala.classLoader.SourceURLModule; import com.ibm.wala.ipa.callgraph.AnalysisCacheImpl; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.Entrypoint; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.MethodTargetSelector; import com.ibm.wala.ipa.callgraph.impl.ComposedEntrypoints; import com.ibm.wala.ipa.callgraph.impl.FakeRootClass; import com.ibm.wala.ipa.callgraph.impl.FakeRootMethod; import com.ibm.wala.ipa.cha.ClassHierarchyException; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.ssa.IRFactory; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.config.AnalysisScopeReader; import com.ibm.wala.util.io.FileProvider; import com.ibm.wala.util.strings.Atom; public class Driver { public static void addDefaultDispatchLogic(AnalysisOptions options, IClassHierarchy cha) { com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha); Map methodTargetSelectors = HashMapFactory.make(); methodTargetSelectors.put(JavaScriptLoader.JS.getName(), new JavaScriptConstructTargetSelector(cha, new StandardFunctionTargetSelector(cha, options.getMethodTargetSelector()))); methodTargetSelectors.put(Language.JAVA.getName(), options.getMethodTargetSelector()); options.setSelector(new CrossLanguageMethodTargetSelector(methodTargetSelectors)); } public static void main(String[] args) throws IOException, ClassHierarchyException, IllegalArgumentException, CancelException { JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); HybridClassLoaderFactory loaders = new HybridClassLoaderFactory(); HybridAnalysisScope scope = new HybridAnalysisScope(); FileProvider files = new FileProvider(); AnalysisScopeReader.read(scope, args[0], files.getFile("Java60RegressionExclusions.txt"), Driver.class.getClassLoader()); scope.addToScope( scope.getJavaScriptLoader(), JSCallGraphUtil.getPrologueFile("prologue.js")); for(int i = 1; i < args.length; i++) { URL script = Driver.class.getClassLoader().getResource(args[i]); scope.addToScope( scope.getJavaScriptLoader(), new SourceURLModule(script)); } System.err.println(scope); IClassHierarchy cha = CrossLanguageClassHierarchy.make(scope, loaders); Iterable jsRoots = new JavaScriptEntryPoints(cha, cha.getLoader(scope.getJavaScriptLoader())); Iterable entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha); ComposedEntrypoints roots = new ComposedEntrypoints(jsRoots, entrypoints); AnalysisOptions options = new AnalysisOptions(scope, roots); IRFactory factory = AstIRFactory.makeDefaultFactory(); IAnalysisCacheView cache = new AnalysisCacheImpl(factory); addDefaultDispatchLogic(options, cha); JavaJavaScriptHybridCallGraphBuilder b = new JavaJavaScriptHybridCallGraphBuilder(new FakeRootMethod(new FakeRootClass(CrossLanguageCallGraph.crossCoreLoader, cha), options, cache), options, cache); System.err.println(b.makeCallGraph(options)); } } HybridAnalysisScope.java000066400000000000000000000016531342410422700363070ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/examples/hybridpackage com.ibm.wala.cast.js.examples.hybrid; import java.util.Set; import com.ibm.wala.cast.js.loader.JavaScriptLoader; import com.ibm.wala.cast.js.types.JavaScriptTypes; import com.ibm.wala.classLoader.Language; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.util.collections.HashSetFactory; public class HybridAnalysisScope extends AnalysisScope { private static final Set languages; static { languages = HashSetFactory.make(); languages.add(Language.JAVA); languages.add(JavaScriptLoader.JS); } public HybridAnalysisScope() { super(languages); this.initForJava(); ClassLoaderReference jsLoader = JavaScriptTypes.jsLoader; loadersByName.put(JavaScriptTypes.jsLoaderName, jsLoader); } public ClassLoaderReference getJavaScriptLoader() { return getLoader(JavaScriptTypes.jsLoaderName); } } HybridClassLoaderFactory.java000066400000000000000000000030371342410422700372540ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/examples/hybridpackage com.ibm.wala.cast.js.examples.hybrid; import java.io.IOException; import com.ibm.wala.cast.js.loader.JavaScriptLoader; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.cast.js.translator.JavaScriptTranslatorFactory; import com.ibm.wala.cast.js.types.JavaScriptTypes; import com.ibm.wala.classLoader.ClassLoaderFactoryImpl; import com.ibm.wala.classLoader.IClassLoader; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.util.config.SetOfClasses; public class HybridClassLoaderFactory extends ClassLoaderFactoryImpl { private final JavaScriptTranslatorFactory jsTranslatorFactory; public HybridClassLoaderFactory( JavaScriptTranslatorFactory jsTranslatorFactory, SetOfClasses exclusions) { super(exclusions); this.jsTranslatorFactory = jsTranslatorFactory; } public HybridClassLoaderFactory() { this(new CAstRhinoTranslatorFactory(), null); } @Override protected IClassLoader makeNewClassLoader(ClassLoaderReference classLoaderReference, IClassHierarchy cha, IClassLoader parent, AnalysisScope scope) throws IOException { if (classLoaderReference.equals(JavaScriptTypes.jsLoader)) { JavaScriptLoader L = new JavaScriptLoader(cha, jsTranslatorFactory); L.init(scope.getModules(classLoaderReference)); return L; } else { return super.makeNewClassLoader(classLoaderReference, cha, parent, scope); } } } JavaJavaScriptHybridCallGraphBuilder.java000066400000000000000000000153661342410422700414750ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/examples/hybridpackage com.ibm.wala.cast.js.examples.hybrid; import java.util.Map; import com.ibm.wala.cast.ipa.callgraph.AstCFAPointerKeys; import com.ibm.wala.cast.ipa.callgraph.AstSSAPropagationCallGraphBuilder.AstPointerAnalysisImpl.AstImplicitPointsToSetVisitor; import com.ibm.wala.cast.ipa.callgraph.CrossLanguageCallGraph; import com.ibm.wala.cast.ipa.callgraph.CrossLanguageContextSelector; import com.ibm.wala.cast.ipa.callgraph.CrossLanguageInstanceKeys; import com.ibm.wala.cast.ipa.callgraph.CrossLanguageSSAPropagationCallGraphBuilder; import com.ibm.wala.cast.ipa.callgraph.GlobalObjectKey; import com.ibm.wala.cast.js.ipa.callgraph.JSSSAPropagationCallGraphBuilder; import com.ibm.wala.cast.js.ipa.callgraph.JSSSAPropagationCallGraphBuilder.JSConstraintVisitor; import com.ibm.wala.cast.js.ipa.callgraph.JSSSAPropagationCallGraphBuilder.JSInterestingVisitor; import com.ibm.wala.cast.js.ipa.callgraph.JSSSAPropagationCallGraphBuilder.JSPointerAnalysisImpl.JSImplicitPointsToSetVisitor; import com.ibm.wala.cast.js.ipa.callgraph.JavaScriptConstructorContextSelector; import com.ibm.wala.cast.js.ipa.callgraph.JavaScriptConstructorInstanceKeys; import com.ibm.wala.cast.js.ipa.callgraph.JavaScriptFunctionApplyContextSelector; import com.ibm.wala.cast.js.ipa.callgraph.JavaScriptScopeMappingInstanceKeys; import com.ibm.wala.cast.js.loader.JavaScriptLoader; import com.ibm.wala.cast.js.types.JavaScriptTypes; import com.ibm.wala.cast.util.TargetLanguageSelector; import com.ibm.wala.classLoader.IMethod; import com.ibm.wala.classLoader.Language; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.ContextSelector; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; import com.ibm.wala.ipa.callgraph.impl.AbstractRootMethod; import com.ibm.wala.ipa.callgraph.impl.DefaultContextSelector; import com.ibm.wala.ipa.callgraph.propagation.AbstractFieldPointerKey; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.InstanceKeyFactory; import com.ibm.wala.ipa.callgraph.propagation.LocalPointerKey; import com.ibm.wala.ipa.callgraph.propagation.PointerKey; import com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter; import com.ibm.wala.ipa.callgraph.propagation.cfa.ZeroXInstanceKeys; import com.ibm.wala.ssa.SSAAbstractInvokeInstruction; import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.strings.Atom; public class JavaJavaScriptHybridCallGraphBuilder extends CrossLanguageSSAPropagationCallGraphBuilder { public JavaJavaScriptHybridCallGraphBuilder(IMethod fakeRootClass, AnalysisOptions options, IAnalysisCacheView cache) { super(fakeRootClass, options, cache, new AstCFAPointerKeys()); globalObject = new GlobalObjectKey(cha.lookupClass(JavaScriptTypes.Root)); SSAContextInterpreter contextInterpreter = makeDefaultContextInterpreters(null, options, cha); setContextInterpreter( contextInterpreter ); ContextSelector def = new DefaultContextSelector(options, cha); Map languageSelectors = HashMapFactory.make(); languageSelectors.put(JavaScriptTypes.jsName, new JavaScriptFunctionApplyContextSelector(new JavaScriptConstructorContextSelector(def))); languageSelectors.put(Language.JAVA.getName(), def); setContextSelector(new CrossLanguageContextSelector(languageSelectors)); Map instanceKeys = HashMapFactory.make(); instanceKeys.put( JavaScriptTypes.jsName, new JavaScriptScopeMappingInstanceKeys(cha, this, new JavaScriptConstructorInstanceKeys(new ZeroXInstanceKeys( options, cha, contextInterpreter, ZeroXInstanceKeys.ALLOCATIONS)))); instanceKeys.put( Language.JAVA.getName(), new ZeroXInstanceKeys(options, cha, contextInterpreter, ZeroXInstanceKeys.NONE)); setInstanceKeys(new CrossLanguageInstanceKeys(instanceKeys)); } private final GlobalObjectKey globalObject; @Override public GlobalObjectKey getGlobalObject(Atom language) { assert language.equals(JavaScriptTypes.jsName); return globalObject; } @Override protected TargetLanguageSelector makeMainVisitorSelector() { return (language, construct) -> { if (JavaScriptTypes.jsName.equals(language)) { return new JSConstraintVisitor(JavaJavaScriptHybridCallGraphBuilder.this, construct); } else { return new ConstraintVisitor(JavaJavaScriptHybridCallGraphBuilder.this, construct); } }; } @Override protected TargetLanguageSelector makeInterestingVisitorSelector() { return (language, construct) -> { if (JavaScriptTypes.jsName.equals(language)) { return new JSInterestingVisitor(construct); } else { return new InterestingVisitor(construct); } }; } @Override protected TargetLanguageSelector makeImplicitVisitorSelector( CrossLanguagePointerAnalysisImpl analysis) { return (language, construct) -> { if (JavaScriptTypes.jsName.equals(language)) { return new JSImplicitPointsToSetVisitor((AstPointerAnalysisImpl) getPointerAnalysis(), construct); } else { return new AstImplicitPointsToSetVisitor((AstPointerAnalysisImpl) getPointerAnalysis(), construct); } }; } @Override protected TargetLanguageSelector makeRootNodeSelector() { return (language, construct) -> { return getOptions().getAnalysisScope().getLanguage(language).getFakeRootMethod(getClassHierarchy(), getOptions(), getAnalysisCache()); }; } @Override protected boolean useObjectCatalog() { return true; } @Override protected AbstractFieldPointerKey fieldKeyForUnknownWrites(AbstractFieldPointerKey fieldKey) { // TODO Auto-generated method stub return null; } @Override protected boolean sameMethod(CGNode opNode, String definingMethod) { if (JavaScriptLoader.JS.equals(opNode.getMethod().getDeclaringClass().getClassLoader().getLanguage())) { return definingMethod.equals(opNode.getMethod().getReference().getDeclaringClass().getName().toString()); } else { return false; } } @Override protected void processCallingConstraints(CGNode caller, SSAAbstractInvokeInstruction instruction, CGNode target, InstanceKey[][] constParams, PointerKey uniqueCatchKey) { if (JavaScriptLoader.JS.equals(caller.getMethod().getDeclaringClass().getClassLoader().getLanguage())) { JSSSAPropagationCallGraphBuilder.processCallingConstraintsInternal(this, caller, instruction, target, constParams, uniqueCatchKey); } else { super.processCallingConstraints(caller, instruction, target, constParams, uniqueCatchKey); } } } WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/000077500000000000000000000000001342410422700276175ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/callgraph/000077500000000000000000000000001342410422700315545ustar00rootroot00000000000000fieldbased/000077500000000000000000000000001342410422700335575ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/callgraphtest/000077500000000000000000000000001342410422700345365ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/callgraph/fieldbasedAbstractFieldBasedTest.java000066400000000000000000000052631342410422700417150ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/callgraph/fieldbased/testpackage com.ibm.wala.cast.js.rhino.callgraph.fieldbased.test; import java.net.URL; import java.util.Map; import java.util.Set; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assume.*; import org.junit.Before; import com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error; import com.ibm.wala.cast.js.html.DefaultSourceExtractor; import com.ibm.wala.cast.js.ipa.callgraph.JSCallGraph; import com.ibm.wala.cast.js.test.FieldBasedCGUtil; import com.ibm.wala.cast.js.test.FieldBasedCGUtil.BuilderType; import com.ibm.wala.cast.js.test.TestJSCallGraphShape; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.cast.js.util.CallGraph2JSON; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.NullProgressMonitor; import com.ibm.wala.util.ProgressMaster; import com.ibm.wala.util.WalaException; public abstract class AbstractFieldBasedTest extends TestJSCallGraphShape { protected FieldBasedCGUtil util; public AbstractFieldBasedTest() { super(); } @Override @Before public void setUp() throws Exception { util = new FieldBasedCGUtil(new CAstRhinoTranslatorFactory()); } protected JSCallGraph runTest(String script, Object[][] assertions, BuilderType... builderTypes) throws WalaException, Error, CancelException { return runTest(TestFieldBasedCG.class.getClassLoader().getResource(script), assertions, builderTypes); } protected JSCallGraph runTest(URL url, Object[][] assertions, BuilderType... builderTypes) throws WalaException, Error, CancelException { JSCallGraph cg = null; for(BuilderType builderType : builderTypes) { ProgressMaster monitor = ProgressMaster.make(new NullProgressMonitor(), 45000, true); try { cg = util.buildCG(url, builderType, monitor, false, DefaultSourceExtractor.factory).fst; System.err.println(cg); verifyGraphAssertions(cg, assertions); } catch(AssertionError afe) { throw new AssertionError(builderType + ": " + afe.getMessage()); } } return cg; } /** * for long-running tests that tend to time out on Travis */ protected void runTestExceptOnTravis(URL url, Object[][] assertions, BuilderType... builderTypes) throws WalaException, Error, CancelException { assumeThat("not running on Travis CI", System.getenv("TRAVIS"), nullValue()); runTest(url, assertions, builderTypes); } protected void dumpCG(JSCallGraph cg) { CallGraph2JSON.IGNORE_HARNESS = false; Map> edges = CallGraph2JSON.extractEdges(cg); for(Map.Entry> entry : edges.entrySet()) for(String callee : entry.getValue()) System.out.println(entry.getKey() + " -> " + callee); } } FieldBasedCGGamesTest.java000066400000000000000000000053661342410422700414240ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/callgraph/fieldbased/testpackage com.ibm.wala.cast.js.rhino.callgraph.fieldbased.test; import java.io.IOException; import java.net.URL; import org.junit.Test; import com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error; import com.ibm.wala.cast.js.test.FieldBasedCGUtil.BuilderType; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.WalaException; public class FieldBasedCGGamesTest extends AbstractFieldBasedTest { @Test public void testBunnyHunt() throws IOException, WalaException, Error, CancelException { runTestExceptOnTravis(new URL("http://www.themaninblue.com/experiment/BunnyHunt/"), new Object[][]{}, BuilderType.OPTIMISTIC); } // seems to break with http issues //@Test public void testBeslimed() throws IOException, WalaException, Error, CancelException { runTestExceptOnTravis(new URL("http://www.markus-inger.de/test/game.php"), new Object[][]{}, BuilderType.OPTIMISTIC); } // seems to break with http issues //@Test public void testDiggAttack() throws IOException, WalaException, Error, CancelException { runTestExceptOnTravis(new URL("http://www.pixastic.com/labs/digg_attack/"), new Object[][]{}, BuilderType.OPTIMISTIC); } @Test public void testRiverRaider() throws IOException, WalaException, Error, CancelException { runTestExceptOnTravis(new URL("http://playstar.mobi/games/riverraider/index.html?playerId=&gameId=8&highscore=102425"), new Object[][]{}, BuilderType.OPTIMISTIC_WORKLIST); } @Test public void testSolitaire() throws IOException, WalaException, Error, CancelException { runTestExceptOnTravis(new URL("http://www.inmensia.com/files/solitaire1.0.html"), new Object[][]{}, BuilderType.OPTIMISTIC); } @Test // (expected = CancelException.class) public void testWorldOfSolitaire() throws IOException, WalaException, Error, CancelException { runTestExceptOnTravis(new URL("http://worldofsolitaire.com/"), new Object[][]{}, BuilderType.OPTIMISTIC); if (System.getenv("TRAVIS") != null) { // fake it // throw new CancelException(null); } } @Test public void testMinesweeper() throws IOException, WalaException, Error, CancelException { runTestExceptOnTravis(new URL("http://www.inmensia.com/files/minesweeper1.0.html"), new Object[][]{}, BuilderType.OPTIMISTIC_WORKLIST); } @Test public void testProtoRPG() throws IOException, WalaException, Error, CancelException { runTestExceptOnTravis(new URL("http://www.protorpg.com/games/protorpg/?game=prologue"), new Object[][]{}, BuilderType.OPTIMISTIC_WORKLIST); } @Test public void testBattleship() throws IOException, WalaException, Error, CancelException { runTestExceptOnTravis(new URL("http://www.sinkmyship.com/battleship/single.html"), new Object[][]{}, BuilderType.OPTIMISTIC_WORKLIST); } } FieldBasedComparisonTest.java000066400000000000000000000042061342410422700422600ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/callgraph/fieldbased/testpackage com.ibm.wala.cast.js.rhino.callgraph.fieldbased.test; import org.junit.Test; import com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error; import com.ibm.wala.cast.js.html.JSSourceExtractor; import com.ibm.wala.cast.js.test.FieldBasedCGUtil.BuilderType; import com.ibm.wala.cast.js.test.TestSimplePageCallGraphShape; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.WalaException; public class FieldBasedComparisonTest extends AbstractFieldBasedTest { private void test(String file, Object[][] assertions, BuilderType builderType) throws WalaException, Error, CancelException { boolean save = JSSourceExtractor.USE_TEMP_NAME; try { JSSourceExtractor.USE_TEMP_NAME = false; runTest(file, assertions, builderType); } finally { JSSourceExtractor.USE_TEMP_NAME = save; } } @Test(expected = AssertionError.class) public void testSkeletonPessimistic() throws WalaException, Error, CancelException { test("pages/skeleton.html", TestSimplePageCallGraphShape.assertionsForSkeleton, BuilderType.PESSIMISTIC); } @Test public void testSkeletonOptimistic() throws WalaException, Error, CancelException { test("pages/skeleton.html", TestSimplePageCallGraphShape.assertionsForSkeleton, BuilderType.OPTIMISTIC); } @Test public void testSkeletonWorklist() throws WalaException, Error, CancelException { test("pages/skeleton.html", TestSimplePageCallGraphShape.assertionsForSkeleton, BuilderType.OPTIMISTIC_WORKLIST); } @Test(expected = AssertionError.class) public void testSkeleton2Pessimistic() throws WalaException, Error, CancelException { test("pages/skeleton2.html", TestSimplePageCallGraphShape.assertionsForSkeleton2, BuilderType.PESSIMISTIC); } @Test public void testSkeleton2Optimistic() throws WalaException, Error, CancelException { test("pages/skeleton2.html", TestSimplePageCallGraphShape.assertionsForSkeleton2, BuilderType.OPTIMISTIC); } @Test public void testSkeleton2Worklist() throws WalaException, Error, CancelException { test("pages/skeleton2.html", TestSimplePageCallGraphShape.assertionsForSkeleton2, BuilderType.OPTIMISTIC_WORKLIST); } } FieldBasedJQueryTest.java000066400000000000000000000011661342410422700413670ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/callgraph/fieldbased/testpackage com.ibm.wala.cast.js.rhino.callgraph.fieldbased.test; import java.io.IOException; import java.net.URL; import org.junit.Test; import com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error; import com.ibm.wala.cast.js.test.FieldBasedCGUtil.BuilderType; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.WalaException; public class FieldBasedJQueryTest extends AbstractFieldBasedTest { @Test public void test1_8_2() throws IOException, WalaException, Error, CancelException { runTest(new URL("http://code.jquery.com/jquery-1.8.2.js"), new Object[][]{}, BuilderType.OPTIMISTIC_WORKLIST); } } TestFieldBasedCG.java000066400000000000000000000144471342410422700404470ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/callgraph/fieldbased/test/****************************************************************************** * Copyright (c) 2002 - 2012 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.js.rhino.callgraph.fieldbased.test; import org.junit.Test; import com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error; import com.ibm.wala.cast.js.test.FieldBasedCGUtil.BuilderType; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.WalaException; public class TestFieldBasedCG extends AbstractFieldBasedTest { private static final Object[][] assertionsForSimpleJS = new Object[][] { new Object[] { ROOT, new String[] { "suffix:simple.js" } }, new Object[] { "suffix:simple.js", new String[] { "suffix:foo", "suffix:bar", "suffix:A" } }, new Object[] { "suffix:foo", new String[] { "suffix:bar" } }, new Object[] { "suffix:aluis", new String[] { "suffix:aluis" } } }; @Test public void testSimpleJSPessimistic() throws WalaException, Error, CancelException { runTest("tests/fieldbased/simple.js", assertionsForSimpleJS, BuilderType.PESSIMISTIC); } @Test public void testSimpleJSOptimistic() throws WalaException, Error, CancelException { runTest("tests/fieldbased/simple.js", assertionsForSimpleJS, BuilderType.OPTIMISTIC); } @Test public void testSimpleJSWorklist() throws WalaException, Error, CancelException { runTest("tests/fieldbased/simple.js", assertionsForSimpleJS, BuilderType.OPTIMISTIC_WORKLIST); } private static final Object[][] assertionsForOneShot = new Object[][] { new Object[] { ROOT, new String[] { "suffix:oneshot.js" } }, new Object[] { "suffix:oneshot.js", new String[] { "suffix:f" } }, new Object[] { "suffix:f", new String[] { "suffix:g" } } }; @Test public void testOneshotPessimistic() throws WalaException, Error, CancelException { runTest("tests/fieldbased/oneshot.js", assertionsForOneShot, BuilderType.PESSIMISTIC); } @Test public void testOneshotOptimistic() throws WalaException, Error, CancelException { runTest("tests/fieldbased/oneshot.js", assertionsForOneShot, BuilderType.OPTIMISTIC); } @Test public void testOneshotWorklist() throws WalaException, Error, CancelException { runTest("tests/fieldbased/oneshot.js", assertionsForOneShot, BuilderType.OPTIMISTIC_WORKLIST); } private static final Object[][] assertionsForCallbacks = new Object[][] { new Object[] { ROOT, new String[] { "suffix:callbacks.js" } }, new Object[] { "suffix:callbacks.js", new String[] { "suffix:f" } }, new Object[] { "suffix:f", new String[] { "suffix:k", "suffix:n" } }, new Object[] { "suffix:k", new String[] { "suffix:l", "suffix:p" } } }; @Test public void testCallbacksOptimistic() throws WalaException, Error, CancelException { runTest("tests/fieldbased/callbacks.js", assertionsForCallbacks, BuilderType.OPTIMISTIC_WORKLIST); } @Test public void testCallbacksWorklist() throws WalaException, Error, CancelException { runTest("tests/fieldbased/callbacks.js", assertionsForCallbacks, BuilderType.OPTIMISTIC_WORKLIST); } private static final Object[][] assertionsForLexical = new Object[][] { new Object[] { "suffix:h", new String[] { "suffix:g" } } }; @Test public void testLexicalPessimistic() throws WalaException, Error, CancelException { runTest("tests/fieldbased/lexical.js", assertionsForLexical, BuilderType.PESSIMISTIC); } @Test public void testLexicalOptimistic() throws WalaException, Error, CancelException { runTest("tests/fieldbased/lexical.js", assertionsForLexical, BuilderType.OPTIMISTIC); } @Test public void testLexicalWorklist() throws WalaException, Error, CancelException { runTest("tests/fieldbased/lexical.js", assertionsForLexical, BuilderType.OPTIMISTIC_WORKLIST); } private static final Object[][] assertionsForReflectiveCall = new Object[][] { new Object[] { "suffix:h", new String[] { "suffix:Function_prototype_call", "suffix:Function_prototype_apply" } }, new Object[] { "suffix:Function_prototype_call", new String[] { "suffix:f" } }, new Object[] { "suffix:Function_prototype_apply", new String[] { "suffix:x" } }, new Object[] { "suffix:f", new String[] { "suffix:k" } } }; @Test public void testReflectiveCallOptimistic() throws WalaException, Error, CancelException { runTest("tests/fieldbased/reflective_calls.js", assertionsForReflectiveCall, BuilderType.OPTIMISTIC); } @Test public void testReflectiveCallWorklist() throws WalaException, Error, CancelException { runTest("tests/fieldbased/reflective_calls.js", assertionsForReflectiveCall, BuilderType.OPTIMISTIC_WORKLIST); } private static final Object[][] assertionsForNew = new Object[][] { new Object[] { "suffix:new.js", new String[] { "suffix:g", "suffix:f" } }, new Object[] { "suffix:g", new String[] { "!suffix:k" } } }; @Test public void testNewOptimistic() throws WalaException, Error, CancelException { runTest("tests/fieldbased/new.js", assertionsForNew, BuilderType.OPTIMISTIC); } @Test public void testNewWorklist() throws WalaException, Error, CancelException { runTest("tests/fieldbased/new.js", assertionsForNew, BuilderType.OPTIMISTIC_WORKLIST); } private static final Object[][] assertionsForCallbacks2 = new Object[][] { new Object[] { "suffix:callbacks2.js", new String[] { "suffix:g" } }, new Object[] { "suffix:g", new String[] { "suffix:k", "!suffix:l" } } }; @Test public void testCallbacks2Optimistic() throws WalaException, Error, CancelException { runTest("tests/fieldbased/callbacks2.js", assertionsForCallbacks2, BuilderType.OPTIMISTIC); } @Test public void testCallbacks2Worklist() throws WalaException, Error, CancelException { runTest("tests/fieldbased/callbacks2.js", assertionsForCallbacks2, BuilderType.OPTIMISTIC_WORKLIST); } // @Test public void testBug2979() throws WalaException, Error, CancelException { System.err.println(runTest("pages/2979.html", new Object[][]{}, BuilderType.PESSIMISTIC, BuilderType.OPTIMISTIC, BuilderType.OPTIMISTIC_WORKLIST)); } } TestPointerAnalysisRhino.java000066400000000000000000000005301342410422700423630ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/callgraph/fieldbased/testpackage com.ibm.wala.cast.js.rhino.callgraph.fieldbased.test; import com.ibm.wala.cast.js.test.TestPointerAnalyses; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; public class TestPointerAnalysisRhino extends TestPointerAnalyses { public TestPointerAnalysisRhino() { super(new CAstRhinoTranslatorFactory()); } } WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/test/000077500000000000000000000000001342410422700305765ustar00rootroot00000000000000HTMLCGBuilder.java000066400000000000000000000153511342410422700336540ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/test/******************************************************************************* * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.rhino.test; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.Properties; import java.util.function.Supplier; import org.junit.Assert; import com.ibm.wala.cast.js.html.DefaultSourceExtractor; import com.ibm.wala.cast.js.html.JSSourceExtractor; import com.ibm.wala.cast.js.ipa.callgraph.JSCFABuilder; import com.ibm.wala.cast.js.ipa.callgraph.JavaScriptFunctionDotCallTargetSelector; import com.ibm.wala.cast.js.ipa.callgraph.RecursionCheckContextSelector; import com.ibm.wala.cast.js.test.JSCallGraphBuilderUtil; import com.ibm.wala.cast.js.test.JSCallGraphBuilderUtil.CGBuilderType; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.CallGraphBuilderCancelException; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis; import com.ibm.wala.util.NullProgressMonitor; import com.ibm.wala.util.ProgressMaster; import com.ibm.wala.util.io.CommandLine; import com.ibm.wala.util.io.FileProvider; import com.ibm.wala.util.io.FileUtil; /** * Utility class for building call graphs of HTML pages. * * @author mschaefer * */ public class HTMLCGBuilder { public static final int DEFAULT_TIMEOUT = 120; /** * Simple struct-like type to hold results of call graph construction. * * @author mschaefer * */ public static class CGBuilderResult { /** time it took to build the call graph; {@code -1} if timeout occurred */ public long construction_time; /** builder responsible for building the call graph*/ public JSCFABuilder builder; /** pointer analysis results; partial if {@link #construction_time} is {@code -1} */ public PointerAnalysis pa; /** call graph; partial if {@link #construction_time} is {@code -1} */ public CallGraph cg; } /** * Build a call graph for an HTML page, optionally with a timeout. * * @param src * the HTML page to analyse, can either be a path to a local file or a URL * @param timeout * analysis timeout in seconds, -1 means no timeout */ public static CGBuilderResult buildHTMLCG(String src, int timeout, CGBuilderType builderType, Supplier fExtractor) { CGBuilderResult res = new CGBuilderResult(); URL url = null; try { url = toUrl(src); } catch (MalformedURLException e1) { Assert.fail("Could not find page to analyse: " + src); } com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); JSCFABuilder builder = null; try { builder = JSCallGraphBuilderUtil.makeHTMLCGBuilder(url, builderType, fExtractor); // TODO we need to find a better way to do this ContextSelector delegation; // the code below belongs somewhere else!!! // the bound of 4 is what is needed to pass our current framework tests builder.setContextSelector(new RecursionCheckContextSelector(builder.getContextSelector())); ProgressMaster master = ProgressMaster.make(new NullProgressMonitor(), timeout * 1000, false); if (timeout > 0) { master.beginTask("runSolver", 1); } long start = System.currentTimeMillis(); CallGraph cg = timeout > 0 ? builder.makeCallGraph(builder.getOptions(), master) : builder.makeCallGraph(builder.getOptions()); long end = System.currentTimeMillis(); master.done(); res.construction_time = (end - start); res.cg = cg; res.pa = builder.getPointerAnalysis(); res.builder = builder; return res; } catch (CallGraphBuilderCancelException e) { res.construction_time = -1; res.cg = e.getPartialCallGraph(); res.pa = e.getPartialPointerAnalysis(); res.builder = builder; return res; } catch (Exception e) { throw new Error(e); } } private static URL toUrl(String src) throws MalformedURLException { // first try interpreting as local file name, if that doesn't work just // assume it's a URL try { File f = (new FileProvider()).getFileFromClassLoader(src, HTMLCGBuilder.class.getClassLoader()); URL url = f.toURI().toURL(); return url; } catch (FileNotFoundException fnfe) { return new URL(src); } } /** * Usage: HTMLCGBuilder -src path_to_html_file -timeout timeout_in_seconds -reachable function_name * timeout argument is optional and defaults to {@link #DEFAULT_TIMEOUT}. * reachable argument is optional. if provided, and some reachable function name contains function_name, * will print "REACHABLE" */ public static void main(String[] args) throws IOException { Properties parsedArgs = CommandLine.parse(args); String src = parsedArgs.getProperty("src"); if (src == null) { throw new IllegalArgumentException("-src argument is required"); } // if src is a JS file, build trivial wrapper HTML file if (src.endsWith(".js")) { File tmpFile = File.createTempFile("HTMLCGBuilder", ".html"); tmpFile.deleteOnExit(); FileUtil.writeFile(tmpFile, "" + " " + " " + " " + " " + "" + "" + ""); src = tmpFile.getAbsolutePath(); } int timeout; if (parsedArgs.containsKey("timeout")) { timeout = Integer.parseInt(parsedArgs.getProperty("timeout")); } else { timeout = DEFAULT_TIMEOUT; } String reachableName = null; if (parsedArgs.containsKey("reachable")) { reachableName = parsedArgs.getProperty("reachable"); } // suppress debug output JavaScriptFunctionDotCallTargetSelector.WARN_ABOUT_IMPRECISE_CALLGRAPH = false; // build call graph CGBuilderResult res = buildHTMLCG(src, timeout, CGBuilderType.ONE_CFA, DefaultSourceExtractor.factory); if(res.construction_time == -1) System.out.println("TIMED OUT"); else System.out.println("Call graph construction took " + res.construction_time/1000.0 + " seconds"); if (reachableName != null) { for (CGNode node : res.cg) { if (node.getMethod().getDeclaringClass().getName().toString().contains(reachableName)) { System.out.println("REACHABLE"); break; } } } } } PrintIRs.java000066400000000000000000000111071342410422700330740ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/rhino/test/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.rhino.test; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.Collections; import java.util.Set; import java.util.function.Predicate; import com.ibm.wala.cast.ipa.callgraph.CAstAnalysisScope; import com.ibm.wala.cast.ir.ssa.AstIRFactory; import com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error; import com.ibm.wala.cast.js.html.DefaultSourceExtractor; import com.ibm.wala.cast.js.html.MappedSourceModule; import com.ibm.wala.cast.js.html.WebPageLoaderFactory; import com.ibm.wala.cast.js.html.WebUtil; import com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil; import com.ibm.wala.cast.js.loader.JavaScriptLoader; import com.ibm.wala.cast.js.loader.JavaScriptLoaderFactory; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.cast.loader.AstMethod; import com.ibm.wala.cast.types.AstMethodReference; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.IMethod; import com.ibm.wala.classLoader.SourceModule; import com.ibm.wala.ipa.callgraph.impl.Everywhere; import com.ibm.wala.ipa.cha.ClassHierarchyException; import com.ibm.wala.ipa.cha.ClassHierarchyFactory; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.ssa.IR; import com.ibm.wala.ssa.IRFactory; import com.ibm.wala.ssa.SSAOptions; import com.ibm.wala.util.WalaException; import com.ibm.wala.util.collections.Pair; public class PrintIRs { /** * prints the IR of each function in the script */ public static void printIRsForJS(String filename) throws ClassHierarchyException { // use Rhino to parse JavaScript JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); // build a class hierarchy, for access to code info IClassHierarchy cha = JSCallGraphUtil.makeHierarchyForScripts(filename); printIRsForCHA(cha, t -> t.startsWith("Lprologue.js")); } protected static void printIRsForCHA(IClassHierarchy cha, Predicate exclude) { // for constructing IRs IRFactory factory = AstIRFactory.makeDefaultFactory(); for (IClass klass : cha) { // ignore models of built-in JavaScript methods String name = klass.getName().toString(); if (exclude.test(name)) continue; // get the IMethod representing the code IMethod m = klass.getMethod(AstMethodReference.fnSelector); if (m != null) { IR ir = factory.makeIR(m, Everywhere.EVERYWHERE, new SSAOptions()); System.out.println(ir); if (m instanceof AstMethod) { AstMethod astMethod = (AstMethod) m; System.out.println(astMethod.getSourcePosition()); } System.out.println("===================================================\n"); } } } private static void printIRsForHTML(String filename) throws IllegalArgumentException, MalformedURLException, IOException, WalaException, Error { // use Rhino to parse JavaScript JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); // add model for DOM APIs JavaScriptLoader.addBootstrapFile(WebUtil.preamble); URL url = (new File(filename)).toURI().toURL(); Pair, File> p = WebUtil.extractScriptFromHTML(url, DefaultSourceExtractor.factory); SourceModule[] scripts = p.fst.toArray(new SourceModule[] {}); JavaScriptLoaderFactory loaders = new WebPageLoaderFactory(JSCallGraphUtil.getTranslatorFactory()); CAstAnalysisScope scope = new CAstAnalysisScope(scripts, loaders, Collections.singleton(JavaScriptLoader.JS)); IClassHierarchy cha = ClassHierarchyFactory.make(scope, loaders, JavaScriptLoader.JS); com.ibm.wala.cast.util.Util.checkForFrontEndErrors(cha); printIRsForCHA(cha, t -> t.startsWith("Lprologue.js") || t.startsWith("Lpreamble.js")); } public static void main(String[] args) throws IOException, IllegalArgumentException, WalaException, Error { String filename = args[0]; if (filename.endsWith(".js")) { printIRsForJS(filename); } else if (filename.endsWith(".html")) { printIRsForHTML(filename); } } } WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/000077500000000000000000000000001342410422700274575ustar00rootroot00000000000000TestAjaxsltCallGraphShapeRhino.java000066400000000000000000000017601342410422700362540ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.js.test; import org.junit.Before; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; public class TestAjaxsltCallGraphShapeRhino extends TestAjaxsltCallGraphShape { public static void main(String[] args) { justThisTest(TestAjaxsltCallGraphShapeRhino.class); } @Override @Before public void setUp() { com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); } } TestArgumentSensitivityRhino.java000066400000000000000000000016411342410422700361420ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.test; import org.junit.Before; import com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; public class TestArgumentSensitivityRhino extends TestArgumentSensitivity { @Override @Before public void setUp() { JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); } } WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/TestCPA.java000066400000000000000000000033631342410422700315720ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2007 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.test; import java.io.IOException; import org.junit.Before; import org.junit.Test; import com.ibm.wala.cast.ipa.callgraph.CAstCallGraphUtil; import com.ibm.wala.cast.js.ipa.callgraph.JSCFABuilder; import com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.propagation.CPAContextSelector; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.WalaException; public class TestCPA { @Before public void setUp() { com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); } @SuppressWarnings("static-access") @Test public void testCPA() throws IOException, IllegalArgumentException, CancelException, WalaException { JSCFABuilder builder = JSCallGraphBuilderUtil.makeScriptCGBuilder("tests", "cpa.js"); builder.setContextSelector(new CPAContextSelector(builder.getContextSelector())); CallGraph CG = builder.makeCallGraph(builder.getOptions()); JSCallGraphUtil.AVOID_DUMP = false; CAstCallGraphUtil.dumpCG(builder.getCFAContextInterpreter(), builder.getPointerAnalysis(), CG); } } TestCorrelatedPairExtractionRhino.java000066400000000000000000000030521342410422700370440ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/******************************************************************************* * Copyright (c) 2011 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.test; import java.io.IOException; import com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error; import com.ibm.wala.cast.js.ipa.callgraph.correlations.CorrelationFinder; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.cast.js.translator.RhinoToAstTranslator; import com.ibm.wala.cast.tree.CAstEntity; import com.ibm.wala.cast.tree.impl.CAstImpl; import com.ibm.wala.classLoader.SourceModule; public class TestCorrelatedPairExtractionRhino extends TestCorrelatedPairExtraction { @Override protected CorrelationFinder makeCorrelationFinder() { return new CorrelationFinder(new CAstRhinoTranslatorFactory()); } @Override protected CAstEntity parseJS(CAstImpl ast, SourceModule module) throws IOException { RhinoToAstTranslator translator = new RhinoToAstTranslator(ast, module, module.getName(), false); CAstEntity entity = null; try { entity = translator.translateToCAst(); } catch (Error e) { e.printStackTrace(); assert false; } return entity; } } TestForInBodyExtractionRhino.java000066400000000000000000000024111342410422700357750ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/******************************************************************************* * Copyright (c) 2011 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.test; import java.io.IOException; import com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error; import com.ibm.wala.cast.js.translator.RhinoToAstTranslator; import com.ibm.wala.cast.tree.CAstEntity; import com.ibm.wala.cast.tree.impl.CAstImpl; import com.ibm.wala.classLoader.SourceModule; public class TestForInBodyExtractionRhino extends TestForInBodyExtraction { @Override protected CAstEntity parseJS(CAstImpl ast, SourceModule module) throws IOException { RhinoToAstTranslator translator = new RhinoToAstTranslator(ast, module, module.getName(), false); CAstEntity entity = null; try { entity = translator.translateToCAst(); } catch (Error e) { e.printStackTrace(); assert false; } return entity; } } TestForInLoopHackRhino.java000066400000000000000000000015721342410422700345460ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.test; import org.junit.Before; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; public class TestForInLoopHackRhino extends TestForInLoopHack { @Override @Before public void setUp() { com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); } } TestJQueryExamplesRhino.java000066400000000000000000000017701342410422700350260ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.test; import org.junit.Before; import com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; public class TestJQueryExamplesRhino extends TestJQueryExamples { public static void main(String[] args) { justThisTest(TestJQueryExamplesRhino.class); } @Override @Before public void setUp() { JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); } } TestJavaScriptSlicerRhino.java000066400000000000000000000007201342410422700353120ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/testpackage com.ibm.wala.cast.js.test; import org.junit.Before; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; public class TestJavaScriptSlicerRhino extends TestJavaScriptSlicer { public static void main(String[] args) { justThisTest(TestJavaScriptSlicerRhino.class); } @Override @Before public void setUp() { com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); } } TestLexicalModRefRhino.java000066400000000000000000000015501342410422700345620ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/******************************************************************************* * Copyright (c) 2008 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.test; import org.junit.Before; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; public class TestLexicalModRefRhino extends TestLexicalModRef { @Before public void setUp() { com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); } } TestMediawikiCallGraphShapeRhino.java000066400000000000000000000017701342410422700365520ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.js.test; import org.junit.Before; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; public class TestMediawikiCallGraphShapeRhino extends TestMediawikiCallGraphShape { public static void main(String[] args) { justThisTest(TestMediawikiCallGraphShapeRhino.class); } @Override @Before public void setUp() { com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); } } TestPrototypeCallGraphShapeRhino.java000066400000000000000000000017701342410422700366540ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.js.test; import org.junit.Before; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; public class TestPrototypeCallGraphShapeRhino extends TestPrototypeCallGraphShape { public static void main(String[] args) { justThisTest(TestPrototypeCallGraphShapeRhino.class); } @Override @Before public void setUp() { com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); } } TestRhinoSourceMap.java000066400000000000000000000173671342410422700340170ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.test; import static com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.makeHierarchy; import static com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.makeLoaders; import static com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory; import static com.ibm.wala.cast.js.test.JSCallGraphBuilderUtil.makeScriptScope; import java.io.IOException; import java.util.Map; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import com.ibm.wala.cast.js.loader.JavaScriptLoaderFactory; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.cast.loader.AstMethod; import com.ibm.wala.cast.types.AstMethodReference; import com.ibm.wala.cast.util.SourceBuffer; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.ipa.callgraph.AnalysisScope; import com.ibm.wala.ipa.cha.ClassHierarchyException; import com.ibm.wala.ipa.cha.IClassHierarchy; import com.ibm.wala.util.collections.HashMapFactory; public class TestRhinoSourceMap { @Before public void setUp() { setTranslatorFactory(new CAstRhinoTranslatorFactory()); } private static final String[][] jquery_spec_testSource = new String[][]{ new String[]{ "Ltests/jquery_spec_test.js/anonymous__0/isEmptyDataObject", "function isEmptyDataObject(obj) {\n" + " for (var name in obj) {\n" + " if (name !== \"toJSON\") {\n" + " return false;\n" + " }\n" + " }\n" + " return true;\n" + " }" }, new String[]{ "Ltests/jquery_spec_test.js/anonymous__0/anonymous__59/anonymous__62/anonymous__63/anonymous__64/anonymous__65", "function anonymous__65() {\n" + " returned = fn.apply(this, arguments);\n" + " if (returned && jQuery.isFunction(returned.promise)) {\n" + " returned.promise().then(newDefer.resolve, newDefer.reject);\n" + " } else {\n" + " newDefer[action](returned);\n" + " }\n" + " }" }, new String[]{ "Ltests/jquery_spec_test.js/anonymous__0/anonymous__386/anonymous__392", "function anonymous__392(map) {\n" + " if (map) {\n" + " var tmp;\n" + " if (state < 2) {\n" + " for (tmp in map) {\n" + " statusCode[tmp] = [ statusCode[tmp], map[tmp] ];\n" + " }\n" + " } else {\n" + " tmp = map[jqXHR.status];\n" + " jqXHR.then(tmp, tmp);\n" + " }\n" + " }\n" + " return this;\n" + " }" }, new String[]{ "Ltests/jquery_spec_test.js/anonymous__0/getWindow", "function getWindow(elem) {\n" + " return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false;\n" + " }" }, new String[]{ "Ltests/jquery_spec_test.js/anonymous__0/anonymous__1/anonymous__7", "function anonymous__7(elems, name, selector) {\n" + " var ret = this.constructor();\n" + " if (jQuery.isArray(elems)) {\n" + " push.apply(ret, elems);\n" + " } else {\n" + " jQuery.merge(ret, elems);\n" + " }\n" + " ret.prevObject = this;\n" + " ret.context = this.context;\n" + " if (name === \"find\") {\n" + " ret.selector = this.selector + (this.selector ? \" \" : \"\") + selector;\n" + " } else if (name) {\n" + " ret.selector = this.selector + \".\" + name + \"(\" + selector + \")\";\n" + " }\n" + " return ret;\n" + " }" }, new String[]{ "Ltests/jquery_spec_test.js/anonymous__0/anonymous__1/anonymous__17", "function anonymous__17() {\n" + " var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false;\n" + " if (typeof target === \"boolean\") {\n" + " deep = target;\n" + " target = arguments[1] || {};\n" + " i = 2;\n" + " }\n" + " if (typeof target !== \"object\" && !jQuery.isFunction(target)) {\n" + " target = {};\n" + " }\n" + " if (length === i) {\n" + " target = this;\n" + " --i;\n" + " }\n" + " for (; i < length; i++) {\n" + " if ((options = arguments[i]) != null) {\n" + " for (name in options) {\n" + " (function _forin_body_extra_1(name) { var src = target[name];\n" + " var copy = options[name];\n" + " if (target === copy) {\n" + " return; //continue;\n" + " }\n" + " if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {\n" + " if (copyIsArray) {\n" + " copyIsArray = false;\n" + " clone = src && jQuery.isArray(src) ? src : [];\n" + " } else {\n" + " clone = src && jQuery.isPlainObject(src) ? src : {};\n" + " }\n" + " target[name] = jQuery.extend(deep, clone, copy);\n" + " } else if (copy !== undefined) {\n" + " target[name] = copy;\n" + " } })(name);\n" + " }\n" + " }\n" + " }\n" + " return target;\n" + " }"} }; @Test public void testJquerySpecTestSourceMappings() throws IllegalArgumentException, IOException, ClassHierarchyException { checkFunctionBodies("jquery_spec_test.js", jquery_spec_testSource); } private static void checkFunctionBodies(String fileName, String[][] assertions) throws IOException, ClassHierarchyException { Map sources = HashMapFactory.make(); for(String[] assertion : assertions) { sources.put(assertion[0], assertion[1]); } JavaScriptLoaderFactory loaders = makeLoaders(null); AnalysisScope scope = makeScriptScope("tests", fileName, loaders); IClassHierarchy cha = makeHierarchy(scope, loaders); for(IClass cls : cha) { if (cls.getName().toString().contains(fileName)) { AstMethod fun = (AstMethod)cls.getMethod(AstMethodReference.fnSelector); //System.err.println(fun.getDeclaringClass().getName() + " " + fun.getSourcePosition()); SourceBuffer sb = new SourceBuffer(fun.getSourcePosition()); //System.err.println(sb); if (sources.containsKey(fun.getDeclaringClass().getName().toString())) { System.err.println("checking source of " + fun.getDeclaringClass().getName() + " at " + fun.getSourcePosition()); Assert.assertEquals(sources.get(fun.getDeclaringClass().getName().toString()), sb.toString()); } } } } } TestSimpleCallGraphShapeRhino.java000066400000000000000000000065741342410422700361070ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.js.test; import java.io.IOException; import org.junit.Before; import org.junit.Test; import com.ibm.wala.cast.js.ipa.callgraph.JSCFABuilder; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.WalaException; public class TestSimpleCallGraphShapeRhino extends TestSimpleCallGraphShape { public static void main(String[] args) { justThisTest(TestSimpleCallGraphShapeRhino.class); } @Override @Before public void setUp() { com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); } @Test public void test214631() throws IOException, IllegalArgumentException, CancelException, WalaException { JSCFABuilder b = JSCallGraphBuilderUtil.makeScriptCGBuilder("tests", "214631.js"); b.makeCallGraph(b.getOptions()); b.getPointerAnalysis(); // just make sure this does not crash } @Test public void testRewriterDoesNotChangeLabelsBug() throws IOException, IllegalArgumentException, CancelException, WalaException { JSCallGraphBuilderUtil.makeScriptCG("tests", "rewrite_does_not_change_lables_bug.js"); // all we need is for it to finish building CG successfully. } @Test public void testRepr() throws IllegalArgumentException, IOException, CancelException, WalaException { JSCallGraphBuilderUtil.makeScriptCG("tests", "repr.js"); } @Test public void testTranslateToCAstCrash1() throws IllegalArgumentException, IOException, CancelException, WalaException { JSCallGraphBuilderUtil.makeScriptCG("tests", "rhino_crash1.js"); } @Test public void testTranslateToCAstCrash2() throws IllegalArgumentException, IOException, CancelException, WalaException { JSCallGraphBuilderUtil.makeScriptCG("tests", "rhino_crash2.js"); } @Test public void testTranslateToCAstCrash3() throws IllegalArgumentException, IOException, CancelException, WalaException { JSCallGraphBuilderUtil.makeScriptCG("tests", "rhino_crash3.js"); } @Test public void testNonLoopBreakLabel() throws IllegalArgumentException, IOException, CancelException, WalaException { JSCallGraphBuilderUtil.makeScriptCG("tests", "non_loop_break.js"); } @Test public void testForInName() throws IllegalArgumentException, IOException, CancelException, WalaException { JSCallGraphBuilderUtil.makeScriptCG("tests", "for_in_name.js"); } @Test(expected = WalaException.class) public void testParseError() throws IllegalArgumentException, IOException, CancelException, WalaException { PropagationCallGraphBuilder B = JSCallGraphBuilderUtil.makeScriptCGBuilder("tests", "portal-example-simple.html"); B.makeCallGraph(B.getOptions()); com.ibm.wala.cast.util.Util.checkForFrontEndErrors(B.getClassHierarchy()); } } TestSimplePageCallGraphShapeRhino.java000066400000000000000000000051271342410422700366750ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.js.test; import java.net.URL; import org.junit.Before; import org.junit.Test; import com.ibm.wala.cast.js.html.DefaultSourceExtractor; import com.ibm.wala.cast.js.html.IHtmlParser; import com.ibm.wala.cast.js.html.JSSourceExtractor; import com.ibm.wala.cast.js.html.WebUtil; import com.ibm.wala.cast.js.ipa.callgraph.JSCFABuilder; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.WalaException; public abstract class TestSimplePageCallGraphShapeRhino extends TestSimplePageCallGraphShape { private static final Object[][] assertionsForPage3 = new Object[][] { new Object[] { ROOT, new String[] { "page3.html" } }, new Object[] { "page3.html", new String[] { "page3.html/__WINDOW_MAIN__" } } }; @Test public void testPage3() throws IllegalArgumentException, CancelException, WalaException { URL url = getClass().getClassLoader().getResource("pages/page3.html"); CallGraph CG = JSCallGraphBuilderUtil.makeHTMLCG(url, DefaultSourceExtractor.factory); verifyGraphAssertions(CG, assertionsForPage3); } @Test(expected = WalaException.class) public void testJSParseError() throws IllegalArgumentException, CancelException, WalaException { URL url = getClass().getClassLoader().getResource("pages/garbage2.html"); JSCFABuilder B = JSCallGraphBuilderUtil.makeHTMLCGBuilder(url, DefaultSourceExtractor.factory); B.makeCallGraph(B.getOptions()); com.ibm.wala.cast.util.Util.checkForFrontEndErrors(B.getClassHierarchy()); } public static void main(String[] args) { justThisTest(TestSimplePageCallGraphShapeRhino.class); } @Override protected abstract IHtmlParser getParser(); @Override @Before public void setUp() { com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); WebUtil.setFactory(TestSimplePageCallGraphShapeRhino.this::getParser); JSSourceExtractor.USE_TEMP_NAME = false; // JSSourceExtractor.DELETE_UPON_EXIT = false; } } TestSimplePageCallGraphShapeRhinoJericho.java000066400000000000000000000036271342410422700402040ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.test; import java.net.URL; import org.junit.Test; import com.ibm.wala.cast.js.html.DefaultSourceExtractor; import com.ibm.wala.cast.js.html.IHtmlParser; import com.ibm.wala.cast.js.html.jericho.JerichoHtmlParser; import com.ibm.wala.cast.js.ipa.callgraph.JSCFABuilder; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.WalaException; public class TestSimplePageCallGraphShapeRhinoJericho extends TestSimplePageCallGraphShapeRhino { @Test public void testCrawl() throws IllegalArgumentException, CancelException, WalaException { URL url = getClass().getClassLoader().getResource("pages/crawl.html"); CallGraph CG = JSCallGraphBuilderUtil.makeHTMLCG(url, DefaultSourceExtractor.factory); verifyGraphAssertions(CG, null); } @Test public void testParseError() throws IllegalArgumentException, CancelException, WalaException { URL url = getClass().getClassLoader().getResource("pages/garbage.html"); JSCFABuilder B = JSCallGraphBuilderUtil.makeHTMLCGBuilder(url, DefaultSourceExtractor.factory); B.makeCallGraph(B.getOptions()); com.ibm.wala.cast.util.Util.checkForFrontEndErrors(B.getClassHierarchy()); } public static void main(String[] args) { justThisTest(TestSimplePageCallGraphShapeRhinoJericho.class); } @Override protected IHtmlParser getParser() { return new JerichoHtmlParser(); } } WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/vis/000077500000000000000000000000001342410422700273015ustar00rootroot00000000000000JsViewerDriver.java000066400000000000000000000065311342410422700330040ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/vis/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.vis; import java.io.IOException; import java.net.URL; import java.util.Set; import com.ibm.wala.cast.ir.ssa.AstIRFactory; import com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error; import com.ibm.wala.cast.js.html.DefaultSourceExtractor; import com.ibm.wala.cast.js.html.DomLessSourceExtractor; import com.ibm.wala.cast.js.html.IdentityUrlResolver; import com.ibm.wala.cast.js.html.JSSourceExtractor; import com.ibm.wala.cast.js.html.MappedSourceModule; import com.ibm.wala.cast.js.html.WebPageLoaderFactory; import com.ibm.wala.cast.js.html.WebUtil; import com.ibm.wala.cast.js.html.jericho.JerichoHtmlParser; import com.ibm.wala.cast.js.ipa.callgraph.JSCFABuilder; import com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil; import com.ibm.wala.cast.js.loader.JavaScriptLoader; import com.ibm.wala.cast.js.test.JSCallGraphBuilderUtil; import com.ibm.wala.cast.js.translator.CAstRhinoTranslatorFactory; import com.ibm.wala.classLoader.SourceFileModule; import com.ibm.wala.classLoader.SourceModule; import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.propagation.InstanceKey; import com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis; import com.ibm.wala.ipa.cha.ClassHierarchyException; import com.ibm.wala.util.CancelException; import com.ibm.wala.util.WalaException; public class JsViewerDriver extends JSCallGraphBuilderUtil { public static void main(String args[]) throws ClassHierarchyException, IllegalArgumentException, IOException, CancelException, Error, WalaException { if (args.length != 1){ System.out.println("Usage: "); System.exit(1); } boolean domless = false; URL url = new URL(args[0]); // computing CG + PA JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory()); JavaScriptLoader.addBootstrapFile(WebUtil.preamble); SourceModule[] sources = getSources(domless, url); JSCFABuilder builder = makeCGBuilder(new WebPageLoaderFactory(translatorFactory), sources, CGBuilderType.ZERO_ONE_CFA, AstIRFactory.makeDefaultFactory()); builder.setBaseURL(url); CallGraph cg = builder.makeCallGraph(builder.getOptions()); PointerAnalysis pa = builder.getPointerAnalysis(); @SuppressWarnings("unused") JsViewer jsViewer = new JsViewer(cg, pa); } private static SourceModule[] getSources(boolean domless, URL url) throws IOException, Error { JSSourceExtractor sourceExtractor; if (domless ){ sourceExtractor = new DomLessSourceExtractor(); } else { sourceExtractor = new DefaultSourceExtractor(); } Set sourcesMap = sourceExtractor.extractSources(url, new JerichoHtmlParser(), new IdentityUrlResolver()); SourceModule[] sources = new SourceFileModule[sourcesMap.size()]; int i = 0; for (SourceModule m : sourcesMap){ sources[i++] = m; } return sources; } } WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/launchers/000077500000000000000000000000001342410422700224155ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/launchers/JsViewerDriver.launch000066400000000000000000000020241342410422700265210ustar00rootroot00000000000000 WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/launchers/TestForInLoopHackRhino.launch000066400000000000000000000022631342410422700301120ustar00rootroot00000000000000 WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/launchers/TestMozillaBugPagesRhino.launch000066400000000000000000000031201342410422700304720ustar00rootroot00000000000000 WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/launchers/com.ibm.wala.cast.js.rhino.test-JUnit.launch000066400000000000000000000055301342410422700325520ustar00rootroot00000000000000 WALA-R_1.5.1/com.ibm.wala.cast.js.rhino.test/pom.xml000066400000000000000000000032341342410422700217500ustar00rootroot00000000000000 4.0.0 com.ibm.wala WALA 1.5.1 com.ibm.wala.cast.js.rhino.test eclipse-plugin org.apache.maven.plugins maven-surefire-plugin test test ${project.build.outputDirectory} -Xmx800M -ea true 2 false ${basedir}/../com.ibm.wala.cast.js.test.data/examples-src test junit junit 4.12 test WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/000077500000000000000000000000001342410422700174535ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/.settings/000077500000000000000000000000001342410422700213715ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/.settings/org.eclipse.jdt.core.prefs000066400000000000000000000751471342410422700263710ustar00rootroot00000000000000eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=error org.eclipse.jdt.core.compiler.problem.comparingIdentical=error org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=error org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=warning org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=error org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=error org.eclipse.jdt.core.compiler.problem.finalParameterBound=error org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=error org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=error org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=error org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=error org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=error org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=error org.eclipse.jdt.core.compiler.problem.rawTypeReference=error org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=error org.eclipse.jdt.core.compiler.problem.unusedLocal=error org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error org.eclipse.jdt.core.compiler.problem.unusedParameter=error org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=132 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/.settings/org.eclipse.jdt.ui.prefs000066400000000000000000000177701342410422700260540ustar00rootroot00000000000000#Tue Dec 02 13:34:58 EST 2008 cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true cleanup.add_missing_deprecated_annotations=true cleanup.add_missing_methods=false cleanup.add_missing_nls_tags=false cleanup.add_missing_override_annotations=true cleanup.add_serial_version_id=false cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=false cleanup.always_use_this_for_non_static_method_access=false cleanup.convert_to_enhanced_for_loop=false cleanup.correct_indentation=false cleanup.format_source_code=false cleanup.format_source_code_changes_only=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=false cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true cleanup.organize_imports=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false cleanup.remove_private_constructors=true cleanup.remove_trailing_whitespaces=false cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true cleanup.remove_unused_local_variables=false cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true cleanup.sort_members=false cleanup.sort_members_all=false cleanup.use_blocks=false cleanup.use_blocks_only_for_return_and_throw=false cleanup.use_parentheses_in_expressions=false cleanup.use_this_for_non_static_field_access=false cleanup.use_this_for_non_static_field_access_only_if_necessary=true cleanup.use_this_for_non_static_method_access=false cleanup.use_this_for_non_static_method_access_only_if_necessary=true cleanup_profile=org.eclipse.jdt.ui.default.eclipse_clean_up_profile cleanup_settings_version=2 eclipse.preferences.version=1 formatter_profile=_WALA formatter_settings_version=11 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.ui.text.custom_code_templates= WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/.settings/org.eclipse.pde.prefs000066400000000000000000000020161342410422700254120ustar00rootroot00000000000000compilers.f.unresolved-features=0 compilers.f.unresolved-plugins=0 compilers.incompatible-environment=0 compilers.p.build=0 compilers.p.build.bin.includes=0 compilers.p.build.encodings=0 compilers.p.build.java.compiler=0 compilers.p.build.java.compliance=0 compilers.p.build.missing.output=0 compilers.p.build.output.library=0 compilers.p.build.source.library=0 compilers.p.build.src.includes=0 compilers.p.deprecated=0 compilers.p.discouraged-class=0 compilers.p.internal=0 compilers.p.missing-packages=0 compilers.p.missing-version-export-package=2 compilers.p.missing-version-import-package=2 compilers.p.missing-version-require-bundle=2 compilers.p.no-required-att=0 compilers.p.not-externalized-att=0 compilers.p.unknown-attribute=0 compilers.p.unknown-class=0 compilers.p.unknown-element=0 compilers.p.unknown-identifier=0 compilers.p.unknown-resource=0 compilers.p.unresolved-ex-points=0 compilers.p.unresolved-import=0 compilers.s.create-docs=false compilers.s.doc-folder=doc compilers.s.open-tags=0 eclipse.preferences.version=1 WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/.settings/org.eclipse.wst.validation.prefs000066400000000000000000000021021342410422700276040ustar00rootroot00000000000000DELEGATES_PREFERENCE=delegateValidatorList USER_BUILD_PREFERENCE=enabledBuildValidatorList USER_MANUAL_PREFERENCE=enabledManualValidatorList USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201610061600 eclipse.preferences.version=1 override=true suspend=false vals/org.eclipse.wst.html.core.HTMLValidator/groups=0107include06111contentType136org.eclipse.wst.html.core.htmlsourceT07fileext04htmlF07fileext05xhtmlF07fileext03htmF07fileext04htplF07fileext03wmlF0107exclude0104file139target/site/dependency-convergence.htmlT03 vals/org.eclipse.wst.xml.core.xml/groups=0107include05111contentType128org.eclipse.core.runtime.xmlT111contentType134org.eclipse.wst.xml.core.xmlsourceT111contentType134org.eclipse.wst.xml.core.xslsourceT111contentType134org.eclipse.jst.jsp.core.tldsourceT07fileext03xmlF0107exclude07113projectNature134org.eclipse.jst.j2ee.ejb.EJBNature113projectNature130org.eclipse.jst.j2ee.EARNature04file08.projectT0104file110.classpathT0104file110.settings/T0204file122target/p2artifacts.xmlT0304file120target/p2content.xmlT03 vf.version=3 WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/META-INF/000077500000000000000000000000001342410422700206135ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/META-INF/MANIFEST.MF000066400000000000000000000023521342410422700222470ustar00rootroot00000000000000Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.ibm.wala.cast.js.rhino Bundle-Version: 1.5.1 Bundle-Vendor: %Bundle-Vendor Require-Bundle: com.ibm.wala.cast;bundle-version="1.5.1", com.ibm.wala.cast.js;bundle-version="1.5.1", com.ibm.wala.core;bundle-version="1.5.1", com.ibm.wala.util;bundle-version="1.5.1" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Export-Package: com.ibm.wala.cast.js.translator, org.mozilla.classfile, org.mozilla.javascript, org.mozilla.javascript.annotations, org.mozilla.javascript.ast, org.mozilla.javascript.commonjs.module, org.mozilla.javascript.commonjs.module.provider, org.mozilla.javascript.debug, org.mozilla.javascript.jdk13, org.mozilla.javascript.jdk15, org.mozilla.javascript.json, org.mozilla.javascript.optimizer, org.mozilla.javascript.regexp, org.mozilla.javascript.serialize, org.mozilla.javascript.tools, org.mozilla.javascript.tools.debugger, org.mozilla.javascript.tools.debugger.treetable, org.mozilla.javascript.tools.idswitch, org.mozilla.javascript.tools.jsc, org.mozilla.javascript.tools.shell, org.mozilla.javascript.xml, org.mozilla.javascript.xmlimpl Bundle-ClassPath: ., lib/rhino-1.7.10.jar WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/OSGI-INF/000077500000000000000000000000001342410422700206265ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/OSGI-INF/l10n/000077500000000000000000000000001342410422700214005ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/OSGI-INF/l10n/bundle.properties000066400000000000000000000001371342410422700247700ustar00rootroot00000000000000#Properties file for com.ibm.wala.cast.js.rhino Bundle-Vendor = IBM Bundle-Name = Rhino Plug-inWALA-R_1.5.1/com.ibm.wala.cast.js.rhino/build.gradle000066400000000000000000000003571342410422700217370ustar00rootroot00000000000000sourceSets.main.java.srcDirs = ['source'] dependencies { compile( 'org.mozilla:rhino:1.7.10', project(':com.ibm.wala.cast'), project(':com.ibm.wala.cast.js'), project(':com.ibm.wala.core'), project(':com.ibm.wala.util'), ) } WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/build.properties000066400000000000000000000004111342410422700226640ustar00rootroot00000000000000source.. = source/ output.. = bin/ bin.includes = META-INF/,\ .,\ lib/rhino-1.7.10.jar,\ OSGI-INF/l10n/bundle.properties,\ OSGI-INF/ jars.extra.classpath = lib/rhino-1.7.10.jar javacProjectSettings = true WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/mvncentral.xml000066400000000000000000000112511342410422700223460ustar00rootroot00000000000000 4.0.0 com.ibm.wala com.ibm.wala.cast.js.rhino 1.5.1 jar WALA CAst JS Rhino WALA JS Rhino adapter http://wala.sourceforge.net Eclipse Public License, Version 1.0 https://www.eclipse.org/legal/epl-v10.html Manu Sridharan m.sridharan@samsung.com Samsung Research America http://www.sisa.samsung.com/ scm:git:git@github.com:wala/WALA.git scm:git:git@github.com:example/example-application.git git@github.com:example/example-application.git source ossrh https://oss.sonatype.org/content/repositories/snapshots com.ibm.wala com.ibm.wala.util 1.5.1 com.ibm.wala com.ibm.wala.core 1.5.1 com.ibm.wala com.ibm.wala.cast 1.5.1 com.ibm.wala com.ibm.wala.cast.js 1.5.1 org.mozilla rhino 1.7.6 sonatype-snapshots https://oss.sonatype.org/content/repositories/snapshots/ jdk18 1.8 -Xdoclint:none ${src.dir} org.apache.maven.plugins maven-compiler-plugin 3.2 1.8 1.8 org.sonatype.plugins nexus-staging-maven-plugin 1.6.3 true ossrh https://oss.sonatype.org/ true org.apache.maven.plugins maven-source-plugin 2.2.1 attach-sources jar-no-fork org.apache.maven.plugins maven-javadoc-plugin ${javadoc.options} 2.9.1 attach-javadocs jar org.apache.maven.plugins maven-gpg-plugin 1.5 sign-artifacts verify sign WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/pom.xml000066400000000000000000000034111342410422700207670ustar00rootroot00000000000000 4.0.0 WALA com.ibm.wala 1.5.1 com.ibm.wala.cast.js.rhino eclipse-plugin maven-dependency-plugin copy org.mozilla rhino 1.7.10 jar false ${basedir}/lib WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/000077500000000000000000000000001342410422700207535ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/com/000077500000000000000000000000001342410422700215315ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/com/ibm/000077500000000000000000000000001342410422700223005ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/com/ibm/wala/000077500000000000000000000000001342410422700232245ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/com/ibm/wala/cast/000077500000000000000000000000001342410422700241565ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/com/ibm/wala/cast/js/000077500000000000000000000000001342410422700245725ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/com/ibm/wala/cast/js/translator/000077500000000000000000000000001342410422700267635ustar00rootroot00000000000000CAstRhinoLoopUnwindingTranslatorFactory.java000066400000000000000000000021551342410422700375230ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/com/ibm/wala/cast/js/translator/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.translator; import com.ibm.wala.cast.ir.translator.TranslatorToCAst; import com.ibm.wala.cast.tree.CAst; import com.ibm.wala.classLoader.SourceModule; public class CAstRhinoLoopUnwindingTranslatorFactory extends JavaScriptLoopUnwindingTranslatorFactory { public CAstRhinoLoopUnwindingTranslatorFactory(int unwindFactor) { super(unwindFactor); } public CAstRhinoLoopUnwindingTranslatorFactory() { this(3); } @Override protected TranslatorToCAst translateInternal(CAst Ast, SourceModule M, String N) { return new CAstRhinoTranslator(M, true); } } CAstRhinoTranslator.java000066400000000000000000000017171342410422700334610ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/com/ibm/wala/cast/js/translator/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.js.translator; import com.ibm.wala.cast.ir.translator.RewritingTranslatorToCAst; import com.ibm.wala.cast.tree.impl.CAstImpl; import com.ibm.wala.classLoader.ModuleEntry; public class CAstRhinoTranslator extends RewritingTranslatorToCAst { public CAstRhinoTranslator(ModuleEntry m, boolean replicateForDoLoops) { super(m, new RhinoToAstTranslator(new CAstImpl(), m, m.getName(), replicateForDoLoops)); } } CAstRhinoTranslatorFactory.java000066400000000000000000000016121342410422700350030ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/com/ibm/wala/cast/js/translator/******************************************************************************* * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.cast.js.translator; import com.ibm.wala.cast.ir.translator.TranslatorToCAst; import com.ibm.wala.cast.tree.CAst; import com.ibm.wala.classLoader.ModuleEntry; public class CAstRhinoTranslatorFactory implements JavaScriptTranslatorFactory { @Override public TranslatorToCAst make(CAst ast, ModuleEntry M) { return new CAstRhinoTranslator(M, false); } } RhinoToAstTranslator.java000066400000000000000000002453441342410422700336670ustar00rootroot00000000000000WALA-R_1.5.1/com.ibm.wala.cast.js.rhino/source/com/ibm/wala/cast/js/translator/****************************************************************************** * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *****************************************************************************/ package com.ibm.wala.cast.js.translator; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.net.URL; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.mozilla.javascript.CompilerEnvirons; import org.mozilla.javascript.ErrorReporter; import org.mozilla.javascript.EvaluatorException; import org.mozilla.javascript.Node; import org.mozilla.javascript.Parser; import org.mozilla.javascript.Token; import org.mozilla.javascript.ast.ArrayComprehension; import org.mozilla.javascript.ast.ArrayComprehensionLoop; import org.mozilla.javascript.ast.ArrayLiteral; import org.mozilla.javascript.ast.Assignment; import org.mozilla.javascript.ast.AstNode; import org.mozilla.javascript.ast.AstRoot; import org.mozilla.javascript.ast.Block; import org.mozilla.javascript.ast.BreakStatement; import org.mozilla.javascript.ast.CatchClause; import org.mozilla.javascript.ast.Comment; import org.mozilla.javascript.ast.ConditionalExpression; import org.mozilla.javascript.ast.ContinueStatement; import org.mozilla.javascript.ast.DoLoop; import org.mozilla.javascript.ast.ElementGet; import org.mozilla.javascript.ast.EmptyExpression; import org.mozilla.javascript.ast.EmptyStatement; import org.mozilla.javascript.ast.ErrorNode; import org.mozilla.javascript.ast.ExpressionStatement; import org.mozilla.javascript.ast.ForInLoop; import org.mozilla.javascript.ast.ForLoop; import org.mozilla.javascript.ast.FunctionCall; import org.mozilla.javascript.ast.FunctionNode; import org.mozilla.javascript.ast.IfStatement; import org.mozilla.javascript.ast.InfixExpression; import org.mozilla.javascript.ast.Jump; import org.mozilla.javascript.ast.KeywordLiteral; import org.mozilla.javascript.ast.Label; import org.mozilla.javascript.ast.LabeledStatement; import org.mozilla.javascript.ast.LetNode; import org.mozilla.javascript.ast.Name; import org.mozilla.javascript.ast.NewExpression; import org.mozilla.javascript.ast.NumberLiteral; import org.mozilla.javascript.ast.ObjectLiteral; import org.mozilla.javascript.ast.ObjectProperty; import org.mozilla.javascript.ast.ParenthesizedExpression; import org.mozilla.javascript.ast.PropertyGet; import org.mozilla.javascript.ast.RegExpLiteral; import org.mozilla.javascript.ast.ReturnStatement; import org.mozilla.javascript.ast.Scope; import org.mozilla.javascript.ast.ScriptNode; import org.mozilla.javascript.ast.StringLiteral; import org.mozilla.javascript.ast.SwitchCase; import org.mozilla.javascript.ast.SwitchStatement; import org.mozilla.javascript.ast.Symbol; import org.mozilla.javascript.ast.ThrowStatement; import org.mozilla.javascript.ast.TryStatement; import org.mozilla.javascript.ast.UnaryExpression; import org.mozilla.javascript.ast.VariableDeclaration; import org.mozilla.javascript.ast.VariableInitializer; import org.mozilla.javascript.ast.WhileLoop; import org.mozilla.javascript.ast.WithStatement; import org.mozilla.javascript.ast.XmlDotQuery; import org.mozilla.javascript.ast.XmlElemRef; import org.mozilla.javascript.ast.XmlExpression; import org.mozilla.javascript.ast.XmlFragment; import org.mozilla.javascript.ast.XmlLiteral; import org.mozilla.javascript.ast.XmlMemberGet; import org.mozilla.javascript.ast.XmlPropRef; import org.mozilla.javascript.ast.XmlRef; import org.mozilla.javascript.ast.XmlString; import org.mozilla.javascript.ast.Yield; import com.ibm.wala.cast.ir.translator.TranslatorToCAst; import com.ibm.wala.cast.js.html.MappedSourceModule; import com.ibm.wala.cast.js.ipa.callgraph.JSSSAPropagationCallGraphBuilder; import com.ibm.wala.cast.js.loader.JavaScriptLoader; import com.ibm.wala.cast.js.types.JavaScriptTypes; import com.ibm.wala.cast.tree.CAst; import com.ibm.wala.cast.tree.CAstAnnotation; import com.ibm.wala.cast.tree.CAstControlFlowMap; import com.ibm.wala.cast.tree.CAstEntity; import com.ibm.wala.cast.tree.CAstNode; import com.ibm.wala.cast.tree.CAstNodeTypeMap; import com.ibm.wala.cast.tree.CAstQualifier; import com.ibm.wala.cast.tree.CAstSourcePositionMap; import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position; import com.ibm.wala.cast.tree.CAstType; import com.ibm.wala.cast.tree.impl.CAstOperator; import com.ibm.wala.cast.tree.impl.CAstSymbolImpl; import com.ibm.wala.cast.tree.impl.RangePosition; import com.ibm.wala.cast.tree.rewrite.CAstRewriter.CopyKey; import com.ibm.wala.cast.tree.rewrite.CAstRewriter.RewriteContext; import com.ibm.wala.cast.tree.rewrite.CAstRewriterFactory; import com.ibm.wala.cast.tree.visit.CAstVisitor; import com.ibm.wala.cast.util.CAstPattern; import com.ibm.wala.classLoader.ModuleEntry; import com.ibm.wala.classLoader.SourceModule; import com.ibm.wala.util.collections.EmptyIterator; import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.collections.HashSetFactory; import com.ibm.wala.util.debug.Assertions; import com.ibm.wala.util.warnings.Warning; public class RhinoToAstTranslator implements TranslatorToCAst { /** * a dummy name to use for standard function calls, only used to distinguish * them from constructor calls */ public static final String STANDARD_CALL_FN_NAME = "do"; /** * name used for constructor calls, used to distinguish them from standard * function calls */ public static final String CTOR_CALL_FN_NAME = "ctor"; private final boolean DEBUG = false; /** * shared interface for all objects storing contextual information during the * Rhino AST traversal * */ private interface WalkContext extends JavaScriptTranslatorToCAst.WalkContext { } /** * default implementation of WalkContext; methods do nothing / return null * */ private static class RootContext extends JavaScriptTranslatorToCAst.RootContext implements WalkContext { } /** * context used for function / script declarations */ private static class FunctionContext extends JavaScriptTranslatorToCAst.FunctionContext implements WalkContext { FunctionContext(WalkContext parent, Node s) { super(parent, s); } } /** * context used for top-level script declarations */ private static class ScriptContext extends FunctionContext { private final String script; ScriptContext(WalkContext parent, ScriptNode s, String script) { super(parent, s); this.script = script; } @Override public String script() { return script; } } private static class MemberDestructuringContext extends JavaScriptTranslatorToCAst.MemberDestructuringContext implements WalkContext { protected MemberDestructuringContext(WalkContext parent, Node initialBaseFor, int operationIndex) { super(parent, initialBaseFor, operationIndex); } } private static class BreakContext extends JavaScriptTranslatorToCAst.BreakContext implements WalkContext { @Override public WalkContext getParent() { return (WalkContext) super.getParent(); } BreakContext(WalkContext parent, Node breakTo, String label) { super(parent, breakTo, label); } } private static class LoopContext extends TranslatorToCAst.LoopContext implements WalkContext { LoopContext(WalkContext parent, Node breakTo, Node continueTo, String label) { super(parent, breakTo, continueTo, label); } @Override public WalkContext getParent() { return (WalkContext) super.getParent(); } } private static class TryCatchContext extends TranslatorToCAst.TryCatchContext implements WalkContext { TryCatchContext(WalkContext parent, CAstNode catchNode) { super(parent, catchNode); } @Override public WalkContext getParent() { return (WalkContext) super.getParent(); } } private static String operationReceiverName(int operationIndex) { return "$$destructure$rcvr" + operationIndex; } private CAstNode operationReceiverVar(int operationIndex) { return Ast.makeNode(CAstNode.VAR, Ast.makeConstant(operationReceiverName(operationIndex))); } private static String operationElementName(int operationIndex) { return "$$destructure$elt" + operationIndex; } private CAstNode operationElementVar(int operationIndex) { return Ast.makeNode(CAstNode.VAR, Ast.makeConstant(operationElementName(operationIndex))); } private static CAstNode translateOpcode(int nodeType) { switch (nodeType) { case Token.POS: case Token.ADD: case Token.ASSIGN_ADD: return CAstOperator.OP_ADD; case Token.DIV: case Token.ASSIGN_DIV: return CAstOperator.OP_DIV; case Token.ASSIGN_LSH: case Token.LSH: return CAstOperator.OP_LSH; case Token.MOD: case Token.ASSIGN_MOD: return CAstOperator.OP_MOD; case Token.MUL: case Token.ASSIGN_MUL: return CAstOperator.OP_MUL; case Token.RSH: case Token.ASSIGN_RSH: return CAstOperator.OP_RSH; case Token.SUB: case Token.NEG: case Token.ASSIGN_SUB: return CAstOperator.OP_SUB; case Token.URSH: case Token.ASSIGN_URSH: return CAstOperator.OP_URSH; case Token.BITAND: case Token.ASSIGN_BITAND: return CAstOperator.OP_BIT_AND; case Token.BITOR: case Token.ASSIGN_BITOR: return CAstOperator.OP_BIT_OR; case Token.BITXOR: case Token.ASSIGN_BITXOR: return CAstOperator.OP_BIT_XOR; case Token.EQ: return CAstOperator.OP_EQ; case Token.SHEQ: return CAstOperator.OP_STRICT_EQ; case Token.IFEQ: return CAstOperator.OP_EQ; case Token.GE: return CAstOperator.OP_GE; case Token.GT: return CAstOperator.OP_GT; case Token.LE: return CAstOperator.OP_LE; case Token.LT: return CAstOperator.OP_LT; case Token.NE: return CAstOperator.OP_NE; case Token.SHNE: return CAstOperator.OP_STRICT_NE; case Token.IFNE: return CAstOperator.OP_NE; case Token.BITNOT: return CAstOperator.OP_BITNOT; case Token.NOT: return CAstOperator.OP_NOT; default: Assertions.UNREACHABLE(); return null; } } private CAstNode makeBuiltinNew(String typeName) { return Ast.makeNode(CAstNode.NEW, Ast.makeConstant(typeName)); } private CAstNode handleNew(WalkContext context, String globalName, CAstNode arguments[]) { return handleNew(context, readName(context, null, globalName), arguments); } private CAstNode handleNew(WalkContext context, CAstNode value, CAstNode arguments[]) { return makeCtorCall(value, arguments, context); } private static boolean isPrologueScript(WalkContext context) { return JavaScriptLoader.bootstrapFileNames.contains(context.script()); } private static Node getCallTarget(FunctionCall n) { return n.getTarget(); } /** * is n a call to "primitive" within our synthetic modeling code? */ private static boolean isPrimitiveCall(WalkContext context, FunctionCall n) { return isPrologueScript(context) && n.getType() == Token.CALL && getCallTarget(n).getType() == Token.NAME && getCallTarget(n).getString().equals("primitive"); } private static Node getNewTarget(NewExpression n) { return n.getTarget(); } private static boolean isPrimitiveCreation(WalkContext context, NewExpression n) { Node target = getNewTarget(n); return isPrologueScript(context) && n.getType() == Token.NEW && target.getType() == Token.NAME && target.getString().equals("Primitives"); } private CAstNode makeCall(CAstNode fun, CAstNode thisptr, CAstNode args[], WalkContext context) { return makeCall(fun, thisptr, args, context, STANDARD_CALL_FN_NAME); } private CAstNode makeCtorCall(CAstNode thisptr, CAstNode args[], WalkContext context) { return makeCall(thisptr, null, args, context, CTOR_CALL_FN_NAME); } private CAstNode makeCall(CAstNode fun, CAstNode thisptr, CAstNode args[], WalkContext context, String callee) { int children = (args == null)? 0 : args.length; // children of CAst CALL node are the expression that evaluates to the // function, followed by a name (either STANDARD_CALL_FN_NAME or // CTOR_CALL_FN_NAME), followed by the actual // parameters int nargs = (thisptr == null) ? children + 2 : children + 3; int i = 0; CAstNode arguments[] = new CAstNode[nargs]; arguments[i++] = fun; // assert callee.equals(STANDARD_CALL_FN_NAME) || callee.equals(CTOR_CALL_FN_NAME); arguments[i++] = Ast.makeConstant(callee); if (thisptr != null) arguments[i++] = thisptr; if (args != null) { for (CAstNode arg : args) { arguments[i++] = arg; } } CAstNode call = Ast.makeNode(CAstNode.CALL, arguments); context.cfg().map(call, call); if (context.getCatchTarget() != null) { context.cfg().add(call, context.getCatchTarget(), null); } return call; } /** * Used to represent a script or function in the CAst; see walkEntity(). * */ private class ScriptOrFnEntity implements CAstEntity { private final String[] arguments; private final String name; private final int kind; private final Map> subs; private final CAstNode ast; private final CAstControlFlowMap map; private final CAstSourcePositionMap pos; private final Position entityPosition; private final Position namePosition; private final Position[] paramPositions; private ScriptOrFnEntity(AstNode n, Map> subs, CAstNode ast, CAstControlFlowMap map, CAstSourcePositionMap pos, String name) { this.name = name; this.entityPosition = pos.getPosition(ast); if (n instanceof FunctionNode) { FunctionNode f = (FunctionNode) n; namePosition = makePosition(f.getFunctionName()); f.flattenSymbolTable(false); int i = 0; arguments = new String[f.getParamCount() + 2]; arguments[i++] = name; arguments[i++] = "this"; for (int j = 0; j < f.getParamCount(); j++) { arguments[i++] = f.getParamOrVarName(j); } List params = f.getParams(); paramPositions = new Position[ params.size() ]; for(int pi = 0; pi < params.size(); pi++) { paramPositions[pi] = makePosition(params.get(pi)); } } else { paramPositions = new Position[0]; arguments = new String[0]; namePosition = null; } kind = (n instanceof FunctionNode) ? CAstEntity.FUNCTION_ENTITY : CAstEntity.SCRIPT_ENTITY; this.subs = subs; this.ast = ast; this.map = map; this.pos = pos; } @Override public String toString() { return "'; } @Override public String getName() { return name; } @Override public String getSignature() { Assertions.UNREACHABLE(); return null; } @Override public int getKind() { return kind; } @Override public String[] getArgumentNames() { return arguments; } @Override public CAstNode[] getArgumentDefaults() { return new CAstNode[0]; } @Override public int getArgumentCount() { return arguments.length; } @Override public Map> getAllScopedEntities() { return Collections.unmodifiableMap(subs); } @Override public Iterator getScopedEntities(CAstNode construct) { if (subs.containsKey(construct)) return subs.get(construct).iterator(); else return EmptyIterator.instance(); } @Override public CAstNode getAST() { return ast; } @Override public CAstControlFlowMap getControlFlow() { return map; } @Override public CAstSourcePositionMap getSourceMap() { return pos; } @Override public CAstSourcePositionMap.Position getPosition() { return entityPosition; } @Override public CAstNodeTypeMap getNodeTypeMap() { return null; } @Override public Collection getAnnotations() { return null; } @Override public Collection getQualifiers() { Assertions.UNREACHABLE("JuliansUnnamedCAstEntity$2.getQualifiers()"); return null; } @Override public CAstType getType() { return JSAstTranslator.Any; } @Override public Position getPosition(int arg) { return paramPositions[arg]; } @Override public Position getNamePosition() { return namePosition; } } private CAstEntity walkEntity(final AstNode n, List body, String name, WalkContext child) { CAstNode[] stmts = body.toArray(new CAstNode[0]); // add variable / constant / function declarations, if any if (!child.getNameDecls().isEmpty()) { // new first statement will be a block declaring all names. CAstNode[] newStmts = new CAstNode[stmts.length + 1]; if (child.getNameDecls().size() == 1) { newStmts[0] = child.getNameDecls().iterator().next(); } else { newStmts[0] = Ast.makeNode(CAstNode.BLOCK_STMT, child.getNameDecls().toArray(new CAstNode[0])); } System.arraycopy(stmts, 0, newStmts, 1, stmts.length); stmts = newStmts; } final CAstNode ast = noteSourcePosition(child, Ast.makeNode(CAstNode.BLOCK_STMT, stmts), n); final CAstControlFlowMap map = child.cfg(); final CAstSourcePositionMap pos = child.pos(); // not sure if we need this copy --MS final Map> subs = HashMapFactory.make(child.getScopedEntities()); return new ScriptOrFnEntity(n, subs, ast, map, pos, name); } private Position makePosition(AstNode n) { if (n != null) { URL url = ((SourceModule)sourceModule).getURL(); int line = n.getLineno(); Position pos = new RangePosition(url, line, n.getAbsolutePosition(), n.getAbsolutePosition()+n.getLength()); if (sourceModule instanceof MappedSourceModule) { Position np = ((MappedSourceModule) sourceModule).getMapping().getIncludedPosition(pos); if (np != null) { return np; } } return pos; } else { return null; } } protected CAstNode noteSourcePosition(WalkContext context, CAstNode n, AstNode p) { if (p.getLineno() != -1 && context.pos().getPosition(n) == null) { pushSourcePosition(context, n, makePosition(p)); } return n; } private CAstNode readName(WalkContext context, AstNode node, String name) { CAstNode cn = makeVarRef(name); if (node != null) { context.cfg().map(node, cn); } else { context.cfg().map(cn, cn); } CAstNode target = context.getCatchTarget(); if (target != null) { context.cfg().add(cn, target, JavaScriptTypes.ReferenceError); } else { context.cfg().add(cn, CAstControlFlowMap.EXCEPTION_TO_EXIT, JavaScriptTypes.ReferenceError); } return cn; } private static List