@Override
 public Object[] getViolationParameters(DataPoint point) {
   return new String[] {
     ((ASTMethodDeclaration) point.getNode()).getMethodName(),
     String.valueOf((int) point.getScore())
   };
 }
Exemple #2
0
 public int compareTo(DataPoint rhs) {
   Double lhsScore = new Double(score);
   Double rhsScore = new Double(rhs.getScore());
   if (lhsScore.doubleValue() != rhsScore.doubleValue()) {
     return lhsScore.compareTo(rhsScore);
   }
   return random - rhs.random;
 }