9572a68b8832a09f716017742fbd3b4f1da3d131,scripts/cpp_lint.py,,,#,3745

Before Change


//         >
//     |   [^<>] )*
//   >
_RE_PATTERN_IDENT = r"[_a-zA-Z]\w*"  // =~ [[:alpha:]][[:alnum:]]*
_RE_PATTERN_TYPE = (
    r"(?:const\s+)?(?:typename\s+|class\s+|struct\s+|union\s+|enum\s+)?"
    r"(?:\w|"
    r"\s*<(?:<(?:<[^<>]*>|[^<>])*>|[^<>])*>|"
    r"::)+")
// A call-by-reference parameter ends with "& identifier".
_RE_PATTERN_REF_PARAM = re.compile(
    r"(" + _RE_PATTERN_TYPE + r"(?:\s*(?:\bconst\b|[*]))*\s*"
    r"&\s*" + _RE_PATTERN_IDENT + r")\s*(?:=[^,()]+)?[,)]")
// A call-by-const-reference parameter either ends with "const& identifier"
// or looks like "const type& identifier" when "type" is atomic.
_RE_PATTERN_CONST_REF_PARAM = (
    r"(?:.*\s*\bconst\s*&\s*" + _RE_PATTERN_IDENT +
    r"|const\s+" + _RE_PATTERN_TYPE + r"\s*&\s*" + _RE_PATTERN_IDENT + r")")


def CheckLanguage(filename, clean_lines, linenum, file_extension,
                  include_state, nesting_state, error):

After Change


    CheckSectionSpacing(filename, clean_lines, classinfo, linenum, error)


_RE_PATTERN_INCLUDE_NEW_STYLE = re.compile(r"//include +"[^/]+\.h"")
_RE_PATTERN_INCLUDE = re.compile(r"^\s*//\s*include\s*([<"])([^>"]*)[>"].*$")
// Matches the first component of a filename delimited by -s and _s. That is:
//  _RE_FIRST_COMPONENT.match("foo").group(0) == "foo"
//  _RE_FIRST_COMPONENT.match("foo.cc").group(0) == "foo"
//  _RE_FIRST_COMPONENT.match("foo-bar_baz.cc").group(0) == "foo"
//  _RE_FIRST_COMPONENT.match("foo_bar-baz.cc").group(0) == "foo"
_RE_FIRST_COMPONENT = re.compile(r"^[^-_.]+")


def _DropCommonSuffixes(filename):
  Drops common suffixes like _test.cc or -inl.h from filename.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 34

Instances


Project Name: BVLC/caffe
Commit Name: 9572a68b8832a09f716017742fbd3b4f1da3d131
Time: 2014-08-12
Author: jeff.donahue@gmail.com
File Name: scripts/cpp_lint.py
Class Name:
Method Name:


Project Name: BVLC/caffe
Commit Name: 9572a68b8832a09f716017742fbd3b4f1da3d131
Time: 2014-08-12
Author: jeff.donahue@gmail.com
File Name: scripts/cpp_lint.py
Class Name:
Method Name:


Project Name: BVLC/caffe
Commit Name: 16176a2d3e934528c1b6a4c80d0fc53c86ec5933
Time: 2014-04-22
Author: jeff.donahue@gmail.com
File Name: scripts/cpp_lint.py
Class Name:
Method Name:


Project Name: BVLC/caffe
Commit Name: 9572a68b8832a09f716017742fbd3b4f1da3d131
Time: 2014-08-12
Author: jeff.donahue@gmail.com
File Name: scripts/cpp_lint.py
Class Name:
Method Name:


Project Name: BVLC/caffe
Commit Name: 16176a2d3e934528c1b6a4c80d0fc53c86ec5933
Time: 2014-04-22
Author: jeff.donahue@gmail.com
File Name: scripts/cpp_lint.py
Class Name:
Method Name: