# A Systematic Literature Review on Robust Swarm Intelligence Algorithms in Search-Based Software Engineering

Authors: Alam Zeb; Fakhrud Din; Muhammad Fayaz; Gulzar Mehmood; Kamal Z. Zamli
Journal: Complexity
 (2023)

---

## Abstract

Swarm intelligence algorithms are metaheuristics inspired by the collective behavior of species such as birds, fish, bees, and ants. They are used in many optimization problems due to their simplicity, flexibility, and scalability. These algorithms get the desired convergence during the search by balancing the exploration and exploitation processes. These metaheuristics have applications in various domains such as global optimization, bioinformatics, power engineering, networking, machine learning, image processing, and environmental applications. This paper presents a systematic literature review (SLR) on applications of four swarm intelligence algorithms i.e., grey wolf optimization (GWO), whale optimization algorithms (WOA), Harris hawks optimizer (HHO), and moth-flame optimizer (MFO) in the field of software engineering. It presents an in-depth study of these metaheuristics’ adoption in the field of software engineering. This SLR is mainly comprised of three phases such as planning, conducting, and reporting. This study covers all related studies published from 2014 up to 2022. The study shows that applications of the selected metaheuristics have been utilized in various fields of software engineering especially software testing, software defect prediction, and software reliability. The study also points out some of the areas where applications of these swarm intelligence algorithms can be utilized. This study may act as a guideline for researchers in improving the current state-of-the-art on generally adopting these metaheuristics in software engineering.


---

## Body

## 1. Introduction

The goal of optimization is to find a solution that either minimizes or maximizes a criterion known as the objective function, fitness function, or cost function. A solution known as a feasible solution or admissible solution is required to solve the objective function under given constraints [1]. An optimization algorithm works iteratively until a specified number of iterations or when a specific amount of time is reached to enhance a given criterion [2].Many real-life optimization problems in engineering, science, and business are complicated and, thus, no exact solutions can be provided in a fair amount of time. To tackle such problems, approximate algorithms are used. Approximate algorithms are further divided into specific heuristics and metaheuristics. Specific heuristics being problem-dependent solve specific problems, whereas metaheuristics are general-purpose strategies used to solve a huge number of optimization problems [3].Generally, metaheuristics solve instances of hard problems through exploration of the search space where the solution is supposed to be found. There are mainly three objectives of metaheuristics: (1) providing a fast solution to a given problem; (2) tackling large problems; and (3) obtaining robust algorithms. Furthermore, metaheuristics are flexible and simple to design as well as implement [3].In Search-Based Software Engineering (SBSE), metaheuristic search techniques are applied to optimization problems in software engineering. The main objective of SBSE is to move problems related to software engineering to machine-based search instead of human-based search. This is accomplished by using various techniques of metaheuristics as well as operations research [4]. Near-optimal solutions are acceptable in various engineering disciplines, and software engineering is no exception. It is due to this fact that metaheuristic techniques are applicable to solving software engineering problems. Thus, difficult problems can be solved using such search-based techniques with acceptable solutions where perfect solutions are infeasible or impossible [5].Various swarm intelligence algorithms such as GWO, WOA, HHO, and MFO algorithms have been applied in numerous domains such as machine learning, networks, engineering optimization, environmental modeling, image processing, power dispatch problems, and medical and bioinformatics [6–9]. Some of the recent nature-inspired metaheuristic algorithms include monarch butterfly optimization (MBO) proposed by Wang et al. [10], slime mould algorithm (SMA) proposed by Li et al. [11], moth search (MS) algorithm proposed by Wang [12], marine predators algorithm (MPA) presented by Faramarzi et al. [13], hunger games search (HGS) presented by Yang et al. [14], and colony predation algorithm (CPA) developed by Tu et al. [15].This paper presents a systematic literature review on applications of four swarm intelligence algorithms, namely, GWO, WOA, HHO, and MFO, in the domain of software engineering. Our motivation comes from the fact that, as per our knowledge, there is no such systematic review available. Also, a review study paper helps researchers with aggregated knowledge on a given topic in one place. Table1 shows various fields in software engineering that utilize these swarm intelligence algorithms. It also points out various areas in software engineering where these algorithms could be utilized. The main contributions of this SLR are as follows:(i)
The SLR presents applications of four swarm-based metaheuristics i.e., GWO, WOA, HHO, and MFO in the field of software engineering.(ii)
The SLR analyzes 46 relevant studies from 2014 to 2022 according to several research questions.(iii)
This study points out new areas in software engineering where the selected metaheuristics could be utilized thus it identifies further research opportunities in the field.Table 1
Swarm intelligence algorithms’ areas of applications in software engineering.
AlgorithmsFields covered by the algorithmGaps to be covered by these algorithmsGWO(i) Software testing(i) Software vulnerability prediction(ii) Software bug/defect prediction(ii) Software organization(iii) System reliability(iii) Software re-modularization(iv) Software requirements analysis(iv) Maintenance/evolution system integration(v) Agile software development(v) Software module clustering(vi) Software effort estimation(vi) Finding good designs(vii) Software project scheduling problem(vii) Reverse and re-engineering through transformation and re-factoring(viii) Software usability(viii) User-based fitness evaluation for aesthetic aspects of software engineering(ix) Next release problem(ix) Avionics software(x) Project cost estimation(x) Automotive software(xi) Software release planning(xi) Software configuration(xii) Software risk management(xii) Software component allocation(xiii) Structural testing(xiv) Mutation testing(xv) Worst-and-best case execution time testing(xvi) Issue of boundary value analysis(xvii) Partition testingWOA(i) Software testing(ii) Software bug/defect prediction(iii) System reliability(iv) Software requirements analysis(v) Software effort estimation(vi) Software project scheduling problem(vii) Next release problemHHO(i) Software testing(ii) Software bug/defect predictionMFO(i) Software testing(ii) Software bug/defect prediction(iii) Software usabilityMany swarm intelligence algorithms are available and are gaining prominence as they offer reasonable solutions to complex problems. These algorithms are mainly inspired by biological systems such as animal-based and insect-based. We have chosen four swarm intelligence algorithms, one from each group, i. e., GWO from animal-based, MFO from insect-based, HHO from bird-based, and WOA from fish-based groups. Also, the selected algorithms are relatively new, therefore, working on these will provide the current state-of-the-art. Moreover, these algorithms are popular among swarm intelligence algorithms, which is obvious from the number of their applications in various fields, including software engineering. Based on the above scenario, we have chosen these four algorithms for our SLR.The Grey Wolf Optimizer is a metaheuristic algorithm that is inspired by grey wolves. It works by mimicking grey wolves in nature, such as their leadership hierarchy and hunting mechanism. Similarly, WOA is a nature-inspired metaheuristic optimization algorithm that mimics the social behavior of humpback whales. The bubble-net hunting strategy is the main inspiration for WOA. The third metaheuristic algorithm included in our study is HHO, which is a nature-inspired and population-based swarm intelligence algorithm. It is inspired by the chasing style and cooperative behavior of Harris’ hawks in nature, known as surprise pounce. The fourth and last swarm intelligence algorithm included in our study is also a nature-inspired optimization algorithm called the MFO algorithm. Transverse orientation, the navigation method of moths in nature, is the main inspiration for this algorithm.Recent applications of the GWO include Al-Momani et al. [16] used GWO to optimize the fixed parameters of the supercritical power plant (SCPP). Results were compared with GA which confirmed the superiority of GWO over GA for parameter identification of the SCPP model. Hao and Sobhani [17] utilized chaotic GWO to identify important functional parameters of solid oxide fuel cells. The adaptive GWO was applied to a 5 kW dynamic tubular stack. The result showed significant performance compared with existing well-known methods for optimization. Bardhan et al. [18] proposed a hybrid approach based on GWO and an artificial neural network (ANN) to find the load-carrying capability of concrete-filled steel tube (CFST) columns. The author also employed an enhanced version of GWO (EGWO) and created two hybrid models, ANN-AGWO and ANN-EGWO, to estimate CFST columns’ load-carrying capacity. According to the results, the ANN-AGWO outperformed other methods. Dhar et al. [19] proposed a modified GWO for parameter tuning of the model of a direct deposition process of austenitic steel that utilizes the technique of extreme gradient boost. Results showed GWO’s performance in tuning the parameters of the eth model was satisfactory. Yin and Sun [20] introduced distributed multi-objective GWO (DMOGWO) to solve the large-scale multi-area interconnected power systems (LMIPSs) problems. Results confirmed the better performance of the proposed method in solving LMIPS problems.It is worth noting that these optimization methods do not guarantee the best solution, and since these are mostly used in NP-hard problems, they offer near-optimal solutions. Moreover, these metaheuristics come with their shortcomings, such as trapping in local optima. To avoid being trapped in local optima, various solutions have been proposed by offering variants of these metaheuristics, such as Hu et al. [21] tried to overcome GWO’s shortcomings by developing a variant of GWO. The proposed GWOCMALOL uses CMAES, levy flight, and orthogonal learning strategies. According to the results, the proposed algorithm outperformed the original algorithm by resolving its shortcomings.This paper is organized as follows: An overview of GWO is presented in theOverview section. The adopted research methodology is discussed in the Methodology section. Results obtained from the review study are presented in the Results section. Section Discussion summarizes the SLR and provides insights obtained from the study. Section Threats to Validity outlines the potential threats to validity. Finally, the Conclusion section concludes the literature review work.


## 2. Overview

This section presents an overview of the swarm intelligence algorithms included in our study. It explores sources of inspiration as well as mathematical models of these algorithms.


### 2.1. Grey Wolf Optimizer (GWO)

The Grey Wolf Optimizer is an instance of a swarm intelligence technique that is inspired by the social hierarchy as well as the hunting behavior of the grey wolf (Canis lupus) of the Canidae family. They stay at the top of the food chain, being apex predators. They usually live in packs with an average size of 5 to 12 wolves. The group dictates a strict social dominant hierarchy [6, 22]. A multi-objective variant of the same algorithm, the Muli-Objective Grey Wolf Optimizer (MOGWO), is proposed by Mirjalili [23] for optimization of problems having more than one objective.At the top of the hierarchy is the alpha, which leads the group. Beta, the subordinate wolves are next to alpha in the social hierarchy. They help the alphas with making decisions as well as other activities. In case the alpha becomes too old or passes away, the beta becomes the alpha. At the bottom of the hierarchy are the omega wolves, which are dominated by other dominant wolves. The fourth type in the hierarchy is delta, which has dominance over the omega but submits to alpha and beta. Delta wolves include caretakers, hunters, sentinels, scouts, and elders [22].Like their social hierarchy, grey wolves also exhibit interesting social behavior during group hunting. They follow a set of efficient steps during group hunting, such as chasing, encircling, harassing, and attacking the prey. This behavior enables them to control big prey [6, 22]. Figure 1 shows the flowchart of GWO.Figure 1
Flowchart of Grey Wolf Optimization (GWO) algorithm.


### 2.2. Mathematical Model of GWO

This section presents the mathematical models of the social behavior of grey wolves such as encircling and hunting the prey [22].


#### 2.2.1. Encircling the Prey

The encircling behavior of grey wolves is depicted mathematically by the following equations:(1)D⟶=C⟶.Xp⟶t−X⟶t,(2)X⟶t+1=Xp⟶−A⟶.D⟶,where the current iteration is shown by t, grey wolf’s position vector is indicated by X⟶ and position vector of prey is indicated by Xp⟶. A⟶ and C⟶ represent the coefficient vectors calculated as follows:(3)A⟶=2a⟶.r1⟶−a⟶,(4)C⟶=2.r2⟶,where r1 and r2 are random vectors in the range 0,1 while components of a⟶ are decreased from 2 to 0 linearly as iterations proceed.


#### 2.2.2. Hunting

In a given abstract search space, the best candidate solution is supposed to be alpha whereas beta, and delta are supposed to know the prey’s potential location i. e., the best solution. The top three solutions obtained are saved. Other search agents such as omegas update their positions according to the position of the best search agents. This concept is depicted mathematically by the following equations:(5)Dα⟶=C1⟶.Xα⟶−X⟶,Dβ⟶=C2⟶.Xβ⟶−X⟶,Dδ⟶=C3⟶.Xδ⟶−X⟶,X1⟶=Xα⟶−A1⟶.Dα⟶,X2⟶=Xβ⟶−A2⟶.Dβ⟶,X3⟶=Xδ⟶−A3⟶.Dδ⟶,where Dα⟶,Dβ⟶ and Dδ⟶ are vectors showing distance between prey’s location X⟶ and alpha, beta, and delta, respectively.Xα⟶,Xβ⟶ and Xδ⟶represent the position vectors of alpha, beta and delta respectively. X1⟶,X2⟶ and X3⟶ represent the next location of alpha, beta, and delta, respectively. Whereas, C1⟶,C2⟶,C3⟶,A1⟶,A2⟶ and A3⟶ are coefficient vectors defined by equations (3) and (4)(6)X⟶t+1=X1⟶+X2⟶+X3⟶3,where X⟶t+1 represent the next location of the prey i.e., the average of the best three solutions so far to be obliged by other search agents such as omega for updating their position.


