Exception handling refactorings: Directed by goals and driven by bug fixing

  • Authors:
  • Chien-Tsun Chen;Yu Chin Cheng;Chin-Yun Hsieh;I-Lang Wu

  • Affiliations:
  • Department of Computer Science and Information Engineering, National Taipei University of Technology, 1, Sec 3, Chung-Hsiao E. Road, Taipei 106, Taiwan;Department of Computer Science and Information Engineering, National Taipei University of Technology, 1, Sec 3, Chung-Hsiao E. Road, Taipei 106, Taiwan;Department of Computer Science and Information Engineering, National Taipei University of Technology, 1, Sec 3, Chung-Hsiao E. Road, Taipei 106, Taiwan;Department of Computer Science and Information Engineering, National Taipei University of Technology, 1, Sec 3, Chung-Hsiao E. Road, Taipei 106, Taiwan

  • Venue:
  • Journal of Systems and Software
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Exception handling design can improve robustness, which is an important quality attribute of software. However, exception handling design remains one of the less understood and considered parts in software development. In addition, like most software design problems, even if developers are requested to design with exception handling beforehand, it is very difficult to get the right design at the first shot. Therefore, improving exception handling design after software is constructed is necessary. This paper applies refactoring to incrementally improve exception handling design. We first establish four exception handling goals to stage the refactoring actions. Next, we introduce exception handling smells that hinder the achievement of the goals and propose exception handling refactorings to eliminate the smells. We suggest exception handling refactoring is best driven by bug fixing because it provides measurable quality improvement results that explicitly reveal the benefits of refactoring. We conduct a case study with the proposed refactorings on a real world banking application and provide a cost-effectiveness analysis. The result shows that our approach can effectively improve exception handling design, enhance software robustness, and save maintenance cost. Our approach simplifies the process of applying big exception handling refactoring by dividing the process into clearly defined intermediate milestones that are easily exercised and verified. The approach can be applied in general software development and in legacy system maintenance.