private static IEnumerable<StatementSyntax> InlineLargeGuardedBranches2(IfStatementSyntax syntax) { Contract.Requires(syntax != null); var trueIsAGuard = syntax.Statement.IsGuaranteedToJumpOut(); var falseIsAGuard = syntax.Else != null && syntax.Statement.IsGuaranteedToJumpOut(); var preferTrue = trueIsAGuard; if (trueIsAGuard == falseIsAGuard && syntax.Else != null) { preferTrue = 2 * syntax.Statement.Bloat() >= syntax.Else.Bloat(); } if (trueIsAGuard && preferTrue) return syntax.WithUnguardedElse(); if (falseIsAGuard && !preferTrue) return syntax.Inverted().WithUnguardedElse(); return new[] { syntax }; }