Skip to content

Updated PR: Comment transition detection in block tracking#210

Open
parinaz-st wants to merge 8 commits into
jodavimehran:masterfrom
parinaz-st:feature/CmtTransitionDetectionBlock
Open

Updated PR: Comment transition detection in block tracking#210
parinaz-st wants to merge 8 commits into
jodavimehran:masterfrom
parinaz-st:feature/CmtTransitionDetectionBlock

Conversation

@parinaz-st

Copy link
Copy Markdown

Support for uncommented Block detection, Comment statement transition detection for matched blocks

@parinaz-st

Copy link
Copy Markdown
Author

Update:
I've continued improving this feature since opening the PR.
I've added support for uncommented block detection involving:
-reconstruction of multiline block signatures from both // and /* */ comments
-block signatures with the opening brace on the following line
-braceless control blocks
-multiple block signatures within a single block comment

I also refined the commented-out/uncommented code detection for matched blocks.
In cases where one statement is commented out and a similar statement is uncommented within the same commit,
RefactoringMiner may match the two statements as a mapping with replacements, so they no longer appear in the commentedOut and unCommented collections.
The implementation now inspects these mappings and compares them against the added/deleted comments to correctly identify the comment transition.
Finally, I started identifying uncommented block cases in real-world repositories and validating the implementation against them. I'll continue extending the implementation as I encounter additional real-world scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant