We use cookies to improve your experience with our site.
Mitrabinda Ray, Kanhaiya lal Kumawat, Durga Prasad Mohapatra. Source Code Prioritization Using Forward Slicing for Exposing Critical Elements in a Program[J]. Journal of Computer Science and Technology, 2011, 26(2): 314-327. DOI: 10.1007/s11390-011-1134-7
Citation: Mitrabinda Ray, Kanhaiya lal Kumawat, Durga Prasad Mohapatra. Source Code Prioritization Using Forward Slicing for Exposing Critical Elements in a Program[J]. Journal of Computer Science and Technology, 2011, 26(2): 314-327. DOI: 10.1007/s11390-011-1134-7

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

  • 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.
  • loading

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return