a3279623fdc8c02d531a0106eba1db5f5688bfdc,sperment/config_scope.py,ConfigScope,__init__,#ConfigScope#Any#,38

Before Change


        func_code = inspect.getsourcelines(func)[0]
        assert func_code[0].strip().startswith("@")
        assert func_code[1].strip().startswith("def ")
        assert func_code[1].strip().endswith(":")
        //TODO: do more sophisticated body extraction than just skipping 2 lines
        body = inspect.cleandoc("".join(func_code[2:]))
        self._body_code = compile(body, "<string>", "exec")

After Change



        func_code = inspect.getsourcelines(func)[0]
        i = 0
        while func_code[i].find("def ") == -1 and not func_code[i].endswith(":"):
            i += 1

        body = inspect.cleandoc("".join(func_code[i+1:]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: IDSIA/sacred
Commit Name: a3279623fdc8c02d531a0106eba1db5f5688bfdc
Time: 2014-04-17
Author: qwlouse@gmail.com
File Name: sperment/config_scope.py
Class Name: ConfigScope
Method Name: __init__


Project Name: HazyResearch/pdftotree
Commit Name: 22f99965ecb4567cce7f389349a822477b0c4eaa
Time: 2020-10-06
Author: hiromu.hota@hal.hitachi.com
File Name: tests/test_basic.py
Class Name:
Method Name: test_looks_scanned


Project Name: dhlab-epfl/dhSegment
Commit Name: 442baa24f996bc45e04cdf40c85e0c4fe88a40f3
Time: 2018-07-06
Author: sofia.oliveiraares@epfl.ch
File Name: dh_segment/post_processing/PAGE.py
Class Name:
Method Name: parse_file