Example #1
0
        private static void AggregateBugDatabase(AggregatedDailyCodeChurn aggregatedDailyCodeChurn, DailyCodeChurn line)
        {
            if (line.BugDatabase == null)
            {
                return;
            }

            aggregatedDailyCodeChurn.AddedInFixesBugDB             += line.BugDatabase.AddedInFixes;
            aggregatedDailyCodeChurn.ChangesAfterInFixesBugDB      += line.BugDatabase.ChangesAfterInFixes;
            aggregatedDailyCodeChurn.ChangesBeforeInFixesBugDB     += line.BugDatabase.ChangesBeforeInFixes;
            aggregatedDailyCodeChurn.DeletedInFixesBugDB           += line.BugDatabase.DeletedInFixes;
            aggregatedDailyCodeChurn.NumberOfChangesWithFixesBugDB += line.BugDatabase.NumberOfChangesInFixes;
        }
Example #2
0
        private void AggregateLine(AggregatedDailyCodeChurn aggregatedDailyCodeChurn, DailyCodeChurn line)
        {
            aggregatedDailyCodeChurn.Added                       += line.Added;
            aggregatedDailyCodeChurn.AddedInFixesVCS             += line.AddedWithFixes;
            aggregatedDailyCodeChurn.ChangesAfter                += line.ChangesAfter;
            aggregatedDailyCodeChurn.ChangesAfterInFixesVCS      += line.ChangesAfterWithFixes;
            aggregatedDailyCodeChurn.ChangesBefore               += line.ChangesBefore;
            aggregatedDailyCodeChurn.ChangesBeforeInFixesVCS     += line.ChangesBeforeWithFixes;
            aggregatedDailyCodeChurn.Deleted                     += line.Deleted;
            aggregatedDailyCodeChurn.DeletedInFixesVCS           += line.DeletedWithFixes;
            aggregatedDailyCodeChurn.NumberOfChanges             += line.NumberOfChanges;
            aggregatedDailyCodeChurn.NumberOfChangesWithFixesVCS += line.NumberOfChangesWithFixes;

            AggregateAuthors(aggregatedDailyCodeChurn, line);
            AggregateBugDatabase(aggregatedDailyCodeChurn, line);
            aggregatedDailyCodeChurn.DailyCodeChurnPerFile.Add(line);
        }
Example #3
0
        private static void AggregateAuthors(AggregatedDailyCodeChurn aggregatedDailyCodeChurn, DailyCodeChurn line)
        {
            if (line.Authors == null)
            {
                return;
            }

            foreach (var a in line.Authors)
            {
                if (!aggregatedDailyCodeChurn.Authors.Exists(aut => aut.Author == a.Author))
                {
                    aggregatedDailyCodeChurn.Authors.Add(new DailyCodeChurnAuthor()
                    {
                        Author = a.Author
                    });
                }
                aggregatedDailyCodeChurn.Authors.Where(aut => aut.Author == a.Author).First().NumberOfChanges += a.NumberOfChanges;
            }
        }