use of aserg.gtf.util.LineInfo in project Truck-Factor by aserg-ufmg.
the class GitTruckFactor method applyFilterFiles.
private static void applyFilterFiles(List<LineInfo> filteredFilesInfo, List<NewFileInfo> files) {
if (filteredFilesInfo != null) {
for (LineInfo lineInfo : filteredFilesInfo) {
String path = lineInfo.getValues().get(0);
for (NewFileInfo newFileInfo : files) {
if (newFileInfo.getPath().equals(path)) {
newFileInfo.setFiltered(true);
newFileInfo.setFilterInfo(lineInfo.getValues().get(1));
}
}
}
}
}
use of aserg.gtf.util.LineInfo in project Truck-Factor by aserg-ufmg.
the class GitTruckFactorRepList method applyFilterFiles.
private static void applyFilterFiles(List<LineInfo> filteredFilesInfo, List<NewFileInfo> files) {
if (filteredFilesInfo != null) {
for (LineInfo lineInfo : filteredFilesInfo) {
String path = lineInfo.getValues().get(0);
for (NewFileInfo newFileInfo : files) {
if (newFileInfo.getPath().equals(path)) {
newFileInfo.setFiltered(true);
newFileInfo.setFilterInfo(lineInfo.getValues().get(1));
System.out.println(path);
}
}
}
}
}
use of aserg.gtf.util.LineInfo in project Truck-Factor by aserg-ufmg.
the class NewAliasHandler method treatFileAlias.
private void treatFileAlias() {
for (LineInfo info : fileAliases) {
String rep = info.getRepositoryName();
String dev1 = info.getValues().get(0);
String dev2 = info.getValues().get(1);
String usernameDev1 = devNameMap.get(dev1.toUpperCase()).get(0).getUserName();
String usernameDev2 = devNameMap.get(dev2.toUpperCase()).get(0).getUserName();
String newUsername = usernameDev1.contains(usernameDev2) ? usernameDev1 : (usernameDev2.contains(usernameDev1) ? usernameDev2 : usernameDev1 + "$$" + usernameDev2);
for (LogCommitInfo commit : devUsernameMap.get(usernameDev1)) {
if (!commit.getUserName().equals(usernameDev2)) {
setNewUsername(commit, newUsername);
//commit.setUserName(newUsername);
}
}
for (LogCommitInfo commit : devUsernameMap.get(usernameDev2)) {
if (!commit.getUserName().equals(usernameDev1)) {
setNewUsername(commit, newUsername);
//commit.setUserName(newUsername);
}
}
}
}
use of aserg.gtf.util.LineInfo in project Truck-Factor by aserg-ufmg.
the class AliasHandler method treatFileAlias.
private void treatFileAlias(Map<String, List<LogCommitInfo>> namesMap, Collection<LogCommitInfo> commits) {
for (LineInfo info : fileAliases) {
String rep = info.getRepositoryName();
String dev1 = info.getValues().get(0);
String dev2 = info.getValues().get(1);
String mainUserName = namesMap.get(dev1.toUpperCase()).get(0).getUserName();
for (LogCommitInfo commit : commits) {
if (commit.getMainName().equalsIgnoreCase(dev2) && !commit.getUserName().equals(mainUserName)) {
commit.setUserName(mainUserName);
}
}
}
}
Aggregations