ExSmell-Train
收藏资源简介:
该存储库是一个按不同类别(如设计相关异味、传统代码异味和低级关注点异味)组织的Elixir代码异味示例数据库。每个代码异味包含10个示例,旨在模拟真实的Elixir代码场景。数据集使用ChatGPT-5.4生成,并由两位Elixir专家验证,以确保示例的质量和相关性。主要目标是提供一个结构化数据集,可作为检索增强生成(RAG)系统的知识库,帮助向大型语言模型(LLM)提供相关的代码异味模式,支持Elixir项目中代码异味的自动检测和分析。
This repository is a curated sample database of Elixir code smells, organized into distinct categories including design-related code smells, traditional code smells, and low-level concern code smells. Each category of code smell contains 10 examples intended to simulate realistic Elixir code scenarios. The dataset was generated using ChatGPT-5.4 and validated by two Elixir domain experts to guarantee the quality and contextual relevance of the provided examples. The core goal of this dataset is to serve as a structured knowledge base for retrieval-augmented generation (RAG) systems, enabling the delivery of targeted code smell patterns to large language models (LLMs) and supporting automated detection and analysis of code smells in Elixir-based projects.
ExSmell-Train 数据集详情
数据集简介
ExSmell-Train 是一个 Elixir 代码坏味(Code Smell)示例数据库,旨在为检索增强生成(RAG)系统提供结构化知识库,支持大语言模型(LLM)自动检测和分析 Elixir 项目中的代码坏味。
数据集构成
数据集按类别组织,共包含 三大类 代码坏味,每类下细分为多个具体坏味类型,每个类型包含 10 个示例,模拟真实 Elixir 代码场景。
数据来源与质量控制
- 使用 ChatGPT-5.4 生成示例。
- 由两位 Elixir 专家验证,确保示例质量和相关性。
数据集分类结构
1. 设计相关坏味(Design-related Smells)
包含 14 个子类型:
- GenServer Envy
- Agent Obsession
- Unsupervised process
- Large messages
- Unrelated multi-clause function
- Complex extractions in clauses
- Using exceptions for control-flow
- Untested polymorphic behaviors
- Code organization by process
- Large code generation by macros
- Data manipulation by migration
- Using App Configuration for libraries
- Compile-time global configuration
- "Use" instead of "import"
2. 低层级关注点坏味(Low-level Concerns Smells)
包含 9 个子类型:
- Working with invalid data
- Complex branching
- Complex else clauses in with
- Alternative return types
- Accessing non-existent map/struct fields
- Speculative Assumptions
- Modules with identical names
- Unnecessary macros
- Dynamic atom creation
3. 传统代码坏味(Traditional Code Smells)
未列出具体子类型,位于 traditional 目录下。
数据集结构与路径
- 设计相关坏味:
https://github.com/labd2m/ExSmell-Train/tree/main/design_related - 低层级关注点坏味:
https://github.com/labd2m/ExSmell-Train/tree/main/low_level_concerns - 传统代码坏味:
https://github.com/labd2m/ExSmell-Train/tree/main/traditional
每个子类型均位于对应类别的子目录中,路径示例:https://github.com/labd2m/ExSmell-Train/tree/main/design_related/genserver_envy
数据集目标
为 RAG 系统提供结构化的代码坏味模式知识库,辅助自动检测和分析 Elixir 项目中的代码坏味。




