rvasa / jseat

Automatically exported from code.google.com/p/jseat
0 stars 0 forks source link

Cannot handle out of order releases or history sets with missing versions #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Background:
Problem one: Missing versions. For example if we had a versions file like 
(see below) where a bunch of versions are missing this history does not 
know how to retrieve them because there is only four versions in the 
dataset. Retrieving version 5 or higher will cause a NullPointerException.

This will be required when comparing individual releases of software 
systems. Say comparing just release 5 across a system.

$Eclipse
$1, 3.0M1, eclipse-3.0M1
#2, 3.0M2, eclipse-3.0M2
#3, 3.0M3, eclipse-3.0M3
#4, 3.0M4, eclipse-3.0M4
5, 3.0M5, eclipse-3.0M5
6, 3.0M6, eclipse-3.0M6
#7, 3.0M7, eclipse-3.0M7
#8, 3.0M8, eclipse-3.0M8
9, 3.0M9, eclipse-3.0M9

Problem 2: Post processing, reporting and for loops in general.
For loops are a common way to request versions at the moment whilst the 
data loader does not provide an iterator. It is generally convenient to 
code the index starting from 1 or 2 depending on the usage assuming you 
are starting from the first or second release. If you do not have these 
releases the version actually in the respective position in the history 
data set will not be found.

    for (int i = 2; i <= hmd.size(); i++)
    {
    VersionMetricData vmd = hmd.getVersion(i - 1);
    // Get next version
    VersionMetricData vmd2 = hmd.getVersion(i);
        // ...
    }

In the above example the first version in the data set is RSN 5. This 
would not work.

Proposed Solution:
Change the behaviour of getVersion(...) to work with an absolute or 
relative position in the dataset; performing an absolute check first and 
failing that, a relative check to find the correct index.

Original issue reported on code.google.com by jtha...@gmail.com on 29 Aug 2007 at 7:58

GoogleCodeExporter commented 9 years ago
Fixed:
All required methods have been updated to work with a relative or absolute 
version 
index.

getVersion(...);
getNameOf(...);
getPathOf(...);

Original comment by jtha...@gmail.com on 29 Aug 2007 at 8:03