CROSS-REFERENCE TO RELATED APPLICATIONS

This is a National Stage Application, filed under 35 U.S.C. 371, of International Patent Application No. PCT/CN2018/104155, filed on Sep. 5, 2018, which claims priority to Chinese patent application No. 201810047681.5 filed on Jan. 12, 2018, contents of both of which are incorporated herein by reference in their entireties.

TECHNICAL FIELD

The present disclosure belongs to the field of software maintenance, and particularly relates to an automatic construction method of a software bug knowledge graph.

BACKGROUND

Software developers and maintainers usually need to use some websites such as Bugzilla that contain bug libraries to search for bug related information to solve bug problems they encounter. However, most of these websites adopt a searching method based on the traditional relationship database. Although the search results contain a lot of information and properties of bugs in most cases, the relationship between bugs is not particularly clear. In addition, when a searcher searches by using keywords, the website adopts one-by-one keyword matching, which makes the search results inaccurate; and when the searcher enters fewer or more keywords, two extreme cases will exist: (1) the search results are not only large in number and low in relevance, but also not sorted according to the similarity after matching, which makes the searcher spend a lot of time in browsing and filtering information; (2) the number of returned results is very small or no results are returned, and the information returned is not really relevant. These search results make it difficult for searchers to find the information they really need, which takes much time and effort.

Before the present disclosure, a lot of achievements have been made in the research of knowledge graph at present, some open knowledge graphs are formed, and in particular, the construction of domain-specific knowledge graphs attracts attention of many people. However, the research on the construction of domain-specific knowledge graphs for software bugs is still in the initial stage. In addition, natural language processing is used a lot in the construction of domain-specific knowledge graphs for other domains, but rarely used for the bug domain. The data source of the existing bug library is of high quality. The information of the bugs is processed through natural language, and then the relationship between the bugs is established in the form of a knowledge graph, which can improve the efficiency of software developers and maintainers in solving bugs.

SUMMARY

The present disclosure aims to overcome the above-mentioned defects and develop an automatic construction method of a software bug knowledge graph.

The technical methods of the present disclosure are described below.

The automatic construction method of a software bug knowledge graph includes the following steps.

(1) Bug information in a related bug library is scraped; a BugID, bug description information, and four main properties of platform, product, component and status in a bug report are scraped, and natural language processing is performed on the scraped bug description information, where the natural language processing mainly includes steps of word segmentation and part-of-speech tagging.

(2) A noun phrase (NP), a verb phrase (VP), and a verb phrase with an open clausal complement (VVP) are identified through regular expressions for phrase identification and according to part-of-speech tags of words in a sentence subjected to natural language processing.

(3) Dependency syntax parsing is performed on bug description information to find out a dependency relationship between specific “dependent” and “dominant” words, and a grammatical structure in a bug description sentence is extracted.

(4) A relationship triple, that is, (NP1, VP, NP2), of the bug description information is constructed according to the dependency relationship between words and based on the NP and the VP which are extracted in step (2), where the bug description sentence usually includes more than one relationship triple.

(5) The BugID in the bug information scraped in step (1) is added to supplement the relationship triple of the bug description information extracted in step (4), so as to generate a relationship quadruple, that is, (BugID, NP1, VP, NP2), of a bug.

(6) Property X of the bug collected in step (1) is used to form a property triple of the bug, where the property triple is (BugID, property, X), the property triple is used for further description of the bug information and is prepared for subsequent construction of a software bug knowledge graph.

(7) A domain feature for bug classification is extracted according to the extracted property triple, and the domain feature is used to promote a learning and training process of a classifier in a form of (BugID, NP1, VP, NP2, features).

(8) The learning and training process is performed with a semi-supervised support vector machine (SVM) classifier by using the extracted domain feature, and domain classification is performed for the bug.

(9) After the bug is labeled by the classifier, data of each type of labeled bug is stored in a visual database and the software bug knowledge graph is generated.

The present disclosure has following advantages and effects: bug description is analyzed from the perspective of natural language processing, software maintainers are provided with simpler and more accurate bug information and the most likely domain classification of the bug, which helps software developers and maintainers to more intuitively, quickly, and accurately understand the bug information and the domain knowledge of the bug, and greatly improve efficiency of the software developers and maintainers. The software bug knowledge graph is finally implemented, and an association relationship between bugs is established. When the searcher searches for related bug information, other bug information related to the bug is provided, and thereby the search efficiency is greatly improved.

The method also has the following advantages.

(1) In the method, the relationship triple is extracted from the bug description information, which can not only concatenate the relationships between the bugs, but also enable the software maintainer to quickly understand the bug information and the domain knowledge of the bug. When the relationship triple of the bug is extracted, the appropriate word-to-word dependency relationship is selected to make the obtained relationship triple more accurate, and redundancy and noise are reduced.

(2) In the method, according to the description sentence of the bug, the domain feature of the bug is extracted through three steps of feature extraction, feature construction and feature selection.

(3) In the method, a semi-supervised learning classification method is adopted. Through the extracted domain feature of the bug, training and learning are performed on the relationship triple of the bug, and through iterations, the quality of classification is improved and automatic classification of the bug is achieved.

(4) In the method, the data on Bugzilla is analyzed. The quality of the data source is higher, and the data is used to construct a software bug knowledge graph. The graphs helps software developers and maintainers to understand the bug information and the domain knowledge of the bug more intuitively, quickly and accurately, so as to solve the corresponding bug.

At present, the semi-supervised learning classifier is a commonly used classifier learning method, but this semi-supervised mode still requires a small amount of manual labeling, the classification effect is still not ideal, and some triple classification results with redundancy and high noise may be generated. Therefore, before the classifier learning is performed, the classification feature of the bug domain is deliberately extracted by analyzing the related domain knowledge of the bug, helping in the training and learning of the classifier to get a better classifier. The earliest concept of a knowledge graph is a semantic network, and then the philosophy concept “ontology” is introduced into the domain of artificial intelligence to characterize knowledge. Finally, thanks to the development of the web, the knowledge graph is developed rapidly. The knowledge graph is a relationship network obtained by connecting all different kinds of information together, provides the ability to analyze problems from the perspective of “relationships”, and is the most effective way to express relationships. The goal of the automatic construction method of the software bug knowledge graph is to analyze the bug description information from a semantic perspective, and automatically classify bugs based on the extracted bug domain features, so as to provide software maintainers with more intuitive bug results. That is, when software developers and maintainers search for the bug problems, keyword searching can be used to give quicker and accurate related information about the bug, as well as association of the bug with other bugs and domain knowledge.

