Next Article in Journal
RBCN-Net: A Data-Driven Inertial Navigation Algorithm for Pedestrians
Next Article in Special Issue
Measuring Empathy in Technical Teams to Improve the UX Quality of Innovative Technological Solutions
Previous Article in Journal
Sum Rate Optimization Scheme of UAV-Assisted NOMA under Hardware Impairments
Previous Article in Special Issue
The Impact of Agile Methodology on Project Success, with a Moderating Role of Person’s Job Fit in the IT Industry of Pakistan
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Exploring Maintainability Index Variants for Software Maintainability Measurement in Object-Oriented Systems

Faculty of Electrical Engineering and Computer Science, University of Maribor, Koroška Cesta 46, 2000 Maribor, Slovenia
*
Author to whom correspondence should be addressed.
Appl. Sci. 2023, 13(5), 2972; https://doi.org/10.3390/app13052972
Submission received: 9 February 2023 / Revised: 20 February 2023 / Accepted: 23 February 2023 / Published: 25 February 2023
(This article belongs to the Collection Software Engineering: Computer Science and System)

Abstract

:
During maintenance, software systems undergo continuous correction and enhancement activities due to emerging faults, changing environments, and evolving requirements, making this phase expensive and time-consuming, often exceeding the initial development costs. To understand and manage software under development and maintenance better, several maintainability measures have been proposed. The Maintainability Index is commonly used as a quantitative measure of the relative ease of software maintenance. There are several Index variants that differ in the factors affecting maintainability (e.g., code complexity, software size, documentation) and their given importance. To explore the variants and understand how they compare when evaluating software maintainability, an experiment was conducted with 45 Java-based object-oriented software systems. The results showed that the choice of the variant could influence the perception of maintainability. Although different variants presented different values when subjected to the same software, their values were strongly positively correlated and generally indicated similarly how maintainability evolved between releases and over the long term. Though, when focusing on fine-grained results posed by the Index, the variant selection had a larger impact. Based on their characteristics, behavior, and interrelationships, the variants were divided into two distinct clusters, i.e., variants that do not consider code comments in their calculation and those that do.

1. Introduction

Software maintenance is a phase in the software life cycle that refers to modifications of a software system after delivery, aiming to provide support to the system [1]. During this phase, software evolves continuously through post-delivery enhancement and correction activities, including the identification and correction of faults, the improvement of software related to new functional and non-functional requirements, and the adaptation of software to changes in the environment [1,2]. According to existing studies [2,3,4], software maintenance is characterized as a highly cost-consuming phase in the software life cycle, as it has been estimated that up to 70% of time and resources related to a software project are allotted for maintenance activities. Hence, software maintenance is considered an important topic in software engineering research and practice. Aiming to understand and manage software under development and maintenance better, many research efforts have been focused on measuring maintainability, a software quality factor that refers to the degree of effectiveness and efficiency of software to be modified, to correct faults, improve with respect to alterations in the requirements, and adapt to changes in the environment [1,5]. Thus, measuring the maintainability of a software system can estimate the ease with which the system can be maintained.
Maintainability is an external quality attribute. Hence, it requires being measured and quantified indirectly while relying on internal attributes that can be measured from software directly [6]. In addition, several different definitions and understandings of maintainability in the context of a software system’s quality exist in the literature [6,7], resulting in a variety of measures and models defined to aid software practice and research with measuring and quantifying software maintainability. In the early 1990s, the Maintainability Index was proposed, a quantitative single-valued indicator of software maintainability [8]. A higher value of the Index indicates higher maintainability, which suggests that the software is easier to maintain, whereas a lower value of the Index indicates lower maintainability, which suggests that the software is more difficult to maintain. The Index is calculated by taking into account software characteristics that are believed to impact the maintainability. For example, the original three-metric Maintainability Index is computed by considering three traditional size and complexity software metrics extracted from source code—the Halstead’s Effort metric, the Cyclomatic Complexity metric, and the Lines of Code metric—metrics that reflect the mental effort required to maintain software, the complexity of the code, and the size of the software [8,9]. In the last three decades, several variants of the Index were defined in an effort for the Index to better capture the maintainability characteristics of software, to ease calculation, or to provide results in a clearer manner [8,9,10,11,12,13,14,15,16,17]. The variants differ mainly based on the different emphases on the software characteristics derived from the code, which is reflected by the selection of the software metrics included in the equation and/or coefficients of the polynomial equation for computing the Index. Yet, all of them have the same objective—to indicate maintainability, i.e., the ease of software to be maintained on the basis of a software system’s code.
In the last few decades, the object-oriented paradigm has emerged as one of the most-widely used paradigms for modeling and developing software. Consequently, the maintainability of object-oriented software has become a significant topic of interest for both software researchers and practitioners. Although concerns regarding the appropriateness of the Index for object-oriented languages have been expressed because the measure was initially proposed for systems developed in procedural programming languages [15,18,19,20,21], the Index is frequently used in maintainability research for object-oriented software. For instance, the Index is used for monitoring the maintainability of a software system over time to ensure high-quality software products, to guide and support software-related decision-making processes or characterize the software’s maintainability evolution [10,22,23,24,25,26,27], to explore the relationship between maintainability and design or code metrics [14,15,16,20,28,29], to detect technical debt [30], and recently, the Index has been used as a measure of maintainability in various machine learning prediction models [31,32,33,34,35].
As discussed above, several variants of the Index exist and are often used interchangeably. This is also the case with the aforementioned studies, as the choice of the variant used for the maintainability measurement of object-oriented software varies across them. Naturally, it is to be expected that maintainability assessment based on different variants computed using different equations may yield different results when subjected to the same software. The main advantage of the Index as a single-value measure of maintainability is its ability to be able to compare software in the context of others [9,36], either to its previous versions or to completely different systems. Hence, besides possible differences in the value of different Index variants when applied to measure the maintainability of a single software, it is important to determine how the use of different Index variants influences the relationship between the maintainability of several different software. If the results of Index variants would prove to be significantly different, this could mean that decisions and conclusions based on the chosen variant might be different if another variant was utilized for maintainability assessment instead. Contrariwise, if the results of variants are shown to be similar, this could indicate that the choice of the variant does not significantly affect the end results. This has not been researched previously; thus, these assumptions cannot be verified without proper empirical investigations.
The objectives of this work were twofold: first, to highlight distinct variants of the Maintainability Index employed to measure maintainability in object-oriented systems and assess the results of variants when applied to measure the maintainability of the same subject software; second, to research the results of the variants when applied to measure the maintainability of a software system to compare the system with other systems.
To meet the above-specified objectives, the following two research questions (RQs) were formulated:
RQ1
How do different Maintainability Index variants perform when utilized for the maintainability measurement of a single object-oriented software system?
RQ2
How do different Maintainability Index variants perform when utilized for the maintainability measurement of an object-oriented software system in the context of other systems?
RQ2.1
How do different Maintainability Index variants perform when utilized for maintainability measurement between different software systems?
RQ2.2
How do different Maintainability Index variants perform when utilized for maintainability measurement between versions of the same software system?
An experiment was conducted on data collected from the source code of 45 open-source software systems based on the Java programming language. For 42 software systems, only the last released version was included in the experiment, while for the remaining 3 systems, all versions from the release history were included. The Maintainability Index variants were computed from software metrics extracted from the code of each system by the JHawk tool. To answer RQ1, an evaluation and analysis of the gathered data were performed for one version of each included software system, focusing on the differences between the Index variants. To answer RQ2, the results were analyzed from two perspectives: between versions of the same software system, where three software systems with their versions were considered, and between different software systems, where the last version of each included software system was considered.
In summary, the key contributions of this paper are: (1) a review of Maintainability Index variants utilized for maintainability measurement in object-oriented software; (2) an empirical investigation on how Maintainability Index variants perform when utilized for the maintainability measurement of a single object-oriented system; (3) an empirical investigation on how Maintainability Index variants perform when utilized for the maintainability measurement of an object-oriented software system in the context of other systems, i.e., other versions of the same software system and completely different software systems.
The rest of the paper is structured as follows. Section 2 provides the background on object-oriented software maintainability measurements needed to follow this paper. Related work is reviewed and discussed in Section 3. Section 4 presents and explains the experiment’s procedure. The experiment results are reported in Section 5. The paper continues by analyzing and discussing the obtained results in Section 6. Finally, Section 7 provides conclusions and outlines possible related open research topics and areas.

2. Background

2.1. Object-Oriented Software

The object-oriented paradigm is one of the dominant programming paradigms for modeling and developing software. Programming languages, designed mainly for object-oriented programming, namely Java, C#, and Python, are currently widely used and adapted by organizations and software developers [37,38]. Due to the emerging use of object orientation in the last few decades, concerns regarding the effective measurement and management of maintainability in object-oriented software have been raised. Object orientation as a style of constructing software differs in several ways from other programming paradigms, for instance the procedure-oriented paradigm. It is based on the notion of objects as self-contained units that have an identity, state, and behavior [39,40]. Object-oriented design concepts, in particular encapsulation, inheritance, and polymorphism, can affect software quality characteristics, including maintainability [40,41]. Hence, in the paper, we only focused on maintainability measures originally proposed for object-oriented software. Additionally, we included measures that were later adopted, tested, and accepted to be capable of analyzing software using the object-oriented programming paradigm as well.

2.2. Maintainability Measurement in Object-Oriented Software Systems

The maintainability of a system is a software quality factor that reflects the ease with which a system can undergo various modifications in the software maintenance phase [5], namely corrective, preventive, adaptive, additive, and perfective [1]. Providing insight into the maintainability of software helps to gain a better understanding of the software and its ability to be corrected or enhanced. This consequently helps to determine maintenance costs, time, and effort, to manage and plan software and software-related resources efficiently, and to identify areas for improvement [9,36]. Since the maintainability of software is an external quality attribute that cannot be measured directly, various maintainability measures and models are being employed for measuring maintainability [6].
To quantify the software maintainability of any system with a single value, Oman and Hagemeister [8] proposed the Maintainability Index. The Index is given as a polynomial expression based on software metrics that describe the characteristics of software. The polynomial was constructed through a series of experiments using regression analysis. Subjective assessment of the maintainability evaluated by software practitioners maintaining the code of selected subject software systems was used as the dependent variable and software metrics extracted from the code of the subject software as independent variables. The researchers identified the smallest set of easily obtained source code software metrics with which the software maintainability can be estimated reasonably accurately. Hence, with the constructed regression equation, the Index can be calculated for any software based on software size and complexity metrics extracted from source code [8,9]. The resulting single value indicates the maintainability of that system. A software system with a value of the Index below 65 is considered to have low maintainability, a value between 65 and 85 medium maintainability, and a value above 85 high maintainability. Thus, in general, a high value of the Index represents higher software maintainability, whereas a low value of the Index represents lower maintainability [42]. The Maintainability Index was originally proposed and validated based on observations and adaptations on a small set of software systems developed in procedural programming languages. As a result, researchers [15,18,19,20,21] have highlighted a number of potential limitations of the Index when applied to the object-oriented paradigm: (1) the coefficients in the formula for the computation of the Index were obtained using regression analysis on software developed in C and Pascal, which might have different maintainability characteristics than current object-oriented programming languages, such as Java; (2) the Index only considers traditional software metrics and omits object-oriented metrics related to cohesion, coupling, polymorphism, and inheritance, which are considered as important characteristics of object-oriented software; (3) threshold values for distinguishing between low, medium, and high maintainability were not validated for object-oriented software. Despite these concerns, the Index has reached general acceptance and is frequently used in maintainability research for object-oriented software. Studies conducting literature reviews on software maintainability [6,7,43,44,45] report that the Index is one of the most-commonly used measure of maintainability. In addition, the Index is widely adopted in practice as the calculation of the Index is available within development environments, e.g., Visual Studio [12], as well as in popular metrics collection tools, e.g., JHawk [46], Radon [47], CMT++, and CMTJava [48].
Another measure of software maintainability is the change metric defined by Li and Henry [49]. This measure estimates maintainability by counting the number of code lines changed per class, where a line change can be an addition or a deletion. The authors further investigated the relationship between a set of metrics collected from code (two size metrics and several object-oriented metrics) and maintainability, showing that maintenance effort can be predicted from the selected metrics. A high value of the change metric represents low maintainability, while a low number represents high maintainability [6].
Malhotra and Khanna [50] and Elish et al. [51] defined software maintainability in the form of class-level change proneness. It represents the possibility that a change, i.e., addition, deletion, or modification, occurs in a source code of a class after the release of a software system. Maintainability change proneness is quantified as a binary metric: its value is “Yes” if the change occurs or “No” if the change does not occur [6].
Furthermore, researchers have proposed several maintainability measurement and prediction models based on capturing maintenance performance with cost, time, or effort spent in the maintenance process [3,52,53,54,55]. Granja-Alvarez et al. [3] proposed a model for estimating maintenance costs based on the time required to perform maintenance actions. The estimated maintenance cost is computed as the sum of the costs of three maintenance actions, namely understanding, modifying, and testing. Bandi et al. [52] validated an approach to predicting the time consumed to execute maintenance tasks using the design complexity of a system, measured by the following three object-oriented design complexity metrics: Interaction Level, Interface Size, and Operation Argument Complexity. Larger quantities of maintenance costs or time spent indicate lower maintainability, while smaller quantities of costs or time spent indicate higher maintainability [6]. Fioravanti and Nesi [53] presented a model for adaptive maintenance effort estimation of object-oriented systems, where effort spent is computed as the sum of effort spent due to understanding, addition, and deletion of the source code. To estimate the maintenance effort of each operation, several metrics were considered, among which class complexity and size metrics proved to be the most-suitable. Another model for estimating adaptive maintenance effort, based on the number of lines of code changed or the number of operators changed, was proposed by Hayes et al. [54]. De Lucia et al. [55] proposed an effort estimation model for corrective maintenance, where effort is calculated using the size of the system to be maintained and the number of three distinct types of maintenance tasks. The resulting effort metric measures the actual effort spent in each phase of the maintenance process (e.g., define, analyze, design, produce, or implement phase) or in the whole maintenance period for corrective activities. For both corrective and adaptive maintenance effort, a low measurement of effort represents high maintainability, whereas a high measurement indicates low maintainability [6].
Another way of assessing maintainability is based on the subjective evaluation of software systems by experts [56,57,58,59]. In this case, maintainability is expressed on an ordinal scale using expert opinion, for instance as poor, average, good, and very good [56], or as very low, low, medium, high, and very high [57,58], or as very easy, easy, medium, high, and very high [59].

2.3. Maintainability Index Variants

