Program: 74642
Project: 74642
Buggy source:
private boolean _matchCompositeEntity(CompositeEntity lhsEntity,CompositeEntity hostEntity){
  int matchSize=_match.size();
  FastLinkedList<MarkedEntityList> lhsMarkedList=new FastLinkedList<MarkedEntityList>();
  ComponentEntity lhsNextActor=_findFirstChild(lhsEntity,lhsMarkedList,_match.keySet());
  boolean success=true;
  boolean firstEntrance=!_match.containsKey(lhsEntity);
  if (firstEntrance) {
    _match.put(lhsEntity,hostEntity);
    if (lhsEntity instanceof CompositeActor && ((CompositeActor)lhsEntity).isOpaque()) {
      Director lhsDirector=((CompositeActor)lhsEntity).getDirector();
      if (hostEntity instanceof CompositeActor && ((CompositeActor)hostEntity).isOpaque()) {
        Director hostDirector=((CompositeActor)hostEntity).getDirector();
        success=_matchDirector(lhsDirector,hostDirector);
      }
 else {
        success=false;
      }
    }
  }
  if (success) {
    if (lhsNextActor != null) {
      int matchSize2=_match.size();
      FastLinkedList<Object>.Entry lhsTail=_lhsFrontier.getTail();
      FastLinkedList<Object>.Entry hostTail=_hostFrontier.getTail();
      FastLinkedList<CompositeEntity>.Entry compositeTail=null;
      if (firstEntrance) {
        _visitedLHSCompositeEntities.add(lhsEntity);
        compositeTail=_visitedLHSCompositeEntities.getTail();
      }
      FastLinkedList<MarkedEntityList> hostMarkedList=new FastLinkedList<MarkedEntityList>();
      ComponentEntity hostNextActor=_findFirstChild(hostEntity,hostMarkedList,_match.values());
      success=false;
      while (!success && hostNextActor != null) {
        _lhsFrontier.add(lhsNextActor);
        _lhsObjects.add(lhsNextActor);
        _hostFrontier.add(hostNextActor);
        if (_matchEntryList(lhsTail.getNext(),hostTail.getNext())) {
          success=true;
        }
 else {
          _match.retain(matchSize2);
          _hostFrontier.removeAllAfter(hostTail);
          _lhsFrontier.removeAllAfter(lhsTail);
          if (firstEntrance) {
            _visitedLHSCompositeEntities.removeAllAfter(compositeTail);
          }
          hostNextActor=_findNextChild(hostEntity,hostMarkedList,_match.values());
        }
      }
      if (!success && firstEntrance) {
        compositeTail.remove();
      }
    }
 else {
      success=_lhsObjects.size() == _match.size() ? _callback.foundMatch(this) : true;
    }
  }
  if (!success && firstEntrance) {
    _match.retain(matchSize);
  }
  return success;
}

Fixed version (ground truth):
private boolean _matchCompositeEntity(CompositeEntity lhsEntity,CompositeEntity hostEntity){
  int matchSize=_match.size();
  FastLinkedList<MarkedEntityList> lhsMarkedList=new FastLinkedList<MarkedEntityList>();
  ComponentEntity lhsNextActor=_findFirstChild(lhsEntity,lhsMarkedList,_match.keySet());
  boolean success=true;
  boolean firstEntrance=!_match.containsKey(lhsEntity);
  if (firstEntrance) {
    _match.put(lhsEntity,hostEntity);
    if (lhsEntity instanceof CompositeActor) {
      CompositeActor lhsComposite=(CompositeActor)lhsEntity;
      Director lhsDirector=lhsComposite.isOpaque() ? lhsComposite.getDirector() : null;
      if (hostEntity instanceof CompositeActor) {
        CompositeActor hostComposite=(CompositeActor)hostEntity;
        Director hostDirector=hostComposite.isOpaque() ? hostComposite.getDirector() : null;
        success=_matchDirector(lhsDirector,hostDirector);
      }
 else {
        success=false;
      }
    }
  }
  if (success) {
    if (lhsNextActor != null) {
      int matchSize2=_match.size();
      FastLinkedList<Object>.Entry lhsTail=_lhsFrontier.getTail();
      FastLinkedList<Object>.Entry hostTail=_hostFrontier.getTail();
      FastLinkedList<CompositeEntity>.Entry compositeTail=null;
      if (firstEntrance) {
        _visitedLHSCompositeEntities.add(lhsEntity);
        compositeTail=_visitedLHSCompositeEntities.getTail();
      }
      FastLinkedList<MarkedEntityList> hostMarkedList=new FastLinkedList<MarkedEntityList>();
      ComponentEntity hostNextActor=_findFirstChild(hostEntity,hostMarkedList,_match.values());
      success=false;
      while (!success && hostNextActor != null) {
        _lhsFrontier.add(lhsNextActor);
        _lhsObjects.add(lhsNextActor);
        _hostFrontier.add(hostNextActor);
        if (_matchEntryList(lhsTail.getNext(),hostTail.getNext())) {
          success=true;
        }
 else {
          _match.retain(matchSize2);
          _hostFrontier.removeAllAfter(hostTail);
          _lhsFrontier.removeAllAfter(lhsTail);
          if (firstEntrance) {
            _visitedLHSCompositeEntities.removeAllAfter(compositeTail);
          }
          hostNextActor=_findNextChild(hostEntity,hostMarkedList,_match.values());
        }
      }
      if (!success && firstEntrance) {
        compositeTail.remove();
      }
    }
 else {
      success=_lhsObjects.size() == _match.size() ? _callback.foundMatch(this) : true;
    }
  }
  if (!success && firstEntrance) {
    _match.retain(matchSize);
  }
  return success;
}