CS Paper Radar

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

Pavel Gurov

cs.SE ·submitted 2026-11-07 07:03 UTC · v1
unusual

Abstract

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.

Comment
12 pages, 2 figures, 4 tables. Corrects results of arXiv:2606.04993

Closest papers

Nearest neighbours by meaning across the whole index.

Revisiting the Survival of Agent-Attributed Code: How Measurement Choices Decide the Verdict

cs.SE cs.AI ·2026-11-16 ·Musfiqur Rahman, Mahi Begoug, Emad Shihab
similarity 0.63
Abstract

Studies of how long code from AI coding agents survives after it is merged reach conflicting verdicts: agent code is reported to be retained longer than human code, about as long, or modified sooner. Each study makes defensible measurement choices, but how much these choices decide the verdict is unknown. We revisit the survival of agent-attributed code in our earlier study: 854,139 lines that 2,802 merged pull requests (PRs) added to 215 repositories of the AIDev dataset. We vary nine measurement choices in five research questions and build a specification curve of 88 survival analyses, tested under three variance estimators, several observation windows, and permuted labels. For code from human-supervised agents, mostly GitHub Copilot, the choices change the size of the effect but not its direction. For code from the fully-autonomous agent Devin, they decide the verdict. Across repositories, 15 of 22 specifications report it modified sooner when lines are treated as independent, but only 3 when standard errors are clustered by repository, no more than permuted labels produce. Within repositories, no specification detects a difference. LLM intent classifiers agree with human labels about as well as two humans agree with each other, whereas keyword rules do not (kappa = 0.69 to 0.72 against 0.38), and the two reach different verdicts on why agent code is modified. Humans make most modifications to agent code under every unit and window. Re-run on our data, five published designs each change their result with a single choice. Whether agent code survives longer than human code is therefore decided as much by the measurement as by the code. We derive an operationalization checklist for post-merge studies.

0.22

Lessons Outlive Their Failures: A Case Study of Rules for AI Coding Agents

cs.SE ·2026-10-23 ·Hassan Hassanzadeh Aliabadi
benchmark similarity 0.53
Abstract · 16 pages, 4 figures, 4 tables

AI coding agents increasingly work inside a harness: rule files such as AGENTS.md, on-demand skills, runtime hooks and automated checks. Most studies of harnesses look at a single point in time or at short benchmark runs. I report a six-week case study of my personal system of record, a plain-markdown repository that three AI agent tools edited daily under one shared rule set. I built a ledger of 118 agent failures, their fixes and whether they came back. I also tested the system's monthly LLM documentation audit against 47 known stale statements and 20 planted errors. Finally, I replayed five past failures in isolated git clones, with and without their fixes. All results come from one repository with three runs per condition, so I report them as exploratory. Stale documentation (drift) was the largest failure class (48 of 118), although 35 of those were found on one audit day. A single audit run found about half of the known drift (Claude Sonnet 5.5 mean: 50%), and at least 93% of its findings were correct. On Sonnet 5.5, the agent finished four of the five replayed tasks. In three of those four, the failure did not happen, with or without its fix. Only the stale-count failure came back without its check, and the check stopped it in every run. On older models, an agent drafted an em-dash once while the em-dash lint check was active, and the check rejected it. A written rule on run-time estimates did not change Sonnet 4.5's overestimates. These results suggest that harness lessons can outlive the failures they were written to fix, while drift persists and still needs mechanical checks. Tools that evolve a harness add lessons faster than they retire them, so they should re-test their rules from time to time and retire the obsolete ones.

0.30

Plans They Abandon, Reports They Author: The Narrative Layer of Autonomous Agents

cs.HC ·2026-09-10 ·Obada Kraishan, Kulsawasd Jitkajornwanich
highly cited similarity 0.52
Abstract · 14 pages, 4 figures. Under review

When a coding agent finishes a task, the developer reviews a summary the agent wrote about itself, not a display someone designed. We ask how much of the agent's work that summary carries, and whether it drifts toward the plan the agent stated when execution departed from it. Across 5,851 real developer sessions and 355,942 tool calls, a self-report referred to about one action in eleven, and a reader working from the report alone recovered roughly a fifth of the action log. Neither figure depended on whether the session later needed human correction. Reports did not generally resemble the stated plan more than the executed one, but they did so increasingly as execution diverged from the plan. We hand-validate both measurement steps that use a language model, report the one that failed alongside the one that passed, and draw conclusions only from measures that survived.

0.40

Between the Commits: Process, Error, and Claim Reliability in a Wholly AI-Authored Codebase

cs.SE cs.AI ·2026-09-24 ·Douglas Leith
dataset similarity 0.50
Abstract

We present: (i) a new dataset consisting of the full development history of a 21,000-line Python tool built entirely by Claude AI, with no human-authored code or tests, (ii) two code-provenance tracing tools, (iii) three taxonomies for instruction intent, commit provenance, and response reliability, (iv) application of these to analyse the dataset. We find that: (i) user coding agent CLI instructions differ in kind from IDE-chat instructions, with a greater focus on comprehension, planning and consultation, (ii) code development is mainly proactive, (iii) 14.3% of AI code-generation events contain a real error later caught by the AI-authored test suite, (iv) roughly 1 in 4-5 of the AI's interactive responses contains one or more factual errors.

0.38

Silent Revision: Measuring Undisclosed Change in the Safety Frameworks of Frontier AI Developers

cs.CY cs.AIcs.SE ·2026-09-08 ·Louis Yiven Zhu
positioncode/data similarity 0.50
Abstract · 31 pages, 3 figures, 10 tables. v2: coding checked by three re-runs, a blind re-coding and a second coding; strict rate revised from 67% to …

