Meaningful thresholds are needed for promoting software metrics as an effective instrument to measure the internal quality of systems. To address this challenge, in this PhD Thesis, we propose the concept of Relative Thresholds (RT) for evaluating metrics data following heavy-tailed distributions. The proposed thresholds assume that metric thresholds should be followed by most entities, but that it is also natural to have a number of entities in the "long-tail" that do not follow the defined limits. We describe an empirical method for deriving RT from a corpus of systems. We also perform an extensive analysis of RT: (i) we apply RT on a sample of 308 GitHub repositories. We found that most repositories follow the extracted RT; (ii) We compare the proposed RT with thresholds extracted according to a method used by the software industry. We concluded that both methods convey similar information. However, our method derives RT that can be automatically used to detect noncompliant systems; (iii) we evaluate the influence of context in our results and we concluded that the impact on RT of context changes is limited; (iv) we perform a historical analysis to check whether the proposed RT are followed by different versions of the systems under analysis. We found that our RT capture enduring software properties; (v) we check the importance of classes that do not follow the upper limit of a RT and we found these classes are important in terms of maintenance activities; (vi) we investigate the relation between the presence of bad smells in a system and its adherence to the proposed RT. We do not found evidence that noncompliant systems have more density of bad smells; (vii) we evaluated the dispersion of the metric values in the systems respecting the proposed RT, using the Gini coefficient. We found that there are different distributions of methods per class among the systems that follow the proposed RT; and (viii) We conducted a qualitative study to evaluate our method with developers. The results indicate that well-designed systems respect the RT. In contrast, we observed that developers usually have difficulties to indicate poorly-designed systems.
Abstract-Meaningful thresholds are essential for promoting source code metrics as an effective instrument to control the internal quality of software systems. Despite the increasing number of source code measurement tools, no publicly available tools support extraction of metric thresholds. Moreover, earlier studies suggest that in larger systems significant number of classes exceed recommended metric thresholds. Therefore, in our previous study we have introduced the notion of a relative threshold, i.e., a pair including an upper limit and a percentage of classes whose metric values should not exceed this limit.In this paper we propose RTTOOL, an open source tool for extracting relative thresholds from the measurement data of a benchmark of software systems. RTTOOL is publicly available at http://aserg.labsoft.dcc.ufmg.br/rttool.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.