Exemplo n.º 1
0
 private Collection<VcsCommitInfo> getCommitsForProject(String projectId, Date from, Date to) {
   Collection<VcsCommitInfo> commits = myVcsProvider.getHistoryChunk(projectId, from, to);
   myHistoryCache.put(projectId, commits);
   long vcsRootId = commits.iterator().next().getVcsRootId();
   myCommitIndex = processIndices(commits);
   return commits;
 }
Exemplo n.º 2
0
 private List<Double> getBugFixTimes(String projectId, Date from, Date to) {
   List<Double> result = new ArrayList<>();
   Collection<VcsCommitInfo> commits = myVcsProvider.getHistoryChunk(projectId, from, to);
   Date start = commits.iterator().next().getDate();
   for (VcsCommitInfo commitInfo : commits) {
     if (VcsCommitInfoUtils.isRelatedToBugIssue(commitInfo)) {
       result.add(1.0 * (commitInfo.getDate().getTime() - start.getTime()) / (86400 * 1000));
     }
   }
   return result;
 }
Exemplo n.º 3
0
 public void process(String projectId) {
   ArrayList<VcsCommitInfo> allCommits = myVcsProvider.getProjectVcsHistory(projectId);
   Date from = allCommits.get(0).getDate();
   Date to = allCommits.get(allCommits.size() - 1).getDate();
   process(projectId, from, to);
 }