Source:
<code>private <T extends Connection> void parseConnectionList(Node n, T conTemplate, EList<T> connectionlist) { NodeList childNodes = n.getChildNodes(); <START> for (int i = 0; i < childNodes.getLength(); i++) { <END> Node connectionNode = childNodes.item(i); if (LibraryElementTags.CONNECTION_ELEMENT.equals(connectionNode.getNodeName())) { T connection = EcoreUtil.copy(conTemplate); connection.setResTypeConnection(false); NamedNodeMap connectionAttributeMap = connectionNode.getAttributes(); Node destinationElement = connectionAttributeMap.getNamedItem(LibraryElementTags.DESTINATION_ATTRIBUTE); if (destinationElement != null) { IInterfaceElement destination = getConnectionEndPoint(destinationElement.getNodeValue()); if (null != destination) { connection.setDestination(destination); } else { Activator.getDefault() .logError("Connection destination not found: " + destinationElement.getNodeValue()); continue; } } Node sourceElement = connectionAttributeMap.getNamedItem(LibraryElementTags.SOURCE_ATTRIBUTE); if (sourceElement != null) { IInterfaceElement source = getConnectionEndPoint(sourceElement.getNodeValue()); if (null != source) { connection.setSource(source); } else { Activator.getDefault().logError("Connection source not found: " + sourceElement.getNodeValue()); continue; } } Node commentElement = connectionAttributeMap.getNamedItem(LibraryElementTags.COMMENT_ATTRIBUTE); if (commentElement != null) { connection.setComment(commentElement.getNodeValue()); } parseConnectionRouting(connectionAttributeMap, connection); connectionlist.add(connection); } } }</code><technical_language>for condition</technical_language>

Target:
private <T extends Connection> void parseConnectionList(Node n, T conTemplate, EList<T> connectionlist) { NodeList childNodes = n.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node connectionNode = childNodes.item(i); if (LibraryElementTags.CONNECTION_ELEMENT.equals(connectionNode.getNodeName())) { T connection = EcoreUtil.copy(conTemplate); connection.setResTypeConnection(false); NamedNodeMap connectionAttributeMap = connectionNode.getAttributes(); Node destinationElement = connectionAttributeMap.getNamedItem(LibraryElementTags.DESTINATION_ATTRIBUTE); if (destinationElement != null) { IInterfaceElement destination = getConnectionEndPoint(destinationElement.getNodeValue()); if (null != destination) { connection.setDestination(destination); } else { Activator.getDefault() .logError("Connection destination not found: " + destinationElement.getNodeValue()); continue; } } Node sourceElement = connectionAttributeMap.getNamedItem(LibraryElementTags.SOURCE_ATTRIBUTE); if (null != sourceElement) { IInterfaceElement source = getConnectionEndPoint(sourceElement.getNodeValue()); if (null != source) { connection.setSource(source); } else { Activator.getDefault().logError("Connection source not found: " + sourceElement.getNodeValue()); continue; } } Node commentElement = connectionAttributeMap.getNamedItem(LibraryElementTags.COMMENT_ATTRIBUTE); if (null != commentElement) { connection.setComment(commentElement.getNodeValue()); } parseConnectionRouting(connectionAttributeMap, connection); connectionlist.add(connection); } } }