摘要 |
Software is divided into functions which are then transformed into tokens. The tokens are compared with the tokens from software which is subject to a license. The comparison may be used to determine whether the software is a copy of the licensed software. The comparison may use the number of tokens common to the software and the licensed software to measure similarity. The comparison may put the tokens in a matrix to determine the similarity. An alignment path in the matrix may be used to determine the similarity. The comparison may find the path by determining a maximum value of a sub-matrix along an outer edge of the matrix. The comparison may remove comments, tag scopes and non-functional elements from the second function. The comparison may replace variables, function names and strings in the second function. |