b9dc15ecef0393a55a953acff3c1d0278b19d9f5,src/fonduer/candidates/candidates.py,CandidateExtractor,clear,#CandidateExtractor#Any#Any#,62

Before Change



    def clear(self, session, split, **kwargs):
        Delete Candidates of each class from given split the database.
        for candidate_class in self.candidate_classes:
            logger.info(
                "Clearing table {} (split {})".format(
                    candidate_class.__tablename__, split
                )
            )
            session.query(Candidate).filter(
                Candidate.type == candidate_class.__tablename__
            ).filter(Candidate.split == split).delete()

    def clear_all(self, split, **kwargs):
        Delete all Candidates from given split the database.
        logger.info("Clearing ALL Candidates.")
        self.session.query(Candidate).filter(Candidate.split == split).delete()

After Change


            logger.info(
                "Clearing table {} (split {})".format(
                    candidate_class.__tablename__, split
                )
            )
            self.session.query(Candidate).filter(
                Candidate.type == candidate_class.__tablename__
            ).filter(Candidate.split == split).delete()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: HazyResearch/fonduer
Commit Name: b9dc15ecef0393a55a953acff3c1d0278b19d9f5
Time: 2018-09-01
Author: lwhsiao@stanford.edu
File Name: src/fonduer/candidates/candidates.py
Class Name: CandidateExtractor
Method Name: clear


Project Name: pavlin-policar/openTSNE
Commit Name: 4d56b090275981f35a2c84a9f347aedb273bbe85
Time: 2018-06-18
Author: pavlin.g.p@gmail.com
File Name: tsne/tsne.py
Class Name: TSNE
Method Name: fit


Project Name: OpenMined/Grid
Commit Name: 0bce5765b02513a167e454f112a61bd70d47d6ff
Time: 2020-03-02
Author: ionesiojr@gmail.com
File Name: gateway/app/main/processes/controller.py
Class Name: FLController
Method Name: last_participation