Resolves property name (abbreviation): searches for snippet definition in
'resources' and returns new name of matched property
438661
function resolvePropertyName(name, syntax) {
		var snippet = resources.findSnippet(syntax, name);
		
		if (!snippet && prefs.get('css.fuzzySearch')) {
			var minScore = parseFloat(prefs.get('css.fuzzySearchMinScore'));
			snippet = resources.fuzzyFindSnippet(syntax, name, minScore);
		}
		
		if (snippet) {
			if (typeof snippet !== 'string') {
				snippet = snippet.data;
			}
			
			return cssResolver.splitSnippet(snippet).name;
		}
	}
978240
def get_matching_property_names(self, regex):
        
        log = logging.getLogger(self.cls_logger + '.get_matching_property_names')
        prop_list_matched = []
        if not isinstance(regex, basestring):
            log.warn('regex arg is not a string, found type: {t}'.format(t=regex.__class__.__name__))
            return prop_list_matched
        log.debug('Finding properties matching regex: {r}'.format(r=regex))
        for prop_name in self.properties.keys():
            match = re.search(regex, prop_name)
            if match:
                prop_list_matched.append(prop_name)
        return prop_list_matched
230621
function getNames (resourceType) {
  const aliases = [resourceType];
  if (resourceAliases[resourceType]) {
    return aliases.concat(resourceAliases[resourceType]);
  }
  return alias(resourceType);
}
551237
def add_suffix (self, specified_name, file_type, prop_set):
        
        assert isinstance(specified_name, basestring)
        assert isinstance(file_type, basestring)
        assert isinstance(prop_set, property_set.PropertySet)
        suffix = b2.build.type.generated_target_suffix (file_type, prop_set)

        if suffix:
            return specified_name + '.' + suffix

        else:
            return specified_name
223338
def _resource_prefix(self, resource=None):
        
        px = 'ELASTICSEARCH'
        if resource and config.DOMAIN[resource].get('elastic_prefix'):
            px = config.DOMAIN[resource].get('elastic_prefix')
        return px
1073003
function(abbr, syntax) {
			syntax = syntax || 'css';
			
			var i = 0, il = abbr.length, value = '', ch;
			while (i < il) {
				ch = abbr.charAt(i);
				if (isNumeric(ch) || ch == '#' || ch == '$' || (ch == '-' && isNumeric(abbr.charAt(i + 1)))) {
					value = abbr.substring(i);
					break;
				}
				
				i++;
			}
			
			// try to find keywords in abbreviation
			var property = abbr.substring(0, abbr.length - value.length);
			var keywords = [];
			// try to extract some commonly-used properties
			while (~property.indexOf('-') && !resources.findSnippet(syntax, property)) {
				var parts = property.split('-');
				var lastPart = parts.pop();
				if (!isValidKeyword(lastPart)) {
					break;
				}
				
				keywords.unshift(lastPart);
				property = parts.join('-');
			}

			return keywords.join('-') + value;
		}
213827
private static String extractPropertyName(Method method, String prefix) {
        String name = method.getName();
        if (!name.startsWith(prefix)) {
            return null;
        }
        if (name.length() == prefix.length()) {
            return "";
        }
        name = name.substring(prefix.length());
        if (!Character.isUpperCase(name.charAt(0)) || name.indexOf('$') >= 0) {
            return null;
        }

        // Decapitalize the name only if it doesn't begin with two uppercase
        // letters.

        if (name.length() == 1 || !Character.isUpperCase(name.charAt(1))) {
            char chars[] = name.toCharArray();
            chars[0] = Character.toLowerCase(chars[0]);
            name = new String(chars);
        }

        return name.intern();
    }
215172
private static String getterName(String propertyName) {
        if ((propertyName == null) || (propertyName.length() == 0)) {
            return propertyName;
        }
        return "get" + Character.toUpperCase(propertyName.charAt(0))
                + propertyName.substring(1);
    }
291286
function resolveResource(ref, baseURI){
    // ref ~ "#123"
    if (/^#\d+$/.test(ref))
      return templateList[ref.substr(1)];

    // ref ~ "id:foo"
    if (/^id:/.test(ref))
      return resolveSourceByDocumentId(ref.substr(3));

    // ref ~ "foo.bar.baz"
    if (/^[a-z0-9\.]+$/i.test(ref) && !/\.tmpl$/.test(ref))
      return getSourceByPath(ref);

    // ref ~ "./path/to/file.tmpl"
    return basis.resource(basis.resource.resolveURI(ref, baseURI, '<b:include src=\"{url}\"/>'));
  }
38301
public static String replacePropertiesInString(final String line, Properties properties) {
        StringBuffer newStr = new StringBuffer();

        boolean isVarComplete = false;

        StringBuffer propertyName = new StringBuffer();

        int startIndex = 0;
        int curIndex;
        int searchIndex;
        while ((searchIndex = line.indexOf(PROPERTY_MARKER, startIndex)) != -1) {
            //first check if property Marker is escaped by '\' character
            if (searchIndex != 0 && line.charAt((searchIndex-1)) == '\\') {
                newStr.append(line.substring(startIndex, searchIndex-1));
                newStr.append(PROPERTY_MARKER);
                startIndex = searchIndex + 1;
                continue;
            }
            
            isVarComplete = false;
            
            curIndex = searchIndex + 1;

            while (curIndex < line.length() && !isVarComplete) {
                if ((line.charAt(curIndex) == PROPERTY_MARKER) || (curIndex+1 == line.length())) {
                    isVarComplete = true;
                }

                if (!isVarComplete) {
                    propertyName.append(line.charAt(curIndex));
                }
                ++curIndex;
            }
            
            if (!properties.containsKey(propertyName.toString())) {
                throw new CitrusRuntimeException("No such property '"
                        + PROPERTY_MARKER + propertyName.toString() + PROPERTY_MARKER + "'");
            }

            newStr.append(line.substring(startIndex, searchIndex));
            newStr.append(properties.getProperty(propertyName.toString(), "")); // property value

            startIndex = curIndex;

            propertyName = new StringBuffer();
            isVarComplete = false;
        }

        newStr.append(line.substring(startIndex));

        return newStr.toString();
    }
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();
    }
533358
function(prop) {
	var result, match;
	if((match = prop.match(/^\-(w|m|s|o)+\-/) || prop.charAt(0) === '-') && !prop.match(/^\-(webkit|moz|ms)+\-/)) {
		if(match !== null && match[0]) {
			result = { prefix: match[0].replace(/-/g, '') }
			result.prop = prop.replace(match[0], '');
		} else {
			result = { prefix: '' }
			result.prop = prop.substr(1, prop.length);
		}
	} else {
		result = {
			prefix: false,
			prop: prop
		}
	}
	return result;
}
476478
function getProperty(style, name)
{
    if(style[name] !== void 0)
    {
        return [name, style[name]];
    }
    if(name in propertyNames)
    {
        return [propertyNames[name], style[propertyNames[name]]];
    }
    name = name.substr(0, 1).toUpperCase() + name.substr(1);
    var prefixes = ['webkit', 'moz', 'ms', 'o'], fullName;
    for(var i = 0, end = prefixes.length; i < end; i++)
    {
        fullName = prefixes[i] + name;
        if(style[fullName] !== void 0)
        {
            propertyNames[name] = fullName;
            return [fullName, style[fullName]];
        }
    }
    return [name, void 0];        
}
1286176
function getTouchingPropertyName(sourceFile, position, includeJsDocComment) {
        if (includeJsDocComment === void 0) { includeJsDocComment = false; }
        return getTouchingToken(sourceFile, position, function (n) { return isPropertyName(n.kind); }, includeJsDocComment);
    }
618512
DestTokensMatcher matchSourcePropertyName(Tokens destTokens, int destStartIndex) {
    int[] matchedTokens = new int[sourceTokens.size()];
    for (int sourceIndex = 0; sourceIndex < sourceTokens.size(); sourceIndex++) {
      Tokens srcTokens = sourceTokens.get(sourceIndex);
      matchedTokens[sourceIndex] = matchTokens(srcTokens, destTokens, destStartIndex);
    }
    return new DestTokensMatcher(matchedTokens);
  }
1285388
def resource_name(thing)
      if thing.respond_to?(:declared_type) && thing.declared_type
        name = thing.declared_type
      elsif thing.respond_to?(:resource_name)
        name = thing.resource_name
      else
        name = thing
      end
      name.to_s.gsub('-', '_').to_sym
    end
32289
def resolve_parameters(parameters)
      properties = @schema['definitions'][@resource_name]['properties']
      return [''] if properties.nil?
      definitions = Hash[properties.each_pair.map do |key, value|
                           [value['$ref'], key]
                         end]
      parameters.map do |parameter|
        definition_name = URI.unescape(parameter[2..-3])
        if definitions.has_key?(definition_name)
          definitions[definition_name]
        else
          definition_name = definition_name.split('/')[-1]
          resource_definitions = @schema[
            'definitions'][@resource_name]['definitions'][definition_name]
          if resource_definitions.has_key?('anyOf')
            resource_definitions['anyOf'].map do |property|
              definitions[property['$ref']]
            end.join('|')
          else
            resource_definitions['oneOf'].map do |property|
              definitions[property['$ref']]
            end.join('|')
          end
        end
      end
    end