arrow
返回

Automatizing Software Cognitive Complexity Reduction

delete2022-01-01
delete7
delete
OA
AI
R
Rubén Saborido *
J
Javier Ferrer
F
Francisco Chicano
E
Enrique Alba
DOI:10.1109/ACCESS.2022.3144743delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Software plays a central role in our life nowadays. We use it almost anywhere, at any time, and for everything: to browse the Internet, to check our emails, and even to access critical services such as health monitoring and banking. Hence, its reliability and general quality is critical. As software increases in complexity, developers spend more time fixing bugs or making code work rather than designing or writing new code. Thus, improving software understandability and maintainability would translate into an economic relief over the total cost of a project. Different cognitive complexity measures have been proposed to quantify the understandability of a piece of code and, therefore, its maintainability. However, the cognitive complexity metric provided by SonarSource and integrated in SonarCloud and SonarQube is quickly spreading in the software industry due to the popularity of these well-known static code tools for evaluating software quality. Despite SonarQube suggests to keep method's cognitive complexity no greater than 15, reducing method's complexity is challenging for a human programmer and there are no approaches to assist developers on this task. We model the cognitive complexity reduction of a method as an optimization problem where the search space contains all sequences of Extract Method refactoring opportunities. We then propose a novel approach that searches for feasible code extractions allowing developers to apply them, all in an automated way. This will allow software developers to make informed decisions while reducing the complexity of their code. We evaluated our approach over 10 open-source software projects and was able to fix 78% of the 1,050 existing cognitive complexity issues reported by SonarQube. We finally discuss the limitations of the proposed approach and provide interesting findings and guidelines for developers.
Keyword:
Complexity theory
Software
Codes
Measurement
Optimization
Open source software
Java
Software quality
software maintenance
optimization
cognitive complexity

期刊

IEEE Access 封面图
IEEE Access
IF:
3.6
论文数:
9.8W
被引数:
29.4W

机构

U
universidad de malaga
学者数:
1.2W
论文数: 9.2K
被引数: 6
引用论文

引用论文

The Daidzein Metabolite, 6,7,4'-Trihydroxyisoflavone, Is a Novel Inhibitor of PKCα in Suppressing Solar UV-Induced Matrix Metalloproteinase 1
err2014-11-19
err0
errOAAI
errTae-Gyu Lim; Jong-Eun Kim; Sung-Young Lee; Jun Park; Myung Yeom; Hanyong Chen; Ann Bode; Zigang Dong; Ki Lee
err分享
err收藏
A Suite of Object Oriented Cognitive Complexity Metrics
err2018-01-01
err35
errOAAI
errMisra, Sanjay; Adewumi, Adewole; Fernandez-Sanz, Luis; Damasevicius, Robertas
err分享
err收藏
err分享
err收藏
学者 查看更多内容