Parser contains three components:
ArgsParser: Parses the user-supplied command line arguments into a
CsvParser: Abstract generic class for CSV parsing functionality. The following three classes extend
AuthorConfigCsvParser: Parses the
author-config.csvconfig file into a list of
AuthorConfigurationfor each repository to analyze.
GroupConfigCsvParser: Parses the
group-config.csvconfig file into a list of
GroupConfigurationfor each repository to analyze.
RepoConfigCsvParser: Parses the
repo-config.csvconfig file into a list of
RepoConfigurationfor each repository to analyze.
JsonParser: Abstract generic class for JSON parsing functionality. The following class extends
StandaloneConfigJsonParser: Parses the
_reposense/config.jsonconfig file into a
Git package contains the wrapper classes for respective git commands.
GitBlame: Wrapper class for
git blamefunctionality. Traces the revision and author last modified each line of a file.
GitBranch: Wrapper class for
git branchfunctionality. Gets the name of the working branch of the target repo.
GitCatFile: Wrapper class for
git cat-filefunctionality. Obtains the parent commit hash with the given commit indicated by the commit hash.
GitCheckout: Wrapper class for
git checkoutfunctionality. Checks out the repository by branch name or commit hash.
GitClone: Wrapper class for
git clonefunctionality. Clones the repository from GitHub into a temporary folder in order to run the analysis.
GitDiff: Wrapper class for
git difffunctionality. Obtains the changes between commits.
GitLog: Wrapper class for
git logfunctionality. Obtains the commit logs and the authors' info.
GitLsTree: Wrapper class for
git ls-treefunctionality. Ensures that the tracked files do not contain any paths with illegal characters for Windows users.
GitRevList: Wrapper class for
git rev-listfunctionality. Retrieves the commit objects in reverse chronological order.
GitRevParse: Wrapper class for
git rev-parsefunctionality. Ensures that the branch of the repo is to be analyzed exists.
GitShortlog: Wrapper class for
git shortlogfunctionality. Obtains the list of authors who have contributed to the target repo.
GitShow: Wrapper class for
git showfunctionality. Gets the date of the commit with the commit hash.
GitUtil: Contains helper functions used by the other Git classes above.
GitVersion: Wrapper class for
git --versionfunctionality. Obtains the current git version of the environment that RepoSense is being run on.
CommitsReporter is responsible for analyzing the commit history and generating a
CommitContributionSummary for each repository.
CommitContributionSummary contains information such as each author's daily and weekly contribution and the variance of their contribution.
CommitInfoExtractorto run the
git logcommand, which generates each commit's statistics within the date range.
CommitInfofor each commit, which contains the
CommitInfoAnalyzerto extract the relevant data from
CommitResult, such as the number of line insertions and deletions in the commit and the author of the commit.
CommitResultAggregatorto aggregate all
AuthorshipReporter is responsible for analyzing the whitelisted files, traces the original author for each line of text/code, and generating an
AuthorshipSummary for each repository.
AuthorshipSummary contains the analysis results of the whitelisted files and the number of line contributions each author made.
FileInfoExtractorto traverse the repository to find all relevant files.
FileInfofor each relevant file, which contains the path to the file and a list of
LineInforepresenting each line of the file.
FileInfoAnalyzerto analyze each file, using
git blameor annotations, and finds the
FileResultfor each file, which consolidates the authorship results into a Map of each author's line contribution to the file.
FileResultAggregatorto aggregate all
GitCloneAPI in a multi-threaded fashion.
AuthorshipReporterin a multi-threaded fashion.
AuthorshipReporterto produce the commit and authorship summary, respectively.
JSONfiles needed to generate the
System contains the classes that interact with the Operating System and external processes.
CommandRunnercreates processes that execute commands on the terminal. It consists of many git commands.
java.util.loggingpackage for logging. The
LogsManagerclass is used to manage the logging levels and logging destinations. Log messages are output through:
Consoleand to a
ReportServerstarts a server to display the report on the browser. It depends on the
Model holds the data structures that are commonly used by the different aspects of RepoSense.
GitHub IDof an author. Any contributions or commits made by the author, using his/her
GitHub IDor aliases, will be attributed to the same
CommitsReporteruse it to attribute the commit and file contributions to the respective authors.
CliArgumentsstores the parsed command-line arguments supplied by the user. It contains the configuration settings such as the CSV config file to read from, the directory to output the report to, and the date range of commits to analyze. These configuration settings are passed into
FileTypeManagerstores the file format to be analyzed and the custom groups specified by the user for any repository.
RepoConfigurationstores the configuration information from the CSV config file for a single repository: the repository's organization, name, branch, list of authors to analyse, date range to analyze commits, and files from
CliArguments. This configuration information is used by:
GitCloneto determine the location to clone the repository from and which branch to check out to.
CommitsReporterto determine the range of commits and files to analyze.
ReportGeneratorto determine the directory to output the report.