Write a Blog >>
ICSE 2023
Sun 14 - Sat 20 May 2023 Melbourne, Australia
Thu 18 May 2023 14:00 - 14:15 at Meeting Room 103 - Programming languages Chair(s): Jean-Guy Schneider

To create unit tests, it may be necessary to refactor the production code, e.g. by widening access to specific methods or by decomposing classes into smaller units that are easier to test independently. We report on an extensive study to understand such composite refactoring procedures for the purpose of improving testability. We collected and studied 346,841 java pull requests from 621 GitHub projects. First, we compared the atomic refactorings in two populations: pull requests with changed test-pairs (i.e. with co-changes in production and test code and thus potentially including testability refactoring) and pull requests without test-pairs. We found significantly more atomic refactorings in test-pairs pull requests, such as Change Variable Type Operation or Change Parameter Type.

Second, we manually analyzed the code changes of 200 pull requests, where developers explicitly mention the terms “testability” or “refactor + test”. We identified ten composite refactoring procedures for the purpose of testability, which we call testability refactoring patterns. Third, we manually analyzed additional 524 test-pairs pull requests: both randomly selected and where we assumed to find testability refactorings, e.g. in pull requests about dependency or concurrency issues. About 25% of all analyzed pull requests actually included testability refactoring patterns. The most frequent were extract a method for override or for invocation, widen access to a method for invocation, and extract a class for invocation. We also report on frequent atomic refactorings which co-occur with the patterns and discuss the implications of our findings for research, practice, and education.

Thu 18 May

Displayed time zone: Hobart change

13:45 - 15:15
13:45
15m
Talk
Demystifying Issues, Challenges, and Solutions for Multilingual Software Development
Technical Track
Haoran Yang Washington State University, Weile Lian Washington State University, Shaowei Wang University of Manitoba, Haipeng Cai Washington State University
Pre-print
14:00
15m
Talk
Testability Refactoring in Pull Requests: Patterns and Trends
Technical Track
Pavel Reich University of Hamburg, Walid Maalej University of Hamburg
Pre-print
14:15
15m
Talk
Usability-Oriented Design of Liquid Types for Java
Technical Track
Catarina Gamboa CMU and LASIGE, Paulo Canelas Carnegie Mellon University, Christopher Steven Timperley Carnegie Mellon University, Alcides Fonseca University of Lisbon
DOI
14:30
15m
Talk
A Theorem Proving Approach to Programming Language Semantics
SEET - Software Engineering Education and Training
Subhajit Roy IIT Kanpur
14:45
7m
Talk
RIdiom: Automatically Refactoring Non-idiomatic Python Code with Pythonic Idioms
DEMO - Demonstrations
zejun zhang Australian National University, Zhenchang Xing CSIRO’s Data61; Australian National University, Xiwei (Sherry) Xu CSIRO’s Data61, Liming Zhu CSIRO’s Data61
14:52
7m
Talk
An Empirical Study of Data Constraint Implementations in Java
Journal-First Papers
Juan Manuel Florez CQSE America, Laura Moreno CQSE America, Zenong Zhang The University of Texas at Dallas, Shiyi Wei University of Texas at Dallas, Andrian Marcus University of Texas at Dallas
14:59
7m
Talk
Learning To Predict User-Defined Types
Journal-First Papers
Kevin Jesse University of California at Davis, USA, Prem Devanbu University of California at Davis, Anand Ashok Sawant University of California, Davis