public static IMouseStateChange exitNode(
      final CStateFactory<?, ?> m_factory,
      final MouseEvent event,
      final HitInfo hitInfo,
      final IMouseState state) {
    if (hitInfo.hasHitNodeLabels()) {
      throw new IllegalStateException();
    } else if (hitInfo.hasHitEdges()) {
      return CHitEdgesTransformer.enterEdge(m_factory, event, hitInfo);
    } else if (hitInfo.hasHitEdgeLabels()) {
      return CHitEdgeLabelsTransformer.enterEdgeLabel(m_factory, event, hitInfo);
    } else if (hitInfo.hasHitBends()) {
      return CHitBendsTransformer.enterBend(m_factory, event, hitInfo);
    } else if (hitInfo.hasHitPorts()) {
      return new CStateChange(state, true);
    } else {
      // TODO @Nils please check if this change does not break BinDiff behavior
      // It fixes case 4207.
      // return new CStateChange(m_factory.createDefaultState(), true);
      return new CStateChange(m_factory.createDefaultState(), false);
    }
  }
Changes the state depending on the hit information from a node state to a non node state.

@param m_factory The state factory for all states.
@param event The mouse event that caused the state change.
@param hitInfo The information about what was hit.
@param state The state which we come from.
@return The state object that describes the mouse state.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/editmode/transformations/CHitNodesTransformer.java