Journal of Software Engineering Research and Development https://sol.sbc.org.br/journals/index.php/jserd <p>The aim of the Journal of Software Engineering and Research Development (JSERD), a fully open access journal, is to inform the readers about state of the art of software engineering by publishing high quality papers that represent results of consolidated research and innovations in software engineering and related areas. Follow us on <a href="https://twitter.com/jserd_official">Twitter</a> to get our updates!</p> en-US uira@dimap.ufrn.br (Uirá Kulesza) publicacoes@sbc.org.br (José Viterbo) Thu, 11 Jan 2024 00:00:00 +0000 OJS 3.2.1.2 http://blogs.law.harvard.edu/tech/rss 60 On the Effectiveness of Trivial Refactorings in Predicting Non-trivial Refactorings https://sol.sbc.org.br/journals/index.php/jserd/article/view/3324 <p>Refactoring is the process of restructuring source code without changing the external behavior of the software. Refactoring can bring many benefits, such as removing code with poor structural quality, avoiding or reducing technical debt, and improving maintainability, reuse, or code readability. Although there is research on how to predict refactorings, there is still a clear lack of studies that assess the impact of operations considered less complex (trivial) to more complex (non-trivial). In addition, the literature suggests conducting studies that invest in improving automated solutions through detecting and correcting refactoring. This study aims to identify refactoring activity in non-trivial operations through trivial operations accurately. For this, we use classifier models of supervised learning, considering the influence of trivial refactorings and evaluating performance in other data domains. To achieve this goal, we assembled 3 datasets totaling 1,291 open-source projects, extracted approximately 1.9M refactoring operations, collected 45 attributes and code metrics from each file involved in the refactoring and used the algorithms Decision Tree, Random Forest, Logistic Regression, Naive Bayes and Neural Network of supervised learning to investigate the impact of trivial refactorings on the prediction of non-trivial refactorings. For this study, we contextualize the data and call context each experiment configuration in which it combines trivial and non-trivial refactorings. Our results indicate that: (i) Tree-based models such as Random Forest, Decision Tree, and Neural Networks performed very well when trained with code metrics to detect refactoring opportunities. However, only the first two were able to demonstrate good generalization in other data domain contexts of refactoring; (ii) Separating trivial and non-trivial refactorings into different classes resulted in a more efficient model. This approach still resulted in a more efficient model even when tested on different datasets; (iii) Using balancing techniques that increase or decrease samples may not be the best strategy to improve models trained on datasets composed of code metrics and configured according to our study.</p> Darwin Pinheiro, Carla Bezerra, Anderson Uchôa Copyright (c) 2024 Darwin Pinheiro, Carla Bezerra, Anderson Uchôa http://creativecommons.org/licenses/by/4.0 https://sol.sbc.org.br/journals/index.php/jserd/article/view/3324 Thu, 25 Apr 2024 00:00:00 +0000 Investigating the Social Representations of Harmful Code https://sol.sbc.org.br/journals/index.php/jserd/article/view/3554 <p>Context. Harmful Code denotes code snippets that harm the software quality. Several characteristics can cause this, from characteristics of the source code to external issues. By example, one might associate Harmful Code with the introduction of bugs, architecture degradation, and code that is hard to comprehend. However, there is still a lack of knowledge on which code issues are considered harmful from the perspective of the software developers community. Goal. In this work, we investigate the social representations of Harmful Code among a community of software developers composed of Brazilian postgraduate students and professionals from the industry. Method. We conducted free association tasks with members from this community for characterizing what comes to their minds when they think about Harmful Code. Then, we compiled a set of associations that compose the social representations of Harmful Code. Results. We found that the investigated community strongly associates Harmful Code with a core set of undesirable characteristics of the source code, such as bugs and different types of smells. Based on these findings, we discuss each one of them to try to understand why those characteristics happen. Conclusion. Our study reveals the main characteristics of Harmful Code by a community of developers. Those characteristics can guide researchers on future works to better understand Harmful Code.</p> Rodrigo Lima, Jairo Souza, Baldoino Fonseca, Leopoldo Teixeira, Rafael Mello, Márcio Ribeiro, Rohit Gheyi, Alessandro Garcia Copyright (c) 2024 Rodrigo Lima, Jairo Souza, Baldoino Fonseca, Leopoldo Teixeira, Rafael Mello, Márcio Ribeiro, Rohit Gheyi, Alessandro Garcia http://creativecommons.org/licenses/by/4.0 https://sol.sbc.org.br/journals/index.php/jserd/article/view/3554 Wed, 10 Apr 2024 00:00:00 +0000 Reducing Manual Efforts in Equivalence Analysis in Mutation Testing https://sol.sbc.org.br/journals/index.php/jserd/article/view/3588 <p>Mutation testing has attracted a lot of interest because of its reputation as a powerful adequacy criterion for test suites and for its ability to guide test case generation. However, the presence of equivalent mutants hinders its usage in industry. The Equivalent Mutant Problem has already been proven undecidable, but manually detecting equivalent mutants is an error-prone and time-consuming task. Thus, solutions, even partial, can help reduce this cost. To minimize this problem, we introduce an approach to suggest equivalent mutants. Our approach is based on automated behavioral testing, which consists of test cases based on the behavior of the original program. We perform static analysis to automatically generate tests for the entities impacted by the mutation. For each mutant analyzed, our approach can suggest the mutant as equivalent or non-equivalent. In the case of non-equivalent mutants, our approach provides a test case capable of killing it. For the equivalent mutants suggested, we also provide a ranking of mutants with a strong or weak chance of the mutant being indeed equivalent. In our previous work, we evaluated our approach against a set of 1,542 mutants manually classified in previous work as equivalents and non-equivalents. We noticed that the approach effectively suggests equivalent mutants, reaching more than 96% of accuracy in five out of eight subjects studied. Compared with manual analysis of the surviving mutants, our approach takes a third of the time to suggest equivalents and is 25 times faster to indicate non-equivalents. This extended article delves deeper into our evaluation. Our focus is on discerning the specific characteristics of mutants that our approach erroneously classified as equivalent, thereby producing false positives. Furthermore, our investigation delves into a comprehensive analysis of the mutation operators, providing essential insights for practitioners seeking to improve the accuracy of equivalent mutant detection and effectively mitigate associated costs.</p> Samuel Amorim, Leo Fernandes, Márcio Ribeiro, Rohit Gheyi, Marcio Delamaro, Marcio Guimarães, André Santos Copyright (c) 2024 Samuel Amorim, Leo Fernandes, Márcio Ribeiro, Rohit Gheyi, Marcio Delamaro, Marcio Guimarães, André Santos http://creativecommons.org/licenses/by/4.0 https://sol.sbc.org.br/journals/index.php/jserd/article/view/3588 Thu, 14 Mar 2024 00:00:00 +0000 Ethics: What is the Brazilian Software Engineering Research Scenario? https://sol.sbc.org.br/journals/index.php/jserd/article/view/3395 <p>Background: Ethics is the theory or science of the moral behavior of humans in society. Traditionally, we value “unethical” actions that go against determining morality in a specific context. One of the sub-domains of Ethics is Computational Ethics, which deals with ethical dilemmas that are strictly related to computational issues. Dilemmas in this area involve privacy, improper access, intellectual property, digital norms and laws, power, socio-technical aspects (such as gender discrimination), and robotics, among others. In this context, “Software Engineering” and “Software” are different objects. Engineering is an act, a practice, as also coding, programming, and software reuse. As with any act, moral and subsequent ethical considerations are appropriate. We characterize software as an object of concrete reality, as a sociotechnical system formed by a technical artifact, human aspect, and procedural aspect. This assumption will form the main base discussion of ethics and morals in Software Engineering in this paper. Objective: The goal of this paper is to unveil the Brazilian Software Engineering ethics panorama. Method: We follow the rigor of, and inspired by, a Systematic Literature Review (SLR) protocol to answer the question: how does ethics explicitly permeate the Brazilian Software Engineering publications between the last thirteen years (2010 and 2022)? Results: After analyzing 1529 papers through the research protocol, 175 (≈11%) presented some explicit occurrence of ethical aspects. The occurrence was relevant in only 7 papers (≈0.4%), exposing a shallow scenario on ethical or moral aspects. Conclusions: If Ethics is a topic considered important to deliberate, research or discuss, this did not occur significantly in the Brazilian Software Engineering research scenario since 2010. With this result in mind, we discussed parallel terms and concepts to enrich the contribution of the qualitative synthesis.</p> Luiz Paulo Carvalho, José Antonio Suzano, Thais Batista, Flávia Maria Santoro, Jonice Oliveira Copyright (c) 2024 Luiz Paulo Carvalho, José Antonio Suzano, Thais Batista, Flávia Maria Santoro, Jonice Oliveira http://creativecommons.org/licenses/by/4.0 https://sol.sbc.org.br/journals/index.php/jserd/article/view/3395 Wed, 21 Feb 2024 00:00:00 +0000 Using Third-Party Components’ Metadata to Analyze Cross-cutting Concerns https://sol.sbc.org.br/journals/index.php/jserd/article/view/3086 <p>Context: Modularity is a key concept in software development. Well-modularized systems are easier to maintain and evolve, but achieving good modularity is difficult. Concerns that are important, but not central to a systems' main business rules, frequently end up scattered and entangled throughout several software modules. Those so called cross-cutting concerns are a major source of loss of modularity and code decay in software systems. Motivation: Studies on cross-cutting concerns often resort to manual identification of concerns, but manual identification is effort demanding, does not scale, and tends to be imprecise. Automatic approaches are therefore very attractive when the codebase is extensive. In modern systems, developers implement modules to address central business rules, but they tend to add third-party components in the codebase to materialize concerns related to other secondary aspects. Logging, database access, and tests automation are examples of concerns that are usually implemented with the help of imported components and are prone to scatter and tangle throughout the codebase. Aims: This paper proposes a method to track this type of cross-cutting concern. Our work takes advantage of the addition of metadata about components to track them. The method scales by automating the identification and analysis of concerns scattered throughout the software codebase. We define a new metric, Dedication to Concern (DtC), to measure how much source code modules focus on implementing the identified concerns. Working Method: We describe our method to mine cross-cutting concerns from the metadata related to the use of components. The method is instantiated as a tool, architectural knowledge suite (AKS). The tool is used to analyze concerns in a set of large Java projects. The results are used to feed an action research study, during which software development specialists analyze the AKS outputs to evaluate and evolve the method. Conclusion: The semi-automated approach is feasible and scalable, and can be used to analyze secondary concerns that are currently being imported into modern software systems via third-party components.</p> Luis Paulo da Silva Carvalho, Thiago Souto Mendes, Felipe Gustavo de Souza Gomes, Sávio Freire, Renato Lima Novais, Manoel Gomes Mendonça Copyright (c) 2024 Luis Paulo da Silva Carvalho, Thiago Souto Mendes, Felipe Gustavo de Souza Gomes, Sávio Freire, Renato Lima Novais, Manoel Gomes Mendonça http://creativecommons.org/licenses/by/4.0 https://sol.sbc.org.br/journals/index.php/jserd/article/view/3086 Thu, 11 Jan 2024 00:00:00 +0000