kth.sePublications
Change search
Link to record
Permanent link

Direct link
Madeiral Delfim, FernandaORCID iD iconorcid.org/0000-0003-2048-7648
Publications (6 of 6) Show all publications
Etemadi, K., Harrand, N., Larsén, S., Adzemovic, H., Luong Phu, H., Verma, A., . . . Monperrus, M. (2022). Sorald: Automatic Patch Suggestions for SonarQube Static Analysis Violations. IEEE Transactions on Dependable and Secure Computing, 1-1
Open this publication in new window or tab >>Sorald: Automatic Patch Suggestions for SonarQube Static Analysis Violations
Show others...
2022 (English)In: IEEE Transactions on Dependable and Secure Computing, ISSN 1545-5971, E-ISSN 1941-0018, p. 1-1Article in journal (Refereed) Published
Abstract [en]

Previous work has shown that early resolution of issues detected by static code analyzers can prevent major costs later on. However, developers often ignore such issues for two main reasons. First, many issues should be interpreted to determine if they correspond to actual flaws in the program. Second, static analyzers often do not present the issues in a way that is actionable. To address these problems, we present Sorald: a novel system that uses metaprogramming templates to transform the abstract syntax trees of programs and suggests fixes for static analysis warnings. Thus, the burden on the developer is reduced from interpreting and fixing static issues, to inspecting and approving full fledged solutions. Sorald fixes violations of 10 rules from SonarJava, one of the most widely used static analyzers for Java. We evaluate Sorald on a dataset of 161 popular repositories on Github. Our analysis shows the effectiveness of Sorald as it fixes 65% (852/1,307) of the violations that meets the repair preconditions. Overall, our experiments show it is possible to automatically fix notable violations of the static analysis rules produced by the state-of-the-art static analyzer SonarJava.

Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers (IEEE), 2022
Keywords
automatic program repair, Codes, Computer bugs, Java, Maintenance engineering, metaprogramming, Software development management, Static analysis, Static code analysis, Syntactics, Codes (symbols), Computer software, Java programming language, Program debugging, Repair, Software design, Trees (mathematics), Automatic programs, Code, Meta Programming, Static analyzers, Static codes
National Category
Computer Sciences
Identifiers
urn:nbn:se:kth:diva-323274 (URN)10.1109/TDSC.2022.3167316 (DOI)001029054600009 ()2-s2.0-85128651786 (Scopus ID)
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)Swedish Foundation for Strategic Research, trustfull
Note

QC 20230124

Available from: 2023-01-24 Created: 2023-01-24 Last updated: 2024-10-22Bibliographically approved
Loriot, B., Madeiral Delfim, F. & Monperrus, M. (2022). Styler: learning formatting conventions to repair Checkstyle violations. Empirical Software Engineering, 27(6), Article ID 149.
Open this publication in new window or tab >>Styler: learning formatting conventions to repair Checkstyle violations
2022 (English)In: Empirical Software Engineering, ISSN 1382-3256, E-ISSN 1573-7616, Vol. 27, no 6, article id 149Article in journal (Refereed) Published
Abstract [en]

Ensuring the consistent usage of formatting conventions is an important aspect of modern software quality assurance. To do so, the source code of a project should be checked against the formatting conventions (or rules) adopted by its development team, and then the detected violations should be repaired if any. While the former task can be automatically done by format checkers implemented in linters, there is no satisfactory solution for the latter. Manually fixing formatting convention violations is a waste of developer time and code formatters do not take into account the conventions adopted and configured by developers for the used linter. In this paper, we present Styler, a tool dedicated to fixing formatting rule violations raised by format checkers using a machine learning approach. For a given project, Styler first generates training data by injecting violations of the project-specific rules in violation-free source code files. Then, it learns fixes by feeding long short-term memory neural networks with the training data encoded into token sequences. Finally, it predicts fixes for real formatting violations with the trained models. Currently, Styler supports a single checker, Checkstyle, which is a highly configurable and popular format checker for Java. In an empirical evaluation, Styler repaired 41% of 26,791 Checkstyle violations mined from 104 GitHub projects. Moreover, we compared Styler with the IntelliJ plugin CheckStyle-IDEA and the machine-learning-based code formatters Naturalize and CodeBuff. We found out that Styler fixes violations of a diverse set of Checkstyle rules (24/25 rules), generates smaller repairs in comparison to the other systems, and predicts repairs in seconds once trained on a project. Through a manual analysis, we identified cases in which Styler does not succeed to generate correct repairs, which can guide further improvements in Styler. Finally, the results suggest that Styler can be useful to help developers repair Checkstyle formatting violations.

