This method returns the debugging information exposed by {@link HttpServerInventoryViewResource} and meant
for that use only. It must not be used for any other purpose.
350320
public Map<String, Object> getDebugInfo()
  {
    Preconditions.checkArgument(lifecycleLock.awaitStarted(1, TimeUnit.MILLISECONDS));

    Map<String, Object> result = new HashMap<>(servers.size());
    for (Map.Entry<String, DruidServerHolder> e : servers.entrySet()) {
      DruidServerHolder serverHolder = e.getValue();
      result.put(
          e.getKey(),
          serverHolder.syncer.getDebugInfo()
      );
    }
    return result;
  }
1287992
@Override
    public String getMethod() {
        String method = this.request.getMethod();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getMethod: " + method);
        }
        return method;
    }
1214780
public final void debug(Object source, Class sourceClass, String methodName)
    {
        debug(source, sourceClass, methodName, (Object[]) null);
    }
1058118
public Map<String, Object> getDebugInfo()
  {
    long currTime = System.currentTimeMillis();

    Object notSuccessfullySyncedFor;
    if (lastSuccessfulSyncTime == 0) {
      notSuccessfullySyncedFor = "Never Successfully Synced";
    } else {
      notSuccessfullySyncedFor = (currTime - lastSuccessfulSyncTime) / 1000;
    }
    return ImmutableMap.of(
        "notSyncedForSecs", lastSyncTime == 0 ? "Never Synced" : (currTime - lastSyncTime) / 1000,
        "notSuccessfullySyncedFor", notSuccessfullySyncedFor,
        "consecutiveFailedAttemptCount", consecutiveFailedAttemptCount,
        "syncScheduled", startStopLock.isStarted()
    );
  }
313768
@SuppressFBWarnings ("LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE")
  public static void enableJavaxMailDebugging (final boolean bDebug)
  {
    java.util.logging.Logger.getLogger ("com.sun.mail.smtp").setLevel (bDebug ? Level.FINEST : Level.INFO);
    java.util.logging.Logger.getLogger ("com.sun.mail.smtp.protocol").setLevel (bDebug ? Level.FINEST : Level.INFO);
    SystemProperties.setPropertyValue ("mail.socket.debug", bDebug);
    SystemProperties.setPropertyValue ("java.security.debug", bDebug ? "certpath" : null);
    SystemProperties.setPropertyValue ("javax.net.debug", bDebug ? "trustmanager" : null);
  }
882632
protected final OnDemandStatsProducer getProducer(Class producerClass, String producerId, String category, String subsystem, boolean tracingSupported){
        OnDemandStatsProducer<T> producer = (OnDemandStatsProducer<T>) ProducerRegistryFactory.getProducerRegistryInstance().getProducer(producerId);

        if (producer == null) {
            producer = new OnDemandStatsProducer<T>(producerId, category, subsystem, getStatsFactory());
            producer.setTracingSupported(tracingSupported);
            ProducerRegistryFactory.getProducerRegistryInstance().registerProducer(producer);

            //check for annotations
            createClassLevelAccumulators(producer, producerClass);

            for (Method method : producerClass.getMethods()){
                createMethodLevelAccumulators(producer, method);
            }
        }

        try {
            return  (OnDemandStatsProducer) ProducerRegistryFactory.getProducerRegistryInstance().getProducer(producerId);
        } catch (ClassCastException e) {
            LOGGER.error("getProducer(): Unexpected producer type", e);
            return null;
        }
    }
959243
private boolean isDebug(CmsObject cms, CmsSolrQuery query) {

        String[] debugSecretValues = query.remove(REQUEST_PARAM_DEBUG_SECRET);
        String debugSecret = (debugSecretValues == null) || (debugSecretValues.length < 1)
        ? null
        : debugSecretValues[0];
        if ((null != debugSecret) && !debugSecret.trim().isEmpty() && (null != m_handlerDebugSecretFile)) {
            try {
                CmsFile secretFile = cms.readFile(m_handlerDebugSecretFile);
                String secret = new String(secretFile.getContents(), CmsFileUtil.getEncoding(cms, secretFile));
                return secret.trim().equals(debugSecret.trim());
            } catch (Exception e) {
                LOG.info(
                    "Failed to read secret file for index \""
                        + getName()
                        + "\" at path \""
                        + m_handlerDebugSecretFile
                        + "\".");
            }
        }
        return false;
    }
