One function
FreeFormattingTokenizer in terryyin/lizard
The author described this change as “fix a line counting bug”. It counts as a record because the check below fails on the code as it stood at c3681a0a1 and passes on 0138e46c8, with nothing else changed between the two runs.
Projectterryyin/lizard
Fix saved2014-03-30
Sharing licenceMIT · LICENSE.txt
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Use this tokenizer to tokenize C/C++, Java, ObjC code, which the format is not part of the syntax. So indentation & new lines doesn't matter.
The change
| 17 | 17 | r"|&=|&&|&"+ | |
| 18 | 18 | r"|[!%^&\*\-=+\|\\<>/\]\+]+"+ | |
| 19 | 19 | r"|\n"+ | |
| 20 | - | r"|\s+"+ | |
| 20 | + | r"|[^\S\n]+"+ | |
| 21 | 21 | r"|.)", re.M | re.S) | |
| 22 | 22 | ||
| 23 | 23 | def __call__(self, source_code): |
The check that tells the two apart
fail→pass·test/testBasicFunctionInfo.py::TestLOC::test_having_empty_line_that_has_spaces
Check file test/testBasicFunctionInfo.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itc3681a0a17a8ac5b1a65743beb173ff5059052d8
Broken version dated2014-03-30
Modulelizard
Units changedFreeFormattingTokenizer
Fingerprint4f133372b8731b8b
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in terryyin/lizard
- 2026-08-08fix(java): do not report control structures as methods
- 2026-07-02HalsteadClassifier
- 2026-07-02fix(csv): emit columns for extensions with multiple FUNCTION_INFO fields
- 2026-06-15fix(golike): register generic functions with [...] type params
- 2026-06-15fix(java): enhance parsing of generic and qualified type names in anonymous classes
- 2026-06-11fix(script): stop a '#' comment continuing past a trailing backslash (#317)