code: public static String findRootInstancePath( String scopedInstancePath ) {
  
  		String result;
  		if( Utils.isEmptyOrWhitespaces( scopedInstancePath )) {
  			// Do not return null
  			result = "";
  
  		} else if( scopedInstancePath.contains( "/" )) {
  			// Be as flexible as possible with paths
  			String s = scopedInstancePath.replaceFirst( "^/*", "" );
  			int index = s.indexOf( '/' );
  			result = index > 0 ? s.substring( 0, index ) : s;
  
  		} else {
  			// Assumed to be a root instance name
  			result = scopedInstancePath;
  		}
  
  		return result;
  	}
docs: Finds the root instance's path from another instance path.
  @param scopedInstancePath a scoped instance path (may be null)
  @return a non-null root instance path