Graph-Based Mining of In-the-Wild, Fine-Grained, Semantic Code Change Patterns

计算机科学 源代码 图形 编码(集合论) 语义变化 开源 数据挖掘 情报检索 人工智能 自然语言处理 软件 理论计算机科学 程序设计语言 集合(抽象数据类型)
作者
Hoan Anh Nguyen,Tien N. Nguyen,Danny Dig,Son Nguyen,Hieu Tran,Michael Hilton
标识
DOI:10.1109/icse.2019.00089
摘要

Prior research exploited the repetitiveness of code changes to enable several tasks such as code completion, bug-fix recommendation, library adaption, etc. These and other novel applications require accurate detection of semantic changes, but the state-of-the-art methods are limited to algorithms that detect specific kinds of changes at the syntactic level. Existing algorithms relying on syntactic similarity have lower accuracy, and cannot effectively detect semantic change patterns. We introduce a novel graph-based mining approach, CPatMiner, to detect previously unknown repetitive changes in the wild, by mining fine-grained semantic code change patterns from a large number of repositories. To overcome unique challenges such as detecting meaningful change patterns and scaling to large repositories, we rely on fine-grained change graphs to capture program dependencies. We evaluate CPatMiner by mining change patterns in a diverse corpus of 5,000+ open-source projects from GitHub across a population of 170,000+ developers. We use three complementary methods. First, we sent the mined patterns to 108 open-source developers. We found that 70% of respondents recognized those patterns as their meaningful frequent changes. Moreover, 79% of respondents even named the patterns, and 44% wanted future IDEs to automate such repetitive changes. We found that the mined change patterns belong to various development activities: adaptive (9%), perfective (20%), corrective (35%) and preventive (36%, including refactorings). Second, we compared our tool with the state-of-the-art, AST-based technique, and reported that it detects 2.1x more meaningful patterns. Third, we use CPatMiner to search for patterns in a corpus of 88 GitHub projects with longer histories consisting of 164M SLOCs. It constructed 322K fine-grained change graphs containing 3M nodes, and detected 17K instances of change patterns from which we provide unique insights on the practice of change patterns among individuals and teams. We found that a large percentage (75%) of the change patterns from individual developers are commonly shared with others, and this holds true for teams. Moreover, we found that the patterns are not intermittent but spread widely over time. Thus, we call for a community-based change pattern database to provide important resources in novel applications.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
Orange应助自然的亦巧采纳,获得10
刚刚
愣住发布了新的文献求助10
刚刚
优秀的白曼完成签到,获得积分20
1秒前
1秒前
世界在雾中完成签到 ,获得积分10
1秒前
不成文完成签到,获得积分10
3秒前
3秒前
HH发布了新的文献求助10
3秒前
无花果应助Yarrow采纳,获得30
3秒前
思源应助跳跃的冰旋采纳,获得10
4秒前
4秒前
5秒前
5秒前
万能图书馆应助空空采纳,获得10
6秒前
迅速的鹤完成签到,获得积分10
6秒前
7秒前
小馒头发布了新的文献求助10
7秒前
陈凯发布了新的文献求助10
9秒前
9秒前
ding完成签到,获得积分10
9秒前
10秒前
段dwh发布了新的文献求助10
10秒前
海晨发布了新的文献求助10
11秒前
ding应助2020采纳,获得10
11秒前
11秒前
小晓发布了新的文献求助10
12秒前
可爱的函函应助三水采纳,获得10
12秒前
小静发布了新的文献求助10
14秒前
meng完成签到,获得积分10
15秒前
爱笑夜蕾发布了新的文献求助20
15秒前
16秒前
小豆豆完成签到,获得积分10
16秒前
谦让的诗翠完成签到,获得积分20
17秒前
17秒前
Lucas应助心灵美的白卉采纳,获得10
17秒前
充电宝应助茄茄嘉璐采纳,获得10
17秒前
Mr_龙在天涯完成签到,获得积分10
19秒前
Ava应助榨菜采纳,获得10
19秒前
21秒前
21秒前
高分求助中
Cronologia da história de Macau 5000
Erwählung und Berufung bei Paulus: Bedeutung, Entwicklung und Funktion einer Vorstellung in ihrem frühjüdischen und griechisch-römischen Kontext 850
Matrix Methods in Data Mining and Pattern Recognition 510
Interactions of Vowel Quality and Prosody in East Slavic 500
用于植入式医疗器械的馈通设计与实现 400
Animalia: Animal and Human Interaction in the Early Medieval English World (Exeter Studies in Medieval Europe) 400
Synfacts Issue 07 · Volume 22 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7137504
求助须知:如何正确求助?哪些是违规求助? 8786249
关于积分的说明 18574016
捐赠科研通 6724214
什么是DOI,文献DOI怎么找? 3154395
关于科研通互助平台的介绍 2280939
邀请新用户注册赠送积分活动 2128906