Frontier AI developers publish safety frameworks that commit them to evidencing whether their models are dangerous. The European Union and California now treat these documents as instruments of accountability and impose duties on their revision. Neither requires the developer's account to identify each change to a commitment. We introduce the silent revision rate, the share of material changes to a framework's commitments that the developer's published account does not identify, and we release the versioned, hash-pinned corpus needed to compute it. The corpus holds every public version of the safety frameworks of the twelve developers that have published one, with each provider's changelog, redline or announcement. We trace 710 commitment instances across twelve consecutive version pairs, code them against a frozen codebook, and check the coding with three independent re-runs, a blind re-coding of every disputed row and a second coding of a stratified sample. First, 64% of material changes (95% CI 59 to 69) are silent under a strict standard and 30% under a lenient one. Second, the form of the account matters less than its granularity. Narrative and itemised accounts differ by eight points that eight pairs cannot separate from chance, whereas the rate falls with the number of discrete items a provider publishes. Third, 75% of traced changes weaken or remove a commitment, and weakenings are silent more often than strengthenings, at 70% against 52%. A justification explains why a framework changed and an enumeration states what changed, and only the latter makes revision auditable. We argue that publication duties should carry an enumeration duty, which one provider already meets, voluntarily and incompletely.

0.32

Documentation Drift in AI-Generated Pull Requests

cs.SE ·2026-10-19 ·Will De Michele, Kla Tantithamthavorn
published similarity 0.50
Abstract · Accepted at APSEC 2026 (Early Research Achievements)

AI coding agents now contribute to software repositories at scale, yet their documentation practices remain uncharacterised. We analyse 29,669 AI-generated pull requests from 2,585 repositories in the AIDev dataset, measuring documentation co-change: whether code-file modifications are accompanied by a documentation-file update in the same PR. We find that 63.2% of AI PRs change code without updating any documentation. This varies sharply by task type: 55.2% for features and 77.5% for refactoring. Undocumented code files are followed by a fix to the same file 8.6 to 11.7% more often than documented files across 30 to 90-day windows. A raw PR-level comparison shows the opposite because documented PRs are 3.9 times larger and therefore attract more fixes. Controlling for size exposure reverses this result. Documented changes also merge faster despite their larger size (median: 40 seconds versus 184 seconds), although merging is largely automated in this dataset. Documentation drift also compounds: within 90 days, a file changed without documentation is later re-documented at roughly half the rate of a file changed with documentation (24% versus 48%). This suggests that documentation debt tends to accumulate rather than be revisited.

0.23

Toward an Evidence-Based Template for Agent Instruction Files: An Empirical Study of Adoption, Consistency, and Maintenance

cs.SE ·2026-11-02 ·Mehedi Hasan Shanto, Md. Anaytul Islam, Muhammad Asaduzzaman, Alioune Ngom
benchmark similarity 0.50
Abstract · 39 pages

AI coding agents rely on repository-level instruction files to understand project conventions, development workflows, and constraints. However, different agents support different instruction formats, and limited empirical evidence exists about how these files are adopted, what information they contain, whether coexisting formats provide consistent guidance, and how they are maintained. We conduct an empirical study of 3,387 instruction files from 1,000 GitHub repositories across four formats: AGENTS.md, CLAUDE.md, GitHub Copilot instructions, and Cursor rules. We find that 42.2% of instruction-bearing repositories in the higher-popularity cohort maintain multiple formats. Among 386 manually examined pairs of corresponding sections, 16.1% provide divergent guidance. Our maintenance analysis further shows that 40.4% of the analyzed files have only one recorded modification event and that maintenance patterns differ across formats. Based on category prevalence and category addition ratios (CAR), we derive an evidence-based template containing ten Required, four Gap, and two Recommended categories. In an exploratory generation experiment, explicit template guidance increases structural category coverage from 18.7% to 82.8%. We further introduce AGIT-Instruct, a benchmark for evaluating instruction-file generation through structural coverage and content alignment. Across four generation configurations, retrieval-augmented generation achieves the highest full-file ROUGE-1 F1 of 0.459. A manual assessment of 278 generated category instances finds that 19.4% fully preserve and 61.2% partially preserve developer-written intent. Our findings provide empirical guidance for organizing and maintaining agent instruction

0.19

Chance, Persistent Advantage, and the Generative-AI Era in Open-Source Package Careers

cs.SI cs.CY ·2026-09-09 ·Hazem Ibrahim, Yasir Zaki
code/data similarity 0.50
Abstract · 25 pages, 11 figures

Studies of careers in science, film, music, and books report a common pattern. When a person's most successful work arrives is close to a random draw over the works they produce. How large their successes tend to be, in contrast, follows a stable, person-specific factor. We test whether this pattern holds for open-source software careers and whether it changed when generative AI coding tools arrived. From the complete public record of GitHub push events (2015-2025), we reconstruct 102.2M career works by 6.15M contributors, and for the 908k contributors whose repositories publish packages, we measure each work's impact by how many downstream packages come to depend on it. First, we find that the timing of a career's biggest hit is close to a lottery over their works, as in science and the arts, with a small, replicable lean toward early career that grows as careers get longer. Second, some coders reliably produce higher-impact work than others, but this lasting personal factor accounts for only part of why impact persists (about a fifth in our primary specification); the rest behaves like momentum, success feeding on itself for a period of time. Third, within the same contributors, this structure did not change after ChatGPT's release. The stable factor's weight grew by about as much as it grew for an earlier cohort that simply aged, and subtracting the effect of aging from the effect of generative AI puts the shift at +0.03 (95% CI [-0.22, +0.23]), indistinguishable from zero. The success pattern documented in science and the arts therefore describes open-source careers too, and it shows no detectable break across the arrival of generative AI. These results have implications for how track records on open platforms should be read and on what to expect from generative AI for the careers built on them.

0.30