├── nondex-common
├── .gitignore
├── checkstyle.xml
├── src
│ └── main
│ │ └── java
│ │ └── edu
│ │ └── illinois
│ │ └── nondex
│ │ └── common
│ │ ├── project.properties
│ │ ├── Mode.java
│ │ ├── Level.java
│ │ ├── Logger.java
│ │ └── Utils.java
└── pom.xml
├── nondex-maven-plugin
├── .gitignore
├── checkstyle.xml
└── src
│ ├── it
│ ├── comprehensive
│ │ ├── src
│ │ │ └── test
│ │ ├── verify.groovy
│ │ └── pom.xml
│ ├── failing-it
│ │ ├── invoker.properties
│ │ ├── verify.groovy
│ │ ├── src
│ │ │ └── test
│ │ │ │ └── java
│ │ │ │ └── edu
│ │ │ │ └── illinois
│ │ │ │ └── nondex
│ │ │ │ └── it
│ │ │ │ └── AppTest.java
│ │ └── pom.xml
│ ├── simple-it
│ │ ├── invoker.properties
│ │ ├── verify.groovy
│ │ ├── pom.xml
│ │ └── src
│ │ │ └── test
│ │ │ └── java
│ │ │ └── edu
│ │ │ └── illinois
│ │ │ └── nondex
│ │ │ └── it
│ │ │ └── AppTest.java
│ ├── clean-it
│ │ ├── invoker.properties
│ │ ├── verify.groovy
│ │ ├── src
│ │ │ └── test
│ │ │ │ └── java
│ │ │ │ └── edu
│ │ │ │ └── illinois
│ │ │ │ └── nondex
│ │ │ │ └── it
│ │ │ │ └── AppTest.java
│ │ └── pom.xml
│ ├── simple-multimodule-it
│ │ ├── invoker.properties
│ │ ├── verify.groovy
│ │ ├── module1
│ │ │ ├── src
│ │ │ │ └── test
│ │ │ │ │ └── java
│ │ │ │ │ └── edu
│ │ │ │ │ └── illinois
│ │ │ │ │ └── nondex
│ │ │ │ │ └── it
│ │ │ │ │ └── SimpleTest.java
│ │ │ └── pom.xml
│ │ ├── module2
│ │ │ ├── src
│ │ │ │ └── test
│ │ │ │ │ └── java
│ │ │ │ │ └── edu
│ │ │ │ │ └── illinois
│ │ │ │ │ └── nondex
│ │ │ │ │ └── it
│ │ │ │ │ └── SimpleTest.java
│ │ │ └── pom.xml
│ │ └── pom.xml
│ ├── excluded-groups-it
│ │ ├── invoker.properties
│ │ ├── verify.groovy
│ │ ├── module1
│ │ │ ├── src
│ │ │ │ └── test
│ │ │ │ │ └── java
│ │ │ │ │ └── edu
│ │ │ │ │ └── illinois
│ │ │ │ │ └── nondex
│ │ │ │ │ └── it
│ │ │ │ │ ├── Module1Ignore.java
│ │ │ │ │ └── ExcludedGroupsTest.java
│ │ │ └── pom.xml
│ │ ├── module2
│ │ │ ├── src
│ │ │ │ └── test
│ │ │ │ │ └── java
│ │ │ │ │ └── edu
│ │ │ │ │ └── illinois
│ │ │ │ │ └── nondex
│ │ │ │ │ └── it
│ │ │ │ │ └── ExcludedGroupsTest.java
│ │ │ └── pom.xml
│ │ └── pom.xml
│ ├── inexistent-variable-argline-it
│ │ ├── invoker.properties
│ │ ├── verify.groovy
│ │ ├── src
│ │ │ └── test
│ │ │ │ └── java
│ │ │ │ └── edu
│ │ │ │ └── illinois
│ │ │ │ └── nondex
│ │ │ │ └── it
│ │ │ │ ├── SimpleTest.java
│ │ │ │ └── AppTest.java
│ │ └── pom.xml
│ ├── clean-it with-whitespace-in-path
│ │ ├── invoker.properties
│ │ ├── verify.groovy
│ │ ├── src
│ │ │ └── test
│ │ │ │ └── java
│ │ │ │ └── edu
│ │ │ │ └── illinois
│ │ │ │ └── nondex
│ │ │ │ └── it
│ │ │ │ └── AppTest.java
│ │ └── pom.xml
│ ├── settings-property-argline-it
│ │ ├── invoker.properties
│ │ ├── verify.groovy
│ │ ├── src
│ │ │ └── test
│ │ │ │ └── java
│ │ │ │ └── edu
│ │ │ │ └── illinois
│ │ │ │ └── nondex
│ │ │ │ └── it
│ │ │ │ └── SettingsArgLineTest.java
│ │ └── pom.xml
│ ├── multiple-surefire-executions
│ │ ├── verify.groovy
│ │ ├── src
│ │ │ └── test
│ │ │ │ └── java
│ │ │ │ └── edu
│ │ │ │ └── illinois
│ │ │ │ └── nondex
│ │ │ │ └── it
│ │ │ │ ├── AppExec1Test.java
│ │ │ │ └── AppExec2Test.java
│ │ └── pom.xml
│ └── settings.xml
│ ├── main
│ └── java
│ │ └── edu
│ │ └── illinois
│ │ └── nondex
│ │ └── plugin
│ │ ├── Failure.java
│ │ └── CleanMojo.java
│ └── test
│ └── java
│ └── edu
│ └── illinois
│ └── nondex
│ └── plugin
│ └── CleanSurefireExecutionTest.java
├── nondex-instrumentation
├── checkstyle.xml
├── resources
│ ├── empty.jar
│ └── META-INF
│ │ └── MANIFEST.MF
└── src
│ ├── main
│ └── java
│ │ └── edu
│ │ └── illinois
│ │ └── nondex
│ │ └── instr
│ │ ├── Main.java
│ │ ├── CVFactory.java
│ │ └── ConcurrentHashMapShufflingAdder.java
│ └── test
│ └── java
│ └── edu
│ └── illinois
│ └── nondex
│ └── instr
│ └── InstrumenterTest.java
├── nondex-gradle-plugin
├── plugin
│ ├── src
│ │ ├── functionalTest
│ │ │ └── resources
│ │ │ │ ├── excluded-tests-it
│ │ │ │ ├── module2
│ │ │ │ │ ├── build.gradle
│ │ │ │ │ └── src
│ │ │ │ │ │ └── test
│ │ │ │ │ │ └── java
│ │ │ │ │ │ └── edu
│ │ │ │ │ │ └── illinois
│ │ │ │ │ │ └── nondex
│ │ │ │ │ │ └── functionalTest
│ │ │ │ │ │ └── SimpleTest.java
│ │ │ │ ├── settings.gradle
│ │ │ │ ├── module1
│ │ │ │ │ ├── build.gradle
│ │ │ │ │ └── src
│ │ │ │ │ │ └── test
│ │ │ │ │ │ └── java
│ │ │ │ │ │ └── edu
│ │ │ │ │ │ └── illinois
│ │ │ │ │ │ └── nondex
│ │ │ │ │ │ └── functionalTest
│ │ │ │ │ │ └── ExcludedTest.java
│ │ │ │ └── build.gradle
│ │ │ │ ├── simple-multimodule-it
│ │ │ │ ├── module1
│ │ │ │ │ ├── build.gradle
│ │ │ │ │ └── src
│ │ │ │ │ │ └── test
│ │ │ │ │ │ └── java
│ │ │ │ │ │ └── edu
│ │ │ │ │ │ └── illinois
│ │ │ │ │ │ └── nondex
│ │ │ │ │ │ └── functionalTest
│ │ │ │ │ │ └── SimpleTest.java
│ │ │ │ ├── module2
│ │ │ │ │ ├── build.gradle
│ │ │ │ │ └── src
│ │ │ │ │ │ └── test
│ │ │ │ │ │ └── java
│ │ │ │ │ │ └── edu
│ │ │ │ │ │ └── illinois
│ │ │ │ │ │ └── nondex
│ │ │ │ │ │ └── functionalTest
│ │ │ │ │ │ └── SimpleTest.java
│ │ │ │ ├── settings.gradle
│ │ │ │ └── build.gradle
│ │ │ │ ├── clean-it
│ │ │ │ ├── settings.gradle
│ │ │ │ ├── build.gradle
│ │ │ │ └── src
│ │ │ │ │ └── test
│ │ │ │ │ └── java
│ │ │ │ │ └── edu
│ │ │ │ │ └── illinois
│ │ │ │ │ └── nondex
│ │ │ │ │ └── functionalTest
│ │ │ │ │ └── AppTest.java
│ │ │ │ ├── simple-it
│ │ │ │ ├── settings.gradle
│ │ │ │ ├── build.gradle
│ │ │ │ └── src
│ │ │ │ │ └── test
│ │ │ │ │ └── java
│ │ │ │ │ └── edu
│ │ │ │ │ └── illinois
│ │ │ │ │ └── nondex
│ │ │ │ │ └── functionalTest
│ │ │ │ │ └── AppTest.java
│ │ │ │ ├── argline-it
│ │ │ │ ├── settings.gradle
│ │ │ │ ├── build.gradle
│ │ │ │ └── src
│ │ │ │ │ └── test
│ │ │ │ │ └── java
│ │ │ │ │ └── edu
│ │ │ │ │ └── illinois
│ │ │ │ │ └── nondex
│ │ │ │ │ └── functionalTest
│ │ │ │ │ ├── AppTest.java
│ │ │ │ │ └── SimpleTest.java
│ │ │ │ ├── failing-it
│ │ │ │ ├── settings.gradle
│ │ │ │ ├── build.gradle
│ │ │ │ └── src
│ │ │ │ │ └── test
│ │ │ │ │ └── java
│ │ │ │ │ └── edu
│ │ │ │ │ └── illinois
│ │ │ │ │ └── nondex
│ │ │ │ │ └── functionalTest
│ │ │ │ │ └── AppTest.java
│ │ │ │ ├── comprehensive-it
│ │ │ │ ├── settings.gradle
│ │ │ │ ├── src
│ │ │ │ │ └── test
│ │ │ │ │ │ └── java
│ │ │ │ │ │ └── edu
│ │ │ │ │ │ └── illinois
│ │ │ │ │ │ └── nondex
│ │ │ │ │ │ └── functionalTest
│ │ │ │ │ │ ├── TestAnnotation1.java
│ │ │ │ │ │ ├── TestAnnotation2.java
│ │ │ │ │ │ ├── TestAnnotation3.java
│ │ │ │ │ │ ├── TestAnnotation4.java
│ │ │ │ │ │ ├── TestAnnotation5.java
│ │ │ │ │ │ ├── TestAnnotation6.java
│ │ │ │ │ │ ├── TestAnnotation7.java
│ │ │ │ │ │ ├── TestAnnotation8.java
│ │ │ │ │ │ ├── CollatorTest.java
│ │ │ │ │ │ ├── DateFormatTest.java
│ │ │ │ │ │ ├── BreakIteratorTest.java
│ │ │ │ │ │ ├── DecimalFormatSymbolsTest.java
│ │ │ │ │ │ ├── FileTest.java
│ │ │ │ │ │ ├── FieldTest.java
│ │ │ │ │ │ ├── DateFormatSymbolsTest.java
│ │ │ │ │ │ ├── MethodTest.java
│ │ │ │ │ │ ├── AbstractCollectionTest.java
│ │ │ │ │ │ ├── HashSetTest.java
│ │ │ │ │ │ ├── ClassTest.java
│ │ │ │ │ │ ├── ClassTestHelper.java
│ │ │ │ │ │ ├── DelayQueueTest.java
│ │ │ │ │ │ ├── QueueTest.java
│ │ │ │ │ │ └── MapTest.java
│ │ │ │ └── build.gradle
│ │ │ │ └── clean-it with-whitespace-in-path
│ │ │ │ ├── settings.gradle
│ │ │ │ ├── build.gradle
│ │ │ │ └── src
│ │ │ │ └── test
│ │ │ │ └── java
│ │ │ │ └── edu
│ │ │ │ └── illinois
│ │ │ │ └── nondex
│ │ │ │ └── functionalTest
│ │ │ │ └── AppTest.java
│ │ ├── main
│ │ │ └── java
│ │ │ │ └── edu
│ │ │ │ └── illinois
│ │ │ │ └── nondex
│ │ │ │ └── gradle
│ │ │ │ ├── constants
│ │ │ │ └── NonDexGradlePluginConstants.java
│ │ │ │ ├── internal
│ │ │ │ ├── DebugExecuter.java
│ │ │ │ └── NonDexTestProcessor.java
│ │ │ │ ├── tasks
│ │ │ │ ├── NonDexClean.java
│ │ │ │ └── NonDexTest.java
│ │ │ │ ├── plugin
│ │ │ │ └── NonDexGradlePlugin.java
│ │ │ │ └── util
│ │ │ │ └── MavenChecksumFetcher.java
│ │ └── test
│ │ │ └── java
│ │ │ └── edu
│ │ │ └── illinois
│ │ │ └── nondex
│ │ │ └── gradle
│ │ │ └── plugin
│ │ │ └── NonDexGradlePluginTest.java
│ └── build.gradle
├── settings.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
└── gradlew.bat
├── docs
└── images
│ ├── debugbutton.png
│ ├── remotejvmdebug.png
│ ├── debugconfigurationbutton.png
│ └── toolbarconfigurationbutton.png
├── .codeclimate.yml
├── nondex-core
├── LICENSE
├── pom.xml
└── src
│ └── main
│ └── java
│ └── java
│ └── util
│ └── HashIteratorShuffler.java
├── .travis.yml
├── LICENSE
├── nondex-annotations
├── src
│ └── main
│ │ └── java
│ │ └── edu
│ │ └── illinois
│ │ └── NonDexIgnore.java
└── pom.xml
├── .gitignore
├── appveyor.yml
├── nondex-test
└── src
│ └── test
│ └── java
│ └── edu
│ └── illinois
│ └── nondex
│ └── core
│ ├── TestAnnotation1.java
│ ├── TestAnnotation2.java
│ ├── TestAnnotation3.java
│ ├── TestAnnotation4.java
│ ├── TestAnnotation5.java
│ ├── TestAnnotation6.java
│ ├── TestAnnotation7.java
│ ├── TestAnnotation8.java
│ ├── CollatorTest.java
│ ├── DateFormatTest.java
│ ├── BreakIteratorTest.java
│ ├── DecimalFormatSymbolsTest.java
│ ├── FileTest.java
│ ├── IdentityHashMapTest.java
│ ├── FieldTest.java
│ ├── DateFormatSymbolsTest.java
│ ├── MethodTest.java
│ ├── AbstractCollectionTest.java
│ ├── HashSetTest.java
│ ├── ClassTest.java
│ ├── ClassTestHelper.java
│ └── DelayQueueTest.java
├── .github
└── workflows
│ └── ci.yml
└── modify-gradle-build
└── add-nondex.sh
/nondex-common/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/nondex-common/checkstyle.xml:
--------------------------------------------------------------------------------
1 | ../checkstyle.xml
--------------------------------------------------------------------------------
/nondex-maven-plugin/checkstyle.xml:
--------------------------------------------------------------------------------
1 | ../checkstyle.xml
--------------------------------------------------------------------------------
/nondex-instrumentation/checkstyle.xml:
--------------------------------------------------------------------------------
1 | ../checkstyle.xml
--------------------------------------------------------------------------------
/nondex-instrumentation/resources/empty.jar:
--------------------------------------------------------------------------------
1 | PK
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/comprehensive/src/test:
--------------------------------------------------------------------------------
1 | ../../../../../nondex-test/src/test
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/failing-it/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.buildResult = failure
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-it/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.buildResult = failure
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/excluded-tests-it/module2/build.gradle:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/clean-it/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = nondex:nondex nondex:clean
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-multimodule-it/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = nondex:nondex
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/simple-multimodule-it/module1/build.gradle:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/simple-multimodule-it/module2/build.gradle:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/nondex-common/src/main/java/edu/illinois/nondex/common/project.properties:
--------------------------------------------------------------------------------
1 | version=${project.version}
2 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'nondex-gradle-plugin'
2 | include('plugin')
3 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/excluded-groups-it/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = nondex:nondex nondex:clean
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/clean-it/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'clean-it'
2 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/simple-it/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'simple-it'
2 |
--------------------------------------------------------------------------------
/docs/images/debugbutton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TestingResearchIllinois/NonDex/HEAD/docs/images/debugbutton.png
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/argline-it/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'argline-it'
2 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/failing-it/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'failing-it'
2 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/inexistent-variable-argline-it/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = nondex:nondex nondex:clean
2 |
--------------------------------------------------------------------------------
/docs/images/remotejvmdebug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TestingResearchIllinois/NonDex/HEAD/docs/images/remotejvmdebug.png
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/clean-it with-whitespace-in-path/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = nondex:nondex nondex:clean
2 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'comprehensive-it'
2 |
--------------------------------------------------------------------------------
/.codeclimate.yml:
--------------------------------------------------------------------------------
1 | engines:
2 | fixme:
3 | enabled: true
4 | ratings:
5 | paths: []
6 | exclude_paths:
7 | - nondex-core/src/main/**/*
8 |
--------------------------------------------------------------------------------
/docs/images/debugconfigurationbutton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TestingResearchIllinois/NonDex/HEAD/docs/images/debugconfigurationbutton.png
--------------------------------------------------------------------------------
/docs/images/toolbarconfigurationbutton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TestingResearchIllinois/NonDex/HEAD/docs/images/toolbarconfigurationbutton.png
--------------------------------------------------------------------------------
/nondex-core/LICENSE:
--------------------------------------------------------------------------------
1 | The java code in this directory is distributed under Oracle's original
2 | License (GPL v2). Please see the license on the files.
3 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/clean-it with-whitespace-in-path/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'clean-it with-whitespace-in-path'
2 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/excluded-tests-it/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'excluded-tests-it'
2 |
3 | include 'module1', 'module2'
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/clean-it/verify.groovy:
--------------------------------------------------------------------------------
1 | File nondexDirectory = new File( basedir, ".nondex" );
2 |
3 | sleep(3000)
4 | assert ! nondexDirectory.exists();
5 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/settings-property-argline-it/invoker.properties:
--------------------------------------------------------------------------------
1 | # Only run this IT on Java 11 and above (due to mockito verison 5)
2 | invoker.java.version = 11+
--------------------------------------------------------------------------------
/nondex-gradle-plugin/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TestingResearchIllinois/NonDex/HEAD/nondex-gradle-plugin/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/simple-multimodule-it/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'simple-multimodule-it'
2 |
3 | include 'module1', 'module2'
--------------------------------------------------------------------------------
/nondex-instrumentation/resources/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Created-By: 1.6.0_06 (Sun Microsystems Inc.)
3 | Main-Class: edu.illinois.nondex.instr.Main
4 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/excluded-groups-it/verify.groovy:
--------------------------------------------------------------------------------
1 | File nondexDirectory = new File( basedir, ".nondex" );
2 |
3 | sleep(3000)
4 | assert ! nondexDirectory.exists();
5 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/excluded-groups-it/module1/src/test/java/edu/illinois/nondex/it/Module1Ignore.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.it;
2 |
3 | public interface Module1Ignore {}
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/clean-it with-whitespace-in-path/verify.groovy:
--------------------------------------------------------------------------------
1 | File nondexDirectory = new File( basedir, ".nondex" );
2 |
3 | sleep(3000)
4 | assert ! nondexDirectory.exists();
5 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/inexistent-variable-argline-it/verify.groovy:
--------------------------------------------------------------------------------
1 | File nondexDirectory = new File( basedir, ".nondex" );
2 |
3 | sleep(3000)
4 | assert ! nondexDirectory.exists();
5 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/simple-it/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'edu.illinois.nondex'
4 | }
5 |
6 | repositories {
7 | mavenCentral()
8 | }
9 |
10 | dependencies {
11 | testImplementation 'junit:junit:4.13.2'
12 | }
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-multimodule-it/verify.groovy:
--------------------------------------------------------------------------------
1 | File nondexDirectory = new File( basedir, "module1/.nondex" );
2 |
3 | sleep(3000)
4 | assert nondexDirectory.exists();
5 |
6 | nondexDirectory = new File( basedir, "module2/.nondex" );
7 | assert nondexDirectory.exists();
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/clean-it/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'edu.illinois.nondex'
4 | }
5 |
6 | repositories {
7 | mavenCentral()
8 | }
9 |
10 | dependencies {
11 | testImplementation 'junit:junit:4.13.2'
12 | }
13 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/failing-it/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'edu.illinois.nondex'
4 | }
5 |
6 | repositories {
7 | mavenCentral()
8 | }
9 |
10 | dependencies {
11 | testImplementation 'junit:junit:4.13.2'
12 | }
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/failing-it/verify.groovy:
--------------------------------------------------------------------------------
1 | File nondexDirectory = new File( basedir, ".nondex" );
2 |
3 | sleep(3000)
4 | assert nondexDirectory.isDirectory();
5 |
6 | // Every run adds 5 directories. Latest and jar are static
7 | assert (nondexDirectory.list().length - 2) % 5 == 0;
8 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-it/verify.groovy:
--------------------------------------------------------------------------------
1 | File nondexDirectory = new File( basedir, ".nondex" );
2 |
3 | sleep(3000)
4 | assert nondexDirectory.isDirectory();
5 |
6 | // Every run adds 5 directories. Latest and jar are static
7 | assert (nondexDirectory.list().length - 2) % 5 == 0;
8 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/clean-it with-whitespace-in-path/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'edu.illinois.nondex'
4 | }
5 |
6 | repositories {
7 | mavenCentral()
8 | }
9 |
10 | dependencies {
11 | testImplementation 'junit:junit:4.13.2'
12 | }
13 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/multiple-surefire-executions/verify.groovy:
--------------------------------------------------------------------------------
1 | File nondexDirectory = new File( basedir, ".nondex" );
2 |
3 | sleep(3000)
4 | assert nondexDirectory.isDirectory();
5 |
6 | // 3 execution adds 12 directories (1 clean / 3 shuffled). 3 other overhead files
7 | assert (nondexDirectory.list().length - 3) == 12;
8 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/excluded-tests-it/module1/build.gradle:
--------------------------------------------------------------------------------
1 | tasks.withType(Test) {
2 | filter {
3 | excludeTestsMatching 'ExcludedTest.testModuleExclude'
4 | }
5 | }
6 |
7 | nondexTest {
8 | filter {
9 | excludeTestsMatching 'ExcludedTest.testNonDexExclude'
10 | }
11 | }
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: xenial
2 | osx_image: xcode9.3
3 |
4 | language: java
5 |
6 | os:
7 | - linux
8 | - osx
9 |
10 | jdk:
11 | - openjdk8
12 |
13 | env:
14 | - CMD="mvn verify -B"
15 | - CMD="cd nondex-gradle-plugin; ./gradlew check";
16 |
17 | matrix:
18 | allow_failures:
19 | - os: osx
20 |
21 | script: eval $CMD
22 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/TestAnnotation1.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | @Retention(RetentionPolicy.RUNTIME)
7 | public @interface TestAnnotation1 {}
8 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/TestAnnotation2.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | @Retention(RetentionPolicy.RUNTIME)
7 | public @interface TestAnnotation2 {
8 | }
9 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/TestAnnotation3.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | @Retention(RetentionPolicy.RUNTIME)
7 | public @interface TestAnnotation3 {
8 | }
9 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/TestAnnotation4.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | @Retention(RetentionPolicy.RUNTIME)
7 | public @interface TestAnnotation4 {
8 | }
9 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/TestAnnotation5.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | @Retention(RetentionPolicy.RUNTIME)
7 | public @interface TestAnnotation5 {
8 | }
9 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/TestAnnotation6.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | @Retention(RetentionPolicy.RUNTIME)
7 | public @interface TestAnnotation6 {
8 | }
9 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/TestAnnotation7.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | @Retention(RetentionPolicy.RUNTIME)
7 | public @interface TestAnnotation7 {
8 | }
9 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/TestAnnotation8.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | @Retention(RetentionPolicy.RUNTIME)
7 | public @interface TestAnnotation8 {
8 | }
9 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/clean-it/src/test/java/edu/illinois/nondex/functionalTest/AppTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertTrue;
6 |
7 | public class AppTest {
8 | @Test
9 | public void testHashSet() {
10 | assertTrue(true);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/argline-it/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'edu.illinois.nondex'
4 | }
5 |
6 | repositories {
7 | mavenCentral()
8 | }
9 |
10 | dependencies {
11 | testImplementation 'junit:junit:4.13.2'
12 | }
13 |
14 | tasks.withType(Test) {
15 | jvmArgs += ['-DmyArgumentForTesting=1219', '-DthroughProperty=3423']
16 | }
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/argline-it/src/test/java/edu/illinois/nondex/functionalTest/AppTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertTrue;
6 |
7 | public class AppTest {
8 |
9 | @Test
10 | public void testExecuted() {
11 | assertTrue(true);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/excluded-tests-it/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'edu.illinois.nondex'
3 | }
4 |
5 | allprojects {
6 |
7 | apply plugin: 'java'
8 | apply plugin: 'edu.illinois.nondex'
9 |
10 | repositories {
11 | mavenCentral()
12 | }
13 |
14 | dependencies {
15 | testImplementation 'junit:junit:4.13.2'
16 | }
17 | }
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/failing-it/src/test/java/edu/illinois/nondex/functionalTest/AppTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertTrue;
6 |
7 | public class AppTest {
8 |
9 | @Test
10 | public void testHashSet() {
11 | assertTrue(false);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/clean-it with-whitespace-in-path/src/test/java/edu/illinois/nondex/functionalTest/AppTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.fuctionalTest;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertTrue;
6 |
7 | public class AppTest
8 | {
9 | @Test
10 | public void testHashSet() {
11 | assertTrue(true);
12 | }
13 | }
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'edu.illinois.nondex'
4 | }
5 |
6 | repositories {
7 | mavenCentral()
8 | }
9 |
10 | dependencies {
11 | testImplementation 'junit:junit:4.13.2'
12 | testImplementation 'edu.illinois:nondex-common:2.2.1'
13 | testImplementation 'org.hamcrest:hamcrest:2.2'
14 | }
15 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/excluded-tests-it/module2/src/test/java/edu/illinois/nondex/functionalTest/SimpleTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertFalse;
6 |
7 | public class SimpleTest {
8 |
9 | @Test
10 | public void testHashSet() {
11 | assertFalse(false);
12 | }
13 | }
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-multimodule-it/module1/src/test/java/edu/illinois/nondex/it/SimpleTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.it;
2 |
3 | import org.junit.Test;
4 | import static org.junit.Assert.assertEquals;
5 |
6 | public class SimpleTest {
7 |
8 | @Test
9 | public void testSimple() {
10 | String varValue = System.getProperty("myArgumentForTesting");
11 | assertEquals("1219", varValue);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-multimodule-it/module2/src/test/java/edu/illinois/nondex/it/SimpleTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.it;
2 |
3 | import org.junit.Test;
4 | import static org.junit.Assert.assertEquals;
5 |
6 | public class SimpleTest {
7 |
8 | @Test
9 | public void testSimple() {
10 | String varValue = System.getProperty("myArgumentForTesting");
11 | assertEquals("1219", varValue);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/simple-multimodule-it/module1/src/test/java/edu/illinois/nondex/functionalTest/SimpleTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
6 |
7 | public class SimpleTest {
8 |
9 | @Test
10 | public void testSimple() {
11 | String varValue = System.getProperty("myArgumentForTesting");
12 | assertEquals("1219", varValue);
13 | }
14 | }
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/simple-multimodule-it/module2/src/test/java/edu/illinois/nondex/functionalTest/SimpleTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
6 |
7 | public class SimpleTest {
8 |
9 | @Test
10 | public void testSimple() {
11 | String varValue = System.getProperty("myArgumentForTesting");
12 | assertEquals("1219", varValue);
13 | }
14 | }
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/simple-multimodule-it/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'edu.illinois.nondex'
3 | }
4 |
5 | allprojects {
6 |
7 | apply plugin: 'java'
8 | apply plugin: 'edu.illinois.nondex'
9 |
10 | repositories {
11 | mavenCentral()
12 | }
13 |
14 | dependencies {
15 | testImplementation 'junit:junit:4.13.2'
16 | }
17 |
18 | tasks.withType(Test) {
19 | jvmArgs += '-DmyArgumentForTesting=1219'
20 | }
21 | }
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/settings-property-argline-it/verify.groovy:
--------------------------------------------------------------------------------
1 | File nondexDirectory = new File(basedir, ".nondex");
2 | sleep(3000);
3 | assert nondexDirectory.isDirectory() : "NonDex directory should exist";
4 |
5 | // Verify that nondex ran successfully with the settings property in argLine
6 | // Should have 1 clean execution + 3 shuffled = 4 directories, plus 3 overhead files
7 | assert (nondexDirectory.list().length - 3) == 4;
8 |
9 | // If the settings property was removed the build would have failed before getting here
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/main/java/edu/illinois/nondex/gradle/constants/NonDexGradlePluginConstants.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.gradle.constants;
2 |
3 | import edu.illinois.nondex.gradle.util.MavenChecksumFetcher;
4 |
5 | public abstract class NonDexGradlePluginConstants {
6 |
7 | public static final String NONDEX_VERSION = "2.2.1";
8 | public static final String NONDEX_COMMON_SHA1 = MavenChecksumFetcher.getSHA1(
9 | "edu.illinois",
10 | "nondex-common",
11 | NONDEX_VERSION
12 | );
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/inexistent-variable-argline-it/src/test/java/edu/illinois/nondex/it/SimpleTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.it;
2 |
3 | import org.junit.Test;
4 | import static org.junit.Assert.assertEquals;
5 |
6 | public class SimpleTest {
7 |
8 | @Test
9 | public void testSimple() {
10 | String varValue = System.getProperty("myArgumentForTesting");
11 | assertEquals("1219", varValue);
12 | varValue = System.getProperty("throughProperty");
13 | assertEquals("3423", varValue);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/excluded-groups-it/module2/src/test/java/edu/illinois/nondex/it/ExcludedGroupsTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.it;
2 |
3 | import org.junit.Test;
4 | import org.junit.experimental.categories.Category;
5 | import static org.junit.Assert.assertTrue;
6 | import static org.junit.Assert.assertFalse;
7 | import java.util.HashSet;
8 |
9 | public class ExcludedGroupsTest {
10 |
11 | @Test
12 | @Category(edu.illinois.NonDexIgnore.class)
13 | public void testNonDexIgnore() {
14 | assertFalse(true);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/argline-it/src/test/java/edu/illinois/nondex/functionalTest/SimpleTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
6 |
7 | public class SimpleTest {
8 |
9 | @Test
10 | public void testSimple() {
11 | String varValue = System.getProperty("myArgumentForTesting");
12 | assertEquals("1219", varValue);
13 | varValue = System.getProperty("throughProperty");
14 | assertEquals("3423", varValue);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/excluded-groups-it/module2/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | excluded-groups-it
7 | nondex.plugin.it
8 | 1.0-SNAPSHOT
9 |
10 | 4.0.0
11 | module2
12 |
13 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-multimodule-it/module1/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | excluded-groups-it
7 | nondex.plugin.it
8 | 1.0-SNAPSHOT
9 |
10 | 4.0.0
11 | module1
12 |
13 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-multimodule-it/module2/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | excluded-groups-it
7 | nondex.plugin.it
8 | 1.0-SNAPSHOT
9 |
10 | 4.0.0
11 | module2
12 |
13 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/CollatorTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import static org.hamcrest.core.IsEqual.equalTo;
4 | import static org.hamcrest.core.IsNot.not;
5 | import static org.junit.Assert.assertThat;
6 |
7 | import java.text.Collator;
8 |
9 | import org.junit.Test;
10 |
11 | public class CollatorTest {
12 | @Test
13 | public void getAvailableLocalesTest() {
14 | assertThat(Collator.getAvailableLocales(), not(equalTo(Collator.getAvailableLocales())));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/DateFormatTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import static org.hamcrest.core.IsEqual.equalTo;
4 | import static org.hamcrest.core.IsNot.not;
5 | import static org.junit.Assert.assertThat;
6 |
7 | import java.text.DateFormat;
8 |
9 | import org.junit.Test;
10 |
11 | public class DateFormatTest {
12 | @Test
13 | public void getAvailableLocalesTest() {
14 | assertThat(DateFormat.getAvailableLocales(), not(equalTo(DateFormat.getAvailableLocales())));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/BreakIteratorTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import static org.hamcrest.core.IsEqual.equalTo;
4 | import static org.hamcrest.core.IsNot.not;
5 | import static org.junit.Assert.assertThat;
6 |
7 | import java.text.BreakIterator;
8 |
9 | import org.junit.Test;
10 |
11 | public class BreakIteratorTest {
12 |
13 | @Test
14 | public void getAvailableLocalesTest() {
15 | assertThat(BreakIterator.getAvailableLocales(), not(equalTo(BreakIterator.getAvailableLocales())));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/DecimalFormatSymbolsTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import static org.hamcrest.core.IsEqual.equalTo;
4 | import static org.hamcrest.core.IsNot.not;
5 | import static org.junit.Assert.assertThat;
6 |
7 | import java.text.DecimalFormatSymbols;
8 |
9 | import org.junit.Test;
10 |
11 | public class DecimalFormatSymbolsTest {
12 | @Test
13 | public void getAvailableSymbolsTest() {
14 | assertThat(DecimalFormatSymbols.getAvailableLocales(), not(equalTo(DecimalFormatSymbols.getAvailableLocales())));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/comprehensive/verify.groovy:
--------------------------------------------------------------------------------
1 | File nondexDirectory = new File( basedir, ".nondex" );
2 |
3 | sleep(3000)
4 | assert nondexDirectory.isDirectory();
5 |
6 | // Every run adds 5 directories. Latest and jar are static
7 | assert (nondexDirectory.list().length - 2) % 5 == 0;
8 |
9 | def nondexFolder = new File(".nondex")
10 | dirs = nondexFolder.listFiles()
11 |
12 | for (File f : dirs) {
13 | if (f.getName().startsWith("clean")) {
14 | failures = new File(f.getAbsolutePath() + File.pathSeparator + "failures");
15 | // in the clean phase all tests should fail, meaning at least 40
16 | assert Files.readAllLines(failures.getPath(), Charset.defaultCharset()).size() > 40;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/test/java/edu/illinois/nondex/gradle/plugin/NonDexGradlePluginTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.gradle.plugin;
2 |
3 | import org.gradle.testfixtures.ProjectBuilder;
4 | import org.gradle.api.Project;
5 | import org.junit.jupiter.api.Test;
6 | import static org.junit.jupiter.api.Assertions.assertNotNull;
7 |
8 | class NonDexGradlePluginTest {
9 | @Test
10 | void pluginRegistersATask() {
11 | Project project = ProjectBuilder.builder().build();
12 | project.getPlugins().apply("edu.illinois.nondex");
13 | assertNotNull(project.getTasks().findByName("nondexTest"));
14 | assertNotNull(project.getTasks().findByName("nondexClean"));
15 | assertNotNull(project.getTasks().findByName("nondexDebug"));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/excluded-tests-it/module1/src/test/java/edu/illinois/nondex/functionalTest/ExcludedTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertTrue;
6 | import static org.junit.Assert.assertFalse;
7 |
8 | import java.util.HashSet;
9 |
10 | public class ExcludedTest {
11 |
12 | @Test
13 | public void testModuleExclude() {
14 | assertTrue(false);
15 | }
16 |
17 | @Test
18 | public void testNonDexExclude() {
19 | HashSet hs = new HashSet();
20 | for (int i = 0; i < 10; i++) {
21 | hs.add(i);
22 | }
23 |
24 | String s = hs.toString();
25 |
26 | assertFalse(s.equals(hs.toString()));
27 | }
28 |
29 | @Test
30 | public void testHashSet() {
31 | assertTrue(true);
32 | }
33 | }
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/excluded-groups-it/module1/src/test/java/edu/illinois/nondex/it/ExcludedGroupsTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.it;
2 |
3 | import org.junit.Test;
4 | import org.junit.experimental.categories.Category;
5 | import static org.junit.Assert.assertTrue;
6 | import static org.junit.Assert.assertFalse;
7 | import java.util.HashSet;
8 |
9 | public class ExcludedGroupsTest {
10 | @Test
11 | @Category(edu.illinois.nondex.it.Module1Ignore.class)
12 | public void testModuleIgnore() {
13 | assertTrue(false);
14 | }
15 |
16 | @Test
17 | @Category(edu.illinois.NonDexIgnore.class)
18 | public void testNonDexIgnore() {
19 | HashSet hs = new HashSet();
20 | for (int i = 0; i < 10; i++) {
21 | hs.add(i);
22 | }
23 |
24 | String s = hs.toString();
25 |
26 | assertFalse(s.equals(hs.toString()));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/FileTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import static org.hamcrest.core.IsEqual.equalTo;
4 | import static org.hamcrest.core.IsNot.not;
5 | import static org.junit.Assert.assertThat;
6 |
7 | import java.io.File;
8 |
9 | import org.junit.Before;
10 | import org.junit.Test;
11 |
12 | public class FileTest {
13 |
14 | private File myDir;
15 |
16 | @Before
17 | public void setUp() {
18 | myDir = new File(".");
19 | }
20 |
21 | @Test
22 | public void listTest() {
23 | assertThat(myDir.list(), not(equalTo(myDir.list())));
24 | }
25 |
26 | @Test
27 | public void listFilesTest() {
28 | assertThat(myDir.listFiles(), not(equalTo(myDir.listFiles())));
29 | }
30 |
31 | /*@Test
32 | public void listRootsTest() {
33 |
34 | }*/
35 | }
36 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/simple-it/src/test/java/edu/illinois/nondex/functionalTest/AppTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
6 |
7 | import java.util.Set;
8 | import java.util.HashSet;
9 | import java.util.Iterator;
10 |
11 | public class AppTest {
12 |
13 | @Test
14 | public void testHashSet() {
15 | Set s = new HashSet<>();
16 |
17 | for (int i = 0; i<1000000; i++) {
18 | s.add(i);
19 | }
20 |
21 | for (int i = 10; i<1000000; i++) {
22 | s.remove(i);
23 | }
24 |
25 | Iterator it = s.iterator();
26 | it.next();
27 | it.next();
28 | it.remove();
29 | it.next();
30 |
31 | // this is the natural order; 2 should be removed by the iterator remove above
32 | assertEquals("To Debug", "[0, 2, 3, 4, 5, 6, 7, 8, 9]", s.toString());
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/FieldTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import static org.hamcrest.core.IsEqual.equalTo;
4 | import static org.hamcrest.core.IsNot.not;
5 | import static org.junit.Assert.assertThat;
6 |
7 | import java.lang.reflect.Field;
8 |
9 | import org.junit.Before;
10 | import org.junit.Test;
11 |
12 | public class FieldTest {
13 | private Field myField;
14 |
15 | @Before
16 | public void setUp() throws NoSuchFieldException {
17 | Class clazz = ClassTestHelper.class;
18 | myField = clazz.getField("field1");
19 | }
20 |
21 | @Test
22 | public void getDeclaredAnnotationsTest() {
23 | assertThat(myField.getDeclaredAnnotations(), not(equalTo(myField.getDeclaredAnnotations())));
24 | }
25 |
26 | @Test
27 | public void getAnnotationsTest() {
28 | assertThat(myField.getAnnotations(), not(equalTo(myField.getAnnotations())));
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/excluded-groups-it/module1/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | excluded-groups-it
7 | nondex.plugin.it
8 | 1.0-SNAPSHOT
9 |
10 | 4.0.0
11 |
12 | module1
13 |
14 |
15 |
16 | org.apache.maven.plugins
17 | maven-surefire-plugin
18 | 2.22.2
19 |
20 | edu.illinois.nondex.it.Module1Ignore
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/DateFormatSymbolsTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import static org.hamcrest.core.IsEqual.equalTo;
4 | import static org.hamcrest.core.IsNot.not;
5 | import static org.junit.Assert.assertThat;
6 | import static org.junit.Assert.fail;
7 |
8 | import java.text.DateFormatSymbols;
9 | import java.util.Arrays;
10 |
11 | import org.junit.Test;
12 |
13 | public class DateFormatSymbolsTest {
14 | @Test
15 | public void getAvailableLocalesTest() {
16 | assertThat(DateFormatSymbols.getAvailableLocales(), not(equalTo(DateFormatSymbols.getAvailableLocales())));
17 | }
18 |
19 | @Test
20 | public void getZoneStringsTest() {
21 |
22 | DateFormatSymbols dfs = new DateFormatSymbols();
23 | String[][] result = dfs.getZoneStrings();
24 | for (int i = 0; i < 10; i++) {
25 | if (!Arrays.deepEquals(result, dfs.getZoneStrings())) {
26 | return;
27 | }
28 | }
29 | fail("getZoneStrings did not extend in 10 tries; something is likely fishy.");
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 |
--------------------------------------------------------------------------------
/nondex-annotations/src/main/java/edu/illinois/NonDexIgnore.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois;
31 |
32 | public interface NonDexIgnore {
33 | }
34 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/MethodTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import static org.hamcrest.core.IsEqual.equalTo;
4 | import static org.hamcrest.core.IsNot.not;
5 | import static org.junit.Assert.assertThat;
6 |
7 | import java.lang.reflect.Method;
8 |
9 | import org.junit.Before;
10 | import org.junit.Test;
11 |
12 | public class MethodTest {
13 | private Method myMethod;
14 |
15 | @Before
16 | public void setUp() throws NoSuchMethodException {
17 | Class clazz = ClassTestHelper.class;
18 | myMethod = clazz.getMethod("m1", Integer.class);
19 | }
20 |
21 | @Test
22 | public void getDeclaredAnnotationsTest() {
23 | assertThat(myMethod.getDeclaredAnnotations(), not(equalTo(myMethod.getDeclaredAnnotations())));
24 | }
25 |
26 | @Test
27 | public void getExceptionTypesTest() {
28 | assertThat(myMethod.getExceptionTypes(), not(equalTo(myMethod.getExceptionTypes())));
29 | }
30 |
31 | @Test
32 | public void getGenericExceptionTypesTest() {
33 | assertThat(myMethod.getGenericExceptionTypes(), not(equalTo(myMethod.getGenericExceptionTypes())));
34 | }
35 |
36 | @Test
37 | public void getParamaterAnnotationsTest() {
38 | assertThat(myMethod.getParameterAnnotations(), not(equalTo(myMethod.getParameterAnnotations())));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/main/java/edu/illinois/nondex/plugin/Failure.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.plugin;
31 |
32 | public class Failure {
33 | }
34 |
--------------------------------------------------------------------------------
/nondex-common/src/main/java/edu/illinois/nondex/common/Mode.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.common;
31 |
32 | public enum Mode {
33 | FULL, ONE
34 | }
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.gitignore.io/api/java,maven
2 |
3 | ### Java ###
4 | *.class
5 |
6 | # Mobile Tools for Java (J2ME)
7 | .mtj.tmp/
8 |
9 | # Package Files #
10 | *.jar
11 | *.war
12 | *.ear
13 |
14 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
15 | hs_err_pid*
16 |
17 |
18 | ### Maven ###
19 | target/
20 | pom.xml.tag
21 | pom.xml.releaseBackup
22 | pom.xml.versionsBackup
23 | pom.xml.next
24 | release.properties
25 | dependency-reduced-pom.xml
26 | buildNumber.properties
27 | .mvn/timing.properties
28 |
29 | ### Eclipse ###
30 | .settings
31 | .classpath
32 | .project
33 |
34 | ### nondex specific ###
35 | .nondex/
36 |
37 | ### Idea ###
38 | .idea
39 | .idea/*
40 | *.iml
41 |
42 | ### MAC ###
43 | .DS_Store
44 |
45 | ### Emacs ###
46 | # -*- mode: gitignore; -*-
47 | *~
48 | \#*\#
49 | /.emacs.desktop
50 | /.emacs.desktop.lock
51 | *.elc
52 | auto-save-list
53 | tramp
54 | .\#*
55 |
56 | # Org-mode
57 | .org-id-locations
58 | *_archive
59 |
60 | # flymake-mode
61 | *_flymake.*
62 |
63 | # eshell files
64 | /eshell/history
65 | /eshell/lastdir
66 |
67 | # elpa packages
68 | /elpa/
69 |
70 | # reftex files
71 | *.rel
72 |
73 | # AUCTeX auto folder
74 | /auto/
75 |
76 | # cask packages
77 | .cask/
78 | dist/
79 |
80 | # Flycheck
81 | flycheck_*.el
82 |
83 | # server auth directory
84 | /server/
85 |
86 | # projectiles files
87 | .projectile
88 |
89 | # directory configuration
90 | .dir-locals.el
91 |
92 | # End of https://www.gitignore.io/api/emacs
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/main/java/edu/illinois/nondex/gradle/internal/DebugExecuter.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.gradle.internal;
2 |
3 | import edu.illinois.nondex.common.Configuration;
4 | import edu.illinois.nondex.gradle.tasks.AbstractNonDexTest;
5 | import org.gradle.api.internal.tasks.testing.JvmTestExecutionSpec;
6 | import org.gradle.api.internal.tasks.testing.TestExecuter;
7 | import org.gradle.api.internal.tasks.testing.TestResultProcessor;
8 |
9 | public class DebugExecuter implements TestExecuter {
10 |
11 | private final AbstractNonDexTest nondexTestTask;
12 | private final TestExecuter delegate;
13 | private Configuration configuration;
14 |
15 | public DebugExecuter(AbstractNonDexTest nondexTestTask, TestExecuter delegate) {
16 | this.nondexTestTask = nondexTestTask;
17 | this.delegate = delegate;
18 | }
19 |
20 | public void setConfiguration(Configuration configuration) {
21 | this.configuration = configuration;
22 | }
23 |
24 | @Override
25 | public void execute(JvmTestExecutionSpec spec, TestResultProcessor testResultProcessor) {
26 | NonDexTestProcessor nondexTestProcessor = new NonDexTestProcessor(testResultProcessor);
27 | NonDexRun nondexRun = new NonDexRun(configuration, nondexTestTask, this.delegate, spec, nondexTestProcessor);
28 | nondexRun.run();
29 | }
30 |
31 | @Override
32 | public void stopNow() {
33 | delegate.stopNow();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/multiple-surefire-executions/src/test/java/edu/illinois/nondex/it/AppExec1Test.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2025 Steven Kusuman
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 | */
24 |
25 | package edu.illinois.nondex.it;
26 |
27 | import org.junit.Test;
28 | import static org.junit.Assert.assertEquals;
29 |
30 | public class AppExec1Test
31 | {
32 | @Test
33 | public void testFlag1() {
34 | assertEquals("2", System.getProperty("env.flag"));
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: '{build}'
2 | install:
3 | - ps: |
4 | Add-Type -AssemblyName System.IO.Compression.FileSystem
5 | if (!(Test-Path -Path "C:\maven" )) {
6 | (new-object System.Net.WebClient).DownloadFile(
7 | 'http://www.us.apache.org/dist/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.zip',
8 | 'C:\maven-bin.zip'
9 | )
10 | [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
11 | }
12 | - cmd: SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0
13 | - cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;%PATH%
14 | - cmd: SET M2_HOME=C:\maven\apache-maven-3.2.5\
15 | - cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
16 | - cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g
17 | build_script:
18 | - cmd: DEL nondex-common\checkstyle.xml nondex-instrumentation\checkstyle.xml nondex-maven-plugin\checkstyle.xml nondex-annotations\checkstyle.xml nondex-test\checkstyle.xml
19 | - cmd: DEL nondex-maven-plugin\src\it\comprehensive\src\test
20 | - cmd: MKLINK "nondex-common\checkstyle.xml" "checkstyle.xml"
21 | - cmd: MKLINK "nondex-instrumentation\checkstyle.xml" "checkstyle.xml"
22 | - cmd: MKLINK "nondex-maven-plugin\checkstyle.xml" "checkstyle.xml"
23 | - cmd: MKLINK "nondex-annotations\checkstyle.xml" "checkstyle.xml"
24 | - cmd: MKLINK "nondex-test\checkstyle.xml" "checkstyle.xml"
25 | - cmd: MKLINK "nondex-maven-plugin\src\it\comprehensive\src\test" "nondex-core\src\test\"
26 | - mvn -version
27 | - mvn clean package --batch-mode -DskipTests
28 | test_script:
29 | - mvn clean verify
30 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/TestAnnotation1.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import java.lang.annotation.Retention;
33 | import java.lang.annotation.RetentionPolicy;
34 |
35 | @Retention(RetentionPolicy.RUNTIME)
36 | public @interface TestAnnotation1 {}
37 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/TestAnnotation2.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import java.lang.annotation.Retention;
33 | import java.lang.annotation.RetentionPolicy;
34 |
35 | @Retention(RetentionPolicy.RUNTIME)
36 | public @interface TestAnnotation2 {
37 | }
38 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/TestAnnotation3.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import java.lang.annotation.Retention;
33 | import java.lang.annotation.RetentionPolicy;
34 |
35 | @Retention(RetentionPolicy.RUNTIME)
36 | public @interface TestAnnotation3 {
37 | }
38 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/TestAnnotation4.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import java.lang.annotation.Retention;
33 | import java.lang.annotation.RetentionPolicy;
34 |
35 | @Retention(RetentionPolicy.RUNTIME)
36 | public @interface TestAnnotation4 {
37 | }
38 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/TestAnnotation5.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import java.lang.annotation.Retention;
33 | import java.lang.annotation.RetentionPolicy;
34 |
35 | @Retention(RetentionPolicy.RUNTIME)
36 | public @interface TestAnnotation5 {
37 | }
38 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/TestAnnotation6.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import java.lang.annotation.Retention;
33 | import java.lang.annotation.RetentionPolicy;
34 |
35 | @Retention(RetentionPolicy.RUNTIME)
36 | public @interface TestAnnotation6 {
37 | }
38 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/TestAnnotation7.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import java.lang.annotation.Retention;
33 | import java.lang.annotation.RetentionPolicy;
34 |
35 | @Retention(RetentionPolicy.RUNTIME)
36 | public @interface TestAnnotation7 {
37 | }
38 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/TestAnnotation8.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import java.lang.annotation.Retention;
33 | import java.lang.annotation.RetentionPolicy;
34 |
35 | @Retention(RetentionPolicy.RUNTIME)
36 | public @interface TestAnnotation8 {
37 | }
38 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/multiple-surefire-executions/src/test/java/edu/illinois/nondex/it/AppExec2Test.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2025 Steven Kusuman
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 | */
24 |
25 | package edu.illinois.nondex.it;
26 |
27 | import org.junit.Test;
28 | import org.junit.experimental.categories.Category;
29 | import static org.junit.Assert.assertEquals;
30 |
31 | public class AppExec2Test
32 | {
33 | @Test
34 | public void testFlag2() {
35 | assertEquals("1", System.getProperty("env.flag"));
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/failing-it/src/test/java/edu/illinois/nondex/it/AppTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining
10 | a copy of this software and associated documentation files (the
11 | "Software"), to deal in the Software without restriction, including
12 | without limitation the rights to use, copy, modify, merge, publish,
13 | distribute, sublicense, and/or sell copies of the Software, and to
14 | permit persons to whom the Software is furnished to do so, subject to
15 | the following conditions:
16 |
17 | The above copyright notice and this permission notice shall be
18 | included in all copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | */
28 |
29 | package edu.illinois.nondex.it;
30 |
31 | import org.junit.Test;
32 | import static org.junit.Assert.assertTrue;
33 |
34 |
35 | public class AppTest
36 | {
37 |
38 | @Test
39 | public void testHashSet() {
40 | assertTrue(false);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/inexistent-variable-argline-it/src/test/java/edu/illinois/nondex/it/AppTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining
10 | a copy of this software and associated documentation files (the
11 | "Software"), to deal in the Software without restriction, including
12 | without limitation the rights to use, copy, modify, merge, publish,
13 | distribute, sublicense, and/or sell copies of the Software, and to
14 | permit persons to whom the Software is furnished to do so, subject to
15 | the following conditions:
16 |
17 | The above copyright notice and this permission notice shall be
18 | included in all copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | */
28 |
29 | package edu.illinois.nondex.it;
30 |
31 | import org.junit.Test;
32 | import static org.junit.Assert.assertTrue;
33 |
34 | public class AppTest
35 | {
36 | @Test
37 | public void testExecuted() {
38 | assertTrue(true);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3 |
4 | # This workflow uses actions that are not certified by GitHub.
5 | # They are provided by a third-party and are governed by
6 | # separate terms of service, privacy policy, and support
7 | # documentation.
8 |
9 | name: Java CI
10 |
11 | on:
12 | push:
13 | branches: [ "master" ]
14 | pull_request:
15 | branches: [ "master" ]
16 |
17 | jobs:
18 | maven-build:
19 | runs-on: ${{ matrix.os }}
20 |
21 | strategy:
22 | matrix:
23 | os: [ubuntu-latest]
24 | java-version: [8,11,17,21,25]
25 | fail-fast: false
26 |
27 | steps:
28 | - uses: actions/checkout@v4
29 | - uses: actions/setup-java@v4
30 | with:
31 | distribution: 'temurin'
32 | java-version: ${{ matrix.java-version }}
33 | - run: mvn verify -B
34 |
35 | gradle-build:
36 | runs-on: ${{ matrix.os }}
37 |
38 | strategy:
39 | matrix:
40 | os: [ubuntu-latest]
41 | java-version: [8,11,17,21]
42 | fail-fast: false
43 |
44 | steps:
45 | - uses: actions/checkout@v4
46 | - uses: actions/setup-java@v4
47 | with:
48 | distribution: 'temurin'
49 | java-version: ${{ matrix.java-version }}
50 | - name: Make gradlew executable
51 | run: chmod +x nondex-gradle-plugin/gradlew
52 |
53 | - name: Build with Gradle
54 | run: cd nondex-gradle-plugin && ./gradlew check
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/clean-it with-whitespace-in-path/src/test/java/edu/illinois/nondex/it/AppTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2015 Owolabi Legunsen
5 | Copyright (c) 2015 Darko Marinov
6 | Copyright (c) 2015 August Shi
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining
9 | a copy of this software and associated documentation files (the
10 | "Software"), to deal in the Software without restriction, including
11 | without limitation the rights to use, copy, modify, merge, publish,
12 | distribute, sublicense, and/or sell copies of the Software, and to
13 | permit persons to whom the Software is furnished to do so, subject to
14 | the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be
17 | included in all copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 | */
27 |
28 | package edu.illinois.nondex.it;
29 |
30 | import org.junit.Test;
31 | import org.junit.experimental.categories.Category;
32 | import static org.junit.Assert.assertTrue;
33 |
34 | public class AppTest
35 | {
36 | @Test
37 | public void testHashSet() {
38 | assertTrue(true);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/modify-gradle-build/add-nondex.sh:
--------------------------------------------------------------------------------
1 | cd $1
2 | buildFile=$(./gradlew properties | grep buildFile | awk '{print $2}')
3 | output=$(./gradlew projects)
4 | echo "$output" | grep "No sub-projects" > /dev/null
5 | sub=$?
6 | echo ${sub}
7 | grep "edu.illinois.nondex" ${buildFile}
8 | if [ $? != 0 ]; then
9 | if [ "$sub" == 0 ]; then
10 | echo "\napply plugin: 'edu.illinois.nondex'" >> ${buildFile}
11 | else
12 | for p in ${projects}; do
13 | subBuildFile=$(./gradlew :$p:properties | grep buildFile | awk '{print $2}')
14 | sed -i 's/^\( \|\t\)*test /tasks.withType(Test) /' ${subBuildFile};
15 | done
16 | projects=$(./gradlew projects | grep Project | cut -f3 -d" " | tr -d "':")
17 | if [[ "$OSTYPE" == "darwin"* ]]; then
18 | echo "\nsubprojects {\n apply plugin: 'edu.illinois.nondex'\n}" >> ${buildFile} # macOS
19 | else
20 | echo -e "\nsubprojects {\n apply plugin: 'edu.illinois.nondex'\n}" >> ${buildFile} # Linux
21 | fi
22 | fi
23 | echo "buildscript {
24 | repositories {
25 | maven {
26 | url = uri('https://plugins.gradle.org/m2/')
27 | }
28 | }
29 | dependencies {
30 | classpath('edu.illinois:plugin:2.2.1')
31 | }
32 | }
33 | $(cat ${buildFile})" > ${buildFile}
34 | fi
35 | if [[ "$OSTYPE" == "darwin"* ]]; then
36 | sed -i '' 's/^\( \|\t\)*test /tasks.withType(Test) /' "${buildFile}" # macOS
37 | else
38 | sed -i 's/^\( \|\t\)*test /tasks.withType(Test) /' "${buildFile}" # Linux
39 | fi
40 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/clean-it/src/test/java/edu/illinois/nondex/it/AppTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining
10 | a copy of this software and associated documentation files (the
11 | "Software"), to deal in the Software without restriction, including
12 | without limitation the rights to use, copy, modify, merge, publish,
13 | distribute, sublicense, and/or sell copies of the Software, and to
14 | permit persons to whom the Software is furnished to do so, subject to
15 | the following conditions:
16 |
17 | The above copyright notice and this permission notice shall be
18 | included in all copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | */
28 |
29 | package edu.illinois.nondex.it;
30 |
31 | import org.junit.Test;
32 | import org.junit.experimental.categories.Category;
33 | import static org.junit.Assert.assertTrue;
34 |
35 | public class AppTest
36 | {
37 | @Test
38 | public void testHashSet() {
39 | assertTrue(true);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/failing-it/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | nondex.plugin.it
7 | simple-it
8 | 1.0-SNAPSHOT
9 |
10 | A simple IT verifying the basic use case.
11 |
12 |
13 | UTF-8
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 | 3.8.1
22 |
23 | 1.8
24 | 1.8
25 |
26 |
27 |
28 | @project.groupId@
29 | @project.artifactId@
30 | @project.version@
31 |
32 |
33 | org.apache.maven.plugins
34 | maven-surefire-plugin
35 | 2.22.2
36 |
37 |
38 |
39 |
40 |
41 |
42 | junit
43 | junit
44 | 4.13.2
45 | test
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-it/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | nondex.plugin.it
7 | simple-it
8 | 1.0-SNAPSHOT
9 |
10 | A simple IT verifying the basic use case.
11 |
12 |
13 | UTF-8
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 | 3.8.1
22 |
23 | 1.8
24 | 1.8
25 |
26 |
27 |
28 | @project.groupId@
29 | @project.artifactId@
30 | @project.version@
31 |
32 |
33 | org.apache.maven.plugins
34 | maven-surefire-plugin
35 | 2.22.2
36 |
37 |
38 |
39 |
40 |
41 |
42 | junit
43 | junit
44 | 4.13.2
45 | test
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/clean-it/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | nondex.plugin.it
7 | simple-it
8 | 1.0-SNAPSHOT
9 |
10 | A simple IT verifying the basic use of clean Mojo.
11 |
12 |
13 | UTF-8
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 | 3.8.1
22 |
23 | 1.8
24 | 1.8
25 |
26 |
27 |
28 | @project.groupId@
29 | @project.artifactId@
30 | @project.version@
31 |
32 |
33 | org.apache.maven.plugins
34 | maven-surefire-plugin
35 | 2.22.2
36 |
37 |
38 |
39 |
40 |
41 |
42 | junit
43 | junit
44 | 4.13.2
45 | test
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/main/java/edu/illinois/nondex/gradle/tasks/NonDexClean.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.gradle.tasks;
2 |
3 | import edu.illinois.nondex.common.ConfigurationDefaults;
4 | import org.gradle.api.DefaultTask;
5 | import org.gradle.api.tasks.TaskAction;
6 |
7 | import java.io.File;
8 | import java.nio.file.Path;
9 | import java.nio.file.Paths;
10 |
11 | public class NonDexClean extends DefaultTask {
12 |
13 | static final String NAME = "nondexClean";
14 |
15 | public static String getNAME() { return NAME; }
16 |
17 | public NonDexClean() {
18 | setDescription("Clean Nondex jar and directory");
19 | setGroup("NonDex");
20 | }
21 |
22 | @TaskAction
23 | void cleanNonDexFiles() {
24 |
25 | String userDirectory = getProject().getProjectDir().getAbsolutePath();
26 |
27 | Path nondexArtifactsPath = Paths.get(userDirectory, ConfigurationDefaults.DEFAULT_NONDEX_DIR);
28 |
29 | Path nondexJarPath = Paths.get(userDirectory,
30 | ConfigurationDefaults.DEFAULT_NONDEX_JAR_DIR,
31 | ConfigurationDefaults.INSTRUMENTATION_JAR);
32 |
33 | File artifactsDir = nondexArtifactsPath.toFile();
34 | File nondexJar = nondexJarPath.toFile();
35 |
36 | if (nondexJar.exists()) {
37 | delete(nondexJar);
38 | }
39 |
40 | if (artifactsDir.exists()) {
41 | delete(artifactsDir);
42 | }
43 | }
44 |
45 | void delete(File file) {
46 | if (file.isDirectory()) {
47 | for (File childFile : file.listFiles()) {
48 | delete(childFile);
49 | }
50 | }
51 | file.delete();
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/nondex-annotations/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | nondex
5 | edu.illinois
6 | 2.2.5-SNAPSHOT
7 |
8 | 4.0.0
9 |
10 | nondex-annotations
11 |
12 |
13 |
14 |
15 | org.apache.maven.plugins
16 | maven-checkstyle-plugin
17 | 3.1.1
18 |
19 | checkstyle.xml
20 | UTF-8
21 | true
22 | true
23 | true
24 | true
25 | false
26 |
27 |
28 |
29 | com.puppycrawl.tools
30 | checkstyle
31 | 8.29
32 |
33 |
34 |
35 |
36 | validate
37 | validate
38 |
39 | check
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/main/java/edu/illinois/nondex/gradle/plugin/NonDexGradlePlugin.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.gradle.plugin;
2 |
3 | import edu.illinois.nondex.gradle.tasks.NonDexClean;
4 | import edu.illinois.nondex.gradle.tasks.NonDexDebug;
5 | import edu.illinois.nondex.gradle.tasks.NonDexTest;
6 | import org.gradle.api.Project;
7 | import org.gradle.api.Plugin;
8 | import org.gradle.api.artifacts.Configuration;
9 | import org.gradle.api.artifacts.repositories.MavenArtifactRepository;
10 |
11 | import static edu.illinois.nondex.gradle.constants.NonDexGradlePluginConstants.NONDEX_VERSION;
12 |
13 | public class NonDexGradlePlugin implements Plugin {
14 |
15 | public void apply(Project project) {
16 | project.getTasks().create(NonDexTest.getNAME(), NonDexTest.class);
17 | project.getTasks().create(NonDexClean.getNAME(), NonDexClean.class);
18 | project.getTasks().create(NonDexDebug.getNAME(), NonDexDebug.class);
19 | downloadNonDexCommonJar(project.getRootProject());
20 | }
21 |
22 | private void downloadNonDexCommonJar(Project project) {
23 | Configuration config = project.getConfigurations().create("downloadNonDexCommonJar");
24 | project.getDependencies().add(config.getName(), "edu.illinois:nondex-common:" + NONDEX_VERSION);
25 | MavenArtifactRepository mavenCentral = project.getRepositories().mavenCentral();
26 | if (project.getRepositories().contains(mavenCentral)) {
27 | config.resolve();
28 | } else {
29 | project.getRepositories().add(mavenCentral);
30 | config.resolve();
31 | project.getRepositories().remove(mavenCentral);
32 | }
33 | project.getConfigurations().remove(config);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/clean-it with-whitespace-in-path/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | nondex.plugin.it
7 | simple-it
8 | 1.0-SNAPSHOT
9 |
10 | A simple IT verifying the basic use of clean Mojo when the path to the project contains whitespaces.
11 |
12 |
13 | UTF-8
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 | 3.8.1
22 |
23 | 1.8
24 | 1.8
25 |
26 |
27 |
28 | @project.groupId@
29 | @project.artifactId@
30 | @project.version@
31 |
32 |
33 | org.apache.maven.plugins
34 | maven-surefire-plugin
35 | 2.22.2
36 |
37 |
38 |
39 |
40 |
41 |
42 | junit
43 | junit
44 | 4.13.2
45 | test
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/CollatorTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import static org.hamcrest.core.IsEqual.equalTo;
33 | import static org.hamcrest.core.IsNot.not;
34 | import static org.junit.Assert.assertThat;
35 |
36 | import java.text.Collator;
37 |
38 | import org.junit.Test;
39 |
40 | public class CollatorTest {
41 | @Test
42 | public void getAvailableLocalesTest() {
43 | assertThat(Collator.getAvailableLocales(), not(equalTo(Collator.getAvailableLocales())));
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/AbstractCollectionTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import edu.illinois.nondex.shuffling.ControlNondeterminism;
4 |
5 | import org.junit.Assert;
6 |
7 | public abstract class AbstractCollectionTest {
8 |
9 | protected abstract T createResizedDS();
10 |
11 | protected abstract T createResizedDS(int start, int maxSize);
12 |
13 | protected abstract T addRemoveDS(T ds);
14 |
15 | protected void assertParameterized(T ds, Object derived, String str) {
16 | switch (ControlNondeterminism.getConfiguration().mode) {
17 | case FULL:
18 | String tempStr = derived.toString();
19 | Assert.assertNotEquals("FULL is improperly running", str, tempStr);
20 | this.assertEqualstUnordered("Does not match permutation", str, tempStr);
21 | break;
22 | case ONE:
23 | Assert.assertEquals("ONE is improperly running", str, derived.toString());
24 | break;
25 | default:
26 | break;
27 | }
28 | }
29 |
30 | protected void assertEqualstUnordered(String msg, String expected, String actual) {
31 | Assert.assertEquals(msg + ": " + expected + " =/= " + actual, expected.length(), actual.length());
32 | String trimmed = expected.substring(1, expected.length() - 1);
33 | String[] elems = trimmed.split(",");
34 | // TODO(gyori): fix and make this more robust. It does not check duplicates, substrings, etc.
35 | for (int i = 0; i < elems.length; i++) {
36 | elems[i] = elems[i].trim();
37 | Assert.assertTrue(msg + ": " + trimmed + " =/= " + actual, actual.contains(elems[i]));
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'groovy'
3 | id 'java-gradle-plugin'
4 | id "com.gradle.plugin-publish" version "1.3.0"
5 | }
6 |
7 | group = "edu.illinois"
8 | version = "2.2.1"
9 |
10 | repositories {
11 | mavenCentral()
12 | }
13 |
14 | dependencies {
15 | testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
16 | implementation 'com.google.guava:guava:31.1-jre'
17 | implementation 'org.apache.commons:commons-lang3:3.12.0'
18 | implementation 'edu.illinois:nondex-common:' + version
19 | implementation 'edu.illinois:nondex-instrumentation:' + version
20 | }
21 |
22 | gradlePlugin {
23 | website = 'https://github.com/TestingResearchIllinois/NonDex'
24 | vcsUrl = 'https://github.com/TestingResearchIllinois/NonDex'
25 | description = 'NonDex plugin for Gradle'
26 | plugins {
27 | nondexPlugin {
28 | id = 'edu.illinois.nondex'
29 | displayName = 'Nondex plugin for Gradle'
30 | implementationClass = 'edu.illinois.nondex.gradle.plugin.NonDexGradlePlugin'
31 | description = 'NonDex Gradle plugin'
32 | tags.addAll('non-deterministic', 'test')
33 | }
34 | }
35 | }
36 |
37 | sourceSets {
38 | functionalTest {
39 | }
40 | }
41 |
42 | configurations.functionalTestImplementation.extendsFrom(configurations.testImplementation)
43 |
44 | // Add a task to run the functional tests
45 | tasks.register('functionalTest', Test) {
46 | testClassesDirs = sourceSets.functionalTest.output.classesDirs
47 | classpath = sourceSets.functionalTest.runtimeClasspath
48 | useJUnitPlatform()
49 | }
50 |
51 | gradlePlugin.testSourceSets(sourceSets.functionalTest)
52 |
53 | tasks.named('test') {
54 | useJUnitPlatform()
55 | }
56 |
57 | compileJava {
58 | sourceCompatibility = 8
59 | targetCompatibility = 8
60 | }
61 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/DateFormatTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import static org.hamcrest.core.IsEqual.equalTo;
33 | import static org.hamcrest.core.IsNot.not;
34 | import static org.junit.Assert.assertThat;
35 |
36 | import java.text.DateFormat;
37 |
38 | import org.junit.Test;
39 |
40 | public class DateFormatTest {
41 | @Test
42 | public void getAvailableLocalesTest() {
43 | assertThat(DateFormat.getAvailableLocales(), not(equalTo(DateFormat.getAvailableLocales())));
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/BreakIteratorTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import static org.hamcrest.core.IsEqual.equalTo;
33 | import static org.hamcrest.core.IsNot.not;
34 | import static org.junit.Assert.assertThat;
35 |
36 | import java.text.BreakIterator;
37 |
38 | import org.junit.Test;
39 |
40 | public class BreakIteratorTest {
41 |
42 | @Test
43 | public void getAvailableLocalesTest() {
44 | assertThat(BreakIterator.getAvailableLocales(), not(equalTo(BreakIterator.getAvailableLocales())));
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/main/java/edu/illinois/nondex/gradle/util/MavenChecksumFetcher.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.gradle.util;
2 |
3 | import java.io.BufferedReader;
4 | import java.io.InputStreamReader;
5 | import java.net.HttpURLConnection;
6 | import java.net.URL;
7 |
8 | public class MavenChecksumFetcher {
9 |
10 | /**
11 | * Fetches the SHA1 checksum of a JAR file from Maven Central repository.
12 | *
13 | * This method constructs the URL to the checksum file for a given artifact based on its
14 | * groupId, artifactId, and version, then makes an HTTP GET request to fetch the SHA1 checksum.
15 | * It returns the SHA1 checksum as a string.
16 | *
17 | * @param groupId The group ID of the artifact (e.g., "edu.illinois")
18 | * @param artifactId The artifact ID of the artifact (e.g., "nondex-common")
19 | * @param version The version of the artifact (e.g., "2.2.1")
20 | * @return The SHA1 checksum of the artifact as a string
21 | */
22 | public static String getSHA1(String groupId, String artifactId, String version) {
23 | try {
24 | String baseUrl = "https://repo1.maven.org/maven2/";
25 | String sha1Url = baseUrl + groupId.replace(".", "/") + "/" + artifactId + "/" + version + "/"
26 | + artifactId + "-" + version + ".jar.sha1";
27 |
28 | URL url = new URL(sha1Url);
29 | HttpURLConnection connection = (HttpURLConnection) url.openConnection();
30 | connection.setRequestMethod("GET");
31 |
32 | try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
33 | return reader.readLine(); // Returns the SHA1 checksum
34 | }
35 | } catch (Exception e) {
36 | return null;
37 | }
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
23 |
24 |
25 | it-repo
26 |
27 | true
28 |
29 |
30 |
31 | local.central
32 | @localRepositoryUrl@
33 |
34 | true
35 |
36 |
37 | true
38 |
39 |
40 |
41 |
42 |
43 | local.central
44 | @localRepositoryUrl@
45 |
46 | true
47 |
48 |
49 | true
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/DecimalFormatSymbolsTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import static org.hamcrest.core.IsEqual.equalTo;
33 | import static org.hamcrest.core.IsNot.not;
34 | import static org.junit.Assert.assertThat;
35 |
36 | import java.text.DecimalFormatSymbols;
37 |
38 | import org.junit.Test;
39 |
40 | public class DecimalFormatSymbolsTest {
41 | @Test
42 | public void getAvailableSymbolsTest() {
43 | assertThat(DecimalFormatSymbols.getAvailableLocales(), not(equalTo(DecimalFormatSymbols.getAvailableLocales())));
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/main/java/edu/illinois/nondex/gradle/tasks/NonDexTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.gradle.tasks;
2 |
3 | import edu.illinois.nondex.gradle.internal.NonDexTestExecuter;
4 | import org.gradle.api.internal.tasks.testing.JvmTestExecutionSpec;
5 | import org.gradle.api.internal.tasks.testing.TestExecuter;
6 | import org.gradle.api.tasks.testing.Test;
7 |
8 | import java.lang.reflect.Method;
9 |
10 | public class NonDexTest extends AbstractNonDexTest {
11 |
12 | static final String NAME = "nondexTest";
13 |
14 | public static String getNAME() { return NAME; }
15 |
16 | public NonDexTest() {
17 | setDescription("Test with NonDex");
18 | setGroup("NonDex");
19 | NonDexTestExecuter nondexTestExecuter = createNondexTestExecuter();
20 | setNondexAsTestExecuter(nondexTestExecuter);
21 | }
22 |
23 | @Override
24 | public void executeTests() {
25 | setUpNondexTesting();
26 | super.executeTests();
27 | }
28 |
29 | private NonDexTestExecuter createNondexTestExecuter() {
30 | try {
31 | Method getExecuter = Test.class.getDeclaredMethod("createTestExecuter");
32 | getExecuter.setAccessible(true);
33 | TestExecuter delegate = (TestExecuter) getExecuter.invoke(this);
34 | return new NonDexTestExecuter(this, delegate);
35 | } catch (Exception e) {
36 | throw new RuntimeException(e);
37 | }
38 | }
39 |
40 | private void setNondexAsTestExecuter(NonDexTestExecuter nondexExecuter) {
41 | try {
42 | Method setTestExecuter = Test.class.getDeclaredMethod("setTestExecuter", TestExecuter.class);
43 | setTestExecuter.setAccessible(true);
44 | setTestExecuter.invoke(this, nondexExecuter);
45 | } catch (Exception e) {
46 | throw new RuntimeException(e);
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/inexistent-variable-argline-it/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | nondex.plugin.it
7 | simple-it
8 | 1.0-SNAPSHOT
9 |
10 | A simple IT verifying the use of defined and undefined properties.
11 |
12 |
13 | UTF-8
14 | -DthroughProperty=3423
15 |
16 |
17 |
18 |
19 |
20 | org.apache.maven.plugins
21 | maven-compiler-plugin
22 | 3.8.1
23 |
24 | 1.8
25 | 1.8
26 |
27 |
28 |
29 | @project.groupId@
30 | @project.artifactId@
31 | @project.version@
32 |
33 |
34 | org.apache.maven.plugins
35 | maven-surefire-plugin
36 | 2.22.2
37 |
38 | ${some-nonexistent-argline} -DmyArgumentForTesting=1219 ${some.stuff} ${some.existing} ${An0ther-st.uff}
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | junit
47 | junit
48 | 4.13.2
49 | test
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/settings-property-argline-it/src/test/java/edu/illinois/nondex/it/SettingsArgLineTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2025 Edwin Ing
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 | */
24 |
25 | package edu.illinois.nondex.it;
26 |
27 | import org.junit.Test;
28 | import static org.junit.Assert.assertTrue;
29 |
30 | import java.util.HashSet;
31 | import java.util.Set;
32 |
33 | public class SettingsArgLineTest {
34 |
35 | @Test
36 | public void testNonDexRunsSuccessfully() {
37 | // This test simply verifies that NonDex can run with an argLine
38 | // containing ${settings.localRepository}.
39 | // If the settings property wasn't preserved, the javaagent path
40 | // would be malformed and the Nondex would fail to run.
41 | // verify.groovy will check afterward nondex successfully ran.
42 | assertTrue(true); //placeholder
43 | }
44 | }
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/HashSetTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import java.util.HashSet;
4 | import java.util.Iterator;
5 | import java.util.Set;
6 |
7 | import org.junit.Assert;
8 | import org.junit.Test;
9 |
10 | public class HashSetTest extends AbstractCollectionTest> {
11 |
12 | @Override
13 | protected Set createResizedDS() {
14 | return this.createResizedDS(0, 103);
15 | }
16 |
17 | @Override
18 | protected Set createResizedDS(int start, int maxSize) {
19 | Set set = new HashSet<>();
20 |
21 | for (int i = start; i < maxSize; i++) {
22 | set.add(i);
23 | }
24 |
25 | for (int i = start + 10; i < maxSize; i++) {
26 | set.remove(i);
27 | }
28 |
29 | Assert.assertEquals("the size should be 10", 10, set.size());
30 |
31 | return set;
32 | }
33 |
34 | @Override
35 | protected Set addRemoveDS(Set ds) {
36 | ds.add(27);
37 | ds.remove(27);
38 | return ds;
39 | }
40 |
41 |
42 | @Test
43 | public void testHashSet() {
44 | Set set = this.createResizedDS(0, 100000);
45 | Iterator it = set.iterator();
46 | it.next();
47 | it.next();
48 | it.remove();
49 | it.next();
50 | Assert.assertEquals("the size should be 9 now", 9, set.size());
51 | // this is the natural order; 2 should be removed by the iterator remove above
52 | Assert.assertNotEquals("You are likely running an unchanged JVM",
53 | "[0, 2, 3, 4, 5, 6, 7, 8, 9]", set.toString());
54 | }
55 |
56 | @Test
57 | public void testHashSetParametrized() {
58 | Set set = this.createResizedDS(0, 100000);
59 | this.assertParameterized(set, set, set.toString());
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/comprehensive/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | nondex.plugin.it
7 | simple-it
8 | 1.0-SNAPSHOT
9 |
10 | A simple IT verifying the basic use case.
11 |
12 |
13 | UTF-8
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 | 3.8.1
22 |
23 | 1.8
24 | 1.8
25 |
26 |
27 |
28 | @project.groupId@
29 | @project.artifactId@
30 | @project.version@
31 |
32 |
33 | org.apache.maven.plugins
34 | maven-surefire-plugin
35 | 2.22.2
36 |
37 | 2
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | junit
46 | junit
47 | 4.13.2
48 | test
49 |
50 |
51 | @project.groupId@
52 | nondex-common
53 | @project.version@
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-multimodule-it/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | nondex.plugin.it
7 | excluded-groups-it
8 | 1.0-SNAPSHOT
9 | pom
10 | IT verifying excluded groups
11 |
12 |
13 | UTF-8
14 |
15 |
16 |
17 | module1
18 | module2
19 |
20 |
21 |
22 |
23 |
24 | org.apache.maven.plugins
25 | maven-compiler-plugin
26 | 3.8.1
27 |
28 | 1.8
29 | 1.8
30 |
31 |
32 |
33 | @project.groupId@
34 | nondex-maven-plugin
35 | @project.version@
36 |
37 |
38 | org.apache.maven.plugins
39 | maven-surefire-plugin
40 | 2.22.2
41 |
42 | -DmyArgumentForTesting=1219
43 | 2
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | junit
52 | junit
53 | 4.12
54 | test
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/nondex-instrumentation/src/main/java/edu/illinois/nondex/instr/Main.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.instr;
31 |
32 | import edu.illinois.nondex.common.Utils;
33 |
34 | public class Main {
35 | public static void main(String...args) throws Exception {
36 | if (args.length == 1) {
37 | String rtPath = "";
38 | if (Utils.checkJDK8()) {
39 | rtPath = Utils.getRtJarLocation().toString();
40 | }
41 | Instrumenter.instrument(rtPath, args[0]);
42 | } else if (args.length == 2) {
43 | Instrumenter.instrument(args[0], args[1]);
44 | } else {
45 | throw new IllegalArgumentException("Expecting 1 or 2 arguments: [/path/to/rt.jar] /path/to/output.jar");
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/nondex-common/src/main/java/edu/illinois/nondex/common/Level.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.common;
31 |
32 | public enum Level {
33 | ALL(Integer.MIN_VALUE, "ALL"),
34 | FINEST(300, "FINEST"),
35 | FINER(400, "FINER"),
36 | FINE(500, "FINE"),
37 | CONFIG(700, "CONFIG"),
38 | INFO(800, "INFO"),
39 | WARNING(900, "WARNING"),
40 | SEVERE(1000, "SEVERE"),
41 | OFF(Integer.MAX_VALUE, "OFF");
42 |
43 | private final int severity;
44 |
45 | private Level(int severity, String name) {
46 | this.severity = severity;
47 | }
48 |
49 | public static Level parse(String name) {
50 | return Level.valueOf(name);
51 | }
52 |
53 | public final String getName() {
54 | return name();
55 | }
56 |
57 | public final int intValue() {
58 | return severity;
59 | }
60 | }
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/FileTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import static org.hamcrest.core.IsEqual.equalTo;
33 | import static org.hamcrest.core.IsNot.not;
34 | import static org.junit.Assert.assertThat;
35 |
36 | import java.io.File;
37 |
38 | import org.junit.Before;
39 | import org.junit.Test;
40 |
41 | public class FileTest {
42 |
43 | private File myDir;
44 |
45 | @Before
46 | public void setUp() {
47 | myDir = new File(".");
48 | }
49 |
50 | @Test
51 | public void listTest() {
52 | assertThat(myDir.list(), not(equalTo(myDir.list())));
53 | }
54 |
55 | @Test
56 | public void listFilesTest() {
57 | assertThat(myDir.listFiles(), not(equalTo(myDir.listFiles())));
58 | }
59 |
60 | /*@Test
61 | public void listRootsTest() {
62 |
63 | }*/
64 | }
65 |
--------------------------------------------------------------------------------
/nondex-core/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 |
5 | edu.illinois
6 | nondex
7 | 2.2.5-SNAPSHOT
8 |
9 |
10 | nondex-core
11 | jar
12 | nondex-core
13 |
14 |
15 |
16 |
17 | org.apache.maven.plugins
18 | maven-javadoc-plugin
19 |
20 |
21 | attach-javadocs
22 | none
23 |
24 | jar
25 |
26 |
27 |
28 |
29 |
30 |
31 | org.apache.maven.plugins
32 | maven-deploy-plugin
33 | 2.8.2
34 |
35 | true
36 |
37 |
38 |
39 | org.apache.maven.plugins
40 | maven-compiler-plugin
41 | 3.6.0
42 |
43 | 1.8
44 | 1.8
45 |
46 | -XDignore.symbol.file
47 |
48 | true
49 |
50 |
51 |
52 | default-compile
53 | none
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | edu.illinois
63 | nondex-common
64 | ${project.version}
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/ClassTest.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | import static org.hamcrest.core.IsEqual.equalTo;
4 | import static org.hamcrest.core.IsNot.not;
5 | import static org.junit.Assert.assertThat;
6 |
7 | import org.junit.Before;
8 | import org.junit.Test;
9 |
10 | public class ClassTest {
11 |
12 | private Class clazz;
13 |
14 | @Before
15 | public void setUp() {
16 | // TODO: pick a class with annotations and test:
17 | // clazz.getAnnotations();
18 | // clazz.getDeclaredAnnotations();
19 | clazz = ClassTestHelper.class;
20 | }
21 |
22 | @Test
23 | public void getClassesTest() {
24 | assertThat(clazz.getClasses(), not(equalTo(clazz.getClasses())));
25 | }
26 |
27 | @Test
28 | public void getFieldsTest() {
29 | assertThat(clazz.getFields(), not(equalTo(clazz.getFields())));
30 | }
31 |
32 | @Test
33 | public void getDeclaredFieldsTest() {
34 | assertThat(clazz.getDeclaredFields(), not(equalTo(clazz.getDeclaredFields())));
35 | }
36 |
37 | @Test
38 | public void getConstructorsTest() throws NoSuchMethodException {
39 | assertThat(clazz.getConstructors(), not(equalTo(clazz.getConstructors())));
40 | }
41 |
42 | @Test
43 | public void getDeclaredConstructorsTest() {
44 | assertThat(clazz.getDeclaredConstructors(), not(equalTo(clazz.getDeclaredConstructors())));
45 | }
46 |
47 | @Test
48 | public void getMethodsTest() {
49 | assertThat(clazz.getMethods(), not(equalTo(clazz.getMethods())));
50 | }
51 |
52 | @Test
53 | public void getDeclaredMethodsTest() {
54 | assertThat(clazz.getDeclaredMethods(), not(equalTo(clazz.getDeclaredMethods())));
55 | }
56 |
57 | @Test
58 | public void getAnnotationsTest() {
59 | assertThat(clazz.getAnnotations(), not(equalTo(clazz.getAnnotations())));
60 | }
61 |
62 | @Test
63 | public void getDeclaredAnnotationsTest() {
64 | assertThat(clazz.getDeclaredAnnotations(), not(equalTo(clazz.getDeclaredAnnotations())));
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/nondex-maven-plugin/src/it/simple-it/src/test/java/edu/illinois/nondex/it/AppTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining
10 | a copy of this software and associated documentation files (the
11 | "Software"), to deal in the Software without restriction, including
12 | without limitation the rights to use, copy, modify, merge, publish,
13 | distribute, sublicense, and/or sell copies of the Software, and to
14 | permit persons to whom the Software is furnished to do so, subject to
15 | the following conditions:
16 |
17 | The above copyright notice and this permission notice shall be
18 | included in all copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | */
28 |
29 | package edu.illinois.nondex.it;
30 |
31 | import org.junit.Test;
32 | import static org.junit.Assert.assertEquals;
33 |
34 | import java.util.Set;
35 | import java.util.HashSet;
36 | import java.util.Iterator;
37 |
38 | public class AppTest
39 | {
40 |
41 | @Test
42 | public void testHashSet() {
43 | Set s = new HashSet();
44 |
45 | for (int i = 0; i<1000000; i++)
46 |
47 | s.add(i);
48 |
49 | for (int i = 10; i<1000000; i++)
50 | s.remove(i);
51 |
52 | Iterator it = s.iterator();
53 | it.next();
54 | it.next();
55 | it.remove();
56 | it.next();
57 |
58 | // this is the natural order; 2 should be removed by the iterator remove above
59 | assertEquals("To Debug", "[0, 2, 3, 4, 5, 6, 7, 8, 9]", s.toString());
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/nondex-gradle-plugin/plugin/src/functionalTest/resources/comprehensive-it/src/test/java/edu/illinois/nondex/functionalTest/ClassTestHelper.java:
--------------------------------------------------------------------------------
1 | package edu.illinois.nondex.functionalTest;
2 |
3 | @TestAnnotation1
4 | @TestAnnotation2
5 | @TestAnnotation3
6 | @TestAnnotation4
7 | @TestAnnotation5
8 | @TestAnnotation6
9 | @TestAnnotation7
10 | @TestAnnotation8
11 | public class ClassTestHelper {
12 |
13 | public class InnerOne {
14 |
15 | }
16 |
17 | public class InnerTwo {
18 |
19 | }
20 |
21 | public class InnerThree {
22 |
23 | }
24 |
25 | public class InnerFour {
26 |
27 | }
28 |
29 | @TestAnnotation1
30 | @TestAnnotation2
31 | @TestAnnotation3
32 | @TestAnnotation4
33 | @TestAnnotation5
34 | @TestAnnotation6
35 | @TestAnnotation7
36 | @TestAnnotation8
37 | public Integer field1;
38 |
39 | public Integer field2;
40 | public Integer field3;
41 | public Integer field4;
42 |
43 | public ClassTestHelper() {
44 |
45 | }
46 |
47 | public ClassTestHelper(Integer f1) {
48 | field1 = f1;
49 | }
50 |
51 | public ClassTestHelper(Integer f1, Integer f2) {
52 | field1 = f1;
53 | field2 = f2;
54 | }
55 |
56 | public ClassTestHelper(Integer f1, Integer f2, Integer f3) {
57 | field1 = f1;
58 | field2 = f2;
59 | field3 = f3;
60 | }
61 |
62 | public ClassTestHelper(Integer f1, Integer f2, Integer f3, Integer f4) {
63 | field1 = f1;
64 | field2 = f2;
65 | field3 = f3;
66 | field4 = f4;
67 | }
68 |
69 | @TestAnnotation1
70 | @TestAnnotation2
71 | @TestAnnotation3
72 | @TestAnnotation4
73 | @TestAnnotation5
74 | @TestAnnotation6
75 | @TestAnnotation7
76 | @TestAnnotation8
77 | public int m1(@TestAnnotation1 @TestAnnotation2 @TestAnnotation3 @TestAnnotation4 Integer param)
78 | throws NullPointerException, ArithmeticException, ArrayIndexOutOfBoundsException, ClassCastException, Exception {
79 | return param;
80 | }
81 |
82 | public int m2() {
83 | return 2;
84 | }
85 |
86 | public int m3() {
87 | return 3;
88 | }
89 |
90 | public int m4() {
91 | return 4;
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/nondex-test/src/test/java/edu/illinois/nondex/core/IdentityHashMapTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | The MIT License (MIT)
3 | Copyright (c) 2015 Alex Gyori
4 | Copyright (c) 2022 Kaiyao Ke
5 | Copyright (c) 2015 Owolabi Legunsen
6 | Copyright (c) 2015 Darko Marinov
7 | Copyright (c) 2015 August Shi
8 |
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining
11 | a copy of this software and associated documentation files (the
12 | "Software"), to deal in the Software without restriction, including
13 | without limitation the rights to use, copy, modify, merge, publish,
14 | distribute, sublicense, and/or sell copies of the Software, and to
15 | permit persons to whom the Software is furnished to do so, subject to
16 | the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be
19 | included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 | */
29 |
30 | package edu.illinois.nondex.core;
31 |
32 | import java.util.Collections;
33 | import java.util.IdentityHashMap;
34 | import java.util.Iterator;
35 |
36 | import org.junit.Test;
37 |
38 | public class IdentityHashMapTest {
39 |
40 | // Author: Chih-Fu Lai (2025)
41 | // Added test coverage for IdentityHashMap.removeAll iterator behavior
42 | @Test
43 | public void testRemoveAllArrayIndexOutOfBounds() {
44 | for (int i = 0; i < 999; i++) {
45 | IdentityHashMap