| Computer technology is rapid development.A variety of programming languages emergein endlessly.Numerous programmers use mainstream programming languages.Theirtechnology and programming specification is uneven. Code quality is declining. The codewhich need to review is growing. The workload of the review code manually is increasing.Under such a demand, audit code with the program came into being. At present, Abroad isrelatively early in the development of this project. They has achieved good effect. They cutdown the workload of the audit code substantially. A lot of labor is liberated. Our starting islater than foreign. But we have also achieved good results. All kinds of colleges anduniversities have made a big contribution. This article also introduces the Java source code forthe design and implementation of static analysis.Static analysis is under the condition of without having to perform source code toimplements detection for source code. It is relative with dynamic analysis. Dynamic analysisis analyzed in the conditions of execution codes. Static analysis and dynamic analysis arecomplementary to each other. Their common use can play the biggest role.In the process of static analysis, first is to use front-end compiler source code.It willconvert character stream into intermediate representation.Then It will carry out lexicalanalysis and syntax analysis and build the syntax tree.Then extracted its nodes from thesyntax tree and build CFG flow control. Next analyze data stream, constraints, and checkmodules. Ultimately achieve the purpose of static analysis code.Then respectively introducesthe realization of the principle, the analysis process, the algorithm.In the process of design system,it carried out a detailed design in the design process, themain function of the system, data structures, class, and the relationship between the classes,interfaces, etc. It provides the reliable design for the implementation of the standards.On this basis, I coding for the system implementation. This paper mainly introduces themodule implementation of CFG build module, data flow analysis module, defect analysismodule, stain spread analysis module, inaccessible code modules CFG build module, dataflow analysis module, defect analysis module, stain spread analysis module, inaccessible code modules.After completion of the above algorithm and implementation of the system is the basicshape. It plays a significant role in the Java source code static analysis and detection. With thetesting and improvement, it produces a more accurate analysis of the test results. The nextmajor work is the static analysis system optimized to further reduce the time complexity andspace complexity. The aim is to make detection more accurate and in less time. |