Combining GIN and PMD for code improvements

Sherlock A. Licorish, Markus Wagner

Research output: Chapter in Book/Report/Conference proceedingConference PaperResearchpeer-review

4 Citations (Scopus)

Abstract

Software developers are increasingly dependent on question and answer portals and blogs for coding solutions. While such interfaces provide useful information, there are concerns that code hosted here is often incorrect, insecure or incomplete. Previous work indeed detected a range of faults in code provided on Stack Overflow through the use of static analysis. Static analysis may go a far way towards quickly establishing the health of software code available online. In addition, mechanisms that enable rapid automated program improvement may then enhance such code. Accordingly, we present this proof of concept. We use the PMD static analysis tool to detect performance faults for a sample of Stack Overflow Java code snippets, before performing mutations on these snippets using GIN. We then re-analyse the performance faults in these snippets after the GIN mutations. GIN's RandomSampler was used to perform 17,986 unique line and statement patches on 3,034 snippets where PMD violations were removed from 770 patched versions. Our outcomes indicate that static analysis techniques may be combined with automated program improvement methods to enhance publicly available code with very little resource requirements. We discuss our planned research agenda in this regard.

Original languageEnglish
Title of host publicationProceedings of the 2022 Genetic and Evolutionary Computation Conference Companion
EditorsJonathan Fieldsend
Place of PublicationNew York NY USA
PublisherAssociation for Computing Machinery (ACM)
Pages790-793
Number of pages4
ISBN (Electronic)9781450392686
DOIs
Publication statusPublished - 2022
Externally publishedYes
EventThe Genetic and Evolutionary Computation Conference 2022 - Online, Boston, United States of America
Duration: 9 Jul 202213 Jul 2022
https://dl.acm.org/doi/proceedings/10.1145/3520304 (Proceedings)
https://gecco-2022.sigevo.org/HomePage (Website)

Conference

ConferenceThe Genetic and Evolutionary Computation Conference 2022
Abbreviated titleGECCO 2022
Country/TerritoryUnited States of America
CityBoston
Period9/07/2213/07/22
Internet address

Cite this