Wed 7 Nov 2018 15:52 - 16:15 at Horizons 6-9F - Mining Chair(s): Hridesh Rajan

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% have fewer than 15LOC and 90% 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% 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.

Wed 7 Nov
Times are displayed in time zone: (GMT-05:00) Guadalajara, Mexico City, Monterrey change

15:30 - 17:00: Research Papers - Mining at Horizons 6-9F
Chair(s): Hridesh RajanIowa State University
fse-2018-Journal-First15:30 - 15:52
Zhe Yu, Nicholas A. KraftABB Corporate Research, Tim MenziesNorth Carolina State University
fse-2018-Journal-First15:52 - 16:15
Miltiadis AllamanisMicrosoft Research, Cambridge, Earl T. BarrUniversity College London, Christian BirdMicrosoft Research, Prem DevanbuUniversity of California, Mark MarronMicrosoft Research, Charles SuttonUniversity of Edinburgh
fse-2018-research-papers16:15 - 16:37
Pan BianRenmin University of China, China, Bin LiangRenmin University of China, China, Wenchang ShiRenmin University of China, China, Jianjun HuangRenmin University of China, China, Yan CaiInstitute of Software, Chinese Academy of Sciences
fse-2018-research-papers16:37 - 17:00
Daniel DeFreezUniversity of California, Davis, Aditya V. ThakurUniversity of California, Davis, Cindy Rubio-GonzálezUniversity of California, Davis