use of aserg.gtf.model.authorship.Repository in project Truck-Factor by aserg-ufmg.
the class RepositoryDAO method update.
public void update(Repository o) {
Repository persistedRepository = this.em.find(Repository.class, o.getId());
if (persistedRepository != null) {
persistedRepository.setAuthorshipInfoMap(o.getAuthorshipInfoMap());
persistedRepository.setDevelopers(o.getDevelopers());
persistedRepository.setFiles(o.getFiles());
persistedRepository.setFullName(o.getFullName());
persistedRepository.setStatus(o.getStatus());
super.merge(persistedRepository);
}
}
use of aserg.gtf.model.authorship.Repository 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);
}
}
}
Aggregations