Public report of AnywhereSoftware/B4A, published 16 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 16 November 2026, 21:01 UTC · Survey ID cd_52cf25d0324f4649a6f9d766ac7a6919
AnywhereSoftware/B4A
Measured 16 November 2026, 21:01 UTC, at code version 6301b3c
First survey, so nothing to compare with yet
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 81,885 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Production Readiness, 10.4
Findings by how serious they are
8 critical699 serious29 minor
23 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 21:01 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
37of 37 dimensions measured by tools.
728of 736 findings point to an exact file and line, so you can open each one in the code. The other 8 concern the repository as a whole, such as missing documentation.
37dimensions across 5 lenses, read from 81,885 lines of product code in 1 project.
AnywhereSoftware/B4A falls short of our standard for production because the project has no automated tests and we found no working pipeline that builds or tests changes to the code. It scores 31.7 out of 100 and is rated Weak, and seven of its eight critical findings are security problems.
Production Readiness, at 10.4, is the weakest lens and counts most in the score. The best first step is adding automated tests, worth about 21.4 points. Adding an automated build and test pipeline comes next, worth about 6.6 points. Raising Production Readiness to 70 would lift the score to about 50.8.
Three weaknesses in the code could be used by an attacker. Two passwords or keys are open to anyone who can read the repository, and two places turn outside data straight into objects, which an attacker could use. Fixing the weaknesses the scanner points to, replacing each exposed password or key and reading outside data into plain values would close these risks.
The product code is 81,885 lines, about €70,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 10.4 to 70, the lowest score rated Strong, the score would rise from 31.7 to about 50.8.
Code composition: what the lines of code are
Product code 100%
Rebuild cost: about €70,000 · Estimate
Cost to rebuild
€23,000 to €120,000, for 386 to 1,224 hours of work, about 0.5 person-years for one engineer
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 32. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 81,885 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No automated tests finding(s) in Code Coverage.
Raises the score by about 21.4 points · High effort · Code Coverage
2
Add a CI workflow that builds and runs the test suite on every push/PR.
Raises the score by about 6.6 points · Medium effort · CI/CD gates
3
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag.
Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Raises the score by about 6.6 points · Medium effort · Observability
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €70,000 to build again, about 0.5 person-years of work. Its weakest lens is Production Readiness, at 10.4 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No automated tests finding(s) in Code Coverage. Of all the actions in this report, it raises the score most for the work it takes: about 21.4 points for high effort, because it clears the 1 Code Coverage findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.6 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 8% on every change. The history of the code shows how much it changes: about 268 lines over the last 90 days, which is about 1,087 lines a year. At that pace, the extra work comes to an estimated 0.1 to 0.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
38 modules, with 53 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
anywheresoftware.b4a.keywords.constants uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.keywords.constants, while a change to anywheresoftware.b4a.keywords.constants can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.keywords.constants uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.obejcts uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.obejcts, while a change to anywheresoftware.b4a.obejcts can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.obejcts uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.object uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.object, while a change to anywheresoftware.b4a.object can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.object uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects.collections uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.objects.collections, while a change to anywheresoftware.b4a.objects.collections can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.objects.collections uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects.drawable uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.objects.drawable, while a change to anywheresoftware.b4a.objects.drawable can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.objects.drawable uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects.wifidirect uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.objects.wifidirect, while a change to anywheresoftware.b4a.objects.wifidirect can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.objects.wifidirect uses a module listed above it, which is the healthy direction.
anywheresoftware.b4x.objects uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4x.objects, while a change to anywheresoftware.b4x.objects can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4x.objects uses a module listed above it, which is the healthy direction.
com.hoho.android.usbserial.util uses com.hoho.android.usbserial.driver, so a change to com.hoho.android.usbserial.driver can break com.hoho.android.usbserial.util, while a change to com.hoho.android.usbserial.util can't break com.hoho.android.usbserial.driver.
Position
Below the diagonal: com.hoho.android.usbserial.util uses a module listed above it, which is the healthy direction.
okhttp3.internal.huc uses okhttp3.internal, so a change to okhttp3.internal can break okhttp3.internal.huc, while a change to okhttp3.internal.huc can't break okhttp3.internal.
Position
Below the diagonal: okhttp3.internal.huc uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.gps uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.gps, while a change to anywheresoftware.b4a.gps can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.gps uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.gps uses anywheresoftware.b4a.objects.collections, so a change to anywheresoftware.b4a.objects.collections can break anywheresoftware.b4a.gps, while a change to anywheresoftware.b4a.gps can't break anywheresoftware.b4a.objects.collections.
Position
Below the diagonal: anywheresoftware.b4a.gps uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects.streams uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.objects.streams, while a change to anywheresoftware.b4a.objects.streams can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.objects.streams uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects.streams uses anywheresoftware.b4a.objects.collections, so a change to anywheresoftware.b4a.objects.collections can break anywheresoftware.b4a.objects.streams, while a change to anywheresoftware.b4a.objects.streams can't break anywheresoftware.b4a.objects.collections.
Position
Below the diagonal: anywheresoftware.b4a.objects.streams uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.sql uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.sql, while a change to anywheresoftware.b4a.sql can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.sql uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.sql uses anywheresoftware.b4a.objects.collections, so a change to anywheresoftware.b4a.objects.collections can break anywheresoftware.b4a.sql, while a change to anywheresoftware.b4a.sql can't break anywheresoftware.b4a.objects.collections.
Position
Below the diagonal: anywheresoftware.b4a.sql uses a module listed above it, which is the healthy direction.
anywheresoftware.b4h.okhttp uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4h.okhttp, while a change to anywheresoftware.b4h.okhttp can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4h.okhttp uses a module listed above it, which is the healthy direction.
anywheresoftware.b4h.okhttp uses anywheresoftware.b4a.objects.collections, so a change to anywheresoftware.b4a.objects.collections can break anywheresoftware.b4h.okhttp, while a change to anywheresoftware.b4h.okhttp can't break anywheresoftware.b4a.objects.collections.
Position
Below the diagonal: anywheresoftware.b4h.okhttp uses a module listed above it, which is the healthy direction.
anyhwheresoftware.b4a.objects.sqlcipher uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anyhwheresoftware.b4a.objects.sqlcipher, while a change to anyhwheresoftware.b4a.objects.sqlcipher can't break anywheresoftware.b4a.
Position
Below the diagonal: anyhwheresoftware.b4a.objects.sqlcipher uses a module listed above it, which is the healthy direction.
anyhwheresoftware.b4a.objects.sqlcipher uses anywheresoftware.b4a.objects.collections, so a change to anywheresoftware.b4a.objects.collections can break anyhwheresoftware.b4a.objects.sqlcipher, while a change to anyhwheresoftware.b4a.objects.sqlcipher can't break anywheresoftware.b4a.objects.collections.
Position
Below the diagonal: anyhwheresoftware.b4a.objects.sqlcipher uses a module listed above it, which is the healthy direction.
anyhwheresoftware.b4a.objects.sqlcipher uses anywheresoftware.b4a.sql, so a change to anywheresoftware.b4a.sql can break anyhwheresoftware.b4a.objects.sqlcipher, while a change to anyhwheresoftware.b4a.objects.sqlcipher can't break anywheresoftware.b4a.sql.
Position
Below the diagonal: anyhwheresoftware.b4a.objects.sqlcipher uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.keywords uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.keywords, while a change to anywheresoftware.b4a.keywords can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.keywords uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.keywords uses anywheresoftware.b4a.keywords.constants, so a change to anywheresoftware.b4a.keywords.constants can break anywheresoftware.b4a.keywords, while a change to anywheresoftware.b4a.keywords can't break anywheresoftware.b4a.keywords.constants.
Position
Below the diagonal: anywheresoftware.b4a.keywords uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.keywords uses anywheresoftware.b4a.objects.collections, so a change to anywheresoftware.b4a.objects.collections can break anywheresoftware.b4a.keywords, while a change to anywheresoftware.b4a.keywords can't break anywheresoftware.b4a.objects.collections.
Position
Below the diagonal: anywheresoftware.b4a.keywords uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.keywords uses anywheresoftware.b4a.objects.drawable, so a change to anywheresoftware.b4a.objects.drawable can break anywheresoftware.b4a.keywords, while a change to anywheresoftware.b4a.keywords can't break anywheresoftware.b4a.objects.drawable.
Position
Below the diagonal: anywheresoftware.b4a.keywords uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.keywords uses anywheresoftware.b4a.objects.streams, so a change to anywheresoftware.b4a.objects.streams can break anywheresoftware.b4a.keywords, while a change to anywheresoftware.b4a.keywords can't break anywheresoftware.b4a.objects.streams.
Position
Below the diagonal: anywheresoftware.b4a.keywords uses a module listed above it, which is the healthy direction.
32→35 anywheresoftware.b4a.keywords uses anywheresoftware.b4a.objectspart of a loop✕
Connections
5 pairs of types, where a type in anywheresoftware.b4a.keywords uses a type in anywheresoftware.b4a.objects.
anywheresoftware.b4a.keywords uses anywheresoftware.b4a.objects, so a change to anywheresoftware.b4a.objects can break anywheresoftware.b4a.keywords, while a change to anywheresoftware.b4a.keywords can't break anywheresoftware.b4a.objects.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
anywheresoftware.b4a.objects.usb uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.objects.usb, while a change to anywheresoftware.b4a.objects.usb can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.objects.usb uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects.usb uses com.felhr.usbserial, so a change to com.felhr.usbserial can break anywheresoftware.b4a.objects.usb, while a change to anywheresoftware.b4a.objects.usb can't break com.felhr.usbserial.
Position
Below the diagonal: anywheresoftware.b4a.objects.usb uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects.usb uses anywheresoftware.b4a.objects.streams, so a change to anywheresoftware.b4a.objects.streams can break anywheresoftware.b4a.objects.usb, while a change to anywheresoftware.b4a.objects.usb can't break anywheresoftware.b4a.objects.streams.
Position
Below the diagonal: anywheresoftware.b4a.objects.usb uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.randomaccessfile uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.randomaccessfile, while a change to anywheresoftware.b4a.randomaccessfile can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.randomaccessfile uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.randomaccessfile uses anywheresoftware.b4a.objects.streams, so a change to anywheresoftware.b4a.objects.streams can break anywheresoftware.b4a.randomaccessfile, while a change to anywheresoftware.b4a.randomaccessfile can't break anywheresoftware.b4a.objects.streams.
Position
Below the diagonal: anywheresoftware.b4a.randomaccessfile uses a module listed above it, which is the healthy direction.
145 pairs of types, where a type in anywheresoftware.b4a.objects uses a type in anywheresoftware.b4a. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
anywheresoftware.b4a.objects uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects uses com.android.vending.licensing, so a change to com.android.vending.licensing can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break com.android.vending.licensing.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects uses com.astuetz, so a change to com.astuetz can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break com.astuetz.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects uses com.hoho.android.usbserial.driver, so a change to com.hoho.android.usbserial.driver can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break com.hoho.android.usbserial.driver.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects uses io.crossbar.autobahn.websocket, so a change to io.crossbar.autobahn.websocket can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break io.crossbar.autobahn.websocket.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects uses org.w3c.tidy, so a change to org.w3c.tidy can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break org.w3c.tidy.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects uses anywheresoftware.b4a.keywords.constants, so a change to anywheresoftware.b4a.keywords.constants can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break anywheresoftware.b4a.keywords.constants.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects uses anywheresoftware.b4a.objects.collections, so a change to anywheresoftware.b4a.objects.collections can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break anywheresoftware.b4a.objects.collections.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects uses anywheresoftware.b4a.objects.drawable, so a change to anywheresoftware.b4a.objects.drawable can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break anywheresoftware.b4a.objects.drawable.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects uses anywheresoftware.b4a.sql, so a change to anywheresoftware.b4a.sql can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break anywheresoftware.b4a.sql.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.objects uses anywheresoftware.b4a.keywords, so a change to anywheresoftware.b4a.keywords can break anywheresoftware.b4a.objects, while a change to anywheresoftware.b4a.objects can't break anywheresoftware.b4a.keywords.
Position
Below the diagonal: anywheresoftware.b4a.objects uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.admobwrapper uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.admobwrapper, while a change to anywheresoftware.b4a.admobwrapper can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.admobwrapper uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.admobwrapper uses com.google.ads.consent, so a change to com.google.ads.consent can break anywheresoftware.b4a.admobwrapper, while a change to anywheresoftware.b4a.admobwrapper can't break com.google.ads.consent.
Position
Below the diagonal: anywheresoftware.b4a.admobwrapper uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.admobwrapper uses anywheresoftware.b4a.objects.collections, so a change to anywheresoftware.b4a.objects.collections can break anywheresoftware.b4a.admobwrapper, while a change to anywheresoftware.b4a.admobwrapper can't break anywheresoftware.b4a.objects.collections.
Position
Below the diagonal: anywheresoftware.b4a.admobwrapper uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.admobwrapper uses anywheresoftware.b4a.objects, so a change to anywheresoftware.b4a.objects can break anywheresoftware.b4a.admobwrapper, while a change to anywheresoftware.b4a.admobwrapper can't break anywheresoftware.b4a.objects.
Position
Below the diagonal: anywheresoftware.b4a.admobwrapper uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.audio uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.audio, while a change to anywheresoftware.b4a.audio can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.audio uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.audio uses anywheresoftware.b4a.objects, so a change to anywheresoftware.b4a.objects can break anywheresoftware.b4a.audio, while a change to anywheresoftware.b4a.audio can't break anywheresoftware.b4a.objects.
Position
Below the diagonal: anywheresoftware.b4a.audio uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.phone uses anywheresoftware.b4a, so a change to anywheresoftware.b4a can break anywheresoftware.b4a.phone, while a change to anywheresoftware.b4a.phone can't break anywheresoftware.b4a.
Position
Below the diagonal: anywheresoftware.b4a.phone uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.phone uses anywheresoftware.b4a.objects.collections, so a change to anywheresoftware.b4a.objects.collections can break anywheresoftware.b4a.phone, while a change to anywheresoftware.b4a.phone can't break anywheresoftware.b4a.objects.collections.
Position
Below the diagonal: anywheresoftware.b4a.phone uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.phone uses anywheresoftware.b4a.objects.drawable, so a change to anywheresoftware.b4a.objects.drawable can break anywheresoftware.b4a.phone, while a change to anywheresoftware.b4a.phone can't break anywheresoftware.b4a.objects.drawable.
Position
Below the diagonal: anywheresoftware.b4a.phone uses a module listed above it, which is the healthy direction.
anywheresoftware.b4a.phone uses anywheresoftware.b4a.objects, so a change to anywheresoftware.b4a.objects can break anywheresoftware.b4a.phone, while a change to anywheresoftware.b4a.phone can't break anywheresoftware.b4a.objects.
Position
Below the diagonal: anywheresoftware.b4a.phone uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 53.5 · Adequate · gated by X5 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
24
High / Critical
A07:2025 — Authentication Failures
3
High / Critical
Roadmap
Top priorities: Resolve the 1 No automated tests finding(s) in Code Coverage; Add a CI workflow that builds and runs the test suite on every push/PR; Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No automated tests finding(s) in Code Coverage.
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 8
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 699
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 29
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 23
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 37 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 37 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 728 of 736 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D5 Coupling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. No dependency manifest this pass reads for hygiene (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)) was found in this repository, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D30 wherever the manifest is OSV-readable.
D14 License Compliance — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — no dependency manifest this pass reads for licence data (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)) was found in this repository, so it declares no third-party dependency closure to grade. A gap in the analyzer, NOT a finding that this repository's licences are compliant: a manifest in an ecosystem outside that list, or third-party code copied into the tree, is not read — so this dimension asserts nothing about this repository's licensing in either direction.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Too few commits for a meaningful bus factor (37 commit(s) sampled, fewer than the 50 this dimension needs before a bus factor means anything).
D20 ADR Quality — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The ADR expectation is gated on whether a repository ships a deployable product. Our repo-kind classifier reads .NET project files and the host and package markers of the other ecosystems it knows (a Go `package main`, a Cargo binary, a package.json `bin`, `start` script or application dev server such as Vite or Next, Python console scripts or a Django/WSGI entry point, a Spring Boot / WAR / Gradle application build, a Rack or Rails app, a Composer project, an OTP release or escript, a Dockerfile, a Procfile, a Platform.sh `.platform/routes.yaml`, and the corresponding published-package manifests, including an OTP `*.app.src`, a Drupal module's `*.info` and a Claude Code `.claude-plugin/plugin.json`), and found none here, so we could not tell what kind of repository this is and did not assess its ADR log. This is a gap in our analyzer, not a finding about this repository. No manifest, project file or entry point of any ecosystem it reads exists in this tree.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's source is written only in languages whose packages are published through a manifest, and no manifest in the tree makes a publication act: either there is no package manifest of any ecosystem (no package.json, pyproject.toml, setup.py, gemspec, Cargo.toml, pom.xml, build.gradle, composer.json, pubspec.yaml or mix.exs), or every one present declares in its package manager's own terms that it is not published (an npm package marked "private": true, a Cargo package with publish = false, a pubspec with publish_to: none, a Composer "project", a Poetry project with package-mode = false, or the "Private :: Do Not Upload" classifier). With no publication act there is no intentionally-exposed surface for API consistency to be judged over.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (81885 LoC, 553 module-visible types across 76 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D34 Knowledge Freshness — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Too few commits to judge knowledge freshness (37 commit(s) sampled).
D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
AX3 Project dependency cycles — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which project references which. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module (and dep/glide/godep), Python pyproject.toml/setup.cfg/setup.py, SwiftPM, sbt, Mill, RubyGems, Composer, Mix/rebar3, pub, Unity assembly-definition, Deno/JSR, Tuist, CMake, Bazel, Xcode and XcodeGen builds and uni-app uni_modules plugins, or — when none declares a module — from the imports between a JavaScript/TypeScript, Python, Ruby, loose Rust, build-less C# or manifest-less Go tree's top-level directories, or as one module when all of a tree's source is one directory, and this repository offers none of them — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, and the source's own imports could not stand in: they are read for JavaScript/TypeScript, Python and Ruby only, and only when those languages are the product — in any other language a tree is read only when its whole source is one directory, which this one's is not. The collector owed is an import reader for this repository's languages. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
AX4 Dependency direction — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the direction each project reference points. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module (and dep/glide/godep), Python pyproject.toml/setup.cfg/setup.py, SwiftPM, sbt, Mill, RubyGems, Composer, Mix/rebar3, pub, Unity assembly-definition, Deno/JSR, Tuist, CMake, Bazel, Xcode and XcodeGen builds and uni-app uni_modules plugins, or — when none declares a module — from the imports between a JavaScript/TypeScript, Python, Ruby, loose Rust, build-less C# or manifest-less Go tree's top-level directories, or as one module when all of a tree's source is one directory, and this repository offers none of them — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, and the source's own imports could not stand in: they are read for JavaScript/TypeScript, Python and Ruby only, and only when those languages are the product — in any other language a tree is read only when its whole source is one directory, which this one's is not. The collector owed is an import reader for this repository's languages. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
AX8 Test isolation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which projects are test projects, and what they reference. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module (and dep/glide/godep), Python pyproject.toml/setup.cfg/setup.py, SwiftPM, sbt, Mill, RubyGems, Composer, Mix/rebar3, pub, Unity assembly-definition, Deno/JSR, Tuist, CMake, Bazel, Xcode and XcodeGen builds and uni-app uni_modules plugins, or — when none declares a module — from the imports between a JavaScript/TypeScript, Python, Ruby, loose Rust, build-less C# or manifest-less Go tree's top-level directories, or as one module when all of a tree's source is one directory, and this repository offers none of them — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, and the source's own imports could not stand in: they are read for JavaScript/TypeScript, Python and Ruby only, and only when those languages are the product — in any other language a tree is read only when its whole source is one directory, which this one's is not. The collector owed is an import reader for this repository's languages. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 38 further occurrence(s) are not listed individually; the score already reflects all 78.
P5 DR & Backup — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found. Whether there is anything here to recover could NOT be determined: persistence is detected from deployment/container manifests and from dependency manifests, and neither was readable by this pass, so a data store this code opens directly — a file, an embedded database — would not be visible to it. The blindness is this analyzer's, not a finding that the repository holds no data. You can widen what we reach: keep the deployment/container manifest or a dependency manifest in this repository — or a link to the ops repo that holds the DR evidence — so the persistence probe has something to read.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Kotlin and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Kotlin or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Kotlin and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Kotlin or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
64 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was TidyUtils.isXMLLetter at 156. A further 4 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Report.attrError at 29 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java (UsbSerial.usbClass at 18), Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java (Phone.GetNetworkType at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 59 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 7 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with TidyUtils.isXMLLetter (cyclomatic 156), Lexer.getToken (cyclomatic 146), PPrint.printChar (cyclomatic 135). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 7 together lifts Cyclomatic Complexity from 5.5 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 128 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 240 down to 240 or less in Cognitive Complexity — start with Lexer.getToken (cognitive 407), ParseInline.parse (cognitive 245), ParseBlock.parse (cognitive 244). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 4.3 to about 4.9/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 19 TooManyMethods finding(s) in God Classes — start with Tidy.java, Common.java, B4XViewWrapper.java. — One of this dimension's main actionable groups (19 warning-level).
Resolve the 16 ClassTooLong finding(s) in God Classes — start with Lexer.java, ParserImpl.java, PPrint.java. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 14 MethodTooLong finding(s) in God Classes — start with ParserImpl.java (4), Lexer.java (2), PPrint.java (2). — One of this dimension's main actionable groups (14 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
169 duplicated block group(s) detected. 7.7 % of the production lines (6,315 of 81,885) are in a reported copy. A further 108 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 122 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with ParserImpl.java (3), LayoutBuilder.java, Lexer.java. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 11 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with ParserImpl.java (3), Lexer.java (2), Common.java. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 10 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with AdViewWrapper.java, AttrCheckImpl.java, Lexer.java. — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Low cohesion: IME (LCOM4 5) · ×3Libs_IME/src/anywheresoftware/b4a/objects/IME.java:63
What to do
Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with IME.java, UsbSerial.java, RingtoneManagerWrapper.java. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D8 · Code Coverage0.0 / 10Critical✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
68 deducted task-comment markers across 81885 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 66 TodoComment finding(s) in Explicit Debt — start with BLED112SerialDevice.java (9), CDCSerialDevice.java (9), PL2303SerialDevice.java (9). — One of this dimension's main actionable groups (66 warning-level).
Resolve the 1 XxxComment finding(s) in Explicit Debt — start with Clean.java. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 HackComment finding(s) in Explicit Debt — start with Msgbox.java. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
5 naming inconsistencies among 118 declarations measured against a convention their peers follow.
`CheckTABLE` spells `TABLE` where 12 names in the project spell it `Table`Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:236
`driverID` spells `ID` where 120 names in the project spell it `Id`Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:519
`productID` spells `ID` where 120 names in the project spell it `Id`Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:519
`vendorID` spells `ID` where 120 names in the project spell it `Id`Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:519
`setDtrRts` spells `Dtr` where 26 names in the project spell it `DTR`Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java:264
What to do
Resolve the 1 `CheckTABLE` spells `TABLE` where 12 names in the project spell it… finding(s) in Naming Consistency — start with TagCheckImpl.java. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `driverID` spells `ID` where 120 names in the project spell it `Id` finding(s) in Naming Consistency — start with UsbSerial.java. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `productID` spells `ID` where 120 names in the project spell it `Id` finding(s) in Naming Consistency — start with UsbSerial.java. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
60 % of calls cross a namespace and 2 % go through an interface, but 98 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
+ 5 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`UsbSerialPort` declares 24 abstract methods: `close`, `getCD`, `getCTS`, `getControlLines`, `getDSR`, `getDTR`, `getDevice`, `getDriver`, `getPortNumber`, `getRI`, `getRTS`, `getReadEndpoint`, `getSerial`, `getSupportedControlLines`, `getWriteEndpoint`, `isOpen`, `open`, `purgeHwBuffers`, `read`, `setBreak`, `setDTR`, `setParameters`, `setRTS`, `write`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Libs_UsbSerial/src/com/hoho/android/usbserial/driver/UsbSerialPort.java:26
`UsbSerialInterface` declares 21 abstract methods: `close`, `getBreak`, `getCTS`, `getDSR`, `getFrame`, `getOverrun`, `getParity`, `open`, `read`, `setBaudRate`, `setDTR`, `setDataBits`, `setFlowControl`, `setParity`, `setRTS`, `setStopBits`, `syncClose`, `syncOpen`, `syncRead`, `syncWrite`, `write`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — felUsbSerial/src/com/felhr/usbserial/UsbSerialInterface.java:14
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Other · Code Health — Unreviewed-generation residue in this repository's Java: methods whose whole body only throws a "not implemented" or bare unsupported-operation exception, or returns a default value (or nothing) under a TODO/FIXME marker, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
`getItemId` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — B4AObjects/src/anywheresoftware/b4a/objects/SimpleListAdapter.java:76
`check` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:349
`getFirstChild` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMAttrImpl.java:175
`getLastChild` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMAttrImpl.java:184
`getOwnerDocument` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMAttrImpl.java:219
`getOwnerElement` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMAttrImpl.java:283
`getSchemaTypeInfo` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. (×2) — Libs_JTidy/src/org/w3c/tidy/DOMAttrImpl.java:292, Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:406
`getElementById` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:307
`getDocumentURI` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:325
`getDomConfig` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:334
`getInputEncoding` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:343
`getXmlEncoding` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:361
`getXmlStandalone` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:370
`normalizeDocument` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:390
`setDocumentURI` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:409
`setStrictErrorChecking` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:418
`setXmlStandalone` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:427
`setXmlVersion` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:436
`getEntities` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java:113
`getNotations` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java:122
`getPublicId` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java:131
`getSystemId` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java:140
`getInternalSubset` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java:149
`normalize` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:323
`hasAttribute` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:388
`hasAttributeNS` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:397
`getBaseURI` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:594
`getFeature` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:603
`getTextContent` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:612
`getUserData` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:621
`isEqualNode` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:638
`isSameNode` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:647
`setUserData` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:681
`getTarget` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMProcessingInstructionImpl.java:90
`getWholeText` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMTextImpl.java:108
`isElementContentWhitespace` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — Libs_JTidy/src/org/w3c/tidy/DOMTextImpl.java:117
`setRTS` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it. — felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:214
`setDTR` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it. — felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:220
`setFlowControl` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it. — felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:226
What to do
Finish or delete the methods that still throw "not implemented" or return a placeholder under a TODO, and replace placeholder text before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Java: methods that only throw a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
A branch guarded by a literal `false` can never execute — left-over disabled code. Remove it or restore the real condition. — B4AObjects/src/anywheresoftware/b4a/objects/PanelWrapper.java:131
`SetDataFolder` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java:742
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
The root README is 38 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers. — README.md:1
What to do
Expand the README with getting-started, architecture overview and a project map.
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Do you agree with this assessment?
P2 · Observability0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
What to do
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×29) — Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java:203, Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:112, Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:118, …
An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch. (×3) — Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:132, Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:136, Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:139
`catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1521
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether Java packages are null-marked and not undermined by heavy nullness suppression — a package under `@NullMarked` (or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, or a NullAway/Checker Framework configuration naming it) makes an unannotated reference exclude null, and `@SuppressWarnings("NullAway")`, `("nullness")`, `("null")` and `castToNonNull(…)` are what silence it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
0/76 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
What to do
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 6 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 70 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's Java imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean.
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
D12 Dependency Hygiene — Dependency hygiene not measured — no supported dependency manifest was read
D14 License Compliance — No dependency manifest found — no declared dependency closure to grade for licences
D16 Bus Factor — too few commits for a meaningful bus factor
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
D20 ADR Quality — Repository kind not determined
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .java, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D34 Knowledge Freshness — too few commits to judge knowledge freshness
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
D5 Coupling — D5 reads a .NET project-reference graph only — this repository's production source is .java, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (9 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
M4 Documentation accuracy — Not applicable: the 1 current-state document(s) make no claim of a kind M4 checks.
P12 CI test-gate honesty — no CI workflow found
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a pom.xml, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Java was read, and it logs through none that an assembled message defeats: java.util.logging's level methods, log4j 1, commons-logging, JBoss Logging and Flogger take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J or log4j 2 (`org.slf4j.Logger`, `org.apache.logging.log4j.Logger`, Lombok's `@Slf4j`) would be judged.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (JUnit (with Kotest or MockK on Kotlin)), and run it in CI so the gap cannot reopen.
TodoComment felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:216— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:222— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:235— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:241— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:247— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:253— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:259— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:265— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:227— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:233— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:239— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:245— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:251— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:257— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:263— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:269— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:343— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:349— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:355— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:361— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:264— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:270— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:276— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:282— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:288— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Unfinished stub — returns a placeholder under a TODO marker B4AObjects/src/anywheresoftware/b4a/objects/SimpleListAdapter.java:76— `getItemId` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — empty body under a TODO marker Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:349— `check` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMAttrImpl.java:175— `getFirstChild` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMAttrImpl.java:184— `getLastChild` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMAttrImpl.java:219— `getOwnerDocument` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMAttrImpl.java:283— `getOwnerElement` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMAttrImpl.java:292— `getSchemaTypeInfo` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:307— `getElementById` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:325— `getDocumentURI` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:334— `getDomConfig` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:343— `getInputEncoding` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:361— `getXmlEncoding` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:370— `getXmlStandalone` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — empty body under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:390— `normalizeDocument` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it.
Unfinished stub — empty body under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:409— `setDocumentURI` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it.
Unfinished stub — empty body under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:418— `setStrictErrorChecking` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it.
Unfinished stub — empty body under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:427— `setXmlStandalone` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it.
Unfinished stub — empty body under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:436— `setXmlVersion` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java:113— `getEntities` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java:122— `getNotations` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java:131— `getPublicId` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java:140— `getSystemId` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java:149— `getInternalSubset` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Unfinished stub — empty body under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:323— `normalize` is a shipped method whose body is empty except for a TODO/FIXME — scaffolding that was never completed. Implement it or remove it.
Unfinished stub — returns a placeholder under a TODO marker Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:388— `hasAttribute` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java:203— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:112— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:118— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:132— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:136— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:139— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:157— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:160— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java:139— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:333— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:336— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:706— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:707— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:708— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:709— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:948— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:949— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:950— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1309— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1310— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1311— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1401— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1402— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1441— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1473— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
TooManyMethods: Tidy Libs_JTidy/src/org/w3c/tidy/Tidy.java:79— TooManyMethods — 157 methods. The bar is 30 methods; this is 127 over it, 5.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Common B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:75— TooManyMethods — 126 methods. The bar is 30 methods; this is 96 over it, 4.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: B4XViewWrapper Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java:85— TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DelegatingHttpsURLConnection Libs_OkHttp/src/okhttp3/internal/huc/DelegatingHttpsURLConnection.java:42— TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: XMLBuilder REDACTED:86— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Clean Libs_JTidy/src/org/w3c/tidy/Clean.java:85— TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BA B4AShared/src/anywheresoftware/b4a/BA.java:56— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Lexer Libs_JTidy/src/org/w3c/tidy/Lexer.java:77— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ViewWrapper B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:53— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Node Libs_JTidy/src/org/w3c/tidy/Node.java:66— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PagerSlidingTabStrip Libs_TabStripViewPager/src/com/astuetz/PagerSlidingTabStrip.java:51— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RandomAccessFile REDACTED:69— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PPrint Libs_JTidy/src/org/w3c/tidy/PPrint.java:71— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ActivityWrapper B4AObjects/src/anywheresoftware/b4a/objects/ActivityWrapper.java:73— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DOMNodeImpl Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:68— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: OkHttpURLConnection Libs_OkHttp/src/okhttp3/internal/huc/OkHttpURLConnection.java:72— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DOMDocumentImpl Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:67— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: File B4AObjects/src/anywheresoftware/b4a/objects/streams/File.java:38— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CH34xSerialDevice felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:19— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Lexer Libs_JTidy/src/org/w3c/tidy/Lexer.java:77— ClassTooLong — 1717 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 1317 over it, 4.29× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ParserImpl Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:63— ClassTooLong — 1556 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 1156 over it, 3.89× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PPrint Libs_JTidy/src/org/w3c/tidy/PPrint.java:71— ClassTooLong — 1181 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 781 over it, 2.95× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Clean Libs_JTidy/src/org/w3c/tidy/Clean.java:85— ClassTooLong — 941 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 400 significant lines; this is 541 over it, 2.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Base64 Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:170— ClassTooLong — 879 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 479 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Common B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:75— ClassTooLong — 808 significant lines (blank, comment-only and punctuation-only lines excluded), 126 methods. The bar is 400 significant lines; this is 408 over it, 2.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Report Libs_JTidy/src/org/w3c/tidy/Report.java:74— ClassTooLong — 725 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 325 over it, 1.81× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: BA B4AShared/src/anywheresoftware/b4a/BA.java:56— ClassTooLong — 667 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 267 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Tidy Libs_JTidy/src/org/w3c/tidy/Tidy.java:79— ClassTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded), 157 methods. The bar is 400 significant lines; this is 242 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Node Libs_JTidy/src/org/w3c/tidy/Node.java:66— ClassTooLong — 572 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 172 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Phone Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:65— ClassTooLong — 519 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 119 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TagTable Libs_JTidy/src/org/w3c/tidy/TagTable.java:70— ClassTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 114 over it, 1.29× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: B4XViewWrapper Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java:85— ClassTooLong — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods. The bar is 400 significant lines; this is 67 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RandomAccessFile REDACTED:69— ClassTooLong — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 67 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TidyUtils Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:62— ClassTooLong — 463 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 63 over it, 1.16× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FTDISerialDevice felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:19— ClassTooLong — 419 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 19 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: Lexer.getToken Libs_JTidy/src/org/w3c/tidy/Lexer.java:1912— MethodTooLong — getToken runs 478 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 378 over it, 4.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ParseInline.parse Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1066— MethodTooLong — parse runs 257 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 157 over it, 2.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PPrint.printChar Libs_JTidy/src/org/w3c/tidy/PPrint.java:539— MethodTooLong — printChar runs 231 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 131 over it, 2.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ParseBlock.parse Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2012— MethodTooLong — parse runs 220 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 120 over it, 2.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TidyUtils.isXMLLetter Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:272— MethodTooLong — isXMLLetter runs 208 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 108 over it, 2.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Report.warning Libs_JTidy/src/org/w3c/tidy/Report.java:1215— MethodTooLong — warning runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WebSocketReader.processData Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketReader.java:134— MethodTooLong — processData runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Lexer.parseValue Libs_JTidy/src/org/w3c/tidy/Lexer.java:3210— MethodTooLong — parseValue runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Report.attrError Libs_JTidy/src/org/w3c/tidy/Report.java:1026— MethodTooLong — attrError runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PPrint.printTree Libs_JTidy/src/org/w3c/tidy/PPrint.java:2084— MethodTooLong — printTree runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ParseBody.parse Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:695— MethodTooLong — parse runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TidyUtils.isXMLNamechar Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:488— MethodTooLong — isXMLNamechar runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Tidy.mainExec Libs_JTidy/src/org/w3c/tidy/Tidy.java:739— MethodTooLong — mainExec runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ParseHTML.parse Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:269— MethodTooLong — parse runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FileTooLong: tidy/Lexer.java Libs_JTidy/src/org/w3c/tidy/Lexer.java— FileTooLong — 1722 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Lexer (77-4072). The bar is 500 significant lines; this is 1222 over it, 3.44× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: tidy/ParserImpl.java Libs_JTidy/src/org/w3c/tidy/ParserImpl.java— FileTooLong — 1557 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: ParserImpl (63-3629). The bar is 500 significant lines; this is 1057 over it, 3.11× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: tidy/PPrint.java Libs_JTidy/src/org/w3c/tidy/PPrint.java— FileTooLong — 1186 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: PPrint (71-2798). The bar is 500 significant lines; this is 686 over it, 2.37× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: tidy/Clean.java Libs_JTidy/src/org/w3c/tidy/Clean.java— FileTooLong — 942 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Clean (85-2408). The bar is 500 significant lines; this is 442 over it, 1.88× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: objects/Base64.java Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java— FileTooLong — 882 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Base64 (170-2087). The bar is 500 significant lines; this is 382 over it, 1.76× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: keywords/Common.java B4AObjects/src/anywheresoftware/b4a/keywords/Common.java— FileTooLong — 877 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: Common (75-1893). The bar is 500 significant lines; this is 377 over it, 1.75× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: tidy/Report.java Libs_JTidy/src/org/w3c/tidy/Report.java— FileTooLong — 733 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Report (74-1809). The bar is 500 significant lines; this is 233 over it, 1.47× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: b4a/BA.java B4AShared/src/anywheresoftware/b4a/BA.java— FileTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: BA (56-963). The bar is 500 significant lines; this is 202 over it, 1.40× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: tidy/Tidy.java Libs_JTidy/src/org/w3c/tidy/Tidy.java— FileTooLong — 657 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Tidy (79-2308). The bar is 500 significant lines; this is 157 over it, 1.31× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: tidy/Node.java Libs_JTidy/src/org/w3c/tidy/Node.java— FileTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Node (66-1532). The bar is 500 significant lines; this is 73 over it, 1.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: phone/Phone.java Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java— FileTooLong — 563 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: Phone (65-1209). The bar is 500 significant lines; this is 63 over it, 1.13× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: objects/B4XViewWrapper.java Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java— FileTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: B4XViewWrapper (85-842). The bar is 500 significant lines; this is 30 over it, 1.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: tidy/TagTable.java Libs_JTidy/src/org/w3c/tidy/TagTable.java— FileTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: TagTable (70-1069). The bar is 500 significant lines; this is 20 over it, 1.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 509 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: RandomAccessFile (69-778). The bar is 500 significant lines; this is 9 over it, 1.02× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Duplicated block (8 lines × 2) B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:68— B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:68-75 | B4AObjects/src/anywheresoftware/b4a/objects/RemoteViewsWrapper.java:41-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1376— Libs_JTidy/src/org/w3c/tidy/Lexer.java:1376-1383 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:1657-1664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1526— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1526-1533 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3270-3278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1526` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1588— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1588-1595 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2475-2482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1588` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2203— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2203-2212 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2219-2226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2203` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:427— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:427-434 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:523-530 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) Libs_StringUtils/src/anywheresoftware/b4a/objects/StringUtils.java:188— Libs_StringUtils/src/anywheresoftware/b4a/objects/StringUtils.java:188-195 | Libs_StringUtils/src/anywheresoftware/b4a/objects/StringUtils.java:278-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:294— Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:294-301 | Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:322-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:294` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) B4AObjects/src/anywheresoftware/b4a/objects/CompoundButtonWrapper.java:71— B4AObjects/src/anywheresoftware/b4a/objects/CompoundButtonWrapper.java:71-78 | B4AObjects/src/anywheresoftware/b4a/objects/LabelWrapper.java:37-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `B4AObjects/src/anywheresoftware/b4a/objects/CompoundButtonWrapper.java:71` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:174— Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:174-181 | Libs_Phone/src/anywheresoftware/b4a/phone/ContactsWrapper.java:136-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:461— felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:461-468 | felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:472-479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:461` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) felUsbSerial/src/com/felhr/usbserial/UsbSerialDevice.java:463— felUsbSerial/src/com/felhr/usbserial/UsbSerialDevice.java:463-470 | felUsbSerial/src/com/felhr/usbserial/UsbSpiDevice.java:221-228 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) felUsbSerial/src/com/felhr/deviceids/CH34xIds.java:25— felUsbSerial/src/com/felhr/deviceids/CH34xIds.java:25-32 | felUsbSerial/src/com/felhr/deviceids/PL2303Ids.java:76-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:493— B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:493-506 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:561-574 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:493` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:560` calls `dismiss` and `B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:492` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) Libs_JTidy/src/org/w3c/tidy/Clean.java:1361— Libs_JTidy/src/org/w3c/tidy/Clean.java:1361-1374 | Libs_JTidy/src/org/w3c/tidy/Clean.java:1417-1430 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Clean.java:1361` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:2227— Libs_JTidy/src/org/w3c/tidy/Lexer.java:2227-2240 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2245-2258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Lexer.java:2227` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3702— Libs_JTidy/src/org/w3c/tidy/Lexer.java:3702-3715 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:3744-3757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1399— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1399-1412 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1431-1444 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1399` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1642— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1642-1655 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1785-1798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1642` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2733— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2733-2746 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2891-2904 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2733` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Libs_JTidy/src/org/w3c/tidy/Report.java:1295— Libs_JTidy/src/org/w3c/tidy/Report.java:1295-1308 | Libs_JTidy/src/org/w3c/tidy/Report.java:1311-1324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:214— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:214-227 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java:153-166 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:214` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) felUsbSerial/src/com/felhr/usbserial/UsbSerialDevice.java:348— felUsbSerial/src/com/felhr/usbserial/UsbSerialDevice.java:348-361 | felUsbSerial/src/com/felhr/usbserial/UsbSpiDevice.java:142-155 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/UsbSerialDevice.java:348` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:152— felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:152-165 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:144-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) Libs_AdMob/src/anywheresoftware/b4a/admobwrapper/AdViewWrapper.java:98— Libs_AdMob/src/anywheresoftware/b4a/admobwrapper/AdViewWrapper.java:98-106 | Libs_FirebaseAdMob/src/anywheresoftware/b4a/admobwrapper/AdViewWrapper.java:107-115 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_AdMob/src/anywheresoftware/b4a/admobwrapper/AdViewWrapper.java:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:807— Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:807-815 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:841-849 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:807` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:619— Libs_JTidy/src/org/w3c/tidy/Lexer.java:619-627 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:261-269 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:607— Libs_JTidy/src/org/w3c/tidy/PPrint.java:607-615 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:618-626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/PPrint.java:607` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Libs_JTidy/src/org/w3c/tidy/PPrint.java:616` calls `addC` and `Libs_JTidy/src/org/w3c/tidy/PPrint.java:605` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2111— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2111-2119 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2309-2317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Libs_JTidy/src/org/w3c/tidy/Report.java:1136— Libs_JTidy/src/org/w3c/tidy/Report.java:1136-1144 | Libs_JTidy/src/org/w3c/tidy/Report.java:1424-1436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Report.java:1136` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:609— Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:609-617 | Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:623-631 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:577— B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:577-585 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:688-696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:449— B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:449-457 | Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java:168-176 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:449` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java:167` calls `SuppressWarnings` and `B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:448` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) B4AObjects/src/anywheresoftware/b4a/keywords/StringBuilderWrapper.java:91— B4AObjects/src/anywheresoftware/b4a/keywords/StringBuilderWrapper.java:91-99 | B4AObjects/src/anywheresoftware/b4a/objects/CSBuilder.java:249-257 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:2068— Libs_JTidy/src/org/w3c/tidy/Lexer.java:2068-2074 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2833-2839 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Lexer.java:2068` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:395— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:395-401 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:585-591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:418— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:418-424 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:433-439 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:258— Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:258-264 | Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:270-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:258` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) REDACTED:393— REDACTED:393-399 | REDACTED:456-462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:393` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:280— felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:280-286 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:324-330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) felUsbSerial/src/com/felhr/usbserial/UsbSerialDevice.java:307— felUsbSerial/src/com/felhr/usbserial/UsbSerialDevice.java:307-313 | felUsbSerial/src/com/felhr/usbserial/UsbSpiDevice.java:104-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) B4AObjects/src/anywheresoftware/b4a/objects/CompoundButtonWrapper.java:59— B4AObjects/src/anywheresoftware/b4a/objects/CompoundButtonWrapper.java:59-65 | B4AObjects/src/anywheresoftware/b4a/objects/TextViewWrapper.java:142-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:29— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:29-35 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java:40-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 3) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:291— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:291-296 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:399-404 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:514-519 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:295— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:295-300 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:491-496 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:526-531 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:351— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:351-356 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:397-402 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:587-592 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:394— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:394-399 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:440-445 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:522-527 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:404— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:404-409 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:439-444 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:581-586 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:403— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:403-408 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:438-443 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:564-569 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:443— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:443-448 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:453-458 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:517-522 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) Libs_Phone/src/anywheresoftware/b4a/phone/CallLogWrapper.java:92— Libs_Phone/src/anywheresoftware/b4a/phone/CallLogWrapper.java:92-97 | Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:174-179 | Libs_Phone/src/anywheresoftware/b4a/phone/ContactsWrapper.java:136-141 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (6 lines × 3) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2548— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2548-2553 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2783-2788 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2992-2997 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2548` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) REDACTED:58— REDACTED:58-63 | REDACTED:78-83 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:578— Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:578-583 | Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:602-607 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:578` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java:185— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java:185-190 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:164-169 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:276— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:276-281 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:257-262 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:276` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:336— felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:336-341 | felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:344-349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:281— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:281-286 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:325-330 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:99— B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:99-104 | B4AObjects/src/anywheresoftware/b4a/objects/ScrollViewWrapper.java:106-111 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) B4AObjects/src/anywheresoftware/b4a/objects/TextViewWrapper.java:90— B4AObjects/src/anywheresoftware/b4a/objects/TextViewWrapper.java:90-95 | B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:369-374 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `B4AObjects/src/anywheresoftware/b4a/objects/TextViewWrapper.java:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:140— Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:140-151 | Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:172-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:140` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1437— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1437-1448 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1477-1488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1437` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1475` calls `insertNodeAtEnd` and `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1435` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1910— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1910-1921 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3087-3098 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1910` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2118— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2118-2129 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2484-2495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:146— Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:146-157 | Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java:157-168 — before extracting anything, compare `Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java` and `Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:268— Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:268-279 | Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java:281-292 — before extracting anything, compare `Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java` and `Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:402— felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:402-413 | felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:423-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:402` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×6
Edited copy of a member (20 corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:444— B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:444-463 | Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java:154-183 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:94— B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:94-114 | B4AObjects/src/anywheresoftware/b4a/objects/ScrollViewWrapper.java:101-120 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:149— Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:149-168 | Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java:160-179 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) Libs_FirebaseStorage/src/anywheresoftware/b4x/objects/FirebaseStorageWrapper.java:157— Libs_FirebaseStorage/src/anywheresoftware/b4x/objects/FirebaseStorageWrapper.java:157-176 | Libs_FirebaseStorage/src/anywheresoftware/b4x/objects/FirebaseStorageWrapper.java:180-201 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:293— Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:293-312 | Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:321-342 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1559— Libs_JTidy/src/org/w3c/tidy/PPrint.java:1559-1578 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:1587-1609 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:309— Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:309-321 | Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:426-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) Libs_JTidy/src/org/w3c/tidy/Node.java:260— Libs_JTidy/src/org/w3c/tidy/Node.java:260-272 | Libs_JTidy/src/org/w3c/tidy/Node.java:291-303 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
Duplicated block (13 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:873— Libs_JTidy/src/org/w3c/tidy/PPrint.java:873-885 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:900-913 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/PPrint.java:873` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1611— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1611-1623 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1752-1764 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1611` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:2087— Libs_JTidy/src/org/w3c/tidy/PPrint.java:2087-2099 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:2383-2395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/PPrint.java:2087` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:318— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:318-330 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:285-297 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×5
Edited copy of a member (12 corresponding lines) Libs_Audio/src/anywheresoftware/b4a/audio/JetPlayerWrapper.java:72— Libs_Audio/src/anywheresoftware/b4a/audio/JetPlayerWrapper.java:72-88 | Libs_Audio/src/anywheresoftware/b4a/audio/SoundPoolWrapper.java:49-60 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) Libs_GooglePlayBilling/src/anywheresoftware/b4a/objects/BillingClientWrapper.java:217— Libs_GooglePlayBilling/src/anywheresoftware/b4a/objects/BillingClientWrapper.java:217-228 | Libs_GooglePlayBilling/src/anywheresoftware/b4a/objects/BillingClientWrapper.java:236-248 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:101— Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:101-112 | Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java:108-120 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:49— B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:49-60 | B4AObjects/src/anywheresoftware/b4a/objects/ScrollViewWrapper.java:56-67 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1706— Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1706-1717 | Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1919-1931 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×5
Edited copy of a member (10 corresponding lines) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:129— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:129-138 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:127-136 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/B4XSerializator.java:85— Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/B4XSerializator.java:85-94 | Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/B4XSerializator.java:105-114 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:185— Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:185-194 | Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:200-209 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:540— Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:540-552 | Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:557-566 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) Libs_JTidy/src/org/w3c/tidy/OutFactory.java:84— Libs_JTidy/src/org/w3c/tidy/OutFactory.java:84-93 | Libs_JTidy/src/org/w3c/tidy/StreamInFactory.java:84-93 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (15 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3235— Libs_JTidy/src/org/w3c/tidy/Lexer.java:3235-3249 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:3261-3275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) Libs_OkHttp/src/okhttp3/internal/huc/OkHttpURLConnection.java:477— Libs_OkHttp/src/okhttp3/internal/huc/OkHttpURLConnection.java:477-491 | Libs_OkHttp/src/okhttp3/internal/huc/OkHttpURLConnection.java:506-520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:111— Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:111-125 | Libs_Phone/src/anywheresoftware/b4a/phone/ContactsWrapper.java:104-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:1015— Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:1015-1029 | Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:1055-1069 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:192— Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:192-206 | Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java:203-217 — before extracting anything, compare `Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java` and `Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:192` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:474— Libs_JTidy/src/org/w3c/tidy/Lexer.java:474-484 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:496-506 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Lexer.java:474` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1387— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1387-1397 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1419-1429 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1387` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:374— Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:374-384 | Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:446-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:374` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java:101— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java:101-111 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:139-149 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) B4AObjects/src/anywheresoftware/b4a/objects/SimpleListAdapter.java:148— B4AObjects/src/anywheresoftware/b4a/objects/SimpleListAdapter.java:148-158 | B4AObjects/src/anywheresoftware/b4a/objects/SimpleListAdapter.java:172-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×4
Edited copy of a member (26 corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/TextViewWrapper.java:79— B4AObjects/src/anywheresoftware/b4a/objects/TextViewWrapper.java:79-104 | B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:352-384 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) Libs_Phone/src/anywheresoftware/b4a/phone/CallLogWrapper.java:88— Libs_Phone/src/anywheresoftware/b4a/phone/CallLogWrapper.java:88-114 | Libs_Phone/src/anywheresoftware/b4a/phone/ContactsWrapper.java:132-157 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) B4AShared/src/anywheresoftware/b4a/BA.java:325— B4AShared/src/anywheresoftware/b4a/BA.java:325-350 | B4AShared/src/anywheresoftware/b4a/BA.java:354-386 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:114— felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:114-139 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:104-130 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×4
Edited copy of a member (14 corresponding lines) Libs_Phone/src/anywheresoftware/b4a/phone/ContactsWrapper.java:252— Libs_Phone/src/anywheresoftware/b4a/phone/ContactsWrapper.java:252-266 | Libs_Phone/src/anywheresoftware/b4a/phone/ContactsWrapper.java:271-284 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) Libs_GooglePlayBilling/src/anywheresoftware/b4a/objects/Checker.java:68— Libs_GooglePlayBilling/src/anywheresoftware/b4a/objects/Checker.java:68-81 | Libs_Licensing/src/com/android/vending/licensing/LicenseChecker.java:107-123 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/CompressedStreams.java:155— Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/CompressedStreams.java:155-168 | Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/CompressedStreams.java:169-182 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:662— felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:662-675 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:506-519 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×4
Edited copy of a member (19 corresponding lines) Libs_Facebook/src/anywheresoftware/b4x/objects/FacebookSdkWrapper.java:156— Libs_Facebook/src/anywheresoftware/b4x/objects/FacebookSdkWrapper.java:156-174 | Libs_FirebaseAuth/src/anywheresoftware/b4a/objects/FirebaseAuthWrapper.java:158-178 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) Libs_OkHttp/src/okhttp3/internal/huc/OkHttpURLConnection.java:476— Libs_OkHttp/src/okhttp3/internal/huc/OkHttpURLConnection.java:476-494 | Libs_OkHttp/src/okhttp3/internal/huc/OkHttpURLConnection.java:505-523 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:166— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:166-184 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:166-186 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) Libs_JTidy/src/org/w3c/tidy/DOMAttrMapImpl.java:109— Libs_JTidy/src/org/w3c/tidy/DOMAttrMapImpl.java:109-127 | Libs_JTidy/src/org/w3c/tidy/DOMNodeListImpl.java:84-107 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×4
Edited copy of a member (8 corresponding lines) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1006— B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1006-1013 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1020-1029 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/drawable/CanvasWrapper.java:358— B4AObjects/src/anywheresoftware/b4a/objects/drawable/CanvasWrapper.java:358-365 | B4AObjects/src/anywheresoftware/b4a/objects/drawable/CanvasWrapper.java:379-388 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) Libs_FirebaseNotifications/src/anywheresoftware/b4a/objects/FirebaseNotificationsService.java:199— Libs_FirebaseNotifications/src/anywheresoftware/b4a/objects/FirebaseNotificationsService.java:199-208 | REDACTED:606-613 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:93— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:93-100 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:105-114 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×4
Edited copy of a member (6 corresponding lines) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:610— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:610-615 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:367-372 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/ImageViewWrapper.java:85— B4AObjects/src/anywheresoftware/b4a/objects/ImageViewWrapper.java:85-92 | B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:113-118 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:41— B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:41-46 | B4AObjects/src/anywheresoftware/b4a/objects/ScrollViewWrapper.java:48-53 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) Libs_JTidy/src/org/w3c/tidy/Lexer.java:641— Libs_JTidy/src/org/w3c/tidy/Lexer.java:641-646 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:991-996 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (18 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3360— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3360-3377 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3572-3589 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:189— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:189-206 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:191-208 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) Libs_JTidy/src/org/w3c/tidy/Clean.java:858— Libs_JTidy/src/org/w3c/tidy/Clean.java:858-875 | Libs_JTidy/src/org/w3c/tidy/Clean.java:877-894 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Clean.java:877` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:2625— Libs_JTidy/src/org/w3c/tidy/PPrint.java:2625-2642 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:2701-2718 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:101— Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:101-116 | Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:201-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) Libs_JTidy/src/org/w3c/tidy/Node.java:376— Libs_JTidy/src/org/w3c/tidy/Node.java:376-391 | Libs_JTidy/src/org/w3c/tidy/Node.java:417-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Node.java:376` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1102— Libs_JTidy/src/org/w3c/tidy/PPrint.java:1102-1117 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:1125-1140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/PPrint.java:1102` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Libs_JTidy/src/org/w3c/tidy/PPrint.java:1099` calls `addC` and `Libs_JTidy/src/org/w3c/tidy/PPrint.java:1122` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParsePropertyImpl.java:423— Libs_JTidy/src/org/w3c/tidy/ParsePropertyImpl.java:423-438 | Libs_JTidy/src/org/w3c/tidy/ParsePropertyImpl.java:471-486 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 3) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:294— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:294-300 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:429-435 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:525-531 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:349— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:349-355 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:400-406 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:561-567 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:419— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:419-425 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:571-577 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:603-609 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) Libs_DJI/src/anywheresoftware/b4a/objects/DJIFollowMeMissionOperatorWrapper.java:53— Libs_DJI/src/anywheresoftware/b4a/objects/DJIFollowMeMissionOperatorWrapper.java:53-59 | Libs_DJI/src/anywheresoftware/b4a/objects/HotpointMissionOperatorWrapper.java:54-60 | Libs_DJI/src/anywheresoftware/b4a/objects/WaypointMissionOperatorWrapper.java:72-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:212— Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:212-216 | Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:534-539 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:212` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:288— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:288-292 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:267-271 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:288` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:303— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:303-307 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:276-280 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:303` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:123— B4AObjects/src/anywheresoftware/b4a/objects/HorizontalScrollViewWrapper.java:123-127 | B4AObjects/src/anywheresoftware/b4a/objects/ScrollViewWrapper.java:129-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:992— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:992-1053 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3169-3203 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3217-3289 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3303-3339 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:410— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:410-471 | Libs_UsbSerial/src/com/hoho/android/usbserial/util/HexDump.java:116-125 | felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:133-145 | felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:149-163 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:142— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:142-162 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:140-162 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:181-203 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:162-184 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×3
Edited copy of a member (31 corresponding lines) Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:190— Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:190-220 | Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java:201-231 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:142— Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:142-172 | Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java:153-183 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) REDACTED:257— REDACTED:257-289 | Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketConnection.java:409-439 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) REDACTED:53— REDACTED:53-68 | REDACTED:72-92 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) Libs_ViewsEx/src/anywheresoftware/b4a/objects/RatingBarWrapper.java:65— Libs_ViewsEx/src/anywheresoftware/b4a/objects/RatingBarWrapper.java:65-80 | Libs_ViewsEx/src/anywheresoftware/b4a/objects/SwitchWrapper.java:53-68 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) REDACTED:621— REDACTED:621-638 | REDACTED:673-688 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×3
Edited copy of a member (7 corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/TextViewWrapper.java:91— B4AObjects/src/anywheresoftware/b4a/objects/TextViewWrapper.java:91-97 | B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:370-377 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:82— Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:82-88 | Libs_Phone/src/anywheresoftware/b4a/phone/ContactsWrapper.java:125-131 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:138— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:138-145 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:147-153 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×3
Edited copy of a member (11 corresponding lines) Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:254— Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:254-264 | Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:266-276 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:577— Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:577-587 | Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:601-613 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) Libs_Camera2/src/anywheresoftware/b4a/objects/Camera2.java:386— Libs_Camera2/src/anywheresoftware/b4a/objects/Camera2.java:386-396 | Libs_Camera2/src/anywheresoftware/b4a/objects/Camera2.java:400-410 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) REDACTED:605— REDACTED:605-620 | REDACTED:657-671 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/B4XSerializator.java:272— Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/B4XSerializator.java:272-287 | REDACTED:549-563 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) Libs_JTidy/src/org/w3c/tidy/Lexer.java:469— Libs_JTidy/src/org/w3c/tidy/Lexer.java:469-484 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:492-506 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (19 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:867— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:867-885 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2276-2294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:182— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:182-200 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:163-181 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:208— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:208-226 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:189-207 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) Libs_JTidy/src/org/w3c/tidy/Clean.java:582— Libs_JTidy/src/org/w3c/tidy/Clean.java:582-598 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1137-1153 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (17 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:282— Libs_JTidy/src/org/w3c/tidy/PPrint.java:282-298 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:317-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/PPrint.java:282` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:507— felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:507-523 | felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:527-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:437— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:437-446 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1016-1025 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:437` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2644— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2644-2653 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2732-2741 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2644` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2815— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2815-2824 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2924-2933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 4) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:321— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:321-325 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:343-347 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:415-419 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:565-569 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 4) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:321— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:321-325 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:343-347 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:415-419 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:581-585 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 4) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:392— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:392-396 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:456-460 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:520-524 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:577-581 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Low cohesion: IME (LCOM4 5) Libs_IME/src/anywheresoftware/b4a/objects/IME.java:63— IME's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: UsbSerial (LCOM4 5) Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:75— UsbSerial's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: RingtoneManagerWrapper (LCOM4 5) Libs_Phone/src/anywheresoftware/b4a/phone/RingtoneManagerWrapper.java:72— RingtoneManagerWrapper's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Base64.decode (cognitive 21) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1168— Base64.decode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Base64.decode (cognitive 21) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1260— Base64.decode has cognitive complexity 21 (threshold 15). Drivers by points: error handling 5 (13 pts), if/else 3 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:207— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:207-228 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:188-209 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Libs_BLE2/src/anywheresoftware/b4a/objects/BleManager2.java:204— Libs_BLE2/src/anywheresoftware/b4a/objects/BleManager2.java:204-224 | Libs_BLE2/src/anywheresoftware/b4a/objects/BleManager2.java:225-246 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:98— Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:98-127 | Libs_Phone/src/anywheresoftware/b4a/phone/ContactsWrapper.java:91-120 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) Libs_AdMob/src/anywheresoftware/b4a/admobwrapper/AdViewWrapper.java:97— Libs_AdMob/src/anywheresoftware/b4a/admobwrapper/AdViewWrapper.java:97-128 | Libs_FirebaseAdMob/src/anywheresoftware/b4a/admobwrapper/AdViewWrapper.java:106-135 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:195— Libs_SQL/src/anywheresoftware/b4a/sql/SQL.java:195-216 | Libs_SQLCipher/src/anyhwheresoftware/b4a/objects/sqlcipher/SQLCipher.java:206-227 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) Libs_JTidy/src/org/w3c/tidy/ParsePropertyImpl.java:583— Libs_JTidy/src/org/w3c/tidy/ParsePropertyImpl.java:583-615 | Libs_JTidy/src/org/w3c/tidy/Tidy.java:1756-1777 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×2
Edited copy of a member (25 corresponding lines) Libs_DJI/src/anywheresoftware/b4a/objects/HotpointMissionOperatorWrapper.java:25— Libs_DJI/src/anywheresoftware/b4a/objects/HotpointMissionOperatorWrapper.java:25-49 | Libs_DJI/src/anywheresoftware/b4a/objects/WaypointMissionOperatorWrapper.java:30-67 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:228— Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:228-252 | Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:258-282 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×2
Edited copy of a member (29 corresponding lines) Libs_JTidy/src/org/w3c/tidy/PPrint.java:470— Libs_JTidy/src/org/w3c/tidy/PPrint.java:470-498 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:505-533 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:166— Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:166-194 | Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:274-309 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) Libs_JSON/src/anywheresoftware/b4a/objects/collections/JSONParser.java:97— Libs_JSON/src/anywheresoftware/b4a/objects/collections/JSONParser.java:97-118 | Libs_JSON/src/anywheresoftware/b4a/objects/collections/JSONParser.java:119-136 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) Libs_JTidy/src/org/w3c/tidy/Node.java:259— Libs_JTidy/src/org/w3c/tidy/Node.java:259-276 | Libs_JTidy/src/org/w3c/tidy/Node.java:290-311 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×2
Edited copies of one member (3 members, 17+ corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/ActivityWrapper.java:87— B4AObjects/src/anywheresoftware/b4a/objects/ActivityWrapper.java:87-104 | B4AObjects/src/anywheresoftware/b4a/objects/PanelWrapper.java:43-60 | Libs_GameView/src/anywheresoftware/b4a/objects/GameViewWrapper.java:61-77 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) Libs_JTidy/src/org/w3c/tidy/DOMAttrMapImpl.java:87— Libs_JTidy/src/org/w3c/tidy/DOMAttrMapImpl.java:87-103 | Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:100-121 | Libs_JTidy/src/org/w3c/tidy/DOMElementImpl.java:200-221 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×2
Edited copies of one member (3 members, 11+ corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/streams/File.java:376— B4AObjects/src/anywheresoftware/b4a/objects/streams/File.java:376-387 | B4AObjects/src/anywheresoftware/b4a/objects/streams/File.java:393-403 | B4AObjects/src/anywheresoftware/b4a/objects/streams/File.java:412-423 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/SpinnerWrapper.java:99— B4AObjects/src/anywheresoftware/b4a/objects/SpinnerWrapper.java:99-111 | B4AObjects/src/anywheresoftware/b4a/objects/SpinnerWrapper.java:118-128 | B4AObjects/src/anywheresoftware/b4a/objects/SpinnerWrapper.java:138-149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×2
Edited copies of one member (3 members, 9+ corresponding lines) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java:184— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java:184-194 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:169-177 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:150-158 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:118— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:118-126 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java:290-298 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java:406-414 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×2
Edited copy of a member (4 corresponding lines) Libs_AdMob/src/anywheresoftware/b4a/admobwrapper/AdViewWrapper.java:133— Libs_AdMob/src/anywheresoftware/b4a/admobwrapper/AdViewWrapper.java:133-136 | Libs_FirebaseAdMob/src/anywheresoftware/b4a/admobwrapper/AdViewWrapper.java:140-143 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) Libs_IME/src/anywheresoftware/b4a/objects/IME.java:75— Libs_IME/src/anywheresoftware/b4a/objects/IME.java:75-78 | Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:266-270 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14–15 lines × 2) B4AObjects/src/anywheresoftware/b4a/objects/PanelWrapper.java:46— B4AObjects/src/anywheresoftware/b4a/objects/PanelWrapper.java:46-60 | Libs_GameView/src/anywheresoftware/b4a/objects/GameViewWrapper.java:64-77 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `B4AObjects/src/anywheresoftware/b4a/objects/PanelWrapper.java:46` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2828— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2828-2842 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2937-2950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2828` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 2) B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:272— B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:272-283 | B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:296-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:272` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 2) Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:548— Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:548-557 | Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:571-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10–11 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:552— Libs_JTidy/src/org/w3c/tidy/PPrint.java:552-562 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:1099-1108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/PPrint.java:552` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10–11 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1449— Libs_JTidy/src/org/w3c/tidy/PPrint.java:1449-1459 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:1719-1728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 2) Libs_BLE2/src/anywheresoftware/b4a/objects/BleManager2.java:99— Libs_BLE2/src/anywheresoftware/b4a/objects/BleManager2.java:99-107 | Libs_Serial/src/anywheresoftware/b4a/objects/Serial.java:348-357 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_BLE2/src/anywheresoftware/b4a/objects/BleManager2.java:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9–10 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:916— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:916-925 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2095-2103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2095` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 3) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1661— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1661-1669 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1797-1806 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2589-2597 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1661` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1660` calls `popInline` and `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2588` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2645— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2645-2653 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2733-2741 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2891-2899 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2645` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 6) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:287— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:287-291 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:394-398 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:466-470 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:499-503 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:510-514 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:522-526 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 6) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:297— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:297-301 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:352-356 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:445-449 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:493-497 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:528-532 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:588-592 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 5) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:295— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:295-300 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:491-496 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:526-531 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:574-579 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:609-613 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 5) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:349— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:349-353 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:451-455 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:561-565 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:570-574 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:602-606 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
TidyUtils.isXMLLetter (cyclomatic 156) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:272— TidyUtils.isXMLLetter has cyclomatic complexity 156 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Lexer.getToken (cyclomatic 146) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1912— Lexer.getToken has cyclomatic complexity 146 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PPrint.printChar (cyclomatic 135) Libs_JTidy/src/org/w3c/tidy/PPrint.java:539— PPrint.printChar has cyclomatic complexity 135 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ParseInline.parse (cyclomatic 104) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1066— ParseInline.parse has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseBlock.parse (cyclomatic 93) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2012— ParseBlock.parse has cyclomatic complexity 93 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TidyUtils.isXMLNamechar (cyclomatic 86) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:488— TidyUtils.isXMLNamechar has cyclomatic complexity 86 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PPrint.printTree (cyclomatic 72) Libs_JTidy/src/org/w3c/tidy/PPrint.java:2084— PPrint.printTree has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseBody.parse (cyclomatic 58) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:695— ParseBody.parse has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebSocketReader.processData (cyclomatic 57) Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketReader.java:134— WebSocketReader.processData has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lexer.parseValue (cyclomatic 56) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3210— Lexer.parseValue has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Report.warning (cyclomatic 49) Libs_JTidy/src/org/w3c/tidy/Report.java:1215— Report.warning has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Tidy.mainExec (cyclomatic 42) Libs_JTidy/src/org/w3c/tidy/Tidy.java:739— Tidy.mainExec has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CH34xSerialDevice.setBaudRate (cyclomatic 39) felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:175— CH34xSerialDevice.setBaudRate has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tidy.parse (cyclomatic 39) Libs_JTidy/src/org/w3c/tidy/Tidy.java:390— Tidy.parse has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Clean.cleanWord2000 (cyclomatic 37) Libs_JTidy/src/org/w3c/tidy/Clean.java:2110— Clean.cleanWord2000 has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseHTML.parse (cyclomatic 36) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:269— ParseHTML.parse has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lexer.fixDocType (cyclomatic 35) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1467— Lexer.fixDocType has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LayoutBuilder.loadLayoutHelper (cyclomatic 34) B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:324— LayoutBuilder.loadLayoutHelper has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseRow.parse (cyclomatic 34) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2887— ParseRow.parse has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
3.handleMessage (cyclomatic 32) Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketConnection.java:449— 3.handleMessage has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EncodingUtils.decodeUTF8BytesToChar (cyclomatic 31) Libs_JTidy/src/org/w3c/tidy/EncodingUtils.java:705— EncodingUtils.decodeUTF8BytesToChar has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lexer.getCDATA (cyclomatic 30) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1748— Lexer.getCDATA has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseRowGroup.parse (cyclomatic 30) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2730— ParseRowGroup.parse has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PPrint.printAttrValue (cyclomatic 29) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1005— PPrint.printAttrValue has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Report.errorSummary (cyclomatic 29) Libs_JTidy/src/org/w3c/tidy/Report.java:1514— Report.errorSummary has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FTDISerialDevice.setBaudRate (cyclomatic 28) felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:179— FTDISerialDevice.setBaudRate has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PPrint.printXMLTree (cyclomatic 28) Libs_JTidy/src/org/w3c/tidy/PPrint.java:2381— PPrint.printXMLTree has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Lexer.parseEntity (cyclomatic 27) Libs_JTidy/src/org/w3c/tidy/Lexer.java:652— Lexer.parseEntity has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseTableTag.parse (cyclomatic 27) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2509— ParseTableTag.parse has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lexer.parseAttribute (cyclomatic 26) Libs_JTidy/src/org/w3c/tidy/Lexer.java:2959— Lexer.parseAttribute has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StringUtils.LoadCSV2 (cyclomatic 25) Libs_StringUtils/src/anywheresoftware/b4a/objects/StringUtils.java:176— StringUtils.LoadCSV2 has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lexer.setXHTMLDocType (cyclomatic 25) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1228— Lexer.setXHTMLDocType has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LicenseValidator.verify (cyclomatic 23) Libs_Licensing/src/com/android/vending/licensing/LicenseValidator.java:91— LicenseValidator.verify has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PPrint.printScriptStyle (cyclomatic 23) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1865— PPrint.printScriptStyle has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LayoutBuilder.loadLayout (cyclomatic 22) B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:56— LayoutBuilder.loadLayout has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FlowControlThread.run (cyclomatic 22) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:418— FlowControlThread.run has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AIN.run (cyclomatic 21) Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/AsyncStreams.java:207— AIN.run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PL2303SerialDevice.openPL2303 (cyclomatic 21) felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:309— PL2303SerialDevice.openPL2303 has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Common.NotInitialized (cyclomatic 20) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:764— Common.NotInitialized has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cp21xxSerialPort.setParameters (cyclomatic 20) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:178— Cp21xxSerialPort.setParameters has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CheckColor.check (cyclomatic 20) Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:888— CheckColor.check has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DOMNodeImpl.replaceChild (cyclomatic 20) Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:330— DOMNodeImpl.replaceChild has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lexer.findGivenVersion (cyclomatic 20) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1045— Lexer.findGivenVersion has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseList.parse (cyclomatic 20) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1607— ParseList.parse has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseDefList.parse (cyclomatic 20) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1749— ParseDefList.parse has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParsePre.parse (cyclomatic 20) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1886— ParsePre.parse has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseNoFrames.parse (cyclomatic 20) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3053— ParseNoFrames.parse has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
B4XSerializator.writeObject (cyclomatic 19) Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/B4XSerializator.java:157— B4XSerializator.writeObject has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FTDIUtilities.checkModemStatus (cyclomatic 19) felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:516— FTDIUtilities.checkModemStatus has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BA.raiseEvent2 (cyclomatic 18) B4AShared/src/anywheresoftware/b4a/BA.java:211— BA.raiseEvent2 has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lexer.canPrune (cyclomatic 18) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3892— Lexer.canPrune has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PPrint.printAttribute (cyclomatic 18) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1172— PPrint.printAttribute has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Base64.encodeBytesToBytes (cyclomatic 17) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:906— Base64.encodeBytesToBytes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InputStream.read (cyclomatic 17) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1727— InputStream.read has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocationWrapper.convert (cyclomatic 17) Libs_GPS/src/anywheresoftware/b4a/gps/LocationWrapper.java:57— LocationWrapper.convert has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CdcAcmSerialPort.openInterface (cyclomatic 17) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java:133— CdcAcmSerialPort.openInterface has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CheckUrl.check (cyclomatic 17) Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:253— CheckUrl.check has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lexer.parseServerInstruction (cyclomatic 17) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3099— Lexer.parseServerInstruction has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Node.repairDuplicateAttributes (cyclomatic 17) Libs_JTidy/src/org/w3c/tidy/Node.java:352— Node.repairDuplicateAttributes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseHead.parse (cyclomatic 17) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:498— ParseHead.parse has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebSocketReader.run (cyclomatic 17) Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketReader.java:642— WebSocketReader.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Base64.decode (cyclomatic 16) Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:502— Base64.decode has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FtdiSerialPort.setBaudrate (cyclomatic 16) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java:180— FtdiSerialPort.setBaudrate has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EncodingUtils.encodeCharToUTF8Bytes (cyclomatic 16) Libs_JTidy/src/org/w3c/tidy/EncodingUtils.java:885— EncodingUtils.encodeCharToUTF8Bytes has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
XxxComment Libs_JTidy/src/org/w3c/tidy/Clean.java:1259— // XXX: Are we leaking the child node? -creitzel 7 Jun, 01 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
HackComment B4AShared/src/anywheresoftware/b4a/Msgbox.java:241— //hack to ignore activity messages — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
Lexer.getToken (cognitive 407) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1912— Lexer.getToken has cognitive complexity 407 (threshold 15). Drivers by points: if/else 108 (358 pts), boolean chains 22, loops 6 (22 pts), ternaries 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 269). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ParseInline.parse (cognitive 245) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1066— ParseInline.parse has cognitive complexity 245 (threshold 15). Drivers by points: if/else 76 (208 pts), boolean chains 28, loops 3 (9 pts) (nesting depth added 138). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ParseBlock.parse (cognitive 244) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2012— ParseBlock.parse has cognitive complexity 244 (threshold 15). Drivers by points: if/else 68 (199 pts), loops 6 (23 pts), boolean chains 22 (nesting depth added 148). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WebSocketReader.processData (cognitive 173) Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketReader.java:134— WebSocketReader.processData has cognitive complexity 173 (threshold 15). Drivers by points: if/else 55 (154 pts), boolean chains 11, loops 1 (5 pts), ternaries 1 (3 pts) (nesting depth added 105). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TidyUtils.isXMLLetter (cognitive 155) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:272— TidyUtils.isXMLLetter has cognitive complexity 155 (threshold 15). Drivers by points: boolean chains 155. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PPrint.printChar (cognitive 154) Libs_JTidy/src/org/w3c/tidy/PPrint.java:539— PPrint.printChar has cognitive complexity 154 (threshold 15). Drivers by points: if/else 47 (86 pts), boolean chains 45, match/switch 3 (12 pts), loops 4 (11 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PPrint.printTree (cognitive 150) Libs_JTidy/src/org/w3c/tidy/PPrint.java:2084— PPrint.printTree has cognitive complexity 150 (threshold 15). Drivers by points: if/else 43 (86 pts), loops 7 (27 pts), boolean chains 24, ternaries 3 (13 pts) (nesting depth added 73). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ParseBody.parse (cognitive 124) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:695— ParseBody.parse has cognitive complexity 124 (threshold 15). Drivers by points: if/else 43 (106 pts), boolean chains 17, loops 1 (nesting depth added 63). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Lexer.parseValue (cognitive 115) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3210— Lexer.parseValue has cognitive complexity 115 (threshold 15). Drivers by points: if/else 41 (91 pts), boolean chains 13, loops 5 (9 pts), ternaries 1 (2 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LayoutBuilder.loadLayoutHelper (cognitive 100) B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:324— LayoutBuilder.loadLayoutHelper has cognitive complexity 100 (threshold 15). Drivers by points: if/else 22 (72 pts), ternaries 4 (9 pts), error handling 2 (8 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 65). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TidyUtils.isXMLNamechar (cognitive 85) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:488— TidyUtils.isXMLNamechar has cognitive complexity 85 (threshold 15). Drivers by points: boolean chains 85. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ParseHTML.parse (cognitive 81) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:269— ParseHTML.parse has cognitive complexity 81 (threshold 15). Drivers by points: if/else 29 (71 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Clean.cleanWord2000 (cognitive 77) Libs_JTidy/src/org/w3c/tidy/Clean.java:2110— Clean.cleanWord2000 has cognitive complexity 77 (threshold 15). Drivers by points: if/else 23 (59 pts), boolean chains 13, loops 2 (5 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.getCDATA (cognitive 74) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1748— Lexer.getCDATA has cognitive complexity 74 (threshold 15). Drivers by points: if/else 23 (56 pts), loops 4 (14 pts), boolean chains 4 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tidy.parse (cognitive 74) Libs_JTidy/src/org/w3c/tidy/Tidy.java:390— Tidy.parse has cognitive complexity 74 (threshold 15). Drivers by points: if/else 34 (66 pts), boolean chains 8 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tidy.mainExec (cognitive 72) Libs_JTidy/src/org/w3c/tidy/Tidy.java:739— Tidy.mainExec has cognitive complexity 72 (threshold 15). Drivers by points: if/else 22 (42 pts), error handling 3 (8 pts), loops 3 (8 pts), boolean chains 5, match/switch 1 (5 pts), ternaries 1 (4 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AIN.run (cognitive 67) Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/AsyncStreams.java:207— AIN.run has cognitive complexity 67 (threshold 15). Drivers by points: if/else 17 (52 pts), loops 3 (9 pts), ternaries 1 (5 pts), error handling 1 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlowControlThread.run (cognitive 65) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:418— FlowControlThread.run has cognitive complexity 65 (threshold 15). Drivers by points: if/else 18 (61 pts), boolean chains 3, loops 1 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PPrint.printAttrValue (cognitive 64) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1005— PPrint.printAttrValue has cognitive complexity 64 (threshold 15). Drivers by points: if/else 23 (49 pts), loops 2 (6 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseRow.parse (cognitive 64) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2887— ParseRow.parse has cognitive complexity 64 (threshold 15). Drivers by points: if/else 20 (48 pts), boolean chains 10, loops 3 (6 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.fixDocType (cognitive 60) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1467— Lexer.fixDocType has cognitive complexity 60 (threshold 15). Drivers by points: if/else 26 (53 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseRowGroup.parse (cognitive 59) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2730— ParseRowGroup.parse has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (48 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StringUtils.LoadCSV2 (cognitive 57) Libs_StringUtils/src/anywheresoftware/b4a/objects/StringUtils.java:176— StringUtils.LoadCSV2 has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 6 (11 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EncodingUtils.decodeUTF8BytesToChar (cognitive 57) Libs_JTidy/src/org/w3c/tidy/EncodingUtils.java:705— EncodingUtils.decodeUTF8BytesToChar has cognitive complexity 57 (threshold 15). Drivers by points: if/else 23 (42 pts), loops 3 (8 pts), boolean chains 7 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.parseEntity (cognitive 55) Libs_JTidy/src/org/w3c/tidy/Lexer.java:652— Lexer.parseEntity has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (42 pts), boolean chains 8, ternaries 1 (4 pts), loops 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Node.repairDuplicateAttributes (cognitive 53) Libs_JTidy/src/org/w3c/tidy/Node.java:352— Node.repairDuplicateAttributes has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (45 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
3.handleMessage (cognitive 52) Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketConnection.java:449— 3.handleMessage has cognitive complexity 52 (threshold 15). Drivers by points: if/else 32 (50 pts), ternaries 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CH34xSerialDevice.setBaudRate (cognitive 51) felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:175— CH34xSerialDevice.setBaudRate has cognitive complexity 51 (threshold 15). Drivers by points: if/else 26 (39 pts), boolean chains 12 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Report.errorSummary (cognitive 48) Libs_JTidy/src/org/w3c/tidy/Report.java:1514— Report.errorSummary has cognitive complexity 48 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseTableTag.parse (cognitive 47) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2509— ParseTableTag.parse has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 10, loops 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InputStream.read (cognitive 44) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1727— InputStream.read has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 3 (10 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckColor.check (cognitive 43) Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:888— CheckColor.check has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 3 (8 pts), boolean chains 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.parseAttribute (cognitive 43) Libs_JTidy/src/org/w3c/tidy/Lexer.java:2959— Lexer.parseAttribute has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.parseServerInstruction (cognitive 42) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3099— Lexer.parseServerInstruction has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProlificSerialPort.getStatus (cognitive 41) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:227— ProlificSerialPort.getStatus has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (40 pts), boolean chains 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Lexer.findGivenVersion (cognitive 41) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1045— Lexer.findGivenVersion has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 4 (13 pts), boolean chains 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseList.parse (cognitive 41) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1607— ParseList.parse has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (33 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseDefList.parse (cognitive 41) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1749— ParseDefList.parse has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParsePre.parse (cognitive 41) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1886— ParsePre.parse has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (37 pts), boolean chains 3, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseNoFrames.parse (cognitive 41) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3053— ParseNoFrames.parse has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (34 pts), boolean chains 6, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Common.NotInitialized (cognitive 40) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:764— Common.NotInitialized has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 8, error handling 2 (8 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LayoutBuilder.loadLayout (cognitive 37) B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:56— LayoutBuilder.loadLayout has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 5 (10 pts), boolean chains 2, error handling 2, ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.setXHTMLDocType (cognitive 37) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1228— Lexer.setXHTMLDocType has cognitive complexity 37 (threshold 15). Drivers by points: if/else 23 (33 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PPrint.printXMLTree (cognitive 37) Libs_JTidy/src/org/w3c/tidy/PPrint.java:2381— PPrint.printXMLTree has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FlowControlThread.run (cognitive 36) felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:614— FlowControlThread.run has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (33 pts), boolean chains 2, loops 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ParseHead.parse (cognitive 33) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:498— ParseHead.parse has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PPrint.printScriptStyle (cognitive 32) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1865— PPrint.printScriptStyle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Base64.decode (cognitive 30) Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:502— Base64.decode has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 5, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Base64.encodeBytesToBytes (cognitive 29) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:906— Base64.encodeBytesToBytes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (16 pts), error handling 4 (8 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BA.raiseEvent2 (cognitive 29) B4AShared/src/anywheresoftware/b4a/BA.java:211— BA.raiseEvent2 has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (21 pts), error handling 4 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Report.warning (cognitive 29) Libs_JTidy/src/org/w3c/tidy/Report.java:1215— Report.warning has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FTDISerialDevice.setBaudRate (cognitive 28) felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:179— FTDISerialDevice.setBaudRate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15, boolean chains 13. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Clean.bumpObject (cognitive 28) Libs_JTidy/src/org/w3c/tidy/Clean.java:2355— Clean.bumpObject has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Node.trimTrailingSpace (cognitive 28) Libs_JTidy/src/org/w3c/tidy/Node.java:775— Node.trimTrailingSpace has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 5 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MyPanel.onDraw (cognitive 27) Libs_GameView/src/anywheresoftware/b4a/objects/GameViewWrapper.java:142— MyPanel.onDraw has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 2 (10 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
B4XViewWrapper.getColor (cognitive 27) Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java:417— B4XViewWrapper.getColor has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 2 (9 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseColGroup.parse (cognitive 27) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2642— ParseColGroup.parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
12.run (cognitive 26) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1212— 12.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TagTable.findAllDefinedTag (cognitive 26) Libs_JTidy/src/org/w3c/tidy/TagTable.java:876— TagTable.findAllDefinedTag has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (18 pts), boolean chains 4, match/switch 1 (3 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebSocketReader.run (cognitive 26) Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketReader.java:642— WebSocketReader.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (4 pts), error handling 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Msgbox.waitForMessage (cognitive 25) B4AShared/src/anywheresoftware/b4a/Msgbox.java:219— Msgbox.waitForMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (20 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LicenseValidator.verify (cognitive 25) Libs_Licensing/src/com/android/vending/licensing/LicenseValidator.java:91— LicenseValidator.verify has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 5 (10 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckUrl.check (cognitive 25) Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:253— CheckUrl.check has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Clean.center2Div (cognitive 25) Libs_JTidy/src/org/w3c/tidy/Clean.java:1092— Clean.center2Div has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (25 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DOMNodeImpl.replaceChild (cognitive 25) Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:330— DOMNodeImpl.replaceChild has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerSocketWrapper.GetMyIP (cognitive 24) REDACTED:347— ServerSocketWrapper.GetMyIP has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (5 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
BA.<init> (cognitive 24) B4AShared/src/anywheresoftware/b4a/BA.java:128— BA.<init> has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 3 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CdcAcmSerialPort.openInterface (cognitive 24) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java:133— CdcAcmSerialPort.openInterface has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FTDIUtilities.checkModemStatus (cognitive 24) felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:516— FTDIUtilities.checkModemStatus has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckId.check (cognitive 24) Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:761— CheckId.check has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
B4XSerializator.writeObject (cognitive 23) Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/B4XSerializator.java:157— B4XSerializator.writeObject has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (21 pts), ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BA.TypeToString (cognitive 23) B4AShared/src/anywheresoftware/b4a/BA.java:705— BA.TypeToString has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 1 (3 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommonUsbSerialPort.write (cognitive 23) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialPort.java:205— CommonUsbSerialPort.write has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProlificSerialPort.filterBaudRate (cognitive 23) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:339— ProlificSerialPort.filterBaudRate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Node.trimInitialSpace (cognitive 23) Libs_JTidy/src/org/w3c/tidy/Node.java:900— Node.trimInitialSpace has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 3 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PPrint.printAttribute (cognitive 23) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1172— PPrint.printAttribute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ParserImpl.parseXMLElement (cognitive 23) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3483— ParserImpl.parseXMLElement has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseText.parse (cognitive 23) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3216— ParseText.parse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExecuteHelper.run (cognitive 22) REDACTED:189— ExecuteHelper.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HexDump.dumpHexString (cognitive 22) Libs_UsbSerial/src/com/hoho/android/usbserial/util/HexDump.java:32— HexDump.dumpHexString has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PL2303SerialDevice.openPL2303 (cognitive 22) felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:309— PL2303SerialDevice.openPL2303 has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Clean.blockStyle (cognitive 22) Libs_JTidy/src/org/w3c/tidy/Clean.java:1324— Clean.blockStyle has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Clean.createProps (cognitive 22) Libs_JTidy/src/org/w3c/tidy/Clean.java:174— Clean.createProps has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (9 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Clean.isWord2000 (cognitive 22) Libs_JTidy/src/org/w3c/tidy/Clean.java:2297— Clean.isWord2000 has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.popInline (cognitive 22) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3737— Lexer.popInline has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseFrameSet.parse (cognitive 22) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:991— ParseFrameSet.parse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StarterHelper.handleUncaughtException (cognitive 21) B4AObjects/src/anywheresoftware/b4a/objects/ServiceHelper.java:249— StarterHelper.handleUncaughtException has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GattCallback.onCharacteristicRead (cognitive 21) Libs_BLE2/src/anywheresoftware/b4a/objects/BleManager2.java:501— GattCallback.onCharacteristicRead has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (6 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AOUT.run (cognitive 21) Libs_RandomAccessFile/src/anywheresoftware/b4a/randomaccessfile/AsyncStreams.java:342— AOUT.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 2 (5 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DOMNodeImpl.insertBefore (cognitive 21) Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:267— DOMNodeImpl.insertBefore has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PPrint.printSlide (cognitive 21) Libs_JTidy/src/org/w3c/tidy/PPrint.java:2601— PPrint.printSlide has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PPrint.shouldIndent (cognitive 21) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1989— PPrint.shouldIndent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Clean.nestedList (cognitive 20) Libs_JTidy/src/org/w3c/tidy/Clean.java:1218— Clean.nestedList has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Clean.purgeWord2000Attributes (cognitive 20) Libs_JTidy/src/org/w3c/tidy/Clean.java:1891— Clean.purgeWord2000Attributes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 7, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParserImpl.parseDocument (cognitive 20) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3346— ParserImpl.parseDocument has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Common.WaitFor (cognitive 19) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1820— Common.WaitFor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
1.onTouch (cognitive 19) B4AObjects/src/anywheresoftware/b4a/objects/ButtonWrapper.java:44— 1.onTouch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EncodingUtils.encodeCharToUTF8Bytes (cognitive 19) Libs_JTidy/src/org/w3c/tidy/EncodingUtils.java:885— EncodingUtils.encodeCharToUTF8Bytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PPrint.printTag (cognitive 19) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1342— PPrint.printTag has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocationWrapper.convert (cognitive 18) Libs_GPS/src/anywheresoftware/b4a/gps/LocationWrapper.java:57— LocationWrapper.convert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 2 (3 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Configuration.printConfigOptions (cognitive 18) Libs_JTidy/src/org/w3c/tidy/Configuration.java:881— Configuration.printConfigOptions has cognitive complexity 18 (threshold 15). Drivers by points: error handling 3 (9 pts), if/else 5 (8 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.parseAttrs (cognitive 18) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3620— Lexer.parseAttrs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Node.checkNodeIntegrity (cognitive 18) Libs_JTidy/src/org/w3c/tidy/Node.java:1288— Node.checkNodeIntegrity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParserImpl.parseXMLDocument (cognitive 18) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3553— ParserImpl.parseXMLDocument has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseTitle.parse (cognitive 18) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:595— ParseTitle.parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RadioButtonListener.onCheckedChanged (cognitive 17) B4AObjects/src/anywheresoftware/b4a/objects/CompoundButtonWrapper.java:126— RadioButtonListener.onCheckedChanged has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
StarterHelper.handleStartIntent (cognitive 17) B4AObjects/src/anywheresoftware/b4a/objects/ServiceHelper.java:147— StarterHelper.handleStartIntent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UDPSocket.GetBroadcastAddress (cognitive 17) REDACTED:494— UDPSocket.GetBroadcastAddress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ListenToConnection.run (cognitive 17) Libs_Serial/src/anywheresoftware/b4a/objects/Serial.java:288— ListenToConnection.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Contacts2Wrapper.getAllContacts (cognitive 17) Libs_Phone/src/anywheresoftware/b4a/phone/Contacts2Wrapper.java:170— Contacts2Wrapper.getAllContacts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BA.setActivityPaused (cognitive 17) B4AShared/src/anywheresoftware/b4a/BA.java:430— BA.setActivityPaused has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Msgbox.dismiss (cognitive 17) B4AShared/src/anywheresoftware/b4a/Msgbox.java:91— Msgbox.dismiss has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckLength.check (cognitive 17) Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:493— CheckLength.check has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), loops 1 (2 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Clean.bQ2Div (cognitive 17) Libs_JTidy/src/org/w3c/tidy/Clean.java:1734— Clean.bQ2Div has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.addGenerator (cognitive 17) Libs_JTidy/src/org/w3c/tidy/Lexer.java:981— Lexer.addGenerator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Lexer.canPrune (cognitive 17) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3892— Lexer.canPrune has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Lexer.isCSS1Selector (cognitive 17) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3571— Lexer.isCSS1Selector has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Node.toString (cognitive 17) Libs_JTidy/src/org/w3c/tidy/Node.java:1354— Node.toString has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OkHttpURLConnection.buildCall (cognitive 17) Libs_OkHttp/src/okhttp3/internal/huc/OkHttpURLConnection.java:328— OkHttpURLConnection.buildCall has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OkHttpURLConnection.getResponse (cognitive 17) Libs_OkHttp/src/okhttp3/internal/huc/OkHttpURLConnection.java:408— OkHttpURLConnection.getResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WebSocketConnection.connect (cognitive 17) Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketConnection.java:238— WebSocketConnection.connect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Common.SmartStringFormatter (cognitive 16) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1467— Common.SmartStringFormatter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 1 (3 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BA.printException (cognitive 16) B4AShared/src/anywheresoftware/b4a/BA.java:290— BA.printException has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cp21xxSerialPort.setParameters (cognitive 16) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:178— Cp21xxSerialPort.setParameters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AttVal.checkAttribute (cognitive 16) Libs_JTidy/src/org/w3c/tidy/AttVal.java:239— AttVal.checkAttribute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Clean.cleanNode (cognitive 16) Libs_JTidy/src/org/w3c/tidy/Clean.java:1497— Clean.cleanNode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Clean.discardContainer (cognitive 16) Libs_JTidy/src/org/w3c/tidy/Clean.java:631— Clean.discardContainer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Clean.normalizeSpaces (cognitive 16) Libs_JTidy/src/org/w3c/tidy/Clean.java:1993— Clean.normalizeSpaces has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PPrint.printAttrs (cognitive 16) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1253— PPrint.printAttrs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PPrint.printDocType (cognitive 16) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1473— PPrint.printDocType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckIMG.check (cognitive 16) Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:367— CheckIMG.check has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
WebSocketReader.processHandshake (cognitive 16) Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketReader.java:512— WebSocketReader.processHandshake has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Near-duplicate member pair (80 shared lines) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:273— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:273-481 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:489-615 — These two members are variants of one another: 80 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (74 shared lines) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2731— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2731-2875 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2888-3040 — These two members are variants of one another: 74 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (29 shared lines) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:275— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:275-337 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:256-304 — These two members are variants of one another: 29 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:197— Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:197-236 | Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:517-562 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:64— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:64-104 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:273-310 | felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:365-392 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:523-560 | felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:193-219 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:430-476 | felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:310-367 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:76-125 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:371— Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:371-391 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:592-605 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:656-670 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:688-702 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:999-1012 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:1030-1044 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:1062-1076 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:217— felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:217-257 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:293-334 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:268— Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:268-325 | Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:453-492 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) Libs_JSON/src/anywheresoftware/b4a/objects/collections/JSONParser.java:184— Libs_JSON/src/anywheresoftware/b4a/objects/collections/JSONParser.java:184-212 | Libs_JSON/src/anywheresoftware/b4a/objects/collections/JSONParser.java:214-240 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (57 corresponding lines) · ×1
Edited copy of a member (57 corresponding lines) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:236— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:236-296 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java:232-288 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) Libs_JTidy/src/org/w3c/tidy/Clean.java:1325— Libs_JTidy/src/org/w3c/tidy/Clean.java:1325-1378 | Libs_JTidy/src/org/w3c/tidy/Clean.java:1389-1433 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) Libs_JTidy/src/org/w3c/tidy/Clean.java:754— Libs_JTidy/src/org/w3c/tidy/Clean.java:754-790 | Libs_JTidy/src/org/w3c/tidy/Clean.java:798-838 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) Libs_JTidy/src/org/w3c/tidy/PPrint.java:347— Libs_JTidy/src/org/w3c/tidy/PPrint.java:347-403 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:411-463 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:140— felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:140-175 | felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:210-252 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1496— Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1496-1538 | Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1557-1591 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) Libs_JTidy/src/org/w3c/tidy/Lexer.java:2868— Libs_JTidy/src/org/w3c/tidy/Lexer.java:2868-2906 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2913-2950 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:341— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:341-351 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:290-300 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java:351-361 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:527-537 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:83— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:83-105 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:129-151 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) B4AObjects/src/anywheresoftware/b4a/objects/ButtonWrapper.java:93— B4AObjects/src/anywheresoftware/b4a/objects/ButtonWrapper.java:93-107 | B4AObjects/src/anywheresoftware/b4a/objects/LabelWrapper.java:32-44 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 20+ corresponding lines) · ×1
Edited copies of one member (4 members, 20+ corresponding lines) Libs_JTidy/src/org/w3c/tidy/PPrint.java:1618— Libs_JTidy/src/org/w3c/tidy/PPrint.java:1618-1637 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:1646-1665 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:1674-1693 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:1739-1765 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) REDACTED:55— REDACTED:55-70 | REDACTED:392-406 | REDACTED:455-468 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:188— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:188-211 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:190-215 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:1014— Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:1014-1031 | Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:1054-1071 | Libs_Phone/src/anywheresoftware/b4a/phone/Phone.java:1150-1168 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:487— B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:487-506 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:555-574 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:628-646 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:98— Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:98-118 | Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:132-151 | Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:164-183 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 9+ corresponding lines) · ×1
Edited copies of one member (7 members, 9+ corresponding lines) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1348— B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1348-1356 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1358-1366 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1368-1376 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1378-1386 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1388-1396 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1398-1406 | B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1408-1416 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) Libs_GooglePlayBilling/src/anywheresoftware/b4a/objects/BillingClientWrapper.java:94— Libs_GooglePlayBilling/src/anywheresoftware/b4a/objects/BillingClientWrapper.java:94-100 | Libs_GooglePlayBilling/src/anywheresoftware/b4a/objects/BillingClientWrapper.java:169-176 | Libs_GooglePlayBilling/src/anywheresoftware/b4a/objects/BillingClientWrapper.java:203-208 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:458— felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:458-468 | felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:471-479 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:105— Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:105-121 | Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java:136-152 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1461— Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1461-1476 | Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1602-1618 | Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:1630-1646 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:102— Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:102-115 | Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:136-148 | Libs_ContentResolver/src/anywheresoftware/b4a/objects/ContentResolverWrapper.java:168-180 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 10+ corresponding lines) · ×1
Edited copies of one member (8 members, 10+ corresponding lines) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:269— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:269-278 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:313-322 | felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:556-565 | felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:568-577 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:583-592 | felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:274-283 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:479-488 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:355-364 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:378— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:378-385 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:324-333 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java:418-429 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 3+ corresponding lines) · ×1
Edited copies of one member (3 members, 3+ corresponding lines) Libs_DJI/src/anywheresoftware/b4a/objects/DJIFollowMeMissionOperatorWrapper.java:42— Libs_DJI/src/anywheresoftware/b4a/objects/DJIFollowMeMissionOperatorWrapper.java:42-45 | Libs_DJI/src/anywheresoftware/b4a/objects/HotpointMissionOperatorWrapper.java:32-34 | Libs_DJI/src/anywheresoftware/b4a/objects/WaypointMissionOperatorWrapper.java:42-44 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (37 lines × 2) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:233— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:233-269 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:214-250 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (36 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:368— Libs_JTidy/src/org/w3c/tidy/PPrint.java:368-403 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:428-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/PPrint.java:368` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Libs_JTidy/src/org/w3c/tidy/PPrint.java:367` calls `outc` and `Libs_JTidy/src/org/w3c/tidy/PPrint.java:427` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (33 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:2109— Libs_JTidy/src/org/w3c/tidy/PPrint.java:2109-2141 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:2409-2441 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/PPrint.java:2109` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (31–32 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:2869— Libs_JTidy/src/org/w3c/tidy/Lexer.java:2869-2900 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2914-2944 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Lexer.java:2869` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28 lines × 3) Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:271— Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:271-298 | Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:334-361 | Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java:456-483 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (24 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:846— Libs_JTidy/src/org/w3c/tidy/PPrint.java:846-869 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:918-941 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (22 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:3148— Libs_JTidy/src/org/w3c/tidy/Lexer.java:3148-3169 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:3174-3195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Lexer.java:3148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Libs_JTidy/src/org/w3c/tidy/Lexer.java:3146` calls `addCharToLexer` and `Libs_JTidy/src/org/w3c/tidy/Lexer.java:3172` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21–22 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2525— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2525-2545 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2759-2780 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2525` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (3–22 lines × 3) Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:218— Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:218-236 | Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:320-322 | Libs_StringUtils/src/anywheresoftware/b4a/objects/Base64.java:541-562 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_Licensing/src/com/android/vending/licensing/util/Base64.java:218` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (21 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:471— Libs_JTidy/src/org/w3c/tidy/PPrint.java:471-491 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:506-526 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/PPrint.java:471` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–21 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3170— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3170-3190 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3304-3322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3170` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (20–21 lines × 2) REDACTED:261— REDACTED:261-281 | Libs_WebSocket/src/io/crossbar/autobahn/websocket/WebSocketConnection.java:413-432 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (23–24 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2785— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2785-2808 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2994-3016 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2785` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 5) Libs_JTidy/src/org/w3c/tidy/Lexer.java:2634— Libs_JTidy/src/org/w3c/tidy/Lexer.java:2634-2650 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2658-2674 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2682-2698 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2764-2780 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2797-2813 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Lexer.java:2634` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Libs_JTidy/src/org/w3c/tidy/Lexer.java:2796` calls `ungetChar` and `Libs_JTidy/src/org/w3c/tidy/Lexer.java:2633` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15–16 lines × 2) felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:450— felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:450-465 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:553-567 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 7) felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:274— felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:274-288 | felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:366-380 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:524-538 | felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:194-208 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:431-445 | felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:311-325 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:82-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:274` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:144— felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:144-158 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:185-199 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:166-180 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:144` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–14 lines × 7) Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:379— Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:379-391 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:593-605 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:657-670 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:690-702 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:1000-1012 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:1032-1044 | Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:1064-1076 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/AttrCheckImpl.java:379` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 4) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:144— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:144-157 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:142-155 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:183-196 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:164-177 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–14 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1791— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1791-1803 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2662-2675 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1791` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 5) Libs_JTidy/src/org/w3c/tidy/Lexer.java:2106— Libs_JTidy/src/org/w3c/tidy/Lexer.java:2106-2117 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2184-2195 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2224-2235 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2242-2253 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:2260-2271 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Lexer.java:2106` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Libs_JTidy/src/org/w3c/tidy/Lexer.java:2200` calls `readChar` and `Libs_JTidy/src/org/w3c/tidy/Lexer.java:2238` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 4) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1000— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1000-1011 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3177-3188 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3234-3245 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:3311-3322 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11–12 lines × 2) Libs_JTidy/src/org/w3c/tidy/PPrint.java:554— Libs_JTidy/src/org/w3c/tidy/PPrint.java:554-565 | Libs_JTidy/src/org/w3c/tidy/PPrint.java:647-657 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/PPrint.java:554` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Libs_JTidy/src/org/w3c/tidy/PPrint.java:552` calls `addC` and `Libs_JTidy/src/org/w3c/tidy/PPrint.java:646` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 3) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2530— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2530-2540 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2764-2774 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2953-2963 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9–11 lines × 2) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:571— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:571-579 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:603-613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 5) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:81— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:81-90 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:537-546 | felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:207-216 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:444-453 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:95-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 3) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:92— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:92-101 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java:100-109 | Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Cp21xxSerialDriver.java:138-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (7–9 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1095— Libs_JTidy/src/org/w3c/tidy/Lexer.java:1095-1103 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:1119-1125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Lexer.java:1095` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) Libs_JTidy/src/org/w3c/tidy/Lexer.java:1758— Libs_JTidy/src/org/w3c/tidy/Lexer.java:1758-1765 | Libs_JTidy/src/org/w3c/tidy/Lexer.java:1937-1945 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/Lexer.java:1758` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–8 lines × 7) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:79— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:79-86 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:285-291 | felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:377-383 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:535-542 | felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:205-212 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:442-449 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:93-100 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 3) Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:523— Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:523-530 | Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:548-555 | Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:571-578 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:523` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:532` calls `addAttribute` and `Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:556` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6–8 lines × 2) Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1324— Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1324-1329 | Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:2134-2141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/ParserImpl.java:1324` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 8) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:78— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:78-83 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:284-289 | felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java:376-381 | felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java:534-539 | felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:204-209 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:441-446 | felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:321-326 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:92-97 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 6) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:287— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:287-292 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:405-410 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:466-471 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:499-504 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:510-515 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:582-587 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 5) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:292— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:292-297 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:451-456 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:515-520 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:570-575 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:602-607 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 4) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:398— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:398-403 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:455-460 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:519-524 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:576-581 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (2–6 lines × 3) Libs_JTidy/src/org/w3c/tidy/EncodingUtils.java:928— Libs_JTidy/src/org/w3c/tidy/EncodingUtils.java:928-929 | Libs_JTidy/src/org/w3c/tidy/EncodingUtils.java:942-946 | Libs_JTidy/src/org/w3c/tidy/EncodingUtils.java:953-958 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Libs_JTidy/src/org/w3c/tidy/EncodingUtils.java:942` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (3–6 lines × 4) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:419— Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java:419-421 | Libs_UsbSerial/src/com/hoho/android/usbserial/util/HexDump.java:119-121 | felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:135-140 | felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:151-156 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:160` calls `arraycopy` and `felUsbSerial/src/com/felhr/usbserial/CP2130SpiDevice.java:144` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 7) Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:297— Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:297-301 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:445-449 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:455-459 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:493-497 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:519-523 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:528-532 | Libs_JTidy/src/org/w3c/tidy/TidyUtils.java:576-580 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:263— felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:263-267 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:272-276 | felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:281-285 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `felUsbSerial/src/com/felhr/usbserial/XdcVcpSerialDevice.java:263` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (3–5 lines × 3) felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:130— felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:130-134 | felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:128-132 | felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:123-125 — before extracting anything, compare `felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java` and `felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 4) felUsbSerial/src/com/felhr/deviceids/CP210xIds.java:151— felUsbSerial/src/com/felhr/deviceids/CP210xIds.java:151-160 | felUsbSerial/src/com/felhr/deviceids/CP2130Ids.java:15-24 | felUsbSerial/src/com/felhr/deviceids/FTDISioIds.java:567-576 | felUsbSerial/src/com/felhr/deviceids/XdcVcpIds.java:24-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `felUsbSerial/src/com/felhr/deviceids/CP210xIds.java:147` calls `ConcreteDevice` and `felUsbSerial/src/com/felhr/deviceids/FTDISioIds.java:563` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (24 lines × 3) felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:67— felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:67-90 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:118-141 | felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:65-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (12 lines × 3) felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:104— felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:104-115 | felUsbSerial/src/com/felhr/usbserial/FTDISerialDevice.java:156-167 | felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java:100-111 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Dead branch — condition is always false B4AObjects/src/anywheresoftware/b4a/objects/PanelWrapper.java:131— A branch guarded by a literal `false` can never execute — left-over disabled code. Remove it or restore the real condition.
IC1 · Incompleteness & stubs· Empty method body · ×1
Empty method body — does nothing with its inputs Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java:742— `SetDataFolder` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
No structured logging — No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
Swallowed exception (caught, then discarded) B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1521— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Duplicated predicate Libs_JTidy/src/org/w3c/tidy/DOMCharacterDataImpl.java:92— `adaptee.textarray != null && adaptee.start < adaptee.end` appears character-identically in 3 files — Libs_JTidy/src/org/w3c/tidy/DOMCharacterDataImpl.java, Libs_JTidy/src/org/w3c/tidy/DOMDocumentTypeImpl.java, Libs_JTidy/src/org/w3c/tidy/DOMNodeImpl.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate B4AObjects/src/anywheresoftware/b4a/objects/TextViewWrapper.java:80— `android.os.Build.VERSION.SDK_INT >= 11 && Duration > 0` appears character-identically in 3 files — B4AObjects/src/anywheresoftware/b4a/objects/TextViewWrapper.java, B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java, Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java:446— `android.os.Build.VERSION.SDK_INT >= 11 && Duration > 0 && pWidth >= 0 && pHeight >= 0` appears character-identically in 2 files — B4AObjects/src/anywheresoftware/b4a/objects/ViewWrapper.java, Libs_XUI/src/anywheresoftware/b4a/objects/B4XViewWrapper.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java:211— `dataBits < DATABITS_5 || dataBits > DATABITS_8` appears character-identically in 2 files — Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java, Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java:82— `endpoint.getType() == UsbConstants.USB_ENDPOINT_XFER_BULK && endpoint.getDirection() == UsbConstants.USB_DIR_IN` appears character-identically in 8 files — felUsbSerial/src/com/felhr/usbserial/BLED112SerialDevice.java, felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java, felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java, felUsbSerial/src/com/felhr/usbserial/CP2102SerialDevice.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java:292— `endpoint.getType() == UsbConstants.USB_ENDPOINT_XFER_BULK && endpoint.getDirection() == UsbConstants.USB_DIR_OUT` appears character-identically in 3 files — felUsbSerial/src/com/felhr/usbserial/CDCSerialDevice.java, felUsbSerial/src/com/felhr/usbserial/CH34xSerialDevice.java, felUsbSerial/src/com/felhr/usbserial/PL2303SerialDevice.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Libs_JTidy/src/org/w3c/tidy/Clean.java:2278— `node.type == Node.START_TAG || node.type == Node.START_END_TAG` appears character-identically in 4 files — Libs_JTidy/src/org/w3c/tidy/Clean.java, Libs_JTidy/src/org/w3c/tidy/DOMDocumentImpl.java, Libs_JTidy/src/org/w3c/tidy/DOMNodeListByTagNameImpl.java, Libs_JTidy/src/org/w3c/tidy/ParserImpl.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Libs_UsbSerial/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java:127— `rawDescriptors == null || rawDescriptors.length < 14` appears character-identically in 2 files — Libs_UsbSerial/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java, Libs_UsbSerial/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Fat interface: UsbSerialPort (24 abstract methods) Libs_UsbSerial/src/com/hoho/android/usbserial/driver/UsbSerialPort.java:26— `UsbSerialPort` declares 24 abstract methods: `close`, `getCD`, `getCTS`, `getControlLines`, `getDSR`, `getDTR`, `getDevice`, `getDriver`, `getPortNumber`, `getRI`, `getRTS`, `getReadEndpoint`, `getSerial`, `getSupportedControlLines`, `getWriteEndpoint`, `isOpen`, `open`, `purgeHwBuffers`, `read`, `setBreak`, `setDTR`, `setParameters`, `setRTS`, `write`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: UsbSerialInterface (21 abstract methods) felUsbSerial/src/com/felhr/usbserial/UsbSerialInterface.java:14— `UsbSerialInterface` declares 21 abstract methods: `close`, `getBreak`, `getCTS`, `getDSR`, `getFrame`, `getOverrun`, `getParity`, `open`, `read`, `setBaudRate`, `setDTR`, `setDataBits`, `setFlowControl`, `setParity`, `setRTS`, `setStopBits`, `syncClose`, `syncOpen`, `syncRead`, `syncWrite`, `write`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Silent fallback default in catch B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1521— `SmartStringFormatter` swallows every exception into `return "NaN"` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
Silent fallback default in catch Libs_USB/src/anywheresoftware/b4a/objects/usb/UsbDeviceConnectionWrapper.java:126— `GetRawDescriptors` swallows every exception into `return new byte[0]` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
D21 · Naming Consistency· `CheckTABLE` spells `TABLE` where 12 names in the project spell it `Table` · ×1
`CheckTABLE` spells `TABLE` where 12 names in the project spell it `Table` Libs_JTidy/src/org/w3c/tidy/TagCheckImpl.java:236— 12 of 13 names in project repository spell the token `Table` (12 of 13; unit: names in project repository containing `Table`). Peers: LayoutBuilder.loadLayout(dynamicTable) (B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:56); LayoutBuilder.loadLayoutHelper(dynamicTable) (B4AObjects/src/anywheresoftware/b4a/keywords/LayoutBuilder.java:324); org.w3c.tidy.AttributeTable (Libs_JTidy/src/org/w3c/tidy/AttributeTable.java:67); AttributeTable.getDefaultAttributeTable (Libs_JTidy/src/org/w3c/tidy/AttributeTable.java:429); org.w3c.tidy.EntityTable (Libs_JTidy/src/org/w3c/tidy/EntityTable.java:68). Rename to `CheckTable`. [rule N6]
D21 · Naming Consistency· `driverID` spells `ID` where 120 names in the project spell it `Id` · ×1
`driverID` spells `ID` where 120 names in the project spell it `Id` Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:519— 120 of 123 names in project repository spell the token `Id` (120 of 123; unit: names in project repository containing `Id`). Peers: Common.IsBackgroundTaskRunning(TaskId) (B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1420); 2.onEditorAction(actionId) (B4AObjects/src/anywheresoftware/b4a/objects/EditTextWrapper.java:105); RemoteViewsWrapper.getIdForView (B4AObjects/src/anywheresoftware/b4a/objects/RemoteViewsWrapper.java:94); SimpleListAdapter.getItemId (B4AObjects/src/anywheresoftware/b4a/objects/SimpleListAdapter.java:76); B4ASpinnerAdapter.getItemId (B4AObjects/src/anywheresoftware/b4a/objects/SpinnerWrapper.java:273). Rename to `driverId`. [rule N6]
D21 · Naming Consistency· `productID` spells `ID` where 120 names in the project spell it `Id` · ×1
`productID` spells `ID` where 120 names in the project spell it `Id` Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:519— 120 of 123 names in project repository spell the token `Id` (120 of 123; unit: names in project repository containing `Id`). Peers: Common.IsBackgroundTaskRunning(TaskId) (B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1420); 2.onEditorAction(actionId) (B4AObjects/src/anywheresoftware/b4a/objects/EditTextWrapper.java:105); RemoteViewsWrapper.getIdForView (B4AObjects/src/anywheresoftware/b4a/objects/RemoteViewsWrapper.java:94); SimpleListAdapter.getItemId (B4AObjects/src/anywheresoftware/b4a/objects/SimpleListAdapter.java:76); B4ASpinnerAdapter.getItemId (B4AObjects/src/anywheresoftware/b4a/objects/SpinnerWrapper.java:273). Rename to `productId`. [rule N6]
D21 · Naming Consistency· `vendorID` spells `ID` where 120 names in the project spell it `Id` · ×1
`vendorID` spells `ID` where 120 names in the project spell it `Id` Libs_UsbSerial/src/anywheresoftware/b4a/objects/UsbSerial.java:519— 120 of 123 names in project repository spell the token `Id` (120 of 123; unit: names in project repository containing `Id`). Peers: Common.IsBackgroundTaskRunning(TaskId) (B4AObjects/src/anywheresoftware/b4a/keywords/Common.java:1420); 2.onEditorAction(actionId) (B4AObjects/src/anywheresoftware/b4a/objects/EditTextWrapper.java:105); RemoteViewsWrapper.getIdForView (B4AObjects/src/anywheresoftware/b4a/objects/RemoteViewsWrapper.java:94); SimpleListAdapter.getItemId (B4AObjects/src/anywheresoftware/b4a/objects/SimpleListAdapter.java:76); B4ASpinnerAdapter.getItemId (B4AObjects/src/anywheresoftware/b4a/objects/SpinnerWrapper.java:273). Rename to `vendorId`. [rule N6]
D21 · Naming Consistency· `setDtrRts` spells `Dtr` where 26 names in the project spell it `DTR` · ×1
`setDtrRts` spells `Dtr` where 26 names in the project spell it `DTR` Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java:264— 26 of 27 names in project repository spell the token `DTR` (26 of 27; unit: names in project repository containing `DTR`). Peers: CdcAcmSerialPort.getDTR (Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java:243); CdcAcmSerialPort.setDTR (Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java:248); Ch340SerialPort.getDTR (Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:314); Ch340SerialPort.setDTR (Libs_UsbSerial/src/com/hoho/android/usbserial/driver/Ch34xSerialDriver.java:319); CommonUsbSerialDriver.getDTR (Libs_UsbSerial/src/com/hoho/android/usbserial/driver/CommonUsbSerialDriver.java:127). Rename to `setDTRRts`. [rule N6]
D28 · Secrets (history)· Rotate the exposed credentials · ×1
Thin README README.md:1— The root README is 38 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No SAST — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
X5 · Nullable reference types· Java packages are not null-marked everywhere · ×1
Java packages are not null-marked everywhere — 0/76 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
none (no readable dependency manifest): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
none (no readable dependency manifest): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
0
—
Run 01a1e629-fbec-7980-b86d-2f8ea57b9168 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 8 · Warnings: 699 · Recommendations: 29 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 21:01 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.