Place, publisher, year, edition, pages
Springer Nature, 2022
Keywords
Coding conventions, Linter, Format checker, Checkstyle, Formatting violations, Automatic repair
National Category
Software Engineering Musicology Computer Engineering
Identifiers
urn:nbn:se:kth:diva-316695 (URN)10.1007/s10664-021-10107-0 (DOI)000836798500010 ()2-s2.0-85135574598 (Scopus ID)
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)Swedish Foundation for Strategic Research, trustfull
Note

QC 20221101

Available from: 2022-09-05 Created: 2022-09-05 Last updated: 2022-11-01Bibliographically approved
Madeiral Delfim, F. & Durieux, T. (2021). A large-scale study on human-cloned changes for automated program repair. In: 2021 IEEE/ACM 18Th International Conference On Mining Software Repositories (Msr 2021): . Paper presented at 29th IEEE/ACM International Conference on Program Comprehension (ICPC) / 18th IEEE/ACM International Conference on Mining Software Repositories (MSR), MAY 22-30, 2021, ELECTR NETWORK (pp. 510-514). Institute of Electrical and Electronics Engineers (IEEE)
Open this publication in new window or tab >>A large-scale study on human-cloned changes for automated program repair
2021 (English)In: 2021 IEEE/ACM 18Th International Conference On Mining Software Repositories (Msr 2021), Institute of Electrical and Electronics Engineers (IEEE) , 2021, p. 510-514Conference paper, Published paper (Refereed)
Abstract [en]

Research in automatic program repair has shown that real bugs can be automatically fixed. However, there are several challenges involved in such a task that are not yet fully addressed. As an example, consider that a test-suite-based repair tool performs a change in a program to fix a bug spotted by a failing test case, but then the same or another test case fails. This could mean that the change is a partial fix for the bug or that another bug was manifested. However, the repair tool discards the change and possibly performs other repair attempts. One might wonder if the applied change should be also applied in other locations in the program so that the bug is fully fixed. In this paper, we are interested in investigating the extent of bug fix changes being cloned by developers within patches. Our goal is to investigate the need of multi-location repair by using identical or similar changes in identical or similar contexts. To do so, we analyzed 3,049 multi-hunk patches from the ManySStuBs4J dataset, which is a large dataset of single statement bug fix changes. We found out that 68% of the multi-hunk patches contain at least one change clone group. Moreover, most of these patches (70%) are strictly-cloned ones, which are patches fully composed of changes belonging to one single change clone group. Finally, most of the strictly-cloned patches (89%) contain change clones with identical changes, independently of their contexts. We conclude that automated solutions for creating patches composed of identical or similar changes can be useful for fixing bugs.

Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers (IEEE), 2021
Series
IEEE International Working Conference on Mining Software Repositories, ISSN 2160-1852
Keywords
automatic program repair, patch, change clone
National Category
Computer Sciences
Identifiers
urn:nbn:se:kth:diva-303514 (URN)10.1109/MSR52588.2021.00064 (DOI)000693399500052 ()2-s2.0-85111446885 (Scopus ID)
Conference
29th IEEE/ACM International Conference on Program Comprehension (ICPC) / 18th IEEE/ACM International Conference on Mining Software Repositories (MSR), MAY 22-30, 2021, ELECTR NETWORK
Note

Part of proceedings: ISBN 978-1-7281-8710-5, QC 20230117

Available from: 2021-10-15 Created: 2021-10-15 Last updated: 2023-01-17Bibliographically approved
Ebert, F., Madeiral Delfim, F., Scalabrino, S., Castor, F. & Oliveto, R. (2021). Message from the AeSIR 2021 Chairs. In: : . Paper presented at 2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW), Melbourne, Australia, 15-19 November 2021. Institute of Electrical and Electronics Engineers (IEEE)
Open this publication in new window or tab >>Message from the AeSIR 2021 Chairs
Show others...
2021 (English)Conference paper, Published paper (Refereed)
Abstract [en]