20683
public List<JavaResource> getProjectInjectionPointBeans(Project project)
   {
      final List<JavaResource> beans = new ArrayList<>();
      if (project != null)
      {
         project.getFacet(JavaSourceFacet.class).visitJavaSources(new JavaResourceVisitor()
         {
            @Override
            public void visit(VisitContext context, JavaResource resource)
            {
               try
               {
                  JavaSource<?> javaSource = resource.getJavaType();
                  if (javaSource.isClass()
                           // JPA
                           && !javaSource.hasAnnotation(Entity.class)
                           && !javaSource.hasAnnotation(MappedSuperclass.class)
                           && !javaSource.hasAnnotation(Embeddable.class)
                           // Bean Validation
                           && !javaSource.hasImport(Payload.class)
                  )
                  {
                     beans.add(resource);
                  }
               }
               catch (FileNotFoundException e)
               {
                  // ignore
               }
            }
         });
      }
      return beans;
   }
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;
    }
431336
public Method getEndpointMethod() throws ResourceAdapterInternalException {

        final String methodName = "getEndpointMethod";
        if (TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        if (ON_MESSAGE_METHOD == null) {

            try {

                ON_MESSAGE_METHOD = SibRaMessageListener.class.getMethod(
                        "onMessage", new Class[] { SIBusMessage.class,
                                AbstractConsumerSession.class,
                                SITransaction.class });

            } catch (final Exception exception) {

                FFDCFilter.processException(exception, CLASS_NAME + "."
                        + methodName, FFDC_PROBE_2);
                if (TRACE.isEntryEnabled()) {
                    SibTr.exception(TRACE, exception);
                }
                throw new ResourceAdapterInternalException(NLS
                        .getFormattedMessage("ON_MESSAGE_CWSIV0851",
                                new Object[] { exception }, null), exception);

            }

        }

        if (TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName, ON_MESSAGE_METHOD);
        }
        return ON_MESSAGE_METHOD;

    }
923098
@Trivial
    public static Tracer getTracer() {
        String methodName = "getTracer";
        if ( TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled() ) {
            Tr.entry(tc, methodName);
        }

        OpentracingContext tracerContext = getOpentracingContext();
        // Should never be null.  The thread local variable provides
        // a non-null initial value.

        String appName = tracerContext.getAppName();
        Tracer tracer = tracerContext.getTracer();
        String tracerCase;

        // The app name and tracer should always be null when requesting
        // the tracer from a container filter, and should never be null
        // when requesting the tracer from a client filter.

        if ( tracer != null ) {
            tracerCase = "previously stored for " + appName;

        } else {
            appName = OpentracingUtils.lookupAppName();
            tracer = ensureTracer(appName);
            tracerContext.setTracer(appName, tracer);

            tracerCase = "newly stored for " + appName;
        }

        if ( TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled() ) {
            Thread currentThread = Thread.currentThread();
            String threadName = currentThread.getName();
            long threadId = currentThread.getId();
            Tr.exit(tc,
                methodName + " (" + tracerCase + ") in (" + threadName + ":" + Long.toString(threadId) + ")",
                OpentracingUtils.getTracerText(tracer));
        }
        return tracer;
    }
