Patent ID: 7721269

Claim:
A computer-implemented method of detecting redundant subroutine calls in a software system, comprising: obtaining, using one or more processors, call path data for the software system and storing the call path data into a call tree comprising a plurality of nodes, each node representing a software routine of the software system, the call tree describing the calling paths between the plurality of software routines; identifying at least one focal node among the plurality of nodes in the call tree; determining a list of common ancestor nodes for the focal node, wherein determining comprises: initializing a level variable and a count variable for each node in the call tree, wherein the level variable indicates the nodal distance from the focal node to a node in the call tree, and the count variable indicates the number of times that the node makes a direct or indirect call to the focal node, traversing the call tree from the focal node to the other nodes in the call tree along a plurality of call paths, wherein traversing includes determining the minimum nodal distance between the focal node and the other nodes, and saving the minimum distance as the level variable, and determining the number of times that the other nodes make a direct or indirect call to the focal node, and saving the number as the count variable; and for each common ancestor node in the list of common ancestor nodes, determining a call path from the common ancestor node to the focal node.