| The improvement of computer performance has increased the functions of the soft-ware which make the software system larger.However,after developing the software system,continuous maintenance is needed due to the new functional requirements,which make the software system too complex to maintain its quality and comprehensibility.Complex network is an effective method for modeling software systems.The relationship between software components is analyzed by turning the software system into a complex network and using the characteristics to study software architecture.This thesis proposes a new weighted software network to describe the characteristics of object-oriented software systems.To verify the rationality and effectiveness of this weighted network,reconstruction algorithms and random disturbance algorithms are used to perform disturbance recovery experiments on object-oriented software systems.The contributions in this paper are summarized as follows:1.Based on complex network knowledge and construction principles,we propose a new weighted software network to characterize object-oriented software systems.We take classes as nodes and the connections between classes as edges.Then we analyze the object-oriented software system through reflection technology to obtain the dependencies between the classes.We analyzed the shortcomings of the previous software dependency network,set the weighting scheme from two perspectives,and constructed a new weighted software network WCDN(Weighted Class Dependency Network).First,we assign differ-ent weights to the five dependencies between classes according to the complexity of the dependencies to obtain a weighted software network.Then,for all nodes in the network,we use the Page Rank algorithm to rank their importance and assign a weight to each node.Finally,we combine these two aspects and propose a software network weighting formula to define the weight of edges and obtain a new weighted software network WCDN.2.We propose a weighted software network verification mechanism to evaluate the rationality and effectiveness of the software network.Our verification of the weighted software network is divided into two aspects.1)We use WCDN to guide the reconstruc-tion algorithm and random disturbance algorithm and verify the effectiveness of WCDN based on the algorithm results.First,we use WCDN as the input of the reconstruction algorithm and observe the changes in the software cohesion and coupling metrics through reconstruction experiments.Then,we use WCDN as the input of the random disturbance algorithm to obtain the value of the disturbance recovery rate of the software system.The effectiveness of WCDN is evaluated in turn by judging whether WCDN can effectively guide network reconstruction based on the experimental results of the two algorithms.2)We designed a set of comparative experiments for different software networks to evalu-ate the rationality of network construction.Three metric values are selected as the input of the random disturbance algorithm,and the disturbance recovery experiments are con-ducted on different networks built by the same software with disturbance rates of 6%,10%,and 14%,respectively.We tested on 30 systems,and the experimental results show that WCDN can more reasonably characterize the architecture information of the software system. |