097ac1ec8b3bcfe434ec9e200599b5552e3f6ff2,bt/algos.py,UpdateRisk,__call__,#UpdateRisk#Any#,2231

Before Change



    def __call__(self, target):
        // Set the unit risk on temp, so it can be used for hedging later
        target.temp.setdefault("unit_risk", {})[ self.measure ] = self.unit_risk
        self._set_risk_recursive( target, 0 )
        return True

After Change


            target.risks.loc[ target.now, self.measure ] = risk

    def __call__(self, target):
        unit_risk_frame = target.get_data("unit_risk")[ self.measure ]
        self._set_risk_recursive( target, 0, unit_risk_frame )
        return True

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pmorissette/bt
Commit Name: 097ac1ec8b3bcfe434ec9e200599b5552e3f6ff2
Time: 2020-12-18
Author: pascal.i.tomecek@jpmorgan.com
File Name: bt/algos.py
Class Name: UpdateRisk
Method Name: __call__


Project Name: pmorissette/bt
Commit Name: 11aed490ee106a799b1d71c74c4a00bd3df6a263
Time: 2020-12-18
Author: pascal.i.tomecek@jpmorgan.com
File Name: bt/algos.py
Class Name: UpdateRisk
Method Name: __call__


Project Name: pantsbuild/pants
Commit Name: 5c6d0a06776f7b104da3e32e99bbf81fee19018c
Time: 2013-12-13
Author: benjy@foursquare.com
File Name: src/python/twitter/pants/tasks/ivy_resolve.py
Class Name: IvyResolve
Method Name: _populate_ivy_jar_products