## 3 Materials and Methods
### Problem Description and Formulation  
The purpose of software modularity is to shape a number of subsystems by clustering the software elements in the software system. The consistency of the software module's clustering outcome can be evaluated in terms of cohesion and coupling. Cohesion is a function that tests how the modules in a cluster are interrelated. On the other hand, coupling is an inter-cluster term that tests how two given clusters are inter-edge dependencies. Coupling is as minimal as possible between the different subsystems, and cohesion within the subsystem is as high as possible [29]. Our goal is that a high-quality partition has both a low coupling relationship and a high cohesion relationship, which assumes that well-designed systems are formed by cohesive sets of loosely related modules between each other. The multi-objective software module clustering problem can be described as a specific group of modules assembled into clusters according to given criteria [30]. The modules' relationships automatically enable better-quality clustering of software modules in the software module clustering problem. These relationships take the form of dependencies among modules. The idea is to minimize coupling between clusters and to maximize cohesion within each cluster. Clustering partitions the collection of all modules in the system. The collection of modules in each partition of the clustering is a cluster. Finding the most suitable clustering for a given collection of modules is an NP-hard problem, making it ideal for search-based software engineering techniques [30]. The clustering problem is defined as follows:  
_\"The set of n objects X = [XI, X2,..., xn] is to be grouped. Each object, Xi, is to be clustered into non-overlapping groups 0 = [01, O2,..., Ox] where O] is a cluster j, or a set of objects and k is the number of clusters, 01 U O2 U... U OK = X, 0i c] e and 0i n O] = e for i c] j\"_ [30]  
Clustering presents an idea of the properties of the groups rather than the individuals within them. Recently, clustering methods have been used to support comprehension of the software. The software module clustering problem can be established as a search problem and divided into two components--the first one is a representation of the problem for exploring methodologies and the second one is a cost function, or a fitness function, to estimate the quality of solutions [30]. The software module optimization problem is to assign cohesion and coupling values, trying to achieve maximum cohesion and low coupling. We define the cohesion relationship \(A_{i}\) of cluster \(i\) with \(N_{i}\) components and \(\mu_{i}\) intra-edge dependencies [31] as follows:  
\[\text{Maximizing }A_{i}=\frac{\mu_{i}}{N_{i}^{2}}, \tag{1}\]  
Coupling between the \(i\)-th cluster and the \(j\)-th cluster is expressed by \(E_{ij}\) after the software module is clustered [29]:  
\[\text{Minimizing }E_{ij}= \begin{cases}0\,,&i=j\\ \frac{e_{ij}}{2N_{i}N_{j}},&i\
eq j\end{cases} , \tag{2}\]  
We represent a system's modularization quality (\(MQ\)) as a function that shows the trade-off between interconnectivity and intra-connectivity [31]. Given a model dependency graph partitioned into \(k\) clusters, where \(A_{i}\) is the intra-connectivity of the \(i\)-th cluster, and \(E_{ij}\) is the interconnectivity between the \(i\)-th and \(j\)-th clusters, we represent \(MQ\) as follows:  
\[MQ= \begin{cases}\frac{\sum_{i=1}^{k}A_{i}}{k}-\frac{\sum_{i=1}^{k}E_{ij}}{\frac {e_{ik}-1}{2}},&\forall k>1\\ A_{i},&k=1\end{cases} , \tag{3}\]  
\(MQ\) establishes a trade-off between interconnectivity and intra-connectivity that re-munerates the creation of highly cohesive clusters and penalizes excessive inter-edge dependencies. The average interconnectivity achieves this trade-off from the average intra-connectivity. \(MQ\) is bound between \(-1\) (no cohesion inside the clusters) and \(1\) (no coupling among the clusters) [31]; see Table 1 for notation explanation.