一句话:提出「软屏障」机制与复制粘贴抗性(CPR)指标,用 Unicode 扰动让 AI 生成代码难以被直接复制执行。
论文把从聊天窗口把函数复制进编辑器这一瞬间,界定为「AI 代码交接」问题:模型生成的文本跨越对话语境进入可执行或可提交的软件工件,是当前工具基本未加管理的设计边界。作者主张,评估 AI 编程助手不应只看其生成的代码,还应看它如何中介代码向软件工件的转移。为此提出 soft barriers(软屏障)这一交接感知机制:在保留 AI 辅助可及性的同时,让未经审视的直接转移不再毫无摩擦。作为初步技术探针,作者用 Unicode 输出扰动实例化该想法——保持视觉可读性但破坏朴素的复制粘贴执行,并定义 Copy-Paste Resistance(CPR),即功能正确的干净解在扰动后变成语法无效的比例。在 HumanEval 与 MBPP 上,用四个 LLM 与四类扰动族实验,发现输出层屏障可达高 CPR,但效果高度依赖模型与任务。18 人探索性试点提供了软屏障能把用户从直接转移推向编辑与重建的早期证据。作者不把 Unicode 扰动视为可部署方案,而是作为关于实用、透明且具政策意识的 AI 代码交接研究议程的最小探针。
Copying a function from a chat window into an editor takes less than a second. For many uses of AI coding tools, that speed is the point; in settings such as programming education, code review, and security-sensitive development, it can also be the problem. This paper frames copy-paste as an AI code handoff problem: the moment model-generated text crosses from a conversational context into executable or committed software is a design boundary that current tools leave largely unmanaged. We argue that AI coding assistants should not only be evaluated by the code they generate, but also by how they mediate the transfer of that code into software artifacts. We propose soft barriers as one class of handoff-aware mechanisms. Soft barriers preserve access to AI assistance while making unexamined transfer less frictionless. As an initial technical probe, we instantiate this idea using Unicode output perturbations that preserve visual readability but disrupt naive copy-paste execution. We introduce Copy-Paste Resistance (CPR), the fraction of functionally correct clean solutions that become syntactically invalid after perturbation. Across HumanEval and MBPP with four LLMs and four perturbation families, we find that output-level barriers can achieve high copy-paste resistance, but their effectiveness is highly model- and task-dependent. An exploratory pilot with 18 participants provides early evidence that soft barriers can shift users from direct transfer toward editing and reconstruction. We do not present Unicode perturbations as a deployment-ready solution; rather, we use them as a minimal probe for a broader research agenda on practical, transparent, and policy-aware AI code handoff.
@inproceedings{paperbot12525,
title = {Do Not Copy/Paste: Soft Barriers for Copying in AI-Assisted Programming},
author = {Iyiola E. Olatunji and Alberick Euraste Djire and Jacques Klein and Tegawendé F. Bissyandé},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3834554}
}