The invention discloses a method of fully detecting null pointer reference defects. The method comprises recognizing all addressable expressions of an application to be detected based on an 
abstract syntax tree; carrying out conservative interval arithmetic and 
pointer analysis on the application to be detected according to a 
control flow diagram, and generating a procedural summary according to results of the interval arithmetic and the 
pointer analysis; recognizing all pointer reference and referred pointers according to the procedural summary and the 
abstract syntax tree, and creating a null pointer reference defect state 
machine example on each referred pointer; and running the null pointer reference defect state 
machine examples based on the 
control flow diagram, carrying out state transition on each defect state 
machine example on each node of the 
control flow diagram according to the results of the interval arithmetic and the 
pointer analysis, and carrying out null pointer reference detection. By adopting the method of fully detecting the null pointer reference defects, the problem of failing to report the null pointer reference defects can be effectively solved, and zero omission and low 
misinformation of the null pointer reference defect detection are achieved.