CN102981953A - Breakdown automatically-positioning method for null pointer abnormity - Google Patents

Breakdown automatically-positioning method for null pointer abnormity Download PDF

Info

Publication number
CN102981953A
CN102981953A CN2012104494815A CN201210449481A CN102981953A CN 102981953 A CN102981953 A CN 102981953A CN 2012104494815 A CN2012104494815 A CN 2012104494815A CN 201210449481 A CN201210449481 A CN 201210449481A CN 102981953 A CN102981953 A CN 102981953A
Authority
CN
China
Prior art keywords
null pointer
unusual
analysis
program
null
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012104494815A
Other languages
Chinese (zh)
Inventor
姜淑娟
于巧
张艳梅
刘颖祺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China University of Mining and Technology CUMT
Original Assignee
China University of Mining and Technology CUMT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China University of Mining and Technology CUMT filed Critical China University of Mining and Technology CUMT
Priority to CN2012104494815A priority Critical patent/CN102981953A/en
Publication of CN102981953A publication Critical patent/CN102981953A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a breakdown automatically-positioning method for a null pointer abnormity. The method includes the three steps: (1) slicing a procedure, (2) positioning a breakdown, null pointer analyzing and alias analyzing the procedure after slicing, (3) being visualized. The method of combining a static analysis and real-time information stacking is adopted, a source of the null pointer abnormity is led out through automatic positioning, the shortcomings that analyzing results are not accurate due to the single use of the static analysis method, and the real-time information stacking is too tough and cannot be independently applied are overcome, and meanwhile dynamic information can be collected with no price is paid.

Description

The fault automatic location method that a kind of null pointer is unusual
Technical field
The present invention relates to a kind of software fault location technology, the fault automatic location method that especially a kind of null pointer is unusual.
Background technology
Along with the expansion of software size and the raising of complexity, more and more higher to the requirement of software robustness, stability and reliability, the fault automatic location technology of software also more and more receives developer's concern.Java can be divided into two classes unusually: use unusual (causing according to the exception condition explicitly in application program) and run-time exception (real time environment by Java implicitly causes).Have much for using unusual research at present, for example analyze using unusually, for the tasks such as the test of program, maintenance provide valuable information for the developer, but for the research of run-time exception seldom.Because the initiation of run-time exception is unpredictable, so the developer seldom designs handling procedure for run-time exception, thereby in a single day generation of run-time exception, program is difficult to process by the exception handling of self, often needs artificial intervention to check and locate the root of exception throw.Therefore when causing run-time exception in the program implementation process, if there is not the exception handler of coupling to process, program stops immediately.
Null pointer unusual (java.lang.NullPointerException) be Java unusual in very common a kind of run-time exception.In Java, value is any method of object reference of null, it is unusual that null pointer is caused in the capital, null pointer is the most difficult search and debug a kind of unusual among the Java unusually, and therefore searching the unusual initiation reason of null pointer and position is a vital problem.Only come the method for scrutiny program incipient fault to have much with static method, but these methods mostly require the user that the note of program is provided and can't solve the coarse problem of staticaanalysis results.The method that adopts static analysis to combine with multidate information is an effectively method that solves staticaanalysis results out of true problem, but these methods are used for collecting the cost that multidate information need to cost a lot of money.
Summary of the invention
Deficiency for the unusual existing Static Analysis Method existence of null pointer, the invention provides the unusual fault automatic location method of a kind of null pointer, the method that adopts static analysis and real-time stack information to combine, automatically the unusual root of null pointer is caused in the location, both overcome independent use Static Analysis Method and caused the coarse defective of analysis result, remedied again the too coarse deficiency that can't use separately of real-time stack information, do not needed to spend simultaneously cost and collect multidate information.The method is applied in the open source code project, and experimental result shows that the method is effective.
The technical solution adopted for the present invention to solve the technical problems is: the unusual fault automatic location method of this null pointer is divided into three steps: (1) program slice, (2) localization of fault, comprise the program after the section is carried out null pointer analysis and alias analysis, (3) are visual; In step (1), the initiation point unusual from null pointer begins to do backward static slicing, utilizes real-time stack information and program construction system dependence graph, and the accessibility of computing system dependency graph can obtain program slice; At first use the implementation status of method in the real-time stack information analysis program, then according to the implementation status of method the method for carrying out is analyzed, there is not the method carried out and ignore those, thereby the size of reduction system dependency graph, reduce time and the space consuming of static slicing, and improve the precision of section; In step (2), program after utilizing open source software Soot to section is carried out static analysis: at first carry out the null pointer analysis, find out in the code and may mark for the Reference Type Variable of null value and with it, cause the unusual improper value source of null pointer so that find, and then carry out alias analysis for causing the unusual object of null pointer, taken into full account the impact of another name on the Reference Type Variable directional information, be convenient to further to lock and cause the unusual wrong statement of null pointer, thereby improve precision and the false alert reduction of null pointer abnormal failure location; In step (3), utilize independently developed visualization tool CodeDia display analysis result, be conducive to carry out the fault restoration work in more deep analysis and later stage.
The invention has the beneficial effects as follows: the method that adopts static analysis and real-time stack information to combine, automatically the unusual root of null pointer is caused in the location, both overcome independent use Static Analysis Method and caused the coarse defective of analysis result, remedied again the too coarse deficiency that can't use separately of real-time stack information, do not needed to spend simultaneously cost and collect multidate information.The method is applied in the open source code project, and experimental result shows that the method is effective.
Description of drawings
The invention will be further described below in conjunction with accompanying drawing.
Fig. 1 is system model of the present invention.
Fig. 2 is embodiments of the invention visualization display result.
Embodiment
In Fig. 1, the unusual fault automatic location method of this null pointer is divided into three steps: (1) program slice, and (2) localization of fault comprises the program after the section is carried out null pointer analysis and alias analysis that (3) are visual; In step (1), the initiation point unusual from null pointer begins to do backward static slicing, utilizes real-time stack information and program construction system dependence graph, and the accessibility of computing system dependency graph can obtain program slice; At first use the implementation status of method in the real-time stack information analysis program, then according to the implementation status of method the method for carrying out is analyzed, there is not the method carried out and ignore those, thereby the size of reduction system dependency graph, reduce time and the space consuming of static slicing, and improve the precision of section; In step (2), program after utilizing open source software Soot to section is carried out static analysis: at first carry out the null pointer analysis, find out in the code and may mark for the Reference Type Variable of null value and with it, cause the unusual improper value source of null pointer so that find, and then carry out alias analysis for causing the unusual object of null pointer, taken into full account the impact of another name on the Reference Type Variable directional information, be convenient to further to lock and cause the unusual wrong statement of null pointer, thereby improve precision and the false alert reduction of null pointer abnormal failure location; In step (3), utilize independently developed visualization tool CodeDia display analysis result, be conducive to carry out the fault restoration work in more deep analysis and later stage.
In Fig. 2, the demonstration sectional drawing of window 1 display analysis result (XML form) in the IE browser; Window 2 display of visually chemical industry tool CodeDia are written into source code (Ant) program structure diagram afterwards of this destination file and project, comprise the hierarchical relationship of bag, class, method; Window 3 shows the source code of Project class; Window 4 shows the source code of AntClassLoader class; Highlighted part is the result of location of mistake.
In the analysis result of window 1,<SliceInformation〉label is root node, comprised all information;<SourceFile〉label comprised the line number in certain class that section obtains, the Path attribute record class name (filename);<SourceFile〉comprised<NullUnknown and<AlwaysNull〉whether two subtabs, recorded respectively and uncertainly be empty line number and be defined as empty line number.

Claims (4)

1. fault automatic location method that null pointer is unusual is divided into three steps: (1) program slice, (2) localization of fault comprises the program after the section is carried out null pointer analysis and alias analysis that (3) are visual.
2. the unusual fault automatic location method of a kind of null pointer according to claim 1, it is characterized in that: in step (1), the initiation point unusual from null pointer begins to do backward static slicing, utilize real-time stack information and program construction system dependence graph, the accessibility of computing system dependency graph can obtain program slice; At first use the implementation status of method in the real-time stack information analysis program, then according to the implementation status of method the method for carrying out is analyzed, and ignore the method that those do not have execution.
3. the unusual fault automatic location method of a kind of null pointer according to claim 1, it is characterized in that: in step (2), program after utilizing open source software Soot to section is carried out static analysis: at first carry out the null pointer analysis, find out in the code and may mark for the Reference Type Variable of null value and with it, cause the unusual improper value source of null pointer so that find, and then carry out alias analysis for causing the unusual object of null pointer.
4. the unusual fault automatic location method of a kind of null pointer according to claim 1 is characterized in that: in step (3), utilize independently developed visualization tool CodeDia display analysis result.
CN2012104494815A 2012-11-12 2012-11-12 Breakdown automatically-positioning method for null pointer abnormity Pending CN102981953A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012104494815A CN102981953A (en) 2012-11-12 2012-11-12 Breakdown automatically-positioning method for null pointer abnormity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012104494815A CN102981953A (en) 2012-11-12 2012-11-12 Breakdown automatically-positioning method for null pointer abnormity

