AbsaOSS/cobrix
54.0
Adequate · 7 November 2026
35.5k
lines of production code
Scala
with Java
4
measurements over time
What this system is
Features
Add COBOL copybook and source examples for data type coverage
The examples/example\_data directory now includes new COBOL copybook (.cpy) and source (.cob) files that demonstrate various data types and structures, including binary, BCD, and string formats, as well as redefines and occurs clauses. These files serve as reference data for parsing and encoding examples.
_examples/example\data · high confidence
Added example COBOL copybook with Apache 2.0 license
The example application now includes a sample COBOL copybook (example\_copybook.cpy) in the resources directory, defining a COMPANY-DETAILS structure with fields for company identification, static details, and contact information. This file is distributed under the Apache License, Version 2.0, ensuring proper licensing compliance for users of the example.
examples/spark-cobol-app/src/main/resources · high confidence
Added performance benchmark data and visualization scripts
The performance directory now includes raw benchmark data (CSV) and Gnuplot scripts (.plot) for three experiments: raw records processing, multi-segment narrow records, and multi-segment wide records. These files enable the generation of SVG charts visualizing processing time, throughput (in records per second and MB/s), and efficiency against the number of executors. Helper scripts (generate.cmd and generate.sh) are provided to automate the chart generation using these data sources.
performance · high confidence
Initial Cobrix parser and reader architecture
This release introduces the foundational Cobrix library for parsing COBOL copybooks and reading mainframe data into Spark DataFrames. The parser module adds an ANTLR-based grammar to build an Abstract Syntax Tree (AST) from copybooks, supporting various COBOL data types (COMP-1 through COMP-9, UTF-16, EBCDIC) and policies for comments, fillers, and metadata. The reader module provides extractors for fixed, variable, and ASCII record formats, along with configuration for record length fields, indexing, and corrupt field handling. This initial import establishes the core components for COBOL data ingestion.
repository · high confidence
Initial project scaffolding and repository setup
The repository is initialized with the core project structure, including the Apache 2.0 license, a Maven-based build configuration (POM), and a Jenkinsfile for CI/CD. Documentation is established via a comprehensive README.md detailing usage with Spark, linking coordinates, and examples. Build tooling is configured with sbt scripts for publishing and dependency management, alongside a .fossa.yml file for open-source license compliance scanning. Development environment hygiene is improved by updating .gitignore to exclude IDE-specific files (VS Code, Eclipse, IntelliJ) and OS artifacts.
(repo-wide) · high confidence
Introduce builder-based API and new reader classes for Spark integration
The spark-cobol module now provides a new builder-based API for configuring and loading COBOL data, including \SparkCobolProcessor\ for raw record processing and \SparkCobolBuilder\ for creating DataFrames from RDDs. Additionally, new reader classes such as \FixedLenNestedReader\, \FixedLenTextReader\, and \VarLenNestedReader\ have been added to handle fixed and variable length records, supporting both binary and text data sources. These changes enhance the flexibility and usability of the spark-cobol connector by offering more granular control over data processing and schema generation.
spark-cobol/src/main · high confidence
New standalone example application for Cobrix on Spark
The spark-cobol-app module now includes a standalone example application that demonstrates how to read mainframe data into Spark DataFrames. This includes a custom record header parser for non-standard RDW headers, a hierarchical record reader example showing segment joining, and a basic type variety example for fixed-length records.
examples/spark-cobol-app/src/main/scala · high confidence
Architecture
Build infrastructure refactored into modular sbt configuration files
The project's build configuration has been reorganized into dedicated Scala files within the project directory to improve maintainability and support cross-compilation. Dependencies are now centrally managed in Dependencies.scala, which defines specific versions for libraries such as Jackson (2.15.4), ANTLR (4.9.3), and BouncyCastle (1.84), along with a version matrix for Spark (2.4.8, 3.4.4, 3.5.7) mapped to Scala versions (2.11, 2.12, 2.13). Compiler options are standardized in ScalacOptions.scala, enforcing UTF-8 encoding and specific JVM targets. Additionally, the build now generates a cobrix\_build.properties resource containing the project version and build timestamp, and integrates custom JaCoCo plugins for code coverage reporting.
project · high confidence
Behavioural changes
COBOL copybook parser replaced with ANTLR-based implementation
The \cobol-parser\ module now uses a new ANTLR 4 grammar (with generated Java lexer and parser classes) to parse COBOL copybooks, replacing the previous parsing logic. This change introduces a dedicated \Logging\ trait for SLF4J integration and a custom JSON parser to handle configuration, providing more robust syntax error reporting and laying the groundwork for advanced parsing features.
cobol-parser · high confidence
Cobrix examples moved to a separate project
The example applications and test data generators have been relocated from the main production codebase into a new, standalone \examples/examples-collection\ project. This change isolates demonstration code—including Spark jobs for reading COBOL files, streaming examples, and various data generators—from the core library, simplifying the main build and clarifying the boundary between production artifacts and usage samples.
examples/examples-collection · high confidence
Test coverage
Added integration tests for non-terminals, custom RDW parsers, copybook merging, file headers, and hierarchical data; Added mock record extractors and AST transformer for testing custom parsing logic; Added regression tests for Cobrix source reading behaviors; Added test configuration for SLF4J logging; Added test data and expected outputs for copybook parsing scenarios; Added test fixtures for temporary file creation and binary/text comparison; Added test infrastructure and schema validation tests for Spark-Cobol; Added test resources for copybook and GPG key handling; Added test runners for Spark COBOL example applications; Added test stubs for CobolSchema and FixedLenReader; Added test suites for COBOL writer capabilities; Added test utilities and suites for custom code pages, LRU caching, and record header parsing; Added test utilities for running Spark jobs locally; Added tests for COBOL record serialization to JSON and XML; Added tests for COBOL writing parameter validation; Added tests for FileStreamer behavior; Added unit tests for ASCII text file parsing; Added unit tests for Spark-Cobol utility classes; Added unit tests for SparkCobolProcessor, schema generation, and row extraction; Added unit tests for index building and location balancing; Added unit tests for spark-cobol source components; Updated test logging configuration to suppress noisy output.
Dependencies
Cobrix build system upgraded to Scala 2.12/2.13 and Spark 3.5 with ANTLR shading
The project's build configuration (build.sbt and POM files) has been updated to target Scala 2.12.21 and 2.13.18, and Spark 3.5.7. The \cobol-parser\ module now includes ANTLR 4.9.3 and applies shading rules to rename the ANTLR runtime package to \za.co.absa.cobrix.cobol.parser.shaded\, preventing binary incompatibilities with Spark's bundled ANTLR version. Additionally, the \spark-cobol\ module now includes Bouncy Castle for GPG support and marks Spark dependencies as provided.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 53 → 54 (+1.2)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 49 → 49 (-0.0)
- Architecture 93 → 92 (-0.8)
- Maturity 59 → 63 (+4.0)
- Readiness 47 → 47 (+0.0)
- Security 85 → 77 (-7.5)
Resolved (19)
- Change coupling: copybookLexer.java ↔ copybookParser.java (cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookLexer.java)
- Dependency hygiene PARTLY measured — Maven build resolved part of the dependency graph, currency reported but not scored
- Documentation: no project overview (README.md)
- Hotspot: cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookParser.java (cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookParser.java)
- Hotspot: spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/writer/NestedRecordCombiner.scala (spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/writer/NestedRecordCombiner.scala)
- Outdated (compile): org.antlr:antlr4-runtime
- Outdated (compile): org.slf4j:slf4j-api
- Outdated (test): com.chuusai:shapeless_2.12
- Outdated (test): net.bytebuddy:byte-buddy
- Outdated (test): net.bytebuddy:byte-buddy-agent
- Outdated (test): org.mockito:mockito-core
- Outdated (test): org.objenesis:objenesis
- Outdated (test): org.scala-lang.modules:scala-xml_2.12
- Outdated (test): org.scodec:scodec-bits_2.12
- Outdated (test): org.scodec:scodec-core_2.12
- Outdated (test): org.slf4j:slf4j-simple
- Repeated repair: cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/reader/iterator/VRLRecordReader.scala (cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/reader/iterator/VRLRecordReader.scala)
- Repeated repair: spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/source/streaming/BufferedFSDataInputStream.scala (spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/source/streaming/BufferedFSDataInputStream.scala)
- Split cobol-parser
New (3)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Duplicated block (7 lines × 2) (cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/ParserVisitor.scala)
- Projects may be oversized for their cohesion
Changes since last survey
- 5 commits — 5 feature/other, 0 fixes
By area
- cobol-parser/src — 3 commits
- (root) — 1 commit
- examples/examples-collection — 1 commit
Notable commits
- change: #878 Add field name assertions to duplicate clause syntax error tests, and add a test for duplicate USAGE clauses in primitive fields.
- change: #878 Replace assertions in the copybook parser with descriptive syntax errors for duplicate REDEFINES, USAGE, OCCURS, VALUE, SIGN SEPARATE, and PIC clauses, and add tests.
- change: Add a test for parsing copybooks that contain a full line of unknown characters.
- change: Bump org.apache.spark:spark-core_2.12 from 3.5.7 to 3.5.8
- change: Bump org.apache.spark:spark-core_2.12 in /examples/examples-collection
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
AbsaOSS/cobrix was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 7 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 38736b261eb411fe83b0f2882f9a211cb527b204 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-5f8314471808.