一句话:针对代码片段因语法不完整且缺少依赖信息而难以编译使用的问题,提出 SnR 工具。
论文关注 Stack Overflow 等网站上代码片段难以直接使用的问题:这些片段虽然能简洁展示 API 用法,但通常语法不完整且缺少依赖信息,导致无法编译。以 Java 为例,只有 6.88% 的 Stack Overflow Java 片段包含编译所需的 import 语句。摘要由此引出 SnR,但未展开其具体方法、系统设计与评估结果;从标题和摘要看,工作目标应是帮助开发者修复或补全此类代码片段,使其更易于编译和使用。
Code snippets are prevalent on websites such as Stack Overflow and are effective in demonstrating API usages concisely. However they are usually difficult to be used directly because most code snippets not only are syntactically incomplete but also lack dependency information, and thus do not compile. For example, Java snippets usually do not have import statements or required library names; only 6.88% of Java snippets on Stack Overflow include import statements necessary for compilation.