Source:
<code>private void updateNotationView(final Object propertyId, final Object value) { if (view != null && view.getStyles() != null) { for (Object notationStyle : view.getStyles()) { if (notationStyle instanceof FontStyle) { final FontStyle fontStyle = (FontStyle) notationStyle; <START> if (value instanceof List && !((List) value).isEmpty() && ((List) value).get(0) instanceof FontFormat && propertyId.equals(ViewpointPackage.Literals.BASIC_LABEL_STYLE__LABEL_FORMAT.getName())) { <END> @SuppressWarnings("unchecked") List<FontFormat> values = (List) value; if (!values.isEmpty()) { for (FontFormat fontFormat : values) { switch (fontFormat) { case BOLD_LITERAL: fontStyle.setBold(true); break; case ITALIC_LITERAL: fontStyle.setItalic(true); break; case UNDERLINE_LITERAL: fontStyle.setUnderline(true); break; case STRIKE_THROUGH_LITERAL: fontStyle.setStrikeThrough(true); break; default: fontStyle.setBold(false); fontStyle.setItalic(false); fontStyle.setUnderline(false); fontStyle.setStrikeThrough(false); break; } } } } else if (value instanceof Integer && propertyId.equals(ViewpointPackage.Literals.BASIC_LABEL_STYLE__LABEL_SIZE.getName())) { fontStyle.setFontHeight((Integer) value); } } else if (notationStyle instanceof ConnectorStyle) { ConnectorStyle connectorStyle = (ConnectorStyle) notationStyle; if (value instanceof EdgeRouting && propertyId.equals(DiagramPackage.Literals.EDGE_STYLE__ROUTING_STYLE.getName())) { if (EdgeRouting.MANHATTAN_LITERAL == value) { connectorStyle.setRouting(Routing.RECTILINEAR_LITERAL); } else if (EdgeRouting.STRAIGHT_LITERAL == value) { connectorStyle.setRouting(Routing.MANUAL_LITERAL); } else if (EdgeRouting.TREE_LITERAL == value) { connectorStyle.setRouting(Routing.TREE_LITERAL); } } } } } }</code><technical_language>This test done out of for loop</technical_language>

Target:
private void updateNotationView(final Object propertyId, final Object value) { if (view == null || view.getStyles() == null) { return; } for (Object notationStyle : view.getStyles()) { if (notationStyle instanceof FontStyle) { final FontStyle fontStyle = (FontStyle) notationStyle; if (propertyId.equals(ViewpointPackage.Literals.BASIC_LABEL_STYLE__LABEL_FORMAT.getName())) { fontStyle.setBold(false); fontStyle.setItalic(false); fontStyle.setUnderline(false); fontStyle.setStrikeThrough(false); if (value instanceof List && !((List) value).isEmpty() && ((List) value).get(0) instanceof FontFormat) { for (FontFormat fontFormat : (List<FontFormat>) value) { switch (fontFormat) { case BOLD_LITERAL: fontStyle.setBold(true); break; case ITALIC_LITERAL: fontStyle.setItalic(true); break; case UNDERLINE_LITERAL: fontStyle.setUnderline(true); break; case STRIKE_THROUGH_LITERAL: fontStyle.setStrikeThrough(true); break; default: break; } } } } else if (value instanceof Integer && propertyId.equals(ViewpointPackage.Literals.BASIC_LABEL_STYLE__LABEL_SIZE.getName())) { fontStyle.setFontHeight((Integer) value); } } else if (notationStyle instanceof ConnectorStyle) { ConnectorStyle connectorStyle = (ConnectorStyle) notationStyle; if (value instanceof EdgeRouting && propertyId.equals(DiagramPackage.Literals.EDGE_STYLE__ROUTING_STYLE.getName())) { if (EdgeRouting.MANHATTAN_LITERAL == value) { connectorStyle.setRouting(Routing.RECTILINEAR_LITERAL); } else if (EdgeRouting.STRAIGHT_LITERAL == value) { connectorStyle.setRouting(Routing.MANUAL_LITERAL); } else if (EdgeRouting.TREE_LITERAL == value) { connectorStyle.setRouting(Routing.TREE_LITERAL); } } } } }