-
Notifications
You must be signed in to change notification settings - Fork 0
Network Building Stage
This is the final stage of the call graph analyzer program and is the stage that actually generates our end data in the form of a technical dependency network. To generate a technical network, we follow the series of steps outlined below.
The first step of building the network is to take two adjacent commits and compare them using Eggnet's differ. (Note: the commits do not need to be adjacent, but building a network of two commits spaced very far apart may take a long time and give data that is irrelevant) From this stage we will find out exactly what files, classes and methods have been changed from the first to second commit and by what contributors.
This step is preformed in an iterative fashion. One iteration would be preformed as follows. Get a method change from the previous step where we used the differ. Figure out who changed that method and what percent of the total method they changed. Find a method which calls the method that was changed and figure out who owns that calling method and by what percentage they own it. (All of this information is available to us in the CallGraph at this point; it is just a simple matter of extracting it.) Apply the weight formula ((delta changed) * ((owned) / depth))*100, where delta changed is the percentage changed, owned is the percentage owned by a contributor of the calling method and depth is how many chain calls are made in between the caller and callee methods. We now have a weight relationship between the contributor who changed a method, the calling method and the owner who partially owns that calling method and a weight between the two pairs.
We need to repeat this procedure outlined above for all partial owners of all calling methods up to the depth specified by a user. Depth can be described as follows. If method bar calls method foo then the depth is 1. If method foobar calls method bar, then the depth between foobar and foo is 2.
One network is a representation of all relationships across a pair of adjacent commits. This program however, will generate a list of networks which are all the adjacent commit pairs that span a range of two commit IDs. As an example if a repository has n commits and you supply commit ID 1 and n as your third and fourth arguments, Call Graph Analyzer will generate the networks for commits 1-2, 2-3, 3-4, ... (n-1)-n.
The resulting networks will be dumped into the PostgreSQL database for which the schema can be found here. From this point the data can be analyzed as needed.