arrow
返回

Mining Semantic Loop Idioms

delete2018-07-01
delete12
delete
OA
AI
M
Miltiadis Allamanis *
E
Earl T. Barr
C
Christian Bird
P
Prémkumar Dévanbu
M
Mark Marron
C
Charles Sutton
DOI:10.1109/TSE.2018.2832048delete
delete原文链接
delete分享
delete收藏
查看原文
摘要

摘要

En 中文
To write code, developers stitch together patterns, like API protocols or data structure traversals. Discovering these patterns can identify inconsistencies in code or opportunities to replace these patterns with an API or a language construct. We present coiling, a technique for automatically mining code for semantic idioms: surprisingly probable, semantic patterns. We specialize coiling for loop idioms, semantic idioms of loops. First, we show that automatically identifiable patterns exist, in great numbers, with a large-scale empirical study of loops over 25MLOC. We find that most loops in this corpus are simple and predictable: 90 percent have fewer than 15LOC and 90 percent have no nesting and very simple control. Encouraged by this result, we then mine loop idioms over a second, buildable corpus. Over this corpus, we show that only 50 loop idioms cover 50 percent of the concrete loops. Our framework opens the door to data-driven tool and language design, discovering opportunities to introduce new API calls and language constructs. Loop idioms show that LINQ would benefit from an Enumerate operator. This can be confirmed by the exitence of a StackOverflow question with 542k views that requests precisely this feature.
Keyword:
Data-driven tool design
idiom mining
code patterns
AI总结

AI总结

对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
2.9K
被引数:
1.1W

机构

U
University College London
学者数:
7.9W
论文数: 6.2W
被引数: 15.7W
U
university of london
学者数:
21.5W
论文数: 19.7W
被引数: 305
M
microsoft united kingdom
学者数:
150
论文数: 121
被引数: 1
U
University of Edinburgh
学者数:
5.2W
论文数: 4.6W
被引数: 71
学者 查看更多机构
引用论文

引用论文

err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
Affective Responses to Increasing- and Decreasing-Intensity Resistance Training Protocols
err2023-06-01
err0
errOAAI
errJasmin C. Hutchinson; Leighton Jones; Panteleimon Ekkekakis; Boris Cheval; Ralf Brand; Gabrielle M. Salvatore; Samantha Adler; Yan Luo
err分享
err收藏
Body-Related Self-Conscious Emotions Relate to Physical Activity Motivation and Behavior in Men
err2014-06-04
err0
PREAI
errAndree L. Castonguay; Eva Pila; Carsten Wrosch; Catherine M. Sabiston
err分享
err收藏
err分享
err收藏
Evolution of bract development and B‐class MADS box gene expression in petaloid bracts of Cornus s. l. (Cornaceae)
err2012-08-16
err0
PREAI
errChun‐Miao Feng; Xiang Liu; Yi Yu; Deyu Xie; Robert G. Franks; Qiu‐Yun (Jenny) Xiang
err分享
err收藏
学者 查看更多内容