|
Download README.md from alucent/mirror-Code_Debugging_QA: direct link, hf CLI and curl.
- Browser
- Download file 3.29 kB
-
https://huggingface.co/datasets/alucent/mirror-Code_Debugging_QA/resolve/main/README.md
- Command line
-
hf download hf://datasets/alucent/mirror-Code_Debugging_QA/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/alucent/mirror-Code_Debugging_QA/resolve/main/README.md
3.29 kB
| license: mit | |
| # Code Debugging Q&A Dataset | |
| *By [dmeldrum6](https://huggingface.co/dmeldrum6)* | |
| A curated dataset of 1,073 question-and-answer pairs covering common debugging scenarios across Python, JavaScript, SQL, and Bash. Designed for fine-tuning and instruction-tuning language models on code debugging tasks. | |
| ## Dataset Summary | |
| Each pair presents a realistic bug symptom as a question and a structured answer containing: | |
| - A **buggy code block** demonstrating the problem | |
| - A **corrected code block** showing the fix | |
| - A **plain-language explanation** of the root cause | |
| ## Languages and Coverage | |
| | Language | Pairs | Topics Covered | | |
| |------------|-------|----------------| | |
| | Python | 297 | TypeError, ValueError, scope errors, mutable default arguments, missing returns, off-by-one, loop logic | | |
| | JavaScript | 290 | Type coercion, undefined/null, typeof, async/await, Promises, var/let/const hoisting, closures, DOM, array methods | | |
| | SQL | 298 | JOIN types, NULL handling, WHERE clause errors, GROUP BY, aggregate functions, type casting, subqueries | | |
| | Bash | 188 | Variable quoting, word splitting, single vs double quotes, `$()` vs backticks, `[` vs `[[`, exit codes, file operations | | |
| | **Total** | **1,073** | | | |
| ## Data Format | |
| The dataset is provided as a JSON array. Each record contains two fields: | |
| ```json | |
| [ | |
| { | |
| "question": "Why does my Python function always return None even though it prints the correct value?", | |
| "answer": "The function is missing a return statement...\n\nBuggy code:\n```python\ndef add(a, b):\n print(a + b)\n```\n\nCorrected code:\n```python\ndef add(a, b):\n return a + b\n```\n\nRoot cause: `print()` displays a value but does not return it. Without an explicit `return`, Python returns `None` by default." | |
| } | |
| ] | |
| ``` | |
| ## Dataset Creation | |
| ### Generation | |
| Q&A pairs were generated in thematic batches using a structured topic prompt that explicitly required: | |
| 1. A question describing a realistic bug symptom | |
| 2. A fenced code block showing the buggy code | |
| 3. A fenced code block showing the corrected code | |
| 4. A root cause explanation | |
| ### Cleaning | |
| The raw generated dataset was processed as follows: | |
| - **Deduplication**: Near-duplicate questions (matching on first 60 characters) were identified and the shorter/less detailed copy removed | |
| - **Factual review**: Automated checks were run for common LLM errors in debugging explanations (e.g. `typeof null`, `COUNT(*)` vs `COUNT(col)` NULL behaviour, hoisting rules, range() semantics) | |
| - **Manual correction**: One confirmed factual error was corrected — a JavaScript hoisting explanation that conflated `var` (hoisted, initialized to `undefined`) with `const` (Temporal Dead Zone, throws `ReferenceError`) | |
| ### Quality Notes | |
| - All answers contain at least two fenced code blocks (buggy + fixed) | |
| - Difficulty ranges from beginner to intermediate; advanced topics (e.g. metaclasses, complex query optimisation) are not covered | |
| - SQL examples use generic ANSI SQL; minor syntax variations may occur across dialects (MySQL, PostgreSQL, SQLite) | |
| - Bash examples target bash 4+; some `[[` behaviour may differ in POSIX sh | |
| ## Intended Uses | |
| **Suitable for:** | |
| - Fine-tuning small-to-medium LLMs (7B–30B) on code debugging tasks | |