for (int t = 0; t < targetSet.size(); t++) { if (!scopeSet.contains(targetSet.elementAt(t))) { return PROBLEM_FOUND; } }
if ((targetSet!=null) && (scopeSet!=null)) { for (int t = 0; t < targetSet.size(); t++) { if (!scopeSet.contains(targetSet.elementAt(t))) { return PROBLEM_FOUND; } } }
  public boolean predicate(Object dm, org.argouml.cognitive.Designer dsgr) {	//check if the given object is a context based constraint	if (!(dm instanceof MContextbasedConstraintImpl)) {	  return NO_PROBLEM;	}	//get ContextBasedConstraint and check if the type is correct	MContextbasedConstraintImpl cocon = (MContextbasedConstraintImpl)dm;        // do this check incase a cocon has just been instantiated        // and no type has been set        if (cocon.getCoConType()==null) {          return NO_PROBLEM;        }	if (cocon.getCoConType().equals(CoConTypes.NOT_THE_SAME_AS_TYPE)) {	  cocon.update();	  Vector targetSet = cocon.getTargetElements();	  Vector scopeSet = cocon.getScopedElements();	  for (int t = 0; t < targetSet.size(); t++) {	if (!scopeSet.contains(targetSet.elementAt(t))) {	  return PROBLEM_FOUND;	}	  }	}	return NO_PROBLEM;  }