The invention provides a software defect prediction method for open source software defect feature deep learning, and belongs to the technical field of software engineering. The method comprises the steps of collecting open source software defect information, constructing a software defect database, and generating an abstract syntax tree from source codes; pruning the abstract syntax tree by usinga community detection algorithm to obtain a defect sub-tree, establishing an information corpus of the defect sub-tree in combination with the repair description, the project basic information and the source code, extracting theme words from the information corpus, converting the theme words into vector representation, and taking the vector representation as attributes of nodes in the defect sub-tree; finally, establishing a software defect prediction model of the convolutional neural network based on graph classification, expressing the defect subtree as an adjacent matrix and an attribute matrix to serve as input of the model to train the convolutional neural network, and recognizing whether the source code of the to-be-predicted software module has defect tendency or not. According tothe method, the defect depth features are directly extracted from the structured software codes by using a deep learning method, so that a better defect recognition effect can be achieved.