Retrieve a name from a test

@param description The description of the test
@param mAnnotation The method annotation
@return The name retrieved
972172
private String getName(Description description, RoxableTest mAnnotation) {
		if (mAnnotation == null || mAnnotation.name() == null || mAnnotation.name().isEmpty()) {
			return Inflector.getHumanName(description.getMethodName());
		}
		else {
			return mAnnotation.name();
		}
	}
271653
private static final List<Element> buildDescription(String description) {
		
		// Assertions.
		if (description == null) {
			String msg = "Argument 'description' cannot be null.";
			throw new IllegalArgumentException(msg);
		}
		
		List<Element> rslt = new LinkedList<Element>();
		Element e = fac.createElement("p");
		e.setText(description);
		rslt.add(e);
		return rslt;

	}
1040559
def description(self):
        """"""
        for e in self:
            if isinstance(e, Description):
                return e.value
        raise NoSuchAnnotation
244520
@Override
  public JAnnotation getAnnotation(String name)
  {
    Annotation []ann = _class.getAnnotations();

    for (int i = 0; i < ann.length; i++) {
      if (ann[i].annotationType().getName().equals(name))
        return new JAnnotationWrapper(ann[i]);
    }

    return null;
  }
1229264
public String getQualifierName() {
    if (MeshHeading_Type.featOkTst && ((MeshHeading_Type)jcasType).casFeat_qualifierName == null)
      jcasType.jcas.throwFeatMissing("qualifierName", "de.julielab.jules.types.MeshHeading");
    return jcasType.ll_cas.ll_getStringValue(addr, ((MeshHeading_Type)jcasType).casFeatCode_qualifierName);}
793755
public AnnotationDescr getAnnotation( String name ) {
        return annotations == null ? null : annotations.get( name );
    }
221124
@Override
    public String getName() {
        for (final IAdditionalDescriptors additionalDescriptors : delegateDescriptors) {
            final String name = additionalDescriptors.getName();
            if (name != null) {
                return name;
            }
        }

        return null;
    }
408183
protected String getDescription(Parameter parameter) {
        if (parameter.isAnnotationPresent(Desc.class)) {
            Desc annotation = parameter.getAnnotation(Desc.class);
            return translate(annotation.key(), annotation.value());
        }
        return null;
    }
1326396
private Feature getFeature(AnnotationFS annotation, FeatureDescription featureDescription) {
		if(feature == null) {
			String name = featureDescription.getName();
			feature = annotation.getType().getFeatureByBaseName(name);
		}
		return feature;
	}
928740
private static String nextName( String description ) {
        StringBuilder result = new StringBuilder();
        for( int i = 0; i < description.length(); i++ ) {
            char c = description.charAt( i );
            if( Character.isJavaIdentifierPart( c ) && c != '$' ) {
                result.append( c );
            } else {
                break;
            }
        }
        return result.toString();
    }
852309
private static String getParameterName(Method m, int paramIndex) {
        PName pName = getParameterAnnotation(m, paramIndex, PName.class);
        if (pName != null) {
            return pName.value();
        } else {
            return "";
        }
    }
180821
public static String getMethodDescriptor(final Method m) {
        Class<?>[] parameters = m.getParameterTypes();
		StringBuilder sb = new StringBuilder();
        sb.append('(');
        for (int i = 0; i < parameters.length; ++i) {
            getDescriptor(sb, parameters[i]);
        }
        sb.append(')');
        getDescriptor(sb, m.getReturnType());
        return sb.toString();
    }
392309
public static String[] getFeatureAttribute(Annotation annotation) {

        try {

            // only annotations which are annotated with @FeatureAttribute are interesting
            FeatureAttribute details = annotation.annotationType().getAnnotation(FeatureAttribute.class);
            if (details != null) {

                // this is the name of the feature attribute
                String attributeName = details.value();

                // find the method to invoke on the annotation to read the value of the feature attribute
                Method method = annotation.getClass().getMethod(details.annotationAttribute());
                if (method != null) {
                    String attributeValue = method.invoke(annotation).toString();
                    return new String[]{attributeName, attributeValue};
                }

            }

        } catch (NoSuchMethodException e) {
            throw new IllegalStateException(e);
        } catch (SecurityException e) {
            throw new IllegalStateException(e);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException(e);
        } catch (IllegalArgumentException e) {
            throw new IllegalStateException(e);
        } catch (InvocationTargetException e) {
            throw new IllegalStateException(e);
        }

        return null;

    }
1158868
protected Tag getModelTag(Class<?> modelClass) {
        if (modelClass.isAnnotationPresent(ApiModel.class)) {
            ApiModel annotation = modelClass.getAnnotation(ApiModel.class);
            Tag tag = new Tag();
            tag.setName(Optional.fromNullable(Strings.emptyToNull(annotation.name())).or(modelClass.getSimpleName()));
            tag.setDescription(translate(annotation.descriptionKey(), annotation.description()));
            return tag;
        }

        Tag tag = new Tag();
        tag.setName(modelClass.getName());
        return tag;
    }
233078
public static String getPropertyName(MethodNode mNode) {
        String name = mNode.getName();
        if (name.startsWith("set") || name.startsWith("get") || name.startsWith("is")) {
            String pname = decapitalize(name.substring(name.startsWith("is") ? 2 : 3));
            if (!pname.isEmpty()) {
                if (name.startsWith("set")) {
                    if (mNode.getParameters().length == 1) {
                        return pname;
                    }
                } else if (mNode.getParameters().length == 0 && !ClassHelper.VOID_TYPE.equals(mNode.getReturnType())) {
                    if (name.startsWith("get") || ClassHelper.boolean_TYPE.equals(mNode.getReturnType())) {
                        return pname;
                    }
                }
            }
        }
        return null;
    }
1353199
protected RoxableTest getMethodAnnotation(Description description) throws NoSuchMethodException {
		return description.getTestClass().getMethod(description.getMethodName()).getAnnotation(RoxableTest.class);
	}
133451
public String getName() {
        FeatureDescriptor fd = getFeatureDescriptor();
        if (fd == null) {
            return null;
        }

        return fd.getName();
    }