81460887a6dc118719168c98a0d7543b758d2040,tiny_notebook/protobuf/__init__.py,,,#,12

Before Change


// Filter through the classes to find those in CamelCase
camel_case_name = re.compile("([A-Z][a-z0-9]*)+")
module = sys.modules[__name__]
for name in filter(camel_case_name.match, dir(notebook_pb2)):
    setattr(module, name, getattr(notebook_pb2, name))

// Clear out all temporary variables.
del notebook_pb2, re, sys, camel_case_name, module

After Change


import sys

// Append the current path to the paths to get imports working properly.
dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(dir_path)

from Chart_pb2 import Chart
from Div_pb2 import Div
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: streamlit/streamlit
Commit Name: 81460887a6dc118719168c98a0d7543b758d2040
Time: 2018-01-17
Author: adrien.g.treuille@gmail.com
File Name: tiny_notebook/protobuf/__init__.py
Class Name:
Method Name:


Project Name: pantsbuild/pants
Commit Name: 1a4dcfcf867af57839ba8f7f497bfbadf6e17927
Time: 2018-01-28
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/python/tasks/pytest_run.py
Class Name: PytestRun
Method Name: _generate_coverage_config


Project Name: deepchem/deepchem
Commit Name: cbeea5ff3282ab1025f4fbda33f86cd014634797
Time: 2018-01-11
Author: zqwu@stanford.edu
File Name: devtools/jenkins/generate_graph.py
Class Name:
Method Name: