Source:
<code>public void checkUnusedExit(final Exit exit) { <START> if (!(exit.getParentRegion().getComposite() instanceof org.yakindu.sct.model.sgraph.State) <END> || !exit.getOutgoingTransitions().isEmpty()) { return; } org.yakindu.sct.model.sgraph.State state = (org.yakindu.sct.model.sgraph.State) exit.getParentRegion() .getComposite(); if (!exit.isDefault()) { boolean hasOutgoingTransition = false; boolean equalsOutgoingTransition = false; Iterator<Transition> transitionIt = state.getOutgoingTransitions().iterator(); while (transitionIt.hasNext() && !hasOutgoingTransition) { Transition transition = transitionIt.next(); hasOutgoingTransition = STextValidationModelUtils.isDefaultExitTransition(transition) || STextValidationModelUtils.isNamedExitTransition(transition, exit.getName()); } if (!hasOutgoingTransition) { error(EXIT_UNUSED, exit, null, -1); } for (Transition transition : state.getOutgoingTransitions()) { for (ReactionProperty property : transition.getProperties()) { if (property instanceof ExitPointSpec) { String exitpoint = ((ExitPointSpec) property).getExitpoint(); if (exitpoint.equals(exit.getName())) { equalsOutgoingTransition = true; } } } } if (!equalsOutgoingTransition) { warning(EXIT_NEVER_USED + "'" + exit.getName() + "'", exit, null, -1); } } else { boolean hasOutgoingTransition = false; Iterator<Transition> transitionIt = state.getOutgoingTransitions().iterator(); while (transitionIt.hasNext() && !hasOutgoingTransition) { hasOutgoingTransition = STextValidationModelUtils.isDefaultExitTransition(transitionIt.next()); } if (!hasOutgoingTransition) { error(EXIT_UNUSED, exit, null, -1); } } }</code><technical_language>version more readable in opinion condition contains more parenthesis, wrapping multiple lines</technical_language>

Target:
public void checkUnusedExit(final Exit exit) { if (exit.getParentRegion().getComposite() instanceof org.yakindu.sct.model.sgraph.State && exit.getOutgoingTransitions().isEmpty()) { org.yakindu.sct.model.sgraph.State state = (org.yakindu.sct.model.sgraph.State) exit.getParentRegion() .getComposite(); if (!exit.isDefault()) { boolean hasOutgoingTransition = false; boolean equalsOutgoingTransition = false; Iterator<Transition> transitionIt = state.getOutgoingTransitions().iterator(); while (transitionIt.hasNext() && !hasOutgoingTransition) { Transition transition = transitionIt.next(); hasOutgoingTransition = STextValidationModelUtils.isDefaultExitTransition(transition) || STextValidationModelUtils.isNamedExitTransition(transition, exit.getName()); } if (!hasOutgoingTransition) { error(EXIT_UNUSED, exit, null, -1); } for (Transition transition : state.getOutgoingTransitions()) { for (ReactionProperty property : transition.getProperties()) { if (property instanceof ExitPointSpec) { String exitpoint = ((ExitPointSpec) property).getExitpoint(); if (exitpoint.equals(exit.getName())) { equalsOutgoingTransition = true; } } } } if (!equalsOutgoingTransition) { warning(EXIT_NEVER_USED + "'" + exit.getName() + "'", exit, null, -1); } } else { boolean hasOutgoingTransition = false; Iterator<Transition> transitionIt = state.getOutgoingTransitions().iterator(); while (transitionIt.hasNext() && !hasOutgoingTransition) { hasOutgoingTransition = STextValidationModelUtils.isDefaultExitTransition(transitionIt.next()); } if (!hasOutgoingTransition) { error(EXIT_UNUSED, exit, null, -1); } } } }