5f3cea3a8fa00722a99668b8a96e497b52a4515f,torchnlp/encoders/encoder.py,Encoder,decode,#Encoder#Any#,43

Before Change


        
        if self.enforce_reversible:
            self.enforce_reversible = False
            if self.encode(self.decode(encoded)) != encoded:
                raise ValueError("Decoding is not reversible for "%s"" % encoded)
            self.enforce_reversible = True

After Change


        
        if self.enforce_reversible:
            self.enforce_reversible = False
            decoded_encoded = self.encode(self.decode(encoded))
            self.enforce_reversible = True
            if decoded_encoded != encoded:
                raise ValueError("Decoding is not reversible for "%s"" % encoded)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: PetrochukM/PyTorch-NLP
Commit Name: 5f3cea3a8fa00722a99668b8a96e497b52a4515f
Time: 2019-07-12
Author: petrochukm@gmail.com
File Name: torchnlp/encoders/encoder.py
Class Name: Encoder
Method Name: decode


Project Name: google/deepvariant
Commit Name: bb8db448470551c15c9b0ddab573a0c8e2e6303a
Time: 2019-09-18
Author: cym@google.com
File Name: deepvariant/vcf_stats_vis.py
Class Name:
Method Name: _build_type_chart


Project Name: hanxiao/bert-as-service
Commit Name: c139d9a5dcca330c527cbd44cc41b2ef50f57276
Time: 2018-12-18
Author: hanhxiao@tencent.com
File Name: example/example8.py
Class Name:
Method Name:


Project Name: hanxiao/bert-as-service
Commit Name: e4c6fe0fb71a872b3534d90b4db2d67494f91675
Time: 2018-11-27
Author: hanhxiao@tencent.com
File Name: example4.py
Class Name:
Method Name: get_encodes


Project Name: hanxiao/bert-as-service
Commit Name: 0fecdb9d5029639846c14fe97b3caf0cd286d55d
Time: 2018-11-26
Author: hanhxiao@tencent.com
File Name: example3.py
Class Name:
Method Name: