Saved in:
Bibliographic Details
Main Authors: Wang, Haibo, Xing, Zezhong, Wang, Zheng, Sun, Chengnian, Tan, Shin Hwei
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2401.15234
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913212712091648
author Wang, Haibo
Xing, Zezhong
Wang, Zheng
Sun, Chengnian
Tan, Shin Hwei
author_facet Wang, Haibo
Xing, Zezhong
Wang, Zheng
Sun, Chengnian
Tan, Shin Hwei
contents To reduce the complexity of software, Developers manually simplify program (known as developer-induced program simplification in this paper) to reduce its code size yet preserving its functionality but manual simplification is time-consuming and error-prone. To reduce manual effort, rule-based approaches (e.g., refactoring) and deletion-based approaches (e.g., delta debugging) can be potentially applied to automate developer-induced program simplification. However, as there is little study on how developers simplify programs in Open-source Software (OSS) projects, it is unclear whether these approaches can be effectively used for developer-induced program simplification. Hence, we present the first study of developer-induced program simplification in OSS projects, focusing on the types of program transformations used, the motivations behind simplifications, and the set of program transformations covered by existing refactoring types. Our study of 382 pull requests from 296 projects reveals that there exist gaps in applying existing approaches for automating developer-induced program simplification. and outlines the criteria for designing automatic program simplification techniques. Inspired by our study and to reduce the manual effort in developer-induced program simplification, we propose SimpT5, a tool that can automatically produce simplified programs (semantically-equivalent programs with reduced source lines of code). SimpT5 is trained based on our collected dataset of 92,485 simplified programs with two heuristics: (1) simplified line localization that encodes lines changed in simplified programs, and (2)checkers that measure the quality of generated programs. Our evaluation shows that SimpT5 are more effective than prior approaches in automating developer-induced program simplification.
format Preprint
id arxiv_https___arxiv_org_abs_2401_15234
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Moving beyond Deletions: Program Simplification via Diverse Program Transformations
Wang, Haibo
Xing, Zezhong
Wang, Zheng
Sun, Chengnian
Tan, Shin Hwei
Software Engineering
To reduce the complexity of software, Developers manually simplify program (known as developer-induced program simplification in this paper) to reduce its code size yet preserving its functionality but manual simplification is time-consuming and error-prone. To reduce manual effort, rule-based approaches (e.g., refactoring) and deletion-based approaches (e.g., delta debugging) can be potentially applied to automate developer-induced program simplification. However, as there is little study on how developers simplify programs in Open-source Software (OSS) projects, it is unclear whether these approaches can be effectively used for developer-induced program simplification. Hence, we present the first study of developer-induced program simplification in OSS projects, focusing on the types of program transformations used, the motivations behind simplifications, and the set of program transformations covered by existing refactoring types. Our study of 382 pull requests from 296 projects reveals that there exist gaps in applying existing approaches for automating developer-induced program simplification. and outlines the criteria for designing automatic program simplification techniques. Inspired by our study and to reduce the manual effort in developer-induced program simplification, we propose SimpT5, a tool that can automatically produce simplified programs (semantically-equivalent programs with reduced source lines of code). SimpT5 is trained based on our collected dataset of 92,485 simplified programs with two heuristics: (1) simplified line localization that encodes lines changed in simplified programs, and (2)checkers that measure the quality of generated programs. Our evaluation shows that SimpT5 are more effective than prior approaches in automating developer-induced program simplification.
title Moving beyond Deletions: Program Simplification via Diverse Program Transformations
topic Software Engineering
url https://arxiv.org/abs/2401.15234