Search in sources :

Example 16 with LogCommitInfo

use of aserg.gtf.model.LogCommitInfo 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);
            }
        }
    }
}
Also used : LogCommitInfo(aserg.gtf.model.LogCommitInfo) LineInfo(aserg.gtf.util.LineInfo)

Aggregations

LogCommitInfo (aserg.gtf.model.LogCommitInfo)16 ArrayList (java.util.ArrayList)7 List (java.util.List)6 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)6 LogCommitFileInfo (aserg.gtf.model.LogCommitFileInfo)3 NewFileInfo (aserg.gtf.model.NewFileInfo)3 Repository (aserg.gtf.model.authorship.Repository)3 DOACalculator (aserg.gtf.task.DOACalculator)3 HashMap (java.util.HashMap)3 HashSet (java.util.HashSet)3 GreedyTruckFactor (aserg.gtf.truckfactor.GreedyTruckFactor)2 TFInfo (aserg.gtf.truckfactor.TFInfo)2 TruckFactor (aserg.gtf.truckfactor.TruckFactor)2 LineInfo (aserg.gtf.util.LineInfo)2 BufferedReader (java.io.BufferedReader)2 FileReader (java.io.FileReader)2 IOException (java.io.IOException)2 Date (java.util.Date)2 Status (aserg.gtf.model.Status)1 AuthorshipInfo (aserg.gtf.model.authorship.AuthorshipInfo)1