示例#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;
 }
示例#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;
 }