Search in sources :

Example 16 with NewFileInfo

use of aserg.gtf.model.NewFileInfo in project Truck-Factor by aserg-ufmg.

the class DOACalculator method getFiles.

private static List<File> getFiles(Repository repository, Collection<LogCommitInfo> commitFiles, List<NewFileInfo> filesInfo) {
    List<File> tempfiles = new ArrayList<File>();
    Map<String, List<LogCommitFileInfo>> mapFiles = getCommitFilesMap(commitFiles);
    for (NewFileInfo fileInfo : filesInfo) {
        if (!fileInfo.getFiltered()) {
            File file = new File(fileInfo.getPath());
            if (setFileHistory(file, repository, fileInfo, mapFiles))
                tempfiles.add(file);
        }
    }
    return tempfiles;
}
Also used : ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) File(aserg.gtf.model.authorship.File) NewFileInfo(aserg.gtf.model.NewFileInfo)

Aggregations

NewFileInfo (aserg.gtf.model.NewFileInfo)16 IOException (java.io.IOException)4 ArrayList (java.util.ArrayList)4 List (java.util.List)4 LogCommitInfo (aserg.gtf.model.LogCommitInfo)3 Repository (aserg.gtf.model.authorship.Repository)3 DOACalculator (aserg.gtf.task.DOACalculator)3 BufferedReader (java.io.BufferedReader)3 FileReader (java.io.FileReader)3 HashMap (java.util.HashMap)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 FileNotFoundException (java.io.FileNotFoundException)2 Date (java.util.Date)2 NewFileInfoDAO (aserg.gtf.dao.NewFileInfoDAO)1 File (aserg.gtf.model.authorship.File)1 NewAliasHandler (aserg.gtf.task.NewAliasHandler)1 FileInfoExtractor (aserg.gtf.task.extractor.FileInfoExtractor)1