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.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
大幅提高文件上传限制,最高150M (2024-4-1)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
LEMONS发布了新的文献求助10
1秒前
sfbr发布了新的文献求助10
1秒前
陈强完成签到,获得积分10
4秒前
5秒前
lusuoshan完成签到,获得积分10
5秒前
领导范儿应助盼盼采纳,获得10
6秒前
迷路的曼梅完成签到,获得积分10
6秒前
ice完成签到,获得积分10
8秒前
LALALADDDD完成签到,获得积分10
8秒前
司马问兰完成签到,获得积分10
9秒前
CWC完成签到,获得积分10
9秒前
paopaolalala发布了新的文献求助10
10秒前
研友_8yNA5L完成签到,获得积分10
10秒前
Sunny完成签到,获得积分10
12秒前
周大琳完成签到 ,获得积分0
13秒前
Akim应助孤独尔安采纳,获得10
13秒前
荔枝完成签到 ,获得积分10
14秒前
刘雪景发布了新的文献求助10
14秒前
zlx完成签到,获得积分10
15秒前
17秒前
科研肥料完成签到,获得积分10
17秒前
max完成签到,获得积分10
17秒前
子菱完成签到,获得积分10
18秒前
尘埃之影完成签到,获得积分10
18秒前
过于喧嚣的孤独完成签到,获得积分20
18秒前
July完成签到,获得积分10
20秒前
圆圆完成签到,获得积分10
20秒前
paopaolalala完成签到,获得积分10
20秒前
大大橙完成签到 ,获得积分10
21秒前
千秋入画完成签到,获得积分20
21秒前
潇湘阁我爱吃完成签到,获得积分10
21秒前
李大龙完成签到,获得积分10
22秒前
威威完成签到,获得积分10
22秒前
王q完成签到,获得积分10
22秒前
KK发布了新的文献求助10
23秒前
jzyy完成签到 ,获得积分10
24秒前
24秒前
yqhide完成签到,获得积分10
24秒前
25秒前
222完成签到,获得积分10
25秒前
高分求助中
Impact of Mitophagy-Related Genes on the Diagnosis and Development of Esophageal Squamous Cell Carcinoma via Single-Cell RNA-seq Analysis and Machine Learning Algorithms 1600
Exploring Mitochondrial Autophagy Dysregulation in Osteosarcoma: Its Implications for Prognosis and Targeted Therapy 1500
LNG地下式貯槽指針(JGA指-107) 1000
LNG地上式貯槽指針 (JGA指 ; 108) 1000
Raising Girls With ADHD: Secrets for Parenting Healthy, Happy Daughters 900
QMS18Ed2 | process management. 2nd ed 600
LNG as a marine fuel—Safety and Operational Guidelines - Bunkering 560
热门求助领域 (近24小时)
化学 医学 材料科学 生物 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 基因 遗传学 物理化学 催化作用 免疫学 细胞生物学 电极
热门帖子
关注 科研通微信公众号,转发送积分 2940708
求助须知:如何正确求助?哪些是违规求助? 2599566
关于积分的说明 6998283
捐赠科研通 2240913
什么是DOI,文献DOI怎么找? 1189693
版权声明 590231
科研通“疑难数据库(出版商)”最低求助积分说明 582402