With extensive use of the Maintainability Index in software research and practice, the Index has been fine-tuned over time to better represent the maintainability characteristics of software systems, to ease the calculation, or to aid the interpretation of the results. This resulted in several defined variants of the Index. The key differences between the variants lie in the selection of the software metrics used and/or the amount of influence the selected software metrics have on maintainability.
The original three-metric Maintainability Index (further referred to as M I o r i g . ) proposed by Oman and Hagemeister [8] is defined as:
M I o r i g . = 171 3.42 × ln ( a v e E ) 0.23 × a v e V ( g ) 16.2 × ln ( a v e L O C )
where aveE is the average Halstead’s Effort per module, aveV(g) is the average Cyclomatic Complexity per module, and aveLOC is the average Lines of Code per module. Besides the three-metric Index that captures the size and complexity aspects of the code, Oman and Hagemeister [8] proposed a four-metric Maintainability Index that additionally includes a self-explanatory aspect of the code. This was included in the equation by capturing the quantity of comments in the source code in a way that the presence of comments is considered to improve maintainability. The comment part of the equation first included the average Number of Lines of Comments per module. This metric was later criticized as being too heavily skewed by large comment blocks, which has the potential to increase the value of the resulting Index excessively. Thus, to mitigate this thread of the Index being overly sensitive to comments, a more subtle Index variant was proposed using a ratio between comment lines and code lines instead of an absolute number of comment lines in the code [8,9,10]. The original four-metric Maintainability Index ( M I o r i g . ( C M ) ) with the comment part, which limits the impact comments can have on maintainability, is calculated as
M I o r i g . ( C M ) = 171 3.42 × ln ( a v e E ) 0.23 × a v e V ( g ) 16.2 × ln ( a v e L O C ) + 50 × sin ( 2.4 × p e r C M )
where aveE is the average Halstead’s Effort per module, aveV(g) is the average Cyclomatic Complexity per module, aveLOC is the average Lines of Code per module, and the additional perCM is the average Percent of Lines of Comments per module. Due to criticisms regarding the non-monotonic nature of the Halstead’s Effort metric, the Index was later reconstructed using Halstead’s Volume metric instead since the difference between the two was not found to be statistically significant [9,10]. This resulted in the improved three-metric Maintainability Index ( M I i m p r . ) calculated as
M I i m p r . = 171 5.2 × ln ( a v e V ) 0.23 × a v e V ( g ) 16.2 × ln ( a v e L O C )
where aveV is the average Halstead’s Volume per module, aveV(g) is the average Cyclomatic Complexity per module, and aveLOC is the average Lines of Code per module. Again, the reconstructed Index was also proposed with the comment part [9,10], resulting in the improved four-metric Maintainability Index ( M I i m p r . ( C M ) ) defined as
M I i m p r . ( C M ) = 171 5.2 × ln ( a v e V ) 0.23 × a v e V ( g ) 16.2 × ln ( a v e L O C ) + 50 × sin ( 2.4 × p e r C M )
where aveV is the average Halstead’s Volume per module, aveV(g) is the average Cyclomatic Complexity per module, aveLOC is the average Lines of Code per module, and the additional perCM is the average Percent of Lines of Comments per module. A study by Revilla [60] revealed that there is a strong correlation between Lines of Code and Halstead’s Volume, as well as between Lines of Code and Cyclomatic Complexity. Based on these findings, Najm [11] substituted Halstead’s Volume part and the Cyclomatic Complexity part in the Index equation with the respective calculations of these two parts using Lines of Code, which allows quicker and easier computation of the Index. The author built upon the improved Index and proposed the Maintainability Index computed using only Lines of Code ( M I L O C ) as follows:
M I L O C = 171 5.2 × ln ( 45 × a v e L O C 428 ) 0.23 × ( 0.22 × a v e L O C 1.9 ) 16.2 × ln ( a v e L O C )
where aveLOC is the average Lines of Code per module. The JHawk product introduced two additional Index variations that use the Number of Statement metric instead of the Lines of Code metric. The former is believed to be a better measure of software size than the latter [13]. Thus, the JHawk three-metric Maintainability Index ( M I J H ) is calculated as
M I J H = 171 5.2 × ln ( a v e V ) 0.23 × a v e V ( g ) 16.2 × ln ( a v e N O S )
where aveV is the average Halstead’s Volume per module, aveV(g) is the average Cyclomatic Complexity per module, and the substituted aveNOS is the average Number of Statements per module. Again, the Index was also defined with the comment part, resulting in the JHawk four-metric Maintainability Index ( M I J H ( C M ) ) as follows:
M I J H ( C M ) = 171 5.2 × ln ( a v e V ) 0.23 × a v e V ( g ) 16.2 × ln ( a v e N O S ) + 50 × sin ( 2.4 × p e r C M )
where aveV is the average Halstead’s Volume per module, aveV(g) is the average Cyclomatic Complexity per module, aveNOS is the average Number of Statements per module, and perCM is the average Percent of Lines of Comments per module. The results of the presented Indices range from an unbounded negative number to 171. For the result of the Index to be bound between 0 and 100, which provides a clearer and more useful interpretation, Visual Studio derived an Index variant based on the improved Index with the sole difference of using a shifted scale [61]. The Maintainability Index defined by Visual Studio ( M I V S ) is calculated as
M I V S = m a x 0 , 100 171 5.2 × ln ( a v e V ) 0.23 × a v e V ( g ) 16.2 × ln ( a v e L O C ) 171
where aveV is the average Halstead’s Volume per module, aveV(g) is the average Cyclomatic Complexity per module, and aveLOC is the average Lines of Code per module.
Each of the presented variants represents a slightly different approach to measuring maintainability by capturing different software-related characteristics. Table 1 provides a summary of the software metrics required to compute each variant and the corresponding software aspects that these metrics measure. As for measuring code complexity, both Halstead’s Effort and Halstead’s Volume measure computational complexity, while McCabe’s Cyclomatic Complexity measures logical complexity. Lines of Code and Number of Statements measure software size. Percent of Lines of Comments measures the self-explanatory nature of the code base through documentation, i.e., code comments.
Besides the above-presented Index variants, several others were proposed in the literature incorporating other software metrics that measure additional software aspects, e.g., cohesion and coupling; yet, they are not widely used. Misra [16] proposed the Index based on design/code-level metrics, including the average Method Size, Program Length, Control Density, Depth of Inheritance Tree, and Method Hiding Factor. Kaur and Singh [14] proposed the Index using package metrics, namely size, complexity, cohesion, and nesting metrics. Kaur et al. [15] proposed two Indices based on object-oriented metrics, such as Lack of Cohesion in Methods, Message Passing Coupling, Response for a Class, Weighted Method per Class, Number of Commands, Number of Constructors, and Number of Cyclic Dependencies. Madhwaraj [17] proposed the Index using the object-oriented Martin’s metrics suite, where Distance From the Main Sequence, Afferent Coupling, Number of Concrete Classes, and Efferent Coupling are needed for computation. The author also proposed the Index using the object-oriented Chidamber and Kemerer metrics suite, where Coupling Between Objects and Response For a Class are considered for computation.
The evolution of the initially proposed Maintainability Index into numerous variants has resulted in a varying usage of Index variants in the context of maintainability assessment. This issue has already been noted by systematic literature reviews conducted in the research field [43,45]. The most widely used variants and their example usage in the literature regarding object-oriented software are summarized in Table 2. The table highlights that different Index variants are used across the research community, while using software based on various object-oriented programming languages. The Index variants are used for several purposes, including maintainability monitoring [10,22,23,24,25,26,27,62], exploration of the relationship between maintainability and software metrics [14,15,16,20,28,29,63], characterization of architectural design patterns in view of maintainability [64,65,66], investigation of the impact of community patterns on software maintainability [67], technical debt detection [30], and machine-learning-based fault, change proneness, and maintainability trend prediction [31,32,33,34,35].

3. Related Work

In the literature, the Maintainability Index has been used as a measure of maintainability extensively researched from various perspectives. Although numerous measures have been proposed in the literature for assessing software quality factors, few studies have focused on comparing the Index with other maintainability or software quality measures. A complete overview of related studies is presented in Table 3.
Some studies have compared the Index with alternative software quality measures with the aim of assessing existing measures. Sjøberg et al. [19] researched consistency at a software system level among a set of software maintenance measures, including the Maintainability Index, code smells, structural metrics related to coupling, cohesion, size, and inheritance, software size metrics, and maintenance effort measured by the time spent on a maintenance task and the number of changes completed in the course of the task on the subjected software systems. The empirical research on four functionally equivalent web-based systems, primarily implemented in the Java programming language, revealed that these measures are not mutually consistent for evaluating maintainability. The inverted value of the Index had the highest positive correlation with the inverted value of the Depth of Inheritance Tree metric (rs = 1), coupling measure (rs = 0.8), and Feature Envy code smell type (rs = 0.8). It had the highest negative correlation with the inverted value of the cohesion measure (rs = −1), Lines of Code metric (rs = −0.6), and maintenance effort measured by the average hours spent on the maintenance task (rs = −0.6). Kaur et al. [15] compared the Maintainability Index with the change metric by calculating the differences between individual classes of two versions of an open-source software written in Java. The results showed a low negative correlation (r = −0.32), suggesting a slight inverse relationship between the measures. Kencana et al. [26] compared the Maintainability Index calculation used in Visual Studio from two different frameworks; from built-in Code Metric Analysis and the Microsoft CodeLens Code Health Indicator extension. An experiment on a C# software system demonstrated a negligible difference between calculations. Strečanský et al. [30] compared three techniques for software technical debt identification, namely the Maintainability Index, SIG method, and SQALE analysis, on releases of 20 open-source Python libraries. The results showed that each method gives a slightly different perception of how technical debt evolves. The Index and SIG method show more similarity regarding trends of technical debt changes between releases (rMed. = 0.67), while the Index and SQALE analysis show less (rMed. = 0.57).
Some studies have compared the well-established Maintainability Index variant with alternative software quality measures with the aim of validating new measures. Kaur and Singh [14] compared their proposed maintainability metric with the original four-metric Maintainability Index. Najm [11] compared the proposed metric with the improved three-metric Maintainability Index. Misra [16] and Madhwaraj [17] compared their proposed maintainability metric with the four-metric improved Maintainability Index. Papamichail and Symeonidis [25] compared the proposed maintainability evaluation with the Maintainability Index defined by Visual Studio.
Although there are some similarities with the existing work, the lack of a comprehensive approach to comparing multiple variations of the Index makes our work the first of its kind in the field. Firstly, our study differs in the inclusion of multiple commonly used Index variants in the comparison, while most studies, except for [26], did not include more than one variant. Instead, they focused on the comparison with other software measures. This limitation of the current works prevents the works from presenting a clear picture regarding the consistency of the Index variants for software maintainability measurement. Secondly, most studies conducted the comparison on a relatively small set of software systems, while we conducted experiments on a more extensive set of subject software systems. Furthermore, while the existing works mainly focused on the comparative analysis of either one subject or between multiple subjects, we provide analyses in both contexts.

4. Research Method

To achieve the research objectives, experiments were conducted on Java open-source software systems. A total of 45 object-oriented software systems were randomly selected for the study. Projects varying in maturity, popularity, domain, and size were included to ensure a diverse sample. To answer RQ1 and RQ2.1, the most recently released version at the time of conducting the experiments for each of the 45 software systems under study was used. Table 4 provides an overview of the software systems studied. The source code for each included subject was retrieved from the GitHub repository specified in the table. To address RQ2.2, three software systems, varying in popularity and source code characteristics, were selected as case studies, with all available versions of their release histories included in the experiment. Table 5 presents these selected software systems and their releases.
The Maintainability Index was calculated for each software system under study using seven variants: M I o r i g . , M I o r i g . ( C M ) , M I i m p r . , M I i m p r . ( C M ) , M I L O C , M I J H , and M I J H ( C M ) . These variants were chosen because software researchers and practitioners most commonly utilize them to assess the maintainability of object-oriented software. The software metric values needed for the computations were derived from the source codes of the subject software using JHawk 6.1.4, a Java software metric collection tool. Then, the seven variants were calculated using the formulas listed in Section 2.3. When calculating, the metric values were averaged per class since this is a common practice when calculating the Index at the system level in an object-oriented software ecosystem. In Table 6, descriptive statistics of the collected software metric values of 45 studied software systems, averaged per class, are reported. In addition, these data are presented visually with boxplots in Figure 1. The resulting Index variant values are available in Appendix A. In Table A1, Index variant values relevant for RQ1 and RQ2.1 are reported. In Table A2, Table A3 and Table A4 Index variant values relevant for RQ2.2 are reported for CS1, CS2, and CS3, respectively.
Next, data analysis on the acquired data was performed using IBM SPSS Statistics 28 and Python 3.7.6. with the matplotlib, NumPy, pandas, SciPy, seaborn, and scikit-learn libraries. A variety of data analysis methods (i.e., descriptive statistics, hypothesis testing, correlation analysis, multidimensional scaling, cluster analysis, and trend analysis) were used to answer the research questions, which allowed us to evaluate and compare the consistency of several variants of the Index in measuring the maintainability of object-oriented software systems on a large and diverse set of Java software in different contexts.
To answer RQ1, descriptive statistics were initially used to describe the values of each Index variant and to gain a general understanding of the distribution of the data. This allowed us to evaluate how the different variants capture the notion of maintainability when applied to measure the maintainability of the same software system and to compare the variants in terms of their absolute values. Next, focusing on identifying any significant differences between the variants, the pairwise differences between Index variants were assessed. Inferential statistics were employed to determine if there was a statistically significant difference in the maintainability measurements of the two Index variants. To verify the assumptions of normality for the differences between the two groups under study, the Shapiro–Wilk Test was utilized because the sample size for the data of RQ1 was small (n ≤ 50). When the test showed that the normality assumption was met, i.e., that the differences between the two groups followed a normal distribution, a Paired-Samples t-Test was performed. The test aimed to determine whether there was statistical evidence that the mean difference between paired observations was significantly different from zero. We report Cohen’s d, a measure of effect size, to provide additional information about the magnitude of the difference in means to aid in interpreting the practical significance of the observed difference. It is computed as
d = M 1 M 2 S D p o o l e d
where the numerator is the difference between the means of the two measures M 1 and M 2 and the denominator S D p o o l e d is the pooled standard deviations, a weighted average of the standard deviation of the two groups [69]. The effect sizes were interpreted as very small, small, medium, large, very large, or huge [70], as specified in Table 7. When the Shapiro–Wilk Test revealed that the normality assumption for the differences between the two groups of Index variant values was not met, the Wilcoxon Signed-Rank Test, a non-parametric equivalent to the Paired-Samples t-Test, was used instead. In such cases, the Matched-Pairs Rank-Biserial Correlation ( r c ) was used to measure the effect size, calculated as the difference between two proportions as
r c = N R P N R N R N N R
where N R P signifies the number of positive ranks, N R N the number of negative ranks, and N R the total number of ranks. In proportion to the effect size, the coefficient’s value could range from −1 to 1. A coefficient with a value of 0 indicates that there is no effect, i.e., no difference in the data between groups. Positive values imply that the data in the reference group tend to be more than the data in the comparison group. In contrast, negative values indicate that the data in the reference group tend to be fewer than in the comparison group [71].
To answer RQ2.1, a pairwise correlation analysis was carried out between pairs of Index variants to examine the association between variant values. Based on the Shapiro–Wilk Test, a parametric correlation coefficient was utilized, the Pearson Correlation Coefficient (r). It is an indicator of the strength and direction of a linear relationship between two variables. It has a possible range of values between −1 and 1, with −1 denoting a perfect negative linear relationship, 0 no relationship, and 1 a perfect positive linear relationship. According to the coefficient values described in Table 8, the strength of a correlation coefficient was interpreted as negligible, weak, moderate, strong, or very strong [72]. Following that, multidimensional scaling was conducted. The algorithm assisted in obtaining quantitative estimations of similarity and dissimilarity across Index variants in a low-dimensional vector space, i.e., a two-dimensional space in our case, enabling a graphical representation of the underlying relational structures contained therein. The algorithm conveyed the (dis)similarities between the set of variants in a lower-dimensional representation of the data in a way that preserved the relative (dis)similarities between the variants, and the distances respected well the distance in the original high-dimensional space. Accordingly, similar Index variants were spatially located closer together, and dissimilar variants were located proportionately further apart [73]. We performed metric multidimensional scaling using a distance matrix built on pairwise dissimilarity scores between Index variants, based on the previously conducted correlation analysis. The distance matrix, in our case a 7 × 7 symmetric square matrix, determined how dissimilar all the pairs of Index variants were from each other, based on the dissimilarity score, computed as
D S a , b = 1 | r a , b |
where D S a , b is the dissimilarity score between Index variants a and b and | r a , b | is the absolute Pearson Correlation Coefficient of the two variants. It should be noted that the distance matrix’s principal diagonal was equal to zero because the dissimilarity score between the pair of the same Index variant was always zero. Finally, hierarchical agglomerative clustering was performed to identify clusters, i.e., groups of similar Index variants, based on the computed pairwise dissimilarities scores in a way that resulted in maximum intra-cluster similarity and maximum inter-cluster dissimilarity. Each Index variant began as a single individual cluster. Then, the algorithm merged the two most-similar clusters based on the distance metric iteratively. We used the complete linkage method to calculate the distances, which defines the distance between two clusters as the maximum distance between any two individuals in the two clusters. Formally, the method is defined as
D ( A , B ) = m a x ( d i s t ( a , b ) ) ; a A b B
where D ( A , B ) represents the distance between clusters A and B and d i s t ( a , b ) represents the distance between all individuals a in cluster A and individuals b in B [74].
To answer RQ2.2, the link between Index variants was analyzed in the context of comparing maintainability with versions of the same software system using correlation analysis for each case study. Because we had a moderate sample size (n > 50), we employed the Kolmogorov–Smirnov Test to check the assumptions of normality. Based on the results, a non-parametric Kendall’s τ -b Correlation Coefficient was used. Kendall’s Correlation Coefficient, like Pearson’s, is used to assess the degree of association between two variables, in our case two Index variants. The strength of correlation was interpreted as defined in Table 8. Next, multidimensional scaling with correlation-based distances was used to depict similarities and dissimilarities for each case study, as in RQ2.1. In this case, Kendall’s τ -b Correlation Coefficients were used to construct the distance matrix for each case study. Next, to assess if the maintainability trends based on the measurements provided by the seven Index variants are comparable, we evaluated the data based on the semantic versioning of the releases, i.e., major.minor.patch, such as 3.23.1. First, trend analysis was performed to assess the consistency of Index variants’ maintainability evolution indications from a more long-term perspective. We used the Mann–Kendall Trend Test, a non-parametric statistical test for determining the underlying monotonic trend, i.e., consistent upward or downward maintainability trend, throughout the evolution of a software system, and Sen’s Slope ( β ) to estimate the magnitude of the trend [75]. Following that, we focused on the short-term trends, i.e., changes in maintainability from a previously released version of a software system, calculated as
Δ M I i ( j 1 , j ) = M I i , j M I i , j 1
where Δ M I i ( j 1 , j ) is the change in the Index variant M I i , j is the current release of a software system, and j 1 is the preceding release.

5. Results and Data Analysis

5.1. RQ1: Maintainability Measurement in a Software System

For each software system under study, values of the Index variants are visually presented in Figure 2. We can observe that, for each subject software, the single-valued maintainability evaluations by various Index variants were not the same. Nevertheless, certain general patterns in the Index values can be identified. The values of the Index variants that do not consider measuring code documentation, i.e., Index variants without the comment part, are on the left side of the plot, whereas the Index variants that take code comments into account in their computations are on the right side. Thus, the values of the former tend to be lower than the latter. Although this was to some extent expected given how the equations of Index variants with the comment part are formulated, an interesting observation is that the gap between the two groups of Index variants appears to be somewhat consistent for all software systems. Furthermore, we can observe that the gap tends to be slightly smaller when there is little code documentation, i.e., when the percentage of comment lines is low (e.g., in the case of S19, S44, S45), and the gap tends to be larger when the percentage of comment lines is higher (e.g., in the case of S30, S31). A closer examination of the individuals of the two groups reveals there is more variation in the specific Index variant values. The two lowest values are reported by M I i m p r . and M I L O C . In a large majority of subject software (88.9%), M I L O C has the lowest value, while in 11.1% of software, the lowest value is reported by M I i m p r . . For the second-lowest value, the situation is reversed. Next, the third- and the fourth-lowest values are reported by either M I J H or M I o r i g . . In 60% of software systems, the third-lowest value is reported by M I J H and in 40% by M I o r i g . . The situation is reversed with the fourth-lowest value. The next value in the rankings, i.e., the third-highest value, is, in all cases, M I i m p r . ( C M ) . M I J H ( C M ) and M I o r i g . ( C M ) report the two highest values. The highest value is reported by M I o r i g . ( C M ) in 60% of subject software and M I J H ( C M ) in 40%. For the second-highest values, 60% are reported by M I J H ( C M ) and 40% by M I o r i g . ( C M ) . In Table 9, descriptive statistics about the Index variant values are provided, supporting the previously stated observations. In general, M I i m p r . and M I L O C suggest lower maintainability for the same software system than M I J H or M I o r i g . , as the values of M I J H and M I o r i g . tend to be higher than those of M I i m p r . and M I L O C . Additionally, M I J H ( C M ) and M I o r i g . ( C M ) suggest higher maintainability in comparison to M I i m p r . ( C M ) , since the value of M I i m p r . ( C M ) tends to be lower than that of M I J H ( C M ) and M I o r i g . ( C M ) .
The boxplots in Figure 3 illustrate the pairwise differences between the values of different Index variants. The figure gives a general idea of the direction of the differences, i.e., whether they are generally positive, negative, or inconclusive. This helps show which Index variant has higher values between the two variants. For example, a consistent positive difference is observed between M I o r i g . ( C M ) and M I o r i g . , while the results between M I o r i g . and M I J H are inconsistent, as some subject software systems have higher maintainability based on M I o r i g . (e.g., in the case of S1), while others have higher maintainability based on M I J H (e.g., in the case of S4). The Index variants without comment parts have smaller differences from Index variants without comment parts compared to Index variants with comment parts. For instance, the mean value of the absolute difference between M I o r i g . and M I i m p r . , M I L O C , and M I J H is 5.77, 7.43, and 1.50, respectively, while the mean value of the absolute difference between M I o r i g . and M I o r i g . ( C M ) , M I i m p r . ( C M ) , and M I J H ( C M ) is 45.74, 39.98, and 45.45, respectively. Similarly, it can be observed that the Index variants with comment parts have smaller differences from Index variants with comment parts compared to Index variants without comment parts. For instance, the mean value of the absolute difference between M I o r i g . ( C M ) and M I i m p r . ( C M ) and M I J H ( C M ) is 5.77 and 1.50, respectively, while the mean value of the absolute difference between M I o r i g . ( C M ) and M I o r i g . , M I i m p r . , M I L O C , and M I J H is 45.74, 51.51, 53.18, and 46.04, respectively.
The differences between the values of Index variants are evaluated in Table 10 using inferential statistics. Note that the Shapiro–Wilk Test was used to verify normality assumptions, and the appropriate test was then used, either the Paired Samples t-Test, when the normality assumptions were met, or the Wilcoxon Signed-Rank Test, when the normality assumptions were not met. To accompany the former, the average difference with the standard error and d effect size are reported in the table, while to accompany the latter, the median difference and r c effect size are reported. All differences were found to be statistically significant, except for the differences between M I o r i g . and M I J H and between M I o r i g . ( C M ) and M I J H ( C M ) . In Figure 4, the boxplots of the Index variants with statistical significance annotations are depicted (only non-significant pairs are annotated). The boxplots of the non-significant pairs show a negligible difference, while the rest of the boxplots visibly differ. The d effect size ranges from huge (for M I i m p r . M I o r i g . , M I L O C M I o r i g . , M I i m p r . ( C M ) M I o r i g . ( C M ) , M I L O C M I J H ), very large (for M I L O C M I i m p r . ), to very small (for M I J H M I o r i g . , M I J H ( C M ) M I o r i g . ( C M ) ). For the last one, this means that the practical significance of the difference is very small. For all cases where the rc effect size was used, its value equals −1 or 1. Where a positive effect size of 1 is reported, the Index variant values in the reference group are, in all cases, higher than the Index variant values in the comparison group (e.g., in the case of M I o r i g . ( C M ) M I o r i g . ). Contrariwise, when a negative effect size of −1 is reported, the Index variant values in the comparison group are, in all cases, higher than the Index variant values in the reference group (e.g., in the case of M I o r i g . M I i m p r . ( C M ) ).

5.2. RQ2.1: Maintainability Measurement in Different Software Systems

The scatter plot matrix representation with pairwise correlation analysis is shown in Figure 5. Based on the results of the normality tests reported in Table 9, the Pearson Correlation Coefficient was used to analyze the relationships between the Index variants. The results showed that all Index variants are strongly or very strongly positively correlated. The most outliers, represented by blue dots that are furthest from the regression line, can be observed when assessing the relationship between an Index variant without and one with the comment part. That is why, for example, the correlation between M I L O C and M I J H ( C M ) (r = 0.896) is lower compared to the correlation between M I L O C and M I i m p r . (r = 0.997).
To further analyze the multivariate relationships based on the Pearson Correlation Coefficient between the seven Index variants, multidimensional scaling was used to reduce the dimensions of the data to two. The resulting visualization seen in Figure 6 attempts to model the similarity and dissimilarity between the Index variants as the distances they exhibit in the vector space. From the visualization, it can be observed that the Index variants with the comment part, namely M I o r i g . ( C M ) , M I i m p r . ( C M ) , and M I J H ( C M ) , appear to be close together on the left side of the plot, while the Index variants without the comment part, namely M I o r i g . , M I i m p r . , M I L O C , and M I J H , appear close together on the right side of the plot. This observation indicates that Index variants without the comment part are more similar to each other in comparison to Index variants with the comment part. Similarly, this observation indicates that Index variants with the comment part are more similar to each other in comparison to Index variants without the comment part. The identified two groups are represented by the areas in the figure, which were manually annotated to emphasize the clear distinction between the two groups, as well as the close proximity of the Index variants within each group.
Instead of the manual identification of groups, to more accurately determine the similar groups of the Index variants, clustering on the Pearson Correlation Coefficients was performed. In Figure 7, a correlation heat map with a dendrogram that depicts the results of hierarchical clustering is presented. The dendrogram displays which Index variants are most similar to each other. The results showed that the first cluster created includes M I i m p r . and M I L O C . The second cluster contains M I i m p r . ( C M ) and M I J H ( C M ) , which is in the next step joined with M I o r i g . ( C M ) . The fourth cluster includes M I o r i g . and M I J H , which was in the next step combined with the first cluster of M I i m p r . and M I L O C . Lastly, the two remaining clusters were merged into one. However, it can be noted that the merge threshold level of the two final clusters, as indicated by the distance in the dendrogram, is significantly higher compared to the previous clustering steps. These two distinct clusters, as identified by the hierarchical clustering, are the same as those that were manually identified earlier, i.e., the Index variants with the comment part and the Index variants without the comment part.

5.3. RQ2.2: Maintainability Measurement in Versions of a Software System

To assess the relationship between Index variants in the context of comparing the maintainability of versions of the same software system, a correlation analysis was conducted for each case study. First, in Table 11, the results of the normality tests are reported. Even when a parametric correlation coefficient may have been appropriate to use (e.g., in the case of assessing the relationship between M I o r i g . and M I o r i g . ( C M ) for CS2), we opted to assess all relationships using Kendall’s τ -b Correlation Coefficient to ensure consistency in comparing and analyzing the correlations across all pairs. The results of the correlation analysis for each case study are presented in Table 12. The correlation coefficients are positive, but tend to be weaker than those reported in RQ2.1, particularly for CS1 and CS2. In the case of CS1 and CS2, the correlation ranges from moderate to very strong, while in the case of CS3, the correlation is very strong across all pairs. Despite the pattern being less noticeable, the correlations between two Index variants with the comment part and between two Index variants without the comment part tend to be stronger in comparison to the correlation between two Index variants, one from each of the two groups. The case of CS1 shows how three-metric Index variants can also be, in some cases, closely related to their four-metric alternative. For instance, the correlation between M I o r i g . and its version with the comment part, i.e., M I o r i g . ( C M ) , is very strong ( τ = 0.919), while it is only considered strong between M I o r i g . and M I L O C ( τ = 0.805), as well as between M I o r i g . and M I J H ( τ = 0.729).
The results of the correlation analysis were further analyzed through multidimensional scaling to gain a deeper understanding of the relationships between the Index variants. The resulting visualizations for each case study are presented in Figure 8. There is still a tendency for Index variants with comment parts to be close to each other in the vector space, as well as a tendency for Index variants without comment parts to be close to each other. However, the pattern is not as pronounced as in the previous analysis for RQ2.1. Herein, in some case studies, certain Index variants with the comment part are closer to certain Index variants without the comment part and vice versa. For example, in the case of CS1, M I o r i g . appears closer to M I o r i g . ( C M ) rather than to M I L O C and M I J H .
The consistency of the long-term trends in maintainability for each case study was analyzed using Mann–Kendall Trend Tests, and the results are presented in Table 13. The results suggest that the long-term monotonic trends in maintainability are all statistically significant and point in the same direction; the maintainability trends are negative, indicating that maintainability is consistently decreasing over time. Nonetheless, the choice of Index variant affects the magnitude of the trend, with different variants yielding different results. In the case of CS2, it can be observed that the magnitude of the trends is generally slightly higher when maintainability is assessed using Index variants with comment parts ( β = −0.051, β = −0.054, and β = −0.056 for M I o r i g . ( C M ) , M I i m p r . ( C M ) , and M I J H ( C M ) , respectively) compared to when maintainability is assessed using Index variants without comment parts ( β = −0.010, β = −0.011, β = −0.014, and β = −0.015 for M I o r i g . , M I i m p r . , M I J H , and M I L O C , respectively). Additionally, a pattern can be noted between the magnitudes of the trends based on the maintainability assessment made by a three-metric Index variant and the one made by its four-metric alternative across all three case studies. For instance, in the case of CS1, the magnitude of the trend assessed by M I o r i g . ( C M ) ( β = −0.064) is higher than the one by M I o r i g . ( β = −0.056); the magnitude of the trend assessed by M I i m p r . ( C M ) ( β = −0.055) is higher than the one by M I i m p r . ( β = −0.048); the magnitude of the trend assessed by M I J H ( C M ) ( β = −0.033) is higher than the one by M I J H ( β = −0.025).
To examine the short-term trends in the maintainability of each case study, the differences in maintainability from one software release to its previous version are presented separately for each Index variant under study in Figure 9. Since the differences in maintainability have a large range of values, the Y axis uses a symmetrical logarithmic scale to help the reader better observe all these changes. This scale represents small values, i.e., small differences in maintainability, on a linear scale and larger values, i.e., large differences, on a logarithmic scale. Blue highlights are placed behind the lines to emphasize changes that majorly differ from those observed in the maintainability assessments made using other Index variants, or at least from most of them. In most cases, it can be noted that the changes are consistent; if, according to one Index variant, a positive change is shown, it is likely that this change is also regarded as positive according to the assessments made using other Index variants. When differences in the direction of the maintainability change between two consecutive releases do occur, the directions of the change are mostly consistent between Index variants with and those without the comment part. However, while the directions of the changes are, in most cases, aligned, the magnitudes of these changes often vary for assessments made by all Index variants.

