Repository navigation
CodeTailor: regroup Java puzzles into larger, labeled blocks - #1619
Merged
bnmnetp merged 2 commits intoOct 20, 2026
Merged
Conversation
CodeTailor's Java puzzles put most lines in their own block, so a puzzle
is full of identical { and } blocks and of statements whose order does
not matter, while the line grader accepts only one order (e.g. three
constructor assignments in a different order were marked wrong). Regroup
finished Java puzzles so an opening brace joins its header, each closing
brace is labeled with what it closes (} // end getPrice), and
consecutive same-indentation statements share a block. Paired
distractors become a copy of the regrouped block with their lines
swapped in. Puzzles with settled blocks are left as they are.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lock
CodeTailor sometimes pairs a block like "}" / header / "{" with a
distractor that differs only in the header. Keeping that block whole
left the previous method's closing brace stuck to the next header,
unlabeled. Lines shared by the block and all its distractors at either
end now regroup like any other line; only the differing lines are
swapped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CodeTailor's Java puzzles put most lines in their own block. That leaves a puzzle full of identical
{and}blocks, plus statements whose order doesn't matter, and the line grader accepts only one order. For example, three constructor assignments in a different order are marked wrong, and the feedback then also highlighted several brace blocks.This regroups a finished Java puzzle (new
java_puzzle_blocks.py, called at the end ofget_parsons_help):public int getPrice()+{)} // end getPrice,} // end if,} // end constructor,} // end classPuzzles with
#settledblocks are returned unchanged, so "Multiple"-level puzzles are not affected. Python puzzles are not affected.On five new CSAwesome Unit 3 problems, puzzles went from 16–27 blocks to 10–16, with no bare
{/}blocks left, and they check out in the browser. Tests:test/bases/rsptx/book_server_api/test_java_puzzle_blocks.py.🤖 Generated with Claude Code