code: public static RbcfInfo findInstances(
  			Manager manager,
  			String applicationName,
  			String scopedInstancePath,
  			PrintStream out ) {
  
  		ManagedApplication ma = null;
  		List<Instance> scopedInstances = new ArrayList<> ();
  		Instance scopedInstance;
  
  		if(( ma = manager.applicationMngr().findManagedApplicationByName( applicationName )) == null )
  			out.println( "Unknown application: " + applicationName + "." );
  
  		else if( scopedInstancePath == null )
  			scopedInstances.addAll( InstanceHelpers.findAllScopedInstances( ma.getApplication()));
  
  		else if(( scopedInstance = InstanceHelpers.findInstanceByPath( ma.getApplication(), scopedInstancePath )) == null )
  			out.println( "There is no " + scopedInstancePath + " instance in " + applicationName + "." );
  
  		else if( ! InstanceHelpers.isTarget( scopedInstance ))
  			out.println( "Instance " + scopedInstancePath + " is not a scoped instance in " + applicationName + "." );
  
  		else
  			scopedInstances.add( scopedInstance );
  
  		return new RbcfInfo( scopedInstances, ma );
  	}
docs: Finds instances for a given application.
  
  @param manager
  @param applicationName
  @param scopedInstancePath
  @param out
  @return an object with non-null list of instances and a (nullable) managed application