6. Discussion

6.1. Summary of Research Questions and Their Answers

6.1.1. RQ1: How Do Different Maintainability Index Variants Perform When Utilized for the Maintainability Measurement of a Single Object-Oriented Software System?

The results of different variants of an Index used to assess the maintainability of object-oriented software systems can vary greatly. To ensure the most-accurate assessment, the specific variant selected should take into account the relevant aspects of maintainability that best represent the maintainability of the software system in question. For example, if code documentation significantly benefits software maintainability, a variant incorporating code comments into the Index computation should be used. Note that some human analysis of the comments is recommended to aid this decision [10,36]. The differences between the values produced by different Index variants are, in most cases, significant and should not be overlooked. Typically, the Index variants without the comment part have closer values, as well as the Index variants with the comment part. Additionally, the former tend to have lower values compared to the latter. As a result, this makes it difficult to compare values obtained from different variants directly. Furthermore, using originally proposed thresholds for conventional systems to convert the maintainability assessment on an interval scale, which ranges from an unbounded negative number to 171, into categorical, i.e., low, medium, and high maintainability, may not be appropriate without considering the object-oriented nature of the software system and the specific Index variant used to make the maintainability assessment.

6.1.2. RQ2.1: How Do Different Maintainability Index Variants Perform When Utilized for Maintainability Measurement between Different Software Systems?

Although there are differences in the values produced by different variants of an Index used to measure software system maintainability, the variants tend to behave similarly when comparing maintainability between systems. The relationship between all pairs of Index variants under study is positive and strong to very strong. When comparing two software systems based on their maintainability assessments from different Index variants, if one software is easier to maintain than the other according to one variant, it is very likely that the same holds true according to any other variant. Moreover, when comparing the maintainability of software systems using different variants of the Index, very similar outputs can be expected for all variants without the comment part and all variants with the comment part. On the other hand, when comparing the maintainability of systems using two Index variants, one from each of the two groups, the consistency in the maintainability comparison is expected to be lower. These findings reinforce the importance of carefully considering which variant of the Index to use for the maintainability assessment, namely taking into account whether or not code documentation should be considered.

6.1.3. RQ2.2: How Do Different Maintainability Index Variants Perform When Utilized for Maintainability Measurement between Versions of the Same Software System?

When comparing the maintainability of different versions of the same software using different Index variants, the relationship between the variants remains positive, but can range from moderate to very strong. It can be observed that, in the case when comparing the maintainability between releases of the same software system, i.e., when changes in the source code are small, the Index variants tend to be more prone to non-consistency in the maintainability comparisons. This means that when focusing on finer-grained results posed by the Index, the selection of the Index variant has even more of an impact on the maintainability perception. Therefore, extra caution should be taken when using the Index variants for more specific assessments instead of general ones. Despite this, the Index variants without comment parts still tend to be more similar to each other than those without comment parts and vice versa. From a short-term perspective, the maintainability trends, i.e., changes in maintainability, are in the same direction, but can be of different strengths, while from a long-term perspective, the maintainability trends are in alignment, although the magnitude of the trends is not.

6.2. Theoretical and Practical Implications

Overall, the findings of this research have the potential to benefit both researchers and practitioners in the field of software engineering by providing a better understanding of how the selection of Index variant affects the perception of the maintainability of software systems.
One of the theoretical implications of this study that could be further exploited in software-engineering-related research is the insight into the characteristics of the evaluated variants when applied in different contexts, which was gained through the empirical evaluation and comparison of different variants of the Index. These findings contribute to the body of knowledge about software maintainability and are of interest to software researchers. Researchers should carefully examine which Index variants should be used in their studies, as the results can be impacted by the choices made. Furthermore, this study identified some research gaps and suggested some possible directions for future research efforts. For instance, Index variant thresholds for object-oriented software should be refined in the future while also considering the specifics of the Index variant used for maintainability assessment. For non-object-oriented software systems, an Index value below 65 indicates poor maintainability, between 65 and 85 indicates medium maintainability, and above 85 indicates high maintainability [10]. However, as Sjøberg et al. [19] already noted, these standard threshold values are inappropriate for object-oriented software since the classes tend to be generally smaller than in conventional software. Moreover, there is no clear scheme of Index thresholds for object-oriented systems. We add to this finding that the Index variant used for assessing maintainability should be taken into account when setting the thresholds. This would ensure that the threshold values appropriately reflect the software’s maintainability characteristics.
In terms of practical implications, software practitioners can use the results of this research to guide their selection of the most-appropriate Index variant for assessing the maintainability of their software systems in an efficient and effective manner. By better understanding Index variants and the importance of the context in which an Index variant is used, practitioners can select the variant that best fits their specific needs and goals. Ignoring which Index variant is used to assess maintainability could lead to misleading perceptions. Additionally, by having a better understanding of the characteristics that contribute to maintainability and how they can be measured by different Index variants, practitioners can also make informed decisions about how to prioritize and focus their efforts to improve these aspects of their software during development, leading to improvements in software quality and the long-term sustainability of their software systems.

6.3. Threats to Validity

6.3.1. Internal Validity

The first threat to internal validity is related to the method used for data collection. All source codes for the included software systems were obtained from the original (i.e., not forked) GitHub repositories. To ensure all included software systems were following object-oriented principles, some manual inspection of the source code of subject software systems was performed by the authors. To reduce the likelihood of errors caused by humans, the process of collecting software metrics and computing the Index variants for all software under study was performed automatically by running scripts. The correctness and completeness of this process were manually verified on a sample of subjects. The JHawk tool was used to extract the source code metrics, as it is commonly used for metrics extraction of Java software. The Index variants’ computation was performed according to the equations presented in Section 2.3.
The next threat to internal validity is related to the methods of data analysis used. Since the chosen analyses may bias the result, we explained the idea and motivation for each data analysis method used. When possible, the parameter settings of the data analysis method used were provided to the reader to give a better understanding of the analysis. For each hypothesis testing with statistical tests, we reviewed the underlying assumptions associated with each inferential statistic and reported the extent to which the assumptions were met.

6.3.2. External Validity

One major threat to external validity is related to the software systems on which the research is based, including sample size, selection bias, and subject characteristics. To address these threats, our research relied on a version of 45 different software systems and all versions of 3 software systems, a sample generally larger than that in related work. The selection was random, and our selected subjects represent a heterogeneous group of software systems in terms of software characteristics, including size, complexity, code documentation, maturity, and domain of use. However, the results could have been different for a different group of software systems, as there is no guarantee that the selected software systems are good representatives. All systems studied were open-source and based on the Java programming language. Therefore, it is plausible that the results are different for closed-source software and may not be representative of the overall population, but only for open-source software. Furthermore, the results of the study may not generalize to the broader population of object-oriented systems based on programming languages other than Java. Even though the findings are likely valid for software based on other object-oriented languages, further research is needed to confirm them.
Another threat to external validity is the set of Index variants studied. We limited our selection to well-defined variants (i.e., variants with an adequate description of the metrics needed for computation, the process of the metrics’ collection, and the process of Index calculation) that are commonly used in existing research on object-oriented software. Replication studies are needed to confirm and generalize the results to a more extensive set of Index variants.

7. Conclusions

Maintainability as a software characteristic is of paramount importance in software development because it substantially affects the long-term expenses associated with a software system. It is believed that a system that is difficult to maintain requires more resources to correct, improve, perfect, and adapt, which raises the overall cost of the software. Conversely, an easily maintainable system is believed to be more cost effective in carrying out such maintenance tasks while also reducing the software system’s tendency towards deteriorating software quality. Therefore, it is essential to understand how maintainable a software system is as it is being developed.
Several aspects can impact the software’s maintainability, including the code’s complexity, the software’s size, and the presence of documentation and comments that help describe the code. The Maintainability Index is frequently used as a single-valued measure for estimating the overall maintainability of software, taking these aspects into account in different ways through various Index variants. However, it is still unclear how different Index variants compare when applied to software systems. This paper evaluated and compared the Index variants by applying them to Java open-source software systems. The objective was to determine if and to what degree these variants are consistent with one another when used to assess the maintainability of a single software system and when used to compare the maintainability of different software systems.
The study’s results showed that when comparing maintainability measurements from several Index variants, the perception of maintainability could be impacted by the choice of the Index variant used. Although different Index variants present different values when subjected to the same software system, the Index variant values are very strongly positively correlated and indicate in a similar manner how maintainability evolves between releases and from a more long-term perspective. Based on their maintainability measurement characteristics, the Index variants can be divided into two distinct clusters containing variants that are more similar to one another: Index variants without considering code comments and Index variants that include code comments in their computation. The differences in Index variants’ values are the most notable when looking at the finer-grained results derived from different Index variants.
In the future, it would be interesting to extend our study to software systems written in other object-oriented programming languages, such as Python and C#. Another potential area of research is to conduct replication studies of existing work by analyzing the results from the perspective of using Index variants other than the one primarily selected. This may offer intriguing insights into whether and how the selection of Index variants affects the results and established findings in the software engineering research community. In addition, it would be valuable to examine the Index variants for maintainability assessments at levels other than the system level (i.e., packages, classes) since this study focused only on examining Index variants at the overall system level. Future efforts could also be invested in investigating and determining the Index threshold levels for object-oriented software.

Author Contributions

Conceptualization, T.H. and B.Š.; methodology, T.H. and B.Š.; software, T.H.; validation, T.H. and B.Š.; formal analysis, T.H.; resources, B.Š.; investigation, T.H.; data curation, T.H.; writing—original draft preparation, T.H.; writing—review and editing, T.H. and B.Š.; visualization, T.H.; supervision, B.Š.; project administration, B.Š.; funding acquisition, B.Š. All authors have read and agreed to the published version of the manuscript.

Funding

The authors acknowledge the financial support from the Slovenian Research Agency (Research Core Funding No. P2-0057).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
R Q Research question
M I o r i g . Original Maintainability Index
M I o r i g . ( C M ) Original Maintainability Index with comment part
M I i m p r . Improved Maintainability Index
M I i m p r . ( C M ) Improved Maintainability Index with comment part
M I L O C Maintainability Index using Lines Of Code only
M I J H JHawk Maintainability Index
M I J H ( C M ) JHawk Maintainability Index with comment part
M I V S Visual Studio Maintainability Index
a v e E Average Halstead’s Effort per module
a v e V Average Halstead’s Volume per module
a v e V ( g ) Average Cyclomatic Complexity per module
a v e L O C Average Lines of Code per module
a v e N O S Average Number of Statements per module
p e r C M Average Percent of Lines of Comments per module
SSoftware system
C S Case study
A v g . Average
M e d . Median
S t d . Standard deviation
M i n . Minimum
M a x . Maximum
S k e w . Skewness
K u r t . Kurtosis
C I Confidence interval
S E Standard error
S W Shapiro–Wilk Test
M D S Multidimensional scaling

Appendix A. Maintainability Index Variant Values