Publications (1)

Publication Number Publication Date
CN102981953A true CN102981953A (en) 2013-03-20

Family

ID=47856007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012104494815A Pending CN102981953A (en) 2012-11-12 2012-11-12 Breakdown automatically-positioning method for null pointer abnormity

Country Status (1)

Country Link
CN (1) CN102981953A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183488A (en) * 2015-10-08 2015-12-23 深圳Tcl数字技术有限公司 Method and device for webpage script exception handling
CN106991050A (en) * 2017-04-05 2017-07-28 西安邮电大学 A kind of static test null pointer dereference defect false positive recognition methods
CN110188029A (en) * 2019-03-15 2019-08-30 中山大学 A kind of Java null pointer analysis system reaching analysis method based on definite value

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SAURABH SINHA ET AL: "《ISSTA"09》", 19 July 2009 *
SHUJUAN JIANG ET AL: "《2010 10th International Conference on Quality Software》", 14 July 2010 *
SHUJUAN JIANG ET AL: "《2012 12th International Conference on Quality Software》", 29 August 2012 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183488A (en) * 2015-10-08 2015-12-23 深圳Tcl数字技术有限公司 Method and device for webpage script exception handling
CN105183488B (en) * 2015-10-08 2019-02-01 深圳Tcl数字技术有限公司 Page script abnormality eliminating method and device
CN106991050A (en) * 2017-04-05 2017-07-28 西安邮电大学 A kind of static test null pointer dereference defect false positive recognition methods
CN106991050B (en) * 2017-04-05 2020-05-29 西安邮电大学 False positive identification method for reference defect of static test null pointer
CN110188029A (en) * 2019-03-15 2019-08-30 中山大学 A kind of Java null pointer analysis system reaching analysis method based on definite value

Similar Documents

Publication Publication Date Title
US9740506B2 (en) Automating interactions with software user interfaces
US10013331B2 (en) Correlating queries issued by applications with their source lines and analyzing applications for problem determination and where used analysis
Jin et al. Automated behavioral regression testing
US7343588B2 (en) Method of generating and utilizing debug history
CN104969144B (en) The record that program is executed
Gouveia et al. Using HTML5 visualizations in software fault localization
CN100511177C (en) Symbol locating method of embedded system
CN110750459B (en) Automatic test case generation and test process management method based on white box analysis
CN101553769A (en) Method and system for tracking and monitoring computer applications
US20060218125A1 (en) SQL query problem determination tool
Xu et al. Experience mining Google's production console logs
Cleve et al. Data reverse engineering using system dependency graphs
Aghajani et al. A large-scale empirical study on linguistic antipatterns affecting apis
Rothlisberger et al. Augmenting static source views in IDEs with dynamic metrics
CN102981953A (en) Breakdown automatically-positioning method for null pointer abnormity
Maisikeli et al. Aspect mining using self-organizing maps with method level dynamic software metrics as input vectors
Valente et al. On the benefits of quantification in AspectJ systems
US7664997B2 (en) Failure handling and debugging with causalities
US9679245B2 (en) Predicting the impact of change on events detected in application logic
Lumpe et al. Learning better inspection optimization policies
US8819625B2 (en) Sharable development environment bookmarks for functional/data flow
Aung et al. Interactive traceability links visualization using hierarchical trace map
Marinescu Identification of design roles for the assessment of design quality in enterprise applications
Oosterman et al. Evojava: A tool for measuring evolving software
Trifu Improving the dataflow-based concern identification approach

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130320