1082174
private void get_dev_system_resource() throws DevFailed {

	//
	// Try to retrieve resources for device black box depth and device
	// description
	//

	if (Util._UseDb) {
	    try {
		final String[] prop_names = { "blackbox_depth", "description", "poll_ring_depth",
			"polled_cmd", "polled_attr", "non_auto_polled_cmd", "non_auto_polled_attr",
			"poll_old_factor" };

		// Call db server
		final DbDatum[] res_value = db_dev.get_property(prop_names);

		int i = 0;
		if (res_value[i].is_empty() == false) {
		    blackbox_depth = res_value[i].extractLong();
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    desc = res_value[i].extractString();
		}
		i++;

		if (res_value[i].is_empty() == false) {
		    set_poll_ring_depth(res_value[i].extractLong());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_polled_cmd(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_polled_attr(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_non_auto_polled_cmd(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_non_auto_polled_attr(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_poll_old_factor(res_value[i].extractLong());
		} else {
		    set_poll_old_factor(Tango_DEFAULT_POLL_OLD_FACTOR);
		}
	    } catch (final DevFailed e) {
		final StringBuffer o = new StringBuffer(
			"Database error while trying to retrieve device properties for device ");
		o.append(device_name);

		Except.throw_exception("API_DatabaseAccess", o.toString(),
			"DeviceImpl.get_dev_system_resource");
	    } catch (final BAD_OPERATION ex) {
		final StringBuffer o = new StringBuffer(
			"Database error while trying to retrieve device properties for device ");
		o.append(device_name);

		Except.throw_exception("API_DatabaseAccess", o.toString(),
			"DeviceImpl.get_dev_system_resource");
	    }
	}
    }
1240567
@Override
  public String toSource() {
    return runInCompilerThread(
        () -> {
          Tracer tracer = newTracer("toSource");
          try {
            CodeBuilder cb = new CodeBuilder();
            if (jsRoot != null) {
              int i = 0;
              if (options.shouldPrintExterns()) {
                for (Node scriptNode = externsRoot.getFirstChild();
                    scriptNode != null;
                    scriptNode = scriptNode.getNext()) {
                  toSource(cb, i++, scriptNode);
                }
              }
              for (Node scriptNode = jsRoot.getFirstChild();
                  scriptNode != null;
                  scriptNode = scriptNode.getNext()) {
                toSource(cb, i++, scriptNode);
              }
            }
            return cb.toString();
          } finally {
            stopTracer(tracer, "toSource");
          }
        });
  }
678970
public synchronized @Nullable SourceMapConsumerV3 getSourceMap(ErrorManager errorManager) {
    if (!cached) {
      // Avoid re-reading or reparsing files.
      cached = true;
      String sourceMapPath = sourceFile.getOriginalPath();
      try {
        String sourceMapContents = sourceFile.getCode();
        SourceMapConsumerV3 consumer = new SourceMapConsumerV3();
        consumer.parse(sourceMapContents);
        parsedSourceMap = consumer;
      } catch (IOException e) {
        JSError error =
            JSError.make(SourceMapInput.SOURCEMAP_RESOLVE_FAILED, sourceMapPath, e.getMessage());
        errorManager.report(error.getDefaultLevel(), error);
      } catch (SourceMapParseException e) {
        JSError error =
            JSError.make(SourceMapInput.SOURCEMAP_PARSE_FAILED, sourceMapPath, e.getMessage());
        errorManager.report(error.getDefaultLevel(), error);
      }
    }
    return parsedSourceMap;
  }
876702
@Override
    public Object createResource(final ResourceInfo resInfo) throws Exception {
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "createResource", resInfo);

        Object connectionFactory;

        lock.readLock().lock();
        try {
            if (!isInitialized.get()) {
                // Switch to write lock for lazy initialization
                lock.readLock().unlock();
                lock.writeLock().lock();
                try {
                    if (!isInitialized.get())
                        initPrivileged();
                } finally {
                    // Downgrade to read lock for rest of method
                    lock.readLock().lock();
                    lock.writeLock().unlock();
                }
            }
            checkAccess();
            ConnectionManager conMgr = AccessController.doPrivileged(new PrivilegedExceptionAction<ConnectionManager>() {
                @Override
                public ConnectionManager run() throws Exception {
                    return conMgrSvc.getConnectionManager(resInfo, AbstractConnectionFactoryService.this);
                }
            });
            connectionFactory = getManagedConnectionFactory(null).createConnectionFactory(conMgr);
        } catch (Exception x) {
            if (trace && tc.isEntryEnabled())
                Tr.exit(this, tc, "createResource", x);
            throw x;
        } catch (Error x) {
            if (trace && tc.isEntryEnabled())
                Tr.exit(this, tc, "createResource", x);
            throw x;
        } finally {
            lock.readLock().unlock();
        }

        // Only connection factories defined in the server configuration are tracked for the app recycle coordinator.
        if (isServerDefined) {
            ComponentMetaData cData = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData();
            if (cData != null)
                appsToRecycle.add(cData.getJ2EEName().getApplication());
        }

        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "createResource", connectionFactory);
        return connectionFactory;
    }
871632
@Override
    public List<Class<? extends AbstractResource>> getEndpoints() {
        List<Class<? extends AbstractResource>> result = new LinkedList<>();

        result.add(AuditResources.class);
        result.add(AuthResources.class);
        result.add(AuthResourcesV2.class);
        result.add(AlertResources.class);
        result.add(AnnotationResources.class);
        result.add(CollectionResources.class);
        result.add(DashboardResources.class);
        result.add(HistoryResources.class);
        result.add(ManagementResources.class);
        result.add(MetricResources.class);
        result.add(NamespaceResources.class);
        result.add(UserResources.class);
        result.add(DiscoveryResources.class);
        return result;
    }
1066458
private SIXAResource getXaResource() throws ResourceException
    {
        final String methodName = "getXaResource";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName);
        }

        if (_xaResource == null)
        {
            try
            {
              _xaResource = _connection.getSIXAResource();
            }
            catch (final SIException exception)
            {
                FFDCFilter.processException(exception, CLASS_NAME + "."
                        + methodName, FFDC_PROBE_1, this);
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled())
                {
                    SibTr.exception(this, TRACE, exception);
                }
                throw new ResourceException(NLS.getFormattedMessage(
                        ("XARESOURCE_EXCEPTION_CWSIV0650"), new Object[] {
                                exception, _connection }, null), exception);
            }
            catch (final SIErrorException exception)
            {
                FFDCFilter.processException(exception, CLASS_NAME + "."
                        + methodName, FFDC_PROBE_3, this);
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                    SibTr.exception(this, TRACE, exception);
                }
                throw new ResourceException(NLS.getFormattedMessage(
                        ("XARESOURCE_EXCEPTION_CWSIV0650"), new Object[] {
                                exception, _connection }, null), exception);
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(this, TRACE, methodName, _xaResource);
        }
        return _xaResource;
    }