RT Conference Proceedings T1 Automatizing Software Cognitive Complexity Reduction. A1 Saborido Infantes, Rubén A1 Ferrer-Urbano, Francisco Javier A1 Chicano-García, José-Francisco A1 Alba-Torres, Enrique K1 Ingeniería del software AB Software plays a central role in our life nowadays. We use it almost anywhere, at any time, and for everything: to browse the In- ternet, 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. YR 2023 FD 2023 LK https://hdl.handle.net/10630/27821 UL https://hdl.handle.net/10630/27821 LA eng NO Universidad de Málaga, Junta de Andalucía (POSTDOC_21_00567). Universidad de Málaga. Campus de Excelencia Internacional Andalucía Tech. DS RIUMA. Repositorio Institucional de la Universidad de Málaga RD 3 mar 2026