Table A1. Index variant values (RQ1 and RQ2.1).
Table A1. Index variant values (RQ1 and RQ2.1).
Software SystemMIorig.MIorig.(CM)MIimpr.MIimpr.(CM)MILOCMIJHMIJH(CM)
S1. Activiti68.36115.8861.90109.4162.8266.74114.26
S2. Angry IP Scanner82.39123.4777.07118.1476.2080.96122.03
S3. Apache Ant64.31113.2858.43107.4055.5664.19113.17
S4. Apache Commons Codec48.2198.0944.4494.3242.2651.74101.63
S5. Apache Commons CSV49.4298.4141.7390.7237.4747.1196.11
S6. Apache Commons DBCP45.5292.2536.9083.6333.4543.8190.54
S7. Apache Commons Lang60.33109.3654.63103.6752.6859.61108.64
S8. Apache HttpClient69.14117.4963.00111.3461.1468.73117.07
S9. Apache PDFBox57.51107.2051.55101.2347.0659.26108.95
S10. Apache POI61.23110.2554.54103.5651.9459.27108.29
S11. Arduino68.31116.3363.10111.1261.7267.59115.61
S12. Art of Illusion46.4482.7042.1978.4440.8747.4483.70
S13. AssertJ81.98130.4875.98124.4873.6082.99131.49
S14. Caffeine69.49113.3763.18107.0661.6668.26112.15
S15. cglib83.92128.3978.65123.1278.9282.77127.24
S16. DITA Open Toolkit57.71100.4951.0293.8048.9856.2098.98
S17. EasyMock76.74126.0370.14119.4469.7575.56124.85
S18. Ehcache71.94117.8866.10112.0464.7071.97117.91
S19. FastJSON84.26111.0681.28108.0880.2385.44112.24
S20. GeOxygene58.36107.7052.84102.1852.1956.67106.01
S21. h2database48.0492.7241.5986.2738.4245.8290.51
S22. Hibernate ORM69.57111.7162.85105.0065.5569.62111.76
S23. iText755.22105.1451.99101.9149.8356.80106.72
S24. JabRef67.74100.3861.0493.6758.6366.7499.38
S25. Jajuk66.73116.1660.89110.3259.9865.07114.50
S26. JasperReports60.56109.8755.13104.4452.6363.37112.68
S27. javaGeom60.35110.2953.95103.8952.3857.50107.44
S28. Java Hamcrest86.90136.5781.10130.7780.3286.87136.55
S29. Jenkins75.68124.6969.98118.9968.3075.39124.40
S30. JFreeChart50.3296.2042.5788.4641.4247.6493.53
S31. JFreeSVG44.2992.5437.9886.2334.5643.3391.58
S32. JGraphT55.07104.3949.8199.1347.9956.64105.96
S33. JMeter62.13111.3755.39104.6352.2460.14109.38
S34. Joda-Time46.9396.6138.4488.1135.5542.5492.21
S35. jsoup53.0193.8848.2489.1046.7052.1893.04
S36. JUnit494.74136.8289.78131.8688.2396.71138.78
S37. JUnit582.97131.6877.28125.9975.1585.02133.73
S38. Mockito81.81128.2378.25124.6779.2085.72132.14
S39. MPAndroidChart61.08108.3555.34102.6254.0859.51106.78
S40. PowerMock83.55133.4780.41130.3378.4785.47135.39
S41. SLF4J74.87123.8568.17117.1566.3172.65121.64
S42. Spring74.35124.0768.81118.5367.5474.79124.51
S43. Spring Boot85.01134.2778.66127.9276.3685.13134.39
S44. TestNG80.82111.5475.42106.1573.6282.89113.62
S45. YamlBeans72.62103.4468.7599.5768.8072.80103.63
Table A2. Index variant values for CS1. AssertJ (RQ2.2).
Table A2. Index variant values for CS1. AssertJ (RQ2.2).
Case StudyReleaseMIorig.MIorig.(CM)MIimpr.MIimpr.(CM)MILOCMIJHMIJH(CM)
CS1. AsssertJ1.0.085.29134.6078.95128.2675.6784.71134.02
CS1. AsssertJ1.1.084.94134.2878.61127.9475.3284.37133.71
CS1. AsssertJ1.2.085.10134.4778.75128.1375.4984.55133.92
CS1. AsssertJ1.3.085.23134.5778.80128.1575.4684.75134.10
CS1. AsssertJ1.4.085.23134.1678.82127.7575.5284.78133.72
CS1. AsssertJ1.5.084.94133.7978.54127.3975.2484.50133.35
CS1. AsssertJ1.6.084.90133.7578.48127.3475.2284.49133.34
CS1. AsssertJ1.6.184.87133.7378.46127.3275.1984.46133.32
CS1. AsssertJ1.7.084.78133.6878.42127.3275.2684.45133.35
CS1. AsssertJ1.7.184.78133.6878.42127.3275.2784.45133.35
CS1. AsssertJ2.0.084.09133.2377.96127.0975.0084.01133.14
CS1. AsssertJ2.1.083.99133.1377.72126.8674.7883.86133.01
CS1. AsssertJ2.2.084.00133.3677.72127.0974.7883.89133.25
CS1. AsssertJ2.3.083.65132.7977.47126.6174.5683.63132.77
CS1. AsssertJ2.4.083.00132.2476.84126.0873.9483.09132.33
CS1. AsssertJ2.4.183.00132.2476.84126.0873.9483.09132.34
CS1. AsssertJ2.5.082.88132.1076.71125.9373.8483.05132.27
CS1. AsssertJ2.6.082.78132.0576.55125.8373.6582.94132.22
CS1. AsssertJ2.7.083.35132.4577.23126.3374.3983.65132.74
CS1. AsssertJ2.8.083.31132.4277.19126.3074.3383.61132.72
CS1. AsssertJ2.9.083.14132.2877.25126.3974.5183.76132.91
CS1. AsssertJ3.0.083.88132.9477.66126.7274.6583.74132.80
CS1. AsssertJ3.1.083.64132.6877.35126.3974.3583.55132.58
CS1. AsssertJ3.2.083.63132.8077.33126.5074.3483.55132.71
CS1. AsssertJ3.3.083.28132.1077.05125.8774.0983.26132.08
CS1. AsssertJ3.4.082.71131.7376.50125.5373.5682.80131.83
CS1. AsssertJ3.4.182.71131.7476.51125.5473.5682.80131.83
CS1. AsssertJ3.5.082.42131.5276.21125.3073.2882.60131.69
CS1. AsssertJ3.5.182.43131.5276.21125.3173.2982.60131.70
CS1. AsssertJ3.5.282.43131.5276.21125.3173.2982.60131.70
CS1. AsssertJ3.6.082.32131.4776.06125.2273.1682.50131.66
CS1. AsssertJ3.6.182.32131.4776.06125.2173.1582.50131.65
CS1. AsssertJ3.6.282.33131.4876.07125.2373.1682.51131.67
CS1. AsssertJ3.7.082.83131.8176.67125.6473.8583.15132.12
CS1. AsssertJ3.8.082.87131.8176.70125.6473.8783.18132.12
CS1. AsssertJ3.9.082.63131.5376.75125.6574.0683.32132.22
CS1. AsssertJ3.9.181.66130.7375.92125.0073.2582.60131.67
CS1. AsssertJ3.10.081.42130.5975.68124.8473.0682.40131.57
CS1. AsssertJ3.11.081.24130.4875.38124.6272.8982.59131.83
CS1. AsssertJ3.11.181.24130.4775.38124.6272.8982.59131.82
CS1. AsssertJ3.12.081.38130.5575.52124.6973.0782.66131.83
CS1. AsssertJ3.12.181.38130.5575.52124.6973.0782.66131.83
CS1. AsssertJ3.12.281.40130.5775.53124.7073.0882.67131.84
CS1. AsssertJ3.13.081.16130.3775.23124.4472.7582.34131.55
CS1. AsssertJ3.13.181.16130.3775.23124.4472.7582.34131.55
CS1. AsssertJ3.13.281.16130.3775.23124.4472.7482.34131.55
CS1. AsssertJ3.14.081.35130.4575.43124.5372.9582.53131.63
CS1. AsssertJ3.15.081.87130.5575.88124.5673.6282.82131.50
CS1. AsssertJ3.16.081.93130.7175.94124.7373.6582.92131.70
CS1. AsssertJ3.16.181.94130.7375.95124.7473.6682.93131.72
CS1. AsssertJ3.17.082.26130.8076.24124.7873.8783.23131.76
CS1. AsssertJ3.17.182.26130.8076.24124.7873.8783.23131.77
CS1. AsssertJ3.17.282.27130.8276.25124.8073.8883.24131.78
CS1. AsssertJ3.18.082.25130.8276.22124.8073.8483.22131.79
CS1. AsssertJ3.18.182.15130.7276.18124.7573.8083.18131.75
CS1. AsssertJ3.19.082.13130.5776.17124.6173.8083.15131.59
CS1. AsssertJ3.20.082.18130.6676.16124.6373.7483.15131.63
CS1. AsssertJ3.20.182.18130.6576.15124.6373.7383.15131.63
CS1. AsssertJ3.20.282.17130.6576.14124.6273.7383.14131.62
CS1. AsssertJ3.21.082.04130.4676.05124.4873.7083.06131.49
CS1. AsssertJ3.22.081.85130.3675.85124.3673.5082.88131.39
CS1. AsssertJ3.23.081.98130.4875.98124.4873.6082.99131.49
CS1. AsssertJ3.23.181.98130.4875.98124.4873.6082.99131.49
Table A3. Index variant values for CS2. Caffeine (RQ2.2).
Table A3. Index variant values for CS2. Caffeine (RQ2.2).
Case StudyReleaseMIorig.MIorig.(CM)MIimpr.MIimpr.(CM)MILOCMIJHMIJH(CM)
CS2. Caffeine1.069.38115.1062.99108.7161.6368.65114.37
CS2. Caffeine1.0.170.11116.1163.88109.8862.4869.47115.46
CS2. Caffeine1.1.070.39116.3464.19110.1462.8069.76115.71
CS2. Caffeine1.2.070.39116.2264.18110.0162.7969.73115.57
CS2. Caffeine1.3.069.92115.2163.44108.7362.1269.40114.69
CS2. Caffeine1.3.169.99115.2963.52108.8262.2069.47114.78
CS2. Caffeine1.3.270.41116.2163.98109.7862.5869.77115.57
CS2. Caffeine1.3.370.42116.2163.99109.7862.5869.77115.57
CS2. Caffeine2.0.070.26115.0163.94108.6962.4769.71114.47
CS2. Caffeine2.0.170.34115.1264.02108.8162.5569.81114.59
CS2. Caffeine2.0.270.33115.1564.01108.8362.5269.80114.62
CS2. Caffeine2.0.370.30115.1763.98108.8562.4969.76114.63
CS2. Caffeine2.1.069.94114.6863.56108.3162.0269.32114.07
CS2. Caffeine2.2.069.80114.5663.43108.1961.9069.18113.94
CS2. Caffeine2.2.169.73114.3663.34107.9761.8069.13113.75
CS2. Caffeine2.2.269.72114.3363.34107.9461.7969.12113.72
CS2. Caffeine2.2.369.65114.2363.27107.8561.7369.05113.63
CS2. Caffeine2.2.469.69114.2563.31107.8861.7869.09113.66
CS2. Caffeine2.2.569.68114.2563.31107.8861.7769.09113.66
CS2. Caffeine2.2.669.68114.2563.31107.8861.7769.09113.66
CS2. Caffeine2.2.769.72114.3063.35107.9361.8169.12113.70
CS2. Caffeine2.3.069.62114.1263.26107.7661.7269.01113.51
CS2. Caffeine2.3.169.84114.3763.50108.0261.9369.21113.74
CS2. Caffeine2.3.269.83114.3863.49108.0461.9269.21113.76
CS2. Caffeine2.3.369.82114.4163.48108.0861.9369.20113.80
CS2. Caffeine2.3.469.93114.3663.60108.0462.0069.32113.75
CS2. Caffeine2.3.570.13114.6463.83108.3562.2469.53114.05
CS2. Caffeine2.4.070.36114.8264.08108.5362.5269.75114.21
CS2. Caffeine2.5.070.07114.4263.78108.1362.2469.48113.83
CS2. Caffeine2.5.170.10114.4663.81108.1762.2869.51113.87
CS2. Caffeine2.5.270.04114.3663.73108.0662.2069.43113.75
CS2. Caffeine2.5.370.02114.3563.72108.0562.1869.39113.72
CS2. Caffeine2.5.470.03114.3663.72108.0662.1969.39113.73
CS2. Caffeine2.5.570.05114.3863.75108.0862.2269.42113.74
CS2. Caffeine2.5.670.11114.4463.82108.1462.2969.48113.81
CS2. Caffeine2.6.070.00114.2663.68107.9462.1569.37113.63
CS2. Caffeine2.6.170.02114.1563.71107.8462.1769.41113.54
CS2. Caffeine2.6.269.98114.1263.65107.7962.1169.38113.52
CS2. Caffeine2.7.070.08113.7763.66107.3562.1469.46113.16
CS2. Caffeine2.8.069.77113.2163.31106.7561.7869.12112.55
CS2. Caffeine2.8.169.69113.1163.23106.6461.6769.04112.45
CS2. Caffeine2.8.269.71113.1263.25106.6661.6869.06112.46
CS2. Caffeine2.8.369.76113.2263.30106.7661.7469.11112.57
CS2. Caffeine2.8.469.76113.2163.29106.7561.7369.11112.56
CS2. Caffeine2.8.569.78113.2363.32106.7861.7669.14112.59
CS2. Caffeine2.8.669.59112.9463.08106.4361.4968.87112.22
CS2. Caffeine2.8.769.42112.6462.90106.1261.3168.68111.91
CS2. Caffeine2.8.869.42112.6462.90106.1261.3068.68111.91
CS2. Caffeine2.9.069.35112.6262.83106.1061.2468.67111.94
CS2. Caffeine2.9.169.28112.5262.76105.9961.1768.59111.82
CS2. Caffeine2.9.269.18112.3762.64105.8261.0568.46111.65
CS2. Caffeine2.9.369.02112.1162.45105.5560.8768.29111.39
CS2. Caffeine3.0.069.70112.5663.28106.1361.7768.94111.79
CS2. Caffeine3.0.169.69112.5363.27106.1161.7568.93111.77
CS2. Caffeine3.0.269.66112.9163.23106.4861.7168.85112.10
CS2. Caffeine3.0.370.34114.0563.97107.6862.4269.43113.14
CS2. Caffeine3.0.471.32115.6065.16109.4463.5070.45114.74
CS2. Caffeine3.0.571.30115.5165.14109.3563.4870.44114.64
CS2. Caffeine3.0.669.75113.7563.36107.3761.8068.47112.47
CS2. Caffeine3.1.069.37113.2663.06106.9561.5068.22112.11
CS2. Caffeine3.1.169.49113.3763.18107.0661.6668.26112.15
Table A4. Index variant values for CS3. Joda-Time (RQ2.2).
Table A4. Index variant values for CS3. Joda-Time (RQ2.2).
Case StudyReleaseMIorig.MIorig.(CM)MIimpr.MIimpr.(CM)MILOCMIJHMIJH(CM)
CS3. Joda-Time0.959.04104.7252.3798.0550.5157.43103.12
CS3. Joda-Time0.9.558.99101.4751.4593.9350.8456.7799.25
CS3. Joda-Time1.054.77104.6546.7096.5744.7450.68100.55
CS3. Joda-Time1.153.45103.2945.3795.2243.2049.4399.28
CS3. Joda-Time1.255.59105.3947.8197.6145.6151.77101.57
CS3. Joda-Time1.2.152.22102.0244.1293.9241.9248.0497.84
CS3. Joda-Time1.353.49103.3045.5295.3343.1549.3799.18
CS3. Joda-Time1.452.98102.8444.9494.8042.5348.7998.65
CS3. Joda-Time1.552.68102.5144.6494.4742.1748.5398.36
CS3. Joda-Time1.5.152.67102.5044.6394.4642.1648.5298.35
CS3. Joda-Time1.5.252.64102.4744.6194.4442.1348.5098.33
CS3. Joda-Time1.6.052.38102.2044.3494.1641.8448.2398.05
CS3. Joda-Time1.6.152.34102.1644.3094.1241.8048.1998.00
CS3. Joda-Time1.6.252.34102.1644.3094.1241.8048.1898.00
CS3. Joda-Time2.047.7597.6039.2889.1336.6043.0992.94
CS3. Joda-Time2.147.6797.5239.2189.0536.5243.0192.85
CS3. Joda-Time2.247.5297.3639.0488.8836.3442.8492.67
CS3. Joda-Time2.347.4997.3139.0088.8336.3142.8292.64
CS3. Joda-Time2.447.6097.4139.1388.9436.4442.9392.74
CS3. Joda-Time2.547.5197.3139.0488.8336.3742.8492.64
CS3. Joda-Time2.647.5397.3239.0588.8436.3842.8592.65
CS3. Joda-Time2.747.5397.3339.0688.8536.3942.8692.65
CS3. Joda-Time2.847.5397.3239.0688.8536.3942.8692.65
CS3. Joda-Time2.8.147.5397.3239.0688.8536.3942.8692.65
CS3. Joda-Time2.8.247.5397.3239.0688.8536.3942.8692.65
CS3. Joda-Time2.947.4397.2138.9588.7336.2842.7592.53
CS3. Joda-Time2.9.147.4297.2138.9488.7336.2842.7492.52
CS3. Joda-Time2.9.247.4097.1938.9388.7136.2542.7292.50
CS3. Joda-Time2.9.347.4097.1838.9288.7036.2542.7292.50
CS3. Joda-Time2.9.447.4897.2639.0188.7936.3442.8192.59
CS3. Joda-Time2.9.547.4297.1938.9488.7136.2742.7492.51
CS3. Joda-Time2.9.647.4197.1838.9388.7036.2642.7392.50
CS3. Joda-Time2.9.747.4197.1838.9388.7036.2642.7392.51
CS3. Joda-Time2.9.847.4397.2138.9688.7336.2942.7692.53
CS3. Joda-Time2.9.947.4397.2138.9688.7336.2942.7692.53
CS3. Joda-Time2.1047.4197.1838.9388.7036.2742.7492.51
CS3. Joda-Time2.10.147.4097.1738.9288.6936.2542.7292.49
CS3. Joda-Time2.10.247.3997.1638.9188.6836.2442.7292.48
CS3. Joda-Time2.10.347.3697.1238.8988.6536.2242.6992.45
CS3. Joda-Time2.10.447.3697.1238.8988.6536.2242.6992.45
CS3. Joda-Time2.10.547.3697.1238.8988.6536.2242.6992.45
CS3. Joda-Time2.10.647.3697.1238.8988.6536.2242.6992.45
CS3. Joda-Time2.10.747.2897.0338.8088.5536.1342.5992.34
CS3. Joda-Time2.10.847.2897.0338.8088.5536.1342.5992.34
CS3. Joda-Time2.10.947.2897.0338.8088.5536.1342.5992.34
CS3. Joda-Time2.10.1047.2897.0338.8088.5536.1342.5992.34
CS3. Joda-Time2.10.1147.2797.0238.7988.5436.1242.5992.34
CS3. Joda-Time2.10.1247.2797.0238.7988.5436.1242.5992.34
CS3. Joda-Time2.10.1347.2797.0238.7988.5436.1242.5992.34
CS3. Joda-Time2.10.1447.2797.0238.7988.5436.1242.5992.34
CS3. Joda-Time2.11.046.9396.6138.4488.1135.5542.5492.21
CS3. Joda-Time2.11.146.9396.6138.4488.1135.5542.5492.21

