public boolean oneIncomingTransitionEntersCompositeWithEntryActions(State state){
  Set<State> targetParentStates=new HashSet<State>(getParentStates(state));
  for (  Transition transition : state.getIncomingTransitions()) {
    Set<State> sourceParentStates=getParentStates(transition.getSource());
    Set<State> crossedStates=new HashSet<State>(targetParentStates);
    crossedStates.removeAll(sourceParentStates);
    for (    State crossedCompositeState : crossedStates) {
      if (hasEntryAction(crossedCompositeState))       return true;
    }
  }
  return false;
}

public boolean oneIncomingTransitionEntersCompositeWithEntryActions ( State state ) { Set < State > targetParentStates = new HashSet < State > ( getParentStates ( state ) ) ; for ( Transition transition : state . getIncomingTransitions ( ) ) { Set < State > sourceParentStates = getParentStates ( transition . getSource ( ) ) ; Set < State > crossedStates = new HashSet < State > ( targetParentStates ) ; crossedStates . removeAll ( sourceParentStates ) ; for ( State crossedCompositeState : crossedStates ) { if ( hasEntryAction ( crossedCompositeState ) ) return true ; } } return false ; }
checks if at least one of the incoming transitions of the specified state enters a parent composite of this state which has entry actions .
