Find prefix and clean code
 @param code [String]
 @param stdClass [Symbol]
 @return [Array]
427302
def strip_id_wrapper(code, stdclass)
      prefix = @registry.processors[stdclass].prefix
      code = code.sub(/^#{prefix}\((.+)\)$/, "\\1")
      [prefix, code]
    end
1311456
function(regexList, code)
        {
            var result = [];

            if (regexList != null)
                for (var i = 0; i < regexList.length; i++)
                    // BUG: length returns len+1 for array if methods added to prototype chain (oising@gmail.com)
                    if (typeof (regexList[i]) == "object")
                        result = result.concat(getMatches(code, regexList[i]));

            // sort and remove nested the matches
            return this.removeNestedMatches(result.sort(matchesSortCallback));
        }
104082
protected function analyseStyle($code)
    {
        // clean the spaces
        $code = preg_replace('/[\s]+/', ' ', $code);

        // remove the comments
        $code = preg_replace('/\/\*.*?\*\//s', '', $code);

        // split each CSS code "selector { value }"
        preg_match_all('/([^{}]+){([^}]*)}/isU', $code, $match);

        // for each CSS code
        $amountMatch = count($match[0]);
        for ($k = 0; $k < $amountMatch; $k++) {

            // selectors
            $names = strtolower(trim($match[1][$k]));

            // css style
            $styles = trim($match[2][$k]);

            // explode each value
            $styles = explode(';', $styles);

            // parse each value
            $css = array();
            foreach ($styles as $style) {
                $tmp = explode(':', $style);
                if (count($tmp) > 1) {
                    $cod = $tmp[0];
                    unset($tmp[0]);
                    $tmp = implode(':', $tmp);
                    $css[trim(strtolower($cod))] = trim($tmp);
                }
            }

            // explode the names
            $names = explode(',', $names);

            // save the values for each names
            foreach ($names as $name) {
                // clean the name
                $name = trim($name);

                // if a selector with something like :hover => continue
                if (strpos($name, ':') !== false) {
                    continue;
                }

                // save the value
                if (!isset($this->css[$name])) {
                    $this->css[$name] = $css;
                } else {
                    $this->css[$name] = array_merge($this->css[$name], $css);
                }

            }
        }

        // get he list of the keys
        $this->cssKeys = array_flip(array_keys($this->css));
    }
821911
def fetch(code) :
		
		ret = {}

		code = KeywordFetcher._remove_strings(code)
		result = KeywordFetcher.prog.findall(code)

		for keyword in result :
			if len(keyword) <= 1: continue # Ignore single-length word
			if keyword.isdigit(): continue # Ignore number

			if keyword[0] == '-' or keyword[0] == '*' : keyword = keyword[1:] # Remove first char if string is starting by '-' or '*' (Pointer or Negative numbers)
			if keyword[-1] == '-' or keyword[-1] == '*' : keyword = keyword[0:-1] # Remove last char if string is finished by '-' or '*'

			if len(keyword) <= 1: continue

			ret[ keyword ] = ret.get(keyword, 0) + 1 # `ret[ keyword ] += 1` with initial value

		return ret
122613
def lex!
			r = Array.new
			@buffer.gsub!(/(?:\r\n|\n\r)/, "\n")
			while @code_start_re =~ @buffer
				r << [:string, $`] unless $`.empty?
				if CODE_EQUIVALENT.has_key?($&)
					CODE_EQUIVALENT[$&].each do |c|
						r << [:code, c]
					end
					@buffer = $'
				else
					csi = $&
					residual = $'
					if PARAMETER_AND_LETTER =~ residual
						r << [:code, $&]
						@buffer = $'
					else
						@buffer = csi + residual
						return r
					end
				end
			end
			r << [:string, @buffer] unless @buffer.empty?
			@buffer = ''
			return r
		end
55485
function (node) {
    const parent = node.parentNode
    return parent.classList.contains('code') && parent.nodeName === 'TD' && node.nodeName === 'PRE'
  }
78164
public static Optional<String[]> lookup(long code) {
        String[] desc = DESCRIPTIONS.get(code & 0xFFFF0000);

        return Optional.ofNullable(desc);
    }
1362601
private void cacheCodes() {
        Set<ProcCode> set = new HashSet<ProcCode>();

        if (parent != null) {
            set.addAll(Arrays.asList(parent.getCodes()));
        }

        if (scopeCodes != null) {
            set.addAll(scopeCodes);
        }

        cachedCodes = set.toArray(new ProcCode[set.size()]);
        Arrays.sort(
                cachedCodes,
                new Comparator<ProcCode>() {
                    public int compare(ProcCode code1, ProcCode code2) {
                        return code2.compareTo(code1);
                    }
                }
        );

        for (ProcCode code : cachedCodes) {
            hasCrazyCode = hasCrazyCode || !code.startsWithConstant();
            hasCheck = hasCheck || code.containsCheck();
        }
    }
272261
public static String getGuide(String code){
        StringBuilder builder = new StringBuilder();
        builder.append(" see ").append(code).append(" for further details.");
        return builder.toString();
    }
1084955
def each_common_prefix(key, start, callback)
      base = @base
      chck = @chck
      node = @base[0]
      offset = -1
      kin = KeyStream.new(key, start)
    
      while true
        code = kin.read
        offset += 1
        terminal_index = node
      
        if(chck[terminal_index] == Node::Chck::TERMINATE_CODE)
          callback.call(start, offset, Node::Base.ids(base[terminal_index]))
        
          if(code == Node::Chck::TERMINATE_CODE)
            return
          end
        end
      
        idx = node + code
        node = base[idx]
      
        if(chck[idx] == code)
          if(node >= 0)
            next
          else
            call_if_key_including(kin, node, start, offset, callback)
          end
        end
        return
      end
    end
1277473
def find_prototypes(code):
    

    prots = []
    lines = code.split('\n')
    for line in lines:
        m = re.match("\s*" + re_func_prot, line)
        if m is not None:
            rtype, name, args = m.groups()[:3]
            if args == 'void' or args.strip() == '':
                args = []
            else:
                args = [tuple(arg.strip().split(' '))
                        for arg in args.split(',')]
            prots.append((name, args, rtype))

    return prots
230178
function(code) {
    var modules = [];

    var lex = Espruino.Core.Utils.getLexer(code);
    var tok = lex.next();
    var state = 0;
    while (tok!==undefined) {
      if (state==0 && tok.str=="require") {
        state=1;
      } else if (state==1 && tok.str=="(") {
        state=2;
      } else if (state==2 && (tok.type=="STRING")) {
        state=0;
        var module = tok.value;
        if (!isBuiltIn(module) && modules.indexOf(module)<0)
          modules.push(module);
      } else
        state = 0;
      tok = lex.next();
    }

    return modules;
  }
1208815
protected function classForCode($code)
    {
        if (isset(self::$respClassMap[$code])) {
            return self::$respClassMap[$code];
        }

        return null;
    }
1220714
def [](code)
      subfield = self.find {|s| s.code == code}
      return subfield.value if subfield
      return
    end
63363
public function detailByCode(string $code)
    {
        $all = $this->detail($code);

        return $this->checkAndReturnSingleResult($all);
    }
1036295
function getChalk(code) {
    if (code.slice(0, 1) === 'I') {
        return chalk.blue;
    } else if (code.slice(0, 1) === 'W') {
        return chalk.yellow;
    } else {
        return chalk.red;
    }
}
667032
def _clean_code(code):
    
    lines = []
    # cleanup lines, the parser is very sensitive to extra spaces,...
    for l in code.splitlines():
        # remove last .
        if l.endswith('.'):
            l = l[:-1]
        # the parser doe not like VALUE xxx.
        if "VALUE" in l:
            l = l[:l.find("VALUE")]
        # the parser does not like extra spaces between "PIC X(xxx)" and "."
        indent = len(l) - len(l.lstrip())
        tokens = l.split(" ")
        while "" in tokens:
            tokens.remove("")
        if tokens and not tokens[-1].endswith("."):
            tokens[-1] += "."
        lines.append(" " * indent + " ".join(tokens))

    return lines