Anyway, I find this way of calculating CC quit confusing. For me a boolean does not define a branch; branches are sets of instructions that are executed or not.
Also, Booleans are sometimes considered as any other type and sometimes not. For instance, in the expression x or: y, why the first boolean (x) creates two branches but not the second. i.e. why ^x or: y <=> x ifTrue:[^true] ifFalse[^y] and not ^x or: y <=> x ifTrue:[^true] ifFalse[y ifTrue:[^true] ifFalse:[^false]]
Besides, in the following code
self doSomethingIf: (condition1 or: condition2) => 1 branches, doSomethingIf: is always invoked. but CC = 2
That’s why I would rather ignore boolean operators when calculating CC. But this is a personal opinion :)