Public report of apache/carbondata, published 14 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, 14 November 2026, 07:55 UTC · Survey ID cd_268e9d0f308849e2ba4e56e58f4e157b
apache/carbondata
Measured 14 November 2026, 07:54 UTC, at code version b653d13
CAI scoreAt riskNo change since the last survey
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 large codebase: 242,203 lines of product code in 23 projects, tests not counted · Estimated rebuild effort: about 2.8 person-years · Weakest lens: Maturity, 48
Findings by how serious they are
59 critical1954 serious997 minor
13 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
14 November 2026, 07:54 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.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
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 ▸
42of 42 dimensions measured by tools.
2993of 3010 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
42dimensions across 6 lenses, read from 242,203 lines of product code in 23 projects.
apache/carbondata is rated At risk because critical security findings are open. Its score is held back in part because we found no recorded design decisions and no architecture document or diagram. It scores 54 out of 100, which the At risk rating leaves unchanged.
Maturity, at 48, is the weakest lens and counts most in the score. The best first step is improving the documentation, worth about 6 points. Recording design decisions comes next, worth about 5 points. Raising Maturity to 70 would lift the score to about 58.
Twenty-eight weaknesses in the code could be used by an attacker. Twenty-two known security holes in the packages the code depends on can be used by attackers. Fixing the weaknesses the scanner points to and updating the vulnerable packages would close both risks. Pinning each tool to an exact version would fix the five pipeline tools referenced by a changeable name, and the password or key in the code needs replacing, with the old one switched off. The test that checks nothing needs to check the result it produces.
The product code is 242,203 lines, about €410,000 to rebuild. The check for the health of its packages couldn't finish, so that result is missing, not a clean pass.
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 Maturity rose from 48 to 70, the lowest score rated Strong, the score would rise from 54 to about 58.
Code composition: what the lines of code are
Product code 58%Tests 42%
New since the last survey: 339 findings
These 339 critical or serious findings weren't in the previous survey, on 26 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Near-duplicate member pair (99 shared lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java
Code Duplication · Edited copy of a member (115 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java
Code Duplication · Edited copy of a member (103 corresponding lines) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java
Code Duplication · Edited copy of a member (92 corresponding lines) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java
Code Duplication · Edited copy of a member (59 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
Code Duplication · Edited copy of a member (48 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpression.java
Code Duplication · Edited copy of a member (47 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java
Code Duplication · Edited copy of a member (59 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java
Code Duplication · Edited copy of a member (80 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java
Code Duplication · Edited copy of a member (63 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java
Code Duplication · Edited copy of a member (36 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java
Code Duplication · Edited copy of a member (26 corresponding lines) integration/spark/src/main/java/org/apache/carbondata/converter/SparkDataTypeConverterImpl.java
Code Duplication · Edited copy of a member (55 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java
Code Duplication · Edited copy of a member (33 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java
Code Duplication · Edited copy of a member (32 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java
Code Duplication · Edited copy of a member (36 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java
Code Duplication · Edited copy of a member (40 corresponding lines) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java
Code Duplication · Edited copy of a member (32 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/AbstractDimensionChunkReader.java
Code Duplication · Edited copy of a member (39 corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java
Code Duplication · Edited copy of a member (53 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java
Code Duplication · Edited copy of a member (25 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java
Code Duplication · Edited copies of one member (6 members, 42+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java
Code Duplication · Edited copy of a member (30 corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/SparkCarbonFileFormat.scala
Code Duplication · Edited copy of a member (47 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModel.java
Code Duplication · Edited copy of a member (46 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java
Code Duplication · Edited copies of one member (4 members, 46+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java
Code Duplication · Edited copy of a member (40 corresponding lines) hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonRecordReader.java
Code Duplication · Edited copy of a member (22 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/CarbonUnsafeUtil.java
Code Duplication · Edited copy of a member (36 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java
Code Duplication · Edited copy of a member (49 corresponding lines) core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java
Code Duplication · Edited copy of a member (32 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java
Code Duplication · Edited copy of a member (37 corresponding lines) python/pycarbon/core/carbon_tf_utils.py
Code Duplication · Edited copy of a member (33 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java
Code Duplication · Edited copy of a member (30 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java
Code Duplication · Edited copies of one member (3 members, 38+ corresponding lines) processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/FileMergeSortComparator.java
Code Duplication · Edited copy of a member (28 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java
Code Duplication · Edited copy of a member (32 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java
Code Duplication · Edited copy of a member (31 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java
Code Duplication · Edited copy of a member (31 corresponding lines) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/query/SecondaryIndexQueryResultProcessor.java
Code Duplication · Edited copy of a member (33 corresponding lines) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala
Code Duplication · Edited copy of a member (34 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java
Code Duplication · Edited copy of a member (36 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java
Code Duplication · Edited copy of a member (27 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java
Code Duplication · Edited copy of a member (27 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java
Code Duplication · Edited copy of a member (20 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
Code Duplication · Edited copy of a member (24 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java
Code Duplication · Edited copy of a member (31 corresponding lines) core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java
Code Duplication · Edited copy of a member (24 corresponding lines) integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java
Code Duplication · Edited copy of a member (42 corresponding lines) integration/spark/src/main/scala/org/apache/carbondata/api/CarbonStore.scala
Code Duplication · Edited copy of a member (23 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java
Code Duplication · Edited copy of a member (31 corresponding lines) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java
Code Duplication · Edited copy of a member (32 corresponding lines) python/pycarbon/core/carbon_tf_utils.py
Code Duplication · Edited copy of a member (29 corresponding lines) index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndex.java
Code Duplication · Edited copy of a member (32 corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala
Code Duplication · Edited copy of a member (26 corresponding lines) core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java
Code Duplication · Edited copies of one member (5 members, 27+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java
Code Duplication · Edited copy of a member (32 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/MeasureColumnVisitor.java
Code Duplication · Edited copy of a member (28 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java
Code Duplication · Edited copy of a member (32 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/BadRecordsLogger.java
Code Duplication · Edited copy of a member (24 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java
Code Duplication · Edited copy of a member (23 corresponding lines) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java
Code Duplication · Edited copy of a member (25 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java
Code Duplication · Edited copy of a member (15 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java
Code Duplication · Edited copy of a member (24 corresponding lines) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java
Code Duplication · Edited copy of a member (26 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java
Code Duplication · Edited copy of a member (20 corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java
Code Duplication · Edited copy of a member (23 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java
Code Duplication · Edited copy of a member (19 corresponding lines) streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java
Code Duplication · Edited copy of a member (16 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/LazyColumnPage.java
Code Duplication · Edited copy of a member (21 corresponding lines) integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/hive/SqlAstBuilderHelper.scala
Code Duplication · Edited copy of a member (15 corresponding lines) mv/plan/src/main/common2.3and2.4/org/apache/carbondata/mv/plans/modular/SparkVersionHelper.scala
Code Duplication · Edited copy of a member (27 corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala
Code Duplication · Edited copy of a member (27 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala
Code Duplication · Edited copy of a member (30 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (14 corresponding lines) geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java
Code Duplication · Edited copy of a member (23 corresponding lines) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java
Code Duplication · Edited copy of a member (27 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java
Code Duplication · Edited copy of a member (21 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java
Code Duplication · Edited copy of a member (24 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/dimension/legacy/ComplexDimensionIndexCodec.java
Code Duplication · Edited copy of a member (20 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java
Code Duplication · Edited copy of a member (19 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
Code Duplication · Edited copy of a member (28 corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/CarbonTableIdentifier.java
Code Duplication · Edited copy of a member (40 corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java
Code Duplication · Edited copy of a member (23 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java
Code Duplication · Edited copy of a member (20 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentProperties.java
Code Duplication · Edited copy of a member (18 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java
Code Duplication · Edited copy of a member (22 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java
Code Duplication · Edited copy of a member (14 corresponding lines) hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/CarbonRowReadSupport.java
Code Duplication · Edited copy of a member (22 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java
Code Duplication · Edited copy of a member (22 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java
Code Duplication · Edited copy of a member (22 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkPageReaderV3.java
Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java
Code Duplication · Edited copy of a member (26 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java
Code Duplication · Edited copy of a member (16 corresponding lines) core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java
Code Duplication · Edited copy of a member (27 corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/AbsoluteTableIdentifier.java
Code Duplication · Edited copy of a member (20 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeSingleThreadFinalSortFilesMerger.java
Code Duplication · Edited copy of a member (23 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/steps/CarbonRowDataWriterProcessorStepImpl.java
Code Duplication · Edited copy of a member (19 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/sort/SchemaBasedRowUpdater.java
Code Duplication · Edited copy of a member (12 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 48 findings
These 48 critical or serious findings were in the previous survey, on 26 October 2026, and are gone from this one.
Code Duplication · Near-duplicate member pair (91 shared lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java
Code Duplication · Edited copy of a member (36 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/steps/DataConverterProcessorStepImpl.java
Code Duplication · Edited copy of a member (25 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Rebuild cost: about €410,000 · Estimate
Cost to rebuild
€140,000 to €680,000, for 2,264 to 7,184 hours of work, about 2.8 person-years for 1 to 6 engineers
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 54. 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
Large: 242,203 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 Documentation finding(s) in Documentation Quality — start with README.md.
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.
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
Raises the score by about 2 points · Low effort · Secret Scanning
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 €410,000 to build again, about 2.8 person-years of work. Its weakest lens is Maturity, at 48 (Weak). Maturity is about how well the project explains and looks after itself, which decides whether a new developer, or a new supplier, can take over. Because the weakest lens counts most in the score, work on Maturity also moves the score most.
Based on: the rebuild estimate · the Maturity grade · how much each lens counts
What to do: Start with the Maturity actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Documentation finding(s) in Documentation Quality. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for low effort, because it clears the 1 Documentation Quality 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 4% to 8% on every change. The history of the code shows how much it changes: about 1,579 lines over the last 90 days, which is about 6,404 lines a year. At that pace, the extra work comes to an estimated 0.6 to 3.4 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 — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
318 modules, with 1084 dependencies between them. 6 loops run through 83 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 278 more are left out to keep it readable.
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.
carbondata.core.metadata.blocklet uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.metadata.blocklet, while a change to carbondata.core.metadata.blocklet can't break carbondata.core.metadata.schema.table.column.
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.
4→26 carbondata.core.metadata.blocklet uses carbondata.core.metadatapart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.metadata.blocklet uses a type in carbondata.core.metadata.
carbondata.core.metadata.blocklet uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.metadata.blocklet, while a change to carbondata.core.metadata.blocklet can't break carbondata.core.metadata.
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.
4→31 carbondata.core.metadata.blocklet uses carbondata.core.datastore.blockpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.metadata.blocklet uses a type in carbondata.core.datastore.block.
carbondata.core.metadata.blocklet uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.metadata.blocklet, while a change to carbondata.core.metadata.blocklet can't break carbondata.core.datastore.block.
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.
5→16 carbondata.core.scan.filter.resolver uses carbondata.core.scan.expressionpart of a loop✕
Connections
7 pairs of types, where a type in carbondata.core.scan.filter.resolver uses a type in carbondata.core.scan.expression.
carbondata.core.scan.filter.resolver uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.core.scan.filter.resolver, while a change to carbondata.core.scan.filter.resolver can't break carbondata.core.scan.expression.
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.
5→18 carbondata.core.scan.filter.resolver uses carbondata.core.metadata.schema.table.columnpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.filter.resolver uses a type in carbondata.core.metadata.schema.table.column.
carbondata.core.scan.filter.resolver uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.scan.filter.resolver, while a change to carbondata.core.scan.filter.resolver can't break carbondata.core.metadata.schema.table.column.
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.
5→26 carbondata.core.scan.filter.resolver uses carbondata.core.metadatapart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.filter.resolver uses a type in carbondata.core.metadata.
carbondata.core.scan.filter.resolver uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.scan.filter.resolver, while a change to carbondata.core.scan.filter.resolver can't break carbondata.core.metadata.
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.
5→31 carbondata.core.scan.filter.resolver uses carbondata.core.datastore.blockpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.filter.resolver uses a type in carbondata.core.datastore.block.
carbondata.core.scan.filter.resolver uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.scan.filter.resolver, while a change to carbondata.core.scan.filter.resolver can't break carbondata.core.datastore.block.
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.
carbondata.core.statusmanager uses carbondata.core.datastore.filesystem, so a change to carbondata.core.datastore.filesystem can break carbondata.core.statusmanager, while a change to carbondata.core.statusmanager can't break carbondata.core.datastore.filesystem.
Position
Below the diagonal: carbondata.core.statusmanager uses a module listed above it, which is the healthy direction.
6→7 carbondata.core.statusmanager uses carbondata.core.mutatepart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.statusmanager uses a type in carbondata.core.mutate.
carbondata.core.statusmanager uses carbondata.core.mutate, so a change to carbondata.core.mutate can break carbondata.core.statusmanager, while a change to carbondata.core.statusmanager can't break carbondata.core.mutate.
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.
6→17 carbondata.core.statusmanager uses carbondata.core.metadata.schema.tablepart of a loop✕
Connections
4 pairs of types, where a type in carbondata.core.statusmanager uses a type in carbondata.core.metadata.schema.table.
carbondata.core.statusmanager uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.statusmanager, while a change to carbondata.core.statusmanager can't break carbondata.core.metadata.schema.table.
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.
6→25 carbondata.core.statusmanager uses carbondata.core.indexstorepart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.statusmanager uses a type in carbondata.core.indexstore.
carbondata.core.statusmanager uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.core.statusmanager, while a change to carbondata.core.statusmanager can't break carbondata.core.indexstore.
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.
6→26 carbondata.core.statusmanager uses carbondata.core.metadatapart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.statusmanager uses a type in carbondata.core.metadata.
carbondata.core.statusmanager uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.statusmanager, while a change to carbondata.core.statusmanager can't break carbondata.core.metadata.
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.
6→30 carbondata.core.statusmanager uses carbondata.core.indexpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.statusmanager uses a type in carbondata.core.index.
carbondata.core.statusmanager uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.core.statusmanager, while a change to carbondata.core.statusmanager can't break carbondata.core.index.
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.
carbondata.core.mutate uses carbondata.core.datastore.filesystem, so a change to carbondata.core.datastore.filesystem can break carbondata.core.mutate, while a change to carbondata.core.mutate can't break carbondata.core.datastore.filesystem.
Position
Below the diagonal: carbondata.core.mutate uses a module listed above it, which is the healthy direction.
carbondata.core.mutate uses carbondata.core.statusmanager, so a change to carbondata.core.statusmanager can break carbondata.core.mutate, while a change to carbondata.core.mutate can't break carbondata.core.statusmanager.
Position
Below the diagonal: carbondata.core.mutate uses a module listed above it, which is the healthy direction.
7→17 carbondata.core.mutate uses carbondata.core.metadata.schema.tablepart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.mutate uses a type in carbondata.core.metadata.schema.table.
carbondata.core.mutate uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.mutate, while a change to carbondata.core.mutate can't break carbondata.core.metadata.schema.table.
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.
7→30 carbondata.core.mutate uses carbondata.core.indexpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.mutate uses a type in carbondata.core.index.
carbondata.core.mutate uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.core.mutate, while a change to carbondata.core.mutate can't break carbondata.core.index.
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.
carbondata.core.util uses carbondata.core.datastore.filesystem, so a change to carbondata.core.datastore.filesystem can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.datastore.filesystem.
Position
Below the diagonal: carbondata.core.util uses a module listed above it, which is the healthy direction.
carbondata.core.util uses carbondata.core.metadata.blocklet, so a change to carbondata.core.metadata.blocklet can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.metadata.blocklet.
Position
Below the diagonal: carbondata.core.util uses a module listed above it, which is the healthy direction.
carbondata.core.util uses carbondata.core.scan.filter.resolver, so a change to carbondata.core.scan.filter.resolver can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.scan.filter.resolver.
Position
Below the diagonal: carbondata.core.util uses a module listed above it, which is the healthy direction.
carbondata.core.util uses carbondata.core.statusmanager, so a change to carbondata.core.statusmanager can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.statusmanager.
Position
Below the diagonal: carbondata.core.util uses a module listed above it, which is the healthy direction.
carbondata.core.util uses carbondata.core.mutate, so a change to carbondata.core.mutate can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.mutate.
Position
Below the diagonal: carbondata.core.util uses a module listed above it, which is the healthy direction.
8→9 carbondata.core.util uses carbondata.core.scan.modelpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.util uses a type in carbondata.core.scan.model.
carbondata.core.util uses carbondata.core.scan.model, so a change to carbondata.core.scan.model can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.scan.model.
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.
8→17 carbondata.core.util uses carbondata.core.metadata.schema.tablepart of a loop✕
Connections
6 pairs of types, where a type in carbondata.core.util uses a type in carbondata.core.metadata.schema.table.
carbondata.core.util uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.metadata.schema.table.
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.
8→18 carbondata.core.util uses carbondata.core.metadata.schema.table.columnpart of a loop✕
Connections
16 pairs of types, where a type in carbondata.core.util uses a type in carbondata.core.metadata.schema.table.column.
carbondata.core.util uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.metadata.schema.table.column.
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.
8→19 carbondata.core.util uses carbondata.core.metadata.datatypepart of a loop✕
Connections
3 pairs of types, where a type in carbondata.core.util uses a type in carbondata.core.metadata.datatype.
carbondata.core.util uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.metadata.datatype.
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.
8→22 carbondata.core.util uses carbondata.core.datastore.chunk.implpart of a loop✕
Connections
3 pairs of types, where a type in carbondata.core.util uses a type in carbondata.core.datastore.chunk.impl.
carbondata.core.util uses carbondata.core.datastore.chunk.impl, so a change to carbondata.core.datastore.chunk.impl can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.datastore.chunk.impl.
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.
8→24 carbondata.core.util uses carbondata.core.indexstore.blockletindexpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.util uses a type in carbondata.core.indexstore.blockletindex.
carbondata.core.util uses carbondata.core.indexstore.blockletindex, so a change to carbondata.core.indexstore.blockletindex can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.indexstore.blockletindex.
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.
8→25 carbondata.core.util uses carbondata.core.indexstorepart of a loop✕
Connections
4 pairs of types, where a type in carbondata.core.util uses a type in carbondata.core.indexstore.
carbondata.core.util uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.indexstore.
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.
8→26 carbondata.core.util uses carbondata.core.metadatapart of a loop✕
Connections
9 pairs of types, where a type in carbondata.core.util uses a type in carbondata.core.metadata.
carbondata.core.util uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.metadata.
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.
8→27 carbondata.core.util uses carbondata.core.datastore.page.encodingpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.util uses a type in carbondata.core.datastore.page.encoding.
carbondata.core.util uses carbondata.core.datastore.page.encoding, so a change to carbondata.core.datastore.page.encoding can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.datastore.page.encoding.
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.
8→28 carbondata.core.util uses carbondata.core.datastore.pagepart of a loop✕
Connections
4 pairs of types, where a type in carbondata.core.util uses a type in carbondata.core.datastore.page.
carbondata.core.util uses carbondata.core.datastore.page, so a change to carbondata.core.datastore.page can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.datastore.page.
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.
8→30 carbondata.core.util uses carbondata.core.indexpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.util uses a type in carbondata.core.index.
carbondata.core.util uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.index.
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.
8→31 carbondata.core.util uses carbondata.core.datastore.blockpart of a loop✕
Connections
7 pairs of types, where a type in carbondata.core.util uses a type in carbondata.core.datastore.block.
carbondata.core.util uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.datastore.block.
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.
8→33 carbondata.core.util uses carbondata.core.datastorepart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.util uses a type in carbondata.core.datastore.
carbondata.core.util uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.util, while a change to carbondata.core.util can't break carbondata.core.datastore.
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.
carbondata.core.scan.model uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.core.scan.model, while a change to carbondata.core.scan.model can't break carbondata.core.util.
Position
Below the diagonal: carbondata.core.scan.model uses a module listed above it, which is the healthy direction.
9→16 carbondata.core.scan.model uses carbondata.core.scan.expressionpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.model uses a type in carbondata.core.scan.expression.
carbondata.core.scan.model uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.core.scan.model, while a change to carbondata.core.scan.model can't break carbondata.core.scan.expression.
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.
9→17 carbondata.core.scan.model uses carbondata.core.metadata.schema.tablepart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.model uses a type in carbondata.core.metadata.schema.table.
carbondata.core.scan.model uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.scan.model, while a change to carbondata.core.scan.model can't break carbondata.core.metadata.schema.table.
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.
9→18 carbondata.core.scan.model uses carbondata.core.metadata.schema.table.columnpart of a loop✕
Connections
9 pairs of types, where a type in carbondata.core.scan.model uses a type in carbondata.core.metadata.schema.table.column.
carbondata.core.scan.model uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.scan.model, while a change to carbondata.core.scan.model can't break carbondata.core.metadata.schema.table.column.
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.
9→26 carbondata.core.scan.model uses carbondata.core.metadatapart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.model uses a type in carbondata.core.metadata.
carbondata.core.scan.model uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.scan.model, while a change to carbondata.core.scan.model can't break carbondata.core.metadata.
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.
9→30 carbondata.core.scan.model uses carbondata.core.indexpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.model uses a type in carbondata.core.index.
carbondata.core.scan.model uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.core.scan.model, while a change to carbondata.core.scan.model can't break carbondata.core.index.
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.
9→31 carbondata.core.scan.model uses carbondata.core.datastore.blockpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.model uses a type in carbondata.core.datastore.block.
carbondata.core.scan.model uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.scan.model, while a change to carbondata.core.scan.model can't break carbondata.core.datastore.block.
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.
carbondata.core.scan.executor.infos uses carbondata.core.mutate, so a change to carbondata.core.mutate can break carbondata.core.scan.executor.infos, while a change to carbondata.core.scan.executor.infos can't break carbondata.core.mutate.
Position
Below the diagonal: carbondata.core.scan.executor.infos uses a module listed above it, which is the healthy direction.
carbondata.core.scan.executor.infos uses carbondata.core.scan.model, so a change to carbondata.core.scan.model can break carbondata.core.scan.executor.infos, while a change to carbondata.core.scan.executor.infos can't break carbondata.core.scan.model.
Position
Below the diagonal: carbondata.core.scan.executor.infos uses a module listed above it, which is the healthy direction.
10→14 carbondata.core.scan.executor.infos uses carbondata.core.scan.filterpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.executor.infos uses a type in carbondata.core.scan.filter.
carbondata.core.scan.executor.infos uses carbondata.core.scan.filter, so a change to carbondata.core.scan.filter can break carbondata.core.scan.executor.infos, while a change to carbondata.core.scan.executor.infos can't break carbondata.core.scan.filter.
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.
10→15 carbondata.core.scan.executor.infos uses carbondata.core.scan.filter.executerpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.executor.infos uses a type in carbondata.core.scan.filter.executer.
carbondata.core.scan.executor.infos uses carbondata.core.scan.filter.executer, so a change to carbondata.core.scan.filter.executer can break carbondata.core.scan.executor.infos, while a change to carbondata.core.scan.executor.infos can't break carbondata.core.scan.filter.executer.
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.
10→19 carbondata.core.scan.executor.infos uses carbondata.core.metadata.datatypepart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.executor.infos uses a type in carbondata.core.metadata.datatype.
carbondata.core.scan.executor.infos uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.scan.executor.infos, while a change to carbondata.core.scan.executor.infos can't break carbondata.core.metadata.datatype.
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.
10→31 carbondata.core.scan.executor.infos uses carbondata.core.datastore.blockpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.executor.infos uses a type in carbondata.core.datastore.block.
carbondata.core.scan.executor.infos uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.scan.executor.infos, while a change to carbondata.core.scan.executor.infos can't break carbondata.core.datastore.block.
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.
10→33 carbondata.core.scan.executor.infos uses carbondata.core.datastorepart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.executor.infos uses a type in carbondata.core.datastore.
carbondata.core.scan.executor.infos uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.scan.executor.infos, while a change to carbondata.core.scan.executor.infos can't break carbondata.core.datastore.
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.
carbondata.core.scan.scanner uses carbondata.core.scan.executor.infos, so a change to carbondata.core.scan.executor.infos can break carbondata.core.scan.scanner, while a change to carbondata.core.scan.scanner can't break carbondata.core.scan.executor.infos.
Position
Below the diagonal: carbondata.core.scan.scanner uses a module listed above it, which is the healthy direction.
11→12 carbondata.core.scan.scanner uses carbondata.core.scan.resultpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.scanner uses a type in carbondata.core.scan.result.
carbondata.core.scan.scanner uses carbondata.core.scan.result, so a change to carbondata.core.scan.result can break carbondata.core.scan.scanner, while a change to carbondata.core.scan.scanner can't break carbondata.core.scan.result.
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.
11→13 carbondata.core.scan.scanner uses carbondata.core.scan.processorpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.scanner uses a type in carbondata.core.scan.processor.
carbondata.core.scan.scanner uses carbondata.core.scan.processor, so a change to carbondata.core.scan.processor can break carbondata.core.scan.scanner, while a change to carbondata.core.scan.scanner can't break carbondata.core.scan.processor.
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.
11→21 carbondata.core.scan.scanner uses carbondata.core.scan.result.vectorpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.scanner uses a type in carbondata.core.scan.result.vector.
carbondata.core.scan.scanner uses carbondata.core.scan.result.vector, so a change to carbondata.core.scan.result.vector can break carbondata.core.scan.scanner, while a change to carbondata.core.scan.scanner can't break carbondata.core.scan.result.vector.
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.
11→22 carbondata.core.scan.scanner uses carbondata.core.datastore.chunk.implpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.scanner uses a type in carbondata.core.datastore.chunk.impl.
carbondata.core.scan.scanner uses carbondata.core.datastore.chunk.impl, so a change to carbondata.core.datastore.chunk.impl can break carbondata.core.scan.scanner, while a change to carbondata.core.scan.scanner can't break carbondata.core.datastore.chunk.impl.
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.
11→33 carbondata.core.scan.scanner uses carbondata.core.datastorepart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.scanner uses a type in carbondata.core.datastore.
carbondata.core.scan.scanner uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.scan.scanner, while a change to carbondata.core.scan.scanner can't break carbondata.core.datastore.
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.
carbondata.core.scan.result uses carbondata.common, so a change to carbondata.common can break carbondata.core.scan.result, while a change to carbondata.core.scan.result can't break carbondata.common.
Position
Below the diagonal: carbondata.core.scan.result uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result uses carbondata.core.mutate, so a change to carbondata.core.mutate can break carbondata.core.scan.result, while a change to carbondata.core.scan.result can't break carbondata.core.mutate.
Position
Below the diagonal: carbondata.core.scan.result uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result uses carbondata.core.scan.executor.infos, so a change to carbondata.core.scan.executor.infos can break carbondata.core.scan.result, while a change to carbondata.core.scan.result can't break carbondata.core.scan.executor.infos.
Position
Below the diagonal: carbondata.core.scan.result uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result uses carbondata.core.scan.scanner, so a change to carbondata.core.scan.scanner can break carbondata.core.scan.result, while a change to carbondata.core.scan.result can't break carbondata.core.scan.scanner.
Position
Below the diagonal: carbondata.core.scan.result uses a module listed above it, which is the healthy direction.
12→14 carbondata.core.scan.result uses carbondata.core.scan.filterpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.result uses a type in carbondata.core.scan.filter.
carbondata.core.scan.result uses carbondata.core.scan.filter, so a change to carbondata.core.scan.filter can break carbondata.core.scan.result, while a change to carbondata.core.scan.result can't break carbondata.core.scan.filter.
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.
12→18 carbondata.core.scan.result uses carbondata.core.metadata.schema.table.columnpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.result uses a type in carbondata.core.metadata.schema.table.column.
carbondata.core.scan.result uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.scan.result, while a change to carbondata.core.scan.result can't break carbondata.core.metadata.schema.table.column.
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.
12→21 carbondata.core.scan.result uses carbondata.core.scan.result.vectorpart of a loop✕
Connections
3 pairs of types, where a type in carbondata.core.scan.result uses a type in carbondata.core.scan.result.vector.
carbondata.core.scan.result uses carbondata.core.scan.result.vector, so a change to carbondata.core.scan.result.vector can break carbondata.core.scan.result, while a change to carbondata.core.scan.result can't break carbondata.core.scan.result.vector.
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.
12→22 carbondata.core.scan.result uses carbondata.core.datastore.chunk.implpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.result uses a type in carbondata.core.datastore.chunk.impl.
carbondata.core.scan.result uses carbondata.core.datastore.chunk.impl, so a change to carbondata.core.datastore.chunk.impl can break carbondata.core.scan.result, while a change to carbondata.core.scan.result can't break carbondata.core.datastore.chunk.impl.
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.
12→28 carbondata.core.scan.result uses carbondata.core.datastore.pagepart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.result uses a type in carbondata.core.datastore.page.
carbondata.core.scan.result uses carbondata.core.datastore.page, so a change to carbondata.core.datastore.page can break carbondata.core.scan.result, while a change to carbondata.core.scan.result can't break carbondata.core.datastore.page.
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.
12→33 carbondata.core.scan.result uses carbondata.core.datastorepart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.result uses a type in carbondata.core.datastore.
carbondata.core.scan.result uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.scan.result, while a change to carbondata.core.scan.result can't break carbondata.core.datastore.
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.
carbondata.core.scan.processor uses carbondata.common, so a change to carbondata.common can break carbondata.core.scan.processor, while a change to carbondata.core.scan.processor can't break carbondata.common.
Position
Below the diagonal: carbondata.core.scan.processor uses a module listed above it, which is the healthy direction.
carbondata.core.scan.processor uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.core.scan.processor, while a change to carbondata.core.scan.processor can't break carbondata.core.util.
Position
Below the diagonal: carbondata.core.scan.processor uses a module listed above it, which is the healthy direction.
carbondata.core.scan.processor uses carbondata.core.scan.executor.infos, so a change to carbondata.core.scan.executor.infos can break carbondata.core.scan.processor, while a change to carbondata.core.scan.processor can't break carbondata.core.scan.executor.infos.
Position
Below the diagonal: carbondata.core.scan.processor uses a module listed above it, which is the healthy direction.
carbondata.core.scan.processor uses carbondata.core.scan.scanner, so a change to carbondata.core.scan.scanner can break carbondata.core.scan.processor, while a change to carbondata.core.scan.processor can't break carbondata.core.scan.scanner.
Position
Below the diagonal: carbondata.core.scan.processor uses a module listed above it, which is the healthy direction.
carbondata.core.scan.processor uses carbondata.core.scan.result, so a change to carbondata.core.scan.result can break carbondata.core.scan.processor, while a change to carbondata.core.scan.processor can't break carbondata.core.scan.result.
Position
Below the diagonal: carbondata.core.scan.processor uses a module listed above it, which is the healthy direction.
13→21 carbondata.core.scan.processor uses carbondata.core.scan.result.vectorpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.processor uses a type in carbondata.core.scan.result.vector.
carbondata.core.scan.processor uses carbondata.core.scan.result.vector, so a change to carbondata.core.scan.result.vector can break carbondata.core.scan.processor, while a change to carbondata.core.scan.processor can't break carbondata.core.scan.result.vector.
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.
13→22 carbondata.core.scan.processor uses carbondata.core.datastore.chunk.implpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.processor uses a type in carbondata.core.datastore.chunk.impl.
carbondata.core.scan.processor uses carbondata.core.datastore.chunk.impl, so a change to carbondata.core.datastore.chunk.impl can break carbondata.core.scan.processor, while a change to carbondata.core.scan.processor can't break carbondata.core.datastore.chunk.impl.
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.
13→33 carbondata.core.scan.processor uses carbondata.core.datastorepart of a loop✕
Connections
4 pairs of types, where a type in carbondata.core.scan.processor uses a type in carbondata.core.datastore.
carbondata.core.scan.processor uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.scan.processor, while a change to carbondata.core.scan.processor can't break carbondata.core.datastore.
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.
carbondata.core.scan.filter uses carbondata.core.scan.filter.resolver, so a change to carbondata.core.scan.filter.resolver can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.scan.filter.resolver.
Position
Below the diagonal: carbondata.core.scan.filter uses a module listed above it, which is the healthy direction.
carbondata.core.scan.filter uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.util.
Position
Below the diagonal: carbondata.core.scan.filter uses a module listed above it, which is the healthy direction.
carbondata.core.scan.filter uses carbondata.core.scan.processor, so a change to carbondata.core.scan.processor can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.scan.processor.
Position
Below the diagonal: carbondata.core.scan.filter uses a module listed above it, which is the healthy direction.
14→15 carbondata.core.scan.filter uses carbondata.core.scan.filter.executerpart of a loop✕
Connections
6 pairs of types, where a type in carbondata.core.scan.filter uses a type in carbondata.core.scan.filter.executer.
carbondata.core.scan.filter uses carbondata.core.scan.filter.executer, so a change to carbondata.core.scan.filter.executer can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.scan.filter.executer.
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.
14→16 carbondata.core.scan.filter uses carbondata.core.scan.expressionpart of a loop✕
Connections
3 pairs of types, where a type in carbondata.core.scan.filter uses a type in carbondata.core.scan.expression.
carbondata.core.scan.filter uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.scan.expression.
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.
14→18 carbondata.core.scan.filter uses carbondata.core.metadata.schema.table.columnpart of a loop✕
Connections
4 pairs of types, where a type in carbondata.core.scan.filter uses a type in carbondata.core.metadata.schema.table.column.
carbondata.core.scan.filter uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.metadata.schema.table.column.
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.
14→19 carbondata.core.scan.filter uses carbondata.core.metadata.datatypepart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.filter uses a type in carbondata.core.metadata.datatype.
carbondata.core.scan.filter uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.metadata.datatype.
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.
14→21 carbondata.core.scan.filter uses carbondata.core.scan.result.vectorpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.filter uses a type in carbondata.core.scan.result.vector.
carbondata.core.scan.filter uses carbondata.core.scan.result.vector, so a change to carbondata.core.scan.result.vector can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.scan.result.vector.
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.
14→22 carbondata.core.scan.filter uses carbondata.core.datastore.chunk.implpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.filter uses a type in carbondata.core.datastore.chunk.impl.
carbondata.core.scan.filter uses carbondata.core.datastore.chunk.impl, so a change to carbondata.core.datastore.chunk.impl can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.datastore.chunk.impl.
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.
14→26 carbondata.core.scan.filter uses carbondata.core.metadatapart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.scan.filter uses a type in carbondata.core.metadata.
carbondata.core.scan.filter uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.metadata.
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.
14→28 carbondata.core.scan.filter uses carbondata.core.datastore.pagepart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.filter uses a type in carbondata.core.datastore.page.
carbondata.core.scan.filter uses carbondata.core.datastore.page, so a change to carbondata.core.datastore.page can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.datastore.page.
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.
14→31 carbondata.core.scan.filter uses carbondata.core.datastore.blockpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.filter uses a type in carbondata.core.datastore.block.
carbondata.core.scan.filter uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.scan.filter, while a change to carbondata.core.scan.filter can't break carbondata.core.datastore.block.
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.
carbondata.core.scan.filter.executer uses carbondata.core.scan.filter.resolver, so a change to carbondata.core.scan.filter.resolver can break carbondata.core.scan.filter.executer, while a change to carbondata.core.scan.filter.executer can't break carbondata.core.scan.filter.resolver.
Position
Below the diagonal: carbondata.core.scan.filter.executer uses a module listed above it, which is the healthy direction.
carbondata.core.scan.filter.executer uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.core.scan.filter.executer, while a change to carbondata.core.scan.filter.executer can't break carbondata.core.util.
Position
Below the diagonal: carbondata.core.scan.filter.executer uses a module listed above it, which is the healthy direction.
carbondata.core.scan.filter.executer uses carbondata.core.scan.processor, so a change to carbondata.core.scan.processor can break carbondata.core.scan.filter.executer, while a change to carbondata.core.scan.filter.executer can't break carbondata.core.scan.processor.
Position
Below the diagonal: carbondata.core.scan.filter.executer uses a module listed above it, which is the healthy direction.
carbondata.core.scan.filter.executer uses carbondata.core.scan.filter, so a change to carbondata.core.scan.filter can break carbondata.core.scan.filter.executer, while a change to carbondata.core.scan.filter.executer can't break carbondata.core.scan.filter.
Position
Below the diagonal: carbondata.core.scan.filter.executer uses a module listed above it, which is the healthy direction.
15→16 carbondata.core.scan.filter.executer uses carbondata.core.scan.expressionpart of a loop✕
Connections
6 pairs of types, where a type in carbondata.core.scan.filter.executer uses a type in carbondata.core.scan.expression.
carbondata.core.scan.filter.executer uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.core.scan.filter.executer, while a change to carbondata.core.scan.filter.executer can't break carbondata.core.scan.expression.
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.
15→19 carbondata.core.scan.filter.executer uses carbondata.core.metadata.datatypepart of a loop✕
Connections
7 pairs of types, where a type in carbondata.core.scan.filter.executer uses a type in carbondata.core.metadata.datatype.
carbondata.core.scan.filter.executer uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.scan.filter.executer, while a change to carbondata.core.scan.filter.executer can't break carbondata.core.metadata.datatype.
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.
15→22 carbondata.core.scan.filter.executer uses carbondata.core.datastore.chunk.implpart of a loop✕
Connections
5 pairs of types, where a type in carbondata.core.scan.filter.executer uses a type in carbondata.core.datastore.chunk.impl.
carbondata.core.scan.filter.executer uses carbondata.core.datastore.chunk.impl, so a change to carbondata.core.datastore.chunk.impl can break carbondata.core.scan.filter.executer, while a change to carbondata.core.scan.filter.executer can't break carbondata.core.datastore.chunk.impl.
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.
15→26 carbondata.core.scan.filter.executer uses carbondata.core.metadatapart of a loop✕
Connections
5 pairs of types, where a type in carbondata.core.scan.filter.executer uses a type in carbondata.core.metadata.
carbondata.core.scan.filter.executer uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.scan.filter.executer, while a change to carbondata.core.scan.filter.executer can't break carbondata.core.metadata.
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.
15→28 carbondata.core.scan.filter.executer uses carbondata.core.datastore.pagepart of a loop✕
Connections
6 pairs of types, where a type in carbondata.core.scan.filter.executer uses a type in carbondata.core.datastore.page.
carbondata.core.scan.filter.executer uses carbondata.core.datastore.page, so a change to carbondata.core.datastore.page can break carbondata.core.scan.filter.executer, while a change to carbondata.core.scan.filter.executer can't break carbondata.core.datastore.page.
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.
15→31 carbondata.core.scan.filter.executer uses carbondata.core.datastore.blockpart of a loop✕
Connections
9 pairs of types, where a type in carbondata.core.scan.filter.executer uses a type in carbondata.core.datastore.block.
carbondata.core.scan.filter.executer uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.scan.filter.executer, while a change to carbondata.core.scan.filter.executer can't break carbondata.core.datastore.block.
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.
carbondata.core.scan.expression uses carbondata.core.scan.filter.resolver, so a change to carbondata.core.scan.filter.resolver can break carbondata.core.scan.expression, while a change to carbondata.core.scan.expression can't break carbondata.core.scan.filter.resolver.
Position
Below the diagonal: carbondata.core.scan.expression uses a module listed above it, which is the healthy direction.
carbondata.core.scan.expression uses carbondata.core.scan.filter.executer, so a change to carbondata.core.scan.filter.executer can break carbondata.core.scan.expression, while a change to carbondata.core.scan.expression can't break carbondata.core.scan.filter.executer.
Position
Below the diagonal: carbondata.core.scan.expression uses a module listed above it, which is the healthy direction.
16→18 carbondata.core.scan.expression uses carbondata.core.metadata.schema.table.columnpart of a loop✕
Connections
3 pairs of types, where a type in carbondata.core.scan.expression uses a type in carbondata.core.metadata.schema.table.column.
carbondata.core.scan.expression uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.scan.expression, while a change to carbondata.core.scan.expression can't break carbondata.core.metadata.schema.table.column.
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.
16→19 carbondata.core.scan.expression uses carbondata.core.metadata.datatypepart of a loop✕
Connections
4 pairs of types, where a type in carbondata.core.scan.expression uses a type in carbondata.core.metadata.datatype.
carbondata.core.scan.expression uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.scan.expression, while a change to carbondata.core.scan.expression can't break carbondata.core.metadata.datatype.
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.
16→31 carbondata.core.scan.expression uses carbondata.core.datastore.blockpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.scan.expression uses a type in carbondata.core.datastore.block.
carbondata.core.scan.expression uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.scan.expression, while a change to carbondata.core.scan.expression can't break carbondata.core.datastore.block.
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.
carbondata.core.metadata.schema.table uses carbondata.core.scan.filter.resolver, so a change to carbondata.core.scan.filter.resolver can break carbondata.core.metadata.schema.table, while a change to carbondata.core.metadata.schema.table can't break carbondata.core.scan.filter.resolver.
Position
Below the diagonal: carbondata.core.metadata.schema.table uses a module listed above it, which is the healthy direction.
carbondata.core.metadata.schema.table uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.core.metadata.schema.table, while a change to carbondata.core.metadata.schema.table can't break carbondata.core.scan.expression.
Position
Below the diagonal: carbondata.core.metadata.schema.table uses a module listed above it, which is the healthy direction.
17→18 carbondata.core.metadata.schema.table uses carbondata.core.metadata.schema.table.columnpart of a loop✕
Connections
7 pairs of types, where a type in carbondata.core.metadata.schema.table uses a type in carbondata.core.metadata.schema.table.column.
carbondata.core.metadata.schema.table uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.metadata.schema.table, while a change to carbondata.core.metadata.schema.table can't break carbondata.core.metadata.schema.table.column.
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.
17→19 carbondata.core.metadata.schema.table uses carbondata.core.metadata.datatypepart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.metadata.schema.table uses a type in carbondata.core.metadata.datatype.
carbondata.core.metadata.schema.table uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.metadata.schema.table, while a change to carbondata.core.metadata.schema.table can't break carbondata.core.metadata.datatype.
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.
17→26 carbondata.core.metadata.schema.table uses carbondata.core.metadatapart of a loop✕
Connections
3 pairs of types, where a type in carbondata.core.metadata.schema.table uses a type in carbondata.core.metadata.
carbondata.core.metadata.schema.table uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.metadata.schema.table, while a change to carbondata.core.metadata.schema.table can't break carbondata.core.metadata.
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.
17→30 carbondata.core.metadata.schema.table uses carbondata.core.indexpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.metadata.schema.table uses a type in carbondata.core.index.
carbondata.core.metadata.schema.table uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.core.metadata.schema.table, while a change to carbondata.core.metadata.schema.table can't break carbondata.core.index.
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.
17→31 carbondata.core.metadata.schema.table uses carbondata.core.datastore.blockpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.metadata.schema.table uses a type in carbondata.core.datastore.block.
carbondata.core.metadata.schema.table uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.metadata.schema.table, while a change to carbondata.core.metadata.schema.table can't break carbondata.core.datastore.block.
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.
carbondata.core.metadata.schema.table.column uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.metadata.schema.table.column, while a change to carbondata.core.metadata.schema.table.column can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.core.metadata.schema.table.column uses a module listed above it, which is the healthy direction.
18→19 carbondata.core.metadata.schema.table.column uses carbondata.core.metadata.datatypepart of a loop✕
Connections
3 pairs of types, where a type in carbondata.core.metadata.schema.table.column uses a type in carbondata.core.metadata.datatype.
carbondata.core.metadata.schema.table.column uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.metadata.schema.table.column, while a change to carbondata.core.metadata.schema.table.column can't break carbondata.core.metadata.datatype.
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.
18→26 carbondata.core.metadata.schema.table.column uses carbondata.core.metadatapart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.metadata.schema.table.column uses a type in carbondata.core.metadata.
carbondata.core.metadata.schema.table.column uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.metadata.schema.table.column, while a change to carbondata.core.metadata.schema.table.column can't break carbondata.core.metadata.
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.
carbondata.core.metadata.datatype uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.metadata.datatype, while a change to carbondata.core.metadata.datatype can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.core.metadata.datatype uses a module listed above it, which is the healthy direction.
19→21 carbondata.core.metadata.datatype uses carbondata.core.scan.result.vectorpart of a loop✕
Connections
6 pairs of types, where a type in carbondata.core.metadata.datatype uses a type in carbondata.core.scan.result.vector.
carbondata.core.metadata.datatype uses carbondata.core.scan.result.vector, so a change to carbondata.core.scan.result.vector can break carbondata.core.metadata.datatype, while a change to carbondata.core.metadata.datatype can't break carbondata.core.scan.result.vector.
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.
carbondata.hadoop uses carbondata.common, so a change to carbondata.common can break carbondata.hadoop, while a change to carbondata.hadoop can't break carbondata.common.
Position
Below the diagonal: carbondata.hadoop uses a module listed above it, which is the healthy direction.
carbondata.hadoop uses carbondata.core.statusmanager, so a change to carbondata.core.statusmanager can break carbondata.hadoop, while a change to carbondata.hadoop can't break carbondata.core.statusmanager.
Position
Below the diagonal: carbondata.hadoop uses a module listed above it, which is the healthy direction.
carbondata.hadoop uses carbondata.core.scan.model, so a change to carbondata.core.scan.model can break carbondata.hadoop, while a change to carbondata.hadoop can't break carbondata.core.scan.model.
Position
Below the diagonal: carbondata.hadoop uses a module listed above it, which is the healthy direction.
carbondata.hadoop uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.hadoop, while a change to carbondata.hadoop can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.hadoop uses a module listed above it, which is the healthy direction.
20→25 carbondata.hadoop uses carbondata.core.indexstorepart of a loop✕
Connections
1 pair of types, where a type in carbondata.hadoop uses a type in carbondata.core.indexstore.
carbondata.hadoop uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.hadoop, while a change to carbondata.hadoop can't break carbondata.core.indexstore.
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.
20→26 carbondata.hadoop uses carbondata.core.metadatapart of a loop✕
Connections
1 pair of types, where a type in carbondata.hadoop uses a type in carbondata.core.metadata.
carbondata.hadoop uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.hadoop, while a change to carbondata.hadoop can't break carbondata.core.metadata.
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.
20→30 carbondata.hadoop uses carbondata.core.indexpart of a loop✕
Connections
1 pair of types, where a type in carbondata.hadoop uses a type in carbondata.core.index.
carbondata.hadoop uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.hadoop, while a change to carbondata.hadoop can't break carbondata.core.index.
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.
20→31 carbondata.hadoop uses carbondata.core.datastore.blockpart of a loop✕
Connections
3 pairs of types, where a type in carbondata.hadoop uses a type in carbondata.core.datastore.block.
carbondata.hadoop uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.hadoop, while a change to carbondata.hadoop can't break carbondata.core.datastore.block.
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.
carbondata.core.scan.result.vector uses carbondata.core.scan.model, so a change to carbondata.core.scan.model can break carbondata.core.scan.result.vector, while a change to carbondata.core.scan.result.vector can't break carbondata.core.scan.model.
Position
Below the diagonal: carbondata.core.scan.result.vector uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.vector uses carbondata.core.scan.scanner, so a change to carbondata.core.scan.scanner can break carbondata.core.scan.result.vector, while a change to carbondata.core.scan.result.vector can't break carbondata.core.scan.scanner.
Position
Below the diagonal: carbondata.core.scan.result.vector uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.vector uses carbondata.core.scan.filter, so a change to carbondata.core.scan.filter can break carbondata.core.scan.result.vector, while a change to carbondata.core.scan.result.vector can't break carbondata.core.scan.filter.
Position
Below the diagonal: carbondata.core.scan.result.vector uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.vector uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.scan.result.vector, while a change to carbondata.core.scan.result.vector can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.core.scan.result.vector uses a module listed above it, which is the healthy direction.
21→28 carbondata.core.scan.result.vector uses carbondata.core.datastore.pagepart of a loop✕
Connections
9 pairs of types, where a type in carbondata.core.scan.result.vector uses a type in carbondata.core.datastore.page.
carbondata.core.scan.result.vector uses carbondata.core.datastore.page, so a change to carbondata.core.datastore.page can break carbondata.core.scan.result.vector, while a change to carbondata.core.scan.result.vector can't break carbondata.core.datastore.page.
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.
carbondata.core.datastore.chunk.impl uses carbondata.core.scan.result.vector, so a change to carbondata.core.scan.result.vector can break carbondata.core.datastore.chunk.impl, while a change to carbondata.core.datastore.chunk.impl can't break carbondata.core.scan.result.vector.
Position
Below the diagonal: carbondata.core.datastore.chunk.impl uses a module listed above it, which is the healthy direction.
22→28 carbondata.core.datastore.chunk.impl uses carbondata.core.datastore.pagepart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.datastore.chunk.impl uses a type in carbondata.core.datastore.page.
carbondata.core.datastore.chunk.impl uses carbondata.core.datastore.page, so a change to carbondata.core.datastore.page can break carbondata.core.datastore.chunk.impl, while a change to carbondata.core.datastore.chunk.impl can't break carbondata.core.datastore.page.
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.
22→33 carbondata.core.datastore.chunk.impl uses carbondata.core.datastorepart of a loop✕
Connections
4 pairs of types, where a type in carbondata.core.datastore.chunk.impl uses a type in carbondata.core.datastore.
carbondata.core.datastore.chunk.impl uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.datastore.chunk.impl, while a change to carbondata.core.datastore.chunk.impl can't break carbondata.core.datastore.
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.
spark.sql uses spark.sql.execution.command, so a change to spark.sql.execution.command can break spark.sql, while a change to spark.sql can't break spark.sql.execution.command.
Position
Below the diagonal: spark.sql uses a module listed above it, which is the healthy direction.
spark.sql uses carbondata.core.scan.scanner, so a change to carbondata.core.scan.scanner can break spark.sql, while a change to spark.sql can't break carbondata.core.scan.scanner.
Position
Below the diagonal: spark.sql uses a module listed above it, which is the healthy direction.
spark.sql uses carbondata.core.scan.result.vector, so a change to carbondata.core.scan.result.vector can break spark.sql, while a change to spark.sql can't break carbondata.core.scan.result.vector.
Position
Below the diagonal: spark.sql uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore.blockletindex uses carbondata.core.datastore.filesystem, so a change to carbondata.core.datastore.filesystem can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.datastore.filesystem.
Position
Below the diagonal: carbondata.core.indexstore.blockletindex uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore.blockletindex uses carbondata.core.metadata.blocklet, so a change to carbondata.core.metadata.blocklet can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.metadata.blocklet.
Position
Below the diagonal: carbondata.core.indexstore.blockletindex uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore.blockletindex uses carbondata.core.scan.filter.resolver, so a change to carbondata.core.scan.filter.resolver can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.scan.filter.resolver.
Position
Below the diagonal: carbondata.core.indexstore.blockletindex uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore.blockletindex uses carbondata.core.statusmanager, so a change to carbondata.core.statusmanager can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.statusmanager.
Position
Below the diagonal: carbondata.core.indexstore.blockletindex uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore.blockletindex uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.util.
Position
Below the diagonal: carbondata.core.indexstore.blockletindex uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore.blockletindex uses carbondata.core.scan.filter.executer, so a change to carbondata.core.scan.filter.executer can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.scan.filter.executer.
Position
Below the diagonal: carbondata.core.indexstore.blockletindex uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore.blockletindex uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.scan.expression.
Position
Below the diagonal: carbondata.core.indexstore.blockletindex uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore.blockletindex uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.core.indexstore.blockletindex uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore.blockletindex uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.core.indexstore.blockletindex uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore.blockletindex uses carbondata.core.datastore.chunk.impl, so a change to carbondata.core.datastore.chunk.impl can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.datastore.chunk.impl.
Position
Below the diagonal: carbondata.core.indexstore.blockletindex uses a module listed above it, which is the healthy direction.
24→25 carbondata.core.indexstore.blockletindex uses carbondata.core.indexstorepart of a loop✕
Connections
17 pairs of types, where a type in carbondata.core.indexstore.blockletindex uses a type in carbondata.core.indexstore.
carbondata.core.indexstore.blockletindex uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.indexstore.
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.
24→26 carbondata.core.indexstore.blockletindex uses carbondata.core.metadatapart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.indexstore.blockletindex uses a type in carbondata.core.metadata.
carbondata.core.indexstore.blockletindex uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.metadata.
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.
24→29 carbondata.core.indexstore.blockletindex uses carbondata.core.index.devpart of a loop✕
Connections
8 pairs of types, where a type in carbondata.core.indexstore.blockletindex uses a type in carbondata.core.index.dev.
carbondata.core.indexstore.blockletindex uses carbondata.core.index.dev, so a change to carbondata.core.index.dev can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.index.dev.
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.
24→30 carbondata.core.indexstore.blockletindex uses carbondata.core.indexpart of a loop✕
Connections
6 pairs of types, where a type in carbondata.core.indexstore.blockletindex uses a type in carbondata.core.index.
carbondata.core.indexstore.blockletindex uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.index.
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.
24→31 carbondata.core.indexstore.blockletindex uses carbondata.core.datastore.blockpart of a loop✕
Connections
9 pairs of types, where a type in carbondata.core.indexstore.blockletindex uses a type in carbondata.core.datastore.block.
carbondata.core.indexstore.blockletindex uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.datastore.block.
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.
24→33 carbondata.core.indexstore.blockletindex uses carbondata.core.datastorepart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.indexstore.blockletindex uses a type in carbondata.core.datastore.
carbondata.core.indexstore.blockletindex uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.indexstore.blockletindex, while a change to carbondata.core.indexstore.blockletindex can't break carbondata.core.datastore.
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.
carbondata.core.indexstore uses carbondata.core.metadata.blocklet, so a change to carbondata.core.metadata.blocklet can break carbondata.core.indexstore, while a change to carbondata.core.indexstore can't break carbondata.core.metadata.blocklet.
Position
Below the diagonal: carbondata.core.indexstore uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore uses carbondata.core.mutate, so a change to carbondata.core.mutate can break carbondata.core.indexstore, while a change to carbondata.core.indexstore can't break carbondata.core.mutate.
Position
Below the diagonal: carbondata.core.indexstore uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.indexstore, while a change to carbondata.core.indexstore can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.core.indexstore uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.indexstore, while a change to carbondata.core.indexstore can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.core.indexstore uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore uses carbondata.hadoop, so a change to carbondata.hadoop can break carbondata.core.indexstore, while a change to carbondata.core.indexstore can't break carbondata.hadoop.
Position
Below the diagonal: carbondata.core.indexstore uses a module listed above it, which is the healthy direction.
carbondata.core.indexstore uses carbondata.core.indexstore.blockletindex, so a change to carbondata.core.indexstore.blockletindex can break carbondata.core.indexstore, while a change to carbondata.core.indexstore can't break carbondata.core.indexstore.blockletindex.
Position
Below the diagonal: carbondata.core.indexstore uses a module listed above it, which is the healthy direction.
25→26 carbondata.core.indexstore uses carbondata.core.metadatapart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.indexstore uses a type in carbondata.core.metadata.
carbondata.core.indexstore uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.indexstore, while a change to carbondata.core.indexstore can't break carbondata.core.metadata.
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.
25→29 carbondata.core.indexstore uses carbondata.core.index.devpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.indexstore uses a type in carbondata.core.index.dev.
carbondata.core.indexstore uses carbondata.core.index.dev, so a change to carbondata.core.index.dev can break carbondata.core.indexstore, while a change to carbondata.core.indexstore can't break carbondata.core.index.dev.
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.
25→30 carbondata.core.indexstore uses carbondata.core.indexpart of a loop✕
Connections
8 pairs of types, where a type in carbondata.core.indexstore uses a type in carbondata.core.index.
carbondata.core.indexstore uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.core.indexstore, while a change to carbondata.core.indexstore can't break carbondata.core.index.
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.
25→31 carbondata.core.indexstore uses carbondata.core.datastore.blockpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.indexstore uses a type in carbondata.core.datastore.block.
carbondata.core.indexstore uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.indexstore, while a change to carbondata.core.indexstore can't break carbondata.core.datastore.block.
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.
carbondata.core.metadata uses carbondata.core.datastore.filesystem, so a change to carbondata.core.datastore.filesystem can break carbondata.core.metadata, while a change to carbondata.core.metadata can't break carbondata.core.datastore.filesystem.
Position
Below the diagonal: carbondata.core.metadata uses a module listed above it, which is the healthy direction.
carbondata.core.metadata uses carbondata.core.statusmanager, so a change to carbondata.core.statusmanager can break carbondata.core.metadata, while a change to carbondata.core.metadata can't break carbondata.core.statusmanager.
Position
Below the diagonal: carbondata.core.metadata uses a module listed above it, which is the healthy direction.
carbondata.core.metadata uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.metadata, while a change to carbondata.core.metadata can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.core.metadata uses a module listed above it, which is the healthy direction.
carbondata.core.metadata uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.metadata, while a change to carbondata.core.metadata can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.core.metadata uses a module listed above it, which is the healthy direction.
carbondata.core.metadata uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.metadata, while a change to carbondata.core.metadata can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.core.metadata uses a module listed above it, which is the healthy direction.
carbondata.core.metadata uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.core.metadata, while a change to carbondata.core.metadata can't break carbondata.core.indexstore.
Position
Below the diagonal: carbondata.core.metadata uses a module listed above it, which is the healthy direction.
26→30 carbondata.core.metadata uses carbondata.core.indexpart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.metadata uses a type in carbondata.core.index.
carbondata.core.metadata uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.core.metadata, while a change to carbondata.core.metadata can't break carbondata.core.index.
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.
carbondata.core.datastore.page.encoding uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.datastore.page.encoding, while a change to carbondata.core.datastore.page.encoding can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.core.datastore.page.encoding uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.page.encoding uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.datastore.page.encoding, while a change to carbondata.core.datastore.page.encoding can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.core.datastore.page.encoding uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.page.encoding uses carbondata.core.scan.result.vector, so a change to carbondata.core.scan.result.vector can break carbondata.core.datastore.page.encoding, while a change to carbondata.core.datastore.page.encoding can't break carbondata.core.scan.result.vector.
Position
Below the diagonal: carbondata.core.datastore.page.encoding uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.page.encoding uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.datastore.page.encoding, while a change to carbondata.core.datastore.page.encoding can't break carbondata.core.metadata.
Position
Below the diagonal: carbondata.core.datastore.page.encoding uses a module listed above it, which is the healthy direction.
27→28 carbondata.core.datastore.page.encoding uses carbondata.core.datastore.pagepart of a loop✕
Connections
6 pairs of types, where a type in carbondata.core.datastore.page.encoding uses a type in carbondata.core.datastore.page.
carbondata.core.datastore.page.encoding uses carbondata.core.datastore.page, so a change to carbondata.core.datastore.page can break carbondata.core.datastore.page.encoding, while a change to carbondata.core.datastore.page.encoding can't break carbondata.core.datastore.page.
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.
27→33 carbondata.core.datastore.page.encoding uses carbondata.core.datastorepart of a loop✕
Connections
5 pairs of types, where a type in carbondata.core.datastore.page.encoding uses a type in carbondata.core.datastore.
carbondata.core.datastore.page.encoding uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.datastore.page.encoding, while a change to carbondata.core.datastore.page.encoding can't break carbondata.core.datastore.
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.
carbondata.core.datastore.page uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.datastore.page, while a change to carbondata.core.datastore.page can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.core.datastore.page uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.page uses carbondata.core.scan.result.vector, so a change to carbondata.core.scan.result.vector can break carbondata.core.datastore.page, while a change to carbondata.core.datastore.page can't break carbondata.core.scan.result.vector.
Position
Below the diagonal: carbondata.core.datastore.page uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.page uses carbondata.core.datastore.page.encoding, so a change to carbondata.core.datastore.page.encoding can break carbondata.core.datastore.page, while a change to carbondata.core.datastore.page can't break carbondata.core.datastore.page.encoding.
Position
Below the diagonal: carbondata.core.datastore.page uses a module listed above it, which is the healthy direction.
28→33 carbondata.core.datastore.page uses carbondata.core.datastorepart of a loop✕
Connections
3 pairs of types, where a type in carbondata.core.datastore.page uses a type in carbondata.core.datastore.
carbondata.core.datastore.page uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.datastore.page, while a change to carbondata.core.datastore.page can't break carbondata.core.datastore.
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.
carbondata.core.index.dev uses carbondata.core.scan.filter.resolver, so a change to carbondata.core.scan.filter.resolver can break carbondata.core.index.dev, while a change to carbondata.core.index.dev can't break carbondata.core.scan.filter.resolver.
Position
Below the diagonal: carbondata.core.index.dev uses a module listed above it, which is the healthy direction.
carbondata.core.index.dev uses carbondata.core.scan.filter.executer, so a change to carbondata.core.scan.filter.executer can break carbondata.core.index.dev, while a change to carbondata.core.index.dev can't break carbondata.core.scan.filter.executer.
Position
Below the diagonal: carbondata.core.index.dev uses a module listed above it, which is the healthy direction.
carbondata.core.index.dev uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.core.index.dev, while a change to carbondata.core.index.dev can't break carbondata.core.scan.expression.
Position
Below the diagonal: carbondata.core.index.dev uses a module listed above it, which is the healthy direction.
carbondata.core.index.dev uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.index.dev, while a change to carbondata.core.index.dev can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.core.index.dev uses a module listed above it, which is the healthy direction.
carbondata.core.index.dev uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.index.dev, while a change to carbondata.core.index.dev can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.core.index.dev uses a module listed above it, which is the healthy direction.
carbondata.core.index.dev uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.core.index.dev, while a change to carbondata.core.index.dev can't break carbondata.core.indexstore.
Position
Below the diagonal: carbondata.core.index.dev uses a module listed above it, which is the healthy direction.
carbondata.core.index.dev uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.index.dev, while a change to carbondata.core.index.dev can't break carbondata.core.metadata.
Position
Below the diagonal: carbondata.core.index.dev uses a module listed above it, which is the healthy direction.
carbondata.core.index.dev uses carbondata.core.datastore.page, so a change to carbondata.core.datastore.page can break carbondata.core.index.dev, while a change to carbondata.core.index.dev can't break carbondata.core.datastore.page.
Position
Below the diagonal: carbondata.core.index.dev uses a module listed above it, which is the healthy direction.
29→30 carbondata.core.index.dev uses carbondata.core.indexpart of a loop✕
Connections
9 pairs of types, where a type in carbondata.core.index.dev uses a type in carbondata.core.index.
carbondata.core.index.dev uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.core.index.dev, while a change to carbondata.core.index.dev can't break carbondata.core.index.
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.
29→31 carbondata.core.index.dev uses carbondata.core.datastore.blockpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.index.dev uses a type in carbondata.core.datastore.block.
carbondata.core.index.dev uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.index.dev, while a change to carbondata.core.index.dev can't break carbondata.core.datastore.block.
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.
carbondata.core.index uses carbondata.core.scan.filter.resolver, so a change to carbondata.core.scan.filter.resolver can break carbondata.core.index, while a change to carbondata.core.index can't break carbondata.core.scan.filter.resolver.
Position
Below the diagonal: carbondata.core.index uses a module listed above it, which is the healthy direction.
carbondata.core.index uses carbondata.core.statusmanager, so a change to carbondata.core.statusmanager can break carbondata.core.index, while a change to carbondata.core.index can't break carbondata.core.statusmanager.
Position
Below the diagonal: carbondata.core.index uses a module listed above it, which is the healthy direction.
carbondata.core.index uses carbondata.core.mutate, so a change to carbondata.core.mutate can break carbondata.core.index, while a change to carbondata.core.index can't break carbondata.core.mutate.
Position
Below the diagonal: carbondata.core.index uses a module listed above it, which is the healthy direction.
carbondata.core.index uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.core.index, while a change to carbondata.core.index can't break carbondata.core.scan.expression.
Position
Below the diagonal: carbondata.core.index uses a module listed above it, which is the healthy direction.
carbondata.core.index uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.index, while a change to carbondata.core.index can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.core.index uses a module listed above it, which is the healthy direction.
carbondata.core.index uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.index, while a change to carbondata.core.index can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.core.index uses a module listed above it, which is the healthy direction.
carbondata.core.index uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.core.index, while a change to carbondata.core.index can't break carbondata.core.indexstore.
Position
Below the diagonal: carbondata.core.index uses a module listed above it, which is the healthy direction.
carbondata.core.index uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.index, while a change to carbondata.core.index can't break carbondata.core.metadata.
Position
Below the diagonal: carbondata.core.index uses a module listed above it, which is the healthy direction.
carbondata.core.index uses carbondata.core.index.dev, so a change to carbondata.core.index.dev can break carbondata.core.index, while a change to carbondata.core.index can't break carbondata.core.index.dev.
Position
Below the diagonal: carbondata.core.index uses a module listed above it, which is the healthy direction.
30→31 carbondata.core.index uses carbondata.core.datastore.blockpart of a loop✕
Connections
2 pairs of types, where a type in carbondata.core.index uses a type in carbondata.core.datastore.block.
carbondata.core.index uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.index, while a change to carbondata.core.index can't break carbondata.core.datastore.block.
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.
carbondata.core.datastore.block uses carbondata.core.metadata.blocklet, so a change to carbondata.core.metadata.blocklet can break carbondata.core.datastore.block, while a change to carbondata.core.datastore.block can't break carbondata.core.metadata.blocklet.
Position
Below the diagonal: carbondata.core.datastore.block uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.block uses carbondata.core.mutate, so a change to carbondata.core.mutate can break carbondata.core.datastore.block, while a change to carbondata.core.datastore.block can't break carbondata.core.mutate.
Position
Below the diagonal: carbondata.core.datastore.block uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.block uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.datastore.block, while a change to carbondata.core.datastore.block can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.core.datastore.block uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.block uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.datastore.block, while a change to carbondata.core.datastore.block can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.core.datastore.block uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.block uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.core.datastore.block, while a change to carbondata.core.datastore.block can't break carbondata.core.indexstore.
Position
Below the diagonal: carbondata.core.datastore.block uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.block uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.datastore.block, while a change to carbondata.core.datastore.block can't break carbondata.core.metadata.
Position
Below the diagonal: carbondata.core.datastore.block uses a module listed above it, which is the healthy direction.
carbondata.core.datastore.block uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.core.datastore.block, while a change to carbondata.core.datastore.block can't break carbondata.core.index.
Position
Below the diagonal: carbondata.core.datastore.block uses a module listed above it, which is the healthy direction.
31→33 carbondata.core.datastore.block uses carbondata.core.datastorepart of a loop✕
Connections
1 pair of types, where a type in carbondata.core.datastore.block uses a type in carbondata.core.datastore.
carbondata.core.datastore.block uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.datastore.block, while a change to carbondata.core.datastore.block can't break carbondata.core.datastore.
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.
carbondata.processing.loading.model uses carbondata.core.statusmanager, so a change to carbondata.core.statusmanager can break carbondata.processing.loading.model, while a change to carbondata.processing.loading.model can't break carbondata.core.statusmanager.
Position
Below the diagonal: carbondata.processing.loading.model uses a module listed above it, which is the healthy direction.
carbondata.processing.loading.model uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.processing.loading.model, while a change to carbondata.processing.loading.model can't break carbondata.core.util.
Position
Below the diagonal: carbondata.processing.loading.model uses a module listed above it, which is the healthy direction.
carbondata.processing.loading.model uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.processing.loading.model, while a change to carbondata.processing.loading.model can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.processing.loading.model uses a module listed above it, which is the healthy direction.
carbondata.processing.loading.model uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.processing.loading.model, while a change to carbondata.processing.loading.model can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.processing.loading.model uses a module listed above it, which is the healthy direction.
carbondata.processing.loading.model uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.processing.loading.model, while a change to carbondata.processing.loading.model can't break carbondata.core.index.
Position
Below the diagonal: carbondata.processing.loading.model uses a module listed above it, which is the healthy direction.
carbondata.core.datastore uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.core.datastore, while a change to carbondata.core.datastore can't break carbondata.core.util.
Position
Below the diagonal: carbondata.core.datastore uses a module listed above it, which is the healthy direction.
carbondata.core.datastore uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.core.datastore, while a change to carbondata.core.datastore can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.core.datastore uses a module listed above it, which is the healthy direction.
carbondata.core.datastore uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.core.datastore, while a change to carbondata.core.datastore can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.core.datastore uses a module listed above it, which is the healthy direction.
carbondata.core.datastore uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.datastore, while a change to carbondata.core.datastore can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.core.datastore uses a module listed above it, which is the healthy direction.
carbondata.core.datastore uses carbondata.core.datastore.chunk.impl, so a change to carbondata.core.datastore.chunk.impl can break carbondata.core.datastore, while a change to carbondata.core.datastore can't break carbondata.core.datastore.chunk.impl.
Position
Below the diagonal: carbondata.core.datastore uses a module listed above it, which is the healthy direction.
carbondata.core.datastore uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.core.datastore, while a change to carbondata.core.datastore can't break carbondata.core.metadata.
Position
Below the diagonal: carbondata.core.datastore uses a module listed above it, which is the healthy direction.
carbondata.core.datastore uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.datastore, while a change to carbondata.core.datastore can't break carbondata.core.datastore.block.
Position
Below the diagonal: carbondata.core.datastore uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.datastore.filesystem, so a change to carbondata.core.datastore.filesystem can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.datastore.filesystem.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.scan.filter.resolver, so a change to carbondata.core.scan.filter.resolver can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.scan.filter.resolver.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.scan.filter.executer, so a change to carbondata.core.scan.filter.executer can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.scan.filter.executer.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.scan.expression.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.indexstore.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.datastore.page, so a change to carbondata.core.datastore.page can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.datastore.page.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.index.dev, so a change to carbondata.core.index.dev can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.index.dev.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.index.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.index.bloom uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.index.bloom, while a change to carbondata.index.bloom can't break carbondata.core.datastore.block.
Position
Below the diagonal: carbondata.index.bloom uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.iterator uses carbondata.common, so a change to carbondata.common can break carbondata.core.scan.result.iterator, while a change to carbondata.core.scan.result.iterator can't break carbondata.common.
Position
Below the diagonal: carbondata.core.scan.result.iterator uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.iterator uses carbondata.core.mutate, so a change to carbondata.core.mutate can break carbondata.core.scan.result.iterator, while a change to carbondata.core.scan.result.iterator can't break carbondata.core.mutate.
Position
Below the diagonal: carbondata.core.scan.result.iterator uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.iterator uses carbondata.core.scan.model, so a change to carbondata.core.scan.model can break carbondata.core.scan.result.iterator, while a change to carbondata.core.scan.result.iterator can't break carbondata.core.scan.model.
Position
Below the diagonal: carbondata.core.scan.result.iterator uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.iterator uses carbondata.core.scan.executor.infos, so a change to carbondata.core.scan.executor.infos can break carbondata.core.scan.result.iterator, while a change to carbondata.core.scan.result.iterator can't break carbondata.core.scan.executor.infos.
Position
Below the diagonal: carbondata.core.scan.result.iterator uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.iterator uses carbondata.core.scan.result, so a change to carbondata.core.scan.result can break carbondata.core.scan.result.iterator, while a change to carbondata.core.scan.result.iterator can't break carbondata.core.scan.result.
Position
Below the diagonal: carbondata.core.scan.result.iterator uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.iterator uses carbondata.core.scan.processor, so a change to carbondata.core.scan.processor can break carbondata.core.scan.result.iterator, while a change to carbondata.core.scan.result.iterator can't break carbondata.core.scan.processor.
Position
Below the diagonal: carbondata.core.scan.result.iterator uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.iterator uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.core.scan.result.iterator, while a change to carbondata.core.scan.result.iterator can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.core.scan.result.iterator uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.iterator uses carbondata.core.scan.result.vector, so a change to carbondata.core.scan.result.vector can break carbondata.core.scan.result.iterator, while a change to carbondata.core.scan.result.iterator can't break carbondata.core.scan.result.vector.
Position
Below the diagonal: carbondata.core.scan.result.iterator uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.iterator uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.core.scan.result.iterator, while a change to carbondata.core.scan.result.iterator can't break carbondata.core.datastore.block.
Position
Below the diagonal: carbondata.core.scan.result.iterator uses a module listed above it, which is the healthy direction.
carbondata.core.scan.result.iterator uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.core.scan.result.iterator, while a change to carbondata.core.scan.result.iterator can't break carbondata.core.datastore.
Position
Below the diagonal: carbondata.core.scan.result.iterator uses a module listed above it, which is the healthy direction.
carbondata.processing.loading uses carbondata.common, so a change to carbondata.common can break carbondata.processing.loading, while a change to carbondata.processing.loading can't break carbondata.common.
Position
Below the diagonal: carbondata.processing.loading uses a module listed above it, which is the healthy direction.
carbondata.processing.loading uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.processing.loading, while a change to carbondata.processing.loading can't break carbondata.core.util.
Position
Below the diagonal: carbondata.processing.loading uses a module listed above it, which is the healthy direction.
carbondata.processing.loading uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.processing.loading, while a change to carbondata.processing.loading can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.processing.loading uses a module listed above it, which is the healthy direction.
carbondata.processing.loading uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.processing.loading, while a change to carbondata.processing.loading can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.processing.loading uses a module listed above it, which is the healthy direction.
carbondata.processing.loading uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.processing.loading, while a change to carbondata.processing.loading can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.processing.loading uses a module listed above it, which is the healthy direction.
carbondata.processing.loading uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.processing.loading, while a change to carbondata.processing.loading can't break carbondata.core.metadata.
Position
Below the diagonal: carbondata.processing.loading uses a module listed above it, which is the healthy direction.
carbondata.processing.loading uses carbondata.processing.loading.model, so a change to carbondata.processing.loading.model can break carbondata.processing.loading, while a change to carbondata.processing.loading can't break carbondata.processing.loading.model.
Position
Below the diagonal: carbondata.processing.loading uses a module listed above it, which is the healthy direction.
carbondata.processing.loading uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.processing.loading, while a change to carbondata.processing.loading can't break carbondata.core.datastore.
Position
Below the diagonal: carbondata.processing.loading uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.datastore.filesystem, so a change to carbondata.core.datastore.filesystem can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.datastore.filesystem.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.scan.filter.resolver, so a change to carbondata.core.scan.filter.resolver can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.scan.filter.resolver.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.statusmanager, so a change to carbondata.core.statusmanager can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.statusmanager.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.util.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.scan.model, so a change to carbondata.core.scan.model can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.scan.model.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.scan.expression.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.hadoop, so a change to carbondata.hadoop can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.hadoop.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.indexstore.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.metadata.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.core.index.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.processing.loading.model, so a change to carbondata.processing.loading.model can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.processing.loading.model.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.hadoop.api uses carbondata.processing.loading, so a change to carbondata.processing.loading can break carbondata.hadoop.api, while a change to carbondata.hadoop.api can't break carbondata.processing.loading.
Position
Below the diagonal: carbondata.hadoop.api uses a module listed above it, which is the healthy direction.
carbondata.processing.sort.sortdata uses carbondata.common, so a change to carbondata.common can break carbondata.processing.sort.sortdata, while a change to carbondata.processing.sort.sortdata can't break carbondata.common.
Position
Below the diagonal: carbondata.processing.sort.sortdata uses a module listed above it, which is the healthy direction.
carbondata.processing.sort.sortdata uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.processing.sort.sortdata, while a change to carbondata.processing.sort.sortdata can't break carbondata.core.util.
Position
Below the diagonal: carbondata.processing.sort.sortdata uses a module listed above it, which is the healthy direction.
carbondata.processing.sort.sortdata uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.processing.sort.sortdata, while a change to carbondata.processing.sort.sortdata can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.processing.sort.sortdata uses a module listed above it, which is the healthy direction.
carbondata.processing.sort.sortdata uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.processing.sort.sortdata, while a change to carbondata.processing.sort.sortdata can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.processing.sort.sortdata uses a module listed above it, which is the healthy direction.
carbondata.processing.sort.sortdata uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.processing.sort.sortdata, while a change to carbondata.processing.sort.sortdata can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.processing.sort.sortdata uses a module listed above it, which is the healthy direction.
carbondata.processing.sort.sortdata uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.processing.sort.sortdata, while a change to carbondata.processing.sort.sortdata can't break carbondata.core.datastore.block.
Position
Below the diagonal: carbondata.processing.sort.sortdata uses a module listed above it, which is the healthy direction.
carbondata.processing.sort.sortdata uses carbondata.core.scan.result.iterator, so a change to carbondata.core.scan.result.iterator can break carbondata.processing.sort.sortdata, while a change to carbondata.processing.sort.sortdata can't break carbondata.core.scan.result.iterator.
Position
Below the diagonal: carbondata.processing.sort.sortdata uses a module listed above it, which is the healthy direction.
carbondata.processing.sort.sortdata uses carbondata.processing.loading, so a change to carbondata.processing.loading can break carbondata.processing.sort.sortdata, while a change to carbondata.processing.sort.sortdata can't break carbondata.processing.loading.
Position
Below the diagonal: carbondata.processing.sort.sortdata uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.core.util.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.core.metadata.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.core.datastore.page.encoding, so a change to carbondata.core.datastore.page.encoding can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.core.datastore.page.encoding.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.core.datastore.page, so a change to carbondata.core.datastore.page can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.core.datastore.page.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.core.datastore.block.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.processing.loading.model, so a change to carbondata.processing.loading.model can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.processing.loading.model.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.core.datastore, so a change to carbondata.core.datastore can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.core.datastore.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.store uses carbondata.processing.loading, so a change to carbondata.processing.loading can break carbondata.processing.store, while a change to carbondata.processing.store can't break carbondata.processing.loading.
Position
Below the diagonal: carbondata.processing.store uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.common, so a change to carbondata.common can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.common.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.datastore.filesystem, so a change to carbondata.core.datastore.filesystem can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.datastore.filesystem.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.metadata.blocklet, so a change to carbondata.core.metadata.blocklet can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.metadata.blocklet.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.statusmanager, so a change to carbondata.core.statusmanager can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.statusmanager.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.mutate, so a change to carbondata.core.mutate can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.mutate.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.util, so a change to carbondata.core.util can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.util.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.scan.model, so a change to carbondata.core.scan.model can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.scan.model.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.scan.result, so a change to carbondata.core.scan.result can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.scan.result.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.scan.expression, so a change to carbondata.core.scan.expression can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.scan.expression.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.metadata.schema.table, so a change to carbondata.core.metadata.schema.table can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.metadata.schema.table.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.metadata.schema.table.column, so a change to carbondata.core.metadata.schema.table.column can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.metadata.schema.table.column.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.metadata.datatype, so a change to carbondata.core.metadata.datatype can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.metadata.datatype.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.hadoop, so a change to carbondata.hadoop can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.hadoop.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.indexstore, so a change to carbondata.core.indexstore can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.indexstore.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.metadata, so a change to carbondata.core.metadata can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.metadata.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.index, so a change to carbondata.core.index can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.index.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.datastore.block, so a change to carbondata.core.datastore.block can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.datastore.block.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.processing.loading.model, so a change to carbondata.processing.loading.model can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.processing.loading.model.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.core.scan.result.iterator, so a change to carbondata.core.scan.result.iterator can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.core.scan.result.iterator.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.processing.sort.sortdata, so a change to carbondata.processing.sort.sortdata can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.processing.sort.sortdata.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
carbondata.processing.merger uses carbondata.processing.store, so a change to carbondata.processing.store can break carbondata.processing.merger, while a change to carbondata.processing.merger can't break carbondata.processing.store.
Position
Below the diagonal: carbondata.processing.merger uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 52% · Adequate · gated by D2, 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
45
High / Critical
A03:2025 — Software Supply Chain Failures
37
High / Critical
A02:2025 — Security Misconfiguration
2
High / Critical
A07:2025 — Authentication Failures
1
High / Critical
Roadmap
Top priorities: Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md; Resolve the 923 Orphaned file finding(s) in Knowledge Freshness — start with CarbonToSparkAdapter.scala (3), CarbonSessionStateBuilder.scala (3), package.scala (3); 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md.
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.
Resolve the 1 `cleanFilesForMv` spells `Mv` where 21 names in the project spell it… finding(s) in Naming Consistency — start with CleanFilesPostEventListener.scala.
Resolve the 1 `getDataFrameWithTupleID` spells `ID` where 107 names in the project… finding(s) in Naming Consistency — start with CommonLoadUtils.scala.
Resolve the 1 `getTaskNumberBasedOnID` spells `ID` where 107 names in the project… finding(s) in Naming Consistency — start with CarbonMergerRDD.scala.
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 — 59
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 — 1954
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 — 997
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 13
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 42 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, 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 — 42 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, 2993 of 3010 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.
D8 Code Coverage — 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. Coverage NOT MEASURED: test source is present (.java, .py, .scala) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D10 Test Quality — 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. The 950 test(s) behind this row are the ones the code-model census could read, and this repository also carries at least 453 test source file(s) (.py, .scala) that it cannot: it reads the test types the .java frontend declared, so a suite in any other language is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — 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. Test source is present (.java, .py, .scala) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, 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. This repository's dependency manifests WERE read and their pinning discipline assessed; what went unanswered is the currency half, because packages.confluent.io — the registry that answers it — was asked and did not reply (the build stopped because packages.confluent.io, a repository this project declares, refused it with HTTP 403 — what this scan's egress allowlist returns for a host that is not on it; 63 dependencies were resolved and graded first, but the graph is partial so the result is reported and not scored). This is OUR side and it is an ENVIRONMENT fault, not a missing collector: the collector exists and ran. An HTTP 403 here is what this scan's egress allowlist returns for a host that is not on it, so the remedy is to add packages.confluent.io to the allowlist and re-run — not to build anything.
D14 License Compliance — 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. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — 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. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — 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. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
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 — 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. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
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.
D27 Navigability — 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. Tracing effort is measured over resolved call sites, and all 667 sampled here came from .java files. This repository's .scala source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
AXR1 Runtime accessibility — 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. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — 5 | -------------------- ERROR: failed to solve: process "/bin/bash -o pipefail -c wget https://dlcdn.apache.org/carbondata/2.3.0/apache-carbondata-2.3.0-bin-spark3.1.1-hadoop2.7.2.jar -P /usr/local/spark-3.1.1-bin-hadoop3.2/jars/" did not complete successfully: exit code: 4; runtime evidence skipped.
IC1 Incompleteness & stubs — 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 implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
X10 Duplicated predicate — 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. 54 further occurrence(s) are not listed individually; the score already reflects all 94.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
X24 Document value interpolated into markup unescaped — 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X27 Collection changed while being enumerated — 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 repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
X3 Exception handling — 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 implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
X4 Structured logging — 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 implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
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.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 Secret Scanning: Secret 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").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
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.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
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.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
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.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
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").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
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.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
181 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was 1.fillPrimitiveType at 71. A further 14 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 CarbonFilters.translateExpression at 42 — they are counted neither in the figure above nor in this dimension's score. 3 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: core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java (CarbonProperties.validateAndLoadDefaultProperties at 28), sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/ORCCarbonWriter.java (ORCCarbonWriter.orcToCarbonSchemaConverter at 21), integration/spark/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala (CommonUtil.validateTypeConvertForSpark2 at 17). 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.
+ 174 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with 1.fillPrimitiveType (cyclomatic 71), MVMatchPattern.doMatch (cyclomatic 69), 1.fillVector (cyclomatic 68). — 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 Cyclomatic Complexity from 6.4 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.
+ 450 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 120 down to 120 or less in Cognitive Complexity — start with StreamRecordReader.readRowFromStream (cognitive 180), 1.fillVector (cognitive 150), 1.fillPrimitiveType (cognitive 150). — 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 5 together lifts Cognitive Complexity from 3.8 to about 4.5/10, projected with the scoring formula itself and assuming each lands exactly at 120; 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.2 / 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 51 TooManyMethods finding(s) in God Classes — start with ColumnarVectorWrapperDirect.java (2), SparkVersionAdapter.scala (2), CarbonUtil.java. — One of this dimension's main actionable groups (51 warning-level).
Resolve the 40 FileTooLong finding(s) in God Classes — start with CarbonUtil.java, CarbonProperties.java, MVMatcher.scala. — One of this dimension's main actionable groups (40 warning-level).
Resolve the 31 ClassTooLong finding(s) in God Classes — start with CarbonUtil.java, CarbonProperties.java, SegmentFileStore.java. — One of this dimension's main actionable groups (31 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.
491 duplicated block group(s) detected. 9.3 % of the production lines (22,632 of 242,203) are in a reported copy. A further 352 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 34 of the 843 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 218 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 34 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with CarbonDataProcessorUtil.java (3), CarbonExpressions.scala (2), AbstractNonDictionaryVectorFiller.java. — One of this dimension's main actionable groups (34 warning-level).
Resolve the 33 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with ExcludeFilterExecutorImpl.java (4), CarbonUtil.java (2), CarbonLocalWriter.java (2). — One of this dimension's main actionable groups (33 warning-level).
Resolve the 33 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with ByteUtil.java (2), ByteArrayBlockIndexerStorage.java, AdaptiveIntegralCodec.java. — One of this dimension's main actionable groups (33 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.9 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
23 production modules (Maven+Python+CMake), 0 dependency cycle(s), 1 unstable depended-on module(s). Read from the build's own module declarations; 3 module(s) off the main sequence, with abstractness counted on 18 of the 23 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: carbondata-flink-proxy · ×2
Unstable project carbondata-flink
Off the main sequence: carbondata-common
What to do
Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Unstable project carbondata-flink finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_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.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with CarbonAntlrSqlVisitor.java, AvroCarbonWriter.java. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality8.7 / 10Adequategated by 1 critical finding✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
6 skipped (6 with a documented reason), 82 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 950 tests. Measured on the .java suite only — at least 453 test source file(s) (.py, .scala) went unread, so its test quality is unmeasured and is not in these counts.
No assertions (empty test): testPartitionOutputsdk/sdk/src/test/java/org/apache/carbondata/sdk/file/CSVCarbonWriterTest.java:335
No assertions: testCleanLogs · ×81common/src/test/java/org/apache/carbondata/common/logging/impl/ExtendedRollingFileAppenderTest_UT.java:47
Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with CSVCarbonWriterTest.java. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 81 No assertions finding(s) in Test Quality — start with ExpressionResultTest.java (19), CarbonUtilTest.java (8), DFSFileReaderImplUnitTest.java (5). — One of this dimension's main actionable groups (81 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 secret(s) detected. 1 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.
REDACTED
What to do
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 69 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 25 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 115 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph. 1 of them resolve to no licence at all on Central, even through their parent POMs; that is missing data, not a violation, and none of them is charged. A further 7 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's JVM dependencies and nothing else. The repository also declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
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: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
2 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is core/src/main/java/org/apache/carbondata/core/index/IndexInputFormat.java. Counted over 393 of the 1405 production source files in this repository: 467 are under the ~2,400-byte size floor this dimension measures over, and the remaining 545 have no attributable history left to measure.
Off-boarding risk: anonymized user #1
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
246 deducted task-comment markers across 242203 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.
TodoComment repeated across 13 filesintegration/spark/src/test/scala/org/apache/spark/sql/carbondata/datasource/TestCreateTableUsingSparkCarbonFileFormat.scala:129
What to do
Resolve the 227 TodoComment finding(s) in Explicit Debt — start with test_carbon_end_to_end.py (6), TestNonTransactionalCarbonTable.scala (6), MVMatcher.scala (6). — One of this dimension's main actionable groups (227 warning-level).
Resolve the 1 TodoComment repeated across 13 files finding(s) in Explicit Debt — start with TestCreateTableUsingSparkCarbonFileFormat.scala. — 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 the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
0 of 1 documentation facets pass in full; short on: F2 example. 48 document(s) read across 1 unit(s).
Documentation: no build, run or usage exampleREADME.md:1
What to do
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_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.
3 naming inconsistencies among 121 declarations measured against a convention their peers follow.
`getTaskNumberBasedOnID` spells `ID` where 107 names in the project spell it `Id`integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:736
`getDataFrameWithTupleID` spells `ID` where 107 names in the project spell it `Id`integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:90
`cleanFilesForMv` spells `Mv` where 21 names in the project spell it `MV`integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/CleanFilesPostEventListener.scala:92
What to do
Resolve the 1 `getTaskNumberBasedOnID` spells `ID` where 107 names in the project… finding(s) in Naming Consistency — start with CarbonMergerRDD.scala. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `getDataFrameWithTupleID` spells `ID` where 107 names in the project… finding(s) in Naming Consistency — start with CommonLoadUtils.scala. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `cleanFilesForMv` spells `Mv` where 21 names in the project spell it… finding(s) in Naming Consistency — start with CleanFilesPostEventListener.scala. — 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.
3 of 19 build units (Maven, Python) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability8.9 / 10Strong✓ Tool-verified
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.
76 % of calls cross a namespace and 22 % go through an interface, but 100 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated. Measured over the .java source only — this repository's .scala was not sampled for call sites, so this score covers part of the tree, not all of it.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret 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.
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).
45 finding(s): 0 critical, 34 high, 11 medium, 0 low. 5 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 28 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5), REDACTED (4), REDACTED (2). — One of this dimension's main actionable groups (28 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).
No action in Static Analysis (SAST) — all 5 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (5 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 15 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (15). — One of this dimension's main actionable groups (15 issue-level).
Resolve the 8 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8). — One of this dimension's main actionable groups (8 warning-level).
Resolve the 7 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (7). — One of this dimension's main actionable groups (7 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
926 of 938 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java. Counted over 938 of the 1405 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Most significant orphaned file · ×3core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1
Concentrated knowledge decay
What to do
Resolve the 923 Orphaned file finding(s) in Knowledge Freshness — start with CarbonToSparkAdapter.scala (3), CarbonSessionStateBuilder.scala (3), package.scala (3). — One of this dimension's main actionable groups (923 recommendation-level).
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with CarbonUtil.java, REDACTED, CarbonProperties.java. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Concentrated knowledge decay finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_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.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 129 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
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 the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
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.
`Compressor` declares 23 abstract methods: `compressByte`, `compressByte`, `compressByte`, `compressDouble`, `compressFloat`, `compressInt`, `compressLong`, `compressShort`, `getName`, `maxCompressedLength`, `rawCompress`, `rawUncompress`, `rawUncompress`, `supportReusableBuffer`, `supportUnsafe`, `unCompressByte`, `unCompressByte`, `unCompressDouble`, `unCompressFloat`, `unCompressInt`, `unCompressLong`, `unCompressShort`, `unCompressedLength`. 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. Those 23 declarations carry 19 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 19 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. — core/src/main/java/org/apache/carbondata/core/datastore/compression/Compressor.java:23
`CarbonFile` declares 42 abstract methods: `createNewFile`, `createNewFile`, `createNewLockFile`, `delete`, `deleteFile`, `exists`, `getAbsolutePath`, `getCanonicalPath`, `getDataInputStream`, `getDataInputStream`, `getDataInputStream`, `getDataOutputStream`, `getDataOutputStream`, `getDataOutputStream`, `getDataOutputStream`, `getDataOutputStream`, `getDataOutputStreamUsingAppend`, `getDefaultReplication`, `getLastModifiedTime`, `getLength`, `getLocations`, `getName`, `getParentFile`, `getPath`, `getSize`, `isDirectory`, `isFileExist`, `isFileExist`, `isFileModified`, `listDirs`, `listFiles`, `listFiles`, `listFiles`, `listFiles`, `listFiles`, `locationAwareListFiles`, `mkdirs`, `renameForce`, `renameTo`, `setLastModifiedTime`, and 2 more. 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. Those 42 declarations carry 30 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 30 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. — core/src/main/java/org/apache/carbondata/core/datastore/filesystem/CarbonFile.java:28
`ColumnPageValueConverter` declares 16 abstract methods under just 4 distinct name(s): `decodeAndFillVector`, `decodeDouble`, `decodeDouble`, `decodeDouble`, `decodeDouble`, `decodeDouble`, `decodeDouble`, `decodeLong`, `decodeLong`, `decodeLong`, `encode`, `encode`, `encode`, `encode`, `encode`, `encode`. 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. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 4 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPageValueConverter.java:26
`CarbonColumnVector` declares 41 abstract methods: `getBlockDataType`, `getData`, `getDictionaryVector`, `getType`, `hasDictionary`, `isNull`, `putAllByteArray`, `putArray`, `putBoolean`, `putByte`, `putByteArray`, `putByteArray`, `putByteArray`, `putBytes`, `putDecimal`, `putDecimals`, `putDouble`, `putDoubles`, `putDoubles`, `putFloat`, `putFloats`, `putInt`, `putInts`, `putInts`, `putLong`, `putLongs`, `putLongs`, `putNotNull`, `putNotNull`, `putNull`, `putNulls`, `putObject`, `putShort`, `putShorts`, `putShorts`, `reset`, `setBlockDataType`, `setCarbonDataFileWrittenVersion`, `setDictionary`, `setFilteredRowsExist`, and 1 more. 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. Those 41 declarations carry 34 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 34 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. — core/src/main/java/org/apache/carbondata/core/scan/result/vector/CarbonColumnVector.java:27
`GenericDataType<T>` declares 17 abstract methods: `addChildren`, `deepCopy`, `getAllPrimitiveChildren`, `getColsCount`, `getColumnNames`, `getColumnarDataForComplexType`, `getComplexColumnInfo`, `getDataCounter`, `getDepth`, `getIsColumnDictionary`, `getMaxOutputArrayIndex`, `getName`, `getParentName`, `parseComplexValue`, `setOutputArrayIndex`, `setSurrogateIndex`, `writeByteArray`. 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. — processing/src/main/java/org/apache/carbondata/processing/datatypes/GenericDataType.java:35
`CarbonMetaStore` declares 20 abstract members: `lookupRelation`, `lookupRelation`, `lookupAnyRelation`, `createCarbonRelation`, `tableExists`, `tableExists`, `updateTableSchemaForAlter`, `updateTableSchema`, `revertTableSchemaInAlterFailure`, `saveToDisk`, `generateTableSchemaString`, `removeTableFromMetadata`, `updateMetadataByThriftTable`, `isTablePathExists`, `dropTable`, `isSchemaRefreshed`, `isReadFromHiveMetaStore`, `listAllTables`, `getThriftTableInfo`, `createCarbonDataSourceHadoopRelation`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. Those 20 declarations carry 18 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 18 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. — integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonMetaStore.scala:35
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in 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.
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.
What to do
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.
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.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability6.6 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 13/15 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `Agent_module`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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.
What to do
Your ecosystem's static analyzer is declared as a dependency but is not wired into CI — run it as a required step on push/PR (e.g. `composer phpstan` / `mix sobelow` / `bundle exec brakeman` / the spotbugs Gradle task / `sbt scalafixAll --check` / `golangci-lint run` / `rebar3 lint`) so a regression fails the build instead of relying on someone running it locally.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
0/1 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
What to do
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
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.
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 — 40 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 included — 72 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 — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
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 — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — 5 | -------------------- ERROR: failed to solve: process "/bin/bash -o pipefail -c wget https://dlcdn.apache.org/carbondata/2.3.0/apache-carbondata-2.3.0-bin-spark3.1.1-hadoop2.7.2.jar -P /usr/local/spark-3.1.1-bin-hadoop3.2/jars/" did not complete successfully: exit code: 4; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — Test reliability not included — no .scala test runner
D12 Dependency Hygiene — Dependency currency not established — packages.confluent.io did not answer
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.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Python surface was not measured.
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, .py, .scala, 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
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.
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.
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
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — applicable but not scored (1 of 2 signals for this style — below the bar we score at): 203 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 (this repository commits no MSBuild project, so its C# was read as syntax-only projects — a handler marked ONLY by an interface from a package is not visible without a build)
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
IC1 Incompleteness & stubs — 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
M4 Documentation accuracy — Not applicable: the 49 current-state document(s) make no claim of a kind M4 checks. 30 claim(s) of kinds M4 does not check were not checked (path 2, command argument 1, environment variable 27); M4 checks only links and versions and artefact counts.
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM, Python 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 — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
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.
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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 — X24 reached only 0% of this repository's production lines — java (163,201 lines), scala (75,276 lines), python (3,726 lines), cpp (1,179 lines), c (780 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — 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
X30 Support guard that admits what it rejects — 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X4 Structured logging — 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
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.
D10 · Test Quality· No assertions (empty test) · ×1
No assertions (empty test): testPartitionOutput sdk/sdk/src/test/java/org/apache/carbondata/sdk/file/CSVCarbonWriterTest.java:335— Test method has an empty body — it asserts nothing and exercises no code.
TodoComment streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:247— // TODO: handle the min max writing for string type based on character limit for streaming — 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 streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:311— // TODO better to check backup index at first — 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 sdk/sdk/src/test/java/org/apache/carbondata/store/LocalCarbonStoreTest.java:36— // TODO: complete this testcase — 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 sdk/sdk/src/test/java/org/apache/carbondata/sdk/file/CSVCarbonWriterTest.java:291— // TODO: implement reader to verify the number of blocklet in the file — 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 sdk/sdk/src/test/java/org/apache/carbondata/sdk/file/CSVCarbonWriterTest.java:329— // TODO: implement reader and verify the data is sorted — 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 sdk/sdk/src/test/java/org/apache/carbondata/sdk/file/CSVCarbonWriterTest.java:336— // TODO: test write data with partition — 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 sdk/sdk/src/test/java/org/apache/carbondata/sdk/file/CSVCarbonWriterTest.java:382— // TODO: write all data type and read by CarbonRecordReader to verify the content — 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 sdk/sdk/src/test/java/org/apache/carbondata/sdk/file/CSVCarbonWriterTest.java:590— //TODO: CarbonReader has a bug which does not allow reading complex. Once it is fixed below validation can be enabled — 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 sdk/sdk/src/test/java/org/apache/carbondata/sdk/file/CarbonReaderTest.java:1481— // TODO: support get schema of complex data type — 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 sdk/sdk/src/test/java/org/apache/carbondata/sdk/file/ImageTest.java:252— // TODO: should throw exception — 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 sdk/sdk/src/main/java/org/apache/carbondata/store/LocalCarbonStore.java:75— // TODO: use InputFormat to prune data and read data — 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 sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonSchemaReader.java:291— //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 sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonSchemaReader.java:351— //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 sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/PaginationCarbonReader.java:174— // TODO: read blocklets in multi-thread if there is a performance requirement. — 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 sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/cache/BlockletRows.java:54— // TODO: not applicable ? — 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 python/pycarbon/tests/sdk/test_read_write_carbon.py:159— # TODO: to be supported — 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 python/pycarbon/tests/core/test_carbon_end_to_end.py:169— # TODO: fix make_batch_carbon_reader error — 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 python/pycarbon/tests/core/test_carbon_end_to_end.py:194— # TODO: fix make_batch_carbon_reader error — 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 python/pycarbon/tests/core/test_carbon_end_to_end.py:217— # TODO: fix test_partition_multi_node — 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 python/pycarbon/tests/core/test_carbon_end_to_end.py:241— # TODO: fix test_partition_value_error — 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 python/pycarbon/tests/core/test_carbon_end_to_end.py:275— # TODO(yevgeni): factor out. Reading all ids appears multiple times in this test. — 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 python/pycarbon/tests/core/test_carbon_end_to_end.py:350— # TODO: fix test_make_carbon_reader_fails_loading_non_unischema_dataset — 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 python/pycarbon/tests/core/test_carbon_tf_dataset.py:85— # TODO(yevgeni): check that the shapes are actually correct, not just not None — 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 python/pycarbon/tests/core/test_carbon_tf_dataset.py:178— # TODO(yevgeni): check that the shapes are actually correct, not just not None — 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 python/pycarbon/integration/tensorflow.py:222— # TODO: implement a mechanism for signaling that we have no more data — 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.
No assertions: testCleanLogs common/src/test/java/org/apache/carbondata/common/logging/impl/ExtendedRollingFileAppenderTest_UT.java:47— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testMkStringNullDelimiter common/src/test/java/org/apache/carbondata/common/StringsSuite.java:31— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testMkStringNullString common/src/test/java/org/apache/carbondata/common/StringsSuite.java:26— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDoubleForIoException core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/DFSFileReaderImplUnitTest.java:134— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDoubleForIoExceptionwithUpdateCache core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/DFSFileReaderImplUnitTest.java:139— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testReadIntForIoException core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/DFSFileReaderImplUnitTest.java:106— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testReadIntWithFileNameForIOException core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/DFSFileReaderImplUnitTest.java:123— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testReadLongForIoException core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/DFSFileReaderImplUnitTest.java:101— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testFileExistsForDefaultType core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/FileFactoryImplUnitTest.java:76— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testFileExistsForVIEWFSType core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/FileFactoryImplUnitTest.java:72— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDoubleForIoException core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/FileReaderImplUnitTest.java:134— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testReadIntForIoException core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/FileReaderImplUnitTest.java:107— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testReadIntWithFileNameForIOException core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/FileReaderImplUnitTest.java:123— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testReadLongForIoException core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/FileReaderImplUnitTest.java:103— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testListFilesForException core/src/test/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFileTest.java:176— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testRenameForceForException core/src/test/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFileTest.java:86— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testListFilesForException core/src/test/java/org/apache/carbondata/core/datastore/filesystem/HDFSCarbonFileTest.java:205— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testFilesForConnicalPathException core/src/test/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFileTest.java:354— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testtruncateForException core/src/test/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFileTest.java:222— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testListFilesForException core/src/test/java/org/apache/carbondata/core/datastore/filesystem/ViewFsCarbonFileTest.java:184— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testGetDirectDictionaryGenerator core/src/test/java/org/apache/carbondata/core/keygenerator/directdictionary/DirectDictionaryKeyGeneratorFactoryUnitTest.java:29— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: equalsTestWithDifferentLength core/src/test/java/org/apache/carbondata/core/localdictionary/DictionaryByteArrayWrapperTest.java:62— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNullDbName core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableBuilderSuite.java:39— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNullSchema core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableBuilderSuite.java:49— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNullTableName core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableBuilderSuite.java:28— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
TooManyMethods: CarbonUtil core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:138— TooManyMethods — 137 methods. The bar is 30 methods; this is 107 over it, 4.57× 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: CarbonProperties core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:79— TooManyMethods — 119 methods. The bar is 30 methods; this is 89 over it, 3.97× 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: CarbonLoadModel processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModel.java:35— TooManyMethods — 110 methods. The bar is 30 methods; this is 80 over it, 3.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: CarbonTable core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:79— TooManyMethods — 96 methods. The bar is 30 methods; this is 66 over it, 3.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: SortParameters processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:40— TooManyMethods — 88 methods. The bar is 30 methods; this is 58 over it, 2.93× 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: ColumnPage core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:48— TooManyMethods — 87 methods. The bar is 30 methods; this is 57 over it, 2.90× 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: BlockExecutionInfo core/src/main/java/org/apache/carbondata/core/scan/executor/infos/BlockExecutionInfo.java:36— TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× 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: CarbonInputSplit core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:61— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× 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: CarbonColumnVectorImpl core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/CarbonColumnVectorImpl.java:34— TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. Most of these members implement vector.CarbonColumnVector (35 of 51 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: CarbonDataLoadConfiguration processing/src/main/java/org/apache/carbondata/processing/loading/CarbonDataLoadConfiguration.java:36— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: CarbonFactDataHandlerModel processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java:57— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: BlockIndex core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:80— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× 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: CarbonInputFormat hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java:99— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× 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: SegmentFileStore core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:83— 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: BlockletScannedResult core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:55— 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: ColumnVectorProxy integration/spark/src/main/java/org/apache/spark/sql/CarbonVectorProxy.java:142— 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: CarbonWriterBuilder sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:70— 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: AbstractDFSCarbonFile core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:59— 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: FileFactory core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java:55— 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: CarbonTablePath core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java:38— 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: UnsafeFixLengthColumnPage core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:36— 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: LocalDictColumnPage core/src/main/java/org/apache/carbondata/core/datastore/page/LocalDictColumnPage.java:42— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.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: ByteUtil core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:30— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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: LVByteBufferColumnPage core/src/main/java/org/apache/carbondata/core/datastore/page/LVByteBufferColumnPage.java:41— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: FilterUtil core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:97— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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.
FileTooLong: util/CarbonUtil.java core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java— FileTooLong — 2091 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: CarbonUtil (138-3579). The bar is 500 significant lines; this is 1591 over it, 4.18× 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: util/CarbonProperties.java core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java— FileTooLong — 1451 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: CarbonProperties (79-2235). The bar is 500 significant lines; this is 951 over it, 2.90× 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: optimizer/MVMatcher.scala integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala— FileTooLong — 1150 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 650 over it, 2.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: management/CommonLoadUtils.scala integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala— FileTooLong — 970 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 470 over it, 1.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: metadata/SegmentFileStore.java core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java— FileTooLong — 947 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: SegmentFileStore (83-1645). The bar is 500 significant lines; this is 447 over it, 1.89× 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: statusmanager/SegmentStatusManager.java core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java— FileTooLong — 875 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: SegmentStatusManager (70-1400). The bar is 500 significant lines; this is 375 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: REDACTED REDACTED— FileTooLong — 837 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: CarbonCommonConstants (25-2900). The bar is 500 significant lines; this is 337 over it, 1.67× 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: filter/FilterUtil.java core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java— FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: FilterUtil (97-1390). The bar is 500 significant lines; this is 326 over it, 1.65× 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: catalyst/CarbonParserUtil.scala integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala— FileTooLong — 812 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 312 over it, 1.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: optimizer/MVRewrite.scala integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala— FileTooLong — 811 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: MVRewrite (54-1143). The bar is 500 significant lines; this is 311 over it, 1.62× 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: util/DataTypeUtil.java core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java— FileTooLong — 782 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: DataTypeUtil (55-1205). The bar is 500 significant lines; this is 282 over it, 1.56× 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: util/AlterTableUtil.scala integration/spark/src/main/scala/org/apache/spark/util/AlterTableUtil.scala— FileTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 253 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: util/CarbonLoaderUtil.java processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java— FileTooLong — 735 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: CarbonLoaderUtil (65-1259). The bar is 500 significant lines; this is 235 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: util/CommonUtil.scala integration/spark/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala— FileTooLong — 728 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 228 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: rdd/CarbonDataRDDFactory.scala integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala— FileTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 227 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: table/CarbonTable.java core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java— FileTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: CarbonTable (79-1295). The bar is 500 significant lines; this is 201 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: command/carbonTableSchemaCommon.scala integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala— FileTooLong — 673 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 173 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: file/AvroCarbonWriter.java sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java— FileTooLong — 668 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 168 over it, 1.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: blockletindex/BlockIndex.java core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java— FileTooLong — 654 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: BlockIndex (80-1046). The bar is 500 significant lines; this is 154 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: file/CarbonWriterBuilder.java sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java— FileTooLong — 633 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: CarbonWriterBuilder (70-1209). The bar is 500 significant lines; this is 133 over it, 1.27× 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: merger/CarbonDataMergerUtil.java processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java— FileTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: CarbonDataMergerUtil (71-1138). The bar is 500 significant lines; this is 124 over it, 1.25× 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: parser/CarbonSpark2SqlParser.scala integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala— FileTooLong — 621 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: CarbonSpark2SqlParser (57-962). The bar is 500 significant lines; this is 121 over it, 1.24× 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: rdd/CarbonScanRDD.scala integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala— FileTooLong — 620 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: CarbonScanRDD (78-908). The bar is 500 significant lines; this is 120 over it, 1.24× 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: optimizer/CarbonSecondaryIndexOptimizer.scala integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala— FileTooLong — 616 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: CarbonSecondaryIndexOptimizer (60-972). The bar is 500 significant lines; this is 116 over it, 1.23× 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: merge/CarbonMergeDataSetCommand.scala integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetCommand.scala— FileTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 105 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Duplicated block (7 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:87— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:87-95 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:135-141 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:87` 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 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorage.java:95— core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorage.java:95-101 | core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorage.java:105-111 — 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) core/src/main/java/org/apache/carbondata/core/index/dev/expr/OrIndexExprWrapper.java:54— core/src/main/java/org/apache/carbondata/core/index/dev/expr/OrIndexExprWrapper.java:54-60 | core/src/main/java/org/apache/carbondata/core/index/dev/expr/OrIndexExprWrapper.java:66-72 — 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 (7 lines × 2) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:149— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:149-155 | core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:157-163 — 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 `core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:149` 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 (7 lines × 2) core/src/main/java/org/apache/carbondata/core/metadata/schema/BucketingInfo.java:71— core/src/main/java/org/apache/carbondata/core/metadata/schema/BucketingInfo.java:71-77 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchema.java:256-262 — 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 (7 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:150— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:150-156 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:151-157 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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. 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 lines × 2) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:636— processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:636-642 | tools/cli/src/main/java/org/apache/carbondata/tool/FileCollector.java:194-200 — 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 `processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:636` 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) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:406— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:406-412 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:425-431 — 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 `processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:406` 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) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:451— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:451-457 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:478-484 — 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 `processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:451` 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) streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:486— streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:486-492 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:507-513 — 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 `streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:486` 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 (7 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:344— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:344-350 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:385-391 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 134 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:344` 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, `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:343` calls `getSizeInBytes` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:384` 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 (7 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:239— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:239-245 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:322-328 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:239` 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, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:238` calls `flip` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:321` 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 (7 lines × 2) core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java:71— core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java:71-77 | core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverterV3.java:89-95 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:290— processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:290-296 | processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:355-361 — 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) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:644— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:644-650 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:672-678 — 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 `processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:644` 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) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:271— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:271-277 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:273-279 — 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) core/src/main/java/org/apache/carbondata/core/scan/complextypes/ArrayQueryType.java:41— core/src/main/java/org/apache/carbondata/core/scan/complextypes/ArrayQueryType.java:41-47 | processing/src/main/java/org/apache/carbondata/processing/datatypes/ArrayDataType.java:117-123 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `children` to `GenericQueryType` in one and `GenericDataType` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/complextypes/StructQueryType.java:80— core/src/main/java/org/apache/carbondata/core/scan/complextypes/StructQueryType.java:80-86 | processing/src/main/java/org/apache/carbondata/processing/datatypes/StructDataType.java:235-241 — 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) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:216— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:216-222 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:221-227 — before extracting anything, compare `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java` and `integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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 (7 lines × 2) core/src/main/java/org/apache/carbondata/core/metadata/datatype/ArrayType.java:64— core/src/main/java/org/apache/carbondata/core/metadata/datatype/ArrayType.java:64-70 | core/src/main/java/org/apache/carbondata/core/metadata/datatype/StructType.java:58-64 — 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) core/src/main/java/org/apache/carbondata/core/scan/expression/logical/BinaryLogicalExpression.java:43— core/src/main/java/org/apache/carbondata/core/scan/expression/logical/BinaryLogicalExpression.java:43-49 | core/src/main/java/org/apache/carbondata/core/scan/expression/logical/RangeExpression.java:73-79 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:179— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:179-186 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java:175-181 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:179` 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 first that the copies are not typed on the same thing: the declarations holding them bind `sortDataRows` to `SortDataRows` in one and `UnsafeSortDataRows` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:129— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:129-135 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkReaderV3.java:117-123 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:129` 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, `core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:128` calls `fill` and `core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkReaderV3.java:116` 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 (7 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:203— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:203-209 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:224-230 — 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. 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 (7 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:82— core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:82-88 | core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:93-99 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:82` 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 (10 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java:235— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java:235-244 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2311-2320 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java:235` 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 (10 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/EncodingFactory.java:180— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/EncodingFactory.java:180-189 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/EncodingFactory.java:199-208 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/EncodingFactory.java:180` 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 (10 lines × 2) core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:495— core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:495-504 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2040-2049 — 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 (10 lines × 2) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/IndexSchema.java:135— core/src/main/java/org/apache/carbondata/core/metadata/schema/table/IndexSchema.java:135-144 | core/src/main/java/org/apache/carbondata/core/view/MVSchema.java:155-164 — 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 `core/src/main/java/org/apache/carbondata/core/metadata/schema/table/IndexSchema.java:135` 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 lines × 2) core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java:81— core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java:81-90 | core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java:122-131 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `deltaFiles` to `String[]` in one and `List<String>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:73— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:73-82 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedDictionaryResultCollector.java:118-127 — 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 `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:73` 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) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:258— core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:258-267 | core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:411-420 — 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 `core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:258` 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:409` calls `getTime` and `core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:258` 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 (10 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:239— core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:239-248 | core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:431-440 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:239` 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:248— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:248-257 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:331-340 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:248` 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 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:349— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:349-358 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:425-434 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:349` 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, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:348` calls `flip` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:424` 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 (10 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:389— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:389-398 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:464-473 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:389` 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 lines × 2) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:971— core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:971-980 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.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 `core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:971` 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) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2618— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2618-2627 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2629-2638 — 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 `core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2618` 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 lines × 2) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:3164— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:3164-3173 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:3197-3206 — 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 × 2) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:356— hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:356-365 | hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:540-549 — 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 `hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:356` 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) hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java:109— hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java:109-118 | integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/VectorizedCarbonRecordReader.java:132-141 — 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 `hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java:109` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/VectorizedCarbonRecordReader.java:131` calls `getAllSplits` and `hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java:108` 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 (10 lines × 2) index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndex.java:365— index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndex.java:365-374 | index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndex.java:403-412 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndex.java:401` calls `get`, `numericValue`, `shortValue` and `index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndex.java:362` 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 (10 lines × 2) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:58— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:58-67 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:61-70 — before extracting anything, compare `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java` and `integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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 `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:58` 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) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:110— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:110-119 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:117-126 — before extracting anything, compare `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java` and `integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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. 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:139— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:139-148 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java:135-144 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 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 (10 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:590— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:590-599 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:668-677 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:590` 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) core/src/main/java/org/apache/carbondata/core/scan/expression/logical/AndExpression.java:39— core/src/main/java/org/apache/carbondata/core/scan/expression/logical/AndExpression.java:39-48 | core/src/main/java/org/apache/carbondata/core/scan/expression/logical/RangeExpression.java:46-55 — 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. 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) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/AbstractDimensionChunkReader.java:118— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/AbstractDimensionChunkReader.java:118-127 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/AbstractMeasureChunkReader.java:100-109 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/AbstractDimensionChunkReader.java:118` 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 (10 lines × 2) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:223— core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:223-232 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1136-1145 — 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 `core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:223` 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) processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java:368— processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java:368-377 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/InMemorySortTempChunkHolder.java:145-154 — 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 (8 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/columnar/ByteArrayBlockIndexerStorage.java:58— core/src/main/java/org/apache/carbondata/core/datastore/columnar/ByteArrayBlockIndexerStorage.java:58-65 | core/src/main/java/org/apache/carbondata/core/datastore/columnar/ObjectArrayBlockIndexerStorage.java:58-65 — 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. 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `dataPage` to `byte[][]` in one and `Object[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:443— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:443-450 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:536-543 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 134 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:443` 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 (8 lines × 2) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:408— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:408-415 | core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndex.java:173-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 both call sites, so a change lands once.
Duplicated block (8 lines × 2) core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java:160— core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java:160-167 | core/src/main/java/org/apache/carbondata/core/memory/UnsafeSortMemoryManager.java:148-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 `core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java:160` 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) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:198— core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:198-205 | core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:762-769 — 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) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/IndexSchema.java:161— core/src/main/java/org/apache/carbondata/core/metadata/schema/table/IndexSchema.java:161-168 | core/src/main/java/org/apache/carbondata/core/view/MVSchema.java:174-181 — 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 `core/src/main/java/org/apache/carbondata/core/metadata/schema/table/IndexSchema.java:161` 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 (8 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:311— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:311-318 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:396-403 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:311` 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) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:284— core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:284-291 | core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:313-320 — 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 `core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:284` 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 (8 lines × 2) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:471— core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:471-478 | core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:562-569 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `val` to `int` in one and `long` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1883— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1883-1890 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1928-1935 — 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 `core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1883` 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) core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java:58— core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java:58-65 | core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java:114-121 — 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 `core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java:58` 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) hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonRecordReader.java:94— hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonRecordReader.java:94-101 | hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java:99-106 — 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 `hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonRecordReader.java:94` 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 (8 lines × 2) integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:339— integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:339-346 | integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:354-361 — 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 `integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:354` 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 (8 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:94— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:94-101 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java:88-95 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:94` 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, `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java:87` calls `getInstance`, `getSortMemoryChunkSizeInMB` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:93` 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 (8 lines × 2) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:540— processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:540-547 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:653-660 — 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 `processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:540` 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) processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:577— processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:577-584 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:727-734 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:725` calls `setNoDictSchemaDataType`, `getNoDictDataTypes` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:576` 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 (8 lines × 2) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:358— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:358-365 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:371-378 — 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 `sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:358` 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 (8 lines × 2) geo/src/main/java/org/apache/carbondata/geo/GeoHashUtils.java:153— geo/src/main/java/org/apache/carbondata/geo/GeoHashUtils.java:153-160 | geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:388-395 — 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 `geo/src/main/java/org/apache/carbondata/geo/GeoHashUtils.java:153` 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/ORCCarbonWriter.java:290— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/ORCCarbonWriter.java:290-297 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/ORCCarbonWriter.java:300-307 — 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:224— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:224-231 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:415-422 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:101— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:101-108 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeVarLengthColumnPage.java:71-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 both call sites, so a change lands once.
Duplicated block (8 lines × 2) core/src/main/java/org/apache/carbondata/core/index/dev/expr/AndIndexExprWrapper.java:85— core/src/main/java/org/apache/carbondata/core/index/dev/expr/AndIndexExprWrapper.java:85-92 | core/src/main/java/org/apache/carbondata/core/index/dev/expr/OrIndexExprWrapper.java:100-107 — 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 (8 lines × 2) geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:862— geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:862-871 | geo/src/main/java/org/apache/carbondata/geo/scan/expression/PolygonRangeListExpression.java:95-102 — 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 (8 lines × 2) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:138— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:138-145 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:145-152 — before extracting anything, compare `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java` and `integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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 (8 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:272— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:272-279 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java:269-276 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 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.
ClassTooLong: CarbonUtil core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:138— ClassTooLong — 1975 significant lines (blank, comment-only and punctuation-only lines excluded), 137 methods. The bar is 400 significant lines; this is 1575 over it, 4.94× 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: CarbonProperties core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:79— ClassTooLong — 1395 significant lines (blank, comment-only and punctuation-only lines excluded), 119 methods. The bar is 400 significant lines; this is 995 over it, 3.49× 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: SegmentFileStore core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:83— ClassTooLong — 889 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 489 over it, 2.22× 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: CarbonCommonConstants REDACTED:25— ClassTooLong — 833 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 433 over it, 2.08× 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: SegmentStatusManager core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:70— ClassTooLong — 831 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 431 over it, 2.08× 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: MVRewrite integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:54— ClassTooLong — 784 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 384 over it, 1.96× 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: FilterUtil core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:97— ClassTooLong — 751 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 351 over it, 1.88× 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: DataTypeUtil core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:55— ClassTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 349 over it, 1.87× 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: CarbonLoaderUtil processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:65— ClassTooLong — 693 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 293 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.
ClassTooLong: CarbonTable core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:79— ClassTooLong — 648 significant lines (blank, comment-only and punctuation-only lines excluded), 96 methods. The bar is 400 significant lines; this is 248 over it, 1.62× 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: BlockIndex core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:80— ClassTooLong — 600 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 200 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.
ClassTooLong: CarbonSpark2SqlParser integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala:57— ClassTooLong — 591 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 191 over it, 1.48× 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: CarbonWriterBuilder sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:70— ClassTooLong — 588 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 400 significant lines; this is 188 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.
ClassTooLong: CarbonSecondaryIndexOptimizer integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:60— ClassTooLong — 580 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 180 over it, 1.45× 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: CarbonDataMergerUtil processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:71— ClassTooLong — 578 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 178 over it, 1.45× 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: CarbonScanRDD integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:78— ClassTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 170 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: ColumnPage core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:48— ClassTooLong — 553 significant lines (blank, comment-only and punctuation-only lines excluded), 87 methods. The bar is 400 significant lines; this is 153 over it, 1.38× 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: CarbonMergerRDD integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:72— ClassTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 127 over it, 1.32× 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: CarbonInputFormat hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java:99— ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 104 over it, 1.26× 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: SortParameters processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:40— ClassTooLong — 496 significant lines (blank, comment-only and punctuation-only lines excluded), 88 methods. The bar is 400 significant lines; this is 96 over it, 1.24× 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: CarbonInputSplit core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:61— ClassTooLong — 489 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 89 over it, 1.22× 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: BlockletIndexFactory core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndexFactory.java:81— ClassTooLong — 474 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 74 over it, 1.19× 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: CarbonDataProcessorUtil processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:62— ClassTooLong — 463 significant lines (blank, comment-only and punctuation-only lines excluded), 35 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: SortStepRowHandler processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:49— ClassTooLong — 463 significant lines (blank, comment-only and punctuation-only lines excluded), 20 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: ThriftWrapperSchemaConverterImpl core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:46— ClassTooLong — 434 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 34 over it, 1.09× 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.
Duplicated block (5 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentProperties.java:373— core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentProperties.java:373-377 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:400-404 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentProperties.java:373` 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) core/src/main/java/org/apache/carbondata/core/datastore/page/LVByteBufferColumnPage.java:58— core/src/main/java/org/apache/carbondata/core/datastore/page/LVByteBufferColumnPage.java:58-62 | core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:55-59 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/datastore/page/LVByteBufferColumnPage.java:63` calls `allocateDirect` and `core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:60` 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 × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:380— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:380-384 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:342-346 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:380` 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 (5 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:459— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:459-463 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:405-409 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:459` 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 (5 lines × 2) core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:621— core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:621-625 | core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:645-649 — 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 `core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:621` 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) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:96— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:96-100 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:110-114 — 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 (5 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java:200— core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java:200-204 | core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java:228-232 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java:200` 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:303— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:303-307 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:360-364 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:303` 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 (5 lines × 2) core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:297— core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:297-301 | core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:316-321 — 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 `core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:297` 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 (5 lines × 2) geo/src/main/java/org/apache/carbondata/geo/GeoHashUtils.java:434— geo/src/main/java/org/apache/carbondata/geo/GeoHashUtils.java:434-438 | geo/src/main/java/org/apache/carbondata/geo/scan/filter/executor/PolygonFilterExecutorImpl.java:50-54 — 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 `geo/src/main/java/org/apache/carbondata/geo/GeoHashUtils.java:434` 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:771— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:771-775 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:786-790 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:771` 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) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:355— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:355-359 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:704-708 — 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 (5 lines × 2) streaming/src/main/java/org/apache/carbondata/streaming/StreamBlockletWriter.java:152— streaming/src/main/java/org/apache/carbondata/streaming/StreamBlockletWriter.java:152-156 | streaming/src/main/java/org/apache/carbondata/streaming/StreamBlockletWriter.java:165-169 — 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 `streaming/src/main/java/org/apache/carbondata/streaming/StreamBlockletWriter.java:152` 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 first that the copies are not typed on the same thing: the declarations holding them bind `val` to `int` in one and `long` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:160— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:160-164 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeVarLengthColumnPage.java:64-68 — 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 (5 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:162— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:162-166 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:162-166 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 (5 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:727— core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:727-731 | core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:769-773 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:727` 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 (5 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:135— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:135-139 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:140-144 — 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 (5 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:366— core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:366-370 | core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:450-454 — 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 `core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:366` 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 (5 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:63— core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:63-67 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpression.java:84-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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:63` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:69` calls `ExpressionResult`, `getDataType`, `getLong` and `core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpression.java:90` 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 × 2) geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:208— geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:208-212 | geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:226-230 — 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 `geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:208` 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 (5 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:805— integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:805-809 | integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:841-845 — 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 (5 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:349— integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:349-353 | integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:477-482 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:349` 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) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuilder.scala:184— mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuilder.scala:184-188 | mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuilder.scala:217-221 — 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 `mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuilder.scala:184` 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) integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:112— integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:112-116 | integration/spark/src/main/spark3.1/org/apache/spark/sql/CarbonToSparkAdapter.scala:112-116 — before extracting anything, compare `integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala` and `integration/spark/src/main/spark3.1/org/apache/spark/sql/CarbonToSparkAdapter.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 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 `integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:112` 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 (5 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/view/MVRefresher.scala:291— integration/spark/src/main/scala/org/apache/carbondata/view/MVRefresher.scala:291-295 | integration/spark/src/main/scala/org/apache/carbondata/view/MVRefresher.scala:343-347 — 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 `integration/spark/src/main/scala/org/apache/carbondata/view/MVRefresher.scala:291` 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) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:90— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:90-98 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:155-163 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:90` 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 (9 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java:246— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java:246-254 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2322-2330 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java:246` 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 (9 lines × 2) core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java:172— core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java:172-180 | core/src/main/java/org/apache/carbondata/core/memory/UnsafeSortMemoryManager.java:160-168 — 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 `core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java:172` 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) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:51— core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:51-59 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpression.java:72-80 — 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 `core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:51` 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) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:74— core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:74-82 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpression.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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:74` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpression.java:94` calls `ExpressionResult`, `getDataType`, `getLong` and `core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:73` 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:69— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:69-77 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:69-77 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:69` 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) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2203— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2203-2211 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2261-2269 — 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 `core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.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. 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 × 2) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:206— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:206-214 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:211-219 — before extracting anything, compare `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java` and `integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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. 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) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:101— integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:101-109 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:168-177 — 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 `integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.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 (9 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:299— processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:299-307 | processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:339-347 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:348` calls `size`, `contains`, `getColumnSchema` and `processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:308` 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 × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:89— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:89-97 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:86-94 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:89` 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:152— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:152-160 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java:167-175 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:152` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:151` calls `info` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java:166` 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 (9 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:84— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:84-92 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java:80-88 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 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 (9 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:103— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:103-111 | REDACTED:68-76 — 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. 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:191— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:191-199 | REDACTED:110-118 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:106` calls `checkForFailure` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:187` 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 × 2) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/DirectDictionaryFieldConverterImpl.java:87— processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/DirectDictionaryFieldConverterImpl.java:87-95 | processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/NonDictionaryFieldConverterImpl.java:103-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 `processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/DirectDictionaryFieldConverterImpl.java:87` 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 (9 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:111— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:111-119 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeVarLengthColumnPage.java:48-56 — 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) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1204— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1204-1212 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:351-359 — 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 `core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1204` 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 (9 lines × 2) processing/src/main/java/org/apache/carbondata/processing/datatypes/ArrayDataType.java:297— processing/src/main/java/org/apache/carbondata/processing/datatypes/ArrayDataType.java:297-305 | processing/src/main/java/org/apache/carbondata/processing/datatypes/StructDataType.java:324-332 — 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 (9 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:136— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:136-144 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java:151-160 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 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.
Duplicated block (9 lines × 2) core/src/main/java/org/apache/carbondata/core/reader/CarbonFooterReader.java:47— core/src/main/java/org/apache/carbondata/core/reader/CarbonFooterReader.java:47-55 | core/src/main/java/org/apache/carbondata/core/reader/CarbonFooterReaderV3.java:47-56 — 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 (9 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:256— integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:256-265 | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/rdd/CarbonSIRebuildRDD.scala:262-270 — 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 `integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:256` 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 (9 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/CarbonFileIndex.scala:99— integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/CarbonFileIndex.scala:99-107 | integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/SparkCarbonFileFormat.scala:364-372 — 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) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:264— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:264-272 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:705-713 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:264` 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 (9 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:662— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:662-670 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:679-687 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:662` 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) core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/VariableLengthDimensionColumnPage.java:116— core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/VariableLengthDimensionColumnPage.java:116-121 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/VariableLengthDimensionColumnPage.java:140-145 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/VariableLengthDimensionColumnPage.java:116` 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:291— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:291-296 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:279-284 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:291` 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 (6 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:366— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:366-371 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:443-448 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:366` 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 (6 lines × 2) core/src/main/java/org/apache/carbondata/core/indexstore/row/UnsafeIndexRow.java:55— core/src/main/java/org/apache/carbondata/core/indexstore/row/UnsafeIndexRow.java:55-60 | core/src/main/java/org/apache/carbondata/core/indexstore/row/UnsafeIndexRow.java:79-84 — 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 `core/src/main/java/org/apache/carbondata/core/indexstore/row/UnsafeIndexRow.java:55` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/indexstore/row/UnsafeIndexRow.java:61` calls `getBytePosition` and `core/src/main/java/org/apache/carbondata/core/indexstore/row/UnsafeIndexRow.java:85` 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 (6 lines × 2) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:279— core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:279-284 | core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:329-334 — 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 `core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:279` 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) core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:300— core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:300-305 | core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:349-354 — 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 `core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:300` 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) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java:206— core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java:206-213 | core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java:234-239 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java:206` 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 (6 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:175— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:175-180 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:259-264 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:175` 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 (6 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:327— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:327-332 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:408-413 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:327` 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 (6 lines × 2) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:615— core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:615-620 | core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:663-668 — 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 `core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:615` 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 (6 lines × 2) core/src/main/java/org/apache/carbondata/hadoop/internal/ObjectArrayWritable.java:46— core/src/main/java/org/apache/carbondata/hadoop/internal/ObjectArrayWritable.java:46-51 | processing/src/main/java/org/apache/carbondata/processing/loading/csvinput/StringArrayWritable.java:50-55 — 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 `core/src/main/java/org/apache/carbondata/hadoop/internal/ObjectArrayWritable.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 (6 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/FieldEncoderFactory.java:159— processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/FieldEncoderFactory.java:159-164 | processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/FieldEncoderFactory.java:171-176 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/FieldEncoderFactory.java:159` 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 `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 (6 lines × 2) processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java:292— processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java:292-297 | processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java:310-315 — 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 `processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java:292` 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:236— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:236-241 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:430-435 — 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 `sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:236` 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) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:188— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:188-193 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeVarLengthColumnPage.java:93-98 — 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. 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 (6 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/MeasureFieldConverterImpl.java:71— processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/MeasureFieldConverterImpl.java:71-76 | processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/MeasureFieldConverterImpl.java:83-88 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/MeasureFieldConverterImpl.java:77` calls `getColumn`, `isDimension` and `processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/MeasureFieldConverterImpl.java:89` 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 (6 lines × 2) core/src/main/java/org/apache/carbondata/core/index/dev/expr/AndIndexExprWrapper.java:96— core/src/main/java/org/apache/carbondata/core/index/dev/expr/AndIndexExprWrapper.java:96-101 | core/src/main/java/org/apache/carbondata/core/index/dev/expr/OrIndexExprWrapper.java:87-92 — 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 (6 lines × 2) core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java:49— core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java:49-54 | core/src/main/java/org/apache/carbondata/core/locks/S3FileLock.java:58-63 — 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) core/src/main/java/org/apache/carbondata/core/metadata/ColumnIdentifier.java:82— core/src/main/java/org/apache/carbondata/core/metadata/ColumnIdentifier.java:82-87 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/CarbonDimension.java:103-108 — 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 (6 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepImpl.java:84— processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepImpl.java:84-89 | processing/src/main/java/org/apache/carbondata/processing/loading/steps/JsonInputProcessorStepImpl.java:70-75 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepImpl.java:84` 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) integration/hive/src/main/scala/org/apache/carbondata/hive/CarbonHiveMetastoreListener.scala:35— integration/hive/src/main/scala/org/apache/carbondata/hive/CarbonHiveMetastoreListener.scala:35-40 | integration/hive/src/main/scala/org/apache/carbondata/hive/CarbonHiveMetastoreListener.scala:66-71 — 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 `integration/hive/src/main/scala/org/apache/carbondata/hive/CarbonHiveMetastoreListener.scala:35` 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) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:404— integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:404-409 | integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:492-497 — 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 `integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:404` 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) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:328— integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:328-333 | integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:461-466 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:328` 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 (6 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetCommand.scala:571— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetCommand.scala:571-576 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/MergeHandler.scala:75-80 — 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) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/AggregatePushDown.scala:125— mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/AggregatePushDown.scala:125-130 | mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/AggregatePushDown.scala:138-143 — 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 `mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/AggregatePushDown.scala:125` 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 (12 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkPageReaderV3.java:78— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkPageReaderV3.java:78-89 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:96-107 — 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 (12 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:109— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:109-120 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:158-169 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:109` 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) core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:186— core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:186-197 | core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:212-223 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:186` 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:321— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:321-332 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:308-319 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:321` 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 (12 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/KeyPageStatsCollector.java:82— core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/KeyPageStatsCollector.java:82-93 | core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/StringStatsCollector.java:98-109 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/KeyPageStatsCollector.java:82` 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) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:548— core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:548-559 | core/src/main/java/org/apache/carbondata/core/view/MVProvider.java:312-323 — 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 `core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:548` 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, `core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:560` calls `flush` and `core/src/main/java/org/apache/carbondata/core/view/MVProvider.java:324` 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 (12 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:177— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:177-188 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:344-355 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 257 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:177` 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 (12 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:415— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:415-426 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:391-402 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 248 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:415` 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 (12 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:579— core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:579-590 | core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:644-655 — 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 `core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:579` 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 (12 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/ArrayParserImpl.java:62— processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/ArrayParserImpl.java:62-73 | processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/MapParserImpl.java:65-76 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/ArrayParserImpl.java:62` 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 (12 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:89— processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:89-100 | processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:136-147 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:89` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `column` to `CarbonColumn` in one and `CarbonDimension` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:173— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:173-184 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:173-184 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:173` 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 first that the copies are not typed on the same thing: the declarations holding them bind `sortDataRows` to `SortDataRows[]` in one and `UnsafeSortDataRows[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:208— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:208-219 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:479-490 — 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 `sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:208` 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 (12 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentProperties.java:398— core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentProperties.java:398-409 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:428-439 — 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. 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:290— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:290-301 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:347-358 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:290` 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) core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java:83— core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java:83-94 | core/src/main/java/org/apache/carbondata/core/locks/S3FileLock.java:69-80 — 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 (12 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:302— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:302-313 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:326-337 — 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 `integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:302` 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) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CompactionTaskCompletionListener.scala:47— integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CompactionTaskCompletionListener.scala:47-58 | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/rdd/CarbonSIRebuildRDD.scala:273-284 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CompactionTaskCompletionListener.scala:60` calls `fillSegmentMetaDataInfoToAccumulator` and `integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/rdd/CarbonSIRebuildRDD.scala:285` 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 × 2) integration/spark/src/main/scala/org/apache/spark/sql/CarbonSession.scala:203— integration/spark/src/main/scala/org/apache/spark/sql/CarbonSession.scala:203-214 | integration/spark/src/main/scala/org/apache/spark/sql/CarbonSession.scala:220-231 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/CarbonSession.scala:203` 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 (12 lines × 2) mv/plan/src/main/common2.3and2.4/org/apache/carbondata/mv/plans/modular/SparkVersionHelper.scala:36— mv/plan/src/main/common2.3and2.4/org/apache/carbondata/mv/plans/modular/SparkVersionHelper.scala:36-47 | mv/plan/src/main/spark3.1/org/apache/carbondata/mv/plans/modular/SparkVersionHelper.scala:35-46 — 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 (12 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:76— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:76-87 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:106-117 — 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 `integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:76` 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) examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:276— examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:276-287 | examples/spark/src/main/scala/org/apache/carbondata/examples/DedupExample.scala:188-199 — 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 (12 lines × 2) REDACTED:139— REDACTED:139-150 | REDACTED:138-149 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 134 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 (11 lines × 2) core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:227— core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:227-237 | core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:378-388 — 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 `core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:227` 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) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:394— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:394-404 | core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndex.java:160-170 — 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 (11 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:48— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:48-58 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:54-64 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java` and `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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. 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 (11 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/expression/RangeExpressionEvaluator.java:127— core/src/main/java/org/apache/carbondata/core/scan/expression/RangeExpressionEvaluator.java:127-137 | core/src/main/java/org/apache/carbondata/core/scan/expression/RangeExpressionEvaluator.java:148-158 — 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 `core/src/main/java/org/apache/carbondata/core/scan/expression/RangeExpressionEvaluator.java:127` 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:275— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:275-285 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:263-273 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 267 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:275` 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 (11 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:332— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:332-342 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:266-276 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 257 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:332` 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 (11 lines × 2) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:354— core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:354-364 | core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:847-857 — 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 `core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:354` 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) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:365— core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:365-375 | core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:859-869 — 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 `core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:365` 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) processing/src/main/java/org/apache/carbondata/processing/loading/steps/CarbonRowDataWriterProcessorStepImpl.java:415— processing/src/main/java/org/apache/carbondata/processing/loading/steps/CarbonRowDataWriterProcessorStepImpl.java:415-425 | processing/src/main/java/org/apache/carbondata/processing/loading/steps/DataWriterProcessorStepImpl.java:255-265 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/steps/CarbonRowDataWriterProcessorStepImpl.java:415` 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 (11 lines × 2) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:614— processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:614-624 | tools/cli/src/main/java/org/apache/carbondata/tool/FileCollector.java:170-180 — 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 `processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:614` 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 `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. Note first that the copies are not typed on the same thing: `ColumnSchema` names `org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema` in one and `org.apache.carbondata.format.ColumnSchema` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:74— streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:74-84 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:144-154 — 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 `streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:74` 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) core/src/main/java/org/apache/carbondata/core/readcommitter/LatestFilesReadCommittedScope.java:120— core/src/main/java/org/apache/carbondata/core/readcommitter/LatestFilesReadCommittedScope.java:120-130 | core/src/main/java/org/apache/carbondata/core/readcommitter/TableStatusReadCommittedScope.java:75-85 — 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 (11 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkPageReaderV3.java:120— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkPageReaderV3.java:120-130 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkPageReaderV3.java:119-129 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkPageReaderV3.java:120` 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 `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) core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:531— core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:531-541 | integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveInputSplit.java:272-283 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:545` calls `deserializeField` and `integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveInputSplit.java:287` 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 × 2) integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala:135— integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala:135-145 | integration/spark/src/main/spark3.1/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala:158-168 — before extracting anything, compare `integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala` and `integration/spark/src/main/spark3.1/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 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 `integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala:135` 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 (11 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:586— integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:586-596 | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/rdd/CarbonSecondaryIndexRDD.scala:257-267 — 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 `integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:586` 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) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:296— integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:296-306 | integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:355-365 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:296` 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) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:851— integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:851-861 | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:878-888 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:851` 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) REDACTED:154— REDACTED:154-164 | REDACTED:153-163 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 134 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 `REDACTED:154` 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.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×17
Edited copy of a member (13 corresponding lines) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataRefNode.java:165— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataRefNode.java:165-177 | core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataRefNode.java:179-191 — 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.
Edited copy of a member (13 corresponding lines) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:216— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:216-233 | core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:241-253 — 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.
Edited copy of a member (13 corresponding lines) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriterFactory.java:36— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriterFactory.java:36-48 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3WriterFactory.java:37-50 — 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.
Edited copy of a member (13 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:526— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:526-539 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeVarLengthColumnPageBase.java:46-58 — 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.
Edited copy of a member (13 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:113— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:113-128 | REDACTED:83-95 — 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.
Edited copy of a member (13 corresponding lines) geo/src/main/java/org/apache/carbondata/geo/GeoHashUtils.java:148— geo/src/main/java/org/apache/carbondata/geo/GeoHashUtils.java:148-160 | geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:383-395 — 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.
Edited copy of a member (13 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeFixedLengthDimensionDataChunkStore.java:54— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeFixedLengthDimensionDataChunkStore.java:54-69 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeFixedLengthDimensionDataChunkStore.java:106-118 — 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.
Edited copy of a member (13 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/complextypes/ArrayQueryType.java:72— core/src/main/java/org/apache/carbondata/core/scan/complextypes/ArrayQueryType.java:72-84 | core/src/main/java/org/apache/carbondata/core/scan/complextypes/StructQueryType.java:92-104 — 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.
Edited copy of a member (13 corresponding lines) REDACTED:33— REDACTED:33-48 | REDACTED: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.
Edited copy of a member (13 corresponding lines) integration/spark/src/main/scala/org/apache/carbondata/trash/DataTrashManager.scala:157— integration/spark/src/main/scala/org/apache/carbondata/trash/DataTrashManager.scala:157-169 | integration/spark/src/main/scala/org/apache/carbondata/trash/DataTrashManager.scala:175-189 — 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.
Edited copy of a member (13 corresponding lines) python/pycarbon/sdk/ArrowCarbonReader.py:39— python/pycarbon/sdk/ArrowCarbonReader.py:39-51 | python/pycarbon/sdk/PaginationCarbonReader.py:31-43 — 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.
Edited copy of a member (13 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1327— core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1327-1339 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1395-1407 — 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.
Edited copy of a member (13 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:735— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:735-747 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:753-767 — 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.
Edited copy of a member (13 corresponding lines) python/pycarbon/core/carbon_tf_utils.py:109— python/pycarbon/core/carbon_tf_utils.py:109-121 | python/pycarbon/integration/tensorflow.py:111-123 — 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.
Edited copy of a member (13 corresponding lines) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonIUD.java:339— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonIUD.java:339-351 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonIUD.java:368-383 — 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.
Edited copy of a member (13 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/DimensionRawColumnChunk.java:113— core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/DimensionRawColumnChunk.java:113-125 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/MeasureRawColumnChunk.java:97-109 — 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.
Edited copy of a member (13 corresponding lines) integration/presto/src/main/java/org/apache/carbondata/presto/PrestoCarbonVectorizedRecordReader.java:139— integration/presto/src/main/java/org/apache/carbondata/presto/PrestoCarbonVectorizedRecordReader.java:139-153 | integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/VectorizedCarbonRecordReader.java:172-184 — 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.
Duplicated block (13 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkPageReaderV3.java:76— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkPageReaderV3.java:76-88 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkReaderV3.java:82-94 — 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 (13 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:249— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:249-261 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:251-263 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:249` 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 (13 lines × 2) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:287— core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:287-299 | core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:344-356 — 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 `core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:287` 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:366— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:366-378 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:340-352 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 267 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:366` 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 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:64— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:64-76 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:64-76 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 404 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:64` 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 (13 lines × 2) core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:514— core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:514-526 | integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveInputSplit.java:252-264 — 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 `core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:514` 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 (13 lines × 2) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:123— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:123-135 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:130-142 — before extracting anything, compare `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java` and `integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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. 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 (13 lines × 2) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:286— integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:286-298 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:196-208 — 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 `integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:286` 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 (13 lines × 2) REDACTED:115— REDACTED:115-127 | REDACTED:147-160 — 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:115` 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) processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:497— processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:497-509 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:677-689 — 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) processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java:190— processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java:190-202 | processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java:352-364 — 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:1062— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:1062-1074 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:1076-1088 — 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) streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:100— streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:100-112 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:163-175 — 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 `streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:100` 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. 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 (13 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:341— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:341-353 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java:351-363 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 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. 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) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:564— integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:564-576 | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:609-622 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:564` 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) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1059— integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1059-1071 | mv/plan/src/main/scala/org/apache/carbondata/mv/plans/package.scala:54-66 — 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. 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 (13 lines × 2) integration/spark/src/main/common2.4and3.1/org/apache/spark/sql/CarbonBoundReference.scala:32— integration/spark/src/main/common2.4and3.1/org/apache/spark/sql/CarbonBoundReference.scala:32-44 | integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonBoundReference.scala:32-44 — before extracting anything, compare `integration/spark/src/main/common2.4and3.1/org/apache/spark/sql/CarbonBoundReference.scala` and `integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonBoundReference.scala` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×16
Edited copy of a member (12 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:401— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:401-412 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:420-431 — 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) integration/spark/src/main/java/org/apache/spark/sql/CarbonAntlrSqlVisitor.java:283— integration/spark/src/main/java/org/apache/spark/sql/CarbonAntlrSqlVisitor.java:283-294 | integration/spark/src/main/java/org/apache/spark/sql/CarbonAntlrSqlVisitor.java:297-308 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:181— processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:181-192 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:627-643 — 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) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:211— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:211-222 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:259-270 — 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) geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:49— geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:49-62 | geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:69-80 — 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) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/RelationIdentifier.java:98— core/src/main/java/org/apache/carbondata/core/metadata/schema/table/RelationIdentifier.java:98-114 | core/src/main/java/org/apache/carbondata/core/mutate/UpdateVO.java:62-73 — 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) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchema.java:296— core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchema.java:296-311 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/ColumnSchema.java:596-607 — 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) integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/SparkCarbonFileFormat.scala:328— integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/SparkCarbonFileFormat.scala:328-341 | integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonPlanHelper.scala:256-267 — 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) core/src/main/java/org/apache/carbondata/core/datastore/compression/SnappyCompressor.java:130— core/src/main/java/org/apache/carbondata/core/datastore/compression/SnappyCompressor.java:130-143 | core/src/main/java/org/apache/carbondata/core/datastore/compression/SnappyCompressor.java:190-201 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java:177— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java:177-188 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java:191-203 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:100— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:100-111 | REDACTED:65-76 — 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) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:363— index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:363-375 | index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneIndexFactoryBase.java:264-275 — 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) core/src/main/java/org/apache/carbondata/core/util/BitSetGroup.java:53— core/src/main/java/org/apache/carbondata/core/util/BitSetGroup.java:53-64 | core/src/main/java/org/apache/carbondata/core/util/BitSetGroup.java:66-79 — 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/AndFilterExecutorImpl.java:40— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/AndFilterExecutorImpl.java:40-52 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/AndFilterExecutorImpl.java:78-89 — 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) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/query/SecondaryIndexQueryResultProcessor.java:213— integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/query/SecondaryIndexQueryResultProcessor.java:213-224 | processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java:217-230 — 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) examples/spark/src/main/scala/org/apache/carbondata/examples/DedupExample.scala:79— examples/spark/src/main/scala/org/apache/carbondata/examples/DedupExample.scala:79-94 | examples/spark/src/main/scala/org/apache/carbondata/examples/DedupExample.scala:97-108 — 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 (11 corresponding lines) · ×16
Edited copy of a member (11 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:354— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:354-364 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:703-713 — 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) integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveSerDe.java:171— integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveSerDe.java:171-181 | integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveSerDe.java:184-194 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:435— core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:435-446 | core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:478-488 — 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) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/MergeHandler.scala:154— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/MergeHandler.scala:154-167 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/MergeHandler.scala:208-218 — 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:682— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:682-694 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:794-804 — 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) core/src/main/java/org/apache/carbondata/core/reader/CarbonHeaderReader.java:81— core/src/main/java/org/apache/carbondata/core/reader/CarbonHeaderReader.java:81-91 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonSchemaReader.java:371-382 — 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) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java:900— hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java:900-910 | integration/spark/src/main/java/org/apache/carbondata/spark/util/Util.java:110-120 — 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) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:434— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:434-444 | core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:481-491 — 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) integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala:490— integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala:490-501 | REDACTED:72-82 — 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) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:172— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:172-182 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:489-502 — 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) core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:644— core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:644-654 | core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:665-675 — 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) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:881— core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:881-891 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:1092-1102 — 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) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1440— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1440-1450 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1462-1474 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:281— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:281-291 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java:278-289 — 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) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:319— hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:319-329 | integration/spark/src/main/java/org/apache/carbondata/stream/CarbonStreamRecordReader.java:66-80 — 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) examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:206— examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:206-216 | examples/spark/src/main/scala/org/apache/carbondata/examples/DedupExample.scala:143-154 — 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.
Duplicated block (14 lines × 2) core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:624— core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:624-637 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2070-2083 — 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. 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 (14 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:306— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:306-319 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:302-315 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 404 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. 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 (14 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:287— core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:287-300 | core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:580-593 — 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 `core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:287` 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 (14 lines × 2) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:184— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:184-197 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:189-202 — before extracting anything, compare `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java` and `integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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 `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:184` 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) integration/presto/src/main/java/org/apache/carbondata/presto/PrestoCarbonVectorizedRecordReader.java:99— integration/presto/src/main/java/org/apache/carbondata/presto/PrestoCarbonVectorizedRecordReader.java:99-112 | integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/VectorizedCarbonRecordReader.java:124-137 — 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 (14 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:209— processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:209-222 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:244-257 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:260` calls `unpackNoSortFromBytes` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:224` 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:733— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:733-746 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:862-875 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:733` 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, `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:730` calls `newKey` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:860` 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:796— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:796-809 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:925-938 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:796` 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 (14 lines × 2) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:858— core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:858-871 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:574-587 — 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 (14 lines × 2) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriterFactoryBuilder.java:39— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriterFactoryBuilder.java:39-52 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3WriterFactoryBuilder.java:39-52 — before extracting anything, compare `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriterFactoryBuilder.java` and `integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3WriterFactoryBuilder.java` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriterFactoryBuilder.java:39` 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 `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 (14 lines × 2) integration/spark/src/main/java/org/apache/carbondata/converter/SparkDataTypeConverterImpl.java:119— integration/spark/src/main/java/org/apache/carbondata/converter/SparkDataTypeConverterImpl.java:119-132 | integration/spark/src/main/java/org/apache/carbondata/spark/util/Util.java:65-78 — 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 `integration/spark/src/main/java/org/apache/carbondata/converter/SparkDataTypeConverterImpl.java:119` 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) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:81— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:81-94 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:197-210 — 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 `integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:81` 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 after the matched lines, `integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:211` calls `convert` and `integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:95` 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 (14 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:565— integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:565-578 | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/rdd/CarbonSecondaryIndexRDD.scala:239-252 — 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 (14 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:173— integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:173-186 | integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:329-342 — 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 `integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:173` 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 (14 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:202— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:202-215 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:109-122 — before extracting anything, compare `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala` and `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 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 `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:202` 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) integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:216— integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:216-229 | integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:258-271 — before extracting anything, compare `integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala` and `integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×14
Edited copy of a member (9 corresponding lines) core/src/main/java/org/apache/carbondata/hadoop/internal/ObjectArrayWritable.java:43— core/src/main/java/org/apache/carbondata/hadoop/internal/ObjectArrayWritable.java:43-51 | processing/src/main/java/org/apache/carbondata/processing/loading/csvinput/StringArrayWritable.java:47-55 — 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.
Edited copy of a member (9 corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:254— core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:254-262 | core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:294-302 — 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.
Edited copy of a member (9 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/columnar/ByteArrayBlockIndexerStorage.java:57— core/src/main/java/org/apache/carbondata/core/datastore/columnar/ByteArrayBlockIndexerStorage.java:57-65 | core/src/main/java/org/apache/carbondata/core/datastore/columnar/ObjectArrayBlockIndexerStorage.java:57-65 — 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.
Edited copy of a member (9 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/LVByteBufferColumnPage.java:55— core/src/main/java/org/apache/carbondata/core/datastore/page/LVByteBufferColumnPage.java:55-66 | core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:53-61 — 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.
Edited copy of a member (9 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/DimColumnResolvedFilterInfo.java:116— core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/DimColumnResolvedFilterInfo.java:116-125 | core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/MeasureColumnResolvedFilterInfo.java:133-141 — 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.
Edited copy of a member (9 corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala:409— integration/spark/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala:409-418 | integration/spark/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala:423-431 — 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.
Edited copy of a member (9 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:470— core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:470-478 | core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:561-569 — 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.
Edited copy of a member (9 corresponding lines) integration/spark/src/main/java/org/apache/carbondata/spark/util/Util.java:99— integration/spark/src/main/java/org/apache/carbondata/spark/util/Util.java:99-107 | processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java:335-344 — 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.
Edited copy of a member (9 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:275— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:275-283 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:281-289 — 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.
Edited copy of a member (9 corresponding lines) integration/spark/src/main/scala/org/apache/carbondata/indexserver/InvalidateSegmentCacheRDD.scala:54— integration/spark/src/main/scala/org/apache/carbondata/indexserver/InvalidateSegmentCacheRDD.scala:54-66 | integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedShowCacheRDD.scala:51-59 — 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.
Edited copy of a member (9 corresponding lines) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CSVCarbonWriter.java:129— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CSVCarbonWriter.java:129-137 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/ParquetCarbonWriter.java:107-115 — 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.
Edited copy of a member (9 corresponding lines) core/src/main/java/org/apache/carbondata/core/index/dev/expr/AndIndexExprWrapper.java:69— core/src/main/java/org/apache/carbondata/core/index/dev/expr/AndIndexExprWrapper.java:69-77 | core/src/main/java/org/apache/carbondata/core/index/dev/expr/IndexExprWrapperImpl.java:66-74 — 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.
Edited copy of a member (9 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:172— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java:172-180 | REDACTED:97-107 — 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.
Edited copy of a member (9 corresponding lines) tools/cli/src/main/java/org/apache/carbondata/tool/DataFile.java:215— tools/cli/src/main/java/org/apache/carbondata/tool/DataFile.java:215-223 | tools/cli/src/main/java/org/apache/carbondata/tool/DataFile.java:225-233 — 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.
MethodTooLong: 1.fillPrimitiveType core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:328— MethodTooLong — fillPrimitiveType runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× 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: 1.fillVector core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:327— MethodTooLong — fillVector runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× 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: AbstractQueryExecutor.getBlockExecutionInfoForBlock core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java:435— MethodTooLong — getBlockExecutionInfoForBlock runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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: StreamRecordReader.readRowFromStream hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:355— MethodTooLong — readRowFromStream runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× 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: TableIndex.pruneMultiThread core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:277— MethodTooLong — pruneMultiThread runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× 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: CarbonLoadModelBuilder.build processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModelBuilder.java:147— MethodTooLong — build runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× 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: DriverQueryStatisticsRecorderImpl.collectDriverStatistics core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:138— MethodTooLong — collectDriverStatistics runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.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: 1.fillVector core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:302— MethodTooLong — fillVector runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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: CarbonLoaderUtil.recordNewLoadMetadata processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:234— MethodTooLong — recordNewLoadMetadata runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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: RowLevelFilterExecutorImpl.applyFilter core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:196— MethodTooLong — applyFilter runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: SortParameters.createSortParameters processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:471— MethodTooLong — createSortParameters runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: BlockletFilterScanner.executeFilter core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:172— MethodTooLong — executeFilter runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× 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: LoadOption.fillOptionWithDefaultValue processing/src/main/java/org/apache/carbondata/processing/loading/model/LoadOption.java:55— MethodTooLong — fillOptionWithDefaultValue runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× 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.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×13
Edited copy of a member (15 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:201— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:201-215 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:179-195 — 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) mv/plan/src/main/common2.3and2.4/org/apache/carbondata/mv/plans/modular/SparkVersionHelper.scala:35— mv/plan/src/main/common2.3and2.4/org/apache/carbondata/mv/plans/modular/SparkVersionHelper.scala:35-49 | mv/plan/src/main/spark3.1/org/apache/carbondata/mv/plans/modular/SparkVersionHelper.scala:34-48 — 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:62— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:62-76 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:62-76 — 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) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:926— core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:926-942 | core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:1421-1435 — 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) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:398— integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:398-416 | integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala:488-502 — 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) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:512— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:512-527 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:531-545 — 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) core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java:141— core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java:141-155 | core/src/main/java/org/apache/carbondata/core/memory/UnsafeSortMemoryManager.java:123-137 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:483— processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:483-497 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/TableFieldStat.java:331-345 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveCodec.java:198— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveCodec.java:198-216 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/dimension/legacy/IndexStorageEncoder.java:85-99 — 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) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeFixedLengthDimensionDataChunkStore.java:136— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeFixedLengthDimensionDataChunkStore.java:136-150 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeVariableLengthDimensionDataChunkStore.java:249-268 — 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) core/src/main/java/org/apache/carbondata/core/view/MVManager.java:95— core/src/main/java/org/apache/carbondata/core/view/MVManager.java:95-110 | core/src/main/java/org/apache/carbondata/core/view/MVManager.java:271-285 — 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) core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java:680— core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java:680-694 | core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java:704-718 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:121— processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:121-135 | processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:142-159 — 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.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×13
Edited copy of a member (8 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:202— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:202-209 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:223-230 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/MapParserImpl.java:79— processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/MapParserImpl.java:79-86 | processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/StructParserImpl.java:71-78 — 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) core/src/main/java/org/apache/carbondata/hadoop/internal/ObjectArrayWritable.java:54— core/src/main/java/org/apache/carbondata/hadoop/internal/ObjectArrayWritable.java:54-61 | processing/src/main/java/org/apache/carbondata/processing/loading/csvinput/StringArrayWritable.java:58-65 — 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) core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalType.java:57— core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalType.java:57-64 | core/src/main/java/org/apache/carbondata/core/metadata/datatype/MapType.java:61-68 — 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) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndex.java:231— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndex.java:231-240 | core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:917-924 — 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) core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:544— core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:544-551 | integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveInputSplit.java:286-293 — 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) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:79— core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:79-86 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:3311-3318 — 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) core/src/main/java/org/apache/carbondata/core/datastore/impl/DFSFileReaderImpl.java:119— core/src/main/java/org/apache/carbondata/core/datastore/impl/DFSFileReaderImpl.java:119-126 | core/src/main/java/org/apache/carbondata/core/datastore/impl/FileReaderImpl.java:74-82 — 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) integration/spark/src/main/scala/org/apache/spark/sql/catalyst/AbstractCarbonSparkSQLParser.scala:32— integration/spark/src/main/scala/org/apache/spark/sql/catalyst/AbstractCarbonSparkSQLParser.scala:32-39 | integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala:59-72 — 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) integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonRelation.scala:165— integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonRelation.scala:165-172 | integration/spark/src/main/scala/org/apache/spark/sql/util/SparkTypeConverter.scala:139-146 — 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) core/src/main/java/org/apache/carbondata/core/scan/executor/util/QueryUtil.java:174— core/src/main/java/org/apache/carbondata/core/scan/executor/util/QueryUtil.java:174-181 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:848-855 — 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) integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:76— integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:76-83 | integration/spark/src/main/spark3.1/org/apache/spark/sql/CarbonToSparkAdapter.scala:76-83 — 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) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:584— core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:584-591 | core/src/main/java/org/apache/carbondata/core/scan/model/QueryModel.java:165-172 — 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 (14 corresponding lines) · ×12
Edited copy of a member (14 corresponding lines) geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:877— geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:877-890 | geo/src/main/java/org/apache/carbondata/geo/scan/expression/PolygonRangeListExpression.java:104-117 — 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) hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/CarbonRowReadSupport.java:44— hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/CarbonRowReadSupport.java:44-57 | integration/spark/src/main/java/org/apache/carbondata/spark/readsupport/SparkGenericRowReadSupportImpl.java:44-57 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:137— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:137-150 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:125-138 — 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) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/ModularRelation.scala:55— mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/ModularRelation.scala:55-68 | mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/ModularRelation.scala:70-83 — 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) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:85— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:85-98 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:150-163 — 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) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:319— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:319-336 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:381-394 — 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) core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java:483— core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java:483-496 | core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java:533-551 — 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) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndexFactory.java:509— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndexFactory.java:509-525 | index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:465-478 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/KeyPageStatsCollector.java:80— core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/KeyPageStatsCollector.java:80-93 | core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/StringStatsCollector.java:92-109 — 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) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:378— index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:378-391 | index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneIndexFactoryBase.java:176-189 — 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) core/src/main/java/org/apache/carbondata/core/metadata/CarbonMetadata.java:137— core/src/main/java/org/apache/carbondata/core/metadata/CarbonMetadata.java:137-152 | core/src/main/java/org/apache/carbondata/core/scan/model/QueryModelBuilder.java:257-270 — 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) python/pycarbon/core/carbon_tf_utils.py:125— python/pycarbon/core/carbon_tf_utils.py:125-138 | python/pycarbon/integration/tensorflow.py:126-139 — 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.
Duplicated block (18 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/SafeVariableLengthDimensionDataChunkStore.java:127— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/SafeVariableLengthDimensionDataChunkStore.java:127-144 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/SafeVariableLengthDimensionDataChunkStore.java:154-171 — 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 (18 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:138— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:138-155 | core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:205-222 — 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 `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:138` 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:181— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:181-198 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:239-256 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:181` 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) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:466— core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:466-483 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:568-585 — 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 `core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:466` 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 (18 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java:88— processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java:88-105 | processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java:179-196 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java:87` calls `currentTimeMillis` and `processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java:178` 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 (18 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:190— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:190-207 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java:185-202 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:190` 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 (18 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeSingleThreadFinalSortFilesMerger.java:166— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeSingleThreadFinalSortFilesMerger.java:166-183 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SingleThreadFinalSortFilesMerger.java:142-159 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeSingleThreadFinalSortFilesMerger.java:166` 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) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:380— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:380-397 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:438-455 — 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 `integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:380` 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 (18 lines × 2) python/pycarbon/core/carbon_tf_utils.py:142— python/pycarbon/core/carbon_tf_utils.py:142-159 | python/pycarbon/integration/tensorflow.py:142-159 — before extracting anything, compare `python/pycarbon/core/carbon_tf_utils.py` and `python/pycarbon/integration/tensorflow.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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.
Duplicated block (18 lines × 2) python/pycarbon/reader.py:83— python/pycarbon/reader.py:83-100 | python/pycarbon/reader.py:127-144 — 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 `python/pycarbon/reader.py:83` 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 (18 lines × 2) python/pycarbon/core/carbon_tf_utils.py:202— python/pycarbon/core/carbon_tf_utils.py:202-219 | python/pycarbon/integration/tensorflow.py:199-216 — before extracting anything, compare `python/pycarbon/core/carbon_tf_utils.py` and `python/pycarbon/integration/tensorflow.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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. 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 (18 lines × 2) REDACTED:92— REDACTED:92-109 | REDACTED:89-106 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 134 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 `REDACTED:92` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:90` calls `addSparkListener`, `CarbonSparkStreamingListener` and `REDACTED:87` 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.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×10
Edited copy of a member (16 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/LazyColumnPage.java:54— core/src/main/java/org/apache/carbondata/core/datastore/page/LazyColumnPage.java:54-69 | core/src/main/java/org/apache/carbondata/core/datastore/page/LazyColumnPage.java:101-118 — 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) core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:294— core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:294-313 | integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveInputSplit.java:126-141 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:81— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:81-97 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:79-94 — 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) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:1363— core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:1363-1379 | core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:1389-1404 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:235— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:235-250 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java:247-262 — 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) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:478— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:478-494 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2403-2418 — 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) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:489— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:489-504 | integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:693-708 — 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) core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java:60— core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java:60-77 | core/src/main/java/org/apache/carbondata/core/locks/S3FileLock.java:86-101 — 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) streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:403— streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:403-418 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:627-646 — 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) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:193— processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:193-208 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:215-233 — 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) · ×10
Edited copy of a member (7 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:134— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:134-140 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:138-147 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:187— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:187-193 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeVarLengthColumnPage.java:92-98 — 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) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:270— core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:270-276 | core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:284-290 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/steps/CarbonRowDataWriterProcessorStepImpl.java:114— processing/src/main/java/org/apache/carbondata/processing/loading/steps/CarbonRowDataWriterProcessorStepImpl.java:114-120 | processing/src/main/java/org/apache/carbondata/processing/loading/steps/DataWriterProcessorStepImpl.java:93-99 — 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) core/src/main/java/org/apache/carbondata/core/datastore/columnar/ByteArrayBlockIndexerStorage.java:48— core/src/main/java/org/apache/carbondata/core/datastore/columnar/ByteArrayBlockIndexerStorage.java:48-54 | core/src/main/java/org/apache/carbondata/core/datastore/columnar/ObjectArrayBlockIndexerStorage.java:47-54 — 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) core/src/main/java/org/apache/carbondata/core/datastore/columnar/ByteArrayColumnWithRowId.java:57— core/src/main/java/org/apache/carbondata/core/datastore/columnar/ByteArrayColumnWithRowId.java:57-63 | core/src/main/java/org/apache/carbondata/core/datastore/columnar/ObjectColumnWithRowId.java:53-59 — 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java:174— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java:174-181 | core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorage.java:154-160 — 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) integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/ColumnarVectorWrapper.java:153— integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/ColumnarVectorWrapper.java:153-161 | integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/ColumnarVectorWrapperDirect.java:115-121 — 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) core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:55— core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:55-61 | core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:787-793 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:215— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:215-221 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:215-221 — 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 (20 corresponding lines) · ×9
Edited copy of a member (20 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:631— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:631-650 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:659-678 — 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) core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:289— core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:289-315 | core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:344-363 — 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) core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:776— core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:776-799 | core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:832-851 — 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) core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentProperties.java:372— core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentProperties.java:372-391 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:399-421 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeSingleThreadFinalSortFilesMerger.java:162— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeSingleThreadFinalSortFilesMerger.java:162-183 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SingleThreadFinalSortFilesMerger.java:140-159 — 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) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:970— core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:970-990 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:1015-1034 — 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) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAddLoadCommand.scala:440— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAddLoadCommand.scala:440-460 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAddLoadCommand.scala:467-486 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:177— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:177-196 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java:191-210 — 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) core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1042— core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1042-1061 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1298-1321 — 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.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×9
Edited copy of a member (24 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:307— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:307-330 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:378-403 — 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.
Edited copy of a member (24 corresponding lines) integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:71— integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:71-98 | integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:159-182 — 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.
Edited copy of a member (24 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:184— core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:184-207 | core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java:210-240 — 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.
Edited copy of a member (24 corresponding lines) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:61— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:61-84 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:64-88 — 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.
Edited copy of a member (24 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/dimension/legacy/ComplexDimensionIndexCodec.java:46— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/dimension/legacy/ComplexDimensionIndexCodec.java:46-69 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/dimension/legacy/DirectDictDimensionIndexCodec.java:46-75 — 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.
Edited copy of a member (24 corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonDeleteLoadByIdCommand.scala:35— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonDeleteLoadByIdCommand.scala:35-60 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonDeleteLoadByLoadDateCommand.scala:36-59 — 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.
Edited copy of a member (24 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkPageReaderV3.java:76— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkPageReaderV3.java:76-101 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:94-117 — 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.
Edited copy of a member (24 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesAndSchemaHolder.java:366— core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesAndSchemaHolder.java:366-390 | core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesAndSchemaHolder.java:393-416 — 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.
Edited copy of a member (24 corresponding lines) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:394— index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:394-417 | index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndexFactory.java:95-118 — 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.
Duplicated block (9–10 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveCodec.java:200— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveCodec.java:200-209 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/dimension/legacy/IndexStorageEncoder.java:86-94 — 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 (9–10 lines × 2) core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:251— core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:251-259 | core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:407-416 — 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) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:646— core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:646-654 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:249-258 — 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 `core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:646` 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 (9–10 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:218— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:218-227 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:236-244 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:218` 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 (9–10 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:243— core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:243-252 | core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:265-273 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:243` 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 (9–10 lines × 2) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/RowComparator.java:59— integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/RowComparator.java:59-68 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/NewRowComparator.java:52-60 — 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 `integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/RowComparator.java:59` 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–10 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:108— processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:108-117 | processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:150-158 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:108` 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 (9–10 lines × 2) REDACTED:182— REDACTED:182-190 | REDACTED:252-261 — 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:244— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:244-253 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:438-446 — 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 `sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:244` 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×8
Members sharing a duplicated core (4 members, 50+ identical tokens) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:82— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:82-123 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:89-130 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:70-111 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:67-107 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:198— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:198-210 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:213-227 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:230-244 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:247-261 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:176— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:176-188 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:191-205 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:208-220 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:223-237 — 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:346— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:346-367 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:370-411 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:423-443 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:446-486 — 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:82— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:82-113 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:82-115 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:81-113 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:81-113 — 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:117— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:117-151 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:119-153 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:117-150 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:117-150 — 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:174— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:174-198 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:232-256 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:173-197 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:173-195 — 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) REDACTED:184— REDACTED:184-208 | REDACTED:182-206 | REDACTED:188-212 | REDACTED:177-207 — 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 (32 corresponding lines) · ×8
Edited copy of a member (32 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:122— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:122-153 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java:94-125 — These two members are one piece of code written twice and then edited apart: 32 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 (32 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/AbstractDimensionChunkReader.java:90— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/AbstractDimensionChunkReader.java:90-127 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/AbstractMeasureChunkReader.java:78-109 — These two members are one piece of code written twice and then edited apart: 32 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 (32 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:126— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:126-157 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:114-145 — These two members are one piece of code written twice and then edited apart: 32 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 (32 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:630— processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:630-661 | tools/cli/src/main/java/org/apache/carbondata/tool/FileCollector.java:186-218 — These two members are one piece of code written twice and then edited apart: 32 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 (32 corresponding lines) python/pycarbon/core/carbon_tf_utils.py:255— python/pycarbon/core/carbon_tf_utils.py:255-286 | python/pycarbon/integration/tensorflow.py:250-282 — These two members are one piece of code written twice and then edited apart: 32 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 (32 corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:536— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:536-567 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:599-630 — These two members are one piece of code written twice and then edited apart: 32 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 (32 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/MeasureColumnVisitor.java:48— core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/MeasureColumnVisitor.java:48-79 | core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/RangeNoDictionaryTypeVisitor.java:49-82 — These two members are one piece of code written twice and then edited apart: 32 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 (32 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/BadRecordsLogger.java:178— processing/src/main/java/org/apache/carbondata/processing/loading/BadRecordsLogger.java:178-209 | processing/src/main/java/org/apache/carbondata/processing/loading/BadRecordsLogger.java:217-248 — These two members are one piece of code written twice and then edited apart: 32 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) · ×8
Edited copy of a member (19 corresponding lines) streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:480— streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:480-498 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:501-519 — 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) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:439— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:439-457 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:465-484 — 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) processing/src/main/java/org/apache/carbondata/processing/sort/SchemaBasedRowUpdater.java:51— processing/src/main/java/org/apache/carbondata/processing/sort/SchemaBasedRowUpdater.java:51-70 | processing/src/main/java/org/apache/carbondata/processing/sort/SchemaBasedRowUpdater.java:74-92 — 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) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:300— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:300-319 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:325-343 — 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) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:238— core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:238-260 | core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:262-280 — 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) REDACTED:204— REDACTED:204-223 | REDACTED:209-227 — 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) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:720— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:720-739 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:741-759 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:263— core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:263-281 | core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:284-302 — 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 (10 corresponding lines) · ×8
Edited copy of a member (10 corresponding lines) geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:203— geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:203-212 | geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:221-230 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/CarbonDataLoadConfiguration.java:285— processing/src/main/java/org/apache/carbondata/processing/loading/CarbonDataLoadConfiguration.java:285-296 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:372-381 — 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) core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java:467— core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java:467-477 | core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java:483-492 — 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) streaming/src/main/java/org/apache/carbondata/streaming/StreamBlockletWriter.java:185— streaming/src/main/java/org/apache/carbondata/streaming/StreamBlockletWriter.java:185-195 | streaming/src/main/java/org/apache/carbondata/streaming/StreamBlockletWriter.java:197-206 — 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) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:472— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java:472-481 | core/src/main/java/org/apache/carbondata/core/scan/wrappers/IntArrayWrapper.java:34-43 — 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:277— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:277-286 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:360-370 — 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) core/src/main/java/org/apache/carbondata/core/scan/executor/impl/DetailQueryExecutor.java:45— core/src/main/java/org/apache/carbondata/core/scan/executor/impl/DetailQueryExecutor.java:45-54 | core/src/main/java/org/apache/carbondata/core/scan/executor/impl/VectorDetailQueryExecutor.java:41-50 — 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) tools/cli/src/main/java/org/apache/carbondata/tool/DataFile.java:257— tools/cli/src/main/java/org/apache/carbondata/tool/DataFile.java:257-266 | tools/cli/src/main/java/org/apache/carbondata/tool/DataFile.java:268-277 — 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.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×8
Edited copy of a member (6 corresponding lines) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndex.java:265— index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndex.java:265-270 | index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndex.java:276-284 — 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) core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:261— core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:261-266 | core/src/main/java/org/apache/carbondata/core/scan/result/impl/FilterQueryScannedResult.java:124-131 — 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) core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:251— core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:251-256 | core/src/main/java/org/apache/carbondata/core/scan/result/impl/FilterQueryScannedResult.java:114-119 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/dimension/legacy/ComplexDimensionIndexCodec.java:61— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/dimension/legacy/ComplexDimensionIndexCodec.java:61-66 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/dimension/legacy/DirectDictDimensionIndexCodec.java:65-73 — 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/arrow/ArrowFieldWriter.java:386— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/arrow/ArrowFieldWriter.java:386-391 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/arrow/ArrowWriter.java:62-67 — 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/arrow/ArrowFieldWriter.java:394— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/arrow/ArrowFieldWriter.java:394-399 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/arrow/ArrowWriter.java:69-75 — 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) REDACTED:236— REDACTED:236-241 | REDACTED:240-245 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:154— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:154-161 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:280-285 — 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 (10–11 lines × 2) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:382— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:382-391 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:422-432 — 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 `core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:382` 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–11 lines × 2) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1557— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1557-1566 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1571-1581 — 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–11 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:335— processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:335-344 | processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:349-359 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:335` 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–11 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:90— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:90-99 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:327-337 — 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–11 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/index/CarbonIndexUtil.scala:423— integration/spark/src/main/scala/org/apache/spark/sql/index/CarbonIndexUtil.scala:423-432 | integration/spark/src/main/scala/org/apache/spark/sql/index/CarbonIndexUtil.scala:476-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. Read the line range as the matched WINDOW rather than a finished unit: at `integration/spark/src/main/scala/org/apache/spark/sql/index/CarbonIndexUtil.scala:423` 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–11 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:357— integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:357-367 | integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:486-495 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:357` 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–11 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/SILoadEventListener.scala:52— integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/SILoadEventListener.scala:52-61 | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/SILoadEventListenerForFailedSegments.scala:55-65 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/SILoadEventListener.scala:52` 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, `integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/SILoadEventListenerForFailedSegments.scala:51` calls `getInstance`, `isSIRepairEnabled` and `integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/SILoadEventListener.scala:49` 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 (10–11 lines × 2) REDACTED:47— REDACTED:47-57 | REDACTED:78-87 — 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· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×7
Members sharing a duplicated core (5 members, 50+ identical tokens) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:179— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:179-192 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:202-215 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:225-238 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:248-263 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:273-286 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:254— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:254-332 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:312-325 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:244-319 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:286-300 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:250-310 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:163— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:163-192 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:69-113 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.java:105-131 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:75-119 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java:47-91 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpression.java:37— core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpression.java:37-77 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanExpression.java:38-79 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/LessThanEqualToExpression.java:37-77 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/LessThanExpression.java:38-81 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/StartsWithExpression.java:38-63 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:577— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:577-602 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:577-596 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:584-603 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:595-614 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:603-622 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) examples/spark/src/main/scala/org/apache/carbondata/examples/CustomCompactionExample.scala:41— examples/spark/src/main/scala/org/apache/carbondata/examples/CustomCompactionExample.scala:41-99 | examples/spark/src/main/scala/org/apache/carbondata/examples/DataManagementExample.scala:35-112 | REDACTED:41-103 | examples/spark/src/main/scala/org/apache/carbondata/examples/QuerySegmentExample.scala:41-148 | examples/spark/src/main/scala/org/apache/carbondata/examples/TableLevelCompactionOptionExample.scala:37-123 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) examples/spark/src/main/scala/org/apache/carbondata/examples/DataFrameComplexTypeExample.scala:48— examples/spark/src/main/scala/org/apache/carbondata/examples/DataFrameComplexTypeExample.scala:48-160 | REDACTED:43-122 | REDACTED:39-122 | REDACTED:34-127 | REDACTED:33-124 — These 5 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 5 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 5 times.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×7
Edited copy of a member (25 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:120— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:120-153 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkReaderV3.java:110-134 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:431— core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:431-459 | core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:547-571 — 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) integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedRDDUtils.scala:207— integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedRDDUtils.scala:207-231 | integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedRDDUtils.scala:255-279 — 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) core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java:62— core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java:62-87 | index/examples/src/minmaxindex/main/java/org/apache/carbondata/index/examples/MinMaxDataWriter.java:242-266 — 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/AndFilterExecutorImpl.java:99— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/AndFilterExecutorImpl.java:99-123 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/AndFilterExecutorImpl.java:127-154 — 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) integration/spark/src/main/scala/org/apache/spark/sql/listeners/MVListeners.scala:223— integration/spark/src/main/scala/org/apache/spark/sql/listeners/MVListeners.scala:223-249 | integration/spark/src/main/scala/org/apache/spark/sql/listeners/MVListeners.scala:256-280 — 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) core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:781— core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:781-805 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1651-1678 — 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 (23 corresponding lines) · ×7
Edited copy of a member (23 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:146— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:146-169 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java:162-184 — 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.
Edited copy of a member (23 corresponding lines) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:258— index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:258-284 | index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:306-328 — 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.
Edited copy of a member (23 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:72— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:72-94 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:104-133 — 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.
Edited copy of a member (23 corresponding lines) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java:322— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java:322-355 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/utils/SDKUtil.java:50-72 — 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.
Edited copy of a member (23 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:189— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:189-211 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java:184-206 — 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.
Edited copy of a member (23 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/steps/CarbonRowDataWriterProcessorStepImpl.java:202— processing/src/main/java/org/apache/carbondata/processing/loading/steps/CarbonRowDataWriterProcessorStepImpl.java:202-228 | processing/src/main/java/org/apache/carbondata/processing/loading/steps/DataWriterProcessorStepImpl.java:174-196 — 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.
Edited copy of a member (23 corresponding lines) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:140— index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:140-163 | index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:171-193 — 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 (21 corresponding lines) · ×7
Edited copy of a member (21 corresponding lines) integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/hive/SqlAstBuilderHelper.scala:34— integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/hive/SqlAstBuilderHelper.scala:34-54 | integration/spark/src/main/spark3.1/org/apache/spark/sql/hive/SqlAstBuilderHelper.scala:38-60 — 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) core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:259— core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:259-280 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:284-304 — 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) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:739— integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:739-760 | integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:763-783 — 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) geo/src/main/java/org/apache/carbondata/geo/GeoHashUtils.java:431— geo/src/main/java/org/apache/carbondata/geo/GeoHashUtils.java:431-451 | geo/src/main/java/org/apache/carbondata/geo/scan/filter/executor/PolygonFilterExecutorImpl.java:47-67 — 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CSVCarbonWriter.java:97— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CSVCarbonWriter.java:97-121 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/JsonCarbonWriter.java:82-102 — 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) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:183— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:183-203 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:188-208 — 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) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:479— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:479-504 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala:188-208 — 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 (18 corresponding lines) · ×7
Edited copy of a member (18 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:249— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:249-274 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkReaderV3.java:239-256 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:352— core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:352-369 | core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:372-389 — 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) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:611— processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:611-628 | tools/cli/src/main/java/org/apache/carbondata/tool/FileCollector.java:167-184 — 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) core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java:644— core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java:644-664 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:719-736 — 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) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:291— core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:291-308 | core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:322-339 — 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) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/util/SecondaryIndexUtil.scala:591— integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/util/SecondaryIndexUtil.scala:591-611 | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/util/SecondaryIndexUtil.scala:654-671 — 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) examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:275— examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:275-297 | examples/spark/src/main/scala/org/apache/carbondata/examples/DedupExample.scala:187-204 — 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.
Duplicated block (15 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:426— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:426-440 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:598-612 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:426` 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 (15 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:360— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:360-374 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:356-370 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 404 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:360` 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 `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 (15 lines × 2) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:553— core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:553-567 | core/src/main/java/org/apache/carbondata/core/view/MVProvider.java:322-336 — 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 `core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:553` 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 (15 lines × 2) core/src/main/java/org/apache/carbondata/core/util/ObjectSerializationUtil.java:75— core/src/main/java/org/apache/carbondata/core/util/ObjectSerializationUtil.java:75-89 | core/src/main/java/org/apache/carbondata/core/util/ObjectSerializationUtil.java:119-133 — 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 `core/src/main/java/org/apache/carbondata/core/util/ObjectSerializationUtil.java:75` 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 (15 lines × 2) integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:72— integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:72-86 | integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:160-174 — 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) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:192— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:192-206 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:463-477 — 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 `sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.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 (15 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:553— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:553-567 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:616-630 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:553` 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 (8 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:105— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:105-112 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:199-206 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:595-602 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:105` 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 × 3) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:64— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:64-71 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:63-70 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:63-70 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 254 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:71` calls `ifDefaultValueMatchesFilter` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:72` 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 (8 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:75— core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:75-82 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:186-193 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:240-247 — 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 `core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:75` 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 (8 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:205— core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:205-212 | core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:375-382 | core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:443-450 — 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 `core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:205` 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 × 3) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:896— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:896-903 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/JsonCarbonWriter.java:173-180 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/ORCCarbonWriter.java:251-258 — 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 (8 lines × 3) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/index/ShowIndexesCommand.scala:53— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/index/ShowIndexesCommand.scala:53-60 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/stream/CarbonShowStreamsCommand.scala:38-45 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/view/CarbonShowMVCommand.scala:41-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. 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 (8 lines × 3) integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:48— integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:48-55 | integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:52-59 | integration/spark/src/main/spark3.1/org/apache/spark/sql/CarbonToSparkAdapter.scala:52-59 — before extracting anything, compare `integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala` and `integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×6
Edited copy of a member (22 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/CarbonUnsafeUtil.java:37— core/src/main/java/org/apache/carbondata/core/util/CarbonUnsafeUtil.java:37-58 | core/src/main/java/org/apache/carbondata/core/util/CarbonUnsafeUtil.java:71-94 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:422— processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:422-443 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:460-486 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:224— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:224-245 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:224-245 — 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) processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:204— processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:204-225 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:237-262 — 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) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkPageReaderV3.java:141— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkPageReaderV3.java:141-162 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkReaderV3.java:209-232 — 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) core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:723— core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:723-744 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:749-776 — 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 (27 corresponding lines) · ×6
Edited copy of a member (27 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:275— core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:275-301 | core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:304-330 — 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.
Edited copy of a member (27 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:165— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:165-191 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:249-275 — 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.
Edited copy of a member (27 corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:575— integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:575-601 | integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:613-639 — 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.
Edited copy of a member (27 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:381— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:381-407 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:419-454 — 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.
Edited copy of a member (27 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:71— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:71-97 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:73-100 — 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.
Edited copy of a member (27 corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/AbsoluteTableIdentifier.java:111— core/src/main/java/org/apache/carbondata/core/metadata/AbsoluteTableIdentifier.java:111-137 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/ColumnSchema.java:315-341 — 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 (4 corresponding lines) · ×6
Edited copy of a member (4 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:534— core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:534-537 | core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:739-742 — 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) integration/spark/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala:766— integration/spark/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala:766-769 | integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:791-794 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:224— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeDecimalColumnPage.java:224-227 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeVarLengthColumnPage.java:114-117 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:129— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:129-132 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:117-120 — 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) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:375— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:375-378 | core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:261-264 — 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) integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:166— integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:166-170 | integration/spark/src/main/spark3.1/org/apache/spark/sql/CarbonToSparkAdapter.scala:142-145 — 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 (11–12 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:97— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:97-107 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:144-155 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:97` 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. 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 (11–12 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:77— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:77-87 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:79-90 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:77` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:92` calls `getComparatorByDataTypeForMeasure`, `getMeasureDataType` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:88` 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–12 lines × 2) core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:187— core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:187-198 | core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:353-363 — 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 (11–12 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:175— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:175-186 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:269-279 — 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 `integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:175` 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 (11–12 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:525— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala:525-535 | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/util/SecondaryIndexUtil.scala:750-761 — 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. 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 (11–12 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/hive/CarbonInternalMetastore.scala:224— integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/hive/CarbonInternalMetastore.scala:224-234 | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/hive/CarbonInternalMetastore.scala:238-249 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/hive/CarbonInternalMetastore.scala:238` 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 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:146— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:146-155 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:157-166 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java:129-138 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java` and `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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. 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:125— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:125-134 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:140-149 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:220-229 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:125` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:137` calls `decodeAllColumnPages` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:151` 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 (10 lines × 3) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:554— core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:554-563 | core/src/main/java/org/apache/carbondata/core/view/MVProvider.java:323-332 | hadoop/src/main/java/org/apache/carbondata/hadoop/testutil/StoreCreator.java:391-400 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:554` 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 lines × 3) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:267— integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:267-276 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:74-83 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:144-153 — 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 `integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:267` 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 × 3) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:587— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:587-596 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:694-703 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:793-802 — 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 (10 lines × 3) integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:65— integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:65-74 | integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:99-108 | integration/spark/src/main/spark3.1/org/apache/spark/sql/CarbonToSparkAdapter.scala:99-108 — before extracting anything, compare `integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala` and `integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×5
Edited copy of a member (28 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:58— core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:58-92 | core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:94-128 — 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.
Edited copy of a member (28 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:135— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/AbstractScannedResultCollector.java:135-164 | core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:204-231 — 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.
Edited copy of a member (28 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:175— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:175-202 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkReaderV3.java:156-184 — 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.
Edited copy of a member (28 corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/CarbonTableIdentifier.java:107— core/src/main/java/org/apache/carbondata/core/metadata/CarbonTableIdentifier.java:107-140 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchema.java:164-191 — 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.
Edited copy of a member (28 corresponding lines) python/pycarbon/core/carbon_tf_utils.py:349— python/pycarbon/core/carbon_tf_utils.py:349-403 | python/pycarbon/integration/tensorflow.py:331-358 — 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· Edited copy of a member (36 corresponding lines) · ×5
Edited copy of a member (36 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:703— core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:703-738 | core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:743-782 — 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.
Edited copy of a member (36 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java:228— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java:228-263 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2305-2346 — 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.
Edited copy of a member (36 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:83— processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:83-124 | processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/JsonRowParser.java:127-162 — 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.
Edited copy of a member (36 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:481— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:481-516 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:477-521 — 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.
Edited copy of a member (36 corresponding lines) REDACTED:56— REDACTED:56-91 | REDACTED:52-92 — 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 (26 corresponding lines) · ×5
Edited copy of a member (26 corresponding lines) integration/spark/src/main/java/org/apache/carbondata/converter/SparkDataTypeConverterImpl.java:116— integration/spark/src/main/java/org/apache/carbondata/converter/SparkDataTypeConverterImpl.java:116-141 | integration/spark/src/main/java/org/apache/carbondata/spark/util/Util.java:63-97 — 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) core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java:157— core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java:157-182 | core/src/main/java/org/apache/carbondata/core/memory/UnsafeSortMemoryManager.java:145-170 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java:240— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java:240-265 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java:357-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) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:242— processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:242-269 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:278-303 — 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) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkPageReaderV3.java:75— core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkPageReaderV3.java:75-100 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/measure/v3/MeasureChunkReaderV3.java:81-107 — 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 (29 corresponding lines) · ×5
Edited copy of a member (29 corresponding lines) index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndex.java:347— index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndex.java:347-380 | index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndex.java:386-414 — 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) integration/spark/src/main/scala/org/apache/carbondata/api/CarbonStore.scala:301— integration/spark/src/main/scala/org/apache/carbondata/api/CarbonStore.scala:301-329 | integration/spark/src/main/scala/org/apache/carbondata/api/CarbonStore.scala:337-367 — 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) python/pycarbon/core/carbon_tf_utils.py:223— python/pycarbon/core/carbon_tf_utils.py:223-251 | python/pycarbon/integration/tensorflow.py:219-247 — 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) REDACTED:153— REDACTED:153-182 | REDACTED:152-180 — 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) examples/spark/src/main/scala/org/apache/carbondata/examples/DirectSQLExample.scala:78— examples/spark/src/main/scala/org/apache/carbondata/examples/DirectSQLExample.scala:78-106 | examples/spark/src/main/scala/org/apache/carbondata/examples/S3UsingSDkExample.scala:38-69 — 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 (17 corresponding lines) · ×5
Edited copy of a member (17 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:675— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:675-691 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:702-718 — 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.
Edited copy of a member (17 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:569— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:569-585 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/ViewFSCarbonFile.java:63-79 — 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.
Edited copy of a member (17 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:172— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:172-188 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:172-188 — 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.
Edited copy of a member (17 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/blocklet/EncodedBlocklet.java:105— core/src/main/java/org/apache/carbondata/core/datastore/blocklet/EncodedBlocklet.java:105-121 | core/src/main/java/org/apache/carbondata/core/datastore/blocklet/EncodedBlocklet.java:129-148 — 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.
Edited copy of a member (17 corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1201— integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1201-1217 | integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1229-1247 — 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.
Duplicated block (24 lines × 2) core/src/main/java/org/apache/carbondata/core/metadata/datatype/Field.java:54— core/src/main/java/org/apache/carbondata/core/metadata/datatype/Field.java:54-77 | core/src/main/java/org/apache/carbondata/core/metadata/datatype/Field.java:110-133 — 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 `core/src/main/java/org/apache/carbondata/core/metadata/datatype/Field.java:54` 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 (24 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:426— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:426-449 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:421-444 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 404 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. 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 (24 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:180— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:180-203 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:229-252 — 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 `integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:180` 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 (24 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:501— integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:501-524 | integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:545-568 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:501` 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 (24 lines × 2) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuildDSL.scala:311— mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuildDSL.scala:311-334 | mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuildDSL.scala:337-360 — 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) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:142— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:142-157 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:130-145 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:142` 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) core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:357— core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:357-372 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:1118-1133 — 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 `core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:357` 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 (16 lines × 2) processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:524— processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:524-539 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:697-712 — 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) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:281— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:281-296 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:730-745 — 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 (16 lines × 2) python/pycarbon/reader.py:102— python/pycarbon/reader.py:102-117 | python/pycarbon/reader.py:146-161 — 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 `python/pycarbon/reader.py:102` 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.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×4
Edited copy of a member (30 corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/SparkCarbonFileFormat.scala:225— integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/SparkCarbonFileFormat.scala:225-257 | integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/SparkCarbonFileFormat.scala:280-309 — 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) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:108— core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:108-137 | core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:147-177 — 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) REDACTED:110— REDACTED:110-141 | REDACTED:143-172 — 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) REDACTED:34— REDACTED:34-72 | REDACTED:74-103 — 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 (31 corresponding lines) · ×4
Edited copy of a member (31 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:304— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:304-343 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:390-420 — 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) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/query/SecondaryIndexQueryResultProcessor.java:490— integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/query/SecondaryIndexQueryResultProcessor.java:490-520 | processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java:432-467 — 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) core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java:79— core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java:79-109 | core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java:119-150 — 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) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:148— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:148-180 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:155-185 — 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 copies of one member (3 members, 12+ corresponding lines) · ×4
Edited copies of one member (3 members, 12+ corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepImpl.java:83— processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepImpl.java:83-94 | processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:195-208 | processing/src/main/java/org/apache/carbondata/processing/loading/steps/JsonInputProcessorStepImpl.java:69-80 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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, 12+ corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/profiler/ProfilerLogger.scala:145— integration/spark/src/main/scala/org/apache/spark/sql/profiler/ProfilerLogger.scala:145-156 | integration/spark/src/main/scala/org/apache/spark/sql/profiler/ProfilerLogger.scala:175-188 | integration/spark/src/main/scala/org/apache/spark/sql/profiler/ProfilerLogger.scala:352-366 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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, 12+ corresponding lines) core/src/main/java/org/apache/carbondata/core/indexstore/schema/SchemaGenerator.java:264— core/src/main/java/org/apache/carbondata/core/indexstore/schema/SchemaGenerator.java:264-277 | core/src/main/java/org/apache/carbondata/core/util/BlockletIndexUtil.java:351-362 | core/src/main/java/org/apache/carbondata/core/util/BlockletIndexUtil.java:374-385 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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, 12+ corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/schema/SchemaReader.java:106— core/src/main/java/org/apache/carbondata/core/metadata/schema/SchemaReader.java:106-118 | core/src/main/java/org/apache/carbondata/core/metadata/schema/SchemaReader.java:121-132 | core/src/main/java/org/apache/carbondata/core/metadata/schema/SchemaReader.java:135-146 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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 (5 corresponding lines) · ×4
Edited copy of a member (5 corresponding lines) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:366— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:366-370 | core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:191-195 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) integration/spark/src/main/scala/org/apache/spark/util/DeleteSegmentByDate.scala:30— integration/spark/src/main/scala/org/apache/spark/util/DeleteSegmentByDate.scala:30-35 | integration/spark/src/main/scala/org/apache/spark/util/DeleteSegmentById.scala:34-38 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeAbstractDimensionDataChunkStore.java:157— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeAbstractDimensionDataChunkStore.java:157-161 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeVariableLengthDimensionDataChunkStore.java:149-157 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeAbstractDimensionDataChunkStore.java:144— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeAbstractDimensionDataChunkStore.java:144-148 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeVariableLengthDimensionDataChunkStore.java:164-168 — These two members are one piece of code written twice and then edited apart: 5 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 (23 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:279— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:279-301 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:276-298 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 404 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:279` 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 (23 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/MeasureColumnVisitor.java:52— core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/MeasureColumnVisitor.java:52-74 | core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/NoDictionaryTypeVisitor.java:51-73 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/MeasureColumnVisitor.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/NoDictionaryTypeVisitor.java` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 (23 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:310— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:310-332 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:356-378 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 134 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:310` 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 (23 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:206— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:206-228 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala:93-115 — before extracting anything, compare `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala` and `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 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 `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:206` 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 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:413— core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:413-431 | core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:455-473 — 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 `core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:413` 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 `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 (19 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:491— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:491-509 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:496-514 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 404 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) processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModel.java:404— processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModel.java:404-422 | processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModel.java:459-477 — 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 (19 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepImpl.java:167— processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepImpl.java:167-185 | processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:302-320 — 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. 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 (21 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:448— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:448-468 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:444-464 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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. 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 (21 lines × 2) python/pycarbon/core/carbon_tf_utils.py:163— python/pycarbon/core/carbon_tf_utils.py:163-183 | python/pycarbon/integration/tensorflow.py:162-182 — before extracting anything, compare `python/pycarbon/core/carbon_tf_utils.py` and `python/pycarbon/integration/tensorflow.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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 `python/pycarbon/core/carbon_tf_utils.py:163` 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 (21 lines × 2) examples/spark/src/main/scala/org/apache/carbondata/examples/CarbonSessionExample.scala:32— examples/spark/src/main/scala/org/apache/carbondata/examples/CarbonSessionExample.scala:32-52 | examples/spark/src/main/scala/org/apache/carbondata/examples/GeoTableExampleWithCarbonSession.scala:32-52 — 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. 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 (21 lines × 2) examples/spark/src/main/scala/org/apache/carbondata/examples/S3Example.scala:42— examples/spark/src/main/scala/org/apache/carbondata/examples/S3Example.scala:42-62 | examples/spark/src/main/scala/org/apache/carbondata/examples/S3UsingSDkExample.scala:82-102 — 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 × 5) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:131— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:131-139 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:143-151 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:119-127 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:120-128 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:121-129 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:131` 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 (9 lines × 5) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:224— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:224-232 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:377-385 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:188-196 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:355-363 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:351-359 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:224` 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 × 5) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:156— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:156-164 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:356-364 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:167-175 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:334-342 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:330-338 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:156` 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 × 5) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:463— hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:463-471 | hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:475-483 | hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:487-495 | hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:499-507 | hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:510-520 — 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 `hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:463` 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. 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 × 2) core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:387— core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:387-393 | core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:414-421 — 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 `core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:387` 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 (7–8 lines × 2) processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:975— processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:975-982 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:1025-1031 — 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 `processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:975` 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. 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 × 2) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonIUD.java:102— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonIUD.java:102-109 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonIUD.java:186-192 — 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 `sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonIUD.java:102` 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 (7–8 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:537— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:537-544 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:600-606 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:537` 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 × 3) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:193— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:193-199 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:210-216 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:225-231 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:193` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `long` in one and `float` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:201` calls `putLong` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:217` 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 (7 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:326— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:326-332 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:420-426 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:396-402 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:326` 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 (7 lines × 3) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:486— integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:486-492 | integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:509-515 | integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:553-559 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:486` 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 (7 lines × 3) integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:57— integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:57-63 | integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:61-67 | integration/spark/src/main/spark3.1/org/apache/spark/sql/CarbonToSparkAdapter.scala:61-67 — before extracting anything, compare `integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala` and `integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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.
Duplicated block (5 lines × 3) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:400— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:400-404 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:474-478 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:501-505 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:400` 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 (5 lines × 3) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:490— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:490-494 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:428-432 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:458-462 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:490` 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 (5 lines × 3) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:420— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:420-424 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:402-406 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:450-454 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 134 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:420` 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 (5 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:101— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:101-105 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:102-106 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:100-104 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.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.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×3
Edited copy of a member (33 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:399— core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:399-431 | core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:441-473 — These two members are one piece of code written twice and then edited apart: 33 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 (33 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java:78— processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java:78-110 | processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java:167-200 — These two members are one piece of code written twice and then edited apart: 33 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 (33 corresponding lines) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:174— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:174-216 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:225-257 — These two members are one piece of code written twice and then edited apart: 33 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) · ×3
Edited copy of a member (40 corresponding lines) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:52— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:52-91 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:55-96 — 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.
Edited copy of a member (40 corresponding lines) hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonRecordReader.java:76— hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonRecordReader.java:76-118 | hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java:85-124 — 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.
Edited copy of a member (40 corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:440— core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:440-479 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2106-2145 — 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 copies of one member (3 members, 24+ corresponding lines) · ×3
Edited copies of one member (3 members, 24+ corresponding lines) integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:75— integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:75-99 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:105-128 | integration/spark/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessorStepOnSpark.scala:135-166 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 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, 24+ corresponding lines) core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReaderImpl.java:81— core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReaderImpl.java:81-106 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:481-516 | index/examples/src/minmaxindex/main/java/org/apache/carbondata/index/examples/MinMaxIndex.java:92-115 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 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, 24+ corresponding lines) REDACTED:179— REDACTED:179-202 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:201-225 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java:196-223 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 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) · ×3
Edited copies of one member (3 members, 9+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:916— core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:916-926 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/FalseFilterExecutor.java:29-37 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/TrueFilterExecutor.java:34-43 — 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) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:105— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:105-114 | core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:181-191 | core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:199-207 — 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) core/src/main/java/org/apache/carbondata/core/datastore/TableSegmentUniqueIdentifier.java:70— core/src/main/java/org/apache/carbondata/core/datastore/TableSegmentUniqueIdentifier.java:70-79 | core/src/main/java/org/apache/carbondata/core/index/IndexChooser.java:353-361 | core/src/main/java/org/apache/carbondata/core/indexstore/Blocklet.java:103-116 — 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.
Duplicated block (36 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:96— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:96-131 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java:92-127 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 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 (36 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:407— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:407-442 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:437-472 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 134 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:407` 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 (36 lines × 2) REDACTED:92— REDACTED:92-127 | REDACTED:89-124 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 114 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 `REDACTED:92` 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 (27 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:125— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:125-151 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java:121-147 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:125` 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 (27 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:199— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:199-225 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java:213-239 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 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 (27 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/DeleteExecution.scala:367— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/DeleteExecution.scala:367-393 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/DeleteExecution.scala:438-464 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/DeleteExecution.scala:367` 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 (25 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:129— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:129-153 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java:101-125 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java` and `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 95 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 `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:129` 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 (25 lines × 2) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:528— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:528-552 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:599-623 — 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 `processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:528` 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 (25 lines × 2) integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala:49— integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala:49-73 | integration/spark/src/main/spark3.1/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala:50-74 — before extracting anything, compare `integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala` and `integration/spark/src/main/spark3.1/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 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.
Duplicated block (11 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:117— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:117-127 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:123-133 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java:95-105 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java` and `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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 `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:117` 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 × 3) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:210— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:210-220 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:363-373 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:174-184 — 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 `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, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:209` calls `getFilterKeys` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:362` 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 (11 lines × 3) integration/spark/src/main/spark2.3/org/apache/spark/sql/hive/CarbonSessionStateBuilder.scala:88— integration/spark/src/main/spark2.3/org/apache/spark/sql/hive/CarbonSessionStateBuilder.scala:88-98 | integration/spark/src/main/spark2.4/org/apache/spark/sql/hive/CarbonSessionStateBuilder.scala:88-98 | integration/spark/src/main/spark3.1/org/apache/spark/sql/hive/CarbonSessionStateBuilder.scala:88-98 — before extracting anything, compare `integration/spark/src/main/spark2.3/org/apache/spark/sql/hive/CarbonSessionStateBuilder.scala` and `integration/spark/src/main/spark2.4/org/apache/spark/sql/hive/CarbonSessionStateBuilder.scala` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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.
Duplicated block (8 lines × 5) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:126— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:126-133 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:431-438 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:141-148 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:221-228 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:603-610 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:126` 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 (8 lines × 5) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:144— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:144-151 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:285-292 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:342-349 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:276-283 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:273-280 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:152` calls `getMeasureDataType` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:293` 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 (8 lines × 5) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:595— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:595-602 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:589-596 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:596-603 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:607-614 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:615-622 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:595` 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 (7 lines × 5) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:105— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:105-111 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:108-114 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:202-208 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:156-162 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:386-393 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:209` calls `getFilterKeys` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:163` 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 (7 lines × 5) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:103— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:103-109 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:424-430 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:153-159 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:383-390 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:728-734 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:422` calls `readColumnChunks` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:151` 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 (7 lines × 5) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:181— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:181-187 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:204-210 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:227-233 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:250-256 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:275-281 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:181` 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 × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:561— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:561-566 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:568-573 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:578-583 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:587-592 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:561` 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 (6 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:83— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:83-88 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:83-88 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:82-87 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:82-87 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:83` 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, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:76` calls `ifDefaultValueMatchesFilter` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:75` 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 (6 lines × 4) examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3Example.java:101— examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3Example.java:101-106 | examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3Example.java:116-121 | examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3ReadExample.java:84-89 | examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3ReadExample.java:103-108 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3Example.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3Example.java:123` calls `getInstance`, `addProperty` and `examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3ReadExample.java:109` 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 (6 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:130— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:130-135 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:140-145 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java:112-117 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java` and `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:146` calls `getCurrentRowId` and `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:136` 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 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:84— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:84-89 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:83-88 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:83-88 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 257 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:84` 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 × 3) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:157— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:157-162 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ImplicitIncludeFilterExecutorImpl.java:57-62 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/TrueFilterExecutor.java:46-51 — 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 (13 lines × 3) integration/spark/src/main/scala/org/apache/carbondata/streaming/StreamSinkFactory.scala:198— integration/spark/src/main/scala/org/apache/carbondata/streaming/StreamSinkFactory.scala:198-210 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:280-292 | integration/spark/src/main/scala/org/apache/spark/sql/execution/datasources/SparkCarbonTableFormat.scala:121-133 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (13 lines × 3) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:241— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:241-253 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala:121-133 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:136-148 — before extracting anything, compare `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala` and `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:149` calls `info` and `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:254` 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 (13 lines × 3) integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:145— integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:145-157 | integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:174-186 | integration/spark/src/main/spark3.1/org/apache/spark/sql/CarbonToSparkAdapter.scala:149-161 — before extracting anything, compare `integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala` and `integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `integration/spark/src/main/spark2.4/org/apache/spark/sql/CarbonToSparkAdapter.scala:188` calls `getTheLastQualifier` and `integration/spark/src/main/spark2.3/org/apache/spark/sql/CarbonToSparkAdapter.scala:166` 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.
SparkVersionAdapter.createCarbonTable (cyclomatic 27) integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala:230— SparkVersionAdapter.createCarbonTable 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.
SparkVersionAdapter.createCarbonTable (cyclomatic 27) integration/spark/src/main/spark3.1/org/apache/spark/sql/SparkVersionAdapter.scala:257— SparkVersionAdapter.createCarbonTable 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.
1.decodeAndFillVector (cyclomatic 26) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:253— 1.decodeAndFillVector has cyclomatic complexity 26 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
1.decodeAndFillVector (cyclomatic 26) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:243— 1.decodeAndFillVector has cyclomatic complexity 26 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SparkVersionAdapter.createCarbonTable (cognitive 49) integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala:230— SparkVersionAdapter.createCarbonTable has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 6, loops 1 (3 pts), error handling 1 (2 pts), match/switch 2 (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.
SparkVersionAdapter.createCarbonTable (cognitive 49) integration/spark/src/main/spark3.1/org/apache/spark/sql/SparkVersionAdapter.scala:257— SparkVersionAdapter.createCarbonTable has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 6, loops 1 (3 pts), error handling 1 (2 pts), match/switch 2 (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.
1.decodeAndFillVector (cognitive 42) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:253— 1.decodeAndFillVector has cognitive complexity 42 (threshold 15). Drivers by points: loops 10 (24 pts), if/else 13 (14 pts), boolean chains 4 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
1.decodeAndFillVector (cognitive 42) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:243— 1.decodeAndFillVector has cognitive complexity 42 (threshold 15). Drivers by points: loops 10 (24 pts), if/else 13 (14 pts), boolean chains 4 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CarbonIndexFileMergeWriter.mergeCarbonIndexFilesOfSegment (cognitive 18) core/src/main/java/org/apache/carbondata/core/writer/CarbonIndexFileMergeWriter.java:129— CarbonIndexFileMergeWriter.mergeCarbonIndexFilesOfSegment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2, 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.
CarbonIndexFileMergeWriter.mergeCarbonIndexFilesOfSegment (cognitive 18) core/src/main/java/org/apache/carbondata/core/writer/CarbonIndexFileMergeWriter.java:82— CarbonIndexFileMergeWriter.mergeCarbonIndexFilesOfSegment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (3 pts), boolean chains 2, error handling 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.
D4 · Code Duplication· Edited copy of a member (59 corresponding lines) · ×2
Edited copy of a member (59 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:494— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:494-552 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:563-623 — These two members are one piece of code written twice and then edited apart: 59 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 (59 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:93— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterImpl.java:93-151 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterImpl.java:86-147 — These two members are one piece of code written twice and then edited apart: 59 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 (47 corresponding lines) · ×2
Edited copy of a member (47 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:101— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:101-147 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:98-148 — These two members are one piece of code written twice and then edited apart: 47 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 (47 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModel.java:391— processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModel.java:391-437 | processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModel.java:446-493 — These two members are one piece of code written twice and then edited apart: 47 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, 19+ corresponding lines) · ×2
Edited copies of one member (4 members, 19+ corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/rle/RLECodec.java:333— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/rle/RLECodec.java:333-351 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/rle/RLECodec.java:354-372 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/rle/RLECodec.java:375-393 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/rle/RLECodec.java:396-414 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 19+ corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/datatype/ArrayType.java:43— core/src/main/java/org/apache/carbondata/core/metadata/datatype/ArrayType.java:43-61 | core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalType.java:33-54 | core/src/main/java/org/apache/carbondata/core/metadata/datatype/MapType.java:37-58 | core/src/main/java/org/apache/carbondata/core/metadata/datatype/StructType.java:37-55 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×2
Edited copies of one member (4 members, 12+ corresponding lines) integration/spark/src/main/scala/org/apache/spark/util/CleanFiles.scala:48— integration/spark/src/main/scala/org/apache/spark/util/CleanFiles.scala:48-65 | integration/spark/src/main/scala/org/apache/spark/util/Compaction.scala:50-61 | integration/spark/src/main/scala/org/apache/spark/util/DeleteSegmentByDate.scala:37-49 | integration/spark/src/main/scala/org/apache/spark/util/DeleteSegmentById.scala:40-53 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 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.
Edited copies of one member (4 members, 12+ corresponding lines) REDACTED:124— REDACTED:124-137 | REDACTED:124-136 | REDACTED:129-140 | REDACTED:126-138 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 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, 16+ corresponding lines) · ×2
Edited copies of one member (3 members, 16+ corresponding lines) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:172— processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:172-188 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:193-208 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:210-225 — 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.
Edited copies of one member (3 members, 16+ corresponding lines) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:315— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:315-330 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:333-349 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:352-368 — 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 (4 members, 20+ corresponding lines) · ×2
Edited copies of one member (4 members, 20+ corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableInfo.java:192— core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableInfo.java:192-215 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/CarbonDimension.java:114-133 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/CarbonImplicitDimension.java:150-170 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/CarbonMeasure.java:56-75 — 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.
Edited copies of one member (4 members, 20+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:153— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:153-172 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:211-230 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:152-171 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:152-171 — 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 (4 members, 9+ corresponding lines) · ×2
Edited copies of one member (4 members, 9+ corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/index/ShowIndexesCommand.scala:52— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/index/ShowIndexesCommand.scala:52-60 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonShowSegmentsCommand.scala:44-54 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/stream/CarbonShowStreamsCommand.scala:37-45 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/view/CarbonShowMVCommand.scala:40-48 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 9+ corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:149— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:149-159 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:190-198 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:150-159 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:190-198 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) integration/spark/src/main/scala/org/apache/spark/sql/execution/CastExpressionOptimization.scala:98— integration/spark/src/main/scala/org/apache/spark/sql/execution/CastExpressionOptimization.scala:98-111 | integration/spark/src/main/scala/org/apache/spark/sql/execution/CastExpressionOptimization.scala:113-126 | integration/spark/src/main/scala/org/apache/spark/sql/execution/CastExpressionOptimization.scala:128-141 — 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.
Edited copies of one member (3 members, 14+ corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java:675— core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java:675-688 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1238-1254 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1257-1273 — 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 copies of one member (4 members, 10+ corresponding lines) · ×2
Edited copies of one member (4 members, 10+ corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFile.java:49— core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFile.java:49-58 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/HDFSCarbonFile.java:63-72 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/S3CarbonFile.java:76-85 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/ViewFSCarbonFile.java:51-60 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 10+ corresponding lines) core/src/main/java/org/apache/carbondata/core/util/comparator/BigDecimalSerializableComparator.java:24— core/src/main/java/org/apache/carbondata/core/util/comparator/BigDecimalSerializableComparator.java:24-33 | core/src/main/java/org/apache/carbondata/core/util/comparator/DoubleSerializableComparator.java:22-31 | core/src/main/java/org/apache/carbondata/core/util/comparator/FloatSerializableComparator.java:22-31 | integration/spark/src/main/java/org/apache/carbondata/spark/load/DecimalSerializableComparator.java:26-35 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×2
Edited copies of one member (4 members, 13+ corresponding lines) core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:646— core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:646-661 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1773-1787 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:2120-2135 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:2214-2226 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 13+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:201— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:201-213 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:259-271 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:200-213 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:198-210 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×2
Edited copies of one member (3 members, 8+ corresponding lines) core/src/main/java/org/apache/carbondata/core/index/dev/expr/OrIndexExprWrapper.java:53— core/src/main/java/org/apache/carbondata/core/index/dev/expr/OrIndexExprWrapper.java:53-60 | core/src/main/java/org/apache/carbondata/core/index/dev/expr/OrIndexExprWrapper.java:65-72 | core/src/main/java/org/apache/carbondata/core/index/dev/expr/OrIndexExprWrapper.java:76-83 — 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.
Edited copies of one member (3 members, 8+ corresponding lines) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:903— core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:903-910 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:3571-3578 | processing/src/main/java/org/apache/carbondata/processing/loading/CarbonDataLoadConfiguration.java:252-261 — 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, 15+ corresponding lines) · ×2
Edited copies of one member (3 members, 15+ corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/DimensionRawColumnChunk.java:69— core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/DimensionRawColumnChunk.java:69-83 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/MeasureRawColumnChunk.java:53-68 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/MeasureRawColumnChunk.java:73-88 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 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, 15+ corresponding lines) core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1123— core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1123-1137 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1531-1545 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1596-1611 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 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 (33 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:322— core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:322-354 | core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:375-407 — 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 `core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:322` 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 (33 lines × 2) core/src/main/java/org/apache/carbondata/core/util/NonDictionaryUtil.java:1— core/src/main/java/org/apache/carbondata/core/util/NonDictionaryUtil.java:1-33 | processing/src/main/java/org/apache/carbondata/processing/sort/DummyRowUpdater.java:1-41 — 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 `core/src/main/java/org/apache/carbondata/core/util/NonDictionaryUtil.java:1` 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 (20–21 lines × 2) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:109— core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:109-129 | core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:148-167 — 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 `core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:109` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:169` calls `parseTimestamp` and `core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:130` 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 (20–21 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:116— processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:116-136 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java:117-136 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java` and `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/UnsafeParallelReadMergeSorterWithColumnRangeImpl.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/impl/ParallelReadMergeSorterWithColumnRangeImpl.java:116` 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 (20 lines × 2) integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:70— integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:70-89 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java:74-93 — before extracting anything, compare `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java` and `integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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 `integration/flink/src/main/java/org/apache/carbon/flink/CarbonLocalWriter.java:70` 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 (20 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonPlanHelper.scala:203— integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonPlanHelper.scala:203-222 | integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonPlanHelper.scala:229-248 — 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 `integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonPlanHelper.scala:203` 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 (16–17 lines × 2) core/src/main/java/org/apache/carbondata/core/metadata/CarbonTableIdentifier.java:125— core/src/main/java/org/apache/carbondata/core/metadata/CarbonTableIdentifier.java:125-140 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchema.java:175-191 — 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 `core/src/main/java/org/apache/carbondata/core/metadata/CarbonTableIdentifier.java:125` 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 (16–17 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:550— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:550-566 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:558-573 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:550` 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 (17 lines × 2) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:530— core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:530-546 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:635-651 — 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 `core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:530` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:634` calls `add` and `core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:529` 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 (17 lines × 2) mv/plan/src/main/spark2.4/org/apache/carbondata/mv/plans/modular/ExpressionHelper.scala:32— mv/plan/src/main/spark2.4/org/apache/carbondata/mv/plans/modular/ExpressionHelper.scala:32-48 | mv/plan/src/main/spark3.1/org/apache/carbondata/mv/plans/modular/ExpressionHelper.scala:40-56 — before extracting anything, compare `mv/plan/src/main/spark2.4/org/apache/carbondata/mv/plans/modular/ExpressionHelper.scala` and `mv/plan/src/main/spark3.1/org/apache/carbondata/mv/plans/modular/ExpressionHelper.scala` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 `mv/plan/src/main/spark2.4/org/apache/carbondata/mv/plans/modular/ExpressionHelper.scala:32` 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–16 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:169— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:169-184 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.java:107-120 — 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 `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java:169` 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–16 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:325— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:325-340 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:382-395 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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. 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 (14–15 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpression.java:57— core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpression.java:57-71 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotEqualsExpression.java:54-67 — 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 `core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpression.java:57` 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 (14–15 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:575— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:575-589 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:636-649 — 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 `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:575` 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. 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 (13–14 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/NoDictionaryTypeVisitor.java:66— core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/NoDictionaryTypeVisitor.java:66-78 | core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/RangeNoDictionaryTypeVisitor.java:69-82 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/NoDictionaryTypeVisitor.java:66` 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 (13–14 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:650— integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:650-663 | integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:302-314 — 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 (12–14 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:247— core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:247-260 | core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:290-301 — 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–14 lines × 2) core/src/main/java/org/apache/carbondata/core/view/MVManager.java:365— core/src/main/java/org/apache/carbondata/core/view/MVManager.java:365-378 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:365-376 — 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 `core/src/main/java/org/apache/carbondata/core/view/MVManager.java:365` 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. 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 (12–13 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:374— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:374-385 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:448-460 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:372` calls `flip` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:447` 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 (12–13 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:309— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:309-321 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:366-377 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:309` 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 (12 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:91— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:91-102 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:90-101 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:90-101 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 254 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:91` 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 (12 lines × 3) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:93— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:93-104 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CSVCarbonWriter.java:61-72 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/JsonCarbonWriter.java:68-79 — 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. 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 × 5) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpression.java:41— core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpression.java:41-50 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanExpression.java:42-52 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/LessThanEqualToExpression.java:41-50 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/LessThanExpression.java:46-55 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/StartsWithExpression.java:42-52 — 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.
Duplicated block (10–11 lines × 5) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:387— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:387-397 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:228-237 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:285-294 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:227-236 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:224-233 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:387` 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 (9–11 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:206— core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:206-216 | core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:218-226 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:206` 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 (9–11 lines × 2) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:261— index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:261-269 | index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:308-318 — 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 `index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexFactory.java:261` 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 × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeTypeExecutorFactory.java:46— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeTypeExecutorFactory.java:46-55 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeTypeExecutorFactory.java:58-67 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeTypeExecutorFactory.java:70-79 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeTypeExecutorFactory.java:82-91 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeTypeExecutorFactory.java:46` 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 lines × 4) REDACTED:185— REDACTED:185-194 | REDACTED:183-192 | REDACTED:189-198 | REDACTED:178-187 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 134 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 `REDACTED:185` 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–10 lines × 3) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:317— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:317-325 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:291-300 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:301-309 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:317` 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–10 lines × 3) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:478— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:478-486 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:502-510 | core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:178-187 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:478` 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) core/src/main/java/org/apache/carbondata/core/util/AbstractDataFileFooterConverter.java:305— core/src/main/java/org/apache/carbondata/core/util/AbstractDataFileFooterConverter.java:305-313 | core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java:137-144 — 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–9 lines × 2) examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:207— examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:207-215 | examples/spark/src/main/scala/org/apache/carbondata/examples/DedupExample.scala:144-151 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/spark/src/main/scala/org/apache/carbondata/examples/DedupExample.scala:151` calls `getOrCreateCarbonSession`, `setLogLevel` and `examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:215` 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 (5 lines × 4) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:97— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:97-101 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:109-113 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:144-148 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:158-162 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:97` 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 × 4) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:177— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:177-181 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:192-196 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:209-213 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:224-228 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:177` 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 first that the copies are not typed on the same thing: the declarations holding them bind `value` to `int` in one and `long` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (39 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/exception/CarbonDataLoadingException.java:36— processing/src/main/java/org/apache/carbondata/processing/loading/exception/CarbonDataLoadingException.java:36-74 | processing/src/main/java/org/apache/carbondata/processing/sort/exception/CarbonSortKeyAndGroupByException.java:39-88 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/exception/CarbonDataLoadingException.java` and `processing/src/main/java/org/apache/carbondata/processing/sort/exception/CarbonSortKeyAndGroupByException.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 200 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. 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 (39 lines × 2) integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonExtensionSqlParser.scala:43— integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonExtensionSqlParser.scala:43-81 | integration/spark/src/main/spark3.1/org/apache/spark/sql/parser/CarbonExtensionSqlParser.scala:43-81 — before extracting anything, compare `integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonExtensionSqlParser.scala` and `integration/spark/src/main/spark3.1/org/apache/spark/sql/parser/CarbonExtensionSqlParser.scala` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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.
Off the main sequence: carbondata-flink-proxy — carbondata-flink-proxy: abstractness 0.20, instability 0.00, distance 0.80 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: carbondata-mv-plan_${spark.binary.version} — carbondata-mv-plan_${spark.binary.version}: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Low cohesion: CarbonAntlrSqlVisitor (LCOM4 6) integration/spark/src/main/java/org/apache/spark/sql/CarbonAntlrSqlVisitor.java:41— CarbonAntlrSqlVisitor's methods fall into 6 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 6 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: AvroCarbonWriter (LCOM4 4) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:81— AvroCarbonWriter's methods fall into 4 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 4 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.
1.fillPrimitiveType (cyclomatic 71) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:328— 1.fillPrimitiveType has cyclomatic complexity 71 (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.
MVMatchPattern.doMatch (cyclomatic 69) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:305— MVMatchPattern.doMatch has cyclomatic complexity 69 (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.
1.fillVector (cyclomatic 68) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:327— 1.fillVector has cyclomatic complexity 68 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CarbonCreateSecondaryIndexCommand.processData (cyclomatic 58) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/command/SICreationCommand.scala:83— CarbonCreateSecondaryIndexCommand.processData has cyclomatic complexity 58 (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.
1.fillVector (cyclomatic 57) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:302— 1.fillVector has cyclomatic complexity 57 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SessionParams.validateKeyValue (cyclomatic 54) core/src/main/java/org/apache/carbondata/core/util/SessionParams.java:128— SessionParams.validateKeyValue has cyclomatic complexity 54 (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.
StreamRecordReader.readRowFromStream (cyclomatic 53) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:355— StreamRecordReader.readRowFromStream has cyclomatic complexity 53 (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.
CarbonMergerRDD.internalGetPartitions (cyclomatic 53) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:281— CarbonMergerRDD.internalGetPartitions has cyclomatic complexity 53 (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.
CarbonMergeDataSetCommand.processData (cyclomatic 53) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetCommand.scala:85— CarbonMergeDataSetCommand.processData has cyclomatic complexity 53 (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.
SelectSelectNoChildDelta.apply (cyclomatic 52) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:660— SelectSelectNoChildDelta.apply has cyclomatic complexity 52 (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.
CarbonDataRDDFactory.loadCarbonData (cyclomatic 50) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala:283— CarbonDataRDDFactory.loadCarbonData has cyclomatic complexity 50 (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.
DDLStrategy.apply (cyclomatic 48) integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala:57— DDLStrategy.apply has cyclomatic complexity 48 (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.
SecondaryIndexCreator.createSecondaryIndex (cyclomatic 46) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/rdd/SecondaryIndexCreator.scala:66— SecondaryIndexCreator.createSecondaryIndex has cyclomatic complexity 46 (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.
CarbonAlterTableColRenameDataTypeChangeCommand.processMetadata (cyclomatic 43) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableColRenameDataTypeChangeCommand.scala:88— CarbonAlterTableColRenameDataTypeChangeCommand.processMetadata has cyclomatic complexity 43 (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.
ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.convert (cyclomatic 42) core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:87— ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.convert 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.
AlterTableColumnSchemaGenerator.process (cyclomatic 39) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala:293— AlterTableColumnSchemaGenerator.process 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.
CarbonSecondaryIndexOptimizer.transformFilterToJoin (cyclomatic 38) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:736— CarbonSecondaryIndexOptimizer.transformFilterToJoin has cyclomatic complexity 38 (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.
FilterExecutorUtil.executeIncludeExcludeFilterForMeasure (cyclomatic 36) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExecutorUtil.java:57— FilterExecutorUtil.executeIncludeExcludeFilterForMeasure 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.
RowLevelFilterExecutorImpl.applyFilter (cyclomatic 34) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:196— RowLevelFilterExecutorImpl.applyFilter 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.
CommonLoadUtils.loadDataWithPartition (cyclomatic 34) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:869— CommonLoadUtils.loadDataWithPartition 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.
CarbonProjectForUpdateCommand.processData (cyclomatic 34) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/CarbonProjectForUpdateCommand.scala:59— CarbonProjectForUpdateCommand.processData 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.
CarbonLoaderUtil.recordNewLoadMetadata (cyclomatic 31) processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:234— CarbonLoaderUtil.recordNewLoadMetadata 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.
CarbonUtil.setLocalDictColumnsToWrapperSchema (cyclomatic 30) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2927— CarbonUtil.setLocalDictColumnsToWrapperSchema 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.
CarbonCreateMVCommand.doCreate (cyclomatic 30) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/view/CarbonCreateMVCommand.scala:156— CarbonCreateMVCommand.doCreate has cyclomatic complexity 30 (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.
DMLStrategy.apply (cyclomatic 29) integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/DMLStrategy.scala:54— DMLStrategy.apply has cyclomatic complexity 29 (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.
MVRewrite.updatePlan (cyclomatic 29) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:734— MVRewrite.updatePlan has cyclomatic complexity 29 (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.
DataTypeUtil.createTimeInstant (cyclomatic 28) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:450— DataTypeUtil.createTimeInstant has cyclomatic complexity 28 (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.
PrimitiveDataType.writeByteArray (cyclomatic 28) processing/src/main/java/org/apache/carbondata/processing/datatypes/PrimitiveDataType.java:239— PrimitiveDataType.writeByteArray has cyclomatic complexity 28 (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.
CastExpressionOptimization.checkIfCastCanBeRemove (cyclomatic 28) integration/spark/src/main/scala/org/apache/spark/sql/execution/CastExpressionOptimization.scala:158— CastExpressionOptimization.checkIfCastCanBeRemove has cyclomatic complexity 28 (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.
CarbonSparkSqlParserUtil.buildTableInfoFromCatalogTable (cyclomatic 28) integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSparkSqlParserUtil.scala:148— CarbonSparkSqlParserUtil.buildTableInfoFromCatalogTable has cyclomatic complexity 28 (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.
RowLevelFilterExecutorImpl.createRow (cyclomatic 27) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:443— RowLevelFilterExecutorImpl.createRow 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.
DataTypeConverterUtil.convertToCarbonTypeForSpark2 (cyclomatic 27) integration/spark/src/main/scala/org/apache/carbondata/spark/util/DataTypeConverterUtil.scala:58— DataTypeConverterUtil.convertToCarbonTypeForSpark2 has cyclomatic complexity 27 (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.
CarbonSparkDataSourceUtil.createCarbonFilter (cyclomatic 27) integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/CarbonSparkDataSourceUtil.scala:115— CarbonSparkDataSourceUtil.createCarbonFilter has cyclomatic complexity 27 (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.
ColumnPageWrapper.getChunkDataInBytes (cyclomatic 26) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java:110— ColumnPageWrapper.getChunkDataInBytes has cyclomatic complexity 26 (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.
FilterExpressionProcessor.getFilterResolverBasedOnExpressionType (cyclomatic 26) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java:174— FilterExpressionProcessor.getFilterResolverBasedOnExpressionType 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.
DataTypeUtil.getDataBasedOnDataType (cyclomatic 26) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:312— DataTypeUtil.getDataBasedOnDataType 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.
AvroCarbonWriter.getMappingDataTypeForCollectionRecord (cyclomatic 26) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:749— AvroCarbonWriter.getMappingDataTypeForCollectionRecord 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.
AvroCarbonWriter.prepareFields (cyclomatic 26) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:541— AvroCarbonWriter.prepareFields 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.
CarbonParserUtil.prepareTableModel (cyclomatic 26) integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:210— CarbonParserUtil.prepareTableModel 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.
CarbonParserUtil.validateOptions (cyclomatic 26) integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:919— CarbonParserUtil.validateOptions 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.
DropIndexCommand.dropIndex (cyclomatic 26) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/index/DropIndexCommand.scala:76— DropIndexCommand.dropIndex 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.
AggregatePushDown.transformAggregate (cyclomatic 26) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/AggregatePushDown.scala:83— AggregatePushDown.transformAggregate 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.
DataTypeUtil.getDataBasedOnDataTypeForNoDictionaryColumn (cyclomatic 25) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:716— DataTypeUtil.getDataBasedOnDataTypeForNoDictionaryColumn 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.
DataLoadProcessBuilder.getReArrangedDataFields (cyclomatic 25) processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:321— DataLoadProcessBuilder.getReArrangedDataFields 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.
CarbonTableCompactor.triggerCompaction (cyclomatic 25) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonTableCompactor.scala:204— CarbonTableCompactor.triggerCompaction 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.
CarbonIndexUtil.processSIRepair (cyclomatic 25) integration/spark/src/main/scala/org/apache/spark/sql/index/CarbonIndexUtil.scala:497— CarbonIndexUtil.processSIRepair 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.
CarbonFilters.transformExpression (cyclomatic 25) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala:462— CarbonFilters.transformExpression has cyclomatic complexity 25 (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. This is NOT this file's highest cyclomatic complexity: CarbonFilters.translateExpression (cyclomatic 42) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
TableSchemaBuilder.addColumn (cyclomatic 24) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchemaBuilder.java:163— TableSchemaBuilder.addColumn has cyclomatic complexity 24 (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.
CarbonInputFormat.getPrunedBlocklets (cyclomatic 24) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java:540— CarbonInputFormat.getPrunedBlocklets has cyclomatic complexity 24 (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.
DataTypeUtil.convertHiveTypeToCarbon (cyclomatic 24) integration/hive/src/main/java/org/apache/carbondata/hive/util/DataTypeUtil.java:33— DataTypeUtil.convertHiveTypeToCarbon has cyclomatic complexity 24 (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.
AvroCarbonWriter.prepareSubFields (cyclomatic 24) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:645— AvroCarbonWriter.prepareSubFields has cyclomatic complexity 24 (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.
CarbonInsertIntoCommand.processData (cyclomatic 24) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:126— CarbonInsertIntoCommand.processData has cyclomatic complexity 24 (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.
CarbonDataset.__init__ (cyclomatic 24) python/pycarbon/core/carbon.py:32— CarbonDataset.__init__ has cyclomatic complexity 24 (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.
ColumnPage.newPage (cyclomatic 23) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:177— ColumnPage.newPage has cyclomatic complexity 23 (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.
SegmentStatusManager.getValidAndInvalidSegments (cyclomatic 23) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:137— SegmentStatusManager.getValidAndInvalidSegments 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.
DataTypeUtil.getDataBasedOnDataType (cyclomatic 23) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:814— DataTypeUtil.getDataBasedOnDataType 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.
TableFieldStat.<init> (cyclomatic 23) processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/TableFieldStat.java:97— TableFieldStat.<init> 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.
AvroCarbonWriter.avroFieldToObject (cyclomatic 23) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:184— AvroCarbonWriter.avroFieldToObject 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.
GroupbyGroupbySelectOnlyChildDelta.apply (cyclomatic 23) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1082— GroupbyGroupbySelectOnlyChildDelta.apply 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.
ColumnPage.decompress (cyclomatic 22) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:788— ColumnPage.decompress has cyclomatic complexity 22 (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.
FilterUtil.createFilterExecutorTree (cyclomatic 22) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:119— FilterUtil.createFilterExecutorTree 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.
SortState.mergeHi (cyclomatic 22) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:833— SortState.mergeHi 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. This shape REPEATS in the file: one other method here (SortState.mergeLo) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SortState.mergeLo (cyclomatic 22) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:706— SortState.mergeLo 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. This shape REPEATS in the file: one other method here (SortState.mergeHi) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CarbonDataMergerUtil.identifySegmentsToBeMergedBasedOnSegCount (cyclomatic 22) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:610— CarbonDataMergerUtil.identifySegmentsToBeMergedBasedOnSegCount 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.
CarbonStreamRecordWriter.write (cyclomatic 22) streaming/src/main/java/org/apache/carbondata/streaming/CarbonStreamRecordWriter.java:208— CarbonStreamRecordWriter.write 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.
CarbonWriterBuilder.buildTableSchema (cyclomatic 22) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:1053— CarbonWriterBuilder.buildTableSchema 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.
MVRefresher.getSpecificSegmentsTobeLoaded (cyclomatic 22) integration/spark/src/main/scala/org/apache/carbondata/view/MVRefresher.scala:258— MVRefresher.getSpecificSegmentsTobeLoaded 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.
CarbonAddLoadCommand.processMetadata (cyclomatic 22) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAddLoadCommand.scala:74— CarbonAddLoadCommand.processMetadata 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.
BroadCastSIFilterPushJoin.addInFilterToPlan (cyclomatic 22) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/joins/BroadCastSIFilterPushJoin.scala:150— BroadCastSIFilterPushJoin.addInFilterToPlan has cyclomatic complexity 22 (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.
FieldConverter.objectToString (cyclomatic 22) streaming/src/main/scala/org/apache/carbondata/streaming/parser/FieldConverter.scala:41— FieldConverter.objectToString 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.
CarbonInternalLoaderUtil.recordLoadMetadata (cyclomatic 21) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:91— CarbonInternalLoaderUtil.recordLoadMetadata 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.
AvroCarbonWriter.avroFieldToObjectForUnionType (cyclomatic 21) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:405— AvroCarbonWriter.avroFieldToObjectForUnionType 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.
CarbonShowCacheCommand.getAllTablesCache (cyclomatic 21) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/cache/CarbonShowCacheCommand.scala:150— CarbonShowCacheCommand.getAllTablesCache 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.
CarbonCreateIndexCommand.processMetadata (cyclomatic 21) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/index/CarbonCreateIndexCommand.scala:62— CarbonCreateIndexCommand.processMetadata 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.
DeleteExecution.deleteDeltaExecutionInternal (cyclomatic 21) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/DeleteExecution.scala:94— DeleteExecution.deleteDeltaExecutionInternal 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.
CarbonDescribeFormattedCommand.processMetadata (cyclomatic 21) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDescribeFormattedCommand.scala:52— CarbonDescribeFormattedCommand.processMetadata 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.
CarbonInternalMetastore.refreshIndexInfo (cyclomatic 21) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/hive/CarbonInternalMetastore.scala:151— CarbonInternalMetastore.refreshIndexInfo 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.
DataTypes.valueOf (cyclomatic 20) core/src/main/java/org/apache/carbondata/core/metadata/datatype/DataTypes.java:75— DataTypes.valueOf has cyclomatic complexity 20 (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.
RangeExpressionEvaluator.replaceWithRangeExpression (cyclomatic 20) core/src/main/java/org/apache/carbondata/core/scan/expression/RangeExpressionEvaluator.java:109— RangeExpressionEvaluator.replaceWithRangeExpression 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.
RowLevelRangeGreaterThanFilterExecutorImpl.applyFilter (cyclomatic 20) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:274— RowLevelRangeGreaterThanFilterExecutorImpl.applyFilter 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.
DataTypeUtil.valueOf (cyclomatic 20) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:1096— DataTypeUtil.valueOf has cyclomatic complexity 20 (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.
CarbonLoaderUtil.assignBlocksByDataLocality (cyclomatic 20) processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:893— CarbonLoaderUtil.assignBlocksByDataLocality 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.
HiveDataTypeUtils.convertCarbonDataTypeToHive (cyclomatic 20) integration/hive/src/main/java/org/apache/carbondata/hive/HiveDataTypeUtils.java:37— HiveDataTypeUtils.convertCarbonDataTypeToHive has cyclomatic complexity 20 (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.
VectorizedCarbonRecordReader.initBatch (cyclomatic 20) integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/VectorizedCarbonRecordReader.java:217— VectorizedCarbonRecordReader.initBatch 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.
MVRefresher.refresh (cyclomatic 20) integration/spark/src/main/scala/org/apache/carbondata/view/MVRefresher.scala:59— MVRefresher.refresh 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.
CarbonParserUtil.extractDimAndMsrFields (cyclomatic 20) integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:650— CarbonParserUtil.extractDimAndMsrFields has cyclomatic complexity 20 (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.
GroupbyGroupbyNoChildDelta.apply (cyclomatic 20) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:887— GroupbyGroupbyNoChildDelta.apply 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.
SelectSelectGroupbyChildDelta.doTopSelectTranslation (cyclomatic 20) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1306— SelectSelectGroupbyChildDelta.doTopSelectTranslation 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.
MVRewrite.rewrite (cyclomatic 20) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:234— MVRewrite.rewrite 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.
CarbonFilesystemResolver.__init__ (cyclomatic 20) python/pycarbon/core/carbon_fs_utils.py:27— CarbonFilesystemResolver.__init__ 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.
SafeFixLengthColumnPage.ensureArraySize (cyclomatic 19) core/src/main/java/org/apache/carbondata/core/datastore/page/SafeFixLengthColumnPage.java:426— SafeFixLengthColumnPage.ensureArraySize 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.
DecimalIntConverter.fillVector (cyclomatic 19) core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:113— DecimalIntConverter.fillVector 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.
Field.<init> (cyclomatic 19) core/src/main/java/org/apache/carbondata/core/metadata/datatype/Field.java:52— Field.<init> 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.
CarbonUpdateUtil.cleanUpDeltaFiles (cyclomatic 19) core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:713— CarbonUpdateUtil.cleanUpDeltaFiles has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CarbonUpdateUtil.updateTableMetadataStatus (cyclomatic 19) core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:273— CarbonUpdateUtil.updateTableMetadataStatus 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.
RangeValueFilterExecutorImpl.isScanRequired (cyclomatic 19) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:265— RangeValueFilterExecutorImpl.isScanRequired 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.
RangeValueFilterExecutorImpl.setFilteredIndexToBitSet (cyclomatic 19) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:564— RangeValueFilterExecutorImpl.setFilteredIndexToBitSet 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.
RowLevelRangeGreaterThanEqualFilterExecutorImpl.applyFilter (cyclomatic 19) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:216— RowLevelRangeGreaterThanEqualFilterExecutorImpl.applyFilter 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.
CarbonUtil.getDataSizeAndIndexSize (cyclomatic 19) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2507— CarbonUtil.getDataSizeAndIndexSize 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. This is NOT this file's highest cyclomatic complexity: CarbonUtil.delimiterConverter (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
CarbonIndexFileMergeWriter.writeMergeIndexFileBasedOnSegmentFile (cyclomatic 19) core/src/main/java/org/apache/carbondata/core/writer/CarbonIndexFileMergeWriter.java:227— CarbonIndexFileMergeWriter.writeMergeIndexFileBasedOnSegmentFile 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.
CarbonLoadModelBuilder.build (cyclomatic 19) processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModelBuilder.java:147— CarbonLoadModelBuilder.build 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.
WritableReadSupport.createWritablePrimitive (cyclomatic 19) integration/hive/src/main/java/org/apache/carbondata/hive/WritableReadSupport.java:209— WritableReadSupport.createWritablePrimitive 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.
SecondaryIndexQueryResultProcessor.prepareRowObjectForSorting (cyclomatic 19) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/query/SecondaryIndexQueryResultProcessor.java:261— SecondaryIndexQueryResultProcessor.prepareRowObjectForSorting 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.
CarbonScanRDD.internalGetPartitions (cyclomatic 19) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:115— CarbonScanRDD.internalGetPartitions 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.
CarbonCreateMVCommand.checkTimeSeriesQuery (cyclomatic 19) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/view/CarbonCreateMVCommand.scala:632— CarbonCreateMVCommand.checkTimeSeriesQuery 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.
CarbonPlanHelper.makeDeterministic (cyclomatic 19) integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonPlanHelper.scala:197— CarbonPlanHelper.makeDeterministic 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.
CarbonFilters.translateUDF (cyclomatic 19) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala:224— CarbonFilters.translateUDF 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. This is NOT this file's highest cyclomatic complexity: CarbonFilters.translateExpression (cyclomatic 42) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
MVMatchPattern.factorOutSubsumer (cyclomatic 19) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:78— MVMatchPattern.factorOutSubsumer has cyclomatic complexity 19 (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.
MVRewrite.getRolledUpModularPlan (cyclomatic 19) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:122— MVRewrite.getRolledUpModularPlan 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.
SparkTypeConverter.convertCarbonToSparkDataType (cyclomatic 19) integration/spark/src/main/scala/org/apache/spark/sql/util/SparkTypeConverter.scala:56— SparkTypeConverter.convertCarbonToSparkDataType has cyclomatic complexity 19 (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.
AlterTableUtil.modifyTableProperties (cyclomatic 19) integration/spark/src/main/scala/org/apache/spark/util/AlterTableUtil.scala:422— AlterTableUtil.modifyTableProperties 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.
AddSubquery.apply (cyclomatic 19) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuilder.scala:143— AddSubquery.apply has cyclomatic complexity 19 (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.
ColumnPage.compress (cyclomatic 18) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:743— ColumnPage.compress 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.
ThriftWrapperSchemaConverterImpl.fromWrapperToExternalDataType (cyclomatic 18) core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:134— ThriftWrapperSchemaConverterImpl.fromWrapperToExternalDataType 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.
Encoding.valueOf (cyclomatic 18) core/src/main/java/org/apache/carbondata/core/metadata/encoder/Encoding.java:44— Encoding.valueOf 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.
NonDictionaryFieldConverterImpl.convert (cyclomatic 18) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/NonDictionaryFieldConverterImpl.java:63— NonDictionaryFieldConverterImpl.convert 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.
RowResultMergerProcessor.execute (cyclomatic 18) processing/src/main/java/org/apache/carbondata/processing/merger/RowResultMergerProcessor.java:109— RowResultMergerProcessor.execute 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.
TablePage.<init> (cyclomatic 18) processing/src/main/java/org/apache/carbondata/processing/store/TablePage.java:91— TablePage.<init> 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.
CarbonLoaderUtil.nodeBlockMapping (cyclomatic 18) processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:546— CarbonLoaderUtil.nodeBlockMapping 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.
LuceneIndexWriter.addField (cyclomatic 18) index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneIndexWriter.java:244— LuceneIndexWriter.addField 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.
CarbonScanRDD.internalCompute (cyclomatic 18) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:461— CarbonScanRDD.internalCompute 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.
CarbonMergeFilesRDD.mergeIndexFiles (cyclomatic 18) integration/spark/src/main/scala/org/apache/spark/rdd/CarbonMergeFilesRDD.scala:70— CarbonMergeFilesRDD.mergeIndexFiles 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.
CarbonBuilder.getOrCreateCarbonSession (cyclomatic 18) integration/spark/src/main/scala/org/apache/spark/sql/CarbonSession.scala:175— CarbonBuilder.getOrCreateCarbonSession 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.
CarbonInsertIntoHadoopFsRelationCommand.run (cyclomatic 18) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoHadoopFsRelationCommand.scala:68— CarbonInsertIntoHadoopFsRelationCommand.run 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.
CarbonProjectForDeleteCommand.processData (cyclomatic 18) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/CarbonProjectForDeleteCommand.scala:55— CarbonProjectForDeleteCommand.processData 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.
CarbonAlterTableDropColumnCommand.processMetadata (cyclomatic 18) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableDropColumnCommand.scala:43— CarbonAlterTableDropColumnCommand.processMetadata 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.
SegmentFileStore.cleanSegments (cyclomatic 17) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:1093— SegmentFileStore.cleanSegments 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.
NotInExpression.evaluate (cyclomatic 17) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpression.java:42— NotInExpression.evaluate 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.
RowLevelRangeLessThanEqualFilterExecutorImpl.applyFilter (cyclomatic 17) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:216— RowLevelRangeLessThanEqualFilterExecutorImpl.applyFilter 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.
CarbonColumnVectorImpl.getData (cyclomatic 17) core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/CarbonColumnVectorImpl.java:301— CarbonColumnVectorImpl.getData 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.
DeleteLoadFolders.physicalFactAndMeasureMetadataDeletion (cyclomatic 17) core/src/main/java/org/apache/carbondata/core/util/DeleteLoadFolders.java:106— DeleteLoadFolders.physicalFactAndMeasureMetadataDeletion 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.
CarbonTableInputFormat.getBlockRowCount (cyclomatic 17) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java:438— CarbonTableInputFormat.getBlockRowCount 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.
CarbonTableInputFormat.getFilteredSegment (cyclomatic 17) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java:224— CarbonTableInputFormat.getFilteredSegment 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.
StreamRecordReader.initialize (cyclomatic 17) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:126— StreamRecordReader.initialize 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.
CarbonCompactionUtil.getOverallMinMax (cyclomatic 17) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:457— CarbonCompactionUtil.getOverallMinMax 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.
CarbonReader.getFormattedData (cyclomatic 17) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java:135— CarbonReader.getFormattedData 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.
CarbonWriterBuilder.withLoadOptions (cyclomatic 17) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:226— CarbonWriterBuilder.withLoadOptions 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.
CarbonStreamerConfig.setConfigsToCarbonProperty (cyclomatic 17) integration/spark/src/main/scala/org/apache/carbondata/streamer/CarbonStreamerConfig.scala:177— CarbonStreamerConfig.setConfigsToCarbonProperty has cyclomatic complexity 17 (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.
MergeIndexEventListener.onEvent (cyclomatic 17) integration/spark/src/main/scala/org/apache/spark/sql/events/MergeIndexEventListener.scala:44— MergeIndexEventListener.onEvent 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.
TableNewProcessor.process (cyclomatic 17) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala:706— TableNewProcessor.process 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.
CarbonAddLoadCommand.writeMetaForSegment (cyclomatic 17) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAddLoadCommand.scala:227— CarbonAddLoadCommand.writeMetaForSegment 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.
CarbonAlterTableCompactionCommand.processData (cyclomatic 17) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala:93— CarbonAlterTableCompactionCommand.processData 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.
CarbonAlterTableRenameCommand.processMetadata (cyclomatic 17) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableRenameCommand.scala:46— CarbonAlterTableRenameCommand.processMetadata 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.
CarbonIUDAnalysisRule.processUpdateQuery (cyclomatic 17) REDACTED:52— CarbonIUDAnalysisRule.processUpdateQuery has cyclomatic complexity 17 (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.
SelectSelectGroupbyChildDelta.apply (cyclomatic 17) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1445— SelectSelectGroupbyChildDelta.apply has cyclomatic complexity 17 (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.
SecondaryIndexUtil.triggerCompaction (cyclomatic 17) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/util/SecondaryIndexUtil.scala:159— SecondaryIndexUtil.triggerCompaction 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.
SQLFragmentCompactPrinter.printFragment (cyclomatic 17) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/Printers.scala:249— SQLFragmentCompactPrinter.printFragment 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.
carbon_reader.make_carbon_reader (cyclomatic 17) python/pycarbon/core/carbon_reader.py:47— carbon_reader.make_carbon_reader 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.
AdaptiveCodec.getPageBasedOnDataType (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveCodec.java:83— AdaptiveCodec.getPageBasedOnDataType has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (AdaptiveCodec.putDataToPage) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AdaptiveCodec.putDataToPage (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveCodec.java:123— AdaptiveCodec.putDataToPage has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (AdaptiveCodec.getPageBasedOnDataType) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ColumnPage.getPageLengthInBytes (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:703— ColumnPage.getPageLengthInBytes 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.
EqualToExpression.evaluate (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpression.java:44— EqualToExpression.evaluate 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.
NotEqualsExpression.evaluate (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotEqualsExpression.java:43— NotEqualsExpression.evaluate 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.
ExpressionResult.equals (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:489— ExpressionResult.equals 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.
RangeValueFilterExecutorImpl.setFilteredIndexToBitSetWithColumnIndex (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:462— RangeValueFilterExecutorImpl.setFilteredIndexToBitSetWithColumnIndex 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.
RowLevelRangeLessThanFilterExecutorImpl.applyFilter (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:213— RowLevelRangeLessThanFilterExecutorImpl.applyFilter 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.
RowLevelRangeLessThanFilterExecutorImpl.setFilteredIndexToBitSet (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:532— RowLevelRangeLessThanFilterExecutorImpl.setFilteredIndexToBitSet 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.
ConditionalFilterResolverImpl.resolve (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/ConditionalFilterResolverImpl.java:67— ConditionalFilterResolverImpl.resolve 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.
CarbonUtil.compareMeasureData (cyclomatic 16) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1028— CarbonUtil.compareMeasureData 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. This is NOT this file's highest cyclomatic complexity: CarbonUtil.delimiterConverter (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
CarbonOutputCommitter.commitJob (cyclomatic 16) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonOutputCommitter.java:106— CarbonOutputCommitter.commitJob 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.
StreamRecordReader.readRawRowFromStream (cyclomatic 16) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:539— StreamRecordReader.readRawRowFromStream 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.
MeasureFieldConverterImpl.convert (cyclomatic 16) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/MeasureFieldConverterImpl.java:65— MeasureFieldConverterImpl.convert 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.
InputProcessorIterator.convertToNoDictionaryToBytes (cyclomatic 16) processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:367— InputProcessorIterator.convertToNoDictionaryToBytes 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.
CarbonDataMergerUtil.identifySegmentsToBeMergedBasedOnLoadedDate (cyclomatic 16) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:380— CarbonDataMergerUtil.identifySegmentsToBeMergedBasedOnLoadedDate 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.
CarbonDataProcessorUtil.getColumnIdxBasedOnSchemaInRowAsDataFieldOrder (cyclomatic 16) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:562— CarbonDataProcessorUtil.getColumnIdxBasedOnSchemaInRowAsDataFieldOrder 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.
BloomCoarseGrainIndex.createQueryModel (cyclomatic 16) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndex.java:203— BloomCoarseGrainIndex.createQueryModel 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.
ColumnVectorProxy.putRowToColumnBatch (cyclomatic 16) integration/spark/src/main/java/org/apache/spark/sql/CarbonVectorProxy.java:151— ColumnVectorProxy.putRowToColumnBatch 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.
ArrowWriter.createFieldWriter (cyclomatic 16) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/arrow/ArrowWriter.java:100— ArrowWriter.createFieldWriter 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.
CarbonReaderBuilder.prepareFileInputFormat (cyclomatic 16) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java:292— CarbonReaderBuilder.prepareFileInputFormat 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.
CarbonHiveMetastoreListener.onEvent (cyclomatic 16) integration/hive/src/main/scala/org/apache/carbondata/hive/CarbonHiveMetastoreListener.scala:31— CarbonHiveMetastoreListener.onEvent 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.
TableStatusRecovery.main (cyclomatic 16) integration/spark/src/main/scala/org/apache/carbondata/recovery/tablestatus/TableStatusRecovery.scala:40— TableStatusRecovery.main 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.
CarbonMergeDataSetUtil.getFilesToScan (cyclomatic 16) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetUtil.scala:243— CarbonMergeDataSetUtil.getFilesToScan 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.
CarbonDropTableCommand.processMetadata (cyclomatic 16) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDropTableCommand.scala:54— CarbonDropTableCommand.processMetadata 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.
CarbonSetCommand.validateAndSetValue (cyclomatic 16) integration/spark/src/main/scala/org/apache/spark/sql/hive/execution/command/CarbonHiveCommands.scala:111— CarbonSetCommand.validateAndSetValue 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.
CarbonSpark2SqlParser.splitQuery (cyclomatic 16) integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala:431— CarbonSpark2SqlParser.splitQuery 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.
CarbonSecondaryIndexOptimizer.createIndexFilterDataFrame (cyclomatic 16) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:251— CarbonSecondaryIndexOptimizer.createIndexFilterDataFrame 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.
LogicalPlanRule.apply (cyclomatic 16) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/LogicalPlanSignatureGenerator.scala:56— LogicalPlanRule.apply 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.
TodoComment repeated across 13 files integration/spark/src/test/scala/org/apache/spark/sql/carbondata/datasource/TestCreateTableUsingSparkCarbonFileFormat.scala:129— The identical TodoComment appears in 13 files (19 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 19 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
StreamRecordReader.readRowFromStream (cognitive 180) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:355— StreamRecordReader.readRowFromStream has cognitive complexity 180 (threshold 15). Drivers by points: if/else 64 (177 pts), loops 3 (nesting depth added 113). 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.
1.fillVector (cognitive 150) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:327— 1.fillVector has cognitive complexity 150 (threshold 15). Drivers by points: loops 29 (87 pts), if/else 41 (61 pts), boolean chains 2 (nesting depth added 78). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
1.fillPrimitiveType (cognitive 150) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:328— 1.fillPrimitiveType has cognitive complexity 150 (threshold 15). Drivers by points: if/else 51 (75 pts), loops 24 (70 pts), boolean chains 5 (nesting depth added 70). 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.
ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.convert (cognitive 141) core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:87— ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.convert has cognitive complexity 141 (threshold 15). Drivers by points: if/else 38 (108 pts), loops 9 (29 pts), boolean chains 4 (nesting depth added 90). 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.
MVMatchPattern.doMatch (cognitive 132) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:305— MVMatchPattern.doMatch has cognitive complexity 132 (threshold 15). Drivers by points: if/else 48 (90 pts), boolean chains 23, match/switch 9 (19 pts) (nesting depth added 52). 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.
SelectSelectNoChildDelta.apply (cognitive 115) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:660— SelectSelectNoChildDelta.apply has cognitive complexity 115 (threshold 15). Drivers by points: if/else 27 (54 pts), match/switch 10 (35 pts), boolean chains 26 (nesting depth added 52). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
1.fillVector (cognitive 113) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:302— 1.fillVector has cognitive complexity 113 (threshold 15). Drivers by points: loops 24 (71 pts), if/else 35 (40 pts), boolean chains 2 (nesting depth added 52). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CarbonMergerRDD.internalGetPartitions (cognitive 110) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:281— CarbonMergerRDD.internalGetPartitions has cognitive complexity 110 (threshold 15). Drivers by points: if/else 38 (79 pts), loops 6 (14 pts), boolean chains 11, error handling 3 (6 pts) (nesting depth added 52). 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.
CarbonDataRDDFactory.loadCarbonData (cognitive 106) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala:283— CarbonDataRDDFactory.loadCarbonData has cognitive complexity 106 (threshold 15). Drivers by points: if/else 38 (81 pts), boolean chains 18, match/switch 1 (4 pts), error handling 2 (3 pts) (nesting depth added 47). 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.
RowLevelFilterExecutorImpl.applyFilter (cognitive 91) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:196— RowLevelFilterExecutorImpl.applyFilter has cognitive complexity 91 (threshold 15). Drivers by points: if/else 23 (50 pts), loops 8 (25 pts), error handling 2 (10 pts), boolean chains 6 (nesting depth added 52). 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.
CarbonUtil.setLocalDictColumnsToWrapperSchema (cognitive 90) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2927— CarbonUtil.setLocalDictColumnsToWrapperSchema has cognitive complexity 90 (threshold 15). Drivers by points: if/else 25 (73 pts), boolean chains 10, loops 2 (7 pts) (nesting depth added 53). 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.
SecondaryIndexCreator.createSecondaryIndex (cognitive 89) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/rdd/SecondaryIndexCreator.scala:66— SecondaryIndexCreator.createSecondaryIndex has cognitive complexity 89 (threshold 15). Drivers by points: if/else 37 (59 pts), match/switch 4 (14 pts), loops 4 (8 pts), boolean chains 7, error handling 1 (nesting depth added 36). 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.
FilterExecutorUtil.executeIncludeExcludeFilterForMeasure (cognitive 87) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExecutorUtil.java:57— FilterExecutorUtil.executeIncludeExcludeFilterForMeasure has cognitive complexity 87 (threshold 15). Drivers by points: if/else 26 (67 pts), loops 10 (20 pts) (nesting depth added 51). 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.
CarbonMergeDataSetCommand.processData (cognitive 82) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetCommand.scala:85— CarbonMergeDataSetCommand.processData has cognitive complexity 82 (threshold 15). Drivers by points: if/else 42 (59 pts), boolean chains 14, match/switch 6 (9 pts) (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.
CarbonCreateSecondaryIndexCommand.processData (cognitive 78) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/command/SICreationCommand.scala:83— CarbonCreateSecondaryIndexCommand.processData has cognitive complexity 78 (threshold 15). Drivers by points: if/else 43 (56 pts), boolean chains 14, error handling 4 (5 pts), loops 1 (3 pts) (nesting depth added 16). 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.
CarbonLoaderUtil.recordNewLoadMetadata (cognitive 73) processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:234— CarbonLoaderUtil.recordNewLoadMetadata has cognitive complexity 73 (threshold 15). Drivers by points: if/else 22 (50 pts), loops 5 (16 pts), boolean chains 7 (nesting depth added 39). 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.
RowLevelRangeGreaterThanEqualFilterExecutorImpl.applyFilter (cognitive 71) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:216— RowLevelRangeGreaterThanEqualFilterExecutorImpl.applyFilter has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (65 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 46). 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.
RowLevelRangeGreaterThanFilterExecutorImpl.applyFilter (cognitive 71) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:274— RowLevelRangeGreaterThanFilterExecutorImpl.applyFilter has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (65 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 46). 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.
RangeExpressionEvaluator.replaceWithRangeExpression (cognitive 69) core/src/main/java/org/apache/carbondata/core/scan/expression/RangeExpressionEvaluator.java:109— RangeExpressionEvaluator.replaceWithRangeExpression has cognitive complexity 69 (threshold 15). Drivers by points: if/else 13 (55 pts), loops 3 (9 pts), boolean chains 5 (nesting depth added 48). 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.
AlterTableColumnSchemaGenerator.process (cognitive 67) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala:293— AlterTableColumnSchemaGenerator.process has cognitive complexity 67 (threshold 15). Drivers by points: if/else 32 (54 pts), boolean chains 10, loops 2 (3 pts) (nesting depth added 23). 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.
GroupbyGroupbyNoChildDelta.apply (cognitive 67) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:887— GroupbyGroupbyNoChildDelta.apply has cognitive complexity 67 (threshold 15). Drivers by points: match/switch 8 (33 pts), if/else 17 (29 pts), boolean chains 5 (nesting depth added 37). 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
MVRefresher.getSpecificSegmentsTobeLoaded (cognitive 66) integration/spark/src/main/scala/org/apache/carbondata/view/MVRefresher.scala:258— MVRefresher.getSpecificSegmentsTobeLoaded has cognitive complexity 66 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 7 (23 pts), boolean chains 3 (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.
CarbonSecondaryIndexOptimizer.transformFilterToJoin (cognitive 66) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:736— CarbonSecondaryIndexOptimizer.transformFilterToJoin has cognitive complexity 66 (threshold 15). Drivers by points: if/else 28 (52 pts), boolean chains 8, match/switch 4 (6 pts) (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonAlterTableColRenameDataTypeChangeCommand.processMetadata (cognitive 65) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableColRenameDataTypeChangeCommand.scala:88— CarbonAlterTableColRenameDataTypeChangeCommand.processMetadata has cognitive complexity 65 (threshold 15). Drivers by points: if/else 37 (57 pts), boolean chains 7, error handling 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.
CommonLoadUtils.loadDataWithPartition (cognitive 62) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:869— CommonLoadUtils.loadDataWithPartition has cognitive complexity 62 (threshold 15). Drivers by points: if/else 30 (44 pts), boolean chains 6, loops 2 (6 pts), match/switch 2 (4 pts), error handling 2 (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.
CarbonIndexUtil.processSIRepair (cognitive 60) integration/spark/src/main/scala/org/apache/spark/sql/index/CarbonIndexUtil.scala:497— CarbonIndexUtil.processSIRepair has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (46 pts), boolean chains 6, error handling 2 (5 pts), match/switch 1 (3 pts) (nesting depth added 35). 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.
CarbonLoaderUtil.assignBlocksByDataLocality (cognitive 59) processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:893— CarbonLoaderUtil.assignBlocksByDataLocality has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (48 pts), error handling 1 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 36). 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.
AvroCarbonWriter.avroFieldToObjectForUnionType (cognitive 59) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:405— AvroCarbonWriter.avroFieldToObjectForUnionType has cognitive complexity 59 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 4 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 38). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
MVRewrite.updatePlan (cognitive 59) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:734— MVRewrite.updatePlan has cognitive complexity 59 (threshold 15). Drivers by points: if/else 17 (27 pts), match/switch 7 (19 pts), loops 3 (9 pts), boolean chains 4 (nesting depth added 28). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DropIndexCommand.dropIndex (cognitive 58) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/index/DropIndexCommand.scala:76— DropIndexCommand.dropIndex has cognitive complexity 58 (threshold 15). Drivers by points: if/else 21 (44 pts), error handling 3 (8 pts), boolean chains 6 (nesting depth added 28). 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.
GroupbyGroupbySelectOnlyChildDelta.apply (cognitive 58) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1082— GroupbyGroupbySelectOnlyChildDelta.apply has cognitive complexity 58 (threshold 15). Drivers by points: match/switch 9 (28 pts), if/else 14 (23 pts), boolean chains 7 (nesting depth added 28). 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DeleteLoadFolders.physicalFactAndMeasureMetadataDeletion (cognitive 57) core/src/main/java/org/apache/carbondata/core/util/DeleteLoadFolders.java:106— DeleteLoadFolders.physicalFactAndMeasureMetadataDeletion has cognitive complexity 57 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 4 (11 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 38). 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.
TableFieldStat.<init> (cognitive 56) processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/TableFieldStat.java:97— TableFieldStat.<init> has cognitive complexity 56 (threshold 15). Drivers by points: if/else 23 (45 pts), loops 4 (7 pts), boolean chains 4 (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.
CarbonInputFormat.getPrunedBlocklets (cognitive 55) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java:540— CarbonInputFormat.getPrunedBlocklets has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 3 (11 pts), error handling 2 (5 pts), boolean chains 3, ternaries 2 (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.
RowLevelRangeLessThanEqualFilterExecutorImpl.applyFilter (cognitive 54) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:216— RowLevelRangeLessThanEqualFilterExecutorImpl.applyFilter has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (49 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 34). 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.
RowLevelRangeLessThanFilterExecutorImpl.applyFilter (cognitive 54) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:213— RowLevelRangeLessThanFilterExecutorImpl.applyFilter has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (49 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 34). 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.
CarbonStreamRecordWriter.write (cognitive 54) streaming/src/main/java/org/apache/carbondata/streaming/CarbonStreamRecordWriter.java:208— CarbonStreamRecordWriter.write has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (41 pts), loops 4 (8 pts), ternaries 1 (5 pts) (nesting depth added 27). 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.
CarbonTableCompactor.triggerCompaction (cognitive 54) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonTableCompactor.scala:204— CarbonTableCompactor.triggerCompaction has cognitive complexity 54 (threshold 15). Drivers by points: if/else 29 (50 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.
CarbonProjectForUpdateCommand.processData (cognitive 53) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/CarbonProjectForUpdateCommand.scala:59— CarbonProjectForUpdateCommand.processData has cognitive complexity 53 (threshold 15). Drivers by points: if/else 31 (43 pts), boolean chains 5, error handling 3 (4 pts), match/switch 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.
CarbonSparkSqlParserUtil.buildTableInfoFromCatalogTable (cognitive 53) integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSparkSqlParserUtil.scala:148— CarbonSparkSqlParserUtil.buildTableInfoFromCatalogTable has cognitive complexity 53 (threshold 15). Drivers by points: if/else 23 (41 pts), boolean chains 6, loops 1 (3 pts), error handling 1 (2 pts), match/switch 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.
SegmentStatusManager.getValidAndInvalidSegments (cognitive 51) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:137— SegmentStatusManager.getValidAndInvalidSegments has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (44 pts), boolean chains 5, error handling 1, loops 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.
AvroCarbonWriter.avroFieldToObject (cognitive 51) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:184— AvroCarbonWriter.avroFieldToObject has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (35 pts), loops 6 (15 pts), match/switch 1 (nesting depth added 32). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonUpdateUtil.updateTableMetadataStatus (cognitive 50) core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:273— CarbonUpdateUtil.updateTableMetadataStatus has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 2 (5 pts), boolean chains 3, error handling 1 (2 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.
RowLevelFilterExecutorImpl.createRow (cognitive 50) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:443— RowLevelFilterExecutorImpl.createRow has cognitive complexity 50 (threshold 15). Drivers by points: if/else 23 (41 pts), error handling 1 (3 pts), boolean chains 2, loops 2, ternaries 1 (2 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.
CarbonWriterBuilder.buildTableSchema (cognitive 50) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:1053— CarbonWriterBuilder.buildTableSchema has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 6 (12 pts), boolean chains 2 (nesting depth added 28). 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.
SelectSelectGroupbyChildDelta.doTopSelectTranslation (cognitive 50) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1306— SelectSelectGroupbyChildDelta.doTopSelectTranslation has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (25 pts), match/switch 7 (22 pts), boolean chains 3 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonDataset.__init__ (cognitive 50) python/pycarbon/core/carbon.py:32— CarbonDataset.__init__ has cognitive complexity 50 (threshold 15). Drivers by points: if/else 22 (36 pts), error handling 3 (7 pts), loops 2 (4 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.
MVRefresher.refresh (cognitive 49) integration/spark/src/main/scala/org/apache/carbondata/view/MVRefresher.scala:59— MVRefresher.refresh has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 3 (9 pts), boolean chains 4, error handling 1 (2 pts) (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.
SortState.mergeHi (cognitive 48) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:833— SortState.mergeHi has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 3 (5 pts), boolean chains 3, ternaries 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. This shape REPEATS in the file: one other method here (SortState.mergeLo) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SortState.mergeLo (cognitive 48) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:706— SortState.mergeLo has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 3 (5 pts), boolean chains 3, ternaries 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. This shape REPEATS in the file: one other method here (SortState.mergeHi) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CarbonMergeDataSetCommand.generateStatusColumnWithAllCombinations (cognitive 48) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetCommand.scala:686— CarbonMergeDataSetCommand.generateStatusColumnWithAllCombinations has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (41 pts), match/switch 1 (4 pts), loops 2 (3 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.
CarbonInternalMetastore.refreshIndexInfo (cognitive 48) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/hive/CarbonInternalMetastore.scala:151— CarbonInternalMetastore.refreshIndexInfo has cognitive complexity 48 (threshold 15). Drivers by points: if/else 22 (42 pts), boolean chains 4, error handling 1 (2 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.
DataLoadProcessBuilder.getReArrangedDataFields (cognitive 47) processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:321— DataLoadProcessBuilder.getReArrangedDataFields has cognitive complexity 47 (threshold 15). Drivers by points: if/else 20 (34 pts), loops 5 (10 pts), boolean chains 3 (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.
MVRewrite.rewrite (cognitive 47) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:234— MVRewrite.rewrite has cognitive complexity 47 (threshold 15). Drivers by points: match/switch 7 (31 pts), if/else 6 (16 pts) (nesting depth added 34). 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RangeValueFilterExecutorImpl.setFilteredIndexToBitSet (cognitive 46) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:564— RangeValueFilterExecutorImpl.setFilteredIndexToBitSet has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (42 pts), boolean chains 2, loops 1 (2 pts) (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.
PrimitiveDataType.writeByteArray (cognitive 46) processing/src/main/java/org/apache/carbondata/processing/datatypes/PrimitiveDataType.java:239— PrimitiveDataType.writeByteArray has cognitive complexity 46 (threshold 15). Drivers by points: if/else 22 (35 pts), boolean chains 10, error handling 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.
MergeIndexEventListener.onEvent (cognitive 46) integration/spark/src/main/scala/org/apache/spark/sql/events/MergeIndexEventListener.scala:44— MergeIndexEventListener.onEvent has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (43 pts), boolean chains 2, match/switch 1 (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonInternalLoaderUtil.recordLoadMetadata (cognitive 45) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:91— CarbonInternalLoaderUtil.recordLoadMetadata has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 6 (16 pts), boolean chains 3, error handling 1 (nesting depth added 23). 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.
CarbonReader.getFormattedData (cognitive 45) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java:135— CarbonReader.getFormattedData has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 3 (17 pts), boolean chains 3 (nesting depth added 28). 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.
CarbonCreateMVCommand.doCreate (cognitive 45) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/view/CarbonCreateMVCommand.scala:156— CarbonCreateMVCommand.doCreate has cognitive complexity 45 (threshold 15). Drivers by points: if/else 28 (37 pts), boolean chains 6, error handling 1, loops 1 (nesting depth added 9). 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.
TableSchemaBuilder.addColumn (cognitive 44) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchemaBuilder.java:163— TableSchemaBuilder.addColumn has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (30 pts), loops 3 (10 pts), boolean chains 4 (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.
CarbonUpdateUtil.cleanUpDeltaFiles (cognitive 44) core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:713— CarbonUpdateUtil.cleanUpDeltaFiles has cognitive complexity 44 (threshold 15). Drivers by points: loops 8 (22 pts), if/else 9 (19 pts), boolean chains 3 (nesting depth added 24). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RowLevelRangeLessThanFilterExecutorImpl.setFilteredIndexToBitSet (cognitive 44) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:532— RowLevelRangeLessThanFilterExecutorImpl.setFilteredIndexToBitSet has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 4 (10 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.
DataTypeUtil.createTimeInstant (cognitive 44) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:450— DataTypeUtil.createTimeInstant has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 9, loops 4 (6 pts) (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.
CarbonCreateMVCommand.checkTimeSeriesQuery (cognitive 44) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/view/CarbonCreateMVCommand.scala:632— CarbonCreateMVCommand.checkTimeSeriesQuery has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (27 pts), match/switch 4 (14 pts), boolean chains 3 (nesting depth added 27). 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.
CarbonDataMergerUtil.identifySegmentsToBeMergedBasedOnSegCount (cognitive 43) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:610— CarbonDataMergerUtil.identifySegmentsToBeMergedBasedOnSegCount has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (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.
MVRewrite.getRolledUpModularPlan (cognitive 43) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:122— MVRewrite.getRolledUpModularPlan has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (29 pts), match/switch 6 (13 pts), boolean chains 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.
CarbonIndexFileMergeWriter.writeMergeIndexFileBasedOnSegmentFile (cognitive 42) core/src/main/java/org/apache/carbondata/core/writer/CarbonIndexFileMergeWriter.java:227— CarbonIndexFileMergeWriter.writeMergeIndexFileBasedOnSegmentFile has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 6 (13 pts), error handling 2 (7 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.
TablePage.<init> (cognitive 42) processing/src/main/java/org/apache/carbondata/processing/store/TablePage.java:91— TablePage.<init> has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (37 pts), loops 4, boolean chains 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.
CarbonScanRDD.internalCompute (cognitive 42) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:461— CarbonScanRDD.internalCompute has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (34 pts), error handling 1 (3 pts), match/switch 1 (3 pts), boolean chains 2 (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.
RowLevelRangeLessThanEqualFilterExecutorImpl.setFilteredIndexToBitSet (cognitive 41) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:528— RowLevelRangeLessThanEqualFilterExecutorImpl.setFilteredIndexToBitSet has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 4 (10 pts), boolean chains 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.
SegmentFileStore.cleanSegments (cognitive 40) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:1093— SegmentFileStore.cleanSegments has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 5 (15 pts), boolean chains 4 (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.
RangeValueFilterExecutorImpl.applyNoAndDirectFilter (cognitive 40) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:373— RangeValueFilterExecutorImpl.applyNoAndDirectFilter has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (39 pts), loops 1 (nesting depth added 26). 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.
FilterExpressionProcessor.getFilterResolverBasedOnExpressionType (cognitive 40) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java:174— FilterExpressionProcessor.getFilterResolverBasedOnExpressionType has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 9, match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SessionParams.validateKeyValue (cognitive 40) core/src/main/java/org/apache/carbondata/core/util/SessionParams.java:128— SessionParams.validateKeyValue has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 4, error handling 1 (2 pts), match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SecondaryIndexQueryResultProcessor.prepareRowObjectForSorting (cognitive 40) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/query/SecondaryIndexQueryResultProcessor.java:261— SecondaryIndexQueryResultProcessor.prepareRowObjectForSorting has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 4 (10 pts), boolean chains 4 (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.
DMLStrategy.apply (cognitive 40) integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/DMLStrategy.scala:54— DMLStrategy.apply has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 6 (15 pts), boolean chains 7 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SelectSelectGroupbyChildDelta.apply (cognitive 40) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1445— SelectSelectGroupbyChildDelta.apply has cognitive complexity 40 (threshold 15). Drivers by points: match/switch 9 (28 pts), if/else 6 (7 pts), boolean chains 5 (nesting depth added 20). 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DecimalIntConverter.fillVector (cognitive 39) core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java:113— DecimalIntConverter.fillVector has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (33 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 16). 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.
CarbonTableInputFormat.getBlockRowCount (cognitive 39) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java:438— CarbonTableInputFormat.getBlockRowCount has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 4 (7 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 20). 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.
CarbonMergeFilesRDD.mergeIndexFiles (cognitive 39) integration/spark/src/main/scala/org/apache/spark/rdd/CarbonMergeFilesRDD.scala:70— CarbonMergeFilesRDD.mergeIndexFiles has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 4, error handling 1 (2 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.
CarbonPlanHelper.makeDeterministic (cognitive 39) integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonPlanHelper.scala:197— CarbonPlanHelper.makeDeterministic has cognitive complexity 39 (threshold 15). Drivers by points: match/switch 5 (17 pts), if/else 8 (16 pts), boolean chains 6 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DataTypeUtil.getDataBasedOnDataType (cognitive 38) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:312— DataTypeUtil.getDataBasedOnDataType has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (32 pts), error handling 3 (5 pts), boolean chains 1 (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.
DataTypeUtil.getDataBasedOnDataTypeForNoDictionaryColumn (cognitive 38) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:716— DataTypeUtil.getDataBasedOnDataTypeForNoDictionaryColumn has cognitive complexity 38 (threshold 15). Drivers by points: if/else 25 (36 pts), boolean chains 1, error handling 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.
CarbonInsertIntoCommand.getReArrangedLogicalPlan (cognitive 38) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:329— CarbonInsertIntoCommand.getReArrangedLogicalPlan has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 3 (8 pts), match/switch 2, boolean chains 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonCreateTableCommand.processMetadata (cognitive 38) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonCreateTableCommand.scala:47— CarbonCreateTableCommand.processMetadata has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (27 pts), error handling 3 (10 pts), boolean chains 1 (nesting depth added 22). 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.
CarbonFilesystemResolver.__init__ (cognitive 38) python/pycarbon/core/carbon_fs_utils.py:27— CarbonFilesystemResolver.__init__ has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 3 (6 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 18). 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.
VectorizedCarbonRecordReader.initBatch (cognitive 37) integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/VectorizedCarbonRecordReader.java:217— VectorizedCarbonRecordReader.initBatch has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 6 (10 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.
CastExpressionOptimization.typeCastStringToLong (cognitive 37) integration/spark/src/main/scala/org/apache/spark/sql/execution/CastExpressionOptimization.scala:43— CastExpressionOptimization.typeCastStringToLong has cognitive complexity 37 (threshold 15). Drivers by points: error handling 6 (24 pts), if/else 8 (12 pts), boolean chains 1 (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.
TableIndex.pruneWithFilter (cognitive 36) core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:206— TableIndex.pruneWithFilter has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 3 (7 pts), boolean chains 3 (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.
RestructureUtil.createDimensionInfoAndGetCurrentBlockQueryDimension (cognitive 36) core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:73— RestructureUtil.createDimensionInfoAndGetCurrentBlockQueryDimension has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 3 (7 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.
BlockletScannedResult.freeMemory (cognitive 36) core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java:692— BlockletScannedResult.freeMemory has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 5 (14 pts) (nesting depth added 23). 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.
CarbonUtil.calculateDataIndexSize (cognitive 36) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2423— CarbonUtil.calculateDataIndexSize has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 20). 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.
CarbonLoaderUtil.nodeBlockMapping (cognitive 36) processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:546— CarbonLoaderUtil.nodeBlockMapping has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (23 pts), ternaries 3 (8 pts), loops 3 (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.
CarbonAntlrSqlVisitor.visitMergeIntoCarbonTable (cognitive 36) integration/spark/src/main/java/org/apache/spark/sql/CarbonAntlrSqlVisitor.java:144— CarbonAntlrSqlVisitor.visitMergeIntoCarbonTable has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 3 (11 pts), loops 2 (5 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.
CarbonCreateIndexCommand.processMetadata (cognitive 35) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/index/CarbonCreateIndexCommand.scala:62— CarbonCreateIndexCommand.processMetadata has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (31 pts), boolean chains 4 (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.
CarbonInsertIntoCommand.processData (cognitive 35) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:126— CarbonInsertIntoCommand.processData has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 4, error handling 3 (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.
SegmentFileStore.getIndexAndMergeFiles (cognitive 34) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:948— SegmentFileStore.getIndexAndMergeFiles has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 2 (7 pts), boolean chains 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.
RowLevelRangeGreaterThanFilterExecutorImpl.setFilteredIndexToBitSet (cognitive 34) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:533— RowLevelRangeGreaterThanFilterExecutorImpl.setFilteredIndexToBitSet has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 4 (10 pts), boolean chains 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.
DataTypeUtil.getDataBasedOnDataType (cognitive 34) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:814— DataTypeUtil.getDataBasedOnDataType has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (28 pts), error handling 3 (5 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.
MVProvider.isViewCanBeEnabled (cognitive 34) core/src/main/java/org/apache/carbondata/core/view/MVProvider.java:346— MVProvider.isViewCanBeEnabled has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (6 pts) (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.
CarbonFileInputFormat.getSplits (cognitive 34) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonFileInputFormat.java:107— CarbonFileInputFormat.getSplits has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (26 pts), loops 3 (8 pts) (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.
AvroCarbonWriter.getMappingDataTypeForCollectionRecord (cognitive 34) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:749— AvroCarbonWriter.getMappingDataTypeForCollectionRecord has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonParserUtil.prepareTableModel (cognitive 34) integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:210— CarbonParserUtil.prepareTableModel has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 5 (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.
CarbonParserUtil.validateOptions (cognitive 34) integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:919— CarbonParserUtil.validateOptions has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 4, error handling 2 (4 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.
ColumnPageWrapper.getChunkDataInBytes (cognitive 33) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java:110— ColumnPageWrapper.getChunkDataInBytes has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 7 (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.
1.call (cognitive 33) core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:368— 1.call has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 16). 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.
SegmentStatusManager.deleteLoadsAndUpdateMetadata (cognitive 33) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:1124— SegmentStatusManager.deleteLoadsAndUpdateMetadata has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (32 pts), boolean chains 1 (nesting depth added 21). 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.
CarbonCompactionUtil.getOverallMinMax (cognitive 33) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:457— CarbonCompactionUtil.getOverallMinMax has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 2 (4 pts), boolean chains 2, error handling 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.
CarbonFactDataHandlerColumnar.needToCutThePage (cognitive 33) processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerColumnar.java:278— CarbonFactDataHandlerColumnar.needToCutThePage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (11 pts), boolean chains 1 (nesting depth added 22). 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.
CarbonShowCacheCommand.getAllTablesCache (cognitive 33) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/cache/CarbonShowCacheCommand.scala:150— CarbonShowCacheCommand.getAllTablesCache has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (17 pts), error handling 4 (6 pts), boolean chains 5, match/switch 2 (5 pts) (nesting depth added 7). 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.
DeleteExecution.deleteDeltaExecutionInternal (cognitive 33) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/DeleteExecution.scala:94— DeleteExecution.deleteDeltaExecutionInternal has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (24 pts), match/switch 2 (3 pts), boolean chains 2, error handling 2, loops 2 (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.
SecondaryIndexUtil.triggerCompaction (cognitive 33) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/util/SecondaryIndexUtil.scala:159— SecondaryIndexUtil.triggerCompaction has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (20 pts), error handling 3 (8 pts), boolean chains 5 (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.
AddSubquery.apply (cognitive 33) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuilder.scala:143— AddSubquery.apply has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 7 (18 pts), if/else 8 (13 pts), boolean chains 2 (nesting depth added 16). 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonTable.getIndexInfo (cognitive 32) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:1189— CarbonTable.getIndexInfo has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (14 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.
RestructureBasedRawResultCollector.fillNoDictionaryAndComplexKeyArrayBatchWithLatestSchema (cognitive 32) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedRawResultCollector.java:132— RestructureBasedRawResultCollector.fillNoDictionaryAndComplexKeyArrayBatchWithLatestSchema has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), error handling 1 (6 pts), loops 2 (3 pts), boolean chains 1 (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.
NonDictionaryFieldConverterImpl.convert (cognitive 32) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/NonDictionaryFieldConverterImpl.java:63— NonDictionaryFieldConverterImpl.convert has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 6, error handling 2 (4 pts) (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.
BadRecordsLogger.addBadRecordsToBuilder (cognitive 32) processing/src/main/java/org/apache/carbondata/processing/loading/BadRecordsLogger.java:129— BadRecordsLogger.addBadRecordsToBuilder has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), ternaries 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 18). 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.
AvroCarbonWriter.prepareFields (cognitive 32) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:541— AvroCarbonWriter.prepareFields has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonDescribeFormattedCommand.processMetadata (cognitive 32) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDescribeFormattedCommand.scala:52— CarbonDescribeFormattedCommand.processMetadata has cognitive complexity 32 (threshold 15). Drivers by points: if/else 25 (32 pts) (nesting depth added 7). 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.
CarbonDescribeColumnCommand.processMetadata (cognitive 32) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDescribeFormattedCommand.scala:406— CarbonDescribeColumnCommand.processMetadata has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (27 pts), match/switch 1 (4 pts), loops 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.
BroadCastSIFilterPushJoin.getFilteredSegments (cognitive 32) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/joins/BroadCastSIFilterPushJoin.scala:265— BroadCastSIFilterPushJoin.getFilteredSegments has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 2 (7 pts), loops 3 (7 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.
AbstractQueryExecutor.getDataBlocks (cognitive 31) core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java:184— AbstractQueryExecutor.getDataBlocks has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 2, boolean chains 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.
RestructureUtil.isColumnMatchesStruct (cognitive 31) core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java:269— RestructureUtil.isColumnMatchesStruct has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (25 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 18). 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.
IncludeFilterExecutorImpl.applyFilter (cognitive 31) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:103— IncludeFilterExecutorImpl.applyFilter has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 2 (4 pts) (nesting depth added 18). 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.
RowLevelRangeGreaterThanEqualFilterExecutorImpl.setFilteredIndexToBitSet (cognitive 31) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:528— RowLevelRangeGreaterThanEqualFilterExecutorImpl.setFilteredIndexToBitSet has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (10 pts), boolean chains 1 (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.
UnsafeComparer.compareTo (cognitive 31) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:219— UnsafeComparer.compareTo has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (23 pts), ternaries 1 (5 pts), loops 2 (3 pts) (nesting depth added 20). 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.
CarbonUtil.getFormatVersion (cognitive 31) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:3148— CarbonUtil.getFormatVersion has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (9 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.
CarbonOutputCommitter.commitJob (cognitive 31) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonOutputCommitter.java:106— CarbonOutputCommitter.commitJob has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (24 pts), error handling 3 (6 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.
MeasureFieldConverterImpl.convert (cognitive 31) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/MeasureFieldConverterImpl.java:65— MeasureFieldConverterImpl.convert has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (28 pts), error handling 1 (2 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.
BloomCoarseGrainIndex.prune (cognitive 31) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndex.java:134— BloomCoarseGrainIndex.prune has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 16). 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.
CarbonMergeIntoSQLCommand.processData (cognitive 31) REDACTED:35— CarbonMergeIntoSQLCommand.processData has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (9 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 16). 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.
TableStatusRecovery.main (cognitive 31) integration/spark/src/main/scala/org/apache/carbondata/recovery/tablestatus/TableStatusRecovery.scala:40— TableStatusRecovery.main has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 2, error handling 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.
CarbonScanRDD.internalGetPartitions (cognitive 31) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:115— CarbonScanRDD.internalGetPartitions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 5). 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.
AlterTableMergeIndexSIEventListener.onEvent (cognitive 31) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/AlterTableMergeIndexSIEventListener.scala:48— AlterTableMergeIndexSIEventListener.onEvent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 1 (5 pts) (nesting depth added 21). 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.
CarbonSecondaryIndexOptimizer.rewritePlanForSecondaryIndex (cognitive 31) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:84— CarbonSecondaryIndexOptimizer.rewritePlanForSecondaryIndex has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 7 (14 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.
AggregatePushDown.transformAggregate (cognitive 31) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/AggregatePushDown.scala:83— AggregatePushDown.transformAggregate has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 8, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SafeFixLengthColumnPage.ensureArraySize (cognitive 30) core/src/main/java/org/apache/carbondata/core/datastore/page/SafeFixLengthColumnPage.java:426— SafeFixLengthColumnPage.ensureArraySize has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (27 pts), loops 1 (3 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.
RestructureEvaluatorImpl.isDimensionDefaultValuePresentInFilterValues (cognitive 30) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RestructureEvaluatorImpl.java:52— RestructureEvaluatorImpl.isDimensionDefaultValuePresentInFilterValues has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 2 (4 pts), boolean chains 2 (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.
SegmentStatusManager.updateDeletionStatus (cognitive 30) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:464— SegmentStatusManager.updateDeletionStatus has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (29 pts), error handling 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.
CarbonLoadModelBuilder.build (cognitive 30) processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModelBuilder.java:147— CarbonLoadModelBuilder.build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 2 (5 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.
InputProcessorIterator.convertToNoDictionaryToBytes (cognitive 30) processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:367— InputProcessorIterator.convertToNoDictionaryToBytes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 5, loops 1 (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.
DataTypeUtil.convertHiveTypeToCarbon (cognitive 30) integration/hive/src/main/java/org/apache/carbondata/hive/util/DataTypeUtil.java:33— DataTypeUtil.convertHiveTypeToCarbon has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21 (25 pts), loops 2 (4 pts), boolean chains 1 (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.
CarbonHiveMetastoreListener.onEvent (cognitive 30) integration/hive/src/main/scala/org/apache/carbondata/hive/CarbonHiveMetastoreListener.scala:31— CarbonHiveMetastoreListener.onEvent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 6, match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonAddLoadCommand.processMetadata (cognitive 30) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAddLoadCommand.scala:74— CarbonAddLoadCommand.processMetadata has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 6 (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.
RangeValueFilterExecutorImpl.setFilteredIndexToBitSetWithColumnIndex (cognitive 29) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:462— RangeValueFilterExecutorImpl.setFilteredIndexToBitSetWithColumnIndex has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 3, loops 1 (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.
CarbonUtil.getDataSizeAndIndexSize (cognitive 29) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2507— CarbonUtil.getDataSizeAndIndexSize has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 16). 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.
StreamRecordReader.nextRow (cognitive 29) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:269— StreamRecordReader.nextRow has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (27 pts), error handling 1, loops 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.
CarbonDataMergerUtil.identifySegmentsToBeMergedBasedOnLoadedDate (cognitive 29) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:380— CarbonDataMergerUtil.identifySegmentsToBeMergedBasedOnLoadedDate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 2 (4 pts), loops 2 (4 pts), boolean chains 3 (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.
PaginationCarbonReader.getRows (cognitive 29) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/PaginationCarbonReader.java:158— PaginationCarbonReader.getRows has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 5 (14 pts) (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.
CarbonScanRDD.distributeColumnarSplits (cognitive 29) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:270— CarbonScanRDD.distributeColumnarSplits has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 4 (nesting depth added 13). 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.
CommonLoadUtils.transformQuery (cognitive 29) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:453— CommonLoadUtils.transformQuery has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 2 (6 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). 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.
AlterTableUtil.modifyTableProperties (cognitive 29) integration/spark/src/main/scala/org/apache/spark/util/AlterTableUtil.scala:422— AlterTableUtil.modifyTableProperties has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 4, error handling 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.
SQLFragmentCompactPrinter.printFragment (cognitive 29) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/Printers.scala:249— SQLFragmentCompactPrinter.printFragment has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 4 (7 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SegmentIndexFileStore.readAllIIndexOfSegment (cognitive 28) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java:132— SegmentIndexFileStore.readAllIIndexOfSegment has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (5 pts), boolean chains 3 (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.
RowLevelRangeGreaterThanEqualFilterExecutorImpl.prunePages (cognitive 28) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:343— RowLevelRangeGreaterThanEqualFilterExecutorImpl.prunePages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 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.
RowLevelRangeGreaterThanFilterExecutorImpl.prunePages (cognitive 28) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:156— RowLevelRangeGreaterThanFilterExecutorImpl.prunePages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 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.
RowLevelRangeLessThanEqualFilterExecutorImpl.prunePages (cognitive 28) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:322— RowLevelRangeLessThanEqualFilterExecutorImpl.prunePages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 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.
RowLevelRangeLessThanFilterExecutorImpl.prunePages (cognitive 28) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:318— RowLevelRangeLessThanFilterExecutorImpl.prunePages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 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.
AbstractDataFileFooterConverter.getBlockletIndexForDataFileFooter (cognitive 28) core/src/main/java/org/apache/carbondata/core/util/AbstractDataFileFooterConverter.java:234— AbstractDataFileFooterConverter.getBlockletIndexForDataFileFooter has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 2 (3 pts), boolean chains 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.
RowResultMergerProcessor.execute (cognitive 28) processing/src/main/java/org/apache/carbondata/processing/merger/RowResultMergerProcessor.java:109— RowResultMergerProcessor.execute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 3 (4 pts), error handling 2, 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.
CarbonWriterBuilder.withLoadOptions (cognitive 28) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:226— CarbonWriterBuilder.withLoadOptions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (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.
CarbonParserUtil.extractDimAndMsrFields (cognitive 28) integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:650— CarbonParserUtil.extractDimAndMsrFields has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 3 (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.
CarbonAddLoadCommand.writeMetaForSegment (cognitive 28) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAddLoadCommand.scala:227— CarbonAddLoadCommand.writeMetaForSegment has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 4, error handling 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.
CarbonAlterTableCompactionCommand.processData (cognitive 28) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala:93— CarbonAlterTableCompactionCommand.processData has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 4, error handling 2 (3 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.
CarbonMergeDataSetUtil.getFilesToScan (cognitive 28) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetUtil.scala:243— CarbonMergeDataSetUtil.getFilesToScan has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 3 (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.
FieldConverter.objectToString (cognitive 28) streaming/src/main/scala/org/apache/carbondata/streaming/parser/FieldConverter.scala:41— FieldConverter.objectToString has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 1 (3 pts), match/switch 1 (2 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.
RangeValueFilterExecutorImpl.isScanRequired (cognitive 27) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:265— RangeValueFilterExecutorImpl.isScanRequired has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 12 (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.
SegmentStatusManager.updateDeletionStatus (cognitive 27) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:565— SegmentStatusManager.updateDeletionStatus has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (26 pts), error handling 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.
BlockletIndexUtil.useMinMaxForBlockletPruning (cognitive 27) core/src/main/java/org/apache/carbondata/core/util/BlockletIndexUtil.java:413— BlockletIndexUtil.useMinMaxForBlockletPruning has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (7 pts) (nesting depth added 18). 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.
CarbonTableInputFormat.getFilteredSegment (cognitive 27) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java:224— CarbonTableInputFormat.getFilteredSegment has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 6, 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.
RowConverterImpl.convert (cognitive 27) processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java:113— RowConverterImpl.convert has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 2, loops 1 (nesting depth added 16). 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.
UnsafeRowComparator.compare (cognitive 27) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/comparator/UnsafeRowComparator.java:54— UnsafeRowComparator.compare has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (26 pts), 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.
TablePage.convertToColumnarAndAddToPages (cognitive 27) processing/src/main/java/org/apache/carbondata/processing/store/TablePage.java:205— TablePage.convertToColumnarAndAddToPages has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 11). 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.
BloomCoarseGrainIndex.createQueryModel (cognitive 27) index/bloom/src/main/java/org/apache/carbondata/index/bloom/BloomCoarseGrainIndex.java:203— BloomCoarseGrainIndex.createQueryModel has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (23 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.
LuceneFineGrainIndex.prune (cognitive 27) index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneFineGrainIndex.java:204— LuceneFineGrainIndex.prune has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 5 (10 pts), error handling 3 (4 pts), boolean chains 1 (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.
LuceneIndexWriter.addField (cognitive 27) index/lucene/src/main/java/org/apache/carbondata/index/lucene/LuceneIndexWriter.java:244— LuceneIndexWriter.addField has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 2 (5 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.
IndexTableUtil.checkAndAddIndexTable (cognitive 27) integration/spark/src/main/java/org/apache/spark/sql/index/IndexTableUtil.java:38— IndexTableUtil.checkAndAddIndexTable has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (7 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.
CarbonInsertIntoHadoopFsRelationCommand.run (cognitive 27) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoHadoopFsRelationCommand.scala:68— CarbonInsertIntoHadoopFsRelationCommand.run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, match/switch 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.
AlterTableColumnRenameEventListener.onEvent (cognitive 27) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/AlterTableColumnRenameEventListener.scala:51— AlterTableColumnRenameEventListener.onEvent has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 1 (3 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HarmonizeFactTable.apply (cognitive 27) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/Harmonizer.scala:115— HarmonizeFactTable.apply has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 6 (15 pts), if/else 5 (8 pts), boolean chains 4 (nesting depth added 12). 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ExcludeFilterExecutorImpl.setFilteredIndexToBitSet (cognitive 26) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:369— ExcludeFilterExecutorImpl.setFilteredIndexToBitSet has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (9 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.
IncludeFilterExecutorImpl.prunePages (cognitive 26) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:197— IncludeFilterExecutorImpl.prunePages has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (4 pts) (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.
IncludeFilterExecutorImpl.setFilteredIndexToBitSet (cognitive 26) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:445— IncludeFilterExecutorImpl.setFilteredIndexToBitSet has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (9 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.
FilterUtil.createFilterExecutorTree (cognitive 26) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:119— FilterUtil.createFilterExecutorTree has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 16). 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.
CleanFilesUtil.cleanStaleSegments (cognitive 26) core/src/main/java/org/apache/carbondata/core/util/CleanFilesUtil.java:51— CleanFilesUtil.cleanStaleSegments has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (6 pts), error handling 1 (5 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.
StreamRecordReader.readRawRowFromStream (cognitive 26) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:539— StreamRecordReader.readRawRowFromStream has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 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.
CarbonHiveSerDe.inferSchema (cognitive 26) integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveSerDe.java:118— CarbonHiveSerDe.inferSchema has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (5 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 16). 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.
AvroCarbonWriter.prepareSubFields (cognitive 26) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:645— AvroCarbonWriter.prepareSubFields has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
MVHelper.addOrModifyMVTablesMap (cognitive 26) integration/spark/src/main/scala/org/apache/carbondata/view/MVHelper.scala:390— MVHelper.addOrModifyMVTablesMap 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.
CommonLoadUtils.convertToLogicalRelation (cognitive 26) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:648— CommonLoadUtils.convertToLogicalRelation has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (20 pts), match/switch 2 (6 pts) (nesting depth added 7). 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.
CarbonMergeDataSetCommand.processIUD (cognitive 26) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetCommand.scala:542— CarbonMergeDataSetCommand.processIUD has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 2, loops 1 (2 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.
SIDropEventListener.onEvent (cognitive 26) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/SIDropEventListener.scala:46— SIDropEventListener.onEvent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), error handling 2 (5 pts), match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BroadCastSIFilterPushJoin.addInFilterToPlan (cognitive 26) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/joins/BroadCastSIFilterPushJoin.scala:150— BroadCastSIFilterPushJoin.addInFilterToPlan has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11, match/switch 7 (9 pts), boolean chains 6 (nesting depth added 2). 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.
CarbonSecondaryIndexOptimizer.createIndexFilterDataFrame (cognitive 26) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:251— CarbonSecondaryIndexOptimizer.createIndexFilterDataFrame has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 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.
reader.make_reader (cognitive 26) python/pycarbon/reader.py:24— reader.make_reader has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (26 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.
ColumnPage.newPage (cognitive 25) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:177— ColumnPage.newPage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 5 (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.
SchemaGenerator.updateBytePosition (cognitive 25) core/src/main/java/org/apache/carbondata/core/indexstore/schema/SchemaGenerator.java:89— SchemaGenerator.updateBytePosition has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (8 pts) (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.
CarbonTable.getMinMaxCacheColumns (cognitive 25) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:1033— CarbonTable.getMinMaxCacheColumns has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (4 pts) (nesting depth added 16). 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.
DictionaryBasedResultCollector.collectResultInRow (cognitive 25) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedResultCollector.java:113— DictionaryBasedResultCollector.collectResultInRow has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (7 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.
NotInExpression.evaluate (cognitive 25) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpression.java:42— NotInExpression.evaluate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (22 pts), loops 1 (2 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.
UnsafeComparer.compareTo (cognitive 25) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:136— UnsafeComparer.compareTo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 1 (4 pts), loops 2, 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.
CarbonMetadataUtil.getBlockletIndex (cognitive 25) core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java:215— CarbonMetadataUtil.getBlockletIndex has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 8 (10 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.
MVProvider.updateStatus (cognitive 25) core/src/main/java/org/apache/carbondata/core/view/MVProvider.java:244— MVProvider.updateStatus has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (5 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.
CarbonDataMergerUtil.updateStatusFile (cognitive 25) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:1044— CarbonDataMergerUtil.updateStatusFile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (6 pts), error handling 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.
CarbonDataProcessorUtil.getColumnIdxBasedOnSchemaInRowAsDataFieldOrder (cognitive 25) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:562— CarbonDataProcessorUtil.getColumnIdxBasedOnSchemaInRowAsDataFieldOrder has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 6, boolean chains 3 (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.
StreamSegment.recoverSegmentIfRequired (cognitive 25) streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:305— StreamSegment.recoverSegmentIfRequired has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (11 pts), boolean chains 1 (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.
DataTrashManager.dryRunOnExpiredSegments (cognitive 25) integration/spark/src/main/scala/org/apache/carbondata/trash/DataTrashManager.scala:268— DataTrashManager.dryRunOnExpiredSegments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 1 (nesting depth added 16). 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.
DataLoadPartitionCoalescer.assignPartitionNoLocality (cognitive 25) integration/spark/src/main/scala/org/apache/spark/rdd/DataLoadPartitionCoalescer.scala:220— DataLoadPartitionCoalescer.assignPartitionNoLocality has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (7 pts) (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.
CarbonBuilder.getOrCreateCarbonSession (cognitive 25) integration/spark/src/main/scala/org/apache/spark/sql/CarbonSession.scala:175— CarbonBuilder.getOrCreateCarbonSession has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 3, match/switch 2 (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.
CarbonMergeDataSetUtil.getTargetTableKeyColumns (cognitive 25) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetUtil.scala:337— CarbonMergeDataSetUtil.getTargetTableKeyColumns has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 2 (5 pts) (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.
CarbonAlterTableDropColumnCommand.processMetadata (cognitive 25) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableDropColumnCommand.scala:43— CarbonAlterTableDropColumnCommand.processMetadata has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 1, error handling 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.
CarbonIUDAnalysisRule.processUpdateQuery (cognitive 25) REDACTED:52— CarbonIUDAnalysisRule.processUpdateQuery has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 6 (10 pts), boolean chains 3 (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.
AlterTableUtil.validateComplexStructure (cognitive 25) integration/spark/src/main/scala/org/apache/spark/util/AlterTableUtil.scala:1109— AlterTableUtil.validateComplexStructure has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, loops 1 (2 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.
1.decodeAndFillVector (cognitive 24) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:249— 1.decodeAndFillVector has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 2 (5 pts), ternaries 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.
ColumnPage.decompress (cognitive 24) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:788— ColumnPage.decompress has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 7 (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.
IndexChooser.selectIndex (cognitive 24) core/src/main/java/org/apache/carbondata/core/index/IndexChooser.java:156— IndexChooser.selectIndex has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 2, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BlockletIndexFactory.getTableBlockIndexUniqueIdentifierUsingSegmentMinMax (cognitive 24) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndexFactory.java:229— BlockletIndexFactory.getTableBlockIndexUniqueIdentifierUsingSegmentMinMax has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). 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.
UnsafeMemoryDMStore.addIndexRow (cognitive 24) core/src/main/java/org/apache/carbondata/core/indexstore/UnsafeMemoryDMStore.java:119— UnsafeMemoryDMStore.addIndexRow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (8 pts), match/switch 1 (2 pts) (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.
CarbonTable.fillDimensionsAndMeasuresForTables (cognitive 24) core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:321— CarbonTable.fillDimensionsAndMeasuresForTables has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 2, loops 1 (nesting depth added 13). 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.
SegmentFile.merge (cognitive 24) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:1463— SegmentFile.merge has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 13). 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.
ExpressionResult.getInt (cognitive 24) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:68— ExpressionResult.getInt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), error handling 2 (3 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.
RowLevelRangeGreaterThanFilterExecutorImpl.ifDefaultValueMatchesFilter (cognitive 24) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:82— RowLevelRangeGreaterThanFilterExecutorImpl.ifDefaultValueMatchesFilter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (6 pts), boolean chains 2, ternaries 1 (2 pts) (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.
ConditionalFilterResolverImpl.resolve (cognitive 24) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/ConditionalFilterResolverImpl.java:67— ConditionalFilterResolverImpl.resolve 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.
CarbonTableInputFormat.getSplitsOfStreaming (cognitive 24) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java:277— CarbonTableInputFormat.getSplitsOfStreaming has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (6 pts), boolean chains 1 (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.
StreamRecordReader.initialize (cognitive 24) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamRecordReader.java:126— StreamRecordReader.initialize has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 6 (7 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.
SortState.gallopLeft (cognitive 24) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:548— SortState.gallopLeft has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts), boolean chains 4 (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. This shape REPEATS in the file: one other method here (SortState.gallopRight) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SortState.gallopRight (cognitive 24) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:625— SortState.gallopRight has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts), boolean chains 4 (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. This shape REPEATS in the file: one other method here (SortState.gallopLeft) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CarbonReaderBuilder.totalRowCountInSplits (cognitive 24) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java:439— CarbonReaderBuilder.totalRowCountInSplits has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (7 pts), error handling 1 (4 pts), boolean chains 2 (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.
TableNewProcessor.process (cognitive 24) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala:706— TableNewProcessor.process has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 5). 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.
CarbonProjectForDeleteCommand.processData (cognitive 24) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/CarbonProjectForDeleteCommand.scala:55— CarbonProjectForDeleteCommand.processData has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19 (22 pts), error handling 2 (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.
CarbonFilters.translateUDF (cognitive 24) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala:224— CarbonFilters.translateUDF has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Field.<init> (cognitive 23) core/src/main/java/org/apache/carbondata/core/metadata/datatype/Field.java:52— Field.<init> has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (20 pts), error handling 1 (3 pts) (nesting depth added 3). 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.
CarbonUpdateUtil.updateSegmentStatus (cognitive 23) core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:149— CarbonUpdateUtil.updateSegmentStatus has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 4 (8 pts), boolean chains 1, error handling 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.
FilterUtil.removeNullValues (cognitive 23) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:935— FilterUtil.removeNullValues has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (7 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.
LoadOption.getCsvHeaderColumns (cognitive 23) processing/src/main/java/org/apache/carbondata/processing/loading/model/LoadOption.java:193— LoadOption.getCsvHeaderColumns has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 3 (6 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.
CarbonCompactionUtil.getSortColumnsOfSegment (cognitive 23) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java:630— CarbonCompactionUtil.getSortColumnsOfSegment has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 2, loops 1 (2 pts) (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.
CarbonDataMergerUtil.updateLoadMetadataWithMergeStatus (cognitive 23) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:158— CarbonDataMergerUtil.updateLoadMetadataWithMergeStatus has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 1 (2 pts), 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.
HiveDataTypeUtils.convertCarbonDataTypeToHive (cognitive 23) integration/hive/src/main/java/org/apache/carbondata/hive/HiveDataTypeUtils.java:37— HiveDataTypeUtils.convertCarbonDataTypeToHive has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (21 pts), loops 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.
CarbonIUD.ifRowsDeleted (cognitive 23) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonIUD.java:385— CarbonIUD.ifRowsDeleted has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (9 pts) (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.
CarbonReader.readNextBatchRow (cognitive 23) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java:224— CarbonReader.readNextBatchRow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (10 pts) (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.
CarbonSchemaReader.readSchema (cognitive 23) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonSchemaReader.java:164— CarbonSchemaReader.readSchema has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (6 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.
MVHelper.getFieldsMapFromProject (cognitive 23) integration/spark/src/main/scala/org/apache/carbondata/view/MVHelper.scala:194— MVHelper.getFieldsMapFromProject has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 3 (5 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonAlterTableCompactionCommand.alterTableForCompaction (cognitive 23) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala:209— CarbonAlterTableCompactionCommand.alterTableForCompaction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (2 pts) (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.
DDLStrategy.apply (cognitive 23) integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala:57— DDLStrategy.apply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonSetCommand.validateAndSetValue (cognitive 23) integration/spark/src/main/scala/org/apache/spark/sql/hive/execution/command/CarbonHiveCommands.scala:111— CarbonSetCommand.validateAndSetValue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (20 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.
CarbonSpark2SqlParser.splitQuery (cognitive 23) integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala:431— CarbonSpark2SqlParser.splitQuery has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 5 (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.
AdaptiveCodec.getPageBasedOnDataType (cognitive 22) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveCodec.java:83— AdaptiveCodec.getPageBasedOnDataType has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 7, boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (AdaptiveCodec.putDataToPage) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AdaptiveCodec.putDataToPage (cognitive 22) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveCodec.java:123— AdaptiveCodec.putDataToPage has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 7, boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (AdaptiveCodec.getPageBasedOnDataType) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TableIndex.pruneMultiThread (cognitive 22) core/src/main/java/org/apache/carbondata/core/index/TableIndex.java:277— TableIndex.pruneMultiThread has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (6 pts), error handling 2 (3 pts), boolean chains 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.
BlockletIndexStore.get (cognitive 22) core/src/main/java/org/apache/carbondata/core/indexstore/BlockletIndexStore.java:73— BlockletIndexStore.get has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (6 pts), error handling 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.
SegmentFileStore.deletePhysicalPartition (cognitive 22) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:1244— SegmentFileStore.deletePhysicalPartition has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 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.
InExpression.evaluate (cognitive 22) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:42— InExpression.evaluate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). 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.
ExpressionResult.getDecimal (cognitive 22) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:275— ExpressionResult.getDecimal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 5). 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.
ExpressionResult.getShort (cognitive 22) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:118— ExpressionResult.getShort has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), error handling 2 (3 pts), boolean chains 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.
RowLevelRangeGreaterThanEqualFilterExecutorImpl.ifDefaultValueMatchesFilter (cognitive 22) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:82— RowLevelRangeGreaterThanEqualFilterExecutorImpl.ifDefaultValueMatchesFilter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (6 pts), boolean chains 2 (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.
RowLevelRangeLessThanEqualFilterExecutorImpl.ifDefaultValueMatchesFilter (cognitive 22) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:81— RowLevelRangeLessThanEqualFilterExecutorImpl.ifDefaultValueMatchesFilter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (6 pts), boolean chains 2 (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.
RowLevelRangeLessThanFilterExecutorImpl.ifDefaultValueMatchesFilter (cognitive 22) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:81— RowLevelRangeLessThanFilterExecutorImpl.ifDefaultValueMatchesFilter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (6 pts), boolean chains 2 (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.
RowLevelRangeLessThanFilterExecutorImpl.setFilteredIndexToBitSetWithColumnIndex (cognitive 22) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:456— RowLevelRangeLessThanFilterExecutorImpl.setFilteredIndexToBitSetWithColumnIndex has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (3 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.
QueryModel.processFilterExpression (cognitive 22) core/src/main/java/org/apache/carbondata/core/scan/model/QueryModel.java:131— QueryModel.processFilterExpression has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (10 pts), boolean chains 1 (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.
SegmentUpdateStatusManager.getDeleteDeltaFilesList (cognitive 22) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:370— SegmentUpdateStatusManager.getDeleteDeltaFilesList has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 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.
MapParserImpl.parse (cognitive 22) processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/MapParserImpl.java:41— MapParserImpl.parse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (8 pts), ternaries 1 (5 pts), boolean chains 1 (nesting depth added 13). 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.
CarbonInternalLoaderUtil.updateLoadMetadataWithMergeStatus (cognitive 22) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:261— CarbonInternalLoaderUtil.updateLoadMetadataWithMergeStatus has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 pts), 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.
CarbonWriterBuilder.withTableProperties (cognitive 22) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:335— CarbonWriterBuilder.withTableProperties has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 pts), 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.
CarbonSparkDataSourceUtil.createCarbonFilter (cognitive 22) integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/CarbonSparkDataSourceUtil.scala:115— CarbonSparkDataSourceUtil.createCarbonFilter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (nesting depth added 5). 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.
CastExpressionOptimization.checkIfCastCanBeRemove (cognitive 22) integration/spark/src/main/scala/org/apache/spark/sql/execution/CastExpressionOptimization.scala:158— CastExpressionOptimization.checkIfCastCanBeRemove has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 3, boolean chains 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.
ShowIndexesCommand.getIndexInfo (cognitive 22) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/index/ShowIndexesCommand.scala:68— ShowIndexesCommand.getIndexInfo has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (7 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.
CarbonDropTableCommand.processMetadata (cognitive 22) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDropTableCommand.scala:54— CarbonDropTableCommand.processMetadata has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 4, boolean chains 1, match/switch 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.
MVMatchPattern.factorOutSubsumer (cognitive 22) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:78— MVMatchPattern.factorOutSubsumer has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 7 (13 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 8). 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AlterTableUtil.validateSortScopeAndSortColumnsProperties (cognitive 22) integration/spark/src/main/scala/org/apache/spark/util/AlterTableUtil.scala:695— AlterTableUtil.validateSortScopeAndSortColumnsProperties has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (22 pts) (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.
SQLFragmentCompactPrinter.printExprModifiers (cognitive 22) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/Printers.scala:190— SQLFragmentCompactPrinter.printExprModifiers has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (9 pts), boolean chains 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.
SegmentFileStore.getSegmentFileForPhysicalDataPartitions (cognitive 21) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:738— SegmentFileStore.getSegmentFileForPhysicalDataPartitions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), boolean chains 1 (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.
ExpressionResult.getDouble (cognitive 21) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:185— ExpressionResult.getDouble has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 2 (3 pts) (nesting depth added 5). 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.
ExpressionResult.getTime (cognitive 21) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:321— ExpressionResult.getTime has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 5). 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.
SegmentUpdateStatusManager.getDeleteDeltaInvalidFilesList (cognitive 21) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:614— SegmentUpdateStatusManager.getDeleteDeltaInvalidFilesList has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 2, loops 1 (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.
CarbonUtil.reorderColumnsForLongString (cognitive 21) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:3385— CarbonUtil.reorderColumnsForLongString has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (3 pts), boolean chains 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.
TrashUtil.deleteExpiredDataFromTrash (cognitive 21) core/src/main/java/org/apache/carbondata/core/util/TrashUtil.java:157— TrashUtil.deleteExpiredDataFromTrash has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 pts), boolean chains 3, error handling 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.
CarbonDataMergerUtil.identifySegmentsToBeMergedBasedOnSize (cognitive 21) processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:518— CarbonDataMergerUtil.identifySegmentsToBeMergedBasedOnSize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 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.
HiveCarbonUtil.splitSchemaStringToArray (cognitive 21) integration/hive/src/main/java/org/apache/carbondata/hive/util/HiveCarbonUtil.java:322— HiveCarbonUtil.splitSchemaStringToArray has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, loops 2 (4 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.
Hive2CarbonExpression.convertExprHive2Carbon (cognitive 21) integration/hive/src/main/java/org/apache/carbondata/hive/Hive2CarbonExpression.java:77— Hive2CarbonExpression.convertExprHive2Carbon has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), loops 1 (3 pts) (nesting depth added 5). 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.
CarbonReaderBuilder.prepareFileInputFormat (cognitive 21) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java:292— CarbonReaderBuilder.prepareFileInputFormat has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 5). 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.
IndexRebuildRDD.internalCompute (cognitive 21) integration/spark/src/main/scala/org/apache/carbondata/index/IndexRebuildRDD.scala:270— IndexRebuildRDD.internalCompute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (6 pts), loops 1 (2 pts), 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.
CarbonParserUtil.processSpatialIndexProperty (cognitive 21) integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:117— CarbonParserUtil.processSpatialIndexProperty has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 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.
CarbonAlterTableRenameCommand.processMetadata (cognitive 21) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableRenameCommand.scala:46— CarbonAlterTableRenameCommand.processMetadata has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2, error handling 2 (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.
CarbonShowCreateTableCommand.processMetadata (cognitive 21) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonShowCreateTableCommand.scala:38— CarbonShowCreateTableCommand.processMetadata has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (21 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.
MVRewrite.rewriteWithSchemaWrapper0 (cognitive 21) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:403— MVRewrite.rewriteWithSchemaWrapper0 has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 5 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ExtendedRollingFileAppender.rollOver (cognitive 20) common/src/main/java/org/apache/carbondata/common/logging/impl/ExtendedRollingFileAppender.java:112— ExtendedRollingFileAppender.rollOver has cognitive complexity 20 (threshold 15). Drivers by points: error handling 4 (10 pts), if/else 8 (10 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.
IndexStoreManager.deleteIndex (cognitive 20) core/src/main/java/org/apache/carbondata/core/index/IndexStoreManager.java:410— IndexStoreManager.deleteIndex has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (7 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.
DataTypes.valueOf (cognitive 20) core/src/main/java/org/apache/carbondata/core/metadata/datatype/DataTypes.java:75— DataTypes.valueOf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. 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.
DictionaryBasedResultCollector.fillComplexColumnDataBufferForThisRow (cognitive 20) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedResultCollector.java:197— DictionaryBasedResultCollector.fillComplexColumnDataBufferForThisRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 pts), 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.
RestructureBasedDictionaryResultCollector.collectResultInRow (cognitive 20) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedDictionaryResultCollector.java:67— RestructureBasedDictionaryResultCollector.collectResultInRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 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.
RestructureBasedRawResultCollector.fillDictionaryKeyArrayBatchWithLatestSchema (cognitive 20) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedRawResultCollector.java:89— RestructureBasedRawResultCollector.fillDictionaryKeyArrayBatchWithLatestSchema has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (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.
AbstractQueryExecutor.getBlockExecutionInfoForBlock (cognitive 20) core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java:435— AbstractQueryExecutor.getBlockExecutionInfoForBlock has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 2 (4 pts), loops 3 (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.
RowLevelFilterExecutorImpl.convertRow (cognitive 20) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:382— RowLevelFilterExecutorImpl.convertRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 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.
RowLevelRangeLessThanEqualFilterExecutorImpl.setFilteredIndexToBitSetWithColumnIndex (cognitive 20) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:461— RowLevelRangeLessThanEqualFilterExecutorImpl.setFilteredIndexToBitSetWithColumnIndex has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 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.
BlockletFilterScanner.executeFilter (cognitive 20) core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:172— BlockletFilterScanner.executeFilter has cognitive complexity 20 (threshold 15). Drivers by points: loops 8 (10 pts), if/else 5 (9 pts), boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CarbonUtil.compareMeasureData (cognitive 20) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1028— CarbonUtil.compareMeasureData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2 (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.
DataTypeUtil.valueOf (cognitive 20) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:1096— DataTypeUtil.valueOf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. 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.
CarbonTableInputFormat.getSplits (cognitive 20) hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java:112— CarbonTableInputFormat.getSplits has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 5). 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.
StreamBlockletReader.sync (cognitive 20) hadoop/src/main/java/org/apache/carbondata/hadoop/stream/StreamBlockletReader.java:70— StreamBlockletReader.sync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 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.
CarbonVectorizedRecordReader.getCurrentValue (cognitive 20) hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java:209— CarbonVectorizedRecordReader.getCurrentValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 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.
BoundedInputStream.read (cognitive 20) processing/src/main/java/org/apache/carbondata/processing/loading/csvinput/BoundedInputStream.java:90— BoundedInputStream.read has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 11). 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.
InputProcessorIterator.getBatch (cognitive 20) processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:327— InputProcessorIterator.getBatch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 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.
CarbonStore.getDataAndIndexSize (cognitive 20) integration/spark/src/main/scala/org/apache/carbondata/api/CarbonStore.scala:258— CarbonStore.getDataAndIndexSize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (20 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.
CarbonTableCompactor.executeCompaction (cognitive 20) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonTableCompactor.scala:88— CarbonTableCompactor.executeCompaction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 1 (2 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.
CarbonScalaUtil.convertToDateAndTimeFormats (cognitive 20) integration/spark/src/main/scala/org/apache/carbondata/spark/util/CarbonScalaUtil.scala:102— CarbonScalaUtil.convertToDateAndTimeFormats has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (5 pts), boolean chains 1, error handling 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.
CarbonScalaUtil.convertStaticPartitionToValues (cognitive 20) integration/spark/src/main/scala/org/apache/carbondata/spark/util/CarbonScalaUtil.scala:155— CarbonScalaUtil.convertStaticPartitionToValues has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (5 pts), boolean chains 1, error handling 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.
CarbonAlterTableAddHivePartitionCommand.processData (cognitive 20) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/partition/CarbonAlterTableAddHivePartitionCommand.scala:109— CarbonAlterTableAddHivePartitionCommand.processData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4 (nesting depth added 9). 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.
CarbonRelation.sizeInBytes (cognitive 20) integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonRelation.scala:178— CarbonRelation.sizeInBytes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 1 (nesting depth added 11). 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.
AlterTableUtil.ValidateSetTablePropertiesForLocalDict (cognitive 20) integration/spark/src/main/scala/org/apache/spark/util/AlterTableUtil.scala:990— AlterTableUtil.ValidateSetTablePropertiesForLocalDict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 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.
SegmentProperties.fillDimensionAndMeasureDetails (cognitive 19) core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentProperties.java:295— SegmentProperties.fillDimensionAndMeasureDetails has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 2, 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.
AdaptiveCodec.writeInvertedIndexIfRequired (cognitive 19) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveCodec.java:161— AdaptiveCodec.writeInvertedIndexIfRequired has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (10 pts), if/else 5 (9 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PrimitivePageStatsCollector.updateNull (cognitive 19) core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:165— PrimitivePageStatsCollector.updateNull has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 2 (6 pts), boolean chains 2 (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.
SafeFixLengthColumnPage.convertValue (cognitive 19) core/src/main/java/org/apache/carbondata/core/datastore/page/SafeFixLengthColumnPage.java:395— SafeFixLengthColumnPage.convertValue has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 7 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
UnsafeFixLengthColumnPage.convertValue (cognitive 19) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:455— UnsafeFixLengthColumnPage.convertValue has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 7 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CarbonCostBasedOptimizer.identifyBestFitTable (cognitive 19) core/src/main/java/org/apache/carbondata/core/index/secondaryindex/CarbonCostBasedOptimizer.java:102— CarbonCostBasedOptimizer.identifyBestFitTable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), 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.
DictionaryBasedResultCollector.fillDimensionData (cognitive 19) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedResultCollector.java:258— DictionaryBasedResultCollector.fillDimensionData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (19 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.
EqualToExpression.evaluate (cognitive 19) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpression.java:44— EqualToExpression.evaluate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 2 (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, 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.
NotEqualsExpression.evaluate (cognitive 19) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotEqualsExpression.java:43— NotEqualsExpression.evaluate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 2 (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, 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.
ExpressionResult.getTimeAsMillisecond (cognitive 19) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:374— ExpressionResult.getTimeAsMillisecond has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), error handling 2 (3 pts), boolean chains 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.
ExcludeFilterExecutorImpl.applyFilter (cognitive 19) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:165— ExcludeFilterExecutorImpl.applyFilter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 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.
IncludeFilterExecutorImpl.applyFilter (cognitive 19) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:249— IncludeFilterExecutorImpl.applyFilter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 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.
ColumnarVectorWrapperDirectFactory.getDirectVectorWrapperFactory (cognitive 19) core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectFactory.java:43— ColumnarVectorWrapperDirectFactory.getDirectVectorWrapperFactory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6 (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.
CarbonColumnVectorImpl.getData (cognitive 19) core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/CarbonColumnVectorImpl.java:301— CarbonColumnVectorImpl.getData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 4 (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.
BlockletIndexUtil.getBlockMetaInfoMap (cognitive 19) core/src/main/java/org/apache/carbondata/core/util/BlockletIndexUtil.java:80— BlockletIndexUtil.getBlockMetaInfoMap has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, 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.
CarbonUtil.getFirstIndexUsingBinarySearch (cognitive 19) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:380— CarbonUtil.getFirstIndexUsingBinarySearch has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 5 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DataTypeUtil.convertDataToBytesBasedOnDataType (cognitive 19) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:993— DataTypeUtil.convertDataToBytesBasedOnDataType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), error handling 2 (4 pts) (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.
DeleteLoadFolders.deleteLoadFoldersFromFileSystem (cognitive 19) core/src/main/java/org/apache/carbondata/core/util/DeleteLoadFolders.java:246— DeleteLoadFolders.deleteLoadFoldersFromFileSystem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, 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.
MVManager.getCatalog (cognitive 19) core/src/main/java/org/apache/carbondata/core/view/MVManager.java:183— MVManager.getCatalog has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (4 pts), loops 2, boolean chains 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.
RawRowComparator.compare (cognitive 19) processing/src/main/java/org/apache/carbondata/processing/loading/partition/impl/RawRowComparator.java:46— RawRowComparator.compare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 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.
IntermediateSortTempRowComparator.compare (cognitive 19) processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateSortTempRowComparator.java:52— IntermediateSortTempRowComparator.compare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 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.
NewRowComparator.compare (cognitive 19) processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/NewRowComparator.java:45— NewRowComparator.compare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 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.
CarbonDataProcessorUtil.getColumnIdxBasedOnSchemaInRow (cognitive 19) processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java:494— CarbonDataProcessorUtil.getColumnIdxBasedOnSchemaInRow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 6, boolean chains 2 (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.
CarbonWriter.uploadSegmentDataFiles (cognitive 19) integration/flink/src/main/java/org/apache/carbon/flink/CarbonWriter.java:78— CarbonWriter.uploadSegmentDataFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 1 (3 pts), loops 1 (2 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.
WritableReadSupport.createWritablePrimitive (cognitive 19) integration/hive/src/main/java/org/apache/carbondata/hive/WritableReadSupport.java:209— WritableReadSupport.createWritablePrimitive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19. 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.
RowComparator.compare (cognitive 19) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/RowComparator.java:48— RowComparator.compare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 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.
RawBytesReadSupport.readRow (cognitive 19) integration/spark/src/main/scala/org/apache/carbondata/index/IndexRebuildRDD.scala:196— RawBytesReadSupport.readRow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 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.
CarbonScalaUtil.retrieveAndLogErrorMsg (cognitive 19) integration/spark/src/main/scala/org/apache/carbondata/spark/util/CarbonScalaUtil.scala:419— CarbonScalaUtil.retrieveAndLogErrorMsg has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 1 (2 pts), boolean chains 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.
DataLoadPartitionCoalescer.assignPartitionNodeLocality (cognitive 19) integration/spark/src/main/scala/org/apache/spark/rdd/DataLoadPartitionCoalescer.scala:173— DataLoadPartitionCoalescer.assignPartitionNodeLocality has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 2 (9 pts), if/else 4 (8 pts), loops 2 (nesting depth added 11). 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonLoadDataCommand.processData (cognitive 19) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:93— CarbonLoadDataCommand.processData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 3, 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.
CarbonMergeDataSetUtil.addFilePathAndMinMaxTuples (cognitive 19) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetUtil.scala:76— CarbonMergeDataSetUtil.addFilePathAndMinMaxTuples has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 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.
MixedFormatHandler.extraRDD (cognitive 19) integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/MixedFormatHandler.scala:158— MixedFormatHandler.extraRDD has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 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.
MVLoadPostEventListener.onEvent (cognitive 19) integration/spark/src/main/scala/org/apache/spark/sql/listeners/MVListeners.scala:108— MVLoadPostEventListener.onEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 1 (2 pts), match/switch 2 (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.
MVRewrite.rewriteWithSchemaWrapper0 (cognitive 19) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:459— MVRewrite.rewriteWithSchemaWrapper0 has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (5 pts), boolean chains 2 (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.
carbon_pr.main (cognitive 19) dev/carbon_pr.py:401— carbon_pr.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2, loops 1, ternaries 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.
EncodingFactory.createDecoderLegacy (cognitive 18) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/EncodingFactory.java:156— EncodingFactory.createDecoderLegacy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3 (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, 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.
ColumnPage.compress (cognitive 18) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:743— ColumnPage.compress has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3. 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.
BlockIndex.prune (cognitive 18) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:671— BlockIndex.prune has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 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.
ExtendedBlockletWrapperContainer.getExtendedBlocklets (cognitive 18) core/src/main/java/org/apache/carbondata/core/indexstore/ExtendedBlockletWrapperContainer.java:67— ExtendedBlockletWrapperContainer.getExtendedBlocklets has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (8 pts), error handling 2 (5 pts), if/else 4 (5 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.
ThriftWrapperSchemaConverterImpl.fromWrapperToExternalDataType (cognitive 18) core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:134— ThriftWrapperSchemaConverterImpl.fromWrapperToExternalDataType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. 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.
Encoding.valueOf (cognitive 18) core/src/main/java/org/apache/carbondata/core/metadata/encoder/Encoding.java:44— Encoding.valueOf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. 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.
SegmentFileStore.dropPartitions (cognitive 18) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:1011— SegmentFileStore.dropPartitions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 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.
BlockMinMaxTree.insert (cognitive 18) core/src/main/java/org/apache/carbondata/core/range/BlockMinMaxTree.java:59— BlockMinMaxTree.insert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (18 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.
AbstractQueryExecutor.updateColumns (cognitive 18) core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java:263— AbstractQueryExecutor.updateColumns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), 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.
QueryUtil.getComplexDimensionsMap (cognitive 18) core/src/main/java/org/apache/carbondata/core/scan/executor/util/QueryUtil.java:244— QueryUtil.getComplexDimensionsMap has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 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.
ExpressionResult.getLong (cognitive 18) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:231— ExpressionResult.getLong has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), error handling 2 (3 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.
RowLevelRangeFilterResolverImpl.resolve (cognitive 18) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java:186— RowLevelRangeFilterResolverImpl.resolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 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.
QueryModelBuilder.optimizeProjectionForComplexColumns (cognitive 18) core/src/main/java/org/apache/carbondata/core/scan/model/QueryModelBuilder.java:117— QueryModelBuilder.optimizeProjectionForComplexColumns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3, 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.
QueryModelBuilder.projectColumns (cognitive 18) core/src/main/java/org/apache/carbondata/core/scan/model/QueryModelBuilder.java:56— QueryModelBuilder.projectColumns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3, boolean chains 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.
SegmentStatusManager.updateDeletionStatus (cognitive 18) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:746— SegmentStatusManager.updateDeletionStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 2 (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.
DataTypeUtil.getBytesDataDataTypeForNoDictionaryColumn (cognitive 18) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:604— DataTypeUtil.getBytesDataDataTypeForNoDictionaryColumn has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16 (18 pts) (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, 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.
QuadNode.insert (cognitive 18) geo/src/main/java/org/apache/carbondata/geo/QuadTreeCls.java:513— QuadNode.insert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4 (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.
DataLoadProcessBuilder.getDataFields (cognitive 18) processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:284— DataLoadProcessBuilder.getDataFields has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 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.
CarbonLoaderUtil.assignLeftOverBlocks (cognitive 18) processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:711— CarbonLoaderUtil.assignLeftOverBlocks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 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.
CarbonInternalLoaderUtil.isSegmentsAlreadyCompactedForNewMetaDataDetails (cognitive 18) integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:225— CarbonInternalLoaderUtil.isSegmentsAlreadyCompactedForNewMetaDataDetails has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 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.
CarbonWriterBuilder.buildLoadModel (cognitive 18) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:931— CarbonWriterBuilder.buildLoadModel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, 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.
ORCCarbonWriter.parseOrcObject (cognitive 18) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/ORCCarbonWriter.java:284— ORCCarbonWriter.parseOrcObject has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (8 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.
StreamHandoffRDD.iterateStreamingHandoff (cognitive 18) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/StreamHandoffRDD.scala:213— StreamHandoffRDD.iterateStreamingHandoff has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (2 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.
CarbonInsertIntoWithDf.process (cognitive 18) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala:61— CarbonInsertIntoWithDf.process has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 3, boolean chains 2 (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.
CommonLoadUtils.getConvertedInternalRow (cognitive 18) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:760— CommonLoadUtils.getConvertedInternalRow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 4, 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.
RefreshCarbonTableCommand.processMetadata (cognitive 18) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/RefreshCarbonTableCommand.scala:56— RefreshCarbonTableCommand.processMetadata has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 1, error handling 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.
CarbonCreateMVCommand.checkQuery (cognitive 18) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/view/CarbonCreateMVCommand.scala:495— CarbonCreateMVCommand.checkQuery has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 6 (8 pts), boolean chains 1 (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.
CarbonSQLHadoopMapReduceCommitProtocol.commitJob (cognitive 18) integration/spark/src/main/scala/org/apache/spark/sql/execution/datasources/SparkCarbonTableFormat.scala:265— CarbonSQLHadoopMapReduceCommitProtocol.commitJob has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (4 pts), boolean chains 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.
CarbonSecondaryIndexRDD.internalGetPartitions (cognitive 18) integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/rdd/CarbonSecondaryIndexRDD.scala:181— CarbonSecondaryIndexRDD.internalGetPartitions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (6 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.
ModularPlanRule.apply (cognitive 18) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/ModularPlanSignatureGenerator.scala:37— ModularPlanRule.apply has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HarmonizedRelation.canHarmonize (cognitive 18) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/ModularRelation.scala:87— HarmonizedRelation.canHarmonize has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 6 (7 pts), boolean chains 2 (nesting depth added 6). 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LogicalPlanRule.apply (cognitive 18) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/LogicalPlanSignatureGenerator.scala:56— LogicalPlanRule.apply has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, match/switch 1 (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CleanupQualifier.cleanupQualifier (cognitive 18) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuilder.scala:108— CleanupQualifier.cleanupQualifier has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SafeFixedLengthDimensionDataChunkStore.fillVector (cognitive 17) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/SafeFixedLengthDimensionDataChunkStore.java:67— SafeFixedLengthDimensionDataChunkStore.fillVector has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 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.
IndexFilter.checkIfFilterColumnExistsInTable (cognitive 17) core/src/main/java/org/apache/carbondata/core/index/IndexFilter.java:152— IndexFilter.checkIfFilterColumnExistsInTable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 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.
SegmentFileStore.writeSegmentFileForPartitionTable (cognitive 17) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:166— SegmentFileStore.writeSegmentFileForPartitionTable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4 (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.
RangeExpressionEvaluator.checkLiteralValue (cognitive 17) core/src/main/java/org/apache/carbondata/core/scan/expression/RangeExpressionEvaluator.java:445— RangeExpressionEvaluator.checkLiteralValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 3 (5 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SegmentUpdateStatusManager.getDeltaFiles (cognitive 17) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:284— SegmentUpdateStatusManager.getDeltaFiles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (5 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.
CarbonUtil.getBlockId (cognitive 17) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2846— CarbonUtil.getBlockId has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 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.
CarbonUtil.getLocalDictionaryModel (cognitive 17) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:3100— CarbonUtil.getLocalDictionaryModel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), ternaries 1 (4 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.
CarbonUtil.getRangeIndex (cognitive 17) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1542— CarbonUtil.getRangeIndex has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2, 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.
TrashUtil.emptyTrash (cognitive 17) core/src/main/java/org/apache/carbondata/core/util/TrashUtil.java:203— TrashUtil.emptyTrash has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (5 pts), boolean chains 1, error handling 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.
CarbonVectorizedRecordReader.initBatch (cognitive 17) hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java:159— CarbonVectorizedRecordReader.initBatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (6 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.
AbstractFactDataWriter.commitCurrentFile (cognitive 17) REDACTED:263— AbstractFactDataWriter.commitCurrentFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (4 pts), boolean chains 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.
CarbonLoaderUtil.assignBlocksIgnoreDataLocality (cognitive 17) processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:1000— CarbonLoaderUtil.assignBlocksIgnoreDataLocality has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 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.
CarbonVectorBatch.createDirectStreamReader (cognitive 17) integration/presto/src/main/java/org/apache/carbondata/presto/CarbonVectorBatch.java:66— CarbonVectorBatch.createDirectStreamReader has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 2 (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.
ColumnVectorProxy.putRowToColumnBatch (cognitive 17) integration/spark/src/main/java/org/apache/spark/sql/CarbonVectorProxy.java:151— ColumnVectorProxy.putRowToColumnBatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16 (17 pts) (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.
ArrowWriter.createFieldWriter (cognitive 17) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/arrow/ArrowWriter.java:100— ArrowWriter.createFieldWriter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, loops 1 (2 pts) (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.
DistributedPruneRDD.internalCompute (cognitive 17) integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedPruneRDD.scala:67— DistributedPruneRDD.internalCompute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (2 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.
CarbonMergerRDD.internalCompute (cognitive 17) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:117— CarbonMergerRDD.internalCompute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, error handling 2 (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.
CommonUtil.convertSparkComplexTypeToCarbonObject (cognitive 17) integration/spark/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala:987— CommonUtil.convertSparkComplexTypeToCarbonObject has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (6 pts), boolean chains 2, match/switch 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.
CommonLoadUtils.getSegmentMetaDataInfoFromAccumulator (cognitive 17) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:1192— CommonLoadUtils.getSegmentMetaDataInfoFromAccumulator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (4 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.
CarbonMergeDataSetUtil.getSplitsAndLoadToCache (cognitive 17) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetUtil.scala:383— CarbonMergeDataSetUtil.getSplitsAndLoadToCache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2 (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.
CarbonDescribeFormattedCommand.getLocalDictDesc (cognitive 17) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDescribeFormattedCommand.scala:328— CarbonDescribeFormattedCommand.getLocalDictDesc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3 (nesting depth added 8). 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.
CarbonSourceStrategy.pruneFilterProject (cognitive 17) integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonSourceStrategy.scala:144— CarbonSourceStrategy.pruneFilterProject has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, match/switch 2, 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.
CarbonFileMetastore.readCarbonSchema (cognitive 17) integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala:279— CarbonFileMetastore.readCarbonSchema has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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.
CarbonSparkSqlParserUtil.alterTableAddColumns (cognitive 17) integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSparkSqlParserUtil.scala:481— CarbonSparkSqlParserUtil.alterTableAddColumns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 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.
carbon_reader.make_carbon_reader (cognitive 17) python/pycarbon/core/carbon_reader.py:47— carbon_reader.make_carbon_reader has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 2 (3 pts), ternaries 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.
DimensionChunkReaderV3.decodeDimensionLegacy (cognitive 16) core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/dimension/v3/DimensionChunkReaderV3.java:341— DimensionChunkReaderV3.decodeDimensionLegacy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (7 pts), boolean chains 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.
LocalDictDimensionDataChunkStore.fillVector (cognitive 16) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/LocalDictDimensionDataChunkStore.java:65— LocalDictDimensionDataChunkStore.fillVector has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 1 (3 pts), boolean chains 2, 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.
ColumnPageWrapper.fillRow (cognitive 16) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java:197— ColumnPageWrapper.fillRow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (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.
ColumnPage.getPageLengthInBytes (cognitive 16) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java:703— ColumnPage.getPageLengthInBytes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3. 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.
IndexChooser.extractColumnExpression (cognitive 16) core/src/main/java/org/apache/carbondata/core/index/IndexChooser.java:253— IndexChooser.extractColumnExpression has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 2 (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.
IndexStoreManager.getIndex (cognitive 16) core/src/main/java/org/apache/carbondata/core/index/IndexStoreManager.java:117— IndexStoreManager.getIndex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 1 (3 pts), boolean chains 2 (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.
BlockletIndexFactory.clear (cognitive 16) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndexFactory.java:475— BlockletIndexFactory.clear has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (6 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.
BlockletIndexFactory.getIndexes (cognitive 16) core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndexFactory.java:147— BlockletIndexFactory.getIndexes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 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.
DictionaryBasedResultCollector.initDimensionAndMeasureIndexesForFillingData (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedResultCollector.java:351— DictionaryBasedResultCollector.initDimensionAndMeasureIndexesForFillingData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (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.
RestructureBasedVectorResultCollector.fillDataForNonExistingMeasures (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.java:202— RestructureBasedVectorResultCollector.fillDataForNonExistingMeasures 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.
ResultCollectorFactory.getScannedResultCollector (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/collector/ResultCollectorFactory.java:52— ResultCollectorFactory.getScannedResultCollector has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (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.
GreaterThanEqualToExpression.evaluate (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpression.java:36— GreaterThanEqualToExpression.evaluate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (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.
GreaterThanExpression.evaluate (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanExpression.java:37— GreaterThanExpression.evaluate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (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.
LessThanEqualToExpression.evaluate (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/LessThanEqualToExpression.java:36— LessThanEqualToExpression.evaluate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (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.
LessThanExpression.evaluate (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/LessThanExpression.java:37— LessThanExpression.evaluate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (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.
ExpressionResult.equals (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:489— ExpressionResult.equals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 2, error handling 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.
ExcludeFilterExecutorImpl.getFilteredIndexesUsingPrvBitset (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:303— ExcludeFilterExecutorImpl.getFilteredIndexesUsingPrvBitset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), boolean chains 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.
RowLevelRangeGreaterThanEqualFilterExecutorImpl.isScanRequired (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:116— RowLevelRangeGreaterThanEqualFilterExecutorImpl.isScanRequired has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (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.
RowLevelRangeGreaterThanFilterExecutorImpl.isScanRequired (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:118— RowLevelRangeGreaterThanFilterExecutorImpl.isScanRequired has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (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.
RowLevelRangeLessThanEqualFilterExecutorImpl.isScanRequired (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:116— RowLevelRangeLessThanEqualFilterExecutorImpl.isScanRequired has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (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.
RowLevelRangeLessThanFilterExecutorImpl.isScanRequired (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:116— RowLevelRangeLessThanFilterExecutorImpl.isScanRequired has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (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.
ColumnDriftRawResultIterator.initForColumnDrift (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/result/iterator/ColumnDriftRawResultIterator.java:65— ColumnDriftRawResultIterator.initForColumnDrift has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (5 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.
BlockletFullScanner.scanBlocklet (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFullScanner.java:60— BlockletFullScanner.scanBlocklet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (6 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.
ByteArrayWrapper.equals (cognitive 16) core/src/main/java/org/apache/carbondata/core/scan/wrappers/ByteArrayWrapper.java:149— ByteArrayWrapper.equals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), boolean chains 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.
SegmentMetaDataInfoStats.getTableSegmentMetaDataInfo (cognitive 16) core/src/main/java/org/apache/carbondata/core/segmentmeta/SegmentMetaDataInfoStats.java:59— SegmentMetaDataInfoStats.getTableSegmentMetaDataInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 2, loops 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.
TaskStatistics.build (cognitive 16) core/src/main/java/org/apache/carbondata/core/stats/TaskStatistics.java:78— TaskStatistics.build 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.
StreamPruner.listAllStreamFiles (cognitive 16) core/src/main/java/org/apache/carbondata/core/stream/StreamPruner.java:104— StreamPruner.listAllStreamFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (4 pts), 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.
DataTypeUtil.getBytesBasedOnDataTypeForNoDictionaryColumn (cognitive 16) core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:389— DataTypeUtil.getBytesBasedOnDataTypeForNoDictionaryColumn has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 2). 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.
MVManager.getUpdatedSegmentMap (cognitive 16) core/src/main/java/org/apache/carbondata/core/view/MVManager.java:241— MVManager.getUpdatedSegmentMap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 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.
JsonStreamReader.getJsonRecord (cognitive 16) processing/src/main/java/org/apache/carbondata/processing/loading/jsoninput/JsonStreamReader.java:52— JsonStreamReader.getJsonRecord has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), 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.
DataWriterProcessorStepImpl.close (cognitive 16) processing/src/main/java/org/apache/carbondata/processing/loading/steps/DataWriterProcessorStepImpl.java:240— DataWriterProcessorStepImpl.close has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 1 (3 pts), loops 1 (3 pts), boolean chains 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.
DataLoadProcessBuilder.setSortColumnInfo (cognitive 16) processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java:416— DataLoadProcessBuilder.setSortColumnInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), boolean chains 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.
CompactionResultSortProcessor.prepareRowObjectForSorting (cognitive 16) processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java:318— CompactionResultSortProcessor.prepareRowObjectForSorting has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 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.
CarbonFactDataWriterImplV3.writeTablePage (cognitive 16) processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java:142— CarbonFactDataWriterImplV3.writeTablePage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 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.
StreamSegment.open (cognitive 16) streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:73— StreamSegment.open has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), 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.
SparkDataTypeConverterImpl.convertCarbonSchemaToSparkSchema (cognitive 16) integration/spark/src/main/java/org/apache/carbondata/converter/SparkDataTypeConverterImpl.java:147— SparkDataTypeConverterImpl.convertCarbonSchemaToSparkSchema has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, 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.
Util.convertCarbonToSparkDataType (cognitive 16) integration/spark/src/main/java/org/apache/carbondata/spark/util/Util.java:62— Util.convertCarbonToSparkDataType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (16 pts) (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, 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.
AvroCarbonWriter.avroPrimitiveFieldToObject (cognitive 16) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:346— AvroCarbonWriter.avroPrimitiveFieldToObject has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CarbonWriterBuilder.buildCarbonTable (cognitive 16) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:994— CarbonWriterBuilder.buildCarbonTable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (2 pts), boolean chains 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.
CarbonDataRDDFactory.handleSegmentMerging (cognitive 16) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala:626— CarbonDataRDDFactory.handleSegmentMerging has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 1 (3 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.
CarbonMergerRDD.getTaskNumberBasedOnID (cognitive 16) integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:736— CarbonMergerRDD.getTaskNumberBasedOnID has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (2 pts), boolean chains 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.
CarbonStreamerConfig.setConfigsToCarbonProperty (cognitive 16) integration/spark/src/main/scala/org/apache/carbondata/streamer/CarbonStreamerConfig.scala:177— CarbonStreamerConfig.setConfigsToCarbonProperty has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. 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.
CarbonSparkDataSourceUtil.prepareLoadModel (cognitive 16) integration/spark/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/CarbonSparkDataSourceUtil.scala:229— CarbonSparkDataSourceUtil.prepareLoadModel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 2 (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, 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.
DDLHelper.setProperties (cognitive 16) integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/DDLHelper.scala:352— DDLHelper.setProperties has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 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.
CarbonFilters.transformExpression (cognitive 16) integration/spark/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala:462— CarbonFilters.transformExpression has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AlterTableUtil.validateColumnDataType (cognitive 16) integration/spark/src/main/scala/org/apache/spark/util/AlterTableUtil.scala:1169— AlterTableUtil.validateColumnDataType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HarmonizeDimensionTable.apply (cognitive 16) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/Harmonizer.scala:67— HarmonizeDimensionTable.apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), match/switch 3 (6 pts), boolean chains 3 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Printers.formatExpressionsInUDF (cognitive 16) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/Printers.scala:381— Printers.formatExpressionsInUDF has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SQLBuildDSL.addGroupingSetIfNeeded (cognitive 16) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuildDSL.scala:383— SQLBuildDSL.addGroupingSetIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 3, loops 1 (2 pts) (nesting depth added 8). 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication· Near-duplicate member family (5 members, 36 shared lines) · ×1
Near-duplicate member family (5 members, 36 shared lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:374— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:374-442 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:217-322 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:275-379 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:217-303 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:214-299 — These 5 members are variants of one another: a block of 36 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 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 5 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 29 shared lines) · ×1
Near-duplicate member family (4 members, 29 shared lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:344— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:344-398 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:157-209 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:323-376 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:319-371 — These 4 members are variants of one another: a block of 29 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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· Near-duplicate member family (3 members, 32 shared lines) · ×1
Near-duplicate member family (3 members, 32 shared lines) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:126— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:126-309 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala:61-186 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:93-209 — These 3 members are variants of one another: a block of 32 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
Near-duplicate member pair (99 shared lines) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:303— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:303-450 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:330-544 — These two members are variants of one another: 99 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 (50 shared lines) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:184— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:184-304 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:406-508 — These two members are variants of one another: 50 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 (37 shared lines) processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:471— processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:471-601 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortParameters.java:657-741 — These two members are variants of one another: 37 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 (31 shared lines) core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:85— core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:85-120 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/safe/AbstractNonDictionaryVectorFiller.java:133-169 — These two members are variants of one another: 31 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 (23 shared lines) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:43— core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/InExpression.java:43-97 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpression.java:43-108 — These two members are variants of one another: 23 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· Members sharing a duplicated core (14 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (14 members, 50+ identical tokens) core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:40— core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:40-61 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:65-88 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:97-118 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:122-145 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:151-172 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:176-199 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:205-226 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:230-253 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:310-331 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:335-358 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:364-385 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:389-412 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:418-439 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:443-466 — These 14 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 14 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 14 times.
D4 · Code Duplication· Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (9 members, 50+ identical tokens) core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:276— core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:276-377 | core/src/main/java/org/apache/carbondata/core/view/MVManager.java:334-383 | integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:264-345 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:161-268 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:1046-1136 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:237-381 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:73-116 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:143-179 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:184-221 — These 9 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 9 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 9 times.
D4 · Code Duplication· Edited copy of a member (115 corresponding lines) · ×1
Edited copy of a member (115 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:706— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:706-820 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:833-951 — These two members are one piece of code written twice and then edited apart: 115 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 (103 corresponding lines) · ×1
Edited copy of a member (103 corresponding lines) sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:541— sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:541-643 | sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:645-747 — These two members are one piece of code written twice and then edited apart: 103 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 (92 corresponding lines) · ×1
Edited copy of a member (92 corresponding lines) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:465— core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:465-556 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:567-661 — These two members are one piece of code written twice and then edited apart: 92 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 (48 corresponding lines) · ×1
Edited copy of a member (48 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpression.java:45— core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpression.java:45-95 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/NotEqualsExpression.java:44-91 — These two members are one piece of code written twice and then edited apart: 48 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 (80 corresponding lines) · ×1
Edited copy of a member (80 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:463— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:463-542 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:565-664 — These two members are one piece of code written twice and then edited apart: 80 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 (63 corresponding lines) · ×1
Edited copy of a member (63 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:548— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:548-610 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/sort/TimSort.java:625-688 — These two members are one piece of code written twice and then edited apart: 63 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 (55 corresponding lines) · ×1
Edited copy of a member (55 corresponding lines) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:137— core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:137-195 | core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:219-273 — These two members are one piece of code written twice and then edited apart: 55 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 (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:486— core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java:486-525 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2028-2066 — These two members are one piece of code written twice and then edited apart: 39 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) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:463— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:463-515 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:458-520 — 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 copies of one member (6 members, 42+ corresponding lines) · ×1
Edited copies of one member (6 members, 42+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:68— core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:68-116 | core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:185-229 | core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:231-272 | core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:275-319 | core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:321-372 | core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:374-423 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 42 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:579— processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:579-626 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java:642-687 — These two members are one piece of code written twice and then edited apart: 46 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, 46+ corresponding lines) · ×1
Edited copies of one member (4 members, 46+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:529— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:529-574 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:534-581 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:529-591 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:533-600 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 46 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 (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:478— core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java:478-528 | integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveInputSplit.java:221-269 — These two members are one piece of code written twice and then edited apart: 49 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) python/pycarbon/core/carbon_tf_utils.py:61— python/pycarbon/core/carbon_tf_utils.py:61-97 | python/pycarbon/integration/tensorflow.py:65-101 — 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 copies of one member (3 members, 38+ corresponding lines) · ×1
Edited copies of one member (3 members, 38+ corresponding lines) processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/FileMergeSortComparator.java:75— processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/FileMergeSortComparator.java:75-123 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateSortTempRowComparator.java:52-93 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/NewRowComparator.java:45-82 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 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 (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:238— core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:238-275 | core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:429-462 — These two members are one piece of code written twice and then edited apart: 34 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 (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) integration/spark/src/main/scala/org/apache/carbondata/api/CarbonStore.scala:103— integration/spark/src/main/scala/org/apache/carbondata/api/CarbonStore.scala:103-144 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala:484-527 — These two members are one piece of code written twice and then edited apart: 42 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 (5 members, 27+ corresponding lines) · ×1
Edited copies of one member (5 members, 27+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:320— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:320-348 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:417-444 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:414-440 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:395-422 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:390-417 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 27 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 5 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) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:443— core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:443-462 | core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:513-532 | core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:582-601 — 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 (3 members, 23+ corresponding lines) · ×1
Edited copies of one member (3 members, 23+ corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:547— core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:547-569 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java:535-567 | core/src/main/java/org/apache/carbondata/core/view/MVProvider.java:309-336 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 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 (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:401— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:401-414 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:398-411 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:379-392 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:374-387 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 16+ corresponding lines) · ×1
Edited copies of one member (5 members, 16+ corresponding lines) core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:454— core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:454-471 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:473-488 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:524-541 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:543-559 | core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:627-644 — These 5 members are one piece of code written 5 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 5 times and the copies 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) core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/VariableLengthDimensionColumnPage.java:115— core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/VariableLengthDimensionColumnPage.java:115-127 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/impl/VariableLengthDimensionColumnPage.java:139-151 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java:71-81 | core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java:84-94 — 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 copies of one member (4 members, 34+ corresponding lines) · ×1
Edited copies of one member (4 members, 34+ corresponding lines) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:157— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java:157-191 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeSingleThreadFinalSortFilesMerger.java:214-252 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMerger.java:153-186 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SingleThreadFinalSortFilesMerger.java:266-302 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 34 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 (5 members, 10+ corresponding lines) · ×1
Edited copies of one member (5 members, 10+ corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/compression/AbstractCompressor.java:35— core/src/main/java/org/apache/carbondata/core/datastore/compression/AbstractCompressor.java:35-44 | core/src/main/java/org/apache/carbondata/core/datastore/compression/AbstractCompressor.java:57-66 | core/src/main/java/org/apache/carbondata/core/datastore/compression/AbstractCompressor.java:79-88 | core/src/main/java/org/apache/carbondata/core/datastore/compression/AbstractCompressor.java:101-110 | core/src/main/java/org/apache/carbondata/core/datastore/compression/AbstractCompressor.java:123-133 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 8+ corresponding lines) · ×1
Edited copies of one member (6 members, 8+ corresponding lines) core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:281— core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:281-288 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:291-298 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:309-316 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:319-326 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:329-336 | core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java:339-346 — These 6 members are one piece of code written 6 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 6 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) core/src/main/java/org/apache/carbondata/core/cache/dictionary/DictionaryByteArrayWrapper.java:65— core/src/main/java/org/apache/carbondata/core/cache/dictionary/DictionaryByteArrayWrapper.java:65-78 | core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java:593-605 | core/src/main/java/org/apache/carbondata/core/mutate/data/RowCountDetailsVO.java:47-62 — 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 (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) core/src/main/java/org/apache/carbondata/core/metadata/CarbonTableIdentifier.java:97— core/src/main/java/org/apache/carbondata/core/metadata/CarbonTableIdentifier.java:97-104 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableInfo.java:180-186 | core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableSchema.java:155-161 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 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 (6 members, 12+ corresponding lines) · ×1
Edited copies of one member (6 members, 12+ corresponding lines) integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/ColumnarVectorWrapper.java:84— integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/ColumnarVectorWrapper.java:84-95 | integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/ColumnarVectorWrapper.java:109-120 | integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/ColumnarVectorWrapper.java:131-142 | integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/ColumnarVectorWrapper.java:171-182 | integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/ColumnarVectorWrapper.java:223-234 | integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/ColumnarVectorWrapper.java:244-255 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) mv/plan/src/main/common2.3and2.4/org/apache/carbondata/mv/plans/modular/SparkVersionHelper.scala:64— mv/plan/src/main/common2.3and2.4/org/apache/carbondata/mv/plans/modular/SparkVersionHelper.scala:64-99 | mv/plan/src/main/spark3.1/org/apache/carbondata/mv/plans/modular/SparkVersionHelper.scala:63-97 — 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 copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/DimColumnResolvedFilterInfo.java:60— core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/DimColumnResolvedFilterInfo.java:60-69 | core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/MeasureColumnResolvedFilterInfo.java:68-77 | core/src/main/java/org/apache/carbondata/core/util/TaskMetricsMap.java:157-168 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) python/pycarbon/core/carbon_tf_utils.py:290— python/pycarbon/core/carbon_tf_utils.py:290-338 | python/pycarbon/integration/tensorflow.py:285-322 — 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 copy of a member (3 corresponding lines) · ×1
Edited copy of a member (3 corresponding lines) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/ModularPlan.scala:161— mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/ModularPlan.scala:161-163 | mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/basicOperators.scala:64-66 — These two members are one piece of code written twice and then edited apart: 3 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 (30–31 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:121— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:121-151 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:123-153 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:121-150 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:121-150 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:121` 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 (31 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:72— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:72-102 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:78-108 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java:50-80 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java` and `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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 `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:72` 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, `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:104` calls `incrementScannedResultRowCounter` and `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:113` 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 (23–31 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:474— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:474-504 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:550-572 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:474` 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. 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 (29–30 lines × 2) core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:155— core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:155-184 | core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:233-261 — 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 `core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java:155` 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 (24–28 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:494— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:494-521 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:597-620 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:494` 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 (35 lines × 2) processing/src/main/java/org/apache/carbondata/processing/loading/steps/DataConverterProcessorStepImpl.java:94— processing/src/main/java/org/apache/carbondata/processing/loading/steps/DataConverterProcessorStepImpl.java:94-128 | processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithNoConverterImpl.java:131-165 — 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. 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 (25–26 lines × 5) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:409— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:409-434 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:249-274 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:306-331 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:241-265 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:238-262 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:409` 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 (25–26 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:559— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:559-583 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:567-592 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 404 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:559` 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 (23–25 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:368— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:368-392 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:405-427 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 134 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:368` 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. 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 (18–22 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:478— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:478-499 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:546-563 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:478` 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. 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 (19–21 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:471— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:471-489 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:539-557 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:467-487 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:543-562 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 404 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.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. 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 (41 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:134— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:134-174 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:111-151 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 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. 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–21 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:483— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:483-503 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:542-553 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:483` 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 (19–21 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/CustomTypeDictionaryVisitor.java:58— core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/CustomTypeDictionaryVisitor.java:58-76 | core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/RangeDirectDictionaryVisitor.java:64-84 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/CustomTypeDictionaryVisitor.java:58` 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 (19–20 lines × 2) core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:511— core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:511-529 | core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:614-633 — 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 `core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:511` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:634` calls `add` and `core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:530` 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 (19 lines × 4) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:83— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:83-101 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:90-108 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:71-89 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:68-86 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:83` 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–19 lines × 3) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:105— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:105-123 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:93-111 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:90-107 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:105` 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–19 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:474— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:474-492 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:576-592 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:474` 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 (18 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:578— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:578-595 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:585-602 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:596-613 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:604-621 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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–18 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:500— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:500-516 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:504-521 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:500` 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 (16–17 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:346— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:346-362 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:158-173 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:325-340 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:321-336 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:346` 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–16 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpression.java:38— core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpression.java:38-52 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanExpression.java:39-54 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/LessThanEqualToExpression.java:38-52 | core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/StartsWithExpression.java:39-54 — 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.
Duplicated block (15–16 lines × 2) integration/flink/src/main/java/org/apache/carbon/flink/CarbonWriter.java:87— integration/flink/src/main/java/org/apache/carbon/flink/CarbonWriter.java:87-102 | integration/flink/src/main/java/org/apache/carbon/flink/CarbonWriter.java:134-148 — 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 `integration/flink/src/main/java/org/apache/carbon/flink/CarbonWriter.java:87` 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 (13–15 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:175— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:175-189 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:233-247 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:174-188 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:174-186 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:175` 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–15 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:219— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:219-233 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:277-290 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:219-232 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:216-229 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:219` 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–15 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:318— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:318-332 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:337-348 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelFilterExecutorImpl.java:318` 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 (14 lines × 4) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:134— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:134-147 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:146-159 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:122-135 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:123-136 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:134` 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–14 lines × 3) core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2955— core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2955-2966 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2987-3000 | core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:3015-3027 — 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 `core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2955` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:3002` calls `asList`, `contains`, `getColumnName` and `core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:2968` 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 (26 lines × 2) core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:63— core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:63-88 | core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:99-124 — 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 `core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java:63` 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 first that the copies are not typed on the same thing: the declarations holding them bind `meta` to `ColumnPageEncoderMeta` in one and `ValueEncoderMeta` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10–13 lines × 2) core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:284— core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:284-293 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:1089-1101 — 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 `core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:284` 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–13 lines × 2) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:487— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:487-499 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:537-545 — 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:487` 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 (9–12 lines × 7) core/src/main/java/org/apache/carbondata/core/view/MVManager.java:370— core/src/main/java/org/apache/carbondata/core/view/MVManager.java:370-381 | integration/spark/src/main/java/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java:334-343 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:257-266 | processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:369-379 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:106-115 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:169-178 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:212-220 — there are 7 copies across 5 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/view/MVManager.java:370` 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 (9–12 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:70— core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:70-81 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.java:106-114 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java:76-87 | core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java:48-59 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java` and `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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 `core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollector.java:70` 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 (2–11 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:294— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:294-295 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:386-396 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:197-207 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:351-352 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.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. 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. 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 (10 lines × 8) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:224— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:224-233 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:353-362 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:164-173 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:281-290 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:223-232 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:331-340 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:220-229 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:327-336 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:224` 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–10 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:425— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:425-434 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:422-430 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:403-412 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:398-407 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:425` 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. 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 × 6) core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:363— core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:363-373 | core/src/main/java/org/apache/carbondata/core/view/MVManager.java:371-382 | processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:1124-1134 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:107-116 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:170-179 | streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java:213-221 — there are 6 copies across 4 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 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java:363` 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 (8–9 lines × 6) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:108— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:108-115 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RangeValueFilterExecutorImpl.java:386-394 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:227-234 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:284-291 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:226-233 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:223-230 — 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 6 call sites, so a change lands once.
Duplicated block (9 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:194— core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:194-202 | core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:364-372 | core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFullScanner.java:70-78 — 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 `core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:194` 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, `core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:191` calls `setBlockletId`, `getBlockIdString`, `valueOf` and `core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/BlockletFilterScanner.java:361` 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 (3–9 lines × 3) core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:205— core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:205-207 | core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:231-238 | core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:259-267 — 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 `core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:205` 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. 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 × 8) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:283— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:283-290 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:375-382 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:186-193 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:340-347 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:274-281 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:353-360 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:271-278 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:349-356 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 379 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 (8 lines × 4) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:352— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:352-359 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:379-386 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:428-435 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:454-461 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:352` 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, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:378` calls `isExplicitSorted` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:351` 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 (4–8 lines × 4) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:202— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:202-205 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:217-220 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:237-244 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:254-261 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:202` 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. 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `int` in one and `long` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:223` calls `putLong` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:207` 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 (7 lines × 14) core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:41— core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:41-47 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:66-72 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:98-104 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:123-129 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:152-158 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:177-183 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:206-212 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:231-237 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:311-317 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:336-342 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:365-371 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:390-396 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:419-425 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:444-450 — all 14 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 `core/src/main/java/org/apache/carbondata/core/scan/result/vector/MeasureDataVectorProcessor.java:41` 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 × 11) core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:129— core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:129-135 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:144-150 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:224-230 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:285-291 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:377-383 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:188-194 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java:342-348 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:276-282 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:355-361 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:273-279 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.java:351-357 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/ExcludeFilterExecutorImpl.java:137` calls `decodeAllColumnPages` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecutorImpl.java:151` 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 (6–7 lines × 2) integration/hive/src/main/java/org/apache/carbondata/hive/WritableReadSupport.java:117— integration/hive/src/main/java/org/apache/carbondata/hive/WritableReadSupport.java:117-122 | integration/hive/src/main/java/org/apache/carbondata/hive/WritableReadSupport.java:174-180 — 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 `integration/hive/src/main/java/org/apache/carbondata/hive/WritableReadSupport.java:117` 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 (2–6 lines × 3) core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExecutorUtil.java:67— core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExecutorUtil.java:67-68 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:418-423 | core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java:396-401 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java` and `core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 254 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 `core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExecutorUtil.java:67` 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 (5–6 lines × 3) core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:217— core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:217-222 | core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:224-229 | core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:253-257 — 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 `core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:217` 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 (5 lines × 8) core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:95— core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:95-99 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:106-110 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:117-121 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:128-132 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:139-143 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:150-154 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:161-165 | core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:185-189 — all 8 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 `core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java:95` 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 × 5) core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:326— core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:326-331 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java:316-321 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java:313-318 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java:290-295 | core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/compress/DirectCompressCodec.java:300-305 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java` and `core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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 (2–5 lines × 3) core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:208— core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:208-209 | core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:216-220 | core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:244-248 — 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 `core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java:208` 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 (21 lines × 9) common/src/main/java/org/apache/carbondata/common/exceptions/sql/MalformedCarbonCommandException.java:46— common/src/main/java/org/apache/carbondata/common/exceptions/sql/MalformedCarbonCommandException.java:46-66 | core/src/main/java/org/apache/carbondata/core/datastore/exception/CarbonDataWriterException.java:39-79 | core/src/main/java/org/apache/carbondata/core/datastore/exception/IndexBuilderException.java:42-83 | core/src/main/java/org/apache/carbondata/core/exception/InvalidConfigurationException.java:37-57 | core/src/main/java/org/apache/carbondata/core/localdictionary/exception/DictionaryThresholdReachedException.java:38-79 | core/src/main/java/org/apache/carbondata/core/scan/expression/exception/FilterUnsupportedException.java:37-65 | processing/src/main/java/org/apache/carbondata/processing/loading/exception/BadRecordFoundException.java:36-57 | processing/src/main/java/org/apache/carbondata/processing/loading/exception/CarbonDataLoadingException.java:36-74 | processing/src/main/java/org/apache/carbondata/processing/sort/exception/CarbonSortKeyAndGroupByException.java:39-88 — before extracting anything, compare `common/src/main/java/org/apache/carbondata/common/exceptions/sql/MalformedCarbonCommandException.java` and `core/src/main/java/org/apache/carbondata/core/exception/InvalidConfigurationException.java` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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. 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 (41 lines × 4) core/src/main/java/org/apache/carbondata/core/datastore/exception/CarbonDataWriterException.java:39— core/src/main/java/org/apache/carbondata/core/datastore/exception/CarbonDataWriterException.java:39-79 | core/src/main/java/org/apache/carbondata/core/datastore/exception/IndexBuilderException.java:42-83 | core/src/main/java/org/apache/carbondata/core/localdictionary/exception/DictionaryThresholdReachedException.java:38-79 | processing/src/main/java/org/apache/carbondata/processing/sort/exception/CarbonSortKeyAndGroupByException.java:39-88 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/exception/CarbonDataWriterException.java` and `core/src/main/java/org/apache/carbondata/core/datastore/exception/IndexBuilderException.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 150 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 (66 lines × 2) core/src/main/java/org/apache/carbondata/core/index/dev/cgindex/CoarseGrainIndex.java:1— core/src/main/java/org/apache/carbondata/core/index/dev/cgindex/CoarseGrainIndex.java:1-67 | core/src/main/java/org/apache/carbondata/core/index/dev/fgindex/FineGrainIndex.java:1-66 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/index/dev/cgindex/CoarseGrainIndex.java` and `core/src/main/java/org/apache/carbondata/core/index/dev/fgindex/FineGrainIndex.java` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 `core/src/main/java/org/apache/carbondata/core/index/dev/cgindex/CoarseGrainIndex.java:1` 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 (29 lines × 6) core/src/main/java/org/apache/carbondata/core/datastore/exception/CarbonDataWriterException.java:39— core/src/main/java/org/apache/carbondata/core/datastore/exception/CarbonDataWriterException.java:39-79 | core/src/main/java/org/apache/carbondata/core/datastore/exception/IndexBuilderException.java:42-83 | core/src/main/java/org/apache/carbondata/core/localdictionary/exception/DictionaryThresholdReachedException.java:38-79 | core/src/main/java/org/apache/carbondata/core/scan/expression/exception/FilterUnsupportedException.java:37-65 | processing/src/main/java/org/apache/carbondata/processing/loading/exception/CarbonDataLoadingException.java:36-74 | processing/src/main/java/org/apache/carbondata/processing/sort/exception/CarbonSortKeyAndGroupByException.java:39-88 — before extracting anything, compare `core/src/main/java/org/apache/carbondata/core/datastore/exception/CarbonDataWriterException.java` and `core/src/main/java/org/apache/carbondata/core/datastore/exception/IndexBuilderException.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 150 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 (20 lines × 3) processing/src/main/java/org/apache/carbondata/processing/exception/SliceMergerException.java:37— processing/src/main/java/org/apache/carbondata/processing/exception/SliceMergerException.java:37-56 | processing/src/main/java/org/apache/carbondata/processing/loading/exception/CarbonDataLoadingException.java:36-74 | processing/src/main/java/org/apache/carbondata/processing/sort/exception/CarbonSortKeyAndGroupByException.java:39-88 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/exception/SliceMergerException.java` and `processing/src/main/java/org/apache/carbondata/processing/loading/exception/CarbonDataLoadingException.java` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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. 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 × 5) processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeFinalMergePageHolder.java:95— processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeFinalMergePageHolder.java:95-106 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeInmemoryHolder.java:84-96 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeInmemoryMergeHolder.java:85-96 | processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java:303-314 | processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java:313-324 — before extracting anything, compare `processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/holder/UnsafeSortTempFileChunkHolder.java` and `processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortTempFileChunkHolder.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 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. 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 × 5) integration/hive/src/main/java/org/apache/carbondata/hive/Hive2CarbonExpression.java:118— integration/hive/src/main/java/org/apache/carbondata/hive/Hive2CarbonExpression.java:118-122 | integration/hive/src/main/java/org/apache/carbondata/hive/Hive2CarbonExpression.java:125-129 | integration/hive/src/main/java/org/apache/carbondata/hive/Hive2CarbonExpression.java:132-136 | integration/hive/src/main/java/org/apache/carbondata/hive/Hive2CarbonExpression.java:139-143 | integration/hive/src/main/java/org/apache/carbondata/hive/Hive2CarbonExpression.java:146-150 — 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 (142 lines × 2) integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala:247— integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala:247-388 | integration/spark/src/main/spark3.1/org/apache/spark/sql/SparkVersionAdapter.scala:277-418 — before extracting anything, compare `integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala` and `integration/spark/src/main/spark3.1/org/apache/spark/sql/SparkVersionAdapter.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 171 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 `integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala:247` 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, `integration/spark/src/main/spark3.1/org/apache/spark/sql/SparkVersionAdapter.scala:274` calls `filterNot`, `contains` and `integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala:244` 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 (30 lines × 2) integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala:103— integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala:103-132 | integration/spark/src/main/spark3.1/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala:102-131 — before extracting anything, compare `integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala` and `integration/spark/src/main/spark3.1/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 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.
Duplicated block (22–23 lines × 2) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:245— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:245-266 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala:125-147 — before extracting anything, compare `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala` and `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 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 `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:245` 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 (22 lines × 2) integration/spark/src/main/scala/org/apache/carbondata/view/MVHelper.scala:255— integration/spark/src/main/scala/org/apache/carbondata/view/MVHelper.scala:255-276 | integration/spark/src/main/scala/org/apache/carbondata/view/MVHelper.scala:283-304 — 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 `integration/spark/src/main/scala/org/apache/carbondata/view/MVHelper.scala:255` 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 lines × 3) integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:277— integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:277-295 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala:159-177 | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala:172-190 — before extracting anything, compare `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala` and `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoWithDf.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 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 `integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala:277` 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 (14–17 lines × 2) mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/Printers.scala:202— mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/Printers.scala:202-218 | mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/Printers.scala:220-233 — 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 `mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/Printers.scala:202` 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. 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 (13–14 lines × 3) integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala:312— integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala:312-324 | integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSparkSqlParserUtil.scala:222-235 | integration/spark/src/main/spark3.1/org/apache/spark/sql/SparkVersionAdapter.scala:342-354 — before extracting anything, compare `integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala` and `integration/spark/src/main/spark3.1/org/apache/spark/sql/SparkVersionAdapter.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 171 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 `integration/spark/src/main/common2.3and2.4/org/apache/spark/sql/SparkVersionAdapter.scala:312` 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 (7 lines × 4) integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedCountRDD.scala:49— integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedCountRDD.scala:49-55 | integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedPruneRDD.scala:160-166 | integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedShowCacheRDD.scala:43-49 | integration/spark/src/main/scala/org/apache/carbondata/indexserver/InvalidateSegmentCacheRDD.scala:46-52 — 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.
Duplicated block (71–77 lines × 2) python/pycarbon/core/carbon_reader.py:65— python/pycarbon/core/carbon_reader.py:65-141 | python/pycarbon/core/carbon_reader.py:236-306 — 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 `python/pycarbon/core/carbon_reader.py:65` 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 (33–34 lines × 2) REDACTED:56— REDACTED:56-88 | REDACTED:52-85 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 67 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:89` calls `form_ngram` and `REDACTED:90` 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 (23–26 lines × 2) REDACTED:110— REDACTED:110-135 | REDACTED:96-118 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 67 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:120` calls `list` and `REDACTED:136` 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 (31 lines × 2) python/pycarbon/core/carbon_tf_utils.py:61— python/pycarbon/core/carbon_tf_utils.py:61-91 | python/pycarbon/integration/tensorflow.py:65-95 — before extracting anything, compare `python/pycarbon/core/carbon_tf_utils.py` and `python/pycarbon/integration/tensorflow.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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. 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 × 4) python/pycarbon/reader.py:88— python/pycarbon/reader.py:88-99 | python/pycarbon/reader.py:102-113 | python/pycarbon/reader.py:132-143 | python/pycarbon/reader.py:146-157 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/pycarbon/reader.py:88` 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 (14–18 lines × 2) examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3Example.java:101— examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3Example.java:101-114 | examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3ReadExample.java:84-101 — 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 `examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3Example.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 (16–18 lines × 2) examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3ReadExample.java:45— examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3ReadExample.java:45-62 | examples/spark/src/main/java/org/apache/carbondata/examples/sdk/SDKS3SchemaReadExample.java:36-51 — 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 (52–54 lines × 2) REDACTED:37— REDACTED:37-90 | REDACTED:36-87 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 114 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 `REDACTED:37` 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 (43–46 lines × 2) REDACTED:46— REDACTED:46-88 | REDACTED:42-87 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 134 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 `REDACTED:46` 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, `REDACTED:90` calls `addSparkListener`, `CarbonSparkStreamingListener` and `REDACTED:89` 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 (33–43 lines × 5) examples/spark/src/main/scala/org/apache/carbondata/examples/CustomCompactionExample.scala:45— examples/spark/src/main/scala/org/apache/carbondata/examples/CustomCompactionExample.scala:45-77 | examples/spark/src/main/scala/org/apache/carbondata/examples/DataManagementExample.scala:36-69 | REDACTED:47-80 | examples/spark/src/main/scala/org/apache/carbondata/examples/QuerySegmentExample.scala:44-80 | examples/spark/src/main/scala/org/apache/carbondata/examples/TableLevelCompactionOptionExample.scala:41-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 all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples/spark/src/main/scala/org/apache/carbondata/examples/CustomCompactionExample.scala:45` 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, `REDACTED:43` calls `getInstance`, `addProperty` and `examples/spark/src/main/scala/org/apache/carbondata/examples/DataManagementExample.scala:35` 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 (23 lines × 3) REDACTED:186— REDACTED:186-208 | REDACTED:184-206 | REDACTED:190-212 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 134 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 `REDACTED:186` 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 (13–14 lines × 6) examples/spark/src/main/scala/org/apache/carbondata/examples/DataFrameComplexTypeExample.scala:121— examples/spark/src/main/scala/org/apache/carbondata/examples/DataFrameComplexTypeExample.scala:121-133 | examples/spark/src/main/scala/org/apache/carbondata/examples/DataFrameComplexTypeExample.scala:141-153 | REDACTED:102-115 | REDACTED:99-112 | REDACTED:103-116 | REDACTED:100-113 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 134 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:118` calls `sql` and `REDACTED:120` 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.
Orphaned file integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVMatcher.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/spark/util/AlterTableUtil.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetCommand.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetUtil.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:83— `!dimColEvaluatorInfoList.isEmpty() && !isDimensionPresentInCurrentBlock[0]` appears character-identically in 4 files — core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.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 processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModelBuilder.java:204— `!headerOption.equalsIgnoreCase("true") && !headerOption.equalsIgnoreCase("false")` appears character-identically in 2 files — processing/src/main/java/org/apache/carbondata/processing/loading/model/CarbonLoadModelBuilder.java, processing/src/main/java/org/apache/carbondata/processing/loading/model/LoadOption.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 core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:219— `!isDimensionPresentInCurrentBlock[0] && !isMeasurePresentInCurrentBlock[0]` appears character-identically in 4 files — core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.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 core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/MeasureColumnVisitor.java:67— `!metadata.isIncludeFilter() && !evaluateResultListFinal .contains(CarbonCommonConstants.MEMBER_DEFAULT_VAL)` appears character-identically in 3 files — core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/MeasureColumnVisitor.java, core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/NoDictionaryTypeVisitor.java, core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/RangeNoDictionaryTypeVisitor.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 core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/CustomTypeDictionaryVisitor.java:65— `!metadata.isIncludeFilter() && null != resolvedFilterObject && !resolvedFilterObject .getExcludeFilterList() .contains(CarbonCommonConstants…` appears character-identically in 2 files — core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/CustomTypeDictionaryVisitor.java, core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/RangeDirectDictionaryVisitor.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 core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:96— `!msrColEvalutorInfoList.isEmpty() && !isMeasurePresentInCurrentBlock[0]` appears character-identically in 4 files — core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.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 processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/ArrayParserImpl.java:52— `!value.isEmpty() && !value.equals(nullFormat) && !value.equals(CarbonCommonConstants.SIZE_ZERO_DATA_RETURN)` appears character-identically in 2 files — processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/ArrayParserImpl.java, processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/MapParserImpl.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 core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:903— `(d1.doubleValue() == d2.doubleValue()) || (Double.isNaN(d1) && Double.isNaN(d2))` appears character-identically in 2 files — core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java, core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.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 core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java:326— `(deletedRows == null || deletedRows.isEmpty()) && !(vectorInfo.vector instanceof SequentialFill)` appears character-identically in 5 files — core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaFloatingCodec.java, core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveDeltaIntegralCodec.java, core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveFloatingCodec.java, core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.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 hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonRecordReader.java:87— `(null != carbonInputSplit.getDetailInfo() && carbonInputSplit.getDetailInfo().getBlockFooterOffset() == 0L) || ( null == carbonInputSplit.ge…` appears character-identically in 2 files — hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonRecordReader.java, hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.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 core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java:135— `DataTypeUtil.isPrimitiveColumn(dataType) && dimColEvaluatorInfoList.get(0).getDimension().getDataType() != DataTypes.DATE` appears character-identically in 4 files — core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanEqualFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeGreaterThanFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanEqualFilterExecutorImpl.java, core/src/main/java/org/apache/carbondata/core/scan/filter/executer/RowLevelRangeLessThanFilterExecutorImpl.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 integration/presto/src/main/prestodb/org/apache/carbondata/presto/readers/ComplexTypeStreamReader.java:176— `DataTypes.isArrayType(dataType) || (DataTypes.isStructType(dataType))` appears character-identically in 2 files — integration/presto/src/main/prestodb/org/apache/carbondata/presto/readers/ComplexTypeStreamReader.java, integration/presto/src/main/prestosql/org/apache/carbondata/presto/readers/ComplexTypeStreamReader.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 integration/presto/src/main/prestodb/org/apache/carbondata/presto/impl/CarbonTableReader.java:155— `carbonTableCacheModel != null && carbonTableCacheModel.getCarbonTable().isTransactionalTable()` appears character-identically in 2 files — integration/presto/src/main/prestodb/org/apache/carbondata/presto/impl/CarbonTableReader.java, integration/presto/src/main/prestosql/org/apache/carbondata/presto/impl/CarbonTableReader.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 integration/presto/src/main/prestodb/org/apache/carbondata/presto/impl/CarbonTableReader.java:142— `carbonTableCacheModel == null || !carbonTableCacheModel.isValid()` appears character-identically in 2 files — integration/presto/src/main/prestodb/org/apache/carbondata/presto/impl/CarbonTableReader.java, integration/presto/src/main/prestosql/org/apache/carbondata/presto/impl/CarbonTableReader.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 integration/presto/src/main/prestodb/org/apache/carbondata/presto/CarbondataPageSourceProvider.java:90— `carbonTableReader.config.getPushRowFilter() == null || "false" .equalsIgnoreCase(carbonTableReader.config.getPushRowFilter())` appears character-identically in 2 files — integration/presto/src/main/prestodb/org/apache/carbondata/presto/CarbondataPageSourceProvider.java, integration/presto/src/main/prestosql/org/apache/carbondata/presto/CarbondataPageSourceProvider.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 sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java:114— `dataFiles == null || dataFiles.length == 0` appears character-identically in 5 files — sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java, sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CSVCarbonWriter.java, sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/JsonCarbonWriter.java, sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/ORCCarbonWriter.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 core/src/main/java/org/apache/carbondata/core/datastore/page/LazyColumnPage.java:56— `dataType == DataTypes.BOOLEAN || dataType == DataTypes.BYTE` appears character-identically in 7 files — core/src/main/java/org/apache/carbondata/core/datastore/page/LazyColumnPage.java, core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java, core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/rle/RLECodec.java, core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.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 integration/presto/src/main/prestodb/org/apache/carbondata/presto/CarbondataPageSource.java:159— `dataType == DataTypes.BOOLEAN || dataType == DataTypes.SHORT || dataType == DataTypes.INT || dataType == DataTypes.LONG` appears character-identically in 2 files — integration/presto/src/main/prestodb/org/apache/carbondata/presto/CarbondataPageSource.java, integration/presto/src/main/prestosql/org/apache/carbondata/presto/CarbondataPageSource.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 hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java:170— `dataType == DataTypes.BOOLEAN || dataType == DataTypes.SHORT || dataType == DataTypes.INT || dataType == DataTypes.LONG || dataType == DataT…` appears character-identically in 2 files — hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonVectorizedRecordReader.java, integration/spark/src/main/java/org/apache/carbondata/spark/vectorreader/VectorizedCarbonRecordReader.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 core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java:161— `dataType == DataTypes.BYTE || dataType == DataTypes.BOOLEAN` appears character-identically in 2 files — core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java, core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.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 core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java:161— `dataType == DataTypes.BYTE_ARRAY || dataType == DataTypes.BINARY` appears character-identically in 2 files — core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java, core/src/main/java/org/apache/carbondata/core/metadata/datatype/DataType.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 core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:172— `dataType == DataTypes.DATE || dataType == DataTypes.TIMESTAMP` appears character-identically in 3 files — core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java, core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java, core/src/main/java/org/apache/carbondata/core/util/comparator/Comparator.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 core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java:124— `dataType == DataTypes.FLOAT || dataType == DataTypes.DOUBLE` appears character-identically in 2 files — core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java, core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/EncodingFactory.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 core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/CarbonColumnVectorImpl.java:94— `dataType == DataTypes.INT || dataType == DataTypes.DATE` appears character-identically in 4 files — core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/CarbonColumnVectorImpl.java, integration/presto/src/main/java/org/apache/carbondata/presto/CarbonVectorBatch.java, integration/presto/src/main/prestodb/org/apache/carbondata/presto/readers/ComplexTypeStreamReader.java, integration/presto/src/main/prestosql/org/apache/carbondata/presto/readers/ComplexTypeStreamReader.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 core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java:130— `dataType == DataTypes.LONG || dataType == DataTypes.TIMESTAMP` appears character-identically in 10 files — core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoderMeta.java, core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingFactory.java, core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java, core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.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: Compressor (23 abstract methods) core/src/main/java/org/apache/carbondata/core/datastore/compression/Compressor.java:23— `Compressor` declares 23 abstract methods: `compressByte`, `compressByte`, `compressByte`, `compressDouble`, `compressFloat`, `compressInt`, `compressLong`, `compressShort`, `getName`, `maxCompressedLength`, `rawCompress`, `rawUncompress`, `rawUncompress`, `supportReusableBuffer`, `supportUnsafe`, `unCompressByte`, `unCompressByte`, `unCompressDouble`, `unCompressFloat`, `unCompressInt`, `unCompressLong`, `unCompressShort`, `unCompressedLength`. 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. Those 23 declarations carry 19 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 19 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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: CarbonFile (42 abstract methods) core/src/main/java/org/apache/carbondata/core/datastore/filesystem/CarbonFile.java:28— `CarbonFile` declares 42 abstract methods: `createNewFile`, `createNewFile`, `createNewLockFile`, `delete`, `deleteFile`, `exists`, `getAbsolutePath`, `getCanonicalPath`, `getDataInputStream`, `getDataInputStream`, `getDataInputStream`, `getDataOutputStream`, `getDataOutputStream`, `getDataOutputStream`, `getDataOutputStream`, `getDataOutputStream`, `getDataOutputStreamUsingAppend`, `getDefaultReplication`, `getLastModifiedTime`, `getLength`, `getLocations`, `getName`, `getParentFile`, `getPath`, `getSize`, `isDirectory`, `isFileExist`, `isFileExist`, `isFileModified`, `listDirs`, `listFiles`, `listFiles`, `listFiles`, `listFiles`, `listFiles`, `locationAwareListFiles`, `mkdirs`, `renameForce`, `renameTo`, `setLastModifiedTime`, and 2 more. 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. Those 42 declarations carry 30 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 30 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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: ColumnPageValueConverter (16 abstract methods) core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPageValueConverter.java:26— `ColumnPageValueConverter` declares 16 abstract methods under just 4 distinct name(s): `decodeAndFillVector`, `decodeDouble`, `decodeDouble`, `decodeDouble`, `decodeDouble`, `decodeDouble`, `decodeDouble`, `decodeLong`, `decodeLong`, `decodeLong`, `encode`, `encode`, `encode`, `encode`, `encode`, `encode`. 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. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 4 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Fat interface: CarbonColumnVector (41 abstract methods) core/src/main/java/org/apache/carbondata/core/scan/result/vector/CarbonColumnVector.java:27— `CarbonColumnVector` declares 41 abstract methods: `getBlockDataType`, `getData`, `getDictionaryVector`, `getType`, `hasDictionary`, `isNull`, `putAllByteArray`, `putArray`, `putBoolean`, `putByte`, `putByteArray`, `putByteArray`, `putByteArray`, `putBytes`, `putDecimal`, `putDecimals`, `putDouble`, `putDoubles`, `putDoubles`, `putFloat`, `putFloats`, `putInt`, `putInts`, `putInts`, `putLong`, `putLongs`, `putLongs`, `putNotNull`, `putNotNull`, `putNull`, `putNulls`, `putObject`, `putShort`, `putShorts`, `putShorts`, `reset`, `setBlockDataType`, `setCarbonDataFileWrittenVersion`, `setDictionary`, `setFilteredRowsExist`, and 1 more. 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. Those 41 declarations carry 34 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 34 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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: GenericDataType<T> (17 abstract methods) processing/src/main/java/org/apache/carbondata/processing/datatypes/GenericDataType.java:35— `GenericDataType<T>` declares 17 abstract methods: `addChildren`, `deepCopy`, `getAllPrimitiveChildren`, `getColsCount`, `getColumnNames`, `getColumnarDataForComplexType`, `getComplexColumnInfo`, `getDataCounter`, `getDepth`, `getIsColumnDictionary`, `getMaxOutputArrayIndex`, `getName`, `getParentName`, `parseComplexValue`, `setOutputArrayIndex`, `setSurrogateIndex`, `writeByteArray`. 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: CarbonMetaStore (20 abstract members) integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonMetaStore.scala:35— `CarbonMetaStore` declares 20 abstract members: `lookupRelation`, `lookupRelation`, `lookupAnyRelation`, `createCarbonRelation`, `tableExists`, `tableExists`, `updateTableSchemaForAlter`, `updateTableSchema`, `revertTableSchemaInAlterFailure`, `saveToDisk`, `generateTableSchemaString`, `removeTableFromMetadata`, `updateMetadataByThriftTable`, `isTablePathExists`, `dropTable`, `isSchemaRefreshed`, `isReadFromHiveMetaStore`, `listAllTables`, `getThriftTableInfo`, `createCarbonDataSourceHadoopRelation`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. Those 20 declarations carry 18 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 18 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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.
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file REDACTED:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Silent fallback default on parse failure core/src/main/java/org/apache/carbondata/core/scan/expression/ExpressionResult.java:570— `compareTo` returns `-1` when `ParseException | FilterIllegalMemberException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java:855— `compareFilterKeyBasedOnDataType` returns `-1` when `ParseException | NumberFormatException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: core/src/main/java/org/apache/carbondata/core/index/IndexInputFormat.java, core/src/main/java/org/apache/carbondata/core/util/ObjectSerializationUtil.java. Pair on, review, or document these before any departure.
Documentation: no build, run or usage example README.md:1— the repository holds project manifests and neither `README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D21 · Naming Consistency· `getTaskNumberBasedOnID` spells `ID` where 107 names in the project spell it `Id` · ×1
`getTaskNumberBasedOnID` spells `ID` where 107 names in the project spell it `Id` integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala:736— 107 of 109 names in project repository spell the token `Id` (107 of 109; unit: names in project repository containing `Id`). Peers: CDCExample.getId (examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:90); CDCExample.getAndRemoveId (examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:91); CDCExample.addId (examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:92); CDCExample.removeId (examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:93); CDCExample.maxId (examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:95). Rename to `getTaskNumberBasedOnId`. [rule N6]
D21 · Naming Consistency· `getDataFrameWithTupleID` spells `ID` where 107 names in the project spell it `Id` · ×1
`getDataFrameWithTupleID` spells `ID` where 107 names in the project spell it `Id` integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala:90— 107 of 109 names in project repository spell the token `Id` (107 of 109; unit: names in project repository containing `Id`). Peers: CDCExample.getId (examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:90); CDCExample.getAndRemoveId (examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:91); CDCExample.addId (examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:92); CDCExample.removeId (examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:93); CDCExample.maxId (examples/spark/src/main/scala/org/apache/carbondata/examples/CDCExample.scala:95). Rename to `getDataFrameWithTupleId`. [rule N6]
D21 · Naming Consistency· `cleanFilesForMv` spells `Mv` where 21 names in the project spell it `MV` · ×1
`cleanFilesForMv` spells `Mv` where 21 names in the project spell it `MV` integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/CleanFilesPostEventListener.scala:92— 21 of 22 names in project repository spell the token `MV` (21 of 22; unit: names in project repository containing `MV`). Peers: MVCatalogInSpark.isMVInSync (integration/spark/src/main/scala/org/apache/carbondata/view/MVCatalogInSpark.scala:89); MVCatalogInSpark.getMVWithSameQueryPresent (integration/spark/src/main/scala/org/apache/carbondata/view/MVCatalogInSpark.scala:204); org.apache.carbondata.view.CreateMVPreExecutionEvent (integration/spark/src/main/scala/org/apache/carbondata/view/MVEvents.scala:28); org.apache.carbondata.view.CreateMVPostExecutionEvent (integration/spark/src/main/scala/org/apache/carbondata/view/MVEvents.scala:37); org.apache.carbondata.view.UpdateMVPreExecutionEvent (integration/spark/src/main/scala/org/apache/carbondata/view/MVEvents.scala:46). Rename to `cleanFilesForMV`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 3 of 19 project(s) overshoot their size bounds, lowering Project Cohesion to 6.8/10. The most over is `core` (97548 LoC, 633 module-visible types across 125 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Concentrated knowledge decay — 926 of 938 significant files have no living knowledge, while the repository is still being changed at a low rate (1 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 926 separate risks. Counted over 938 of the 1405 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
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.
Logging is not universal — Only 13/15 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `Agent_module`.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Nullable reference types not enabled everywhere — 0/1 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
Skipped (documented): testCreateHashID geo/src/test/java/org/apache/carbondata/geo/QuadTreeClsTest.java:119— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
Skipped (documented): testGetRange geo/src/test/java/org/apache/carbondata/geo/QuadTreeClsTest.java:296— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
Skipped (documented): testInsertBiggerPolygon geo/src/test/java/org/apache/carbondata/geo/QuadTreeClsTest.java:86— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
Skipped (documented): testInsertLessThan3Points geo/src/test/java/org/apache/carbondata/geo/QuadTreeClsTest.java:104— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
Skipped (documented): testInsertPolygonFullRange geo/src/test/java/org/apache/carbondata/geo/QuadTreeClsTest.java:67— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
Skipped (documented): testQueryOne geo/src/test/java/org/apache/carbondata/geo/QuadTreeClsTest.java:171— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
Off the main sequence: carbondata-common — carbondata-common: abstractness 0.24, instability 0.00, distance 0.76 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
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.
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.
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.
Run 01a1d90d-2d7f-7b6b-ad29-d926705baa45 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 59 · Warnings: 1954 · Recommendations: 990 · Info: 7 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 07:54 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.