File size: 14,813 Bytes
6759906 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# CodeReality-1T Dataset Card
## Dataset Summary
**CodeReality-1T** is a large-scale, deliberately noisy code repository dataset designed for robust AI research. The dataset contains **397,475 repositories** across **21 programming languages** in **3.05 TB** of uncompressed data, specifically curated to test robustness, data curation methods, and real-world code understanding.
- **Total Size**: 3.05 TB (uncompressed)
- **Repositories**: 397,475
- **Files**: 52,692 JSONL archives
- **Languages**: 21 detected languages
- **Status**: `deliberately_noisy: true` (research-only)
- **Version**: 1.0.0
## Dataset Structure
### Data Format
- **Format**: JSONL (JSON Lines) archives
- **Repository Structure**: Each line contains complete repository metadata including:
- Source code files with full paths
- Git commit history and messages
- Issue tracking data
- Repository metadata (stars, forks, topics)
- License information (when available)
### Language Distribution
Based on complete analysis of all 397,475 repositories:
| Language | Repositories | Percentage |
|----------|-------------|------------|
| Unknown | 389,941 | 98.1% |
| Python | 4,738 | 1.2% |
| Shell | 4,505 | 1.1% |
| C | 3,969 | 1.0% |
| C++ | 3,339 | 0.8% |
| HTML | 2,487 | 0.6% |
| JavaScript | 2,394 | 0.6% |
| Go | 2,110 | 0.5% |
| Java | 2,026 | 0.5% |
| Others | 1,966 | 0.5% |
### Domain Distribution
Cross-domain analysis reveals:
| Domain | Repositories | Cross-Domain |
|--------|-------------|--------------|
| General | 389,941 | - |
| Database | 7,534 | ✓ |
| AI/ML | 7,534 | ✓ |
| Systems | 7,534 | ✓ |
| Security | 7,534 | ✓ |
| Web | 7,429 | ✓ |
| Enterprise | 7,072 | ✓ |
| Gaming | 6,538 | ✓ |
| Mobile | 5,705 | ✓ |
| Scientific | 5,386 | ✓ |
| DevOps | 4,600 | ✓ |
**Cross-domain repositories**: 59,332 (14.9%)
## Motivation
Real-world code repositories are inherently messy, containing:
- Duplicate code and forked repositories
- Incomplete or experimental code snippets
- Mixed licensing conditions
- Buggy commits and partial implementations
- DevOps configurations and non-code artifacts
CodeReality-1T embraces this complexity as a **research laboratory** for:
1. **Robustness Testing**: How do code LLMs perform on noisy, real-world data?
2. **Data Curation Methods**: Developing better filtering and cleaning techniques
3. **License Compliance**: Research into automated license detection and filtering
4. **Bug-Fix Alignment**: Studying commit patterns for before/after code analysis
5. **NL↔Code Tasks**: Natural language to code alignment through issues, commits, and documentation
## Collection Process
### Sources
- Public GitHub repositories
- GitLab public projects
- Open source package registries
- Developer forum code dumps
### Acquisition Pipeline
1. **Repository Harvesting**: Systematic collection from public sources
2. **Metadata Extraction**: Complete git history, issues, documentation
3. **Format Standardization**: Conversion to JSONL with consistent schema
4. **Indexing**: SHA256 checksums and comprehensive cataloging
### Filtering Strategy
**Deliberately Minimal Filtering** to preserve research value:
- ✅ **Kept**: Forks, duplicates, incomplete code, experimental projects
- ✅ **Kept**: Repositories with unknown or missing licenses
- ✅ **Kept**: Multi-language and cross-domain projects
- ❌ **Excluded**: Only explicitly "all rights reserved" repositories
### Quality Assurance
- **100% Coverage**: Complete analysis without sampling
- **Integrity Verification**: SHA256 checksums for all files
- **Comprehensive Indexing**: Full metadata extraction and validation
- **Reproducible Pipeline**: Open source tools only (enry, scancode-toolkit, PyDriller)
## Technical Characteristics
### File Type Distribution (Top 15)
| Extension | Files | Description |
|-----------|-------|-------------|
| .h | 34,195,463 | C/C++ headers |
| .go | 18,691,961 | Go source |
| .java | 18,109,114 | Java source |
| .c | 16,700,728 | C source |
| .py | 15,650,558 | Python source |
| .ts | 10,271,948 | TypeScript |
| .cpp | 9,768,211 | C++ source |
| .md | 7,815,310 | Markdown docs |
| .rs | 7,280,129 | Rust source |
| .rb | 6,309,814 | Ruby source |
| .json | 5,888,235 | JSON data |
| .txt | 4,627,011 | Text files |
| .rst | 4,250,204 | reStructuredText |
| .js | 4,125,928 | JavaScript |
| .scala | 3,619,096 | Scala source |
### Build Systems Detected
| Build System | Occurrences | Ecosystem |
|--------------|-------------|-----------|
| Makefile | 619,857 | C/C++/Universal |
| package.json | 510,769 | Node.js/npm |
| build.gradle | 430,334 | Java/Android |
| pom.xml | 136,386 | Java/Maven |
| requirements.txt | 57,793 | Python/pip |
### Development Patterns Analysis
Based on **49,140 commit messages** analyzed:
| Pattern | Count | Percentage |
|---------|-------|------------|
| Bug fixes | 21,570 | 43.9% |
| New features | 11,580 | 23.6% |
| Testing | 6,483 | 13.2% |
| Documentation | 4,695 | 9.6% |
| Improvements | 4,477 | 9.1% |
| Refactoring | 335 | 0.7% |
## Uses
### Primary Research Applications
1. **Code LLM Robustness**: Testing model performance on noisy, real-world data
2. **Data Curation Research**: Developing automated filtering and cleaning methods
3. **License Detection**: Training and evaluating license classification systems
4. **Bug-Fix Studies**: Before/after commit analysis for automated debugging
5. **Cross-Language Analysis**: Multi-language repository understanding
6. **DevOps Research**: Configuration file analysis and validation
### Specific Task Examples
- **Deduplication**: Identify and remove duplicate code across repositories
- **License Classification**: Automated SPDX license detection and compliance
- **Issue→Code Retrieval**: Generate code solutions from natural language descriptions
- **Commit Message Generation**: Automatic commit message creation from code diffs
- **Build System Analysis**: Configuration file validation and optimization
- **Security Scanning**: Identifying potential vulnerabilities and secrets
## Limitations
### License Coverage
- **0% License Detection Rate**: All repositories marked as "Unknown" in current release
- **Manual Review Required**: Commercial use requires individual license verification
- **Research Use Recommended**: Dataset optimized for academic and research applications
### Data Quality Issues
- **98.1% Unknown Language**: Large portion of repositories with undetected language
- **Deliberately Noisy**: Intentionally includes incomplete, experimental, and duplicate code
- **Exact Duplicates**: 0% exact SHA256 duplicates detected across file-level content
- **Semantic Duplicates**: ~18% estimated semantic duplicates and forks preserved by design (includes repository forks, copy-pasted code, and similar implementations)
- **Intentional Design**: Duplicates are preserved to study real-world code distribution and test deduplication algorithms
- **Security Concerns**: Contains potential API keys, passwords, and tokens (see Security Analysis)
### Representation Bias
- **Language Skew**: Heavy bias toward C/C++, Python, JavaScript ecosystems
- **Geographic Bias**: Primarily English-language repositories and comments
- **Temporal Bias**: Snapshot from specific time period, may not reflect current practices
### Scale Limitations
- **Processing Requirements**: 3.05 TB requires significant storage and computational resources
- **Filtering Needed**: Most use cases will require substantial preprocessing
- **Network Intensive**: Large download size may limit accessibility
## Security Analysis
### Detected Security Patterns
Comprehensive security scan revealed:
| Pattern Type | Occurrences | Risk Level |
|--------------|-------------|------------|
| Password patterns | 1,231,942 | High |
| Token patterns | 353,266 | High |
| Secret patterns | 71,778 | Medium |
| API key patterns | 4,899 | Critical |
### Security Recommendations
⚠️ **WARNING**: This dataset contains potential secrets and should be used for research only
- **No Production Use**: Never deploy code from this dataset without thorough security review
- **Credential Scanning**: Always scan extracted code for hardcoded credentials
- **Isolation Required**: Use in sandboxed environments only
- **Legal Compliance**: Verify licensing before any commercial application
## Ethical Considerations
### Privacy & Consent
- **Public Data Only**: All repositories were publicly available at collection time
- **No Private Information**: No deliberately collected private repositories or data
- **Takedown Policy**: DMCA and removal requests will be honored promptly
### Bias & Fairness
- **Representation Issues**: Dataset reflects existing biases in open source development
- **Language Barriers**: Primarily English-language codebases and documentation
- **Economic Bias**: Overrepresents well-resourced development environments
### Legal Compliance
- **License Uncertainty**: Many repositories lack clear licensing information
- **Commercial Risk**: Use in commercial products requires individual license verification
- **Attribution**: Original repository attribution preserved in metadata
## Evaluation Framework
### Evaluation Subset (Available)
A curated evaluation subset is now available:
- **Size**: 19.0 GB (323 files, 2,049 repositories)
- **Selection Criteria**:
- Research value scoring with diversity sampling
- Repositories with enhanced metadata and commit history
- Cross-language implementations and multi-repo files
- Complete build system configurations
- **Location**: `/eval/subset/` with comprehensive metadata
### Baseline Tasks & Results
1. **Code Completion**: Pass@k evaluation → [Results: 14.2% Pass@1](../eval/results/code_completion_sample_results.json)
2. **License Classification**: Automated detection → [Results: 9.8% accuracy](../eval/results/license_detection_sample_results.json)
3. **Bug Detection**: Commit history analysis → [Framework available](../eval/benchmarks/bug_detection_benchmark.py)
4. **Cross-Language Translation**: Code equivalence → [Framework available](../eval/benchmarks/cross_language_translation_benchmark.py)
5. **Complete Analysis**: [Summary CSV](../eval/results/benchmark_summary.csv) for research comparison
### Metrics
- **Functional Correctness**: Pass@k, CodeBLEU, execution success rate
- **Information Retrieval**: MRR, MAP, BLEU scores for search and generation
- **Classification Accuracy**: Precision, recall, F1 for license and bug detection
## Distribution
### Access Information
**📦 Full Dataset (3.05 TB)**:
- **Status**: Hosting in progress on Hugging Face Hub
- **Content**: Complete 397,475 repositories, 52,692 JSONL files
- **Distribution**: `codereality/codereality-1t` (pending)
- **Alternatives**: Torrent and S3 bucket options planned
**📋 Evaluation Subset (19.0 GB)**:
- **Status**: Available now
- **Content**: 2,049 curated repositories, 323 JSONL files
- **Location**: `/eval/subset/` directory
- **Purpose**: Research benchmarks and evaluation tasks
**📚 Documentation & Tools**:
- **GitHub Repository**: Complete analysis scripts and benchmarks
- **Benchmark Results**: Sample baselines and comparison data
### File Organization
```
codereality-1t/
├── data/
│ ├── *.jsonl # Repository archives (52,692 files)
│ └── manifest.json # File checksums and metadata
├── analysis/
│ ├── dataset_index.json # Complete file index
│ ├── metrics.json # Analysis results
│ └── language_stats.json # Language distribution
├── docs/
│ ├── DATASET_CARD.md # This document
│ ├── LICENSE.md # Dataset license
│ └── USAGE_EXAMPLES.md # Code examples
└── eval/
├── subset/ # Evaluation subset (15.1GB, available)
└── benchmarks/ # Evaluation scripts
```
### Checksums & Integrity
- **Hash Algorithm**: SHA256
- **Manifest File**: Complete checksums for all 52,692 JSONL files
- **Verification**: `sha256sum -c manifest.json`
## Maintenance & Support
### Contact Information
- **Primary Maintainer**: Vincenzo Gallo ([email protected])
- **Issue Tracker**: https://github.com/vinsguru/codereality-1t/issues
- **Repository**: https://github.com/vinsguru/codereality-1t
### Update Policy
- **Version 1.0.0**: Initial deliberately noisy release
- **Future Versions**: May include cleaned/curated variants
- **Community Contributions**: Cleaning scripts, evaluation tasks, and analysis tools welcome
### Contribution Guidelines
1. **Bug Reports**: Use GitHub issues for data quality problems
2. **Enhancement Requests**: Suggest improvements via pull requests
3. **Research Papers**: Share research using this dataset for community benefit
4. **Derived Datasets**: Coordinate to avoid duplication and ensure proper attribution
## Version History
### v1.0.0 (Current)
- **Release Date**: September 2025
- **Content**: Complete 3.05 TB deliberately noisy dataset
- **Analysis**: Full BigCode-compliant metrics on all 397,475 repositories
- **Status**: Research-ready with comprehensive documentation
### Community-Driven Roadmap
CodeReality-1T is a **living dataset** that evolves with community contributions:
- **v1.1.0 (Q1 2025)**: Enhanced evaluation subset with community feedback, improved benchmarks, and additional task frameworks
- **v1.2.0 (Q2 2025)**: License detection improvements, deduplication analysis tools, semantic duplicate estimation, and community filtering scripts
- **v2.0.0 (Q3 2025)**: Community-curated clean variant with quality filters, improved metadata, and production-ready subset
**Community contributions actively encouraged**: cleaning scripts, new benchmarks, evaluation tasks, data curation improvements, and quality assessment tools.
## Citation
```bibtex
@misc{codereality2025,
title={CodeReality-1T: A Large-Scale Deliberately Noisy Dataset for Robust Code Understanding},
author={Vincenzo Gallo},
year={2025},
publisher={Hugging Face},
howpublished={\\url{https://huggingface.co/vinsblack}},
note={Version 1.0.0}
}
```
## License
This dataset is released under [License Terms] with the following considerations:
- **Research Use**: Freely available for academic and research purposes
- **Commercial Use**: Requires individual license verification for each repository
- **Attribution**: Please cite this dataset card and preserve original repository attribution
- **Liability**: Provided as-is with no warranties regarding licensing or content accuracy
---
*Dataset Card generated automatically from comprehensive analysis of all 397,475 repositories using BigCode-compliant methodology. Analysis completed in 63.7 hours with 100% coverage and no sampling.* |