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.
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.
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.
GitUtil: Contains helper functions used by the other Git classes above.
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 the statistics of each commit made within 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 white listed 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 white listed files and the amount 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 to clone the repository from GitHub.
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 executes 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
Authorobject. It is used by
CommitsReporterto 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 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, which are the repository's orgarization, name, branch, list of authors to analyse, date range to analyze commits and files from
CliArguments. These configuration information are 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.