AutoRefactor
AutoRefactor copied to clipboard
New refactoring - Remove reverse expressions
Example 1
Code to refactor:
if (b) {
} else if (!b) {
}
Refactored code:
if (b) {
} else {
}
Example 2
Code to refactor:
if (b) {
} else if (!b && c) {
}
Refactored code:
if (b) {
} else if (c) {
}
Example 3
Code to refactor:
if (b || (!b && c)) {
}
Refactored code:
if (b || c) {
}
Example 4
Code to refactor:
boolean bool = b || (!b && c);
Refactored code:
boolean bool = b || c;
Etc.
It might depend on issue #32
It is certainly part of a larger issue which consists of removing duplicate tests.