Copyright (c) 2013-present, Facebook, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.

@providesModule getComponentName
517874
function getComponentName$1(instanceOrFiber) {
  if (typeof instanceOrFiber.getName === 'function') {
    // Stack reconciler
    var instance = instanceOrFiber;
    return instance.getName();
  }
  if (typeof instanceOrFiber.tag === 'number') {
    // Fiber reconciler
    var fiber = instanceOrFiber;
    var type = fiber.type;

    if (typeof type === 'string') {
      return type;
    }
    if (typeof type === 'function') {
      return type.displayName || type.name;
    }
  }
  return null;
}
1241380
@GET
    @Produces(MediaType.APPLICATION_JSON)
    @Path("/graph/{name}/{version}")
    public Response getModuleGraph(@PathParam("name") final String moduleName,
                                   @PathParam("version") final String moduleVersion,
                                   @Context final UriInfo uriInfo){

        LOG.info("Dependency Checker got a get module graph export request.");

        if(moduleName == null || moduleVersion == null){
            return Response.serverError().status(HttpStatus.NOT_ACCEPTABLE_406).build();
        }

        final FiltersHolder filters = new FiltersHolder();
        filters.init(uriInfo.getQueryParameters());

        final String moduleId = DbModule.generateID(moduleName, moduleVersion);
        final AbstractGraph moduleGraph = getGraphsHandler(filters).getModuleGraph(moduleId);

        return Response.ok(moduleGraph).build();
    }
1322771
function createOwnerComponentInfo(oSrcElement) {
		var sId, sVersion;
		if (oSrcElement) {
			var Component, oComponent;
			Component = sap.ui.require("sap/ui/core/Component");
			while (Component && oSrcElement && oSrcElement.getParent) {
				oComponent = Component.getOwnerComponentFor(oSrcElement);
				if (oComponent || oSrcElement instanceof Component) {
					oComponent = oComponent || oSrcElement;
					var oApp = oComponent.getManifestEntry("sap.app");
					// get app id or module name for FESR
					sId = oApp && oApp.id || oComponent.getMetadata().getName();
					sVersion = oApp && oApp.applicationVersion && oApp.applicationVersion.version;
				}
				oSrcElement = oSrcElement.getParent();
			}
		}
		return {
			id: sId ? sId : "undetermined",
			version: sVersion ? sVersion : ""
		};
	}
756789
public String getAMCName() { // @MD16426A
        J2EEName j2eeName = bmd.getJ2EEName(); // @MD16426A
        String app = j2eeName.getApplication(); // @MD16426A
        String mod = j2eeName.getModule(); // @MD16426A
        String comp = j2eeName.getComponent(); // @MD16426A
        String retval = app + "::" + mod + "::" + comp; // @PK07137
        return retval; // @MD16426A
    }
528491
@Override
    protected Content getNavLinkModule() {
        Content linkContent = getModuleLink(utils.elementUtils.getModuleOf(annotationType),
                contents.moduleLabel);
        Content li = HtmlTree.LI(linkContent);
        return li;
    }
1176106
private String getComponentName() {
    Class<?> c = getClass();
    String name = c.getName();
    int dot = name.lastIndexOf('.');
    return name.substring(dot + 1).toLowerCase();
  }
417136
public List<String> getModulesToUpdate() {

        if (m_modulesToUpdate == null) {
            getUptodateModules();
            m_components = new CmsIdentifiableObjectContainer<CmsSetupComponent>(true, true);
            try {
                addComponentsFromPath(m_webAppRfsPath + FOLDER_UPDATE);
            } catch (CmsConfigurationException e) {
                //
            }
        }
        return m_modulesToUpdate;
    }
464726
function MyComponent() {
  const theme = useTheme();
  const width =
    [...theme.breakpoints.keys].reverse().reduce((output, key) => {
      // eslint-disable-next-line react-hooks/rules-of-hooks
      const matches = useMediaQuery(theme.breakpoints.only(key));

      return !output && matches ? key : output;
    }, null) || 'xs';

  return <span>{`width: ${width}`}</span>;
}
1230756
@Override
    public String getModuleName() {
        String moduleName = moduleRef.getName();
        if (moduleName == null || moduleName.isEmpty()) {
            moduleName = moduleNameFromModuleDescriptor;
        }
        return moduleName == null || moduleName.isEmpty() ? null : moduleName;
    }
826427
function componentName(rawname) {
	var name = rawname.split(':')[0],
		index = name.replace('\\', '/').indexOf('/');
	return (index > 0) ? name.substring(0, index) : name;
}
574659
function (sControlName, oControlsData) {
				var oLibComponentModel = oControlsData.libComponentInfos,
					oLibInfo = library._getLibraryInfoSingleton();
				return oLibInfo._getActualComponent(oLibComponentModel, sControlName);
			}
78094
public static void main(final String[] args) {
        JOptionPane.showMessageDialog(null,
                "To use fb-contrib, copy this jar file into your local SpotBugs plugin directory, and use SpotBugs as usual.\n\nfb-contrib is a trademark of MeBigFatGuy.com",
                "fb-contrib: copyright 2005-2019", JOptionPane.INFORMATION_MESSAGE);
        System.exit(0);
    }
1292694
protected final String getFacetName(FaceletContext ctx, UIComponent parent)
    {
        // TODO: REFACTOR - "facelets.FACET_NAME" should be a constant somewhere, used to be in FacetHandler
        //                  from real Facelets
        return (String) parent.getAttributes().get("facelets.FACET_NAME");
    }
537396
@Override
    public BeanInfo getComponentMetadata(FacesContext context, Resource componentResource)
    {
        BeanInfo beanInfo = null;

        checkNull(context, "context");

        try
        {
            Facelet compositeComponentFacelet;
            FaceletFactory.setInstance(_faceletFactory);
            try
            {
                compositeComponentFacelet
                        = _faceletFactory.getCompositeComponentMetadataFacelet(componentResource.getURL());
            }
            finally
            {
                FaceletFactory.setInstance(null);
            }
            //context.getAttributes().put(BUILDING_COMPOSITE_COMPONENT_METADATA, Boolean.TRUE);

            // Create a temporal tree where all components will be put, but we are only
            // interested in metadata.
            UINamingContainer compositeComponentBase
                    = (UINamingContainer) context.getApplication().createComponent(
                    context, UINamingContainer.COMPONENT_TYPE, null);

            // Fill the component resource key, because this information should be available
            // on metadata to recognize which is the component used as composite component base.
            // Since this method is called from Application.createComponent(FacesContext,Resource),
            // and in that specific method this key is updated, this is the best option we
            // have for recognize it (also this key is used by UIComponent.isCompositeComponent)
            compositeComponentBase.getAttributes().put(Resource.COMPONENT_RESOURCE_KEY, componentResource);

            // According to UserTagHandler, in this point we need to wrap the facelet
            // VariableMapper, so local changes are applied on "page context", but
            // data is retrieved from full context
            FaceletContext faceletContext = (FaceletContext) context.
                    getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
            VariableMapper orig = faceletContext.getVariableMapper();
            try
            {
                faceletContext.setVariableMapper(new VariableMapperWrapper(orig));

                compositeComponentBase.pushComponentToEL(context, compositeComponentBase);

                compositeComponentFacelet.apply(context, compositeComponentBase);

                compositeComponentBase.popComponentFromEL(context);
            }
            finally
            {
                faceletContext.setVariableMapper(orig);
            }

            beanInfo = (BeanInfo) compositeComponentBase.getAttributes().get(UIComponent.BEANINFO_KEY);
        }
        catch (IOException e)
        {
            throw new FacesException(e);
        }
        //finally
        //{
        //context.getAttributes().remove(BUILDING_COMPOSITE_COMPONENT_METADATA);
        //}

        return beanInfo;
    }
1155098
function getFirstNgModuleName(source) {
    // First, find the @NgModule decorators.
    const ngModulesMetadata = getDecoratorMetadata(source, 'NgModule', '@angular/core');
    if (ngModulesMetadata.length === 0) {
        return undefined;
    }
    // Then walk parent pointers up the AST, looking for the ClassDeclaration parent of the NgModule
    // metadata.
    const moduleClass = findClassDeclarationParent(ngModulesMetadata[0]);
    if (!moduleClass || !moduleClass.name) {
        return undefined;
    }
    // Get the class name of the module ClassDeclaration.
    return moduleClass.name.text;
}
4240
public function getModuleName()
    {
        $module = $this->argument('module') ?: app('modules')->getUsedNow();

        $module = app('modules')->findOrFail($module);

        return $module->getStudlyName();
    }
1329294
function getModuleName(module) {
    var script = module.replace(/[^a-zA-Z0-9]/g, '.'),
        parts = script.split('.'),
        name = parts.shift();

    if (parts.length) {
      for (var p in parts) {
        name += parts[p].charAt(0).toUpperCase() + parts[p].substr(1, parts[p].length);
      }
    }
    return name;
  }