AutoRefactor icon indicating copy to clipboard operation
AutoRefactor copied to clipboard

New refactoring - Remove reverse expressions

Open JnRouvignac opened this issue 12 years ago • 2 comments

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.

JnRouvignac avatar Apr 26 '13 06:04 JnRouvignac

It might depend on issue #32

JnRouvignac avatar Apr 26 '13 21:04 JnRouvignac

It is certainly part of a larger issue which consists of removing duplicate tests.

JnRouvignac avatar Aug 29 '13 08:08 JnRouvignac