/*
Get the J2EE component name
761324
public static String getJ2EEComponentName() {
        ComponentMetaData wcmd = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData();
        if (wcmd != null) {
            J2EEName j2eename = wcmd.getJ2EEName();
            return j2eename.getComponent();
        } else {
            return null;
        }
    }
783122
@Override
    public String getServerName() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getServerName();
        } finally {
            collaborator.postInvoke();
        }
    }
609303
@Override
    public J2EEName getJ2EEName() throws CDIException {
        //TODO can we come up with a J2EEName for libraries as well as modules?
        J2EEName j2eeName = null;
        ModuleMetaData moduleMetaData = getModuleMetaData();
        if (moduleMetaData != null) {
            j2eeName = moduleMetaData.getJ2EEName();
        }
        return j2eeName;
    }
304701
String getJCAContextProviderName(Class<?> workContextClass) {
        ServiceReference<JCAContextProvider> ref = null;
        for (Class<?> cl = workContextClass; ref == null && cl != null; cl = cl.getSuperclass())
            ref = contextProviders.getReference(cl.getName());

        String name = ref == null ? null : (String) ref.getProperty(JCAContextProvider.CONTEXT_NAME);
        if (name == null && ref != null)
            name = (String) ref.getProperty("component.name");
        return name;
    }
942435
public String getComponentId() {
    if (Annotation_Type.featOkTst && ((Annotation_Type)jcasType).casFeat_componentId == null)
      jcasType.jcas.throwFeatMissing("componentId", "de.julielab.jules.types.Annotation");
    return jcasType.ll_cas.ll_getStringValue(addr, ((Annotation_Type)jcasType).casFeatCode_componentId);}
1240000
public String findCmisName( String jcrName ) {
        for (Relation aList : list) {
            if (aList.jcrName.equals(jcrName)) {
                return aList.cmisName;
            }
        }
        return jcrName;
    }
817015
private static String getRemoteInterfaceName(EnterpriseBean enterpriseBean)
    {
        if (enterpriseBean instanceof ComponentViewableBean)
        {
            return ((ComponentViewableBean) enterpriseBean).getRemoteInterfaceName();
        }

        return null;
    }
1212723
Optional<PackingPlan.InstancePlan> getInstance(String componentName, int componentIndex) {
    for (PackingPlan.InstancePlan instancePlan : this.instances) {
      if (instancePlan.getComponentName().equals(componentName)
          && instancePlan.getComponentIndex() == componentIndex) {
        return Optional.of(instancePlan);
      }
    }
    return Optional.absent();
  }
1176868
function getQualifiedElementName(elementName) {
	    var qualifiedName;
	    switch (elementName.type) {
	        case jsx_syntax_1.JSXSyntax.JSXIdentifier:
	            var id = elementName;
	            qualifiedName = id.name;
	            break;
	        case jsx_syntax_1.JSXSyntax.JSXNamespacedName:
	            var ns = elementName;
	            qualifiedName = getQualifiedElementName(ns.namespace) + ':' +
	                getQualifiedElementName(ns.name);
	            break;
	        case jsx_syntax_1.JSXSyntax.JSXMemberExpression:
	            var expr = elementName;
	            qualifiedName = getQualifiedElementName(expr.object) + '.' +
	                getQualifiedElementName(expr.property);
	            break;
	        /* istanbul ignore next */
	        default:
	            break;
	    }
	    return qualifiedName;
	}
1286538
private NodeImpl getNamespacingElement() {
        switch (this.getNodeType()) {
            case ELEMENT_NODE:
                return this;

            case DOCUMENT_NODE:
                return (NodeImpl) ((Document) this).getDocumentElement();

            case ENTITY_NODE:
            case NOTATION_NODE:
            case DOCUMENT_FRAGMENT_NODE:
            case DOCUMENT_TYPE_NODE:
                return null;

            case ATTRIBUTE_NODE:
                return (NodeImpl) ((Attr) this).getOwnerElement();

            case TEXT_NODE:
            case CDATA_SECTION_NODE:
            case ENTITY_REFERENCE_NODE:
            case PROCESSING_INSTRUCTION_NODE:
            case COMMENT_NODE:
                return getContainingElement();

            default:
                throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                        "Unsupported node type " + getNodeType());
        }
    }
861664
private String getType(final WComponent component) {
		for (Class<?> clazz = component.getClass(); clazz != null && WComponent.class.
				isAssignableFrom(clazz); clazz = clazz.getSuperclass()) {
			if ("com.github.bordertech.wcomponents".equals(clazz.getPackage().getName())) {
				return clazz.getName();
			}
		}

		return null;
	}
1032546
@Override
    public Enumeration<String> getParameterNames() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getParameterNames();
        } finally {
            collaborator.postInvoke();
        }
    }
246090
function(component, components) {
        var deps, depsName, depsConfig;
        if (Type.assert(Type.STRING, component.name)) {
            deps = this.getDependency(component.name);
            if (Type.isArray(deps)) {
                while (true) {
                    depsName = deps.shift();
                    if (!depsName) {
                        break;
                    }
                    if (!this.has(depsName)) {
                        if (!!components) {
                            depsConfig = this.find(depsName, components);
                            if (depsConfig) {
                                this.set(depsName, depsConfig);
                                break;
                            }
                        }
                        this.set(depsName, {});
                    }
                }
            }
        }
    }
289638
static String javaScriptPropertyToJavaPropertyName(final String prefix, final String jsPropertyName) {
        if (jsPropertyName.isEmpty()) {
            throw new JsiiException("jsPropertyName must not be empty");
        }

        StringBuilder sb = new StringBuilder();
        sb.append(prefix);
        sb.append(jsPropertyName.substring(0, 1).toUpperCase());
        if (jsPropertyName.length() > 1) {
            sb.append(jsPropertyName.substring(1));
        }
        return sb.toString();
    }
950903
@Override
    public String getName() {
        if (name == null) {
            return null;
        }
        if (name.endsWith("_INDEX_2")) {
            return removeEnd(name, "_INDEX_2");
        }
        return name;
    }
476663
public RawComponent getExperimentalComponent(String name) {
		for (RawComponent component : getExperimentalComponents()) {
			if (component.getName().equalsIgnoreCase(name)) {
				return component;
			}
		}
		return null;
	}
884298
private String getProjectStageNameFromJNDI() {

        try {

            InitialContext context = new InitialContext();
            Object obj = context.lookup(ProjectStage.PROJECT_STAGE_JNDI_NAME);
            if (obj != null) {
                return obj.toString().trim();
            }

        } catch (NamingException e) {
            // ignore
        }

        return null;
    }