import org.codehaus.groovy.syntax.Types;
import java.beans.PropertyVetoException;
import java.beans.VetoableChangeListener;
import java.beans.VetoableChangeSupport;
import java.util.Collection;
<BUG>public class ConstrainedASTTransformation extends BoundASTTransformation {
protected FieldNode vcsField;</BUG>
public static boolean hasConstrainedAnnotation(AnnotatedNode node) {
for (AnnotationNode annotation : (Collection<AnnotationNode>) node.getAnnotations()) {
<BUG>if (Constrained.class.getName().equals(annotation.getClassNode().getName())) {
</BUG>
return true;

import org.codehaus.groovy.syntax.Types;
import java.beans.PropertyVetoException;
import java.beans.VetoableChangeListener;
import java.beans.VetoableChangeSupport;
import java.util.Collection;
public class ConstrainedASTTransformation extends BoundASTTransformation {
protected static ClassNode constrainedClassNode = new ClassNode(Constrained.class);
protected ClassNode vcsClassNode = new ClassNode(VetoableChangeSupport.class);
protected FieldNode vcsField;
public static boolean hasConstrainedAnnotation(AnnotatedNode node) {
for (AnnotationNode annotation : (Collection<AnnotationNode>) node.getAnnotations()) {
if (constrainedClassNode.equals(annotation.getClassNode())) {
return true;