### 2.3. Whale Optimization Algorithm (WOA)

WOA is a nature-inspired metaheuristic optimization algorithm proposed by Mirjalili and Lewis [24] in 2016 which mimics the social behavior of humpback whales. The bubble-net hunting strategy is the main inspiration for WOA. The Whale optimization algorithm is a nature-inspired metaheuristic optimization algorithm proposed by Mirjalili and Lewis [24] in 2016 which mimics the social behavior of humpback whales. Whales feel emotions and are considered intelligent animals. Humpback whales (Megaptera novaeangliae) are among the biggest baleen whales. An adult humpback whale almost grows to the size of a school bus.The humpback whales follow an interesting special hunting method known as the bubble-net feeding method. Small fish and schools of krill are the preferred prey of humpback whales. They forage by creating distinctive bubbles along a “9”-shaped or circle. Their two maneuvers related to bubbles are named “upward-spirals” and “double-loops”. In “upward-spirals” the humpback whales take dives and create bubbles in a spiral shape around the prey, whereas “double-loops” consists of three stages: coral loop, lobtail, and capture loop [24].


### 2.4. Mathematical Model of WOA

This section presents the mathematical model of the unique foraging behavior of humpback whales such as searching for prey, encircling prey, and spiral bubble-net feeding maneuver [24].


#### 2.4.1. Encircling the Prey

The following equations mathematically depict the encircling behavior of humpback whales:(7)D⟶=C⟶.X∗⟶t−X⟶tX⟶t+1=X∗⟶t−A⟶.D⟶,where the current iteration is shown by t, X⟶ represents the position vector, and X∗ represents the the position vector of the optimal solution.The following equations calculate vectorsA⟶ and C⟶ as(8)A⟶=2a⟶.r⟶−a⟶,(9)C⟶=2.r⟶,where r⟶ is a random vectors in the range 0,1 while a⟶ decreases from 2 to 0 linearly as iterations proceed.


#### 2.4.2. Bubble-Net Attacking Method

The bubble-net behavior represents the exploitation phase. It is modeled mathematically by using two approaches as follows:(1)Shrinking Encircling Mechanism. To achieve this behavior, the value of a⟶ in equation (8) is decreased which further decreases the fluctuation range of A⟶.(2)Spiral Updating Position. In this approach, the distance between the whale and prey is calculated first. Positions of whale and prey are represented by X,Y and ,X∗,Y∗, respectively. Then the helix-shaped movement of humpback whales is mimicked using the spiral equation as follows:(10)X⟶t+1=D′⟶.ebl.cos2πl+X∗⟶t,where D′⟶=X∗⟶t−X⟶t shows the ith whale’s distance to the prey i.e., the optimal solution so far, b defines the logarithmic spiral’s shape, l indicates a random number in the range −1,1, whereas “.” indicates element-wise multiplication.The following equation models the foraging behavior of humpback whales by assuming a50% probability each for the shrinking encircling mechanism and the spiral model to update the whales’ position during the optimization process:(11)X⟶t+1=X∗⟶t−A⟶.D⟶,ifp<0.5,D′⟶.ebl.cos2πl+X∗⟶t,ifp≥0.5,where p indicates a random number in the range [0, 1].


#### 2.4.3. Search for Prey

The humpback whales also search randomly for prey. This random search represents the exploration phase. Unlike the exploitation phase, the position of a search agent in the exploration phase is updated randomly as opposed to the optimal search agent found so far. This mechanism as well asA⟶>1 enables the WOA algorithm for a global search. The following equation presents the mathematical model:(12)D⟶=C⟶.Xrand⟶−X⟶,X⟶t+1=Xrand⟶−A⟶.D⟶,where Xrand⟶ represents a random position vector i.e., a random whale out of the current population.


### 2.5. Harris Hawks Optimizer (HHO)

The next metaheuristic algorithm included in our study is HHO, which is a nature-inspired and population-based swarm intelligence algorithm proposed by Heidari et al. [25] in 2019. It is inspired by the chasing style and cooperative behavior of Harris’ hawks (Parabuteo unicinctus) in nature, known as surprise pounce. The Harris’ hawks are considered intelligent birds and are found in the southern half of Arizona, USA.To capture prey, Harris’ hawks use “surprise pounce” as the main strategy. This tactic is also called the “seven kills” strategy. Using this strategy, the detected rabbit is attacked from different directions, and the hawks concurrently converge on the escaping rabbit. The “seven kills” approach may take seconds or several minutes to capture prey depending on its escaping capabilities. Harris’ hawks demonstrate various chasing styles based on the escaping patterns of prey as well as the circumstances [25].


### 2.6. Mathematical Model of HHO

This section mathematically models the exploratory as well as exploitative phases of the HHO algorithm inspired by various hunting strategies of Harris’ hawks [25].


#### 2.6.1. Exploration Phase

The following equation models the exploration mechanism of HHO. The perch behavior in HHO is based on two strategies (1) perch based on the positions of other members, which is modeled in equation (13) [ref] for the condition of q<0.5, or (2) random perch on tall trees, which is modeled in Equation (13) for the condition of q≥0.5.(13)Xt+1=Xrandt−r1Xrandt−2r2Xt,ifq≥0.5,Xrabbitt−Xmt−r3LB+r4UB−LB,ifq<0.5,whereXt+1 represents hawks’ position vector in the next iteration t, Xrabbitt represents rabbit’s position, Xt represents hawks’ current position vector, r1, r2, r3, r4, and q represent random numbers inside in the range (0,1), LB and UB represent variables’ upper and lower bounds, Xrandt shows a hawk randomly selected out of the current population, and average position of hawks’ current population is represented by Xm which is defined by equation 14:(14)Xmt=1N∑i=1NXit,where Xit represents each hawks’ location in iteration t and the total number of hawks is represented by N.During the escape, the prey’s energy decreases considerably which can be modeled mathematically as(15)E=2E01−tT,where E shows the prey’s escaping energy, T represents the maximum number of allowed iterations, and E0 represents the initial energy.


#### 2.6.2. Exploitation Phase

Harris’ hawks attack by performing a surprise pounce on the prey. However, prey often succeeds in escaping, which gives rise to various chasing styles. Based on the chasing strategies as well as escaping behaviors, HHO has four strategies to model the attacking stage. Supposer represents the prey’s escape chance, r<0.5 means successful escape while r≥0.5 shows unsuccessful escape before surprise pounce. A hard or soft besiege is performed by the hawks to catch the prey. Here, the parameter E is utilized to decide between soft and hard besiege processes. The soft besiege is performed when E≥0.5 and when E≤0.5, the hard besiege takes place.(1)Soft Besiege. The behavior is performed when r≥0.5 and E≥0.5 as modeled by the following rules:(16)Xt+1=ΔXt−E|JXrabbitt−Xt|,ΔXt=Xrabbitt−Xt,where ΔXtrepresents the difference between the rabbit’s position vector and the current location in iteration t, r5 represents a random number in the range (0,1), and J=21−r5 randomly presents the rabbit’s jumping strength during the escaping procedure.(2)Hard Besiege. When r≥0.5 and E<0.5, the prey has low escaping energy. In this scenario, the following equation updates the current positions:(17)Xt+1=Xrabbitt−EΔXt.(3)Soft Besiege with Progressive Rapid Dives. When E≥0.5 and r<0.5, the rabbit’s energy level is still high enough for a successful escape. Thus, prior to surprise pounce, a soft besiege is constructed. The following equation updates the hawks’ position in the soft besiege phase:(18)Xt+1=Y,ifFY<FXt,Z,ifFZ<FXt,where Y and Z are obtained using equations (19) and (20) respectively as follows:(19)Y=Xrabbitt−EJXrabbitt−Xt,(20)Z=Y+S×LFD,where D represents the dimension of the problem and S represents a random vector by size 1×D and LF represents the levy flight function defined by equation (21).(21)LFx=0.01×u×σv1/β,σ=Γ1+β×sinπβ/2Γ1+β/2×β×2β−1/21/β,where u, v represents random values in the range (0,1) and β represents a default constant with the value 1.5.(4)Hard Besiege with Progressive Rapid Dives. When E<0.5 and r<0.5, a hard besiege is constructed before the surprise pounce as the rabbit lacks the energy to escape. The following equation models the hard besiege condition:(22)Xt+1=Y,ifFY<FXt,Z,ifFZ<FXt,where Y and Z are defined by equations (23) and (24), respectively,(23)Y=Xrabbitt−EJXrabbitt−Xmt,(24)Z=Y+S×LFD,where Xmt is defined by equation (14).


### 2.7. Moth-Flame Optimizer (MFO)

Another swarm intelligence algorithm included in our study is also a nature-inspired optimization proposed by Mirjalili [26] in 2015 called the MFO algorithm. Transverse orientation, the navigation method of moths in nature, is the main inspiration for this algorithm. Moths are butterfly-like insects with over 160,000 different species.Moths have an interesting navigation method at night. They utilize moonlight when flying at night using a mechanism known as transverse orientation. Using this method, a moth flies in a straight path by maintaining a fixed angle with respect to the moon. This is an effective method that guarantees flying in a straight line [26].However, moths are observed flying spirally around the lights. This is because the transverse orientation only works when the light is far away, like the moon. Using artificial lights, they want to keep a similar angle with the light to fly in a straight line. However, this behavior only creates a useless and deadly spiral fly path for moths. In the end, they converge toward the light. The Mothflame optimization algorithm is inspired by this behavior [26].


### 2.8. Mathematical Model of MFO

MFO is consisted of moths and flames. Moths as search agents are represented in a matrix as follows:(25)M=m1,1m1,2……m1,dm2,1m2,2……m2,d⋮⋮⋮⋮⋮mn,1mn,2……mn,d,where n represents the number of moths and d represents the dimension.Also, an array is used to store the fitness of the corresponding moth as follows:(26)OM=OM1OM2⋮OMn,where n represents the number of moths.Furthermore, the best positions discovered by moths are represented as flames which are stored matrixF and their fitness value is stored in an array OF.The spiral moment of moths around flames is modeled as follows:(27)SMi,Fj=Di.ebt.cos2πt+Fj,where Di shows the distance of the ith moth for the jth flame, b is a constant which define the logarithmic spiral’s shape, and t indicates a random number in the range −1,1.D is defined by the following equation:(28)Di=Fj−Mi,where Mi represents the ith moth and Fj represents the jth flame.For exploitation as well as convergence, the flames decrease in number as depicted in the following equation:(29)flameno=roundN−l∗N−1T,where the current number of iteration is represented by l, maximum number of flames are shown by N, and the maximum number of iterations is shown by T.


## 2.1. Grey Wolf Optimizer (GWO)

The Grey Wolf Optimizer is an instance of a swarm intelligence technique that is inspired by the social hierarchy as well as the hunting behavior of the grey wolf (Canis lupus) of the Canidae family. They stay at the top of the food chain, being apex predators. They usually live in packs with an average size of 5 to 12 wolves. The group dictates a strict social dominant hierarchy [6, 22]. A multi-objective variant of the same algorithm, the Muli-Objective Grey Wolf Optimizer (MOGWO), is proposed by Mirjalili [23] for optimization of problems having more than one objective.At the top of the hierarchy is the alpha, which leads the group. Beta, the subordinate wolves are next to alpha in the social hierarchy. They help the alphas with making decisions as well as other activities. In case the alpha becomes too old or passes away, the beta becomes the alpha. At the bottom of the hierarchy are the omega wolves, which are dominated by other dominant wolves. The fourth type in the hierarchy is delta, which has dominance over the omega but submits to alpha and beta. Delta wolves include caretakers, hunters, sentinels, scouts, and elders [22].Like their social hierarchy, grey wolves also exhibit interesting social behavior during group hunting. They follow a set of efficient steps during group hunting, such as chasing, encircling, harassing, and attacking the prey. This behavior enables them to control big prey [6, 22]. Figure 1 shows the flowchart of GWO.Figure 1
Flowchart of Grey Wolf Optimization (GWO) algorithm.


## 2.2. Mathematical Model of GWO

This section presents the mathematical models of the social behavior of grey wolves such as encircling and hunting the prey [22].


### 2.2.1. Encircling the Prey

The encircling behavior of grey wolves is depicted mathematically by the following equations:(1)D⟶=C⟶.Xp⟶t−X⟶t,(2)X⟶t+1=Xp⟶−A⟶.D⟶,where the current iteration is shown by t, grey wolf’s position vector is indicated by X⟶ and position vector of prey is indicated by Xp⟶. A⟶ and C⟶ represent the coefficient vectors calculated as follows:(3)A⟶=2a⟶.r1⟶−a⟶,(4)C⟶=2.r2⟶,where r1 and r2 are random vectors in the range 0,1 while components of a⟶ are decreased from 2 to 0 linearly as iterations proceed.


### 2.2.2. Hunting

In a given abstract search space, the best candidate solution is supposed to be alpha whereas beta, and delta are supposed to know the prey’s potential location i. e., the best solution. The top three solutions obtained are saved. Other search agents such as omegas update their positions according to the position of the best search agents. This concept is depicted mathematically by the following equations:(5)Dα⟶=C1⟶.Xα⟶−X⟶,Dβ⟶=C2⟶.Xβ⟶−X⟶,Dδ⟶=C3⟶.Xδ⟶−X⟶,X1⟶=Xα⟶−A1⟶.Dα⟶,X2⟶=Xβ⟶−A2⟶.Dβ⟶,X3⟶=Xδ⟶−A3⟶.Dδ⟶,where Dα⟶,Dβ⟶ and Dδ⟶ are vectors showing distance between prey’s location X⟶ and alpha, beta, and delta, respectively.Xα⟶,Xβ⟶ and Xδ⟶represent the position vectors of alpha, beta and delta respectively. X1⟶,X2⟶ and X3⟶ represent the next location of alpha, beta, and delta, respectively. Whereas, C1⟶,C2⟶,C3⟶,A1⟶,A2⟶ and A3⟶ are coefficient vectors defined by equations (3) and (4)(6)X⟶t+1=X1⟶+X2⟶+X3⟶3,where X⟶t+1 represent the next location of the prey i.e., the average of the best three solutions so far to be obliged by other search agents such as omega for updating their position.


## 2.2.1. Encircling the Prey

The encircling behavior of grey wolves is depicted mathematically by the following equations:(1)D⟶=C⟶.Xp⟶t−X⟶t,(2)X⟶t+1=Xp⟶−A⟶.D⟶,where the current iteration is shown by t, grey wolf’s position vector is indicated by X⟶ and position vector of prey is indicated by Xp⟶. A⟶ and C⟶ represent the coefficient vectors calculated as follows:(3)A⟶=2a⟶.r1⟶−a⟶,(4)C⟶=2.r2⟶,where r1 and r2 are random vectors in the range 0,1 while components of a⟶ are decreased from 2 to 0 linearly as iterations proceed.


## 2.2.2. Hunting

In a given abstract search space, the best candidate solution is supposed to be alpha whereas beta, and delta are supposed to know the prey’s potential location i. e., the best solution. The top three solutions obtained are saved. Other search agents such as omegas update their positions according to the position of the best search agents. This concept is depicted mathematically by the following equations:(5)Dα⟶=C1⟶.Xα⟶−X⟶,Dβ⟶=C2⟶.Xβ⟶−X⟶,Dδ⟶=C3⟶.Xδ⟶−X⟶,X1⟶=Xα⟶−A1⟶.Dα⟶,X2⟶=Xβ⟶−A2⟶.Dβ⟶,X3⟶=Xδ⟶−A3⟶.Dδ⟶,where Dα⟶,Dβ⟶ and Dδ⟶ are vectors showing distance between prey’s location X⟶ and alpha, beta, and delta, respectively.Xα⟶,Xβ⟶ and Xδ⟶represent the position vectors of alpha, beta and delta respectively. X1⟶,X2⟶ and X3⟶ represent the next location of alpha, beta, and delta, respectively. Whereas, C1⟶,C2⟶,C3⟶,A1⟶,A2⟶ and A3⟶ are coefficient vectors defined by equations (3) and (4)(6)X⟶t+1=X1⟶+X2⟶+X3⟶3,where X⟶t+1 represent the next location of the prey i.e., the average of the best three solutions so far to be obliged by other search agents such as omega for updating their position.


## 2.3. Whale Optimization Algorithm (WOA)

WOA is a nature-inspired metaheuristic optimization algorithm proposed by Mirjalili and Lewis [24] in 2016 which mimics the social behavior of humpback whales. The bubble-net hunting strategy is the main inspiration for WOA. The Whale optimization algorithm is a nature-inspired metaheuristic optimization algorithm proposed by Mirjalili and Lewis [24] in 2016 which mimics the social behavior of humpback whales. Whales feel emotions and are considered intelligent animals. Humpback whales (Megaptera novaeangliae) are among the biggest baleen whales. An adult humpback whale almost grows to the size of a school bus.The humpback whales follow an interesting special hunting method known as the bubble-net feeding method. Small fish and schools of krill are the preferred prey of humpback whales. They forage by creating distinctive bubbles along a “9”-shaped or circle. Their two maneuvers related to bubbles are named “upward-spirals” and “double-loops”. In “upward-spirals” the humpback whales take dives and create bubbles in a spiral shape around the prey, whereas “double-loops” consists of three stages: coral loop, lobtail, and capture loop [24].


## 2.4. Mathematical Model of WOA

This section presents the mathematical model of the unique foraging behavior of humpback whales such as searching for prey, encircling prey, and spiral bubble-net feeding maneuver [24].


### 2.4.1. Encircling the Prey

The following equations mathematically depict the encircling behavior of humpback whales:(7)D⟶=C⟶.X∗⟶t−X⟶tX⟶t+1=X∗⟶t−A⟶.D⟶,where the current iteration is shown by t, X⟶ represents the position vector, and X∗ represents the the position vector of the optimal solution.The following equations calculate vectorsA⟶ and C⟶ as(8)A⟶=2a⟶.r⟶−a⟶,(9)C⟶=2.r⟶,where r⟶ is a random vectors in the range 0,1 while a⟶ decreases from 2 to 0 linearly as iterations proceed.


### 2.4.2. Bubble-Net Attacking Method

The bubble-net behavior represents the exploitation phase. It is modeled mathematically by using two approaches as follows:(1)Shrinking Encircling Mechanism. To achieve this behavior, the value of a⟶ in equation (8) is decreased which further decreases the fluctuation range of A⟶.(2)Spiral Updating Position. In this approach, the distance between the whale and prey is calculated first. Positions of whale and prey are represented by X,Y and ,X∗,Y∗, respectively. Then the helix-shaped movement of humpback whales is mimicked using the spiral equation as follows:(10)X⟶t+1=D′⟶.ebl.cos2πl+X∗⟶t,where D′⟶=X∗⟶t−X⟶t shows the ith whale’s distance to the prey i.e., the optimal solution so far, b defines the logarithmic spiral’s shape, l indicates a random number in the range −1,1, whereas “.” indicates element-wise multiplication.The following equation models the foraging behavior of humpback whales by assuming a50% probability each for the shrinking encircling mechanism and the spiral model to update the whales’ position during the optimization process:(11)X⟶t+1=X∗⟶t−A⟶.D⟶,ifp<0.5,D′⟶.ebl.cos2πl+X∗⟶t,ifp≥0.5,where p indicates a random number in the range [0, 1].


### 2.4.3. Search for Prey

The humpback whales also search randomly for prey. This random search represents the exploration phase. Unlike the exploitation phase, the position of a search agent in the exploration phase is updated randomly as opposed to the optimal search agent found so far. This mechanism as well asA⟶>1 enables the WOA algorithm for a global search. The following equation presents the mathematical model:(12)D⟶=C⟶.Xrand⟶−X⟶,X⟶t+1=Xrand⟶−A⟶.D⟶,where Xrand⟶ represents a random position vector i.e., a random whale out of the current population.


## 2.4.1. Encircling the Prey

The following equations mathematically depict the encircling behavior of humpback whales:(7)D⟶=C⟶.X∗⟶t−X⟶tX⟶t+1=X∗⟶t−A⟶.D⟶,where the current iteration is shown by t, X⟶ represents the position vector, and X∗ represents the the position vector of the optimal solution.The following equations calculate vectorsA⟶ and C⟶ as(8)A⟶=2a⟶.r⟶−a⟶,(9)C⟶=2.r⟶,where r⟶ is a random vectors in the range 0,1 while a⟶ decreases from 2 to 0 linearly as iterations proceed.


## 2.4.2. Bubble-Net Attacking Method

The bubble-net behavior represents the exploitation phase. It is modeled mathematically by using two approaches as follows:(1)Shrinking Encircling Mechanism. To achieve this behavior, the value of a⟶ in equation (8) is decreased which further decreases the fluctuation range of A⟶.(2)Spiral Updating Position. In this approach, the distance between the whale and prey is calculated first. Positions of whale and prey are represented by X,Y and ,X∗,Y∗, respectively. Then the helix-shaped movement of humpback whales is mimicked using the spiral equation as follows:(10)X⟶t+1=D′⟶.ebl.cos2πl+X∗⟶t,where D′⟶=X∗⟶t−X⟶t shows the ith whale’s distance to the prey i.e., the optimal solution so far, b defines the logarithmic spiral’s shape, l indicates a random number in the range −1,1, whereas “.” indicates element-wise multiplication.The following equation models the foraging behavior of humpback whales by assuming a50% probability each for the shrinking encircling mechanism and the spiral model to update the whales’ position during the optimization process:(11)X⟶t+1=X∗⟶t−A⟶.D⟶,ifp<0.5,D′⟶.ebl.cos2πl+X∗⟶t,ifp≥0.5,where p indicates a random number in the range [0, 1].


## 2.4.3. Search for Prey

The humpback whales also search randomly for prey. This random search represents the exploration phase. Unlike the exploitation phase, the position of a search agent in the exploration phase is updated randomly as opposed to the optimal search agent found so far. This mechanism as well asA⟶>1 enables the WOA algorithm for a global search. The following equation presents the mathematical model:(12)D⟶=C⟶.Xrand⟶−X⟶,X⟶t+1=Xrand⟶−A⟶.D⟶,where Xrand⟶ represents a random position vector i.e., a random whale out of the current population.


## 2.5. Harris Hawks Optimizer (HHO)

The next metaheuristic algorithm included in our study is HHO, which is a nature-inspired and population-based swarm intelligence algorithm proposed by Heidari et al. [25] in 2019. It is inspired by the chasing style and cooperative behavior of Harris’ hawks (Parabuteo unicinctus) in nature, known as surprise pounce. The Harris’ hawks are considered intelligent birds and are found in the southern half of Arizona, USA.To capture prey, Harris’ hawks use “surprise pounce” as the main strategy. This tactic is also called the “seven kills” strategy. Using this strategy, the detected rabbit is attacked from different directions, and the hawks concurrently converge on the escaping rabbit. The “seven kills” approach may take seconds or several minutes to capture prey depending on its escaping capabilities. Harris’ hawks demonstrate various chasing styles based on the escaping patterns of prey as well as the circumstances [25].


## 2.6. Mathematical Model of HHO

This section mathematically models the exploratory as well as exploitative phases of the HHO algorithm inspired by various hunting strategies of Harris’ hawks [25].


### 2.6.1. Exploration Phase

The following equation models the exploration mechanism of HHO. The perch behavior in HHO is based on two strategies (1) perch based on the positions of other members, which is modeled in equation (13) [ref] for the condition of q<0.5, or (2) random perch on tall trees, which is modeled in Equation (13) for the condition of q≥0.5.(13)Xt+1=Xrandt−r1Xrandt−2r2Xt,ifq≥0.5,Xrabbitt−Xmt−r3LB+r4UB−LB,ifq<0.5,whereXt+1 represents hawks’ position vector in the next iteration t, Xrabbitt represents rabbit’s position, Xt represents hawks’ current position vector, r1, r2, r3, r4, and q represent random numbers inside in the range (0,1), LB and UB represent variables’ upper and lower bounds, Xrandt shows a hawk randomly selected out of the current population, and average position of hawks’ current population is represented by Xm which is defined by equation 14:(14)Xmt=1N∑i=1NXit,where Xit represents each hawks’ location in iteration t and the total number of hawks is represented by N.During the escape, the prey’s energy decreases considerably which can be modeled mathematically as(15)E=2E01−tT,where E shows the prey’s escaping energy, T represents the maximum number of allowed iterations, and E0 represents the initial energy.


### 2.6.2. Exploitation Phase

Harris’ hawks attack by performing a surprise pounce on the prey. However, prey often succeeds in escaping, which gives rise to various chasing styles. Based on the chasing strategies as well as escaping behaviors, HHO has four strategies to model the attacking stage. Supposer represents the prey’s escape chance, r<0.5 means successful escape while r≥0.5 shows unsuccessful escape before surprise pounce. A hard or soft besiege is performed by the hawks to catch the prey. Here, the parameter E is utilized to decide between soft and hard besiege processes. The soft besiege is performed when E≥0.5 and when E≤0.5, the hard besiege takes place.(1)Soft Besiege. The behavior is performed when r≥0.5 and E≥0.5 as modeled by the following rules:(16)Xt+1=ΔXt−E|JXrabbitt−Xt|,ΔXt=Xrabbitt−Xt,where ΔXtrepresents the difference between the rabbit’s position vector and the current location in iteration t, r5 represents a random number in the range (0,1), and J=21−r5 randomly presents the rabbit’s jumping strength during the escaping procedure.(2)Hard Besiege. When r≥0.5 and E<0.5, the prey has low escaping energy. In this scenario, the following equation updates the current positions:(17)Xt+1=Xrabbitt−EΔXt.(3)Soft Besiege with Progressive Rapid Dives. When E≥0.5 and r<0.5, the rabbit’s energy level is still high enough for a successful escape. Thus, prior to surprise pounce, a soft besiege is constructed. The following equation updates the hawks’ position in the soft besiege phase:(18)Xt+1=Y,ifFY<FXt,Z,ifFZ<FXt,where Y and Z are obtained using equations (19) and (20) respectively as follows:(19)Y=Xrabbitt−EJXrabbitt−Xt,(20)Z=Y+S×LFD,where D represents the dimension of the problem and S represents a random vector by size 1×D and LF represents the levy flight function defined by equation (21).(21)LFx=0.01×u×σv1/β,σ=Γ1+β×sinπβ/2Γ1+β/2×β×2β−1/21/β,where u, v represents random values in the range (0,1) and β represents a default constant with the value 1.5.(4)Hard Besiege with Progressive Rapid Dives. When E<0.5 and r<0.5, a hard besiege is constructed before the surprise pounce as the rabbit lacks the energy to escape. The following equation models the hard besiege condition:(22)Xt+1=Y,ifFY<FXt,Z,ifFZ<FXt,where Y and Z are defined by equations (23) and (24), respectively,(23)Y=Xrabbitt−EJXrabbitt−Xmt,(24)Z=Y+S×LFD,where Xmt is defined by equation (14).


