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
Groovy: branch counts the ?. operator and misses && and ||; bitwise_ops counts =~ and ==~ #8912
Groovy branch and bitwise_ops count things that are not decisions or bit operations. Found with a Groovy oracle on the pinned language-crucible (709 functions matched; args 0.98 / 1.00; branch recall 0.89, precision 0.60; without the shapes below precision is 0.98). Note the Groovy tree-sitter grammar is weak (about 10% of the corpus lands in error nodes), so this oracle is a lexer plus function heads.
bitwise_ops counts =~ and ==~ (the regex match operators): s ==~ /a-b/ scores 1, should be 0.
Reproduce (pinned scanner; counts read from function_data)
defchain(a) { return a?.b?.c } // struct_branch == 2, should be 0defbools(a, b, c) { return a && b || c } // 0 (a boolean-operator decision, #8905)defrx(s) { return s ==~/a-b/ } // bitwise_ops == 1, should be 0defrealIf(a) { if (a) { return1 }; return0 } // branch 1, correct
Expected
Anchor the ? on ternary position (and count Elvis ?: once as the value-selection operator the contract names); do not count ?.. Leave the boolean-operator question to #8905. Exclude =~, ==~ and ~ in a regex-operator position from bitwise_ops.
Part of #8863. Time the change; rosetta:rebless-owed if counts move; add each case as a test.
Partly covered by #8939: boolean operators are now the separate short_circuit family (Groovy gets a rule), so &&/|| do NOT belong in branch. PR #9018 (which added them to branch) was closed as superseded at the owner's direction. Still open here, to redo on top of the split after #8939 lands: ?. leaving branch, and =~ ==~ leaving bitwise_ops.
Claimed by promoter-bot host melek, lease renewed 2026-11-23T12:31Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:melek label.
Activity
squid-protocol commentedon Nov 22, 2026
Partly covered by #8939: boolean operators are now the separate
short_circuitfamily (Groovy gets a rule), so&&/||do NOT belong inbranch. PR #9018 (which added them tobranch) was closed as superseded at the owner's direction. Still open here, to redo on top of the split after #8939 lands:?.leavingbranch, and=~ ==~leavingbitwise_ops.squid-protocol commentedon Nov 22, 2026
Claimed by promoter-bot host
melek, lease renewed 2026-11-23T12:31Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove theclaim:meleklabel.squid-protocol commentedon Nov 23, 2026
Fixed by #9111 (merged as fcc440b), which carried this issue's PR (rebuilt with eight others to re-bless the golden snapshots once).