{"title":"The Energy Cost of the Visitor Pattern","authors":"D. Bree, M. Cinnéide","doi":"10.1109/ICSME55016.2022.00036","DOIUrl":"https://doi.org/10.1109/ICSME55016.2022.00036","url":null,"abstract":"Design patterns are applied frequently during software evolution in order to make the software more flexible and amenable to extension. One little-studied aspect of design patterns is their propensity to increase run time energy consumption due to the indirection and additional structure they introduce. In this paper we study the impact of the Visitor pattern on energy efficiency. The Visitor pattern separates an algorithm from the objects it acts upon and improves maintainability by placing each algorithm within a single visitor class, at the cost of increased indirection due to the double dispatch required when the algorithm is invoked. We experimentally investigate the energy impact of varying the implementation of this pattern, and of removing the pattern entirely from the software. In our results we observe energy consumption reductions of greater than 7% in the textbook example when the pattern is implemented using reflective casting, and reductions of over 10% when experimenting with an open source project, JavaParser. The complete removal of the pattern yields more complex results, with little impact in the textbook example but reductions of over 7% in the JavaParser study. Our results highlight the energy savings that may be achieved when the Visitor pattern is removed, and show that energy savings may also be achieved by varying the implementation of the pattern.","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"31 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115462943","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"What Is Thrown? Lightweight Precise Automatic Extraction of Exception Preconditions in Java Methods","authors":"Diego Marcilio, Carlo A. Furia","doi":"10.1109/ICSME55016.2022.00038","DOIUrl":"https://doi.org/10.1109/ICSME55016.2022.00038","url":null,"abstract":"When a method throws an exception—its exception precondition—is a crucial element of the method’s documentation that clients should know to properly use it. Unfortunately, exceptional behavior is often poorly documented, and sensitive to changes in a project’s implementation details that can be onerous to keep synchronized with the documentation.We present WIT, an automated technique that extracts the exception preconditions of Java methods. WIT uses static analysis to analyze the paths in a method’s implementation that lead to throwing an exception. WIT’s analysis is precise, in that it only reports exception preconditions that are correct and correspond to feasible exceptional behavior. It is also lightweight: it only needs the source code of the class (or classes) to be analyzed— without building or running the whole project. To this end, its design uses heuristics that give up some completeness (WIT cannot infer all exception preconditions) in exchange for precision and ease of applicability.We ran WIT on 46 Java projects, where it discovered 11 875 exception preconditions in 10 234 methods, taking just 1 second per method on average. A manual analysis of a significant sample of these exception preconditions confirmed that WIT is 100% precise, and demonstrated that it can accurately and automatically document the exceptional behavior of Java methods.","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"153 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125382788","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"A First Look at Information Highlighting in Stack Overflow Answers","authors":"Shahla Shaan Ahmed, Shaowei Wang, Haoxiang Zhang, T. Chen, Yuan Tian","doi":"10.1109/ICSME55016.2022.00041","DOIUrl":"https://doi.org/10.1109/ICSME55016.2022.00041","url":null,"abstract":"Technical question and answer (Q&A) sites such as Stack Overflow (SO) have become increasingly important for software developers to share knowledge and contribute to communities. Despite their success and prevalence, navigating the knowledge on these sites remains challenging. To make the posts vivid to users, the Stack Overflow platform allows users to write and edit posts with Markdown or HTML, so that users can leverage various formatting styles (e.g., bold, italic, and code) to highlight the important information.In this study, we carry out the first large-scale exploratory study on the information highlighting in SO answers. We observe that overall, information highlighting is prevalent on SO, i.e., 47.6% of the answers have information highlighted. More specifically, 38.5%, 11.3%, 7.2% of the answers use Code, Bold, and Italic, respectively. Besides source code related content (e.g., identifiers, and programming keywords), users also frequently highlight updates (e.g., updates of answers), caveats (i.e., a reminder or warn of in which context or condition the provided solution works or does not work), and reference. Our findings provide insights for future research, e.g., future research should consider the highlighted content for the downstream tasks that leverage information from the SO answers.","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"71 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122562964","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Marco Raglianti, Csaba Nagy, Roberto Minelli, Michele Lanza
{"title":"DiscOrDance: Visualizing Software Developers Communities on Discord","authors":"Marco Raglianti, Csaba Nagy, Roberto Minelli, Michele Lanza","doi":"10.1109/ICSME55016.2022.00062","DOIUrl":"https://doi.org/10.1109/ICSME55016.2022.00062","url":null,"abstract":"New communication platforms have emerged to support developers in finding and creating the knowledge they need for program comprehension, maintenance, and evolution. Instant messaging applications are supplanting developer mailing lists in collaborative development toolchains. These applications provide a new medium, supporting faster and richer communication (e.g., embedded previews, images, files, videos). Research so far focused on extracting information from these platforms, but there is a lack of tools to visually and interactively explore them.We present DiscOrDance, a tool for the interactive visual exploration of the complete message history of a Discord server. We show how three categories of views elicit insights on aspects of the structure, members, and software related content of a Discord server. We demonstrate use cases of DiscOrDance to support software maintenance and evolution activities on an active software developer community, the Pharo Discord server.Demo video: https://youtu.be/eYCLGWwM9HYTool homepage: https://DiscOrDance.si.usi.ch","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"195 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122519231","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"FuzzNT : Checking for Program Non-termination","authors":"Hrishikesh Karmarkar, Raveendra Kumar Medicherla, Ravindra Metta, Prasanth Yeduru","doi":"10.1109/ICSME55016.2022.00049","DOIUrl":"https://doi.org/10.1109/ICSME55016.2022.00049","url":null,"abstract":"Unintended non-termination of programs could lead to attacks such as Denial-of-Service(DoS). Current testing techniques are not geared to detect such errors. Towards this, we present FuzzNT, a hybrid testing technique to check non-termination of C programs by combining Coverage Guided Fuzzing (CGF) and abstract interpretation based static analysis. Given a program P and the coverage test inputs generated using CGF, P is transformed into a set of specialized programs, each of which under-approximates P. Abstract interpretation is then used to check each of these smaller programs for non-termination. The key advantage of this approach for checking non-termination is that it reuses the test case corpus created during software development and maintenance. Our preliminary experimental evaluation of FuzzNT shows highly promising results.","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"83 1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128168709","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Mitchell Olsthoorn, A. van Deursen, Annibale Panichella
{"title":"Guiding Automated Test Case Generation for Transaction-Reverting Statements in Smart Contracts","authors":"Mitchell Olsthoorn, A. van Deursen, Annibale Panichella","doi":"10.1109/ICSME55016.2022.00023","DOIUrl":"https://doi.org/10.1109/ICSME55016.2022.00023","url":null,"abstract":"Transaction-reverting statements are key constructs within Solidity that are extensively used for authority and validity checks. Current state-of-the-art search-based testing and fuzzing approaches do not explicitly handle these statements and therefore can not effectively detect security vulnerabilities. In this paper, we argue that it is critical to directly handle and test these statements to assess that they correctly protect the contracts against invalid requests. To this aim, we propose a new approach that improves the search guidance for these transaction-reverting statements based on interprocedural control dependency analysis, in addition to the traditional coverage criteria. We assess the benefits of our approach by performing an empirical study on 100 smart contracts w.r.t. transaction-reverting statement coverage and vulnerability detection capability. Our results show that the proposed approach can improve the performance of Dy-naMOSA, the state-of-the-art algorithm for test case generation. On average, we improve transaction-reverting statement coverage by 14 % (up to 35 %), line coverage by 8 % (up to 32 %), and vulnerability-detection capability by 17 % (up to 50 %).","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"19 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127902814","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Gunnar Kudrjavets, Ayushi Rastogi, Jeff Thomas, Nachiappan Nagappan
{"title":"On Quantifying the Benefits of Dead Code Removal","authors":"Gunnar Kudrjavets, Ayushi Rastogi, Jeff Thomas, Nachiappan Nagappan","doi":"10.1109/ICSME55016.2022.00076","DOIUrl":"https://doi.org/10.1109/ICSME55016.2022.00076","url":null,"abstract":"Engineers consider the presence of dead code as an undesirable attribute of the code base. The industry lacks methods to quantify the benefits of deleting dead code efficiently. The current approach utilizes a simplistic metric that uses the lines of code (LOC) deleted as a proxy to estimate the benefit gained. However, not all LOC are equal. The research community can support the industry and propose methods and metrics that can help to (a) determine the priority order for dead code removal, and (b) quantify the benefits of dead code removal. Improved metrics can result in a more objective ranking of dead code deletion efforts when compared to other competing tasks.","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"47 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132208623","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Wendell Mendes, Oton Pinheiro, Emanuele Santos, Lincoln S. Rocha, Windson Viana
{"title":"Dazed and Confused: Studying the Prevalence of Atoms of Confusion in Long-Lived Java Libraries","authors":"Wendell Mendes, Oton Pinheiro, Emanuele Santos, Lincoln S. Rocha, Windson Viana","doi":"10.1109/ICSME55016.2022.00018","DOIUrl":"https://doi.org/10.1109/ICSME55016.2022.00018","url":null,"abstract":"Program comprehension is a fundamental activity in software maintenance and evolution, impacting several tasks such as bug fixing, code reuse, and implementation of new features. The Atom of Confusion (AC) is considered the smallest piece of code that can confuse programmers, difficulting the correct understanding of the source code under consideration. Previous studies have shown that these atoms can significantly impact the presence of bugs in C++ projects and increase the time and effort to code understanding in C++ and Java programs. To gather more evidence about the diffusion of ACs in the Java ecosystem, we conduct a study to analyze the prevalence, co-occurrences (at the class level), and evolution of ACs in 27 long-lived Java libraries. To support our investigation, we developed an ACs automatic search tool, which found 11.404 occurrences in the studied libraries. The Conditional Operator and Logic as Control Flow ACs were the most prevalent among the 10 types of ACs assessed. Our findings show that Conditional Operator and Logic as Control Flow were more likely to co-occur in the same class. Finally, we observed that the prevalence of ACs did not decrease over time. On the contrary, in 13 libraries, the presence grew proportionally more than the size of the library in lines of code. Furthermore, in 15 libraries, the fraction of Java classes containing at least one AC also increases over time.","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"438 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"134178391","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"On the Evolution of Code Readability","authors":"Valentina Piantadosi","doi":"10.1109/ICSME55016.2022.00082","DOIUrl":"https://doi.org/10.1109/ICSME55016.2022.00082","url":null,"abstract":"Code reading is an activity frequently performed by developers. Before modifying code, developers have to read it, especially if it was authored by others. Several studies have been carried out to find insights related to code readability. However, they were mostly conducted on single (static) code snippets, i.e., they did not consider the ever-changing nature of software. In a preliminary study, we observed that refactoring operations performed by developers to improve several nonfunctional aspects of open-source software systems often result in improved code readability. Motivated by such results, in this research, we studied code readability in the context of software evolution. Especially, we aimed at understanding: (i) to what extent software developers are interested in code readability; (ii) how to code readability evolves in complex software systems;(iii) the influence of developers’ personal characteristics on the evolution of code readability. The results achieved indicate that most of the developers we surveyed reported that they consider readability as an important aspect of the source code. Then, by mining several software repositories we observed that readability rarely changes in software evolution. Therefore, files created unreadable rarely become readable, and vice versa. Finally, we noticed that some personal characteristics of developers have an impact on code readability. In particular, developers’ orienting network (related to their attention) positively correlates with code readability.","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131159882","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Fiorella Zampetti, Francois Belias, Cyrine Zid, G. Antoniol, M. D. Penta
{"title":"An Empirical Study on the Fault-Inducing Effect of Functional Constructs in Python","authors":"Fiorella Zampetti, Francois Belias, Cyrine Zid, G. Antoniol, M. D. Penta","doi":"10.1109/ICSME55016.2022.00013","DOIUrl":"https://doi.org/10.1109/ICSME55016.2022.00013","url":null,"abstract":"Functional programming is expected to introduce several benefits to programs, including fewer side effects, easier parallelization, and even, in some circumstances, better comprehensibility. This paper investigates the extent to which the addition/modification of certain programming language constructs, i.e., lambdas, comprehensions, and map/filter/reduce, have higher chances to induce fixes than other changes. To this extent, we analyze the change history of 200 popular open-source programs written in Python, accounting for ≃ 630k commits and 6M changes. The study results show that changes to functional constructs have higher odds to induce fixes than other changes, and that some functional constructs, such as lambdas and comprehensions, have higher odds to induce fixes than others. Finally, a qualitative analysis revealed different scenarios in which functional constructs have been fixed. Results of this study may trigger better development support when using functional constructs during development, and prioritize code review and testing on certain areas of the source code.","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"27 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132874383","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}