Class FileStatistics

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

public final class FileStatistics extends Object implements Serializable
Aggregates commit statistics for a given file. The following statistics are summed up:
  • total number of commits
  • total number of different authors
  • creation time
  • last modification time
  • added lines
  • deleted lines
Author:
Ullrich Hafner
See Also:
  • Method Details Link icon

    • getFileName Link icon

      public String getFileName()
    • getCommits Link icon

      public List<CommitDiffItem> getCommits()
      Returns all commits this file was part of.
      Returns:
      all commits for this file
    • getNumberOfAuthors Link icon

      public int getNumberOfAuthors()
      Returns the number of authors for this file.
      Returns:
      the number authors for this file.
    • getNumberOfCommits Link icon

      public int getNumberOfCommits()
      Returns the number of times this file was committed.
      Returns:
      the number of commits for this file
    • getCreationTime Link icon

      public int getCreationTime()
      Returns the creation time of this file.
      Returns:
      the time of the creation (given as number of seconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT).
    • getLastModificationTime Link icon

      public int getLastModificationTime()
      Returns the time of the last modification of this file (i.e. last commit to the file).
      Returns:
      the time of the last modification (given as number of seconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT).
    • getLinesOfCode Link icon

      public int getLinesOfCode()
      Returns the total lines of code for this file.
      Returns:
      the total lines of code.
    • getAbsoluteChurn Link icon

      public int getAbsoluteChurn()
      Returns the absolute churn for this file, i.e. the sum of all added and deleted lines.
      Returns:
      absolute churn
    • inspectCommit Link icon

      public void inspectCommit(CommitDiffItem additionalCommit)
      Inspects and stores the specified commit for this file. Updates all properties after the commit has been added, including an optional file name rename.
      Parameters:
      additionalCommit - the additional commit to inspect
    • inspectCommits Link icon

      public void inspectCommits(Collection<CommitDiffItem> additionalCommits)
      Inspects and stores the specified commits for this file. Updates all properties after the commit has been added, including an optional file name rename.
      Parameters:
      additionalCommits - the additional commits to inspect
    • equals Link icon

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

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

      public String toString()
      Overrides:
      toString in class Object