跳到正文
研踪PaperTrail
← 研踪 PaperTrail

arXiv:2611.10530 · v1

Mismeasuring the Life of a Line of Code: Lessons Learned the Hard Way

首次提交 2026-11-07 15:03
版本更新 2026-11-07 15:03
雷达观测 2026-11-10 11:14
arXiv ↗PDF ↗

摘要

Studies of how long lines of code live, including lines written by AI agents, rest on choices that look technical: when a line counts as gone, what to do with lines still alive, whether to pool projects, and how to evaluate a model. We studied 32.5 million line births in 120 TypeScript repositories and got several of these choices wrong at first. For ten of them, we compare the result as we first computed it, or as commonly done, with the result after correction. All ten change conclusions, or would have. Six were our own mistakes. Counting moved and rewritten lines as dead shortens a line's median life from 3.0 years to 1.3. Counting any change as a death hides an outcome that can be predicted: within-project concordance falls from 0.71 to 0.56. Regressing observed lifetimes discards three quarters of the lines. Keeping rewritten lines at risk makes protective effects grow with age. Lines are born and removed together, so treating them as independent misleads twice: nine of fifteen effects look significant only under that assumption, and a split by file makes a barely predictable outcome look good (within-project concordance 0.71 instead of 0.61). After the corrections, removal depends on a line's age and project, but our models could barely rank it within a project. Local revision they could rank (0.71). Obvious cases aside, the top 1% of a project's new lines are revised at 2.3 times the base rate. Each pitfall leaves a symptom; we give a checklist.

作者备注:12 pages, 2 figures, 4 tables. Corrects results of arXiv:2606.04993

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

目前只收录了一个版本。收录下一版后,可以对照标题、作者、分类和摘要。

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v1 · 2026-11-07 15:03 · 最新观测版本

Mismeasuring the Life of a Line of Code: Lessons Learned the Hard Way

Studies of how long lines of code live, including lines written by AI agents, rest on choices that look technical: when a line counts as gone, what to do with lines still alive, whether to pool projects, and how to evaluate a model. We studied 32.5 million line births in 120 TypeScript repositories and got several of these choices wrong at first. For ten of them, we compare the result as we first computed it, or as commonly done, with the result after correction. All ten change conclusions, or would have. Six were our own mistakes. Counting moved and rewritten lines as dead shortens a line's median life from 3.0 years to 1.3. Counting any change as a death hides an outcome that can be predicted: within-project concordance falls from 0.71 to 0.56. Regressing observed lifetimes discards three quarters of the lines. Keeping rewritten lines at risk makes protective effects grow with age. Lines are born and removed together, so treating them as independent misleads twice: nine of fifteen effects look significant only under that assumption, and a split by file makes a barely predictable outcome look good (within-project concordance 0.71 instead of 0.61). After the corrections, removal depends on a line's age and project, but our models could barely rank it within a project. Local revision they could rank (0.71). Obvious cases aside, the top 1% of a project's new lines are revised at 2.3 times the base rate. Each pitfall leaves a symptom; we give a checklist.

查看此版本解读 →查看此版本原文 ↗