Source code redundancy import class cleaning method and device
The embodiment of the invention provides a source code redundancy import class cleaning method and device, which can be used in the technical field of information security, and the method comprises the following steps: according to a preset abstract syntax tree, dividing all nodes on the abstract sy...
Gespeichert in:
Hauptverfasser: | , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The embodiment of the invention provides a source code redundancy import class cleaning method and device, which can be used in the technical field of information security, and the method comprises the following steps: according to a preset abstract syntax tree, dividing all nodes on the abstract syntax tree into import class nodes and non-import class nodes; determining redundant import class nodes according to the reference relationship between the non-import class nodes and the import class nodes; in the abstract syntax tree, placing all non-redundant import class nodes in front of the non-import class nodes, and forming an updated abstract syntax tree; and according to the updated abstract syntax tree, correspondingly generating a cleaned source code. According to the invention, the working efficiency of a developer in stock code reconstruction is obviously improved, and the workload of the developer is greatly reduced, so that the developer does not need to consider deletion of redundant codes and import |
---|