## 2.6.1. Exploration Phase

The following equation models the exploration mechanism of HHO. The perch behavior in HHO is based on two strategies (1) perch based on the positions of other members, which is modeled in equation (13) [ref] for the condition of q<0.5, or (2) random perch on tall trees, which is modeled in Equation (13) for the condition of q≥0.5.(13)Xt+1=Xrandt−r1Xrandt−2r2Xt,ifq≥0.5,Xrabbitt−Xmt−r3LB+r4UB−LB,ifq<0.5,whereXt+1 represents hawks’ position vector in the next iteration t, Xrabbitt represents rabbit’s position, Xt represents hawks’ current position vector, r1, r2, r3, r4, and q represent random numbers inside in the range (0,1), LB and UB represent variables’ upper and lower bounds, Xrandt shows a hawk randomly selected out of the current population, and average position of hawks’ current population is represented by Xm which is defined by equation 14:(14)Xmt=1N∑i=1NXit,where Xit represents each hawks’ location in iteration t and the total number of hawks is represented by N.During the escape, the prey’s energy decreases considerably which can be modeled mathematically as(15)E=2E01−tT,where E shows the prey’s escaping energy, T represents the maximum number of allowed iterations, and E0 represents the initial energy.


## 2.6.2. Exploitation Phase

Harris’ hawks attack by performing a surprise pounce on the prey. However, prey often succeeds in escaping, which gives rise to various chasing styles. Based on the chasing strategies as well as escaping behaviors, HHO has four strategies to model the attacking stage. Supposer represents the prey’s escape chance, r<0.5 means successful escape while r≥0.5 shows unsuccessful escape before surprise pounce. A hard or soft besiege is performed by the hawks to catch the prey. Here, the parameter E is utilized to decide between soft and hard besiege processes. The soft besiege is performed when E≥0.5 and when E≤0.5, the hard besiege takes place.(1)Soft Besiege. The behavior is performed when r≥0.5 and E≥0.5 as modeled by the following rules:(16)Xt+1=ΔXt−E|JXrabbitt−Xt|,ΔXt=Xrabbitt−Xt,where ΔXtrepresents the difference between the rabbit’s position vector and the current location in iteration t, r5 represents a random number in the range (0,1), and J=21−r5 randomly presents the rabbit’s jumping strength during the escaping procedure.(2)Hard Besiege. When r≥0.5 and E<0.5, the prey has low escaping energy. In this scenario, the following equation updates the current positions:(17)Xt+1=Xrabbitt−EΔXt.(3)Soft Besiege with Progressive Rapid Dives. When E≥0.5 and r<0.5, the rabbit’s energy level is still high enough for a successful escape. Thus, prior to surprise pounce, a soft besiege is constructed. The following equation updates the hawks’ position in the soft besiege phase:(18)Xt+1=Y,ifFY<FXt,Z,ifFZ<FXt,where Y and Z are obtained using equations (19) and (20) respectively as follows:(19)Y=Xrabbitt−EJXrabbitt−Xt,(20)Z=Y+S×LFD,where D represents the dimension of the problem and S represents a random vector by size 1×D and LF represents the levy flight function defined by equation (21).(21)LFx=0.01×u×σv1/β,σ=Γ1+β×sinπβ/2Γ1+β/2×β×2β−1/21/β,where u, v represents random values in the range (0,1) and β represents a default constant with the value 1.5.(4)Hard Besiege with Progressive Rapid Dives. When E<0.5 and r<0.5, a hard besiege is constructed before the surprise pounce as the rabbit lacks the energy to escape. The following equation models the hard besiege condition:(22)Xt+1=Y,ifFY<FXt,Z,ifFZ<FXt,where Y and Z are defined by equations (23) and (24), respectively,(23)Y=Xrabbitt−EJXrabbitt−Xmt,(24)Z=Y+S×LFD,where Xmt is defined by equation (14).


## 2.7. Moth-Flame Optimizer (MFO)

Another swarm intelligence algorithm included in our study is also a nature-inspired optimization proposed by Mirjalili [26] in 2015 called the MFO algorithm. Transverse orientation, the navigation method of moths in nature, is the main inspiration for this algorithm. Moths are butterfly-like insects with over 160,000 different species.Moths have an interesting navigation method at night. They utilize moonlight when flying at night using a mechanism known as transverse orientation. Using this method, a moth flies in a straight path by maintaining a fixed angle with respect to the moon. This is an effective method that guarantees flying in a straight line [26].However, moths are observed flying spirally around the lights. This is because the transverse orientation only works when the light is far away, like the moon. Using artificial lights, they want to keep a similar angle with the light to fly in a straight line. However, this behavior only creates a useless and deadly spiral fly path for moths. In the end, they converge toward the light. The Mothflame optimization algorithm is inspired by this behavior [26].


## 2.8. Mathematical Model of MFO

MFO is consisted of moths and flames. Moths as search agents are represented in a matrix as follows:(25)M=m1,1m1,2……m1,dm2,1m2,2……m2,d⋮⋮⋮⋮⋮mn,1mn,2……mn,d,where n represents the number of moths and d represents the dimension.Also, an array is used to store the fitness of the corresponding moth as follows:(26)OM=OM1OM2⋮OMn,where n represents the number of moths.Furthermore, the best positions discovered by moths are represented as flames which are stored matrixF and their fitness value is stored in an array OF.The spiral moment of moths around flames is modeled as follows:(27)SMi,Fj=Di.ebt.cos2πt+Fj,where Di shows the distance of the ith moth for the jth flame, b is a constant which define the logarithmic spiral’s shape, and t indicates a random number in the range −1,1.D is defined by the following equation:(28)Di=Fj−Mi,where Mi represents the ith moth and Fj represents the jth flame.For exploitation as well as convergence, the flames decrease in number as depicted in the following equation:(29)flameno=roundN−l∗N−1T,where the current number of iteration is represented by l, maximum number of flames are shown by N, and the maximum number of iterations is shown by T.


## 3. Research Methodology

This Systematic Literature Review (SLR) follows the proposed methodology of Kitchenham and Charters [27]. Various discrete activities comprise our work. These activities can be divided into three phases, such as planning, conducting, and reporting the SLR. The first phase, namely, planning of the study is comprised of the research questions addressed by the SLR, identifying the data sources, forming the search strategy, data extraction process, and synthesis.


### 3.1. Research Questions

This systematic literature review explores the applications of GWO, WOA, HHO, and MFO in software engineering. Specification of research questions (RQs) is an essential part of any SLR. For the accomplishment of the SLR, the following RQs are included:RQ1: What is the evaluation of studies published on the GWO, WOA, HHO, and MFO algorithms in software engineering?RQ2: What are the applications of GWO, WOA, HHO, and MFO in software engineering?RQ3: Which individuals, organizations, and countries are actively involved in searched-based software engineering using GWO, WOA, HHO, and MFO?RQ4: What are the potential applications of GWO, WOA, HHO, and MFO in software engineering?


### 3.2. Data Sources and Search Strategy

Based on [28], our search string incorporates two essential search terms, namely, “Creature Name” and “Domain”. The first term mentions algorithms such as GWO, WOA, HHO, and MFO inspired by the social behavior of grey wolves, humpback whales, Harris’ hawks, and moths, respectively. The second term describes the fields where the social behavior of grey wolves has been mimicked, such as software engineering. This term is accompanied by appropriate synonyms.The Boolean AND has been used to combine the major search terms of our search string, whereas the Boolean OR has been used to incorporate the synonyms as well as related terms. The following is the search string used in our SLR.(“grey wolf optimizer,” OR, GWO, OR “whale optimization algorithm,” OR, WOA, OR “Harris hawks optimization,” OR, HHO, OR “moth-flame optimization” OR MFO) AND (“software engineering” OR “software development” OR “software testing” OR “requirements engineering” OR “usability engineering” OR software OR testing).For the accumulation of related publications, academic data sources such as IEEExplore, ACM Digital Library, SpringerLink, and ScienceDirect have been searched. Most of our publications of interest came from using Google Scholar. Publications and contributions came from journals, books, and conferences.This SLR includes full-text studies citing GWO, WOA, HHO, and MFO in software engineering and was published from 2014 until 2022. Major search terms must be part of each study. Furthermore, the written language of these publications must be English. The titles and abstracts of these papers are investigated to ensure they fit the SLR. Personal blogs, web pages, and studies that do not cite the mentioned swarm intelligence algorithms are excluded from the SLR. The exclusion and inclusion criteria for the selection of studies are summarized in Figure2.Figure 2
Summary of selection criteria.


### 3.3. Data Extraction and Synthesis

To address the research questions, this section explores the strategy of extracting and analyzing data from selected studies. A list comprised of various data items is obtained from the selected studies. Table2 presents the recorded information which will be used for providing answers to the research questions (RQs). Also, the individual data items associated with the relevant research questions are shown in Table 2.Table 2
Data items from selected studies for recording information.
IDData itemDescriptionRelevant RQD1Year of publicationWhat is publication year of the article?RQ1D2Name of authorWho are the authors of the article?RQ1D3Title of paperWhat is the article’s title?RQ1D4Subject areaThe published article explores which knowledge area?RQ1D5Document typeThe article belongs to which document type?RQ1D6SourceWhat is the article’s source such as journal, conference, or book?RQ1D7Swarm based intelligenceWhat swarm-based intelligence algorithms are involved in search-based software engineering?RQ2D8Case studyWhich case study is explored in the paper?RQ2D9AffiliationThe study is published in which affiliated institutes/organizations?RQ3D10CountryWhich country has the research institute that has published the study?RQ3D11ApplicationWhat are the potential applications of GWO, WOA, HHO, and MFO in software engineering?RQ4We applied the search string to various digital libraries such as IEEExplore, ACM Digital Library, SpringerLink, and ScienceDirect and obtained 68, 24, 275, and 2270 studies, respectively. We also used Google Scholar and using a search string, 2446 studies were obtained. Our search provided a total of 5083 studies, as shown in Table3. Primary studies were obtained from the search results by using the PRISMA flow diagram as shown in Figure 3.Table 3
Databases with number of published studies.
IDDatabaseObtained studiesElectronic database’s web linkDB1IEEExplore68https://ieeexplore.ieee.orgDB2ACM digital library24https://dl.acm.orgDB3SpringerLink275https://link.springer.comDB4ScienceDirect2270https://www.sciencedirect.comDB5Google scholar2446https://scholar.google.comFigure 3
PRISMA flow diagram for selection of primary studies.The PRISMA flow diagram consists of various steps such as identification, screening, eligibility, and inclusion, as depicted in Figure3. All studies are identified through electronic databases by using the search string in the first step, i. e., identification. A total of 5083 studies have been identified. In the second step, namely, screening, irrelevant and grey studies are removed and outcomes in 103 studies are based on the inclusion and exclusion criterion 1. Duplicate studies were removed based on exclusion criterion 2, which resulted in 68 studies. More studies are excluded based on exclusion criteria 3 and 4 and we are left with 54 studies. In the eligibility step, 48 studies are found to be eligible. After reading these 48 studies, they are found to be relevant and are considered primary studies for this SLR. However, Section Quality assessment criteria further assesses the selected papers based on quality assessment criteria.


### 3.4. Quality assessment Criteria

After the implementation of inclusion and exclusion criteria, a quality assessment for each study is performed to determine its credibility as well as relevance. Being a supplementary criterion, it helps in excluding studies having low quality based on some given weights and certain thresholds. The following questions are used to determine the quality assessment criteria:Q1. Does the research state its aims clearly?Q2. Does the research compare its proposed estimation method with existing methods?Q3. Does the study analyze its limitations explicitly?Q4. Does the study have citations?Each question is assigned a weight of 0.25. Since there are a total of four questions, therefore, the combined weight is 1. Thus the total score for a single study can be given as:0.00 (No)0.25 (Rarely)0.50 (Partly)0.75 (Mostly)1.00 (Yes)Based on the abovementioned criterion, a study is included if it scores 0.5 or above, which means out of the four given assessment criteria, it must fulfill at least two.As a result of the application of this quality assessment, 02 more studies are discarded with a 0.25 (rarely) score each. In other words, all the studies with an assigned score of “partly, mostly, and yes” are included in the SLR. Finally, 46 studies were selected for this SLR. Scores based on quality assessment criteria for the selected studies are given in Table4. The authors shared the same opinion throughout the selection process.Table 4
Selected papers with quality assessment scores.
StudyScoreS1MostlyS2MostlyS3PartlyS4YesS5PartlyS6MostlyS7MostlyS8MostlyS9MostlyS10MostlyS11MostlyS12PartlyS13MostlyS14MostlyS15YesS16MostlyS17MostlyS18PartlyS19MostlyS20PartlyS21PartlyS22MostlyS23PartlyS24PartlyS25MostlyS26PartlyS27MostlyS28MostlyS29YesS30MostlyS31MostlyS32MostlyS33YesS34PartlyS35MostlyS36MostlyS37MostlyS38MostlyS39MostlyS40MostlyS41MostlyS42MostlyS43MostlyS44MostlyS45MostlyS46Mostly


