Skip to content

Releases: saiema/MuJava

muJava++ 1.5.2 ForStatement bug fix

14 Oct 00:48

Choose a tag to compare

This updates fixes an issue that caused statements like

for (i = 0; <condition>; <increments>) BODY

With i a previously declared variable, where not being supported.

This release only updates the mujava.jar, for other files (such as configuration and libraries) please refer to the 1.5 release.

muJava++ 1.5.1 Stryker update

09 Oct 08:32

Choose a tag to compare

This update only add minor changes needed by the Stryker tool

This release only updates the mujava.jar, for other files (such as configuration and libraries) please refer to the previous release.

muJava++ 1.5 : extended configurations in .properties file and improved memory usage for mutation score

09 Sep 22:34

Choose a tag to compare

Changes :

Fixes:

  • fixed NullPointerException in PCI operator
  • fixed NullPointerException in PNC operator

Modifications:

  • mujava.app.Console has been deprecated, mujava.app.Main is used instead
  • mujava++ no longer support the old console arguments, now uses only a .properties file
  • mujava.app.Main arguments are:
    • -p[roperties] : to give a specific .properties file to mujava++
    • -o[perators] : prints all mutation operators information
    • -h[elp] : prints mujava++ help
  • added all new supported configurations into default.properties
  • cleanned up some code

Additions:

  • added support for several configurations to be defined in .properties files
  • improved memory usage when running mutation score

IMPORTANT

For the best performance please use -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled as VM arguments and run muJava++ using java 8. A Java 8 VM improves memory usage since permGen is now a part of the heap, getting more allowed memory and can be garbage collected.

New configuration parameters

  • mutation.advanced.prvo.enableSameLenght= [BOOLEAN] : Enable/disable mutations that changes one element of an expression without affecting it's length
  • mutation.advanced.prvo.enableIncreaseLenght= [BOOLEAN] : Enable/disable mutations that changes an expression by adding a new element
  • mutation.advanced.prvo.enableDecreaseLenght= [BOOLEAN] : Enable/disable mutations that removes an element from an expression
  • mutation.advanced.prvo.enableOneByTwo= [BOOLEAN] : Enable/disable mutations that changes one field or method in a chained expression with a chained expression of size 2
  • mutation.advanced.prvo.enableTwoByOne= [BOOLEAN] : Enable/disable mutations that changes a sub chained expression of size 2 with one field or method
  • mutation.advanced.prvo.enableAllByOneLeft= [BOOLEAN] : Enable/disable mutations affecting a chained expression on the left side of an assignment statement replacing this expression with a variable or field
  • mutation.advanced.prvo.enableAllByOneRight= [BOOLEAN] : Enable/disable mutations affecting a chained expression on the right side of an assignment statement replacing this expression with a variable, field or null
  • mutation.advanced.prvo.enableSuper= [BOOLEAN] : Enable/disable the use of super in the generated mutations
  • mutation.advanced.prvo.enableThis= [BOOLEAN] : Enable/disable the use of this in the generated mutations
  • mutation.advanced.prvo.enableReplacementWithLiterals= [BOOLEAN] : Enable/disable the use of literals to replace expressions of size one
  • mutation.advanced.prvo.enableNullLiteral= [BOOLEAN] : Enable/disable the use of the literal null in the generated mutations
  • mutation.advanced.prvo.enableTrueLiteral= [BOOLEAN] : Enable/disable the use of the literal true in the generated mutations
  • mutation.advanced.prvo.enableFalseLiteral= [BOOLEAN] : Enable/disable the use of the literal false in the generated mutations
  • mutation.advanced.prvo.enableEmptyString= [BOOLEAN] : Enable/disable the use of the empty string literal in the generated mutations
  • mutation.advanced.prvo.enableZeroLiteral= [BOOLEAN] : Enable/disable the use of the literal 0 in the generated mutations
  • mutation.advanced.prvo.enableOneLiteral= [BOOLEAN] : Enable/disable the use of the literal 1 in the generated mutations
  • mutation.advanced.prvo.enableStringLiterals= [BOOLEAN] : Enable/disable the use of the string literals (collected from the method to mutate code) in the generated mutations
  • mutation.advanced.ror.replaceWithTrue=[BOOLEAN] : Enable/disable the replacement of boolean expressions with true
  • mutation.advanced.ror.replaceWithFalse= [BOOLEAN] : Enable/disable the replacement of boolean expressions with false
  • mutation.advanced.cor.andOperator= [BOOLEAN] : Enable/disable replacements with and operator
  • mutation.advanced.cor.orOperator= [BOOLEAN] : Enable/disable replacements with or operator
  • mutation.advanced.cor.xorOperator= [BOOLEAN] : Enable/disable replacements with xor operator
  • mutation.advanced.cor.bitAndOperator= [BOOLEAN] : Enable/disable replacements with bit and operator
  • mutation.advanced.cor.bitOrOperator= [BOOLEAN] : Enable/disable replacements with bit or operator

muJava++ 1.3 Improved performance, generations support

28 Aug 13:11

Choose a tag to compare

The major improvements in this release are the following:

  • Improved performance : muJava++ can now run mutation score on 500k mutants (example ran with a JUnit test containing 8 test methods and quick death option enabled) while before the process would die even before reaching 25k. Tests speed is maintained while before there was a slowdown that increased greatly over time.
  • Support for mutants generations : muJava++ was only able to generate the first generation of mutants (one mutation per file) and now it''s able to generate up to generation G (each mutant in a generation 1 <= g <= G will have g mutations) and mutation score is executed on the last generation. Be careful of mutants explosion! with 40 mutants in the first generation you can expect roughly 40^g mutants per generation.
  • Surviving mutants are shown : after running mutation score, all mutants that compiled and passed all tests will be listed (by their relative path to the mutants output directory).
  • Added lib zip file to the release : you don't longer need to hunt down the needed libraries or search the lib folder inside the repository.

How to use it

java -cp <paths to jar files inside lib folder>:<mujava++.jar path>:<proyect's bin path>:[<tests bin path>] mujava.app.Console [PATH TO CUSTOM .PROPERTIES FILE]
  • JUnit is not included, you should have installed in your system

Suggested VM Arguments

-XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled

Usage example

  • Create a folder (in this case we will use mjexample)
  • Download mujava.jar inside mjexample
  • Download and extract lib.zip inside mjexample
  • Download and extract properties.rar inside mjexample
  • Download and extract test.rar

You should end with the following folder structure

  • mjexample
    • mujava.jar
    • lib/
    • test/
    • properties/

Inside test folder you should have

  • utils
    • BooleanOps.java
  • mutationScore
    • BooleanOpsXorTests.java
    • BooleanOpsXnorTests.java
    • BooleanOpsOrTests.java
    • BooleanOpsAndTests.java

Go to the test folder and run _javac utils/*.java and javac -cp mutationScore/*.java

Now from the folder mjexample you can run

java -cp mujava.jar:<paths to each jar inside lib/*>::test/ mujava.app.Console <properties file**>

* : except from javadoc jars
** : one of the .properties file inside folder properties/

For further information visit the wiki.

mujava++ 1.2.1 several bugs fixed

11 Aug 20:48

Choose a tag to compare

Changelog:

  • A suprising number of missing null checks. It's amazing that mujava++ was working as well as it seems.
  • Some missing mutations in PRVO
  • mujava.api.Mutation#isMutantATailChangeOfTheLeftSideOfAnAssignmentExpression() now return false if for a mutation x.y => x'.y exists an allocation x' = new ... or for any prefix of x'

Libraries required

commons-configuration-1.10
commons-lang-2.6
commons-logging-1.1.1
guava-16.0.1
javassist
reflections-0.9.9-RC1.jar
junit 4.11.0
Main class for terminal use is mujava.app.Console

Basic usage

java -cp paths to libraries:path to original bin directory[:path to tests bin directory] mujava.app.Console [path to .properties file]

If no path is provided for a .properties file, muJava++ will use default.properties file in the working directory.

Note: to use console arguments use --args as first argument, with --args -H all valid arguments will be shown.

mujava++ 1.2 bug fixes and no longer moving mutants around

10 Aug 15:16

Choose a tag to compare

Changelog:

  • Index out of bounds when generating PRVO mutants
  • Mutants class files no longer need to be moved in order to reload the mutated class

Libraries required

commons-configuration-1.10
commons-lang-2.6
commons-logging-1.1.1
guava-16.0.1
javassist
reflections-0.9.9-RC1.jar
junit 4.11.0
Main class for terminal use is mujava.app.Console

Basic usage

java -cp paths to libraries:path to original bin directory[:path to tests bin directory] mujava.app.Console [path to .properties file]

If no path is provided for a .properties file, muJava++ will use default.properties file in the working directory.

Note: to use console arguments use --args as first argument, with --args -H all valid arguments will be shown.

1.1.1 HotFix

05 Aug 18:54

Choose a tag to compare

Changelog:

  • Fixed a NullPointerException in PRVO
  • NPER_Writer was replacing a Statement with a StatementList instead of just the contents of the list
  • mutation score considering only compiling mutants is now also reported
  • Less amount of junit threads are kept alive after running each test

Libraries required

commons-configuration-1.10
commons-lang-2.6
commons-logging-1.1.1
guava-16.0.1
javassist
reflections-0.9.9-RC1.jar
junit 4.11.0
Main class for terminal use is mujava.app.Console

Basic usage

java -cp paths to libraries:path to original bin directory[:path to tests bin directory] mujava.app.Console [path to .properties file]

If no path is provided for a .properties file, muJava++ will use default.properties file in the working directory.

Note: to use console arguments use --args as first argument, with --args -H all valid arguments will be shown.

muJava++ 1.1 improved PRVO

04 Aug 17:44

Choose a tag to compare

Libraries required

  • commons-configuration-1.10
  • commons-lang-2.6
  • commons-logging-1.1.1
  • guava-16.0.1
  • javassist
  • reflections-0.9.9-RC1.jar
  • junit 4.11.0

Main class for terminal use is mujava.app.Console

Basic usage

java -cp paths to libraries:path to original bin directory[:path to tests bin directory] mujava.app.Console [path to .properties file]

If no path is provided for a .properties file, muJava++ will use default.properties file in the working directory.

Note: to use console arguments use --args as first argument, with --args -H all valid arguments will be shown.

First official release

06 Jul 17:58

Choose a tag to compare

Libraries required

  • commons-configuration-1.10
  • commons-lang-2.6
  • commons-logging-1.1.1
  • guava-16.0.1
  • javassist
  • reflections-0.9.9-RC1.jar
  • junit 4.11.0

Main class for terminal use is mujava.app.Console

Basic usage

java -cp paths to libraries:path to original bin directory[:path to tests bin directory] mujava.app.Console [path to .properties file]

If no path is provided for a .properties file, muJava++ will use default.properties file in the working directory.

Note: to use console arguments use --args as first argument, with --args -H all valid arguments will be shown.