Abstract

Code reuse has become very popular among software developers in recent times since it saves time and resources. One of the significant difficulties to software reuse is the time pertaining to assess the fitness of the reusable code components. Over the recent years, code search engines have made momentous advancement in establishing the semantic suitability of software components for new usage scenarios. But the issue of evaluating software components based on their nonfunctional suitability has been overlooked to a large extent. The maintenance and reusability of software systems are highly influenced by the structural properties of system classes like complexity, size, coupling, cohesion, etc. The quality of object-oriented code or design artifacts is commonly measured by analyzing the structure of these artifacts in terms of the interdependencies of classes and components as well as their internal elements. In this paper, we perform an empirical analysis on Python packages for the two measures namely coupling and cohesion. The coupling score of a module is computed as module imports and the cohesion score of a module is evaluated as call dependency between classes and global functions of the module. Finally, the proposed work evaluates a package in terms of reusability score which is a cumulative score of the coupling scores and cohesion scores of all the modules within the package. The study has evaluated 15 different packages and five different releases of one single package for reusability. We have empirically tested that the Halstead’s effort metric is inversely proportional to the reusability score. The reusability score was validated using four code detuners. The proposed work was compared with the existing metrics namely cyclomatic complexity and maintainability Index showing satisfactory results.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.