From 499e31b430f597e5aae5d7d75c5ad1e18e404f4e Mon Sep 17 00:00:00 2001 From: tsantalis Date: Fri, 16 Aug 2024 07:27:49 -0400 Subject: [PATCH] Add more information to ChangedFileInfo --- .../rm1/GitHistoryRefactoringMinerImpl.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/main/java/org/refactoringminer/rm1/GitHistoryRefactoringMinerImpl.java b/src/main/java/org/refactoringminer/rm1/GitHistoryRefactoringMinerImpl.java index 098d9f400..e611e7447 100644 --- a/src/main/java/org/refactoringminer/rm1/GitHistoryRefactoringMinerImpl.java +++ b/src/main/java/org/refactoringminer/rm1/GitHistoryRefactoringMinerImpl.java @@ -465,6 +465,9 @@ public static class ChangedFileInfo { private Map renamedFilesHint; private Set repositoryDirectoriesBefore; private Set repositoryDirectoriesCurrent; + private long commitTime; + private long authoredTime; + private String commitAuthorName; public ChangedFileInfo() { @@ -490,6 +493,22 @@ public ChangedFileInfo(String parentCommitId, String currentCommitId, this.currentCommitId = currentCommitId; } + public ChangedFileInfo(String parentCommitId, String currentCommitId, + List filesBefore, List filesCurrent, + Set repositoryDirectoriesBefore, Set repositoryDirectoriesCurrent, Map renamedFilesHint, + long commitTime, long authoredTime, String commitAuthorName) { + this.filesBefore = filesBefore; + this.filesCurrent = filesCurrent; + this.renamedFilesHint = renamedFilesHint; + this.repositoryDirectoriesBefore = repositoryDirectoriesBefore; + this.repositoryDirectoriesCurrent = repositoryDirectoriesCurrent; + this.parentCommitId = parentCommitId; + this.currentCommitId = currentCommitId; + this.commitTime = commitTime; + this.authoredTime = authoredTime; + this.commitAuthorName = commitAuthorName; + } + public String getParentCommitId() { return parentCommitId; } @@ -517,6 +536,18 @@ public Set getRepositoryDirectoriesCurrent() { public Map getRenamedFilesHint() { return renamedFilesHint; } + + public long getCommitTime() { + return commitTime; + } + + public long getAuthoredTime() { + return authoredTime; + } + + public String getCommitAuthorName() { + return commitAuthorName; + } } private ChangedFileInfo populateWithGitHubAPI(File projectFolder, String cloneURL, String currentCommitId) throws IOException {