Source:
<code>public EList<Widget> renderWidget(Widget w, StringBuilder sb) throws RenderException { Colorpicker cp = (Colorpicker) w; String snippetName = "colorpicker"; String snippet = getSnippet(snippetName); String frequency = cp.getFrequency()==0 ? "200" : Integer.toString(cp.getFrequency()); State state = itemUIRegistry.getState(cp); String hexValue = "#ffffff"; if(state instanceof HSBType) { HSBType hsbState = (HSBType) state; Color color = hsbState.toColor(); hexValue = "#" + Integer.toHexString(color.getRGB()).substring(2); } String label = getLabel(cp); String purelabel = label; if(label.contains("<span>")) { purelabel = purelabel.substring(0, label.indexOf("<span>")); } snippet = StringUtils.replace(snippet, "%id%", itemUIRegistry.getWidgetId(cp)); snippet = StringUtils.replace(snippet, "%icon%", escapeURLPath(itemUIRegistry.getIcon(cp))); snippet = StringUtils.replace(snippet, "%item%", w.getItem()); snippet = StringUtils.replace(snippet, "%label%", label); snippet = StringUtils.replace(snippet, "%purelabel%", purelabel); snippet = StringUtils.replace(snippet, "%state%", hexValue); snippet = StringUtils.replace(snippet, "%frequency%", frequency); snippet = StringUtils.replace(snippet, "%servletname%", WebAppServlet.SERVLET_NAME); String style = ""; String color = itemUIRegistry.getLabelColor(w); if(color != null) <START> style = "color:"+ color; <END> snippet = StringUtils.replace(snippet, "%labelstyle%", style); style = ""; color = itemUIRegistry.getValueColor(w); if(color != null) style = "color:"+ color; snippet = StringUtils.replace(snippet, "%valuestyle%", style); sb.append(snippet); return null; }</code><technical_language>curly braces please</technical_language>

Target:
public EList<Widget> renderWidget(Widget w, StringBuilder sb) throws RenderException { Colorpicker cp = (Colorpicker) w; String snippetName = "colorpicker"; String snippet = getSnippet(snippetName); String frequency = cp.getFrequency()==0 ? "200" : Integer.toString(cp.getFrequency()); State state = itemUIRegistry.getState(cp); String hexValue = "#ffffff"; if(state instanceof HSBType) { HSBType hsbState = (HSBType) state; Color color = hsbState.toColor(); hexValue = "#" + Integer.toHexString(color.getRGB()).substring(2); } String label = getLabel(cp); String purelabel = label; if(label.contains("<span>")) { purelabel = purelabel.substring(0, label.indexOf("<span>")); } snippet = StringUtils.replace(snippet, "%id%", itemUIRegistry.getWidgetId(cp)); snippet = StringUtils.replace(snippet, "%icon%", escapeURLPath(itemUIRegistry.getIcon(cp))); snippet = StringUtils.replace(snippet, "%item%", w.getItem()); snippet = StringUtils.replace(snippet, "%label%", label); snippet = StringUtils.replace(snippet, "%purelabel%", purelabel); snippet = StringUtils.replace(snippet, "%state%", hexValue); snippet = StringUtils.replace(snippet, "%frequency%", frequency); snippet = StringUtils.replace(snippet, "%servletname%", WebAppServlet.SERVLET_NAME); String style = ""; String color = itemUIRegistry.getLabelColor(w); if(color != null) { style = "color:"+ color; } snippet = StringUtils.replace(snippet, "%labelstyle%", style); style = ""; color = itemUIRegistry.getValueColor(w); if(color != null) { style = "color:"+ color; } snippet = StringUtils.replace(snippet, "%valuestyle%", style); sb.append(snippet); return null; }