Research Article

A Slice-Based Change Impact Analysis for Regression Test Case Prioritization of Object-Oriented Programs

Algorithm 2

findWACC(ASG, ).
Input: Affected Component Dependency Graph (ASG), total number of nodes
Output: Weighted Export Coupling Factor (WACC) of each node
(1) for (Where is any node in ASG)
(2)    
(3)   outflow
(4)   inflow
(5)   
(6)  End for (To update the coupling value of all the method, class and package nodes)
(7)  for (Where is the number of method nodes in the graph)
(8)    ( is the statement/parameter node of method , is the total number of
  statement/parameter nodes of each )
(9)  End for
(10) for ( is the total number of class nodes)
(11)   ( is the attribute/method node of class , is the total number of attribute/
  method nodes of each )
(12) End for
(13) for ( is the total number of package nodes)
(14)   ( is the subpackage/class node of package , is the total number of
  subpackage/class nodes of each )
(15) End for
(16) ( represents the cohesion of slice ) (To assign a weight to each node of ASG)
(17) for (Where is any node in ASG)
(18)  if and
(19)   
(20)  End if
(21)  else if and
(22)   
(23)  End else if
(24)  else
(25)   
(26)  End else
(27) Exit