5cc8c9bfff0537c70afc3ca8ab9f0162309a82d8,dm_control/autowrap/autowrap.py,,main,#Any#,62

Before Change



def main(unused_argv):
  // Get the path to the xmacro header file.
  xmacro_hdr_path = None
  for path in FLAGS.header_paths:
    if path.endswith("mjxmacro.h"):
      xmacro_hdr_path = path
      break
  if xmacro_hdr_path is None:
    logging.fatal("List of inputs must contain a path to mjxmacro.h")

  srcs = codegen_util.UniqueOrderedDict()
  for p in sorted(FLAGS.header_paths):
    with io.open(p, "r", errors="ignore") as f:
      srcs[p] = f.read()

After Change


  // Get the path to the mjmodel and mjxmacro header files.
  // These header files need special handling.
  for header in (_MJMODEL_H, _MJXMACRO_H):
    for path in FLAGS.header_paths:
      if path.endswith(header):
        special_header_paths[header] = path
        break
    if header not in special_header_paths:
      logging.fatal("List of inputs must contain a path to %s", header)

  // Make sure mjmodel.h is parsed first, since it is included by other headers.
  srcs = codegen_util.UniqueOrderedDict()
  sorted_header_paths = sorted(FLAGS.header_paths)
  sorted_header_paths.remove(special_header_paths[_MJMODEL_H])
  sorted_header_paths.insert(0, special_header_paths[_MJMODEL_H])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: deepmind/dm_control
Commit Name: 5cc8c9bfff0537c70afc3ca8ab9f0162309a82d8
Time: 2019-02-18
Author: stunya@google.com
File Name: dm_control/autowrap/autowrap.py
Class Name:
Method Name: main


Project Name: geometalab/OSMDeepOD
Commit Name: 5498cb8bd7e7f3bb10ffe7d2c7ce3b0753df71e2
Time: 2017-03-20
Author: samuel.kurath@gmail.com
File Name: src/train/retrain.py
Class Name:
Method Name: get_or_create_bottleneck


Project Name: NifTK/NiftyNet
Commit Name: 1f5bd7028636e6320079fc785c4aca9eda51defa
Time: 2019-01-31
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/utilities/util_common.py
Class Name:
Method Name: average_multi_opt_gradients


Project Name: deepmind/dm_control
Commit Name: 5cc8c9bfff0537c70afc3ca8ab9f0162309a82d8
Time: 2019-02-18
Author: stunya@google.com
File Name: dm_control/autowrap/autowrap.py
Class Name:
Method Name: main