Returns the blueprint producer with this id. Creates one if none is existing. Uses DLC pattern to reduce synchronization overhead.
@param producerId
@param category
@param subsystem
@return
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());
		}
		
	}
330283
private function getVirtualRootCategory(CategoryInterface $category)
    {
        $storeId      = $this->getStoreId();
        $rootCategory = $this->categoryFactory->create()->setStoreId($storeId);

        if ($category->getVirtualCategoryRoot() !== null && !empty($category->getVirtualCategoryRoot())) {
            $rootCategoryId = $category->getVirtualCategoryRoot();
            $rootCategory->load($rootCategoryId);
        }

        if ($rootCategory && $rootCategory->getId()
            && ($rootCategory->getLevel() < 1 || (int) $rootCategory->getId() === (int) $this->getRootCategoryId($storeId))
        ) {
            $rootCategory = null;
        }

        return $rootCategory;
    }
1265795
protected ProducerCloseable<String, byte[]> createProducer(ProducerConfig config) {
    return this.closer.register(new ProducerCloseable<String, byte[]>(config));
  }
862235
public <T> QueueProducer<T> createQueueProducer(final String topic, final ProducerCallback<T> messageCallback)
    {
        Preconditions.checkState(connectionFactory != null, "connection factory was never injected!");
        return new QueueProducer<T>(connectionFactory, jmsConfig, topic, messageCallback);
    }
1170883
protected AbstractCreateMavenProjectsOperation createOperation() {
		return new AbstractCreateMavenProjectsOperation() {
			@SuppressWarnings("synthetic-access")
			@Override
			protected List<IProject> doCreateMavenProjects(IProgressMonitor progressMonitor) throws CoreException {
				final SubMonitor monitor = SubMonitor.convert(progressMonitor, 101);
				try {
					final List<IMavenProjectImportResult> results = MavenImportUtils.runFixedImportJob(
							true,
							getProjects(),
							getImportConfiguration(),
							new MavenProjectWorkspaceAssigner(getWorkingSets()),
							monitor.newChild(100));
					return toProjects(results);
				} finally {
					restorePom();
					monitor.done();
				}
			}
		};
	}
1144121
@Override
    public String getProducerBind() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getProducerBind");

        String producerBind = (String) properties.get(PRODUCER_BIND);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getProducerBind", producerBind);
        return producerBind;
    }
1373069
private List<ProducerAO> getFilteredProducers(String intervalName, TimeUnit timeUnit, String category, String subsystem) throws APIException {
        if (!StringUtils.isEmpty(category)) {
            return getProducerAPI().getAllProducersByCategory(category, intervalName, timeUnit, true);
        }

        if (!StringUtils.isEmpty(subsystem)) {
            return getProducerAPI().getAllProducersBySubsystem(subsystem, intervalName, timeUnit, true);
        }

        return getProducerAPI().getAllProducers(intervalName, timeUnit, true);
    }
360319
public static PartitionDRGateway getInstance(int partitionId,
                                                 ProducerDRGateway producerGateway,
                                                 StartAction startAction)
    {
        // if this is a primary cluster in a DR-enabled scenario
        // try to load the real version of this class
        PartitionDRGateway pdrg = null;
        if (producerGateway != null) {
            pdrg = tryToLoadProVersion();
        }
        if (pdrg == null) {
            pdrg = new PartitionDRGateway();
        }

        // init the instance and return
        try {
            pdrg.init(partitionId, producerGateway, startAction);
        } catch (Exception e) {
            VoltDB.crashLocalVoltDB(e.getMessage(), true, e);
        }

        // Regarding apparent lack of thread safety: this is called serially
        // while looping over the SPIs during database initialization
        assert !m_partitionDRGateways.containsKey(partitionId);
        ImmutableMap.Builder<Integer, PartitionDRGateway> builder = ImmutableMap.builder();
        builder.putAll(m_partitionDRGateways);
        builder.put(partitionId, pdrg);
        m_partitionDRGateways = builder.build();

        return pdrg;
    }
159261
function categoryPathPlain(patternObject) {
  'use strict';

  // check for subcategory
  if (patternObject.subcategory) {
    return path.join(patternObject.category, patternObject.subcategory);
  }
  else {
    return patternObject.category;
  }
}
709661
public int getProducerCount()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getProducerCount");

    int producerCount;

    synchronized (_producers)
    {
      producerCount = _producers.size();
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getProducerCount", new Integer(producerCount));

    return producerCount;
  }
1090091
@Override
    public ConsumerDispatcher createSubscriptionConsumerDispatcher(ConsumerDispatcherState subState)
                    throws
                    SIDiscriminatorSyntaxException,
                    SISelectorSyntaxException,
                    SIResourceException,
                    SISelectorSyntaxException,
                    SIDiscriminatorSyntaxException,
                    SINonDurableSubscriptionMismatchException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "createSubscriptionConsumerDispatcher", subState);

        final ConsumerDispatcher cd = _pubSubRealization.
                        createSubscriptionConsumerDispatcher(subState);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createSubscriptionConsumerDispatcher", cd);

        return cd;
    }
997060
@Override
	public java.util.List<com.liferay.commerce.product.model.CPOptionCategory> getCPOptionCategoriesByUuidAndCompanyId(
		String uuid, long companyId) {
		return _cpOptionCategoryLocalService.getCPOptionCategoriesByUuidAndCompanyId(uuid,
			companyId);
	}
1082009
private synchronized Producer<CloseableReference<CloseableImage>> getPostprocessorSequence(
      Producer<CloseableReference<CloseableImage>> inputProducer) {
    if (!mPostprocessorSequences.containsKey(inputProducer)) {
      PostprocessorProducer postprocessorProducer =
          mProducerFactory.newPostprocessorProducer(inputProducer);
      PostprocessedBitmapMemoryCacheProducer postprocessedBitmapMemoryCacheProducer =
          mProducerFactory.newPostprocessorBitmapMemoryCacheProducer(postprocessorProducer);
      mPostprocessorSequences.put(inputProducer, postprocessedBitmapMemoryCacheProducer);
    }
    return mPostprocessorSequences.get(inputProducer);
  }
1010026
private CmsUUID getProjectIdForContext(CmsDbContext dbc) {

        CmsUUID projectId = dbc.getProjectId();
        if (projectId.isNullUUID()) {
            projectId = dbc.currentProject().getUuid();
        }
        return projectId;
    }
293824
protected function getProviderFromCategory(CategoryInterface $category = null)
    {
        if (null === $category) {
            return null;
        }

        $product = $this->getProductSetManager()->findProductForCategory($category);

        return $product ? $this->getProductPool()->getProvider($product) : null;
    }
624357
public DbOrganization getOrganization(final DbArtifact dbArtifact) {
        final DbModule module = getModule(dbArtifact);

        if(module == null || module.getOrganization() == null){
            return null;
        }

        return repositoryHandler.getOrganization(module.getOrganization());
    }
714359
public function get_available_saquestions_from_category($categoryid, $subcategories) {
        if (isset($this->availablesaquestionsbycategory[$categoryid][$subcategories])) {
            return $this->availablesaquestionsbycategory[$categoryid][$subcategories];
        }

        if ($subcategories) {
            $categoryids = question_categorylist($categoryid);
        } else {
            $categoryids = array($categoryid);
        }

        $questionids = question_bank::get_finder()->get_questions_from_categories(
                $categoryids, "qtype = 'shortanswer'");
        $this->availablesaquestionsbycategory[$categoryid][$subcategories] = $questionids;
        return $questionids;
    }