There was a problem fetching the pipeline stages.
Fix rounding error in ScoreBasedScoreCalculator
Cast int to double before division to avoid truncation of the division result. Changed corresponding test so that it fails with the old implementation. Cherry-picked and backported from GH-52.