References

  1. ISO/IEC/IEEE 14764:2022; Software engineering—Software Life Cycle Processes—Maintenance. International Organization for Standardization: Geneva, Switzerland, 2022.
  2. Christa, S.; Madhusudhan, V.; Suma, V.; Rao, J.J. Software Maintenance: From the Perspective of Effort and Cost Requirement. In Proceedings of the International Conference on Data Engineering and Communication Technology, Maharashtra, India, 10–11 March 2017; Satapathy, S., Bhateja, V., Joshi, A., Eds.; Springer: Singapore, 2017; pp. 759–768. [Google Scholar]
  3. Granja-Alvarez, J.C.; Barranco-García, M.J. A Method for Estimating Maintenance Cost in a Software Project: A Case Study. J. Softw. Maint. 1997, 9, 161–175. [Google Scholar] [CrossRef]
  4. Ren, Y.; Xing, T.; Chen, X.; Chai, X. Research on Software Maintenance Cost of Influence Factor Analysis and Estimation Method. In Proceedings of the 2011 3rd International Workshop on Intelligent Systems and Applications, Wuhan, China, 28–29 May 2011; pp. 1–4. [Google Scholar] [CrossRef]
  5. ISO/IEC 25010:2011; Systems and Software Engineering—Systems and Software Quality Requirements and Evaluation (SQuaRE)—System and Software Quality Models. International Organization for Standardization: Geneva, Switzerland, 2017.
  6. Alsolai, H.; Roper, M. A systematic literature review of machine learning techniques for software maintainability prediction. Inf. Softw. Technol. 2020, 119, 106214. [Google Scholar] [CrossRef]
  7. Riaz, M.; Mendes, E.; Tempero, E. A systematic review of software maintainability prediction and metrics. In Proceedings of the 2009 3rd International Symposium on Empirical Software Engineering and Measurement, Lake Buena Vista, FL, USA, 15–16 October 2009; pp. 367–377. [Google Scholar] [CrossRef]
  8. Oman, P.; Hagemeister, J. Construction and testing of polynomials predicting software maintainability. Oregon Workshop on Software Metrics. J. Syst. Softw. 1994, 24, 251–266. [Google Scholar] [CrossRef]
  9. Coleman, D.; Ash, D.; Lowther, B.; Oman, P. Using metrics to evaluate software system maintainability. Computer 1994, 27, 44–49. [Google Scholar] [CrossRef]
  10. Welker, K.D.; Oman, P.W.; Atkinson, G.G. Development and Application of an Automated Source Code Maintainability Index. J. Softw. Maint. 1997, 9, 127–159. [Google Scholar] [CrossRef]
  11. Najm, N. Measuring Maintainability Index of a Software Depending on Line of Code Only. IOSR J. Comput. Eng. 2014, 16, 64–69. [Google Scholar] [CrossRef]
  12. Microsoft. Visual Studio. 2021. Available online: https://visualstudio.microsoft.com/ (accessed on 20 December 2021).
  13. Virtual Machinery. MI and MINC—Maintainability Index. 2021. Available online: http://www.virtualmachinery.com/sidebar4.htm (accessed on 20 December 2021).
  14. Kaur, K.; Singh, H. Determination of Maintainability Index for Object Oriented Systems. Determ. Maintainab. Index Object Oriented Syst. 2011, 36, 1–6. [Google Scholar] [CrossRef]
  15. Kaur, A.; Kaur, K.; Pathak, K. A proposed new model for maintainability index of open source software. In Proceedings of the 3rd International Conference on Reliability, Infocom Technologies and Optimization, Noida, India, 8–10 October 2014; pp. 1–6. [Google Scholar] [CrossRef]
  16. Misra, S.C. Modeling Design/Coding Factors That Drive Maintainability of Software Systems. Softw. Qual. J. 2005, 13, 297–320. [Google Scholar] [CrossRef]
  17. Madhwaraj, K.G. Empirical comparison of two metrics suites for maintainability prediction in packages of object-oriented systems: A case study of open source software. J. Comput. Sci. 2014, 10, 2330–2338. [Google Scholar] [CrossRef] [Green Version]
  18. Welker, K.D. The software maintainability index revisited. CrossTalk 2001, 14, 18–21. [Google Scholar]
  19. Sjøberg, D.I.K.; Anda, B.; Mockus, A. Questioning software maintenance metrics: A comparative case study. In Proceedings of the 2012 ACM-IEEE International Symposium on Empirical Software Engineering and Measurement, Lund, Sweden, 19–20 September 2012; pp. 107–110. [Google Scholar] [CrossRef]
  20. Counsell, S.; Liu, X.; Eldh, S.; Tonelli, R.; Marchesi, M.; Concas, G.; Murgia, A. Re-visiting the ‘Maintainability Index’ Metric from an Object-Oriented Perspective. In Proceedings of the 2015 41st Euromicro Conference on Software Engineering and Advanced Applications, Madeira, Portugal, 26–28 August 2015; pp. 84–87. [Google Scholar] [CrossRef]
  21. Seref, B.; Tanriover, O. Software code maintainability: A literature review. Int. J. Softw. Eng. Appl. 2016, 7, 3. [Google Scholar] [CrossRef]
  22. Ganpati, A.; Kalia, A.; Singh, H. A comparative study of maintainability index of open source software. Int. J. Emerg. Technol. Adv. Eng. 2012, 2, 228–230. [Google Scholar]
  23. Fedoseev, K.; Askarbekuly, N.; Uzbekova, E.; Mazzara, M. Application of Data-Oriented Design in Game Development. J. Phys. Conf. Ser. 2020, 1694, 106218. [Google Scholar] [CrossRef]
  24. Molnar, A.; Motogna, S. Discovering Maintainability Changes in Large Software Systems. In Proceedings of the 27th International Workshop on Software Measurement and 12th International Conference on Software Process and Product Measurement, Gothenburg, Sweden, 25–27 October 2017; Association for Computing Machinery: New York, NY, USA, 2017; pp. 88–93. [Google Scholar] [CrossRef]
  25. Papamichail, M.D.; Symeonidis, A.L. A generic methodology for early identification of non-maintainable source code components through analysis of software releases. Inf. Softw. Technol. 2020, 118, 106218. [Google Scholar] [CrossRef]
  26. Kencana, G.H.; Saleh, A.; Darwito, H.A.; Rachmadi, R.R.; Sari, E.M. Comparison of Maintainability Index Measurement from Microsoft CodeLens and Line of Code. In Proceedings of the 2020 7th International Conference on Electrical Engineering, Computer Sciences and Informatics (EECSI), Yogyakarta, Indonesia, 1–2 October 2020; pp. 235–239. [Google Scholar]
  27. Şanlıalp, İ.; Öztürk, M.M.; Yiğit, T. Energy Efficiency Analysis of Code Refactoring Techniques for Green and Sustainable Software in Portable Devices. Electronics 2022, 11, 442. [Google Scholar] [CrossRef]
  28. Zhou, Y.; Xu, B. Predicting the maintainability of open source software using design metrics. Wuhan Univ. J. Nat. Sci. 2008, 13, 14–20. [Google Scholar] [CrossRef]
  29. Chowdhury, S.; Holmes, R.; Zaidman, A.; Kazman, R. Revisiting the debate: Are code metrics useful for measuring maintenance effort? Empir. Softw. Eng. 2022, 27, 1–31. [Google Scholar] [CrossRef]
  30. Strečanský, P.; Chren, S.; Rossi, B. Comparing Maintainability Index, SIG Method, and SQALE for Technical Debt Identification. In Proceedings of the 35th Annual ACM Symposium on Applied Computing, Brno, Czech Republic, 30 March–3 April 2020; Association for Computing Machinery: New York, NY, USA, 2020; pp. 121–124. [Google Scholar] [CrossRef] [Green Version]
  31. Arisholm, E.; Briand, L.C.; Johannessen, E.B. A systematic and comprehensive investigation of methods to build and evaluate fault prediction models. J. Syst. Softw. 2010, 83, 2–17. [Google Scholar] [CrossRef]
  32. Mauša, G.; Galinac Grbac, T. Co-evolutionary multi-population genetic programming for classification in software defect prediction: An empirical case study. Appl. Soft Comput. 2017, 55, 331–351. [Google Scholar] [CrossRef]
  33. Gradišnik, M.; Beranič, T.; Karakatič, S. Impact of historical software metric changes in predicting future maintainability trends in open-source software development. Appl. Sci. 2020, 10, 4624. [Google Scholar] [CrossRef]
  34. Kaur, L.; Mishra, A. A comparative analysis of evolutionary algorithms for the prediction of software change. In Proceedings of the 2018 International Conference on Innovations in Information Technology (IIT), Al Ain, United Arab Emirates, 18–19 November 2018; pp. 187–192. [Google Scholar] [CrossRef]
  35. Reddy, B.R.; Ojha, A. Performance of maintainability index prediction models: A feature selection based study. Evol. Syst. 2019, 10, 179–204. [Google Scholar] [CrossRef]
  36. Bray, M.; Brune, K.; Fisher, D.A.; Foreman, J.; Gerken, M. C4 Software Technology Reference Guide-A Prototype; Technical Report; Software Engineering Institute—Carnegie Mellon University: Pittsburgh, PA, USA, 1997. [Google Scholar]
  37. GitHub. The 2021 State of the Octoverse. 2021. Available online: https://octoverse.github.com/ (accessed on 20 December 2021).
  38. Stack Overflow. Stack Overflow Developer Survey. 2021. Available online: https://insights.stackoverflow.com/survey/2021 (accessed on 20 December 2021).
  39. Puntigam, F. Interfaces of Active Objects with Internal Concurrency. In Proceedings of the 1st International Workshop on Distributed Objects for the 21st Century, Genova, Italy, 6–10 July 2009; Association for Computing Machinery: New York, NY, USA, 2009. [Google Scholar] [CrossRef]
  40. Murthy, A.R.C.; Palani, G.; Iyer, N.R. Object-oriented programming paradigm for damage tolerant evaluation of engineering structural components. Adv. Eng. Softw. 2011, 42, 12–24. [Google Scholar] [CrossRef]
  41. Brito e Abreu, F.; Melo, W. Evaluating the impact of object-oriented design on software quality. In Proceedings of the 3rd International Software Metrics Symposium, Berlin, Germany, 25–26 March 1996; pp. 90–99. [Google Scholar] [CrossRef] [Green Version]
  42. Coleman, D. Assessing maintainability. In Proceedings of the Software Engineering Productivity Conference, Salt Lake City, UT, USA, 7 April 1992; pp. 525–532. [Google Scholar]
  43. Elmidaoui, S.; Cheikhi, L.; Idri, A.; Abran, A. Empirical studies on software product maintainability prediction: A systematic mapping and review. E-Inform. Softw. Eng. J. 2019, 13, 141–202. [Google Scholar]
  44. Zighed, N.; Bounour, N.; Seriai, A.D. Comparative Analysis of Object-Oriented Software Maintainability Prediction Models. Found. Comput. Decis. Sci. 2018, 43, 359–374. [Google Scholar] [CrossRef] [Green Version]
  45. Ardito, L.; Coppola, R.; Barbato, L.; Verga, D. A tool-based perspective on software code maintainability metrics: A systematic literature review. Sci. Program. 2020, 2020, 8840389. [Google Scholar] [CrossRef]
  46. Virtual Machinery. JHawk. 2021. Available online: http://www.virtualmachinery.com/jhawkprod.htm (accessed on 20 December 2021).
  47. Lacchia, M. Radon. 2021. Available online: https://radon.readthedocs.io/ (accessed on 20 December 2021).
  48. Verifysoft Technology. Testwell CMT++/CMTJava. 2021. Available online: https://www.verifysoft.com/en_cmtx.html (accessed on 20 December 2021).
  49. Li, W.; Henry, S. Object-oriented metrics that predict maintainability. Object-Oriented Software. J. Syst. Softw. 1993, 23, 111–122. [Google Scholar] [CrossRef]
  50. Malhotra, R.; Khanna, M. Particle swarm optimization-based ensemble learning for software change prediction. Inf. Softw. Technol. 2018, 102, 65–84. [Google Scholar] [CrossRef]
  51. Elish, M.O.; Aljamaan, H.; Ahmad, I. Three empirical studies on predicting software maintainability using ensemble methods. Soft Comput. 2015, 19, 2511–2524. [Google Scholar] [CrossRef]
  52. Bandi, R.; Vaishnavi, V.; Turk, D. Predicting maintenance performance using object-oriented design complexity metrics. IEEE Trans. Softw. Eng. 2003, 29, 77–87. [Google Scholar] [CrossRef]
  53. Fioravanti, F.; Nesi, P. Estimation and prediction metrics for adaptive maintenance effort of object-oriented systems. IEEE Trans. Softw. Eng. 2001, 27, 1062–1084. [Google Scholar] [CrossRef]
  54. Hayes, J.; Patel, S.; Zhao, L. A metrics-based software maintenance effort model. In Proceedings of the 8th European Conference on Software Maintenance and Reengineering, Tampere, Finland, 24–26 March 2004; pp. 254–258. [Google Scholar] [CrossRef]
  55. De Lucia, A.; Pompella, E.; Stefanucci, S. Assessing effort estimation models for corrective maintenance through empirical studies. Inf. Softw. Technol. 2005, 47, 3–15. [Google Scholar] [CrossRef]
  56. Dahiya, S.S.; Chhabra, J.K.; Kumar, S. Use of genetic algorithm for software maintainability metrics’ conditioning. In Proceedings of the 15th International Conference on Advanced Computing and Communications (ADCOM 2007), Guwahati, India, 18–21 December 2007; pp. 87–92. [Google Scholar] [CrossRef]
  57. Sharma, A.; Grover, P.; Kumar, R. Predicting maintainability of component-based systems by using fuzzy logic. In Proceedings of the International Conference on Contemporary Computing, Noida, India, 17–19 August 2009; Springer: Berlin/Heidelberg, Germany, 2009; pp. 581–591. [Google Scholar]
  58. Dubey, S.K.; Rana, A. A fuzzy approach for evaluation of maintainability of object oriented software system. Int. J. Comput. Appl. 2012, 49, 1–6. [Google Scholar]
  59. Pratap, A.; Chaudhary, R.; Yadav, K. Estimation of software maintainability using fuzzy logic technique. In Proceedings of the 2014 International Conference on Issues and Challenges in Intelligent Computing Techniques (ICICT), Ghaziabad, India, 7–8 February 2014; pp. 486–492. [Google Scholar] [CrossRef]
  60. Revilla, M.A. Correlations between Internal Software Metrics and Software Dependability in a Large Population of Small C/C++ Programs. In Proceedings of the 18th IEEE International Symposium on Software Reliability (ISSRE ’07), Trollhattan, Sweden, 5–9 November 2007; pp. 203–208. [Google Scholar] [CrossRef]
  61. Microsoft. Visual Studio—Maintainability Index. 2021. Available online: https://docs.microsoft.com/en-us/visualstudio/code-quality/code-metrics-maintainability-index-range-and-meaning (accessed on 20 December 2021).
  62. Molnar, A.J.; Motogna, S. A Study of Maintainability in Evolving Open-Source Software. In Proceedings of the Evaluation of Novel Approaches to Software Engineering: 15th International Conference, ENASE 2020, Prague, Czech Republic, 5–6 May 2020; Revised Selected Papers 15. Springer: Berlin/Heidelberg, Germany, 2021; pp. 261–282. [Google Scholar]
  63. Chowdhury, S.A.; Uddin, G.; Holmes, R. An Empirical Study on Maintainable Method Size in Java. In Proceedings of the 19th International Conference on Mining Software Repositories, Pittsburgh, PA, USA, 23–24 May 2022; Association for Computing Machinery: New York, NY, USA, 2022; pp. 252–264. [Google Scholar] [CrossRef]
  64. Prabowo, G.; Suryotrisongko, H.; Tjahyanto, A. A Tale of Two Development Approach: Empirical Study on The Maintainability and Modularity of Android Mobile Application with Anti-Pattern and Model-View-Presenter Design Pattern. In Proceedings of the 2018 International Conference on Electrical Engineering and Informatics (ICELTICs), Banda Aceh, Indonesia, 19–20 September 2018; pp. 149–154. [Google Scholar] [CrossRef]
  65. Singh, N.; Singh, D.P.; Pant, B.; Tiwari, U.K. μBIGMSA-Microservice-Based Model for Big Data Knowledge Discovery: Thinking Beyond the Monoliths. Wirel. Pers. Commun. 2021, 116, 2819–2833. [Google Scholar] [CrossRef]
  66. Wilson, A.; Wedyan, F.; Omari, S. An Empirical Evaluation and Comparison of the Impact of MVVM and MVC GUI Driven Application Architectures on Maintainability and Testability. In Proceedings of the 2022 International Conference on Intelligent Data Science Technologies and Applications (IDSTA), San Antonio, TX, USA, 5–7 September 2022; pp. 101–108. [Google Scholar] [CrossRef]
  67. De Stefano, M.; Iannone, E.; Pecorelli, F.; Tamburri, D.A. Impacts of software community patterns on process and product: An empirical study. Sci. Comput. Program. 2022, 214, 102731. [Google Scholar] [CrossRef]
  68. Lavazza, L.; Abualkishik, A.Z.; Liu, G.; Morasca, S. An empirical evaluation of the “Cognitive Complexity” measure as a predictor of code understandability. J. Syst. Softw. 2023, 197, 111561. [Google Scholar] [CrossRef]
  69. Cohen, J. Statistical Power Analysis for the Behavioral Sciences; Routledge Academic: Milton Park, UK, 1988. [Google Scholar]
  70. Sawilowsky, S.S. New effect size rules of thumb. J. Mod. Appl. Stat. Methods 2009, 8, 26. [Google Scholar] [CrossRef]
  71. Kerby, D.S. The simple difference formula: An approach to teaching nonparametric correlation. Compr. Psychol. 2014, 3, 11-IT. [Google Scholar] [CrossRef]
  72. Schober, P.; Boer, C.; Schwarte, L.A. Correlation coefficients: Appropriate use and interpretation. Anesth. Analg. 2018, 126, 1763–1768. [Google Scholar] [CrossRef]
  73. Hout, M.C.; Papesh, M.H.; Goldinger, S.D. Multidimensional scaling. Wiley Interdiscip. Rev. Cogn. Sci. 2013, 4, 93–103. [Google Scholar] [CrossRef]
  74. Vijaya; Sharma, S.; Batra, N. Comparative Study of Single Linkage, Complete Linkage, and Ward Method of Agglomerative Clustering. In Proceedings of the 2019 International Conference on Machine Learning, Big Data, Cloud and Parallel Computing (COMITCon), Faridabad, India, 14–16 February 2019; pp. 568–573. [Google Scholar] [CrossRef]
  75. Heričko, T.; Šumak, B. Analyzing Linter Usage and Warnings Through Mining Software Repositories: A Longitudinal Case Study of JavaScript Packages. In Proceedings of the 2022 45th Jubilee International Convention on Information, Communication and Electronic Technology (MIPRO), Opatija, Croatia, 23–27 May 2022; pp. 1375–1380. [Google Scholar] [CrossRef]
