public static boolean hasViolation(ContractViolation violation){
  for (  ContractViolation oldViolation : violations) {
    if (oldViolation.same(violation))     return true;
  }
  return false;
}

public static boolean hasViolation ( ContractViolation violation ) { for ( ContractViolation oldViolation : violations ) { if ( oldViolation . same ( violation ) ) return true ; } return false ; }
determine if we already have an instance of this violation
