Source Code Prioritization Using Forward Slicing for Exposing Critical Elements in a Program

来源 :计算机科学技术学报(英文版) | 被引量 : 0次 | 上传用户:gang098
下载到本地 , 更方便阅读
声明 : 本文档内容版权归属内容提供方 , 如果您对本文有版权争议 , 可与客服联系进行内容授权或下架
论文部分内容阅读
Even after thorough testing, a few bugs still remain in a program with moderate complexity. These residual bugs are randomly distributed throughout the code. We have noticed that bugs in some parts of a program cause frequent and severe failures compared to those in other parts. Then, it is necessary to take a decision about what to test more and what to test less within the testing budget. It is possible to prioritize the methods and classes of an object-oriented program according to their potential to cause failures. For this, we propose a program metric called influence metric to find the influence of a program element on the source code. First, we represent the source code into an intermediate graph called extended system dependence graph. Then, forward slicing is applied on a node of the graph to get the influence of that node. The influence metric for a method m in a program shows the number of statements of the program which directly or indirectly use the result produced by method m. We compute the influence metric for a class c based on the influence metric of all its methods. As influence metric is computed statically, it does not show the expected behavior of a class at run time. It is already known that faults in highly executed parts tend to more failures. Therefore, we have considered operational profile to find the average execution time of a class in a system. Then, classes are prioritized in the source code based on influence metric and average execution time. The priority of an element indicates the potential of the element to cause failures. Once all program elements have been prioritized, the testing effort can be apportioned so that the elements causing frequent failures will be tested thoroughly. We have conducted experiments for two well-known case studies -- Library Management System and Trading Automation System -- and successfully identified critical elements in the source code of each case study. We have also conducted experiments to compare our scheme with a related scheme. The experimental studies justify that our approach is more accurate than the existing ones in exposing critical elements at the implementation level.
其他文献
Using a modified ABCD-matrix approach accounting for nonlinear refraction in active medium,the ranges of cavity parameters that provide a mode-locking of Yb∶KY
The WC-6%Co(mass fraction) substrate surfaces were chemically pretreated with the two-step etching method, using Murakami reagent for 3~7min, and then an φ(HNO3
An experimental observation of the competition between quantum interference and stimulated electronic Raman scattering (SERS) via equal-frequency hybrid excitat
The effects of La(NO3)3 on the growth,activities of SOD,CAT and MDA content in shoots and roots of wheat seedlings under mercury stress were evaluated by the nu
Gold dissolves electrochemically in alkaline solutions containing ligands to form complex ions with gold ion. Therefore, selective leaching of noble metals is e
The nanometer particles of TiO2 and TiO2/SiO2 oxides were prepared by sol-gel and supercritical fluid drying method. The properties of TiO2 and TiO2/SiO2 were c
In this paper,the FDTD method is used to calculate the light field distribution in an uncoated fiber probe with a small dielectric particle.By integrating Maxwe
Adsorption equilibria of CH4 and N2 on activated carbon and silica gel were measured for a wide temperature range covering the critical point: 158-298 K for CH4
Recovery of caprolactam from waste water of caprolactam production factory was investigated using benzene as solvent in a small-scale pulsed-sieve-plate column.
The damage evolution of high temperature plastic deformation of metallic materials was studied by use of continuum damage mechanics (CDM) theory. Based on therm