Exemplo n.º 1
0
 @Override
 public Object[] getViolationParameters(DataPoint point) {
   return new String[] {
     ((ASTMethodDeclaration) point.getNode()).getMethodName(),
     String.valueOf((int) point.getScore())
   };
 }
Exemplo n.º 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;
 }