Source:
<code>protected void validateProjectActions(Factory factory) throws ConflictException { <START> if (factory.getV() == null || !factory.getV().equals("2.1") || factory.getIde() == null) { <END> return; } List<Action> applicationActions = new ArrayList<>(); if (factory.getIde().getOnAppClosed() != null) { applicationActions.addAll(factory.getIde().getOnAppClosed().getActions()); } if (factory.getIde().getOnAppLoaded() != null) { applicationActions.addAll(factory.getIde().getOnAppLoaded().getActions()); } for (Action applicationAction : applicationActions) { String id = applicationAction.getId(); if (id.equals("openFile") || id.equals("findReplace")) { throw new ConflictException(String.format(FactoryConstants.INVALID_ACTION_SECTION, id)); } } final OnAppLoaded onAppLoaded = factory.getIde().getOnAppLoaded(); if (onAppLoaded != null) { final List<Action> actions = onAppLoaded.getActions(); if (actions != null) { for (Action action : actions) { final Map<String, String> properties = action.getProperties(); if ("openWelcomePage".equals(action.getId()) && (isNullOrEmpty(properties.get("nonAuthenticatedContentUrl")) || isNullOrEmpty(properties.get("authenticatedContentUrl")))) { throw new ConflictException(INVALID_WELCOME_PAGE_ACTION); } } } } OnProjectOpened onOpened = factory.getIde().getOnProjectOpened(); if (onOpened != null) { List<Action> onProjectOpenedActions = onOpened.getActions(); for (Action applicationAction : onProjectOpenedActions) { String id = applicationAction.getId(); Map<String, String> properties = applicationAction.getProperties(); switch (id) { case "openFile": if (isNullOrEmpty(properties.get("file"))) { throw new ConflictException(INVALID_OPENFILE_ACTION); } break; case "findReplace": if (isNullOrEmpty(properties.get("in")) || isNullOrEmpty(properties.get("find")) || isNullOrEmpty(properties.get("replace"))) { throw new ConflictException(INVALID_FIND_REPLACE_ACTION); } break; } } } }</code><technical_language>"2.1".equals(factory.getv())</technical_language>

Target:
protected void validateProjectActions(Factory factory) throws ConflictException { if (!"2.1".equals(factory.getV()) || factory.getIde() == null) { return; } List<Action> applicationActions = new ArrayList<>(); if (factory.getIde().getOnAppClosed() != null) { applicationActions.addAll(factory.getIde().getOnAppClosed().getActions()); } if (factory.getIde().getOnAppLoaded() != null) { applicationActions.addAll(factory.getIde().getOnAppLoaded().getActions()); } for (Action applicationAction : applicationActions) { String id = applicationAction.getId(); if ("openFile".equals(id) || "findReplace".equals(id)) { throw new ConflictException(String.format(FactoryConstants.INVALID_ACTION_SECTION, id)); } } final OnAppLoaded onAppLoaded = factory.getIde().getOnAppLoaded(); if (onAppLoaded != null) { final List<Action> actions = onAppLoaded.getActions(); if (actions != null) { for (Action action : actions) { final Map<String, String> properties = action.getProperties(); if ("openWelcomePage".equals(action.getId()) && (isNullOrEmpty(properties.get("nonAuthenticatedContentUrl")) || isNullOrEmpty(properties.get("authenticatedContentUrl")))) { throw new ConflictException(INVALID_WELCOME_PAGE_ACTION); } } } } OnProjectOpened onOpened = factory.getIde().getOnProjectOpened(); if (onOpened != null) { List<Action> onProjectOpenedActions = onOpened.getActions(); for (Action applicationAction : onProjectOpenedActions) { String id = applicationAction.getId(); Map<String, String> properties = applicationAction.getProperties(); switch (id) { case "openFile": if (isNullOrEmpty(properties.get("file"))) { throw new ConflictException(INVALID_OPENFILE_ACTION); } break; case "findReplace": if (isNullOrEmpty(properties.get("in")) || isNullOrEmpty(properties.get("find")) || isNullOrEmpty(properties.get("replace"))) { throw new ConflictException(INVALID_FIND_REPLACE_ACTION); } break; } } } }