Figure 1. Boxplots of software metric values averaged per class.
Figure 1. Boxplots of software metric values averaged per class.
Applsci 13 02972 g001
Figure 2. Dot plot of Index variant values for each subject software system.
Figure 2. Dot plot of Index variant values for each subject software system.
Applsci 13 02972 g002
Figure 3. Boxplots of the pairwise differences between Index variant values.
Figure 3. Boxplots of the pairwise differences between Index variant values.
Applsci 13 02972 g003
Figure 4. Boxplots of the Index variants values with statistical significance annotation (n.s. = not significant).
Figure 4. Boxplots of the Index variants values with statistical significance annotation (n.s. = not significant).
Applsci 13 02972 g004
Figure 5. Scatter plot matrix representing pairwise correlation analyses (all reported correlations are significant (p < 0.001)) and variation in the data distribution.
Figure 5. Scatter plot matrix representing pairwise correlation analyses (all reported correlations are significant (p < 0.001)) and variation in the data distribution.
Applsci 13 02972 g005
Figure 6. Visualizing similarities and dissimilarities after multidimensional scaling based on the Pearson Correlation Coefficient.
Figure 6. Visualizing similarities and dissimilarities after multidimensional scaling based on the Pearson Correlation Coefficient.
Applsci 13 02972 g006
Figure 7. Correlation heat map and dendrogram of hierarchical agglomerative clustering.
Figure 7. Correlation heat map and dendrogram of hierarchical agglomerative clustering.
Applsci 13 02972 g007
Figure 8. Visualizing similarities and dissimilarities after multidimensional scaling based on Kendall’s τ -b Correlation Coefficient.
Figure 8. Visualizing similarities and dissimilarities after multidimensional scaling based on Kendall’s τ -b Correlation Coefficient.
Applsci 13 02972 g008
Figure 9. Lollipop plots depicting the change in Index variants’ values from the previous release.
Figure 9. Lollipop plots depicting the change in Index variants’ values from the previous release.
Applsci 13 02972 g009
Table 1. The inclusion of software metrics for the computation of Index variants and software aspects the metrics measure.
Table 1. The inclusion of software metrics for the computation of Index variants and software aspects the metrics measure.
Computational ComplexityLogical ComplexitySoftware SizeCode Documentation
Maintainability Index VariantHalstead’s EffortHalstead’s VolumeMcCabe’s Cyclomatic ComplexityLines of CodeNumber of StatementsPercent of Lines of Comments
M I o r i g . X XX
M I o r i g . ( C M ) X XX X
M I i m p r . XXX
M I i m p r . ( C M ) XXX X
M I L O C X
M I J H XX X
M I J H ( C M ) XX XX
M I V S XXX
Mark “X” is used to indicate the inclusion of a software metric for the computation of a specific Index variant.
Table 2. Overview of studies using different Index variants.
Table 2. Overview of studies using different Index variants.
Maintainability
Index Variant
Example Study
Using the Variant
Programming Language of Object-Oriented
Software Systems Used in the Study
M I o r i g . [10]C++
[34,64]Java
M I o r i g . ( C M ) [10]C++
[14,20]Java
M I i m p r . [27]C#
[22]C++
[15,27,29,33,63,67,68]Java
[67]Python
M I i m p r . ( C M ) [16]C++
[28]Java
[65]Python
M I L O C [26]C#
M I J H [31,32,62]Java
M I J H ( C M ) [31,32]Java
M I V S [23,26,66]C#
[24,25,35]Java
[30]Python
Table 3. Overview of related studies.
Table 3. Overview of related studies.
StudyCompared Software MeasuresComparison ObjectiveSubject Software SystemsResearch Findings
Kaur and Singh [14]Maintainability Index ( M I o r i g . ( C M ) ), proposed maintainability metricValidating a new measureReleases of three Java software systemsN/A
Kaur et al. [15]Maintainability Index ( M I i m p r . ), change metricEvaluating the maintainability prediction power of the Index for object-oriented software on the class levelTwo releases of a Java software systemThere is a slight inverse relationship between the measures
Kencana et al. [26]Maintainability Index ( M I V S , M I L O C )Comparing the Index calculations from two frameworks on a software and component levelA C# software systemThe difference between calculations is negligible
Madhwaraj [17]Maintainability Index ( M I i m p r . ( C M ) ), proposed maintainability metricValidating a new measureReleases of four Java software systemsN/A
Misra [16]Maintainability Index ( M I i m p r . ( C M ) ), proposed maintainability metricValidating a new measureFifty C++ software systemsN/A
Najm [11]Maintainability Index ( M I i m p r . ), proposed maintainability metricValidating a new measureSix C++ software systemsN/A
Papamichail and Symeonidis [25]Maintainability Index ( M I V S . ), proposed maintainability metricValidating a new measureThree releases of a Java software systemN/A
Sjøberg et al. [19]Maintainability Index ( M I i m p r . ( C M ) ), two code smells (Feature Envy, God Class), a set of structural metrics, system size metrics, maintenance effortInvestigating the consistency of software maintenance metrics at the system levelFour Java software systemsThe measures are not mutually consistent for evaluating maintainability
Strečanský et al. [30]Maintainability Index ( M I V S ), SIG method, SQALE analysisComparing methods for software technical debt identification on the between-release levelReleases of twenty Python software systemsThe Index and SIG method show more similarity, while the Index and SQALE analysis show less
N/A = not applicable.
Table 4. Overview of subject software systems included in the study (RQ1 and RQ2.1).
Table 4. Overview of subject software systems included in the study (RQ1 and RQ2.1).
Software SystemCode Repository aGitHub Stars bReleaseNumber of ClassesLines of CodeLines of Comments
S1. ActivitiActiviti/Activiti8.9k7.4.03,130181,01267,996
S2. Angry IP Scannerangryip/ipscan2.9k3.8.238212,9712878
S3. Apache Antapache/ant3371.10.121817139,425104,736
S4. Apache Commons Codecapache/commons-codec3661.1519023,87315,319
S5. Apache Commons CSVapache/commons-csv2911.9.05683143726
S6. Apache Commons DBCPapache/commons-dbcp2862.9.018932,11011,173
S7. Apache Commons Langapache/commons-lang2.3k3.12.091678,46858,556
S8. Apache HttpClientapache/httpcomponents-client1.2k5.1.3117972,84029,967
S9. Apache PDFBoxapache/pdfbox1.7k2.0.261587167,68685,153
S10. Apache POIapache/poi1.5k5.2.24534399,492179,826
S11. Arduinoarduino/Arduino13.1k1.8.1942925,91110,262
S12. Art of IllusionArtOfIllusion/ArtOfIllusion613.2.0901118,268,80918,676
S13. AssertJassertj/assertj-core2.2k3.23.15359201,769158,914
S14. Caffeineben-manes/caffeine12.1k3.1.192555,99115,328
S15. cglibcglib/cglib4.5k3.3.049815,1814353
S16. DITA Open Toolkitdita-ot/dita-ot3223.7.249949,11712,357
S17. EasyMockeasymock/easymock7764.333614,7576930
S18. Ehcacheehcache/ehcache31.8k3.10.12374127,46841,302
S19. FastJSONalibaba/fastjson24.9k1.2.836295182,19713,922
S20. GeOxygeneIGNF/geoxygene311.92767241,496114,263
S21. h2databaseh2database/h2database3.4k2.1.2141657238,08269,448
S22. Hibernate ORMhibernate/hibernate-orm5.1k5.6.1115,382798,556191,614
S23. iText7itext/itext71.3k7.2.33063292,122159,854
S24. JabRefJabRef/jabref2.7k5.71935131,89115,927
S25. Jajukjajuk-team/jajuk4111.0104367,42347,767
S26. JasperReportsTIBCOSoftware/jasperreports7026.20.03720319,275150,282
S27. javaGeomdlegland/javaGeom440.11.337632,57717,992
S28. Java Hamcresthamcrest/JavaHamcrest2k2.224269803532
S29. Jenkinsjenkinsci/jenkins19.4k2.366.13703172,27277,378
S30. JFreeChartjfree/jfreechart8881.5.31056136,664127,798
S31. JFreeSVGjfree/jfreesvg2515.0.32439303,164
S32. JGraphTjgrapht/jgrapht2.2k1.5.11261128,74260,731
S33. JMeterapache/jmeter6.4k5.51680146,35268,114
S34. Joda-TimeJodaOrg/joda-time4.8k2.11.155788,23244,692
S35. jsoupjhy/jsoup9.7k1.15.324426,1255708
S36. JUnit4junit-team/junit48.3k4.13.2146931,2427460
S37. JUnit5junit-team/junit55.4k5.9.0231481,91035,277
S38. Mockitomockito/mockito13.3k4.7.0194858,71019,848
S39. MPAndroidChartPhilJay/MPAndroidChart35.5k3.1.030024,3708930
S40. PowerMockpowermock/powermock3.9k2.0.9122037,85220,675
S41. SLF4Jqos-ch/slf4j2k2.0.026013,39710,046
S42. Springspring-projects/spring-framework49k5.3.2214,088675,735346,280
S43. Spring Bootspring-projects/spring-boot63k2.7.310,431351,935164,354
S44. TestNGcbeust/testng1.8k7.6.1244491,9539616
S45. YamlBeansEsotericSoftware/yamlbeans5251.151868485894
a GitHub code repositories are available at https://github.com/ (accessed on 30 August 2022). b Data gathered on 30 August 2022.
Table 5. Overview of subject software systems included in the study (RQ2.2).
Table 5. Overview of subject software systems included in the study (RQ2.2).
Number of ClassesLines of CodeLines of Comments
Case StudySoftware SystemReleasesAvg.Med.Std.Avg.Med.Std.Avg.Med.Std.
CS1S13. AssertJ63 (1.0.0–3.23.1)3346.930651133125,175.9112,80944,201.994,521.782,93835,557.8
CS2S14. Caffeine61 (1.0–3.1.1)760.67836117.145,474.546,5747364.812,75613,2041411.4
CS3S34. Joda-Time52 (0.9–2.11.1)547.955772.280,046.785,49013,880.842,200.244,5525451.7
Avg. = average, Med. = median, Std. = standard deviation.
Table 6. Descriptive statistics of software metric values averaged per class.
Table 6. Descriptive statistics of software metric values averaged per class.
Halstead’s Effort per ClassHalstead’s Volume per ClassMcCabe’s Cyclomatic Complexity per ClassLines of Code per ClassNumber of Statements per ClassPercent of Lines of Comments
Avg.54,201245812.176.054.643.4
Med.37,166216411.364.647.944.9
Std.58,99214916.8141.029.920.4
Min.29573773.6421.313.97.64
Max.288,226569333.317012393.5
Avg. = average, Med. = median, Std. = standard deviation, Min. = minimum, Max. = maximum.
Table 7. Interpretation of Cohen’s d effect size.
Table 7. Interpretation of Cohen’s d effect size.
Cohen’s d Effect SizeInterpretation of the Effect Magnitude
0.01 | d | < 0.2 Very small effect
0.2 | d | < 0.5 Small effect
0.5 | d | < 0.8 Medium effect
0.8 | d | < 1.2 Large effect
1.2 | d | < 2 Very large effect
2 | d | Huge effect
Table 8. Interpretation of Pearson’s and Kendall’s Correlation Coefficient.
Table 8. Interpretation of Pearson’s and Kendall’s Correlation Coefficient.
Pearson’s CorrelationKendall’s τ -b CorrelationInterpretation of the Correlation
0.0 | r | < 0.1 0.0 | τ | < 0.1 Negligible correlation
0.1 | r | < 0.4 0.1 | τ | < 0.4 Weak correlation
0.4 | r | < 0.7 0.4 | τ | < 0.7 Moderate correlation
0.7 | r | < 0.9 0.7 | τ | < 0.9 Strong correlation
0.9 | r | 1 0.9 | τ | 1 Very strong correlation
Table 9. Descriptive statistics and normality test of Index variant values.
Table 9. Descriptive statistics and normality test of Index variant values.
MIorig.MIorig.(CM)MIimpr.MIimpr.(CM)MILOCMIJHMIJH(CM)
Avg.66.66112.4160.90106.6459.2366.37112.11
95% CI[62.64, 70.69][108.35, 116.47][56.73, 65.07][102.48, 110.8][54.87, 63.59][62.13, 70.61][107.87, 116.36]
Med.67.74111.3761.0410559.9866.74112.15
Std.13.3913.5113.8813.8414.5114.1314.14
Min.44.2982.7036.9078.4433.4542.5483.70
Max.94.74136.8289.78131.8688.2396.71138.78
Skew.0.060.030.060.04−0.010.100.08
Kurt.−1.00−0.69−0.93−0.72−0.97−0.90−0.68
SWW = 0.96,
p = 0.147
W = 0.98,
p = 0.461
W = 0.97,
p = 0.207
W = 0.97,
p = 0.389
W = 0.97,
p = 0.256
W = 0.96,
p = 0.165
W = 0.97,
p = 0.352
Avg. = average, CI = confidence interval, Med. = median, Std. = standard deviation, Min. = minimum, Max. = maximum, Skew = skewness, Kurt. = kurtosis, SW = Shapiro–Wilk Test.
Table 10. Evaluation of the differences between the paired observations of Index variant values.
Table 10. Evaluation of the differences between the paired observations of Index variant values.
Comparison
Group
Reference
Group
Shapiro–Wilk
Normality Test
Avg.(±SE a/Med. b
Difference
Test t a/Z b
Value
Statistical
Significance
Effect Size
d a/rc b
MIorig.MIorig.(CM)W(45) = 0.71, p < 0.001 b48.50Z = −5.841p < 0.001rc = 1
MIimpr.W(45) = 0.95, p = 0.065 a−5.77 ± 0.19t(44) = −30.54p < 0.001d = −4.55
MIimpr.(CM)W(45) = 0.81, p < 0.001 b42.29Z = −5.841p < 0.001rc = 1
MILOCW(45) = 0.99, p = 0.943 a−7.43 ± 0.31t(44) = −23.88p < 0.001d = −3.56
MIJHW(45) = 0.97, p = 0.363 a−0.29 ± 0.27t(44) = −1.09p = 0.280d = −0.16
MIJH.(CM)W(45) = 0.87, p < 0.001 b47.09Z = −5.841p < 0.001rc = 1
MIorig.(CM)MIorigW(45) = 0.71, p < 0.001 b−48.50Z = −5.841p < 0.001rc = −1
MIimpr.W(45) = 0.74, p < 0.001 b−54.40Z = −5.841p < 0.001rc = −1
MIimpr.(CM)W(45) = 0.95, p = 0.065 a−5.77 ± 0.19t(44) = −30.54p < 0.001d= −4.55
MILOCW(45) = 0.82, p < 0.001 b−55.84Z= −5.841p < 0.001rc= −1
MIJHW(45) = 0.80, p < 0.001 b−48.34Z = −5.841p < 0.001rc = −1
MIJH.(CM)W(45) = 0.97, p = 0.363 a−0.29 ± 0.27t(44) = −1.09p = 0.280d = −0.16
MIimpr.MIorigW(45) = 0.95, p = 0.065 a5.77 ± 0.19t(44) = 30.54p < 0.001d = 4.55
MIorig.(CM)W(45) = 0.74, p < 0.001 b54.40Z = −5.841p < 0.001rc = 1
MIimpr.(CM)W(45) = 0.71, p < 0.001 b48.50Z = −5.841p < 0.001rc = 1
MILOCW(45) = 0.95, p = 0.077 a−1.67 ± 0.20t(44) = −8.42p < 0.001d = −1.26
MIJHW(45) = 0.94, p = 0.023 b5.26Z = −5.841p < 0.001rc = 1
MIJH.(CM)W(45) = 0.79, p < 0.001 b53.6Z = −5.841p < 0.001rc = 1
MIimpr.(CM)MIorigW(45) = 0.81, p < 0.001 b−42.29Z = −5.841p < 0.001rc= −1
MIorig.(CM)W(45) = 0.95, p = 0.065 a5.77 ± 0.19t(44) = 30.54p < 0.001d = 4.55
MIimpr.W(45) = 0.71, p < 0.001 b−48.50Z = −5.841p < 0.001rc = −1
MILOCW(45) = 0.79, p < 0.001 b−50.20Z = −5.841p < 0.001rc = −1
MIJHW(45) = 0.78, p < 0.001 b−42.58Z = −5.841p < 0.001rc = −1
MIJH.(CM)W(45) = 0.94, p = 0.023 b5.26Z = −5.841p < 0.001rc = 1
MILOCMIorigW(45) = 0.99, p = 0.943 a7.43 ± 0.31t(44) = 23.88p < 0.001d = 3.56
MIorig.(CM)W(45) = 0.82, p < 0.001 b55.84Z = −5.841p < 0.001rc = 1
MIimpr.W(45) = 0.95, p = 0.077 a1.67 ± 0.20t(44) = 8.42p < 0.001d = 1.26
MIimpr.(CM)W(45) = 0.79, p < 0.001 b50.20Z = −5.841p < 0.001rc = 1
MIJHW(45) = 0.98, p = 0.576 a7.14 ± 0.29t(44) = 24.48p < 0.001d = 3.65
MIJH.(CM)W(45) = 0.85, p < 0.001 b55.11Z = −5.841p < 0.001rc = 1
MIJHMIorigW(45) = 0.97, p = 0.363 a0.29 ± 0.27t(44) = 1.09p = 0.280d = 0.16
MIorig.(CM)W(45) = 0.80, p < 0.001 b48.34Z = −5.841p < 0.001rc = 1
MIimpr.W(45) = 0.94, p = 0.023 b−5.26Z = −5.841p < 0.001rc = −1
MIimpr.(CM)W(45) = 0.78, p < 0.001 b42.58Z = −5.841p < 0.001rc = 1
MILOCW(45) = 0.98, p = 0.576 a−7.14 ± 0.29t(44) = −24.48p < 0.001d = −3.65
MIJH.(CM)W(45) = 0.71, p < 0.001 b48.50Z = −5.841p < 0.001rc = 1
MIJH(CM)MIorigW(45) = 0.87, p < 0.001 b−47.09Z = −5.841p < 0.001rc = −1
MIorig.(CM)W(45) = 0.97, p = 0.363 a0.29 ± 0.27t(44) = 1.09p = 0.280d = 0.16
MIimpr.W(45) = 0.79, p < 0.001 b−53.61Z = −5.841p < 0.001rc = −1
MIimpr.(CM)W(45) = 0.94, p = 0.023 b−5.26Z = −5.841p < 0.001rc = −1
MILOCW(45) = 0.85, p < 0.001 b−55.11Z = −5.841p < 0.001rc = −1
MIJHW(45) = 0.71, p < 0.001 b−48.50Z= −5.841p < 0.001rc= −1
a Paired Samples t-test, b Wilcoxon Signed-Rank Test, Avg. = average, SE = standard error, Med. = median.
Table 11. Kolmogorov–Smirnov normality test.
Table 11. Kolmogorov–Smirnov normality test.
Case StudyMIorig.MIorig.(CM)MIimpr.MIimpr.(CM)MILOCMIJHMIJH(CM)
CS1. AssertJW = 0.151,
p = 0.001
W = 0.199,
p < 0.001
W = 0.189,
p < 0.001
W = 0.177,
p < 0.001
W = 0.159,
p < 0.001
W = 0.169,
p < 0.001
W = 0.255,
p < 0.001
CS2. CaffeineW = 0.102,
p = 0.186
W = 0.131,
p = 0.011
W = 0.100,
p = 0.200
W = 0.137,
p = 0.006
W = 0.113,
p = 0.050
W = 0.091,
p = 0.200
W = 0.156,
p < 0.001
CS3. Joda-TimeW = 0.404,
p < 0.001
W = 0.395,
p < 0.001
W = 0.404,
p < 0.001
W = 0.399,
p < 0.001
W = 0.404,
p < 0.001
W = 0.404,
p < 0.001
W = 0.402,
p < 0.001
Table 12. Correlation analysis using Kendall’s τ -b Correlation Coefficient (all reported correlations are significant (p < 0.001)).
Table 12. Correlation analysis using Kendall’s τ -b Correlation Coefficient (all reported correlations are significant (p < 0.001)).
CS1. AssertJ
MIorig.MIorig.(CM)MIimpr.MIimpr.(CM)MILOCMIJHMIJH(CM)
MIorig.10.9190.9420.8700.8050.7290.724
MIorig.(CM)0.91910.8730.9430.7450.6630.789
MIimpr.0.9420.87310.8380.8600.7800.750
MIimpr.(CM)0.8700.9430.83810.7160.6300.813
MILOC0.8050.7450.8600.71610.8870.683
MIJH0.7290.6630.7800.6300.88710.667
MIJH(CM)0.7240.7890.7500.8130.6830.6671
CS2.Caffeine
MIorig.MIorig.(CM)MIimpr.MIimpr.(CM)MILOCMIJHMIJH(CM)
MIorig.10.6290.9090.6510.8920.8850.629
MIorig.(CM)0.62910.6790.9720.7030.6590.945
MIimpr.0.9090.67910.7000.9480.8640.663
MIimpr.(CM)0.6510.9720.70010.7240.6790.923
MILOC0.8920.7030.9480.72410.8640.685
MIJH0.8850.6590.8640.6790.86410.663
MIJH(CM)0.6290.9450.6630.9230.6850.6631
CS3.Joda-Time
MIorig.MIorig.(CM)MIimpr.MIimpr.(CM)MILOCMIJHMIJH(CM)
MIorig.10.9570.9880.9630.9770.9880.983
MIorig.(CM)0.95710.9450.9940.9340.9450.971
MIimpr.0.9880.94510.9510.9840.9880.971
MIimpr.(CM)0.9630.9940.95110.9400.9510.974
MILOC0.9770.9340.9840.94010.9800.963
MIJH0.9880.9450.9880.9510.98010.974
MIJH(CM)0.9830.9710.9710.9740.9630.9741
Table 13. Mann–Kendall Trend analyses.
Table 13. Mann–Kendall Trend analyses.
Case StudyMIorig.MIorig.(CM)MIimpr.MIimpr.(CM)MILOCMIJHMIJH(CM)
CS1. AssertJZ = −7.640,
β = −0.056,
p < 0.001
Z = −8.316,
β = −0.064,
p < 0.001
Z = −7.153,
β = −0.048,
p < 0.001
Z = −8.672,
β = −0.055,
p < 0.001
Z = −5.718,
β = −0.031,
p < 0.001
Z = −4.650,
β = −0.025,
p < 0.001
Z = −7.841,
β = −0.033,
p < 0.001
CS2. CaffeineZ = −3.485,
β = −0.010,
p < 0.001
Z = −6.783,
β = −0.051,
p < 0.001
Z = −3.871,
β = −0.011,
p < 0.001
Z = −6.509,
β = −0.054,
p < 0.001
Z = −4.120,
β = −0.014,
p < 0.001
Z = −4.369,
β = −0.015,
p < 0.001
Z = −7.156,
β = −0.056,
p < 0.001
CS3. Joda-TimeZ = −9.302,
β = −0.030,
p < 0.001
Z = −9.276,
β = −0.032,
p < 0.001
Z = −9.302,
β = −0.032,
p < 0.001
Z = −9.276,
β = −0.034,
p < 0.001
Z = −9.234,
β = −0.037,
p < 0.001
Z = −9.334,
β = −0.024,
p < 0.001
Z = −9.324,
β = −0.027,
p < 0.001
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Heričko, T.; Šumak, B. Exploring Maintainability Index Variants for Software Maintainability Measurement in Object-Oriented Systems. Appl. Sci. 2023, 13, 2972. https://doi.org/10.3390/app13052972

AMA Style

Heričko T, Šumak B. Exploring Maintainability Index Variants for Software Maintainability Measurement in Object-Oriented Systems. Applied Sciences. 2023; 13(5):2972. https://doi.org/10.3390/app13052972

Chicago/Turabian Style

Heričko, Tjaša, and Boštjan Šumak. 2023. "Exploring Maintainability Index Variants for Software Maintainability Measurement in Object-Oriented Systems" Applied Sciences 13, no. 5: 2972. https://doi.org/10.3390/app13052972

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop