ed82e27fef3c21f0d86e0e8efdc923f527da37ae,jarbas/core/management/commands/irregularities.py,Command,serialize,#Command#Any#,46

Before Change


        probability = None
        if "probability" in row:
            probability = float(row["probability"])
            del row["probability"]

        suspicions = {k: self.bool(v) for k, v in row.items() if self.bool(v)}
        if not suspicions:
            suspicions = None

After Change


        hypothesis = tuple(k for k in row.keys() if k not in reserved_keys)
        pairs = ((k, v) for k, v in row.items() if k in hypothesis)
        filtered = filter(lambda x: self.bool(x[1]), pairs)
        suspicions = dict((k, True) for k, v in filtered) or None

        return dict(
            document_id=document_id,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: okfn-brasil/serenata-de-amor
Commit Name: ed82e27fef3c21f0d86e0e8efdc923f527da37ae
Time: 2017-05-11
Author: cuducos@users.noreply.github.com
File Name: jarbas/core/management/commands/irregularities.py
Class Name: Command
Method Name: serialize


Project Name: sassoftware/python-dlpy
Commit Name: 837ab7dedc4baca6c8f383e922a7b714fbca4d10
Time: 2019-06-02
Author: Wenyu.Shi@sas.com
File Name: dlpy/layers.py
Class Name: Layer
Method Name: to_model_params


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 983aedb23057629605c8a7c8d9757945651d48f5
Time: 2015-03-27
Author: yuyantingzero@gmail.com
File Name: perfkitbenchmarker/packages/fio.py
Class Name:
Method Name: ParseJobFile


Project Name: MolSSI/QCEngine
Commit Name: d1b59f5c5f144c5eeae3a2b1a32340610ad5ed30
Time: 2019-10-09
Author: malorian@me.com
File Name: qcengine/programs/tests/test_programs.py
Class Name:
Method Name: test_rdkit_connectivity_error