Releases: saiema/MuJava
muJava++ 1.8.5 new operator added
muJava++ 1.8.4 new operator added
Added LVR from major
muJava++ 1.8.3 two new operators added
muJava++ 1.8 dynamic mutant subsumption analysis
This version leaves the usage of class reloading behind, implements Dynamic Mutant Subsumption analysis and fixes several bugs.
To use Dynamic Mutant Subsumption use the following properties:
mutation.advanced.dynamicSubsumption= [true/false] : compute dynamic mutant subsumption
mutation.advanced.dynamicSubsumption.reduceGraph= [true/false] : transitive reduction of the graph (analysis results are otherwise not affected)
mutation.advanced.dynamicSubsumption.output= [output folder] : where to store dynamic subsumption results
This analysis requires running all tests so quick death option is not compatible with this analysis.
muJava++ 1.6.2 mujava2 framework prototype and hotfixes
mujava2 framework
This release contains the first prototype of the new mujava2 framework.
This new framework is located in package mujava2 and a main class can be used as a playground to test the new functionalities (this class is found in mujava2.api.TestMJ2). This new framework also offers an Api class but it's not tested yet.
Some of the features that offer this new framework are:
- A way to represent mutants as an AST and a set of mutations instead of a mutated AST or just a (original node, mutated node) tuple. This representation is defined by the class
mujava2.api.program.MutatedASTand the AST is represented by the classmujava2.api.program.JavaAST - Given a MutatedAST instance a mutant can be written without modifying the ast.
- Mutations in a MutatedAST can be applied and restored (undo the applied mutations) per class, method and/or method and line.
- MutatedAST supports many mutations and every instance can have a MutatedAST as a parent to represent generations.
Bug fixes
- When defining a method to mutate using it's signature instead of using comma to separate the type now the separator will be ";" for example : foo(String;int;List)
- Type checking in PRVO operators regarding primitive to Object assignment (this checking also involves operations like comparisons).
- The code necessary in PRVO_WRITER to write wrapped primitive type expressions mutants (obj == true => obj == new Boolean(true)) was missing.
- mujava.op.util.Mutator#compatibleAssignType(OJClass, OJClass, boolean) when called with Object, a primitive type and false should've returned false. Instead it was evaluating Object, the wrapper type of the primitive type and returning true.
- When running mutations score, mutant information will be showed before compiling the mutant (this information was being shown only for compiling mutants).
- A wrong parameter was being used when checking compatible types in the sameLenght PRVO method.
muJava++ 1.6.1 hotfix
Fixed a bug in mujava.op.util.Mutator#compatibleAssignType(OJClass, OJClass, boolean) that returned false in assignments of the type
type<null> = non-null
type<null> = non-primitive
type<null> = non-type<null>
When running muJava++ to just generate mutants the option fullVerbose will now display all the mutants information.
This bug was detected in PRVO operators but it may have affected others. It didn't cause invalid mutations to be generated but instead it caused mutations to be discarded as invalid.
If you where running an experiment then you could run the muJava++ part again and add the information of the new mutants.
MuJava++ 1.6
Changes:
- More mutant information when calculating mutation score.
- Test results, when running mutation score, now shows the name of the test class.
- Test classes verification will only load the selected test classes
- the previous (load all classes in test folder) implementation caused exceptions in incomplete projects
Fixes:
- Toughness analysis per mutant was being calculated for each test instead of using all tests.
- fixed a bug in test/mutationScore.BooleanOpsAndTests that caused a test case to fail on a correct implementation of utils.BooleanOps#and(boolean, boolean).
- fixed mujava.util.ConfigReader#stringArgumentsAsArray(String) returning a one element array (with an empty string) when no arguments where declared.
Additions:
- New property option mutation.advanced.outputMutationsInfoInMutationScore to enable the output of mutations made on each mutant when running mutation score
- New property option mutation.advanced.useSimpleClassNames to choose whether types are written using their simple name or the fully qualified name
- e.g.: java.lang.String is written as String when this option is set to true
- fully qualified names can cause non-compiling mutants when using generics
MuJava++ 1.5.5 hotfix and cleaner class names
Mutants are no longer written using fully qualified class names.
In previous versions a class A of the package a.b was being written as a.b.A while now it will be written as just A.
The option mutation.advanced.allowFieldMutations was being taken as true by PRVO operator regardless of it's value
MuJava++ 1.5.4 bug fixes
Changes:
- PRVO and mujava.openjava.extension.EvaluationShuttle used the new methods in mujava.op.util.Mutator to check the method to mutate.
- PRVO now checks for expected arguments (if given) when obtaining the method return type
of the method under consideration defined in the Api.
Fixes:
- All operators where being used even when defining specific ones in the .properties file.
- PNC operator was throwing an exception when dealing with a class with generics (this issue may appear in other operators and will be fixed if found).
- A bug in mujava.util.Config#isValidOp(String) that was returning the first of the mutant operators regardless of the operator passed as argument.
Additions:
- if the output folder exists a confirmation will be displayed before deleting that folder.
- added new methods to mujava.op.util.Mutator to check the method to mutate :
- checkApiConstructorNodeAgainstMethodToMutate
checks whether a constructor matches the method to mutate defined in the Api - checkApiMethodNodeAgainstMethodToMutate
checks whether a constructor matches the method to mutate defined in the Api - checkMethodNodeAgainstMethodToMutate
checks whether a method mathes a expected name and arguments - checkConstructorNodeAgainstMethodToMutate
checks whether a constructor mathes a expected name and arguments
- checkApiConstructorNodeAgainstMethodToMutate
- [WIP] support for defining inner classes in .properties file.
- [WIP] support for method names of the form NAME(TYPE*) to select exactly which method to mutate.
- Checks in PRVO_WRITER to detect cases where a node (original or mutant) does not match the contemplated node types.
- Debugging checks to mujava.op.util.MutantCodeWriter to detect if a mutation is not written
MuJava++ 1.5.3 toughness analysis added
This updates brings support for toughness analysis.
This analysis is done for each mutant by the formula 1 - (failing tests / total tests) and an average toughness calculated by the sum of each mutant toughness value divided the total of mutants.
A new properties key is now supported:
mutation.advanced.toughness= [BOOLEAN]
Notice that if toughness analysis is enabled then quick death is disabled.
This updates also fixes an issue that caused JUnit tests with only @Test tags not being recognized as JUnit tests
This release only updates the mujava.jar, for other files (such as configuration and libraries) please refer to the 1.5 release.