bd1e1471f064ffc5a40e729d82bfcb9fce73e9e1,pysos/sos_step.py,Base_Step_Executor,get_step_signature,#Base_Step_Executor#,377

Before Change


            else:
                result += statement[1] + "\n"
        result += self.step.task
        return re.sub(r"\s+", " ", result)

    def log(self, stage=None, msg=None):
        raise RuntimeError("Please redefine the log function in derived step executor.")

After Change


        def get_tokens(statement):
            return [x[1] for x in generate_tokens(StringIO(statement).readline)]

        tokens = []
        for statement in self.step.statements:
            if statement[0] in (":", "="):
                tokens.extend([statement[1], statement[0]])
                tokens.extend(get_tokens(statement[2]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: vatlab/SoS
Commit Name: bd1e1471f064ffc5a40e729d82bfcb9fce73e9e1
Time: 2016-09-28
Author: ben.bog@gmail.com
File Name: pysos/sos_step.py
Class Name: Base_Step_Executor
Method Name: get_step_signature


Project Name: CellProfiler/CellProfiler
Commit Name: a0f1f391dfe4448067ce7f0f795142a5f5c41661
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: chartbeat-labs/textacy
Commit Name: 4af08c445fe22e936bed07eccee1d33859b7f580
Time: 2016-02-20
Author: burton@chartbeat.com
File Name: tests/test_extract.py
Class Name: ExtractTestCase
Method Name: setUp