It is our pleasure to welcome you to the first edition of the International Workshop on Automated Support to Improve code Readability (AeSIR) which is being virtually held and co-located with the 36th IEEE/ACM International Conference on Automated Software Engineering (ASE 2021). Reading and understanding code is essential to implement new features in an existing system, refactor, debug, write tests, and perform code reviews. Developers spend large amounts of time reading code and making the code easier to read and understand is an important goal with potential practical impact. In this context, automatically measuring and improving legibility, readability, and understandability is of primary importance to help developers addressing program comprehension issues. The Workshop on Automated Support to Improve code Readability (AeSIR) aims at providing a forum for researchers and practitioners to discuss both new approaches and emerging results related to such aspects. In this first edition of AeSIR, we have 4 accepted papers which address novel tools and approaches for automatically measuring and improving code legibility, readability, and understandability. As organizers, we would like to thank the authors of all the submitted papers, the program committee members, the ASE workshop chairs and the conference organizers, who have all contributed to the success of this workshop!

Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers (IEEE), 2021
National Category
Software Engineering
Identifiers
urn:nbn:se:kth:diva-316285 (URN)10.1109/ASEW52652.2021.00010 (DOI)2-s2.0-85125659591 (Scopus ID)
Conference
2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW), Melbourne, Australia, 15-19 November 2021
Note

QC 20220815

Available from: 2022-08-15 Created: 2022-08-15 Last updated: 2022-08-19Bibliographically approved
Oliveira, D., Bruno, R., Madeiral Delfim, F. & Castor, F. (2020). Evaluating Code Readability and Legibility: An Examination of Human-centric Studies. In: Proceedings - 2020 IEEE International Conference on Software Maintenance and Evolution, ICSME 2020: . Paper presented at IEEE International Conference on Software Maintenance and Evolution, ICSME 2020, Adelaide, Australia, September 28 - October 2, 2020 (pp. 348-359). Institute of Electrical and Electronics Engineers (IEEE)
Open this publication in new window or tab >>Evaluating Code Readability and Legibility: An Examination of Human-centric Studies
2020 (English)In: Proceedings - 2020 IEEE International Conference on Software Maintenance and Evolution, ICSME 2020, Institute of Electrical and Electronics Engineers (IEEE) , 2020, p. 348-359Conference paper, Published paper (Refereed)
Abstract [en]

Reading code is an essential activity in software maintenance and evolution. Several studies with human subjects have investigated how different factors, such as the employed programming constructs and naming conventions, can impact code readability, i.e., what makes a program easier or harder to read and apprehend by developers, and code legibility, i.e., what influences the ease of identifying elements of a program. These studies evaluate readability and legibility by means of different comprehension tasks and response variables. In this paper, we examine these tasks and variables in studies that compare programming constructs, coding idioms, naming conventions, and formatting guidelines, e.g., recursive vs. iterative code. To that end, we have conducted a systematic literature review where we found 54 relevant papers. Most of these studies evaluate code readability and legibility by measuring the correctness of the subjects' results (83.3%) or simply asking their opinions (55.6%). Some studies (16.7%) rely exclusively on the latter variable. There are still few studies that monitor subjects' physical signs, such as brain activation regions (5%). Moreover, our study shows that some variables are multi-faceted. For instance, correctness can be measured as the ability to predict the output of a program, answer questions about its behavior, or recall parts of it. These results make it clear that different evaluation approaches require different competencies from subjects, e.g., tracing the program vs. summarizing its goal vs. memorizing its text. To assist researchers in the design of new studies and improve our comprehension of existing ones, we model program comprehension as a learning activity by adapting a preexisting learning taxonomy. This adaptation indicates that some competencies, e.g., tracing, are often exercised in these evaluations whereas others, e.g., relating similar code snippets, are rarely targeted.

Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers (IEEE), 2020
Keywords
code legibility, Code readability, code understandability, code understanding, program comprehension, Brain activation, Comprehension tasks, Evaluation approach, Human subjects, Learning Activity, Software maintenance and evolution, Systematic literature review, Computer software maintenance
National Category
Software Engineering
Identifiers
urn:nbn:se:kth:diva-291285 (URN)10.1109/ICSME46990.2020.00041 (DOI)000613139300031 ()2-s2.0-85096655684 (Scopus ID)
Conference
IEEE International Conference on Software Maintenance and Evolution, ICSME 2020, Adelaide, Australia, September 28 - October 2, 2020
Note

QC 20210322

Available from: 2021-03-22 Created: 2021-03-22 Last updated: 2022-06-25Bibliographically approved
Monperrus, M. (2019). How to make a good open-science repository?.
Open this publication in new window or tab >>How to make a good open-science repository?
Show others...
2019 (English)Report (Other (popular science, discussion, etc.))
National Category
Computer Systems
Identifiers
urn:nbn:se:kth:diva-326168 (URN)
Note

QC 20230426

Available from: 2023-04-25 Created: 2023-04-25 Last updated: 2024-08-20Bibliographically approved
Organisations
Identifiers
ORCID iD: ORCID iD iconorcid.org/0000-0003-2048-7648

Search in DiVA

Show all publications