Attempts to determine the ecosystem based on the vendor, product and
targetSw.

@param baseEcosystem the base ecosystem
@param vendor the vendor
@param product the product
@param targetSw the target software
@return the ecosystem if one is identified
979689
private String determineEcosystem(String baseEcosystem, String vendor, String product, String targetSw) {
        if ("ibm".equals(vendor) && "java".equals(product)) {
            return "c/c++";
        }
        if ("oracle".equals(vendor) && "vm".equals(product)) {
            return "c/c++";
        }
        if ("*".equals(targetSw) || baseEcosystem != null) {
            return baseEcosystem;
        }
        return targetSw;
    }
834176
private CommandLineCompilerConfiguration getBaseCompilerConfiguration(final Map<String, TargetInfo> targets) {
    //
    // find first target with an DevStudio C compilation
    //
    CommandLineCompilerConfiguration compilerConfig;
    //
    // get the first target and assume that it is representative
    //
    for (final TargetInfo targetInfo : targets.values()) {
      final ProcessorConfiguration config = targetInfo.getConfiguration();
      //
      // for the first cl compiler
      //
      if (config instanceof CommandLineCompilerConfiguration) {
        compilerConfig = (CommandLineCompilerConfiguration) config;
        if (compilerConfig.getCompiler() instanceof MsvcCCompiler) {
          return compilerConfig;
        }
      }
    }
    return null;
  }
224079
protected WSFederationRegisteredService getWsFederationRegisteredService(final Service targetService) {
        val svc = wsFederationRequestConfigurationContext.getServicesManager().findServiceBy(targetService, WSFederationRegisteredService.class);
        RegisteredServiceAccessStrategyUtils.ensureServiceAccessIsAllowed(targetService, svc);
        return svc;
    }
875608
def set_launch_target(build_target)
      launch_runnable = BuildableProductRunnable.new(build_target, 0)
      launch_action.buildable_product_runnable = launch_runnable

      profile_runnable = BuildableProductRunnable.new(build_target)
      profile_action.buildable_product_runnable = profile_runnable

      macro_exp = MacroExpansion.new(build_target)
      test_action.add_macro_expansion(macro_exp)
    end
707759
public Object createTargetObject(TargetServiceFactory targetServiceFactory) {
		Debug.logVerbose("[JdonFramework] now getTargetObject by visitor ", module);
		Object targetObjRef = null;
		try {
			TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest();
			TargetMetaDef targetMetaDef = targetMetaRequest.getTargetMetaDef();
			if (targetMetaDef.isEJB()) { // cache the ejb object
				ComponentVisitor cm = targetMetaRequest.getComponentVisitor();
				targetMetaRequest.setVisitableName(ComponentKeys.TARGETSERVICE_FACTORY);
				Debug.logVerbose(ComponentKeys.TARGETSERVICE_FACTORY + " in action (cache)", module);
				targetObjRef = cm.visit();
			} else {
				Debug.logVerbose("[JdonFramework] not active targer service instance cache !!!!", module);
				targetObjRef = targetServiceFactory.create();
			}
		} catch (Exception e) {
			Debug.logError("[JdonFramework]createTargetObject error: " + e, module);
		}
		return targetObjRef;
	}
357288
@Override @SuppressWarnings("unchecked")
  public <T extends CMAResource> T setEnvironmentId(String environmentId) {
    return (T) setId(environmentId);
  }
860805
public void setPlatforms(java.util.Collection<EnvironmentPlatform> platforms) {
        if (platforms == null) {
            this.platforms = null;
            return;
        }

        this.platforms = new java.util.ArrayList<EnvironmentPlatform>(platforms);
    }
1264007
@Nullable
  private ServerHolder assignPrimary(
      final DruidCoordinatorRuntimeParams params,
      final DataSegment segment
  )
  {
    ServerHolder topCandidate = null;
    for (final Object2IntMap.Entry<String> entry : targetReplicants.object2IntEntrySet()) {
      final int targetReplicantsInTier = entry.getIntValue();
      // sanity check: target number of replicants should be more than zero.
      if (targetReplicantsInTier <= 0) {
        continue;
      }
      final String tier = entry.getKey();

      String noAvailability = StringUtils.format(
          "No available [%s] servers or node capacity to assign primary segment[%s]! Expected Replicants[%d]",
          tier,
          segment.getId(),
          targetReplicantsInTier
      );

      final List<ServerHolder> holders = getFilteredHolders(
          tier,
          params.getDruidCluster(),
          createLoadQueueSizeLimitingPredicate(params)
      );
      // no holders satisfy the predicate
      if (holders.isEmpty()) {
        log.warn(noAvailability);
        continue;
      }

      final ServerHolder candidate = params.getBalancerStrategy().findNewSegmentHomeReplicator(segment, holders);
      if (candidate == null) {
        log.warn(noAvailability);
      } else {
        // cache the result for later use.
        strategyCache.put(tier, candidate);
        if (topCandidate == null ||
            candidate.getServer().getPriority() > topCandidate.getServer().getPriority()) {
          topCandidate = candidate;
        }
      }
    }

    if (topCandidate != null) {
      // remove tier for primary replica
      strategyCache.remove(topCandidate.getServer().getTier());
      log.info(
          "Assigning 'primary' for segment [%s] to server [%s] in tier [%s]",
          segment.getId(),
          topCandidate.getServer().getName(),
          topCandidate.getServer().getTier()
      );
      topCandidate.getPeon().loadSegment(segment, null);
    }

    return topCandidate;
  }
436102
@Override
	public boolean isMachineRunning( TargetHandlerParameters parameters, String machineId )
	throws TargetException {

		boolean result;
		try {
			final ServiceInstance vmwareServiceInstance = getServiceInstance( parameters.getTargetProperties());
			VirtualMachine vm = getVirtualMachine( vmwareServiceInstance, machineId );
			result = vm != null;

		} catch( Exception e ) {
			throw new TargetException( e );
		}

		return result;
	}
340703
public static BlueprintProducer getBlueprintProducer(String producerId, String category, String subsystem){
		try{
			//first find producer
			BlueprintProducer producer = producers.get(producerId);
			if (producer==null){
				synchronized(producers){
					producer = producers.get(producerId);
					if (producer==null){
						producer = new BlueprintProducer(producerId, category, subsystem);
						producers.put(producerId, producer);
					}
				}
			}
			//end producer lookup
			return producer;
		}catch(Exception e){
			log.error("getBlueprintProducer("+producerId+", "+category+", "+subsystem+ ')', e);
			throw new RuntimeException("Handler instantiation failed - "+e.getMessage());
		}
		
	}
613193
public void setProduct(String product) {
        mProduct = product == null ? DEFAULT_PRODUCT : BDBProduct.forString(product);
    }
727436
function resolveTargetPath(targetName, engine) {
    var dir = engine.options.dir || process.pwd();
    var ext = engine.options.extname || '.etpl';

    return path.resolve(dir, targetName) + ext;
}
860316
public void setOperatingSystemTargeting(com.google.api.ads.admanager.axis.v201811.OperatingSystemTargeting operatingSystemTargeting) {
        this.operatingSystemTargeting = operatingSystemTargeting;
    }
318012
public void setEnvironmentLinks(java.util.Collection<EnvironmentLink> environmentLinks) {
        if (environmentLinks == null) {
            this.environmentLinks = null;
            return;
        }

        this.environmentLinks = new com.amazonaws.internal.SdkInternalList<EnvironmentLink>(environmentLinks);
    }
823951
public ProcessorConfiguration createConfiguration(final CCTask task, final LinkType linkType,
      final ProcessorDef baseDef, final TargetDef targetPlatform, final VersionInfo versionInfo) {
    if (isReference()) {
      return ((ProcessorDef) getCheckedRef(ProcessorDef.class, "ProcessorDef")).createConfiguration(task, linkType,
          baseDef, targetPlatform, versionInfo);
    }
    final ProcessorDef[] defaultProviders = getDefaultProviders(baseDef);
    final Processor proc = getProcessor(linkType);
    return proc.createConfiguration(task, linkType, defaultProviders, this, targetPlatform, versionInfo);
  }
1089780
public ServiceCall<Environment> getEnvironment(GetEnvironmentOptions getEnvironmentOptions) {
    Validator.notNull(getEnvironmentOptions, "getEnvironmentOptions cannot be null");
    String[] pathSegments = { "v1/environments" };
    String[] pathParameters = { getEnvironmentOptions.environmentId() };
    RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments,
        pathParameters));
    builder.query("version", versionDate);
    Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "getEnvironment");
    for (Entry<String, String> header : sdkHeaders.entrySet()) {
      builder.header(header.getKey(), header.getValue());
    }
    builder.header("Accept", "application/json");
    return createServiceCall(builder.build(), ResponseConverterUtils.getObject(Environment.class));
  }
319980
static AbstractBeanDefinition findServerForSpecialEnvironment() {
        boolean weblogicPresent = ClassUtils.isPresent("weblogic.management.Helper",
                ServletContextAwareMBeanServerDefinitionParser.class.getClassLoader());

        boolean webspherePresent = ClassUtils.isPresent("com.ibm.websphere.management.AdminServiceFactory",
                ServletContextAwareMBeanServerDefinitionParser.class.getClassLoader());

        if (weblogicPresent) {
            RootBeanDefinition bd = new RootBeanDefinition(JndiObjectFactoryBean.class);
            bd.getPropertyValues().add("jndiName", "java:comp/env/jmx/runtime");
            return bd;
        } else if (webspherePresent) {
            return new RootBeanDefinition(WebSphereMBeanServerFactoryBean.class);
        } else {
            return null;
        }
    }