Package com.softsizo.data

Examples of com.softsizo.data.LineCount


    final String addedLinesSeries = "Added LOC";
    long fromRevision = data.getRevisionRange().getFromRevision();
    long toRevision = data.getRevisionRange().getToRevision();
    for(long r = fromRevision; r <= toRevision; r++) {
      Long revision = new Long(r);
      LineCount lineCount = locByRevision.get(revision);
      if(lineCount!=null) {
        addedLines += lineCount.getNewLines();
        totalLines += lineCount.getNetLines();
      }
      dataset.addValue(addedLines, addedLinesSeries, revision);
      dataset.addValue(totalLines, totalLinesSeries, revision);
    }
    JFreeChart chart = ChartFactory.createLineChart(
View Full Code Here


     *            identified Change is added to this changeSet.
     *
     */
    public void parse(String diff, ChangeSet changeSet) {
        this.changeSet = changeSet;
        lineCount = new LineCount();
        versionedFile = null;
        String[] diffLines = diff.replaceAll("\r", "").split("\n");
        for (String diffLine : diffLines) {
            if(!parseFileName(diffLine))
                if(!parseMarkedAsBinaryFile(diffLine))
View Full Code Here

        if(versionedFile!=null){
            Change change = new Change(changeSet, versionedFile, lineCount);
            this.changeSet.addChange(change);
            this.versionedFile.addChange(change);
        }
        this.lineCount = new LineCount();
        this.versionedFile = null;
    }
View Full Code Here

            .setCurrentLoc(author2, 1);
        VersionedFile file2 = data.getFileByFilename("/trunk/dir2/file2")
            .setInitialLoc(author1, 10)
            .setCurrentLoc(author1, 94)
            .setCurrentLoc(author2, 8);
        data.addChangeSet(buildChangeSet(1, author1, file1, new LineCount(2, 0)))
          .addChangeSet(buildChangeSet(2, author2, file1, new LineCount(6, 3)))
          .addChangeSet(buildChangeSet(3, author1, file1, new LineCount(8, 5)))
          .addChangeSet(buildChangeSet(4, author1, file2, new LineCount(90, 7)))
          .addChangeSet(buildChangeSet(5, author2, file2, new LineCount(12, 25)))
          .addChangeSet(buildChangeSet(6, author1, file2, new LineCount(33, 11)))
            .addAuthor(author1)
            .addAuthor(author2)
            .setRevisionRange(revisionRange)
            .setRepository(repository);   
  }
View Full Code Here

        Author author2 = new Author("ivan");
        file.setInitialLoc(author1, 33);
        file.setInitialLoc(author2, 22);
        file.setCurrentLoc(author1, 47);
        file.setCurrentLoc(author2, 98);
        buildChangeSet(1, author1, file, new LineCount(10, 0));
        buildChangeSet(2, author2, file, new LineCount(100, 5));
        buildChangeSet(3, author1, file, new LineCount(10, 25));
        String authorsByFileReport = reportBuilder
                .renderAuthorsByFileReport(file);
        // test initial LOCs
        assertTrue(authorsByFileReport.contains("<td>33</td>"));
        assertTrue(authorsByFileReport.contains("<td>22</td>"));
View Full Code Here

TOP

Related Classes of com.softsizo.data.LineCount

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.