31269a5197170026985db35c4703cc6e9c805ebf,tangent/forward_ad.py,ForwardAD,visit_Call,#ForwardAD#Any#,200

Before Change



    // If any keyword arguments weren"t passed, we fill them using the
    // defaults of the original function
    if grads.DEFAULT in bound_args.arguments.values():
      // Build a mapping from names to defaults
      args = quoting.parse_function(func).body[0].args
      defaults = {}

After Change



    // Fill in any missing kwargs with the defaults from the template
    args = quoting.parse_function(template_).body[0].args
    kwargs = dict(zip(*map(reversed, [args.args, args.defaults])))
    kwargs.update(dict(zip(args.kwonlyargs, args.kw_defaults)))
    for arg, val in kwargs.items():
      if arg.id not in bound_args.arguments:
        bound_args.arguments[arg.id] = val
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: google/tangent
Commit Name: 31269a5197170026985db35c4703cc6e9c805ebf
Time: 2017-11-10
Author: bart.vanmerrienboer@gmail.com
File Name: tangent/forward_ad.py
Class Name: ForwardAD
Method Name: visit_Call


Project Name: google/tangent
Commit Name: 31269a5197170026985db35c4703cc6e9c805ebf
Time: 2017-11-10
Author: bart.vanmerrienboer@gmail.com
File Name: tangent/reverse_ad.py
Class Name: ReverseAD
Method Name: visit_Call


Project Name: streamlit/streamlit
Commit Name: da3894b5ae20d2f2851504e0fed6a946247f733f
Time: 2018-06-18
Author: armando@playground.global
File Name: lib/streamlit/config.py
Class Name:
Method Name: get_option