Patent attributes
The invention provides a vectorized representation method of a software source code. The vectorized representation method is an AST-based neural network which is a hierarchical vector representation method comprising the following implementation steps: step 1-1, converting an original software source code into an AST at the lowest layer, and then further dividing the AST according to source code statements to acquire a smaller statement tree sequence, wherein statement trees in the statement tree sequence are different in sequence, and the statement tree sequence is consistent with an original statement sequence; step 1-2, encoding the statement trees into statement vectors e1, e2, . . . , et by a recursive neural encoder; step 1-3, enabling an acquired statement vector sequence to pass through a bidirectional recurrent neural network layer to extract dependency features between statements; and step 1-4, sampling multi-dimensional features of all time steps of the bidirectional recurrent neural network layer through a pooling layer to acquire a final vector representation.