A cohesion metric approach to dividing source code into functional segments to improve maintainability

During software maintenance, understanding source code is one of time-consuming activities. Good programming practice suggests that programmers should insert blank lines to divide source code into functional segments, and a comment at the beginning of each functional segment. Those help developers to understand functional segmentation of source code, such as start and end points of each functional segment. Unfortunately, programmers do not always follow this practice. In this paper, we propose an approach to dividing source code into functional segments. Our approach uses cohesion metric for code portion to identify start and end points of each functional segment.

[1]  Allan Tucker,et al.  Object-oriented cohesion as a surrogate of software comprehension: an empirical study , 2005, Fifth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'05).

[2]  Brian Henderson-Sellers,et al.  Object-Oriented Metrics , 1995, TOOLS.

[3]  Lionel E. Deimel The uses of program reading , 1985, SGCS.

[4]  Katsuro Inoue,et al.  A Software Metric for Identifying Extract Method Candidates , 2009 .

[5]  James M. Bieman,et al.  Program slices as an abstraction for cohesion measurement , 1998, Inf. Softw. Technol..

[6]  Glenford J. Myers,et al.  Structured Design , 1974, IBM Syst. J..

[7]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[8]  Keith H. Bennett,et al.  Hypothesis-based concept assignment in software maintenance , 2002, IEE Proc. Softw..

[9]  Xiaoran Wang,et al.  Automatic Segmentation of Method Code into Meaningful Blocks to Improve Readability , 2011, 2011 18th Working Conference on Reverse Engineering.

[10]  Rainer Koschke,et al.  Locating Features in Source Code , 2003, IEEE Trans. Software Eng..

[11]  Linda M. Ott,et al.  Slice based metrics for estimating cohesion , 1993, [1993] Proceedings First International Software Metrics Symposium.

[12]  Darrell R. Raymond,et al.  Reading source code , 1991, CASCON.

[13]  James M. Bieman,et al.  Measuring Functional Cohesion , 1994, IEEE Trans. Software Eng..

[14]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..