## 3.1. Research Questions

This systematic literature review explores the applications of GWO, WOA, HHO, and MFO in software engineering. Specification of research questions (RQs) is an essential part of any SLR. For the accomplishment of the SLR, the following RQs are included:RQ1: What is the evaluation of studies published on the GWO, WOA, HHO, and MFO algorithms in software engineering?RQ2: What are the applications of GWO, WOA, HHO, and MFO in software engineering?RQ3: Which individuals, organizations, and countries are actively involved in searched-based software engineering using GWO, WOA, HHO, and MFO?RQ4: What are the potential applications of GWO, WOA, HHO, and MFO in software engineering?


## 3.2. Data Sources and Search Strategy

Based on [28], our search string incorporates two essential search terms, namely, “Creature Name” and “Domain”. The first term mentions algorithms such as GWO, WOA, HHO, and MFO inspired by the social behavior of grey wolves, humpback whales, Harris’ hawks, and moths, respectively. The second term describes the fields where the social behavior of grey wolves has been mimicked, such as software engineering. This term is accompanied by appropriate synonyms.The Boolean AND has been used to combine the major search terms of our search string, whereas the Boolean OR has been used to incorporate the synonyms as well as related terms. The following is the search string used in our SLR.(“grey wolf optimizer,” OR, GWO, OR “whale optimization algorithm,” OR, WOA, OR “Harris hawks optimization,” OR, HHO, OR “moth-flame optimization” OR MFO) AND (“software engineering” OR “software development” OR “software testing” OR “requirements engineering” OR “usability engineering” OR software OR testing).For the accumulation of related publications, academic data sources such as IEEExplore, ACM Digital Library, SpringerLink, and ScienceDirect have been searched. Most of our publications of interest came from using Google Scholar. Publications and contributions came from journals, books, and conferences.This SLR includes full-text studies citing GWO, WOA, HHO, and MFO in software engineering and was published from 2014 until 2022. Major search terms must be part of each study. Furthermore, the written language of these publications must be English. The titles and abstracts of these papers are investigated to ensure they fit the SLR. Personal blogs, web pages, and studies that do not cite the mentioned swarm intelligence algorithms are excluded from the SLR. The exclusion and inclusion criteria for the selection of studies are summarized in Figure2.Figure 2
Summary of selection criteria.


## 3.3. Data Extraction and Synthesis

To address the research questions, this section explores the strategy of extracting and analyzing data from selected studies. A list comprised of various data items is obtained from the selected studies. Table2 presents the recorded information which will be used for providing answers to the research questions (RQs). Also, the individual data items associated with the relevant research questions are shown in Table 2.Table 2
Data items from selected studies for recording information.
IDData itemDescriptionRelevant RQD1Year of publicationWhat is publication year of the article?RQ1D2Name of authorWho are the authors of the article?RQ1D3Title of paperWhat is the article’s title?RQ1D4Subject areaThe published article explores which knowledge area?RQ1D5Document typeThe article belongs to which document type?RQ1D6SourceWhat is the article’s source such as journal, conference, or book?RQ1D7Swarm based intelligenceWhat swarm-based intelligence algorithms are involved in search-based software engineering?RQ2D8Case studyWhich case study is explored in the paper?RQ2D9AffiliationThe study is published in which affiliated institutes/organizations?RQ3D10CountryWhich country has the research institute that has published the study?RQ3D11ApplicationWhat are the potential applications of GWO, WOA, HHO, and MFO in software engineering?RQ4We applied the search string to various digital libraries such as IEEExplore, ACM Digital Library, SpringerLink, and ScienceDirect and obtained 68, 24, 275, and 2270 studies, respectively. We also used Google Scholar and using a search string, 2446 studies were obtained. Our search provided a total of 5083 studies, as shown in Table3. Primary studies were obtained from the search results by using the PRISMA flow diagram as shown in Figure 3.Table 3
Databases with number of published studies.
IDDatabaseObtained studiesElectronic database’s web linkDB1IEEExplore68https://ieeexplore.ieee.orgDB2ACM digital library24https://dl.acm.orgDB3SpringerLink275https://link.springer.comDB4ScienceDirect2270https://www.sciencedirect.comDB5Google scholar2446https://scholar.google.comFigure 3
PRISMA flow diagram for selection of primary studies.The PRISMA flow diagram consists of various steps such as identification, screening, eligibility, and inclusion, as depicted in Figure3. All studies are identified through electronic databases by using the search string in the first step, i. e., identification. A total of 5083 studies have been identified. In the second step, namely, screening, irrelevant and grey studies are removed and outcomes in 103 studies are based on the inclusion and exclusion criterion 1. Duplicate studies were removed based on exclusion criterion 2, which resulted in 68 studies. More studies are excluded based on exclusion criteria 3 and 4 and we are left with 54 studies. In the eligibility step, 48 studies are found to be eligible. After reading these 48 studies, they are found to be relevant and are considered primary studies for this SLR. However, Section Quality assessment criteria further assesses the selected papers based on quality assessment criteria.


## 3.4. Quality assessment Criteria

After the implementation of inclusion and exclusion criteria, a quality assessment for each study is performed to determine its credibility as well as relevance. Being a supplementary criterion, it helps in excluding studies having low quality based on some given weights and certain thresholds. The following questions are used to determine the quality assessment criteria:Q1. Does the research state its aims clearly?Q2. Does the research compare its proposed estimation method with existing methods?Q3. Does the study analyze its limitations explicitly?Q4. Does the study have citations?Each question is assigned a weight of 0.25. Since there are a total of four questions, therefore, the combined weight is 1. Thus the total score for a single study can be given as:0.00 (No)0.25 (Rarely)0.50 (Partly)0.75 (Mostly)1.00 (Yes)Based on the abovementioned criterion, a study is included if it scores 0.5 or above, which means out of the four given assessment criteria, it must fulfill at least two.As a result of the application of this quality assessment, 02 more studies are discarded with a 0.25 (rarely) score each. In other words, all the studies with an assigned score of “partly, mostly, and yes” are included in the SLR. Finally, 46 studies were selected for this SLR. Scores based on quality assessment criteria for the selected studies are given in Table4. The authors shared the same opinion throughout the selection process.Table 4
Selected papers with quality assessment scores.
StudyScoreS1MostlyS2MostlyS3PartlyS4YesS5PartlyS6MostlyS7MostlyS8MostlyS9MostlyS10MostlyS11MostlyS12PartlyS13MostlyS14MostlyS15YesS16MostlyS17MostlyS18PartlyS19MostlyS20PartlyS21PartlyS22MostlyS23PartlyS24PartlyS25MostlyS26PartlyS27MostlyS28MostlyS29YesS30MostlyS31MostlyS32MostlyS33YesS34PartlyS35MostlyS36MostlyS37MostlyS38MostlyS39MostlyS40MostlyS41MostlyS42MostlyS43MostlyS44MostlyS45MostlyS46Mostly


## 4. Results

This section provides answers to the RQs by analyzing the selected studies. Detailed outcomes of the literature analysis are presented in this section.Frequency of published studies based on GWO, WOA, HHO, and MFO in software engineering (RQ1).The identified studies are analyzed to find out the frequency as well as the advancement of publications based on the selected metaheuristics in software engineering. Figure4 shows year-wise publication of the selected studies with an average of 05 studies per year. The figure also shows the increased number of publications in recent years. Many research studies indicate that variants of the selected metaheuristics have been used in software engineering, as depicted in Table5. Figure 5 illustrates the type of selected publications. According to the figure, 76% are articles, 22% are inproceeding, and 2% are incollection of the identified studies. Figure 6 illustrates various fields in software engineering in the identified publications. Table 6 shows various journals and conferences associated with the identified research work. It is evident from Table 6 that 4 papers have been published in “IEEE Access”, 2 papers each have been published in Springer and “International Journal of Intelligent Engineering and Systems,” while one paper each has been published in the rest of the journals and conferences.Figure 4
Frequency of published study by year.Table 5
Summary of the selected metaheuristics’ variants used in software engineering.
VariantShort nameEffectiveness compared withEfficiency/performance evaluated/validated byCase studyPublication yearAuthors [ref.]Chaotic grey wolf optimization algorithmCGWOGWO, PSO, GA, and WOPham-Zhang (PZ) model and testing effort functions (TEFs)Parameter optimization of software reliability growth model2021Dhavakumar and gopalan [29]Grey Wolf-FireFly methodGWFFBCA, PSO, and CSMean time between failures (MTBF)Software test case mechanism2019Rastogi [30]Agile risk prioritization–grey wolf optimizationARP-GWOExisting agileUsability goals achievement metric (UGAM) and index of integration (IoI)Risk prioritization in agile software development2021Prakash and viswanathan [31]Modified grey wolf optimizationMGWOGWO, MBBAT, MWOA, and MMFOSoftware development life cycle (SDLC) modelsSoftware usability2021Jain [32]Multi-objective grey wolf optimizerMOGWONSGA2, MOTLBO, and SPEA28 quality indicators, i.e., fairness indicators, uncertainty indicators, and multi-objective optimizations indicators (MOO)Multi objective next realease problem (MONRP)2021Ghasemi [33]Improved grey wolf optimizerIGWOGWOReal world failure datasets, statistical comparison metricsParameter estimation of software reliability growth models (SRGMs)2021Musa [34]Hybrid grey wolf optimizerHGWOPSO, ABC, DABC, CGA, and MGATwo groups of datasetsParameter estimation of software reliability growth models (SRGMs)2019Alneamyand dabdoob [35]Whale and grey wolf optimization algorithmWGWReplacement access, library and ID card project (RALIC) datasetRALIC datasetPrioritization of software requirements2018Masadeh et al. [36]Enhanced binary harris hawk optimization algorithmEBHHOBGOA, ESBHHO, BALO, BWOA, BBA, BGSA, and GADatasets in the field of software fault prediction (SFP)Software fault prediction2020Thaher and arman [37]Island binary moth flame optimizationIsBMFOBMFO21 public software datasetsSoftware defect prediction2021Khurma et al. [38]Moth firefly algorithmMFAMFO and FA5 object-oriented benchmark applicationsPath testing2020Sharma and saha [39]Enhanced binary moth flame optimizationEBMFOBGOA, BGSA, WOA, BBA, and BALO15 different software fault projects obtained from PROMISE public software engineering repositorySoftware fault prediction2020Tumar et al. [40]Modified mothflame optimizationMMFOMFO, BBAT, and MBBATThe dataset with 23 featuresUsability feature selection2020Gupta et al. [41]Modified whale optimization algorithmMWOAWOA, GWO, PSO, and DABC34 benchmark functionParameter estimation of SRGMs2021Lu and ma [42]Hybrid whale optimization algorithmHWOABAT and ACOSubject programs retrieved from the software artifact infrastructure repositoryRegression test case selection2020Agrawal et al. [43]Ambha_Whale optimization algorithmAmbha_WOAWOA12 test case suites taken from GitHub and SIR repositoriesTest case suite selection2022Jyoti and sharma [44]Tournament selection method with binary WOATBWOABGWO, BGSA, BPSO, BALO, BBA, and BSSA17 SFP datasets from the PROMISE repositorySoftware fault prediction2021Hassouneh et al. [45]Multi-objective whale optimization algorithmMOWOANSGA2, MOTLBO, and SPEA28 quality indicators i.e., fairness indicators, uncertainty indicators, and multi-objective optimizations indicators (MOO)Multi objective next release problem (MONRP)2021Ghasemi [33]Modified whale optimization algorithmMWOAWOA3 real measured test/debug data setsParameter estimation of SRGMs2018Lu and ma [46]Figure 5
Document type of identified studies.Figure 6
Ratio of identified studies by various fields in software engineering.Table 6
Number of papers published in various journals or conferences.
Name of journal or conferenceNo of published studiesIEEE Access4International Journal of Intelligent Engineering & Systems2Springer22016 IEEE 27th International Symposium on Software Reliability Engineering (ISSRE)12018 17th International Symposium on Distributed Computing and Applications for Business Engineering and Science (DCABES)12018 9th International Conference on Information and Communication Systems (ICICS)12020 10th International Conference on Cloud Computing, Data Science & Engineering12020 11th International Conference on Information and Communication Systems (ICICS)12020 6th International Engineering Conference “Sustainable Technology and Development”(IEC)12021 11th International Conference on Cloud Computing, Data Science & Engineering (Confluence)12021 16th International Conference on Emerging Technologies (ICET)12021 5th International Conference on Intelligent Systems, Metaheuristics & Swarm Intelligence1Advances in Systems Science and Applications1Applied Intelligence1Cluster Computing1Computing1International Journal for Research in Applied Science and Engineering Technology1International Journal of Advanced Computer Science and Applications1International Journal of Applied Metaheuristic Computing (IJAMC)1International Journal of Artificial Intelligence and Applications (IJAIA)1International Journal of Computer Applications1International Journal of Computer Applications in Technology1International Journal of Distributed Systems and Technologies (IJDST)1International Journal of Recent Research and Review1International Journal of Recent Technology and Engineering (IJRTE)1IOP Conference Series: Materials Science and Engineering1Journal of Algorithms & Computational Technology1Journal of Ambient Intelligence and Humanized Computing1Journal of Information and Optimization Sciences1Journal of Intelligent & Fuzzy Systems1Journal of Systems and Software1Mathematics1Modern Applied Science1Soft Computing1Soft computing for problem solving1Soft Computing Methods for System Dependability1Software: practice and experience1Specialusis Ugdymas1TELKOMNIKA (Telecommunication Computing Electronics and Control)1Webology1Wireless Communications and Mobile Computing1


