Complex network theory has been successfully introduced into the field of software engineering. Many works in the literature have built complex networks in software, usually called software networks, to represent software structure. Such software networks and their related graph algorithms have been proved effective in predicting software bugs. However, the software networks used were unweighted and undirected, neglecting the strength and direction of the couplings. Worse still, they ignored many important types of couplings between classes, such as local variable, instantiates, and access. All of these greatly affect the accuracy of the software network in representing the topological detail of software projects and ultimately affect the metrics derived from it. In this work, an improved effort-aware bug prediction approach named CoreBug is proposed. First, CoreBug uses a weighted directed class dependency network (WDCDN) to precisely describe classes and their couplings, including nine coupling types and their different coupling strengths and directions. Second, a generalized k-core decomposition is introduced to compute the coreness of each class in the WDCDN. Third, CoreBug combines the coreness of each class with its relative risk, as returned by the logistic regression, to quantify the risk of a given class being buggy. Empirical results on eighteen Java projects show that CoreBug is superior to the state-of-the-art approaches according to the average ranking of the Friedman test.
29 January 2019 in Mathematical Problems in Engineering
Ensemble methods, such as the traditional bagging algorithm, can usually improve the performance of a single classifier. However, they usually require large storage space as well as relatively time‐consuming predictions. Many approaches were developed to reduce the ensemble size and improve the classification performance by pruning the traditional bagging algorithms. In this article, we proposed a two‐stage strategy to prune the traditional bagging algorithm by combining two simple approaches: accuracy‐based pruning (AP) and distance‐based pruning (DP). These two methods, as well as their two combinations, “AP+DP” and “DP+AP” as the two‐stage pruning strategy, were all examined. Comparing with the single pruning methods, we found that the two‐stage pruning methods can furthermore reduce the ensemble size and improve the classification. “AP+DP” method generally performs better than the “DP+AP” method when using four base classifiers: decision tree, Gaussian naive Bayes, K‐nearest neighbor, and logistic regression. Moreover, as compared to the traditional bagging, the two‐stage method “AP+DP” improved the classification accuracy by 0.88%, 4.06%, 1.26%, and 0.96%, respectively, averaged over 28 datasets under the four base classifiers. It was also observed that “AP+DP” outperformed other three existing algorithms Brag, Nice, and TB assessed on 8 common datasets. In summary, the proposed two‐stage pruning methods are simple and promising approaches, which can both reduce the ensemble size and improve the classification accuracy.
12 June 2023 in Science China Information Sciences
Software maintenance is indispensable in the software development process. Developers need to spend a lot of time and energy to understand the software when maintaining the software, which increases the difficulty of software maintenance. It is a feasible method to understand the software through the key classes of the software. Identifying the key classes of the software can help developers understand the software more quickly. Existing techniques on key class identification mainly use static analysis techniques to extract software structure information. Such structure information may contain redundant relationships that may not exist when the software runs and ignores the actual interaction times between classes. In this paper, we propose an approach based on dynamic analysis and entropy-based metrics to identify key classes in the Java GUI software system, called KEADA (identifying KEy clAsses based on Dynamic Analysis and entropy-based metrics). First, KEADA extracts software structure information by recording the calling relationship between classes during the software running process; such structure information takes into account the actual interaction of classes. Second, KEADA represents the structure information as a weighted directed network and further calculates the importance of each node using an entropy-based metric OSE (One-order Structural Entropy). Third, KEADA ranks classes in descending order according to their OSE values and selects a small number of classes as the key class candidates. In order to verify the effectiveness of our approach, we conducted experiments on three Java GUI software systems and compared them with seven state-of-the-art approaches. We used the Friedman test to evaluate all approaches, and the results demonstrate that our approach performs best in all software systems.
Even though the number of services is increasing, a single service can just complete simple tasks. In the face of complex tasks, we require composite multiple services to complete them. For the purpose of improving the efficiency of web service composition, we propose a service composition approach based on an improved fireworks algorithm (FWA++). First, we use the strategy of random selection to keep individuals for the next generation, and the purpose is to speed up the convergence speed of the FWA++ and enhance the search ability. Second, we randomize the total number of sparks and maximum amplitude of sparks for each generation. In this way, the search ability and the ability to jump out of the local optimal solution are dynamically balanced throughout the execution of the algorithm. Our experimental results show that compared with other existing approaches, the approach proposed in this paper is more efficient and stable.