I am really interested in your problem and tried to offer an earlier solution by extracting conditions to separate methods like this
public class Test { public static void main(String[] args) { cyclometricComplexityTest(); } static boolean cond1 = true; static boolean cond2 = true; static boolean cond3 = true; static boolean cond4 = true; static boolean cond5 = true; public static Object cyclometricComplexityTest() { if (isBoolean1()) {
Below are the results of the Cyclometric Complexity reduction (I used the MetricsReloaded IntelliJ IDEA plugin ). It really works, spreading complexity between the main and auxiliary methods :)

PS An interesting thing: I tried to extract your conditions as local variables and did not reduce the complexity of the method, as I expected.
source share