You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WITHDRAWN: Java complexity does not count catch (not a bug: branch contract corollary 1) #8867
bugUnintended behavior or logic failure in the engineclaim:melekcore-engineModifications to the central physics and parsing engineinvalidDoes not apply, cannot reproduce, or out of scopepriority: medium
In Java, a catch clause does not add to complexity. In retrofit (2,616 functions) the oracle sees a branch in 681 functions and the family in 425 (recall 0.62, precision 0.99). Among the branches the family missed, catch clauses account for 307 functions and && for 11.
complexity == 0 for caught, though the exception path is a second route through the function. The try/catch/&&/|| forms are all standard McCabe decision points.
Expected
Either catch (and &&, || where it does not) counts toward complexity and struct_branch for Java, or the family definition says it does not and #8862 records why. Check the other languages with exception handlers (C#, Kotlin, Scala, JavaScript counts it at 0.96/0.96, Python at 0.99/0.98).
Part of #8863. Time the change; add the case above as a test.
Claimed by promoter-bot host melek, lease renewed 2026-11-21T17:51Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:melek label.
Withdrawn (2026-11-21): this is not a bug. The branch contract (docs/branch_rule_contract.md, corollary 1) says: "A handler is not a decision. catch/rescue/except/finally/ensure/trap, the guarded-region opener ... and the raiser (throw) mark where control leaves or arrives; the decision was made by the throw. They are safety's constructs." The engine was changed to that on purpose across 27 rules, so Java not counting catch as a branch is the contract working. My oracle counted catch as a branch because I had not read the contract's corollaries; the oracle now follows them (tests/tools PR #8864), and two independent agents hit the same contradiction. I am marking this invalid and retitling it; closing it is the maintainer's call.
changed the title [-]Java: complexity does not count catch clauses (recall 0.62, 307 functions)[/-][+]WITHDRAWN: Java complexity does not count catch (not a bug: branch contract corollary 1)[/+]on Nov 21, 2026
Leftovers: (1) csharp and groovy branch also lack &&/||. (2) The family oracle (#8864) should not count catch as a branch for Java: branch_rule_contract.md corollary 1 says a handler is not a decision. (3) keyword-rosetta has no Java && plant.
bugUnintended behavior or logic failure in the engineclaim:melekcore-engineModifications to the central physics and parsing engineinvalidDoes not apply, cannot reproduce, or out of scopepriority: medium
Activity
squid-protocol commentedon Nov 21, 2026
Claimed by promoter-bot host
melek, lease renewed 2026-11-21T17:51Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove theclaim:meleklabel.squid-protocol commentedon Nov 21, 2026
Withdrawn (2026-11-21): this is not a bug. The branch contract (
docs/branch_rule_contract.md, corollary 1) says: "A handler is not a decision.catch/rescue/except/finally/ensure/trap, the guarded-region opener ... and the raiser (throw) mark where control leaves or arrives; the decision was made by the throw. They aresafety's constructs." The engine was changed to that on purpose across 27 rules, so Java not countingcatchas a branch is the contract working. My oracle countedcatchas a branch because I had not read the contract's corollaries; the oracle now follows them (tests/tools PR #8864), and two independent agents hit the same contradiction. I am marking thisinvalidand retitling it; closing it is the maintainer's call.[-]Java: complexity does not count catch clauses (recall 0.62, 307 functions)[/-][+]WITHDRAWN: Java complexity does not count catch (not a bug: branch contract corollary 1)[/+]Re-bless goldens: Java branch counts && and || (#8867)
squid-protocol commentedon Nov 21, 2026
Leftovers: (1) csharp and groovy
branchalso lack&&/||. (2) The family oracle (#8864) should not countcatchas a branch for Java: branch_rule_contract.md corollary 1 says a handler is not a decision. (3) keyword-rosetta has no Java&&plant.Re-bless doom-rosetta mochadoom golden: Java branch counts && and || (#…
Merge origin/main into churn/8867; re-bless goldens (#8867)
Regenerate docs_read_by_tests.txt after merging main (#8867)
Merge origin/main into churn/8867 (#8867)
Re-bless goldens after merging main: Java branch counts && and || (#8867
Java branch counts && and ||; catch stays out per the branch contract (…