Search in sources :

Example 1 with DeveloperDAO

use of aserg.gtf.dao.authorship.DeveloperDAO in project Truck-Factor by aserg-ufmg.

the class AliasesIdentifier method main.

public static void main(String[] args) {
    RepositoryDAO repDAO = new RepositoryDAO();
    DeveloperDAO devDAO = new DeveloperDAO();
    //StringUtils.getLevenshteinDistance("", "");
    for (Repository rep : repDAO.findAll()) {
        if (rep.getStatus() != RepositoryStatus.REMOVED) {
            joinAlias(rep.getFullName(), devDAO);
            List<Developer> developers = devDAO.getAllDevelopers(rep.getFullName());
            Map<Developer, List<Developer>> aliases = findAliases(developers, 1, 3);
            List<Developer> devAliases = treatAliases(rep.getFullName(), aliases);
            updateDeveloperAliases(devDAO, devAliases);
        }
    }
}
Also used : RepositoryDAO(aserg.gtf.dao.authorship.RepositoryDAO) DeveloperDAO(aserg.gtf.dao.authorship.DeveloperDAO) Repository(aserg.gtf.model.authorship.Repository) Developer(aserg.gtf.model.authorship.Developer) ArrayList(java.util.ArrayList) List(java.util.List) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList)

Aggregations

DeveloperDAO (aserg.gtf.dao.authorship.DeveloperDAO)1 RepositoryDAO (aserg.gtf.dao.authorship.RepositoryDAO)1 Developer (aserg.gtf.model.authorship.Developer)1 Repository (aserg.gtf.model.authorship.Repository)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)1