Program: 74580
Project: 74580
Buggy source:
/** 
 * Test whether the composite entity is opaque or not. Return <tt>true</tt> if the composite entity is an instance of   {@link CompositeActor} and itis opaque. A composite actor is opaque if it has a director inside, which means the new level of hierarchy that it creates cannot be flattened.
 * @param entity The composite entity to be tested.
 * @return <tt>true</tt> if the composite entity is an instance of {@link CompositeActor} and it is opaque.
 */
private boolean _isOpaque(CompositeEntity entity){
  if (entity instanceof CompositeActor && ((CompositeActor)entity).isOpaque()) {
    return true;
  }
 else {
    if (entity.getName().equals("String_Node_Str")) {
      boolean x=false;
      x=!x;
    }
    NamedObj container=entity.getContainer();
    boolean isOpaque=false;
    while (container != null) {
      if (_match.containsValue(container)) {
        container=(NamedObj)_match.getKey(container);
      }
 else       if (_temporaryMatch.containsValue(container)) {
        container=(NamedObj)_temporaryMatch.getKey(container);
      }
      List<?> attributeList=container.attributeList(HierarchyFlatteningAttribute.class);
      if (!attributeList.isEmpty()) {
        HierarchyFlatteningAttribute attribute=(HierarchyFlatteningAttribute)attributeList.get(0);
        try {
          BooleanToken token=(BooleanToken)attribute.flatteningAttribute.getToken();
          isOpaque=!token.booleanValue();
          break;
        }
 catch (        IllegalActionException e) {
          return false;
        }
      }
      container=container.getContainer();
    }
    return isOpaque;
  }
}

Fixed version (ground truth):
/** 
 * Test whether the composite entity is opaque or not. Return <tt>true</tt> if the composite entity is an instance of   {@link CompositeActor} and itis opaque. A composite actor is opaque if it has a director inside, which means the new level of hierarchy that it creates cannot be flattened.
 * @param entity The composite entity to be tested.
 * @return <tt>true</tt> if the composite entity is an instance of {@link CompositeActor} and it is opaque.
 */
private boolean _isOpaque(CompositeEntity entity){
  if (entity instanceof CompositeActor && ((CompositeActor)entity).isOpaque()) {
    return true;
  }
 else {
    if (entity.getName().equals("String_Node_Str")) {
      boolean x=false;
      x=!x;
    }
    NamedObj container=entity.getContainer();
    boolean isOpaque=false;
    while (container != null) {
      if (_match.containsValue(container)) {
        container=(NamedObj)_match.getKey(container);
      }
 else       if (_temporaryMatch.containsValue(container)) {
        container=(NamedObj)_temporaryMatch.getKey(container);
      }
      List<?> attributeList=container.attributeList(HierarchyFlatteningAttribute.class);
      if (!attributeList.isEmpty()) {
        HierarchyFlatteningAttribute attribute=(HierarchyFlatteningAttribute)attributeList.get(0);
        try {
          BooleanToken token=(BooleanToken)attribute.parameter.getToken();
          isOpaque=!token.booleanValue();
          break;
        }
 catch (        IllegalActionException e) {
          return false;
        }
      }
      container=container.getContainer();
    }
    return isOpaque;
  }
}