Class CommitStatistics

java.lang.Object
io.jenkins.plugins.forensics.miner.CommitStatistics
All Implemented Interfaces:
Serializable

public class CommitStatistics extends Object implements Serializable
Computes and stores aggregated statistics for a collection of commits.
Author:
Ullrich Hafner
See Also:
  • Constructor Details

  • Method Details

    • getAddedLines

      public int getAddedLines()
    • getDeletedLines

      public int getDeletedLines()
    • getLinesOfCode

      public int getLinesOfCode()
    • getAbsoluteChurn

      public int getAbsoluteChurn()
    • getAuthorCount

      public int getAuthorCount()
    • getCommitCount

      public int getCommitCount()
    • getFilesCount

      public int getFilesCount()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • countMoves

      public static int countMoves(Collection<? extends CommitDiffItem> commits)
      Counts the number of RENAME commits. A rename commit is a commit where an existing file has been moved to a new location.
      Parameters:
      commits - the commits to analyze
      Returns:
      number of RENAME commits
    • countDeletes

      public static int countDeletes(Collection<? extends CommitDiffItem> commits)
      Counts the number of DELETE commits. A delete commit is a commit where an existing file has been deleted.
      Parameters:
      commits - the commits to analyze
      Returns:
      number of DELETE commits
    • countChanges

      public static int countChanges(Collection<? extends CommitDiffItem> commits)
      Counts the number of CHANGE commits. A change commit is a commit where an existing file has been changed.
      Parameters:
      commits - the commits to analyze
      Returns:
      number of RENAME commits
    • logCommits

      public static void logCommits(List<CommitDiffItem> commits, edu.hm.hafner.util.FilteredLog logger)
      Prints a summary of the specified commits to the specified logger.
      Parameters:
      commits - the commits to summarize
      logger - the logger