fix: 修复 VulnGym 数据中的代码片段定位偏差#64
Open
ii76 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
任务说明
完成 #4 要求的 VulnGym 代码片段定位偏差自动修复脚本。
实现内容
entry_point、critical_operation和trace[*]节点needs_human.csvSCHEMA.md基础约束desc中的文件路径运行方式
全量运行结果
自动修复策略统计:
nearby_line)same_file)人工复核原因统计:
code_not_found)missing_code)repo_unavailable)人工复核项涉及 15 个 entry。所有无法唯一确定的节点均保持原值,并记录在
needs_human.csv,未进行强制修复。输出文件
entries.fixed.jsonl:修复后的完整数据集fix_diff.csv:109 处自动修复的修改记录needs_human.csv:56 个需要人工复核的节点scripts/fix_code_locations.py:自动修复脚本scripts/README.md:依赖、运行方式、修复策略及限制说明检查结果
使用官方数据加载脚本检查修复后的结果:
检查输出:
官方脚本正常退出,修复后的 408 条 JSONL 数据均可正常解析和加载。
pandas和 HuggingFacedatasets属于可选依赖,未安装时会跳过,不影响标准库加载检查。Closes #4