Method and system for template extraction based on source code similarity
摘要:
The present invention is a system and method for template extraction based on source code similarity. The system receives source code and groups the class files into classes based on naming rules and inheritance hierarchy. Features are parsed for each class and encoded a float value. The classes are clustered based on similarities of the features. A similarity value is calculated for the classes in a cluster and potential candidate classes are selected based on the similarity value or inheritance hierarchy. A feature subset is selected across all candidate classes and differences in the features in the subset are determined. The features are then decoded and the differences are parameterized to generate a template. A variable definition file is created to cross-reference features and variables. Source code can then be generated using the template and the variable definition file.
信息查询
0/0