When the class name is not unique we will use two underscore '__' and a digit representing the number of time
this class was found
962962
public static String makeUnique(String className) {
        
        final Matcher m = UNIQUE_NAMING_PATTERN.matcher(className);
        
        if (m.matches()) {
            // get the current number
            final Integer number = Integer.parseInt(m.group(2));
            // replace the current number in the string with the number +1
            return m.group(1) + (number + 1);
        } else {
            return className + "__1";
        }
    }
453370
def _unique_class(self, cls):
        
        return not any(isinstance(obj, cls) for obj in self.plugins)
354903
def type
            name = (self.class.name or self.class.superclass.name or self.native_type.name)

            name.split("::").last.to_sym
        end
579841
def class_name_to_resource_name(class_name: str) -> str:
    
    s = re.sub('(.)([A-Z][a-z]+)', r'\1 \2', class_name)
    return re.sub('([a-z0-9])([A-Z])', r'\1 \2', s)
259843
def parse_class_name(name)
      class_name = name.to_s.capitalize
      class_name.gsub(/[-_.\s]([a-zA-Z0-9])/) { Regexp.last_match[1].upcase }
    end
578535
function(elem, className) {
            // the className can potentially come from the search results, so make sure it is valid before
            // attempting to insert it...

            // if the className doesn't start with a letter or a '-' followed by a letter, don't insert
            if(!/^[-]?[A-Za-z]/.test(className)) {
                return;
            }
            // now filter out anything that is not a letter, number, '-', or '_'
            className = className.replace(/[^A-Za-z0-9_-]/g, "");
            if(this.hasSVG) {
                if(elem.className.baseVal) {
                    elem.className.baseVal += " " + className;
                }
                else {
                    elem.className.baseVal = className;
                }
            }
            else {
                $(elem).addClass(className);
            }
        }
1292644
private void checkIDEGeneratedParmNames(JavaClass cls) {
		for (Method m : cls.getMethods()) {
			if (isIDEGeneratedMethodWithCode(m)) {
				bugReporter.reportBug(
						new BugInstance(this, BugType.IMC_IMMATURE_CLASS_IDE_GENERATED_PARAMETER_NAMES.name(),
								NORMAL_PRIORITY).addClass(cls).addMethod(cls, m));
				return;
			}
		}
	}
2392
def name2class(name)
      klass = Kernel
      name.to_s.split(%r{/}).each do |part|
        klass = klass.const_get(
          part.capitalize.gsub(/[_-](.)/) { |match| match[1].upcase }
        )
      end
      klass
    end
675167
def _onClass(self, name, line, pos, absPosition,
                 keywordLine, keywordPos,
                 colonLine, colonPos, level):
        """"""
        self.__flushLevel(level)
        c = Class(name, line, pos, absPosition, keywordLine, keywordPos,
                  colonLine, colonPos)
        if self.__lastDecorators is not None:
            c.decorators = self.__lastDecorators
            self.__lastDecorators = None
        self.objectsStack.append(c)
1023000
def underscore(name):
    '''
    
    '''

    s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
    return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
1359801
def mk_class_name(*parts):
    """"""
    cap = lambda s: s and (s[0].capitalize() + s[1:])
    return "".join(["".join([cap(i)
                             for i in re.split("[\ \-\_\.]", str(p))])
                    for p in parts])
248938
def qualified_name(cls):
    
    module = cls.__module__
    if module is None or module == str.__class__.__module__:
        return cls.__name__
    return module + '.' + cls.__name__
39385
function processClassName(name, item) {
		name = transformClassName(name, item, 'element');
		name = transformClassName(name, item, 'modifier');
		
		// expand class name
		// possible values:
		// * block__element
		// * block__element_modifier
		// * block__element_modifier1_modifier2
		// * block_modifier
		var block = '', element = '', modifier = '';
		var separators = getSeparators();
		if (~name.indexOf(separators.element)) {
			var elements = name.split(separators.element);
			block = elements.shift();

			var modifiers = elements.pop().split(separators.modifier);
			elements.push(modifiers.shift());
			element = elements.join(separators.element);
			modifier = modifiers.join(separators.modifier);
		} else if (~name.indexOf(separators.modifier)) {
			var blockModifiers = name.split(separators.modifier);
			
			block = blockModifiers.shift();
			modifier = blockModifiers.join(separators.modifier);
		}
		
		if (block || element || modifier) {
			if (!block) {
				block = item.__bem.block;
			}
			
			// inherit parent bem element, if exists
//			if (item.parent && item.parent.__bem && item.parent.__bem.element)
//				element = item.parent.__bem.element + separators.element + element;
			
			// produce multiple classes
			var prefix = block;
			var result = [];
			
			if (element) {
				prefix += separators.element + element;
				result.push(prefix);
			} else {
				result.push(prefix);
			}
			
			if (modifier) {
				result.push(prefix + separators.modifier + modifier);
			}
			
			if (!item.__bem.block || modifier) {
				item.__bem.block = block;
			}
			
			item.__bem.element = element;
			item.__bem.modifier = modifier;
			
			return result;
		}
		
		// ...otherwise, return processed or original class name
		return name;
	}
1021123
def name(self):
        """"""
        if self._name is None:
            return re.sub(r"(?<=\w)([A-Z])", r" \1", self.__class__.__name__)
        else:
            return self._name
31719
def check_name(self, name=None):
        '''
        
        '''
        if name:
            self.plugin_info['check_name'] = name

        if self.plugin_info['check_name'] is not None:
            return self.plugin_info['check_name']

        return self.__class__.__name__
516444
def name_inner_event(cls):
    """'"""
    if hasattr(cls, 'Event'):
        cls.Event._event_name = '{}.Event'.format(cls.__name__)
    else:
        warnings.warn('Class {} does not have a inner Event'.format(cls))
    return cls
1017710
private String getShortClassName(String className) {
        int lastDot = className.lastIndexOf('.');
        if (lastDot >= 0) {
            className = className.substring(lastDot + 1);
        }
        return className.toLowerCase(Locale.US).replace('+', '$');
    }