if(name.startsWith("$$CP")) { int start = name.indexOf("."); String component = name.substring((start+1), name.indexOf(".", (start+1)));
if(name.startsWith("$$CP=")) { int start = name.indexOf("="); String component = name.substring(start+1);
  private void initTargetsFromDb() {    Map substitutions = new HashMap();    if (recipeId != null) {      substitutions.put(":recipe_id", recipeId);      try {	Connection conn = DBUtils.getConnection();	try {	  Statement stmt = conn.createStatement();	  String query = DBUtils.getQuery("queryRecipeProperties", substitutions);	  ResultSet rs = stmt.executeQuery(query);	  while (rs.next()) {            String name = rs.getString(1);            if(name.startsWith("$$CP")) {              int start = name.indexOf(".");              String component = name.substring((start+1), name.indexOf(".", (start+1)));              // Find the Component and add the Property              for(int i=0; i < getChildCount(); i++) {                ConfigurableComponent cc = (ConfigurableComponent)getChild(i);                if(cc.getShortName().equals(component)) {                  cc.addProperty(name.substring(name.lastIndexOf(".")+1), rs.getString(2));                }              }            }	  }	  rs.close();	  stmt.close();	} finally {	  conn.close();	}      } catch (Exception e) {        if(log.isErrorEnabled()) {          log.error("Exception", e);        }	throw new RuntimeException("Error" + e);      }    }      }