fe6d70a51d1a575313906708cf4bcda767b11d07,cellprofiler/measurements.py,Measurements,apply_metadata,#Measurements#Any#Any#,374

Before Change


        result = ""
        while True:
            // Replace double \\ with \
            m = re.search("\\\\\\\\", pattern)
            if m:
                result += pattern[:m.start()]+"\\"
                pattern = pattern[m.end():]
                continue
            // Replace a tag
            m = re.search("\\(\\?[<](.+?)[>]\\)", pattern)
            if not m:
                m = re.search("\\\\g[<](.+?)[>]", pattern)
                if not m:

After Change


        
        if image_set_index == None:
            image_set_index = self.image_set_index
        result_pieces = []
        double_backquote = "\\\\"
        single_backquote = "\\"
        for piece in pattern.split(double_backquote):
            // Replace a tag
            m = re.search("\\(\\?[<](.+?)[>]\\)", piece)
            if not m:
                m = re.search("\\\\g[<](.+?)[>]", piece)
                if not m:
                    result_pieces.append(piece)
                    continue
            result = piece[:m.start()]
            measurement = "Metadata_"+m.groups()[0]
            result += str(self.get_measurement("Image", measurement, 
                                               image_set_index))
            result += piece[m.end():]
            result_pieces.append(result)
        return single_backquote.join(result_pieces)
    
    def group_by_metadata(self, tags):
        Return groupings of image sets with matching metadata tags
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


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: kwgoodman/numerox
Commit Name: d9444f0c2966113ed8dcd075e64e32645e9ec21d
Time: 2017-11-04
Author: kwgoodman@gmail.com
File Name: numerox/prediction.py
Class Name: Prediction
Method Name: performance


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 4bf3f166cbb0361bed0be994bbaeee5e77b03029
Time: 2020-04-30
Author: pclay@google.com
File Name: perfkitbenchmarker/linux_benchmarks/dpb_sparksql_benchmark.py
Class Name:
Method Name: Prepare


Project Name: deepgram/kur
Commit Name: a89d7dd73bf376f74264512e2a22d8b55b103853
Time: 2017-04-10
Author: ajsyp@syptech.net
File Name: kur/loggers/binary_logger.py
Class Name: BinaryLogger
Method Name: enumerate_statistics