### 4.1. Applications of GWO, WOA, HHO, and MFO in Software Engineering (RQ2)

The identified studies discuss various applications of the selected metaheuristics, i.e., GWO, WOA, HHO, and MFO, in software engineering. Figure7 shows the selected algorithms used by our study. It is clear from the figure that GWO tops the list with 51%, WOA comes second with 30%, while MFO and HHO are at third and fourth positions with 13% and 6% respectively. Table 7 summarizes these applications. The following paragraphs discuss these applications in detail.Figure 7
Swarm intelligence algorithm used by the identified studies.Table 7
Summary of selected metaheuristics’ applications.
Application areaNo. of publications[Ref.]Software testing14[30, 39, 43, 44, 47–56]Software bug/defect prediction9[37, 38, 40, 45, 57–61]System reliability8[29, 34, 35, 42, 46, 62–64]Software requirements analysis3[36, 65, 66]Agile software development2[31, 67]Software effort estimation2[68, 69]Software project scheduling problem2[70, 71]Software usability2[32, 41]Next release problem1[33]Software release planning1[72]Project cost estimation1[73]Software release planning1[72]Software risk management1[74]Altaie et al. [47] generated a test suite to increase the coverage of paths based on GWO and PSO. According to the results, the PSO algorithm performed better than the GWO algorithm. Jyoti and Sharma [44] proposed an enhanced version of WOA (Ambha_WOA) using 12 test case suites obtained from SIR and GitHub repositories. The new algorithm was compared with WOA using various performance metrics such as fault detection ratio metric, precision and recall, and classification accuracy. NP-statistical tests were conducted for result validation. Wang and Zhao [56] used WOA with chaos initialization for the automatic test case generation method. By using the improved WOA, the method aimed at one path at a time for optimizing the population as well as finding the optimal value. Kaur [51] utilized HHO for extracting the optimal test cases. Sharma and Saha [39] combined MFO and the Firefly Algorithm (FA) for test path generation. The authors used five object-oriented benchmark applications for verification. The full coverage of the path was confirmed by the results. Agrawal et al. [43] used a hybrid WOA for the regression test case selection approach. The proposed approach improved the fault detection ability as per the obtained results. Hassan et al. [55] utilized WOA for t-way test suite generation with constraint support. Results confirmed competitive outcomes for WOA as compared with existing metaheuristics. Harikarthik et al. [54] used the regression test case prioritization mechanism for generating test cases. Then, they used the kernel fuzzy c-means (KFCM) clustering technique for clustering the test cases. They utilized WOA for the weight optimization process. Rastogi [30] used the GWO and FA (GWFF) methods to optimize the Test Case (TC) and generate path coverage in less execution time. The GWFF showed better performance in terms of fitness values when compared with Particle Swarm Optimization (PSO), Bee Colony Algorithm (BCA), and Cuckoo Search (CS). Sunitha [49] proposed a technique that makes use of optimal test prioritization in the Cloud using KFCM to overcome the shortcomings of various algorithms and to find an accurate optimization of existing software applications. The technique has two steps. Firstly, the KFCM technique was applied based on a similarity feature in organizing the test cases in software applications. Secondly, GWO was applied to achieve an optimal solution. Sharma and Saha [53] used MFO for model-based software testing based on object orientation. According to the results, for large software applications, MFO outperformed other metaheuristics, i.e., FA and ACO in creating optimized test cases. Metwally [52] used MFO to create a technique for automatic test data generation which in a single run could generate the whole test suite. According to the results, the new technique outperformed the random generator. Badanahatti and Murthy [48] used cloud-based regression testing. The proposed technique has three stages, namely, test case generation, clustering, and test case prioritization. As per the results, the proposed method preceded the minimum implementation time of the available technique. Gupta and Gupta [50] utilized Biographical Based Optimization (BBO) and GWO in test suite prioritization as well as minimization. The performance was then evaluated with other metaheuristic algorithms.Rhmann [57] utilized GWO and random forest (RF) for predicting software vulnerability. According to the results, the proposed technique, i.e., GW-RF, outperformed machine learning techniques for software vulnerability prediction. Mohammad et al. [59] proposed a multi-objective HHO for binary classification problems using the Adaptive Synthetic Sampling (ADASYN) Technique. The authors used a healthcare dataset. Results confirmed the significant performance of the proposed model. Almayyan [58] evaluated different feature selection algorithms such as GWO, CS, Bat, and PSO for the prediction of software defects. The NASA dataset benchmarks were analyzed using three clustering algorithms such as X-Means, Farthest First, and Self Organizing Map (SOM). The proposed clustering model was used to build an efficient predictive model with an acceptable number of features as well as a good detection rate. Khurma et al. [38] proposed a binary variant of MFO (BMFO) by using the island BMFO (IsBMFO) model for the software defect prediction (SDP) problem. Results showed that IsBMFO, followed by support vector machine (SVM) classification, outperformed other models for the SDP problem, with an average G-mean of 78%. Alsghaier and Akour [60] developed an approach for software fault prediction by combining the genetics algorithm (GA) with the SVM classifier and WOA. It was then applied to 24 datasets, and the results confirmed the improved performance of the software fault prediction process. Hassouneh et al. [45] utilized WOA to present an efficient wrapper Feature Selection (FS) approach. The WOA was enhanced with nature selection operators to improve its efficacy in dealing with FS tasks. Zhu et al. [61] developed an enhanced metaheuristic search-based feature selection algorithm named EMWS by utilizing WOA and simulated annealing (SA). The results confirmed the superiority of EMWS. Thaher and Arman [37] proposed an enhanced binary version of HHO (EBHHO) for the FS problem. The authors used the Adaptive Synthetic (ADASYN) oversampling technique to reduce the dimensionality of the dataset using the FS technique. Results showed the superiority of EBHHO over the basic HHO. Tumar et al. [40] proposed an enhanced binary MFO (EBMFO) as a wrapper feature selection with ADASYN for software fault prediction. According to the results, the EBMFO improved the overall performance of classifiers.Dhavakumar and Gopalan [29] used the Chaotic GWO algorithm (CGWO) in the Software Reliability Growth Model (SRGM). SRGM utilizes optimization algorithms to advance the parameters by dividing them into stages. However, by using CGWO, the technique is upgraded by using all the parameters simultaneously. Lu and Ma [42] proposed a modified WOA (MWOA) for predicting software reliability. Using software fault historical data, MWOA is used to predict the faults during software testing. Also, for the accurate estimation of software faults, the authors developed a modified sigmoid model (MSM). Musa [34] adopted the Improved GWO (IGWO) to estimate the optimum parameters for SRGMs. The proposed method utilizes seven real-world failure datasets. As per the results, the proposed method of IGWO performs better than the existing GWO. Gupta et al. [64] applied Random Walk GWO (RW-GWO) to determine the optimal redundancies to optimize the system reliability and the optimum cost of two distinct complex systems with constraints imposed on system reliability. The comparison proved the efficiency of the RW-GWO. Alneamy and Dabdoob [63] proposed the binding of the GA and the GWO algorithms for the estimation of the parameters of SRGMs. According to the results, the proposed binding GWO-RGA performed better than the previous binding HGWO in terms of accuracy of parameter estimation as well as performance using the same datasets. Lu and Ma [46] proposed a modified WOA (MWOA) and a three-stage SRGM. The parameters of three-stage SRGMs are estimated using MWOA. Results showed that using MWOA with the three-stage model is more helpful in estimating the software faults. Salahaldeen et al. [35] estimated the parameters of SRGMs depending on failure data. A hybrid GWO (HGWO) was used by combining the GWO with the Real Coded Genetic Algorithm (RGA). According to the results, all other algorithms, such as PSO, ABC, Classic GA (CGA), the Dichotomous Artificial Bee Colony (DABC), and the Modified GA (MGA), were outperformed by the GWO. Sheta and Abdel-Raouf [62] explored the GWO algorithm to estimate the SRGM’s parameters to minimize the difference between the actual and estimated number of failures of the software. Three different SRGM models, namely, the Power Model (POWM), the Exponential Model (EXPM), and the Delayed S-Shaped Model (DSSM), were evaluated. The study was conducted using three different datasets.Alzaqebah et al. [66] utilized the WOA to prioritize the software requirements. The proposed technique was compared with the analytical hierarchy process (AHP). According to the results, the proposed technique outperformed the AHP technique with an approximate margin of 40%. Masadeh et al. [36] proposed a hybrid approach using WOA and GWO algorithms (WGW) for the prioritization of software requirements. The RALIC dataset was used to evaluate the proposed method. Compared with the RALIC dataset, the proposed method showed 91% accuracy in requirements prioritization. In [65], Masadeh et al. applied GWO to prioritize the requirements of a software project in an ordered list. Results were compared and evaluated with the AHP technique based on average running time and dataset size. According to the results, the RP-GWO performed better than the AHP mechanism by approximately 30%.Prakash and Viswanathan [31] proposed a technique based on Agile Risk Prioritization and GWO (ARP–GWO) for risk prioritization. By using the technique, risk factors were prioritized during the development of agile software. The effectiveness of ARP-GWO was analyzed using performance metrics such as Usability Goals Achievement Metric and Index of Integration. The results showed enhancements in comparison with the available agile process. Also, the author [67] performed a comparative study of five effective metaheuristic algorithms, namely, Ant Colony Optimization (ACO), PSO, GA, GWO, and AHP, to prioritize the risks in agile environments. As per results, GWO performed better in the prioritization of risks in an agile environment based on accuracy, reliability, running time, and error rate.Khan et al. [68] presented a Deep Neural Network (DNN) model based on GWO and StrawBerry Algorithm (SBA) for software effort estimation. Nine benchmark functions were applied to validate the performance of the two algorithms. The proposed DNN model (GWDNNSB) produced better results for learning rate selection and initial weights as compared with the available work. Fadhil and Alsarraj [69] applied the WOA with the Constructive Cost Model II (COCOMO II) to solve the problem of ideal transactions. The NASA 93 dataset was used by the algorithm. The proposed approach based on the Mean Magnitude of Relative Error (MMRE) metric showed the best results.Alabajee et al. [70] explored GWO for solving the software project scheduling problem (SPSP) by seeking an optimum solution. The authors compared results with the intelligent water drop algorithm (IWD), max-min ant system hyper cube framework (MMAS-HC), ACO, FA, intelligent water drop autonomous search (IWDAS), and intelligent water drop algorithm standard version (IWDSTD). According to the results, GWO showed better optimizing performance than the rest of the algorithms. Also, Alreffaee and Alabajee [71] proposed WOA to resolve SPSP by utilizing three datasets. The algorithm gave good results.Jain [32] proposed a modified GWO (MGWO) algorithm for the selection of crucial features in a hierarchical software model. As per the results, MGWO outperformed other relevant optimizers in terms of accuracy. Gupta et al. [41] introduced a modified MFO (MMFO) for usability feature selection. Results confirmed the better performance of the proposed algorithm.Ghasemi [33] proposed a multi-objective version of GWO and WOA by solving the bi-objective next release problem (NRP). The two algorithms with three other evolutionary algorithms were used to solve instances of the NRP problem from four different datasets. To satisfy the constraints of the NRP problem, a roulette wheel, and a cost-to-score ratio were used. According to the results, MOWOA outperformed others whereas, with reduced budget constraints, MOGWO performed better.Hassan and Khan [73] implemented GWO, the Harmony Search Algorithm (HSA), and the SBA for software cost estimation. The NASA dataset was used, and to find a better algorithm, MMRE was utilized. GWO outperformed other algorithms regarding MMRE reduction.Verma et al. [72] presented GWO’s application in software release planning, considering warranty based on the proposed mathematical model used to measure software systems’ reliability growth. The software cost model is based on fault reduction factor, fault removal efficiency, and error generation. The fault dataset of ERP systems was used to validate the model.Prakash and Viswanathan [74] used the GWO algorithm to prioritize the risks involved in software development. The proposed method of software risk prioritization (SRP-GWO) was compared with other techniques such as PSO, AHP, average ranking, categorizing scale, and Delphi. Five attributes, namely, adaptability, simplicity, accuracy, consistency, and running time, were used for evaluation. According to the results, the proposed method outperformed other techniques.


### 4.2. Countries, Organization and Active Individuals Involved in Searched-Based Software Engineering Using GWO, WOA, HHO, and MFO (RQ3)

This study finds active researchers, affiliated organizations and countries involved in research regarding the selected metaheuristics in software engineering. According to the top researchers’ ranking, Abdullah Alzaqebah, Amjad Hudaib, Prakash Balasubramanian, Raja Masadeh, and Viswanathan Vadivel are the topmost researchers with 3 publications each.Anju Saha, Ankur Choudhary, Arun Prakash Agrawal, Deepak K Gupta, Jamal Salahaldeen Alneamy, Kezhong Lu, Marrwa Abd-AlKareem Alabajee, Marwah M. A. Dabdoob, Rashmi Sharma, Taghreed Riyadh Alreffaee and Zongmin Ma have 2 publications each, as shown in Figure8. Top organizations affiliated by authors are also ranked which shows that.Figure 8
The top researchers using GWO in software engineering.“Vellore Institute of Technology, Chennai, India,” “The University of Jordan, Amman, Jordan” and “The World Islamic Sciences and Education University, Amman, Jordan” are at the top with 3 publications each.“University of Mosul, Iraq”, “Maharaja Agrasen Institute of Technology, Delhi, India”, “Nanjing University of Aeronautics and Astronautics, Jiangsu, China” and “Chizhou University, Anhui, China” have 2 publications each as illustrated in Figure9.Figure 9
The top affiliated organizations using GWO in software engineering.Lastly, active countries having the highest number of published articles on selected metaheuristics in software engineering are ranked as per details given in Figure10. According to the ranking, India is the most active country with 20 publications; Iraq is in the 2nd position with 6 publications; Jordan has 5 publications; China and Saudi Arabia have 4 publications each; Pakistan, Egypt, and Palestine have 3 publications each; Iran, Malaysia, and Vietnam have 2 papers each, whereas Brazil, Kuwait, Libya, Nepal, Poland, Portugal, Russia, and the USA have 1 publication each.Figure 10
Active countries using GWO in software engineering.


### 4.3. Potential Applications of GWO, WOA, HHO, and MFO in Software Engineering (RQ4)

Various metaheuristic algorithms are used in different fields of software engineering. Ranichandra [75] utilizes ACO for enhancing estimation accuracy in analogy-based software cost estimation by proposing the non-orthogonal space distance (NoSD) technique. Prajapati and Kumar [76] address the issues related to multiple objective optimization of software re-modularization using a customized version of PSO known as PSO-based multi-objective software remodularization (PSO-MoSR). In [77], Al-Azzoni and Iqbal use GA and ACO to demonstrate a software framework for solving instances of software component allocation problems. In [78], Wang propose a novel hybrid metaheuristic algorithm, CVTMaker, which may help publishers identify ideal crowdsourced virtual teams (CVTs). Sun et al. [79] utilize PSO with a reverse edge known as REPSO for multi-objective software module clustering problem (MOSMCP), which divides the complex software system into subsystems to obtain a perfect structure. Prajapati and Chhabra [80] use PSO-based module clustering (PSOMC) for Software Module Clustering problem. Tang et al. [81] propose two metaheuristic search algorithms, i. e., coordinate descent and genetic algorithms, for exploring the configuration space of Hadoop for high-performing configurations which perform significantly better than the default configuration settings. In [82], Haraty et al. use simulated annealing (SA) for state-based software testing, especially web applications. Mann et al. in [83] propose a path-specific approach for automatic test case generation (ATCG) using GA, PSO, and ABC. In the same paper, another approach, i. e., a test case prioritization (TCP), is also proposed using PSO.Likewise, the selected metaheuristics i. e., GWO, WHOA, HHO, and MFO are used in most areas of software engineering due to their usefulness in terms of simplicity, flexibility, and scalability. They lead to the desired convergence by keeping a good balance between exploration and exploitation, which are the basic search behaviors of metaheuristic algorithms.Applications of GWO, WOA, HHO, and MFO, in software engineering discusses applications of these swarm intelligence algorithms in various fields of software engineering, such as software testing, software reliability, next release problem, agile software development, and software requirements analysis, as given in Table7. Metaheuristics algorithms are useful in optimization; therefore, problems that come under the realm of optimization problems could be solved using metaheuristics such as GWO. The following are some of the areas of software engineering where the applications of the selected swarm intelligence algorithms can potentially be used:(i)
Software vulnerability prediction(ii)
Software organization(iii)
Software re-modularization(iv)
Maintenance/evolution system integration(v)
Software module clustering(vi)
Finding good designs(vii)
Reverse and re-engineering through transformation and re-factoring(viii)
User-based fitness evaluation for aesthetic aspects of software engineering(ix)
Avionics software(x)
Automotive software(xi)
Software configuration(xii)
Software component allocation(xiii)
Software testing(1)
Structural testing(2)
Mutation testing(3)
Worst-and-best case execution time testing(4)
Issue of boundary value analysis(5)
Partition testing


## 4.1. Applications of GWO, WOA, HHO, and MFO in Software Engineering (RQ2)

The identified studies discuss various applications of the selected metaheuristics, i.e., GWO, WOA, HHO, and MFO, in software engineering. Figure7 shows the selected algorithms used by our study. It is clear from the figure that GWO tops the list with 51%, WOA comes second with 30%, while MFO and HHO are at third and fourth positions with 13% and 6% respectively. Table 7 summarizes these applications. The following paragraphs discuss these applications in detail.Figure 7
Swarm intelligence algorithm used by the identified studies.Table 7
Summary of selected metaheuristics’ applications.
Application areaNo. of publications[Ref.]Software testing14[30, 39, 43, 44, 47–56]Software bug/defect prediction9[37, 38, 40, 45, 57–61]System reliability8[29, 34, 35, 42, 46, 62–64]Software requirements analysis3[36, 65, 66]Agile software development2[31, 67]Software effort estimation2[68, 69]Software project scheduling problem2[70, 71]Software usability2[32, 41]Next release problem1[33]Software release planning1[72]Project cost estimation1[73]Software release planning1[72]Software risk management1[74]Altaie et al. [47] generated a test suite to increase the coverage of paths based on GWO and PSO. According to the results, the PSO algorithm performed better than the GWO algorithm. Jyoti and Sharma [44] proposed an enhanced version of WOA (Ambha_WOA) using 12 test case suites obtained from SIR and GitHub repositories. The new algorithm was compared with WOA using various performance metrics such as fault detection ratio metric, precision and recall, and classification accuracy. NP-statistical tests were conducted for result validation. Wang and Zhao [56] used WOA with chaos initialization for the automatic test case generation method. By using the improved WOA, the method aimed at one path at a time for optimizing the population as well as finding the optimal value. Kaur [51] utilized HHO for extracting the optimal test cases. Sharma and Saha [39] combined MFO and the Firefly Algorithm (FA) for test path generation. The authors used five object-oriented benchmark applications for verification. The full coverage of the path was confirmed by the results. Agrawal et al. [43] used a hybrid WOA for the regression test case selection approach. The proposed approach improved the fault detection ability as per the obtained results. Hassan et al. [55] utilized WOA for t-way test suite generation with constraint support. Results confirmed competitive outcomes for WOA as compared with existing metaheuristics. Harikarthik et al. [54] used the regression test case prioritization mechanism for generating test cases. Then, they used the kernel fuzzy c-means (KFCM) clustering technique for clustering the test cases. They utilized WOA for the weight optimization process. Rastogi [30] used the GWO and FA (GWFF) methods to optimize the Test Case (TC) and generate path coverage in less execution time. The GWFF showed better performance in terms of fitness values when compared with Particle Swarm Optimization (PSO), Bee Colony Algorithm (BCA), and Cuckoo Search (CS). Sunitha [49] proposed a technique that makes use of optimal test prioritization in the Cloud using KFCM to overcome the shortcomings of various algorithms and to find an accurate optimization of existing software applications. The technique has two steps. Firstly, the KFCM technique was applied based on a similarity feature in organizing the test cases in software applications. Secondly, GWO was applied to achieve an optimal solution. Sharma and Saha [53] used MFO for model-based software testing based on object orientation. According to the results, for large software applications, MFO outperformed other metaheuristics, i.e., FA and ACO in creating optimized test cases. Metwally [52] used MFO to create a technique for automatic test data generation which in a single run could generate the whole test suite. According to the results, the new technique outperformed the random generator. Badanahatti and Murthy [48] used cloud-based regression testing. The proposed technique has three stages, namely, test case generation, clustering, and test case prioritization. As per the results, the proposed method preceded the minimum implementation time of the available technique. Gupta and Gupta [50] utilized Biographical Based Optimization (BBO) and GWO in test suite prioritization as well as minimization. The performance was then evaluated with other metaheuristic algorithms.Rhmann [57] utilized GWO and random forest (RF) for predicting software vulnerability. According to the results, the proposed technique, i.e., GW-RF, outperformed machine learning techniques for software vulnerability prediction. Mohammad et al. [59] proposed a multi-objective HHO for binary classification problems using the Adaptive Synthetic Sampling (ADASYN) Technique. The authors used a healthcare dataset. Results confirmed the significant performance of the proposed model. Almayyan [58] evaluated different feature selection algorithms such as GWO, CS, Bat, and PSO for the prediction of software defects. The NASA dataset benchmarks were analyzed using three clustering algorithms such as X-Means, Farthest First, and Self Organizing Map (SOM). The proposed clustering model was used to build an efficient predictive model with an acceptable number of features as well as a good detection rate. Khurma et al. [38] proposed a binary variant of MFO (BMFO) by using the island BMFO (IsBMFO) model for the software defect prediction (SDP) problem. Results showed that IsBMFO, followed by support vector machine (SVM) classification, outperformed other models for the SDP problem, with an average G-mean of 78%. Alsghaier and Akour [60] developed an approach for software fault prediction by combining the genetics algorithm (GA) with the SVM classifier and WOA. It was then applied to 24 datasets, and the results confirmed the improved performance of the software fault prediction process. Hassouneh et al. [45] utilized WOA to present an efficient wrapper Feature Selection (FS) approach. The WOA was enhanced with nature selection operators to improve its efficacy in dealing with FS tasks. Zhu et al. [61] developed an enhanced metaheuristic search-based feature selection algorithm named EMWS by utilizing WOA and simulated annealing (SA). The results confirmed the superiority of EMWS. Thaher and Arman [37] proposed an enhanced binary version of HHO (EBHHO) for the FS problem. The authors used the Adaptive Synthetic (ADASYN) oversampling technique to reduce the dimensionality of the dataset using the FS technique. Results showed the superiority of EBHHO over the basic HHO. Tumar et al. [40] proposed an enhanced binary MFO (EBMFO) as a wrapper feature selection with ADASYN for software fault prediction. According to the results, the EBMFO improved the overall performance of classifiers.Dhavakumar and Gopalan [29] used the Chaotic GWO algorithm (CGWO) in the Software Reliability Growth Model (SRGM). SRGM utilizes optimization algorithms to advance the parameters by dividing them into stages. However, by using CGWO, the technique is upgraded by using all the parameters simultaneously. Lu and Ma [42] proposed a modified WOA (MWOA) for predicting software reliability. Using software fault historical data, MWOA is used to predict the faults during software testing. Also, for the accurate estimation of software faults, the authors developed a modified sigmoid model (MSM). Musa [34] adopted the Improved GWO (IGWO) to estimate the optimum parameters for SRGMs. The proposed method utilizes seven real-world failure datasets. As per the results, the proposed method of IGWO performs better than the existing GWO. Gupta et al. [64] applied Random Walk GWO (RW-GWO) to determine the optimal redundancies to optimize the system reliability and the optimum cost of two distinct complex systems with constraints imposed on system reliability. The comparison proved the efficiency of the RW-GWO. Alneamy and Dabdoob [63] proposed the binding of the GA and the GWO algorithms for the estimation of the parameters of SRGMs. According to the results, the proposed binding GWO-RGA performed better than the previous binding HGWO in terms of accuracy of parameter estimation as well as performance using the same datasets. Lu and Ma [46] proposed a modified WOA (MWOA) and a three-stage SRGM. The parameters of three-stage SRGMs are estimated using MWOA. Results showed that using MWOA with the three-stage model is more helpful in estimating the software faults. Salahaldeen et al. [35] estimated the parameters of SRGMs depending on failure data. A hybrid GWO (HGWO) was used by combining the GWO with the Real Coded Genetic Algorithm (RGA). According to the results, all other algorithms, such as PSO, ABC, Classic GA (CGA), the Dichotomous Artificial Bee Colony (DABC), and the Modified GA (MGA), were outperformed by the GWO. Sheta and Abdel-Raouf [62] explored the GWO algorithm to estimate the SRGM’s parameters to minimize the difference between the actual and estimated number of failures of the software. Three different SRGM models, namely, the Power Model (POWM), the Exponential Model (EXPM), and the Delayed S-Shaped Model (DSSM), were evaluated. The study was conducted using three different datasets.Alzaqebah et al. [66] utilized the WOA to prioritize the software requirements. The proposed technique was compared with the analytical hierarchy process (AHP). According to the results, the proposed technique outperformed the AHP technique with an approximate margin of 40%. Masadeh et al. [36] proposed a hybrid approach using WOA and GWO algorithms (WGW) for the prioritization of software requirements. The RALIC dataset was used to evaluate the proposed method. Compared with the RALIC dataset, the proposed method showed 91% accuracy in requirements prioritization. In [65], Masadeh et al. applied GWO to prioritize the requirements of a software project in an ordered list. Results were compared and evaluated with the AHP technique based on average running time and dataset size. According to the results, the RP-GWO performed better than the AHP mechanism by approximately 30%.Prakash and Viswanathan [31] proposed a technique based on Agile Risk Prioritization and GWO (ARP–GWO) for risk prioritization. By using the technique, risk factors were prioritized during the development of agile software. The effectiveness of ARP-GWO was analyzed using performance metrics such as Usability Goals Achievement Metric and Index of Integration. The results showed enhancements in comparison with the available agile process. Also, the author [67] performed a comparative study of five effective metaheuristic algorithms, namely, Ant Colony Optimization (ACO), PSO, GA, GWO, and AHP, to prioritize the risks in agile environments. As per results, GWO performed better in the prioritization of risks in an agile environment based on accuracy, reliability, running time, and error rate.Khan et al. [68] presented a Deep Neural Network (DNN) model based on GWO and StrawBerry Algorithm (SBA) for software effort estimation. Nine benchmark functions were applied to validate the performance of the two algorithms. The proposed DNN model (GWDNNSB) produced better results for learning rate selection and initial weights as compared with the available work. Fadhil and Alsarraj [69] applied the WOA with the Constructive Cost Model II (COCOMO II) to solve the problem of ideal transactions. The NASA 93 dataset was used by the algorithm. The proposed approach based on the Mean Magnitude of Relative Error (MMRE) metric showed the best results.Alabajee et al. [70] explored GWO for solving the software project scheduling problem (SPSP) by seeking an optimum solution. The authors compared results with the intelligent water drop algorithm (IWD), max-min ant system hyper cube framework (MMAS-HC), ACO, FA, intelligent water drop autonomous search (IWDAS), and intelligent water drop algorithm standard version (IWDSTD). According to the results, GWO showed better optimizing performance than the rest of the algorithms. Also, Alreffaee and Alabajee [71] proposed WOA to resolve SPSP by utilizing three datasets. The algorithm gave good results.Jain [32] proposed a modified GWO (MGWO) algorithm for the selection of crucial features in a hierarchical software model. As per the results, MGWO outperformed other relevant optimizers in terms of accuracy. Gupta et al. [41] introduced a modified MFO (MMFO) for usability feature selection. Results confirmed the better performance of the proposed algorithm.Ghasemi [33] proposed a multi-objective version of GWO and WOA by solving the bi-objective next release problem (NRP). The two algorithms with three other evolutionary algorithms were used to solve instances of the NRP problem from four different datasets. To satisfy the constraints of the NRP problem, a roulette wheel, and a cost-to-score ratio were used. According to the results, MOWOA outperformed others whereas, with reduced budget constraints, MOGWO performed better.Hassan and Khan [73] implemented GWO, the Harmony Search Algorithm (HSA), and the SBA for software cost estimation. The NASA dataset was used, and to find a better algorithm, MMRE was utilized. GWO outperformed other algorithms regarding MMRE reduction.Verma et al. [72] presented GWO’s application in software release planning, considering warranty based on the proposed mathematical model used to measure software systems’ reliability growth. The software cost model is based on fault reduction factor, fault removal efficiency, and error generation. The fault dataset of ERP systems was used to validate the model.Prakash and Viswanathan [74] used the GWO algorithm to prioritize the risks involved in software development. The proposed method of software risk prioritization (SRP-GWO) was compared with other techniques such as PSO, AHP, average ranking, categorizing scale, and Delphi. Five attributes, namely, adaptability, simplicity, accuracy, consistency, and running time, were used for evaluation. According to the results, the proposed method outperformed other techniques.


## 4.2. Countries, Organization and Active Individuals Involved in Searched-Based Software Engineering Using GWO, WOA, HHO, and MFO (RQ3)

This study finds active researchers, affiliated organizations and countries involved in research regarding the selected metaheuristics in software engineering. According to the top researchers’ ranking, Abdullah Alzaqebah, Amjad Hudaib, Prakash Balasubramanian, Raja Masadeh, and Viswanathan Vadivel are the topmost researchers with 3 publications each.Anju Saha, Ankur Choudhary, Arun Prakash Agrawal, Deepak K Gupta, Jamal Salahaldeen Alneamy, Kezhong Lu, Marrwa Abd-AlKareem Alabajee, Marwah M. A. Dabdoob, Rashmi Sharma, Taghreed Riyadh Alreffaee and Zongmin Ma have 2 publications each, as shown in Figure8. Top organizations affiliated by authors are also ranked which shows that.Figure 8
The top researchers using GWO in software engineering.“Vellore Institute of Technology, Chennai, India,” “The University of Jordan, Amman, Jordan” and “The World Islamic Sciences and Education University, Amman, Jordan” are at the top with 3 publications each.“University of Mosul, Iraq”, “Maharaja Agrasen Institute of Technology, Delhi, India”, “Nanjing University of Aeronautics and Astronautics, Jiangsu, China” and “Chizhou University, Anhui, China” have 2 publications each as illustrated in Figure9.Figure 9
The top affiliated organizations using GWO in software engineering.Lastly, active countries having the highest number of published articles on selected metaheuristics in software engineering are ranked as per details given in Figure10. According to the ranking, India is the most active country with 20 publications; Iraq is in the 2nd position with 6 publications; Jordan has 5 publications; China and Saudi Arabia have 4 publications each; Pakistan, Egypt, and Palestine have 3 publications each; Iran, Malaysia, and Vietnam have 2 papers each, whereas Brazil, Kuwait, Libya, Nepal, Poland, Portugal, Russia, and the USA have 1 publication each.Figure 10
Active countries using GWO in software engineering.


## 4.3. Potential Applications of GWO, WOA, HHO, and MFO in Software Engineering (RQ4)

Various metaheuristic algorithms are used in different fields of software engineering. Ranichandra [75] utilizes ACO for enhancing estimation accuracy in analogy-based software cost estimation by proposing the non-orthogonal space distance (NoSD) technique. Prajapati and Kumar [76] address the issues related to multiple objective optimization of software re-modularization using a customized version of PSO known as PSO-based multi-objective software remodularization (PSO-MoSR). In [77], Al-Azzoni and Iqbal use GA and ACO to demonstrate a software framework for solving instances of software component allocation problems. In [78], Wang propose a novel hybrid metaheuristic algorithm, CVTMaker, which may help publishers identify ideal crowdsourced virtual teams (CVTs). Sun et al. [79] utilize PSO with a reverse edge known as REPSO for multi-objective software module clustering problem (MOSMCP), which divides the complex software system into subsystems to obtain a perfect structure. Prajapati and Chhabra [80] use PSO-based module clustering (PSOMC) for Software Module Clustering problem. Tang et al. [81] propose two metaheuristic search algorithms, i. e., coordinate descent and genetic algorithms, for exploring the configuration space of Hadoop for high-performing configurations which perform significantly better than the default configuration settings. In [82], Haraty et al. use simulated annealing (SA) for state-based software testing, especially web applications. Mann et al. in [83] propose a path-specific approach for automatic test case generation (ATCG) using GA, PSO, and ABC. In the same paper, another approach, i. e., a test case prioritization (TCP), is also proposed using PSO.Likewise, the selected metaheuristics i. e., GWO, WHOA, HHO, and MFO are used in most areas of software engineering due to their usefulness in terms of simplicity, flexibility, and scalability. They lead to the desired convergence by keeping a good balance between exploration and exploitation, which are the basic search behaviors of metaheuristic algorithms.Applications of GWO, WOA, HHO, and MFO, in software engineering discusses applications of these swarm intelligence algorithms in various fields of software engineering, such as software testing, software reliability, next release problem, agile software development, and software requirements analysis, as given in Table7. Metaheuristics algorithms are useful in optimization; therefore, problems that come under the realm of optimization problems could be solved using metaheuristics such as GWO. The following are some of the areas of software engineering where the applications of the selected swarm intelligence algorithms can potentially be used:(i)
Software vulnerability prediction(ii)
Software organization(iii)
Software re-modularization(iv)
Maintenance/evolution system integration(v)
Software module clustering(vi)
Finding good designs(vii)
Reverse and re-engineering through transformation and re-factoring(viii)
User-based fitness evaluation for aesthetic aspects of software engineering(ix)
Avionics software(x)
Automotive software(xi)
Software configuration(xii)
Software component allocation(xiii)
Software testing(1)
Structural testing(2)
Mutation testing(3)
Worst-and-best case execution time testing(4)
Issue of boundary value analysis(5)
Partition testing


## 5. Discussion

In this paper, we selected four swarm intelligence algorithms, i.e., GWO, WOA, HHO, and MFO, to study their applications in the field of software engineering. Our study presented an in-depth analysis of the applications of these metaheuristics in software engineering from 2014 up to 2022.Our SLR is comprised of three phases, such as planning, conducting, and reporting. In the planning phase, we composed research questions that laid the foundation of our SLR. Data sources were then identified, such as IEEEXplore, ACM Digital Library, Springer Link, and ScienceDirect. We then formed a search strategy for extracting relevant literature. The PRISMA was utilized to obtain the primary studies for the SLR. The PRISMA flow diagram consists of various steps such as identification, screening, eligibility, and inclusion, as shown in Figure3. Using PRISMA, 48 studies were found to be eligible. The identified studies were further subjected to quality assessment criteria and as a result, 2 more papers were dropped. Thus, a total of 46 papers were finally selected for our SLR.According to the identified studies, GWO is the most used metaheuristic algorithm with 51% usage, WOA has 30% usage, MFO has 13% usage, and HHO has 6% usage, as shown in Figure7. Also, our analysis showed that the selected metaheuristics have mostly been used in software testing, software defect prediction, and software reliability as shown in 6. Our study also revealed an increase in recent years in the usage of metaheuristic algorithms in software engineering, as evident in Figure 4. Furthermore, the top journals where the identified studies have been published are “IEEE Access,” “Springer,” and “International Journal of Intelligent Engineering and Systems.”As per the No Free Lunch theorem, no metaheuristic could solve all problems but a specific range of problems. Moreover, metaheuristics are easy to use and implement but they do not always guarantee the solution. To overcome some of the drawbacks of metaheuristics such as being trapped in local optima, researchers have developed variants of the existing metaheuristics as shown in detail in Table5. Despite their shortcomings, metaheuristics are still popular as they provide near-optimal solutions to some of the hard problems such as NP-hard.


### 5.1. Threats to Validity

Various challenges can affect the validity of literature mapping or review studies. The following recommendations and guidelines can be used as compensation for the threats of this study:(i)
Coverage of relevant literature: This study includes publications that cite the selected metaheuristics, i.e., GWO, WOA, HHO, and MFO in software engineering from the time of GWO’s invention to the present time, as GWO is the oldest among the selected swarm intelligence algorithms. New studies using the selected metaheuristics in software engineering published after our submission are beyond the scope of this study.(ii)
Coverage of research questions: The research questions may not cover all the aspects of state-of-the-art research on the selected metaheuristics in software engineering. Brainstorming is used to address this threat by optimally identifying the collection of research questions to cover the current research in this study.


## 5.1. Threats to Validity

Various challenges can affect the validity of literature mapping or review studies. The following recommendations and guidelines can be used as compensation for the threats of this study:(i)
Coverage of relevant literature: This study includes publications that cite the selected metaheuristics, i.e., GWO, WOA, HHO, and MFO in software engineering from the time of GWO’s invention to the present time, as GWO is the oldest among the selected swarm intelligence algorithms. New studies using the selected metaheuristics in software engineering published after our submission are beyond the scope of this study.(ii)
Coverage of research questions: The research questions may not cover all the aspects of state-of-the-art research on the selected metaheuristics in software engineering. Brainstorming is used to address this threat by optimally identifying the collection of research questions to cover the current research in this study.


## 6. Conclusion

This paper presented an in-depth literature study based on various applications of the selected metaheuristics, i.e., GWO, WOA, HHO, and MFO in the field of software engineering. The review study analyzed 46 papers published from 2014 to 2022 mentioning applications of the selected metaheuristics in the field of software engineering. Variants of the selected metaheuristics were also included in this study. This paper analyzed the selected papers according to the research questions of our SLR. This paper has mentioned countries, organizations, and authors actively involved in applying these metaheuristics in the field of software engineering. The paper has also presented a detailed discussion on various applications of the selected metaheuristics in software engineering which revealed that these algorithms have mostly been used in software testing, software defect prediction, and software reliability. The study also pointed out areas of software engineering where these algorithms could be utilized. Hopefully, the current study may be helpful for new researchers using these swarm intelligence algorithms in software engineering for further enhancements.



---

*Source: 4577581-2023-02-23.xml*