Source:
<code>public static @Nullable String compileNamedAction(AnalysisCompilationData analysisData, Element namedEl) { String actionId = namedEl.getAttribute(TmfXmlStrings.ID); if (actionId.isEmpty()) { Activator.logError("The action should have an ID attribute"); return null; } List<@Nullable Element> childElements = XmlUtils.getChildElements(namedEl); List<TmfXmlActionCu> actionList = new ArrayList<>(); for (Element child : childElements) { final @NonNull Element nonNullChild = NonNullUtils.checkNotNull(child); switch (nonNullChild.getNodeName()) { case TmfXmlStrings.STATE_CHANGE: { TmfXmlActionCu action = compile(analysisData, nonNullChild); if (action == null) { return null; } actionList.add(action); } break; case TmfXmlStrings.FSM_SCHEDULE_ACTION: Activator.logWarning("Action " + TmfXmlStrings.FSM_SCHEDULE_ACTION + " is not supported yet, it will have no effect"); break; case TmfXmlStrings.SEGMENT: { TmfXmlActionCu action = compileSegmentAction(analysisData, nonNullChild); if (action == null) { return null; } actionList.add(action); } break; case TmfXmlStrings.ACTION: { String subActionId = compileNamedAction(analysisData, nonNullChild); if (subActionId == null) { return null; } TmfXmlActionCu action = analysisData.getAction(subActionId); if (action == null) { return null; } actionList.add(action); } break; default: Activator.logError("Invalid action type : " + nonNullChild.getNodeName()); } } TmfXmlActionCu actionCu = null; if (actionList.size() == 1) { actionCu = actionList.get(0); <START> } else { <END> actionCu = new TmfXmlActionListCu(actionList); } analysisData.addAction(actionId, actionCu); return actionId; }</code><technical_language>empty condition too</technical_language>

Target:
public static @Nullable String compileNamedAction(AnalysisCompilationData analysisData, Element namedEl) { String actionId = namedEl.getAttribute(TmfXmlStrings.ID); if (actionId.isEmpty()) { Activator.logError("The action should have an ID attribute"); return null; } List<@Nullable Element> childElements = XmlUtils.getChildElements(namedEl); List<TmfXmlActionCu> actionList = new ArrayList<>(); for (Element child : childElements) { final @NonNull Element nonNullChild = NonNullUtils.checkNotNull(child); switch (nonNullChild.getNodeName()) { case TmfXmlStrings.STATE_CHANGE: { TmfXmlActionCu action = compile(analysisData, nonNullChild); if (action == null) { return null; } actionList.add(action); } break; case TmfXmlStrings.FSM_SCHEDULE_ACTION: Activator.logWarning("Action " + TmfXmlStrings.FSM_SCHEDULE_ACTION + " is not supported yet, it will have no effect"); break; case TmfXmlStrings.SEGMENT: { TmfXmlActionCu action = compileSegmentAction(analysisData, nonNullChild); if (action == null) { return null; } actionList.add(action); } break; case TmfXmlStrings.ACTION: { String subActionId = compileNamedAction(analysisData, nonNullChild); if (subActionId == null) { return null; } TmfXmlActionCu action = analysisData.getAction(subActionId); if (action == null) { return null; } actionList.add(action); } break; default: Activator.logError("Invalid action type : " + nonNullChild.getNodeName()); } } TmfXmlActionCu actionCu = null; if (actionList.size() == 0) { actionCu = NO_ACTION_CU; } else if (actionList.size() == 1) { actionCu = actionList.get(0); } else { actionCu = new TmfXmlActionListCu(actionList); } analysisData.addAction(actionId, actionCu); return actionId; }