MCPcopy Index your code
hub / github.com/Persper/code-analytics / update_shares

Method update_shares

persper/graphs/call_commit_graph.py:294–306  ·  view source on GitHub ↗
(self, alpha)

Source from the content-addressed store, hash-verified

292 return additions, deletions
293
294 def update_shares(self, alpha):
295 self.scores = devrank(self.G, alpha=alpha)
296 for sha in self.history:
297 self.share[sha] = 0
298 for func_name in self.history[sha]:
299 if func_name in self.G:
300 # this condition handles the case where
301 # func_name is deleted by sha,
302 # but has never been added or modified before
303 self.share[sha] += \
304 (self.history[sha][func_name] /
305 self.G.node[func_name]['num_lines']) \
306 * self.scores[func_name]
307
308 def devrank_commits(self, alpha):
309 self.update_shares(alpha)

Callers 2

devrank_commitsMethod · 0.95
devrank_developersMethod · 0.95

Calls 1

devrankFunction · 0.90

Tested by

no test coverage detected