Do bugs lead to unnaturalness of source code?

自然性 计算机科学 源代码 源代码行 编码(集合论) 代码库 程序设计语言 软件 物理 粒子物理学 集合(抽象数据类型)
作者
Yanjie Jiang,Hui Liu,Yuxia Zhang,Weixing Ji,Hao Zhong,Lu Zhang
标识
DOI:10.1145/3540250.3549149
摘要

Texts in natural languages are highly repetitive and predictable because of the naturalness of natural languages. Recent research validated that source code in programming languages is also repetitive and predictable, and naturalness is an inherent property of source code. It was also reported that buggy code is significantly less natural than bug-free one, and bug fixing substantially improves the naturalness of the involved source code. In this paper, we revisit the naturalness of buggy code and investigate the effect of bug-fixing on the naturalness of source code. Different from the existing investigation, we leverage two large-scale and high-quality bug repositories where bug-irrelevant changes in bug-fixing commits have been explicitly excluded. Our evaluation results confirm that buggy lines are often less natural than bug-free ones. However, fixing bugs could not significantly improve the naturalness of involved code lines. Fixed lines on average are as unnatural as buggy ones. Consequently, bugs are not the root cause of the unnaturalness of source code, and it could be inaccurate to identify buggy code lines solely by the naturalness of source code. Our evaluation results suggest that the naturalness-based buggy line detection results in extremely low precision (less than one percentage).
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
JustinaLiu发布了新的文献求助10
1秒前
南宫硕完成签到 ,获得积分10
1秒前
赵一发布了新的文献求助10
1秒前
维克托雷完成签到,获得积分10
1秒前
3秒前
耍酷的夜雪完成签到,获得积分10
5秒前
琅琊稳重的团子完成签到,获得积分10
5秒前
Asxx完成签到,获得积分10
6秒前
英姑应助JustinaLiu采纳,获得10
7秒前
Orange应助wj采纳,获得10
8秒前
无花果应助小燚采纳,获得10
9秒前
13秒前
科研通AI6.4应助七言采纳,获得10
13秒前
木木很累发布了新的文献求助30
14秒前
14秒前
回忆杀完成签到,获得积分20
15秒前
幽默毛衣完成签到,获得积分10
16秒前
思源应助曦和采纳,获得10
17秒前
18秒前
19秒前
大个应助扶光采纳,获得10
19秒前
Yvonne发布了新的文献求助30
19秒前
wg发布了新的文献求助10
20秒前
李同学发布了新的文献求助10
20秒前
21秒前
23秒前
微笑老太发布了新的文献求助10
23秒前
丘比特应助huanhuan采纳,获得10
24秒前
炸克书发布了新的文献求助10
26秒前
26秒前
26秒前
27秒前
28秒前
mengjie发布了新的文献求助10
29秒前
妮可发布了新的文献求助30
29秒前
沐沐完成签到,获得积分10
29秒前
扶光发布了新的文献求助10
30秒前
李同学完成签到,获得积分10
31秒前
31秒前
qty完成签到 ,获得积分10
32秒前
高分求助中
液晶指向矢仿真分析数据集 8888
Invited Discussant 63O and 64O 1000
Ideology and Meaning-Making under the Putin Regime 750
Petrology and Plate Tectonics 500
Writing Systems 500
A Handbook of User Experience Research & Design in Libraries 400
Understanding Modeling and Simulation of Polymerization Reactions 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 计算机科学 化学工程 生物化学 物理 内科学 复合材料 催化作用 光电子学 物理化学 电极 细胞生物学 基因 遗传学
热门帖子
关注 科研通微信公众号,转发送积分 6883088
求助须知:如何正确求助?哪些是违规求助? 8582041
关于积分的说明 18232755
捐赠科研通 6268488
什么是DOI,文献DOI怎么找? 3055964
关于科研通互助平台的介绍 2067559
邀请新用户注册赠送积分活动 2033632