5fbe118729532067c8d427a9ba3ce5a9d0e15917,cellprofiler/measurements.py,,find_metadata_tokens,#Any#,470

Before Change


    while True:
        m = re.search("\\(\\?[<](.+?)[>]", pattern)
        if not m:
            m = re.search("\\\\g[<](.+?)[>]", pattern)
            if not m:
                m = re.search("\\(\\?P[<](.+?)[>]", pattern)
                if not m:
                    break
        result.append(m.groups()[0])
        pattern = pattern[m.end():]
    return result

After Change


              "(?P<METADATA_TAG>...match-exp..)" (Python-style search)
     
    // Convert Matlab to Python
    pattern = re.sub("(\\(\\?)([<].+?[>])","\\1P\\2",pattern)
    match = re.search("(|(%s))"%pattern, "")
    return match.groupdict().keys()

def extract_metadata(pattern, text):
    Return a dictionary of metadata extracted from the text
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: CellProfiler/CellProfiler
Commit Name: 5fbe118729532067c8d427a9ba3ce5a9d0e15917
Time: 2010-05-12
Author: thouis@1fc53939-2000-0410-845c-e8453a809027
File Name: cellprofiler/measurements.py
Class Name:
Method Name: find_metadata_tokens


Project Name: CellProfiler/CellProfiler
Commit Name: fe6d70a51d1a575313906708cf4bcda767b11d07
Time: 2010-09-20
Author: leek@1fc53939-2000-0410-845c-e8453a809027
File Name: cellprofiler/measurements.py
Class Name: Measurements
Method Name: apply_metadata


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 155686c863a95139f8683b77d9d030a8d3654441
Time: 2014-12-03
Author: ehankland@google.com
File Name: perfkitbenchmarker/gcp/gce_virtual_machine.py
Class Name: GceVirtualMachine
Method Name: GetLocalDrives