Version middleVersion = null;
int top = 0, bottom = modules.size() - 1, middle = 0;
while (top <= bottom)
{
middle = (bottom - top) / 2 + top;
<BUG>middleVersion = ((IModule) modules.get(middle)).getVersion();
int cmp = middleVersion.compareTo(version);</BUG>
if (cmp < 0)
{
bottom = middle - 1;

Version middleVersion = null;
int top = 0, bottom = modules.size() - 1, middle = 0;
while (top <= bottom)
{
middle = (bottom - top) / 2 + top;
middleVersion = ((Module) modules.get(middle)).getVersion();
int cmp = middleVersion.compareTo(version);
if (cmp < 0)
{
bottom = middle - 1;
