06e423b08766d831d903cf4422d2c46735dd7821,data/rating.py,RatingDAO,userRated,#RatingDAO#Any#,156

Before Change


        return self.trainingMatrix.matrix_Item.has_key(self.getItemId(i))

    def userRated(self,u):
        if self.trainingMatrix.matrix_User.has_key(self.getUserId(u)):
            itemIndex =  self.trainingMatrix.matrix_User[self.user[u]].keys()
            rating = self.trainingMatrix.matrix_User[self.user[u]].values()
            return (itemIndex,rating)
        return ([],[])

    def itemRated(self,i):
        if self.trainingMatrix.matrix_Item.has_key(self.getItemId(i)):

After Change


            return False

    def userRated(self,u):
        return self.trainSet_u[u].keys(),self.trainSet_u[u].values()

    def itemRated(self,i):
        return self.trainSet_i.keys(),self.trainSet_i.values()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: Coder-Yu/RecQ
Commit Name: 06e423b08766d831d903cf4422d2c46735dd7821
Time: 2017-06-09
Author: yuyu2223@163.com
File Name: data/rating.py
Class Name: RatingDAO
Method Name: userRated


Project Name: nilmtk/nilmtk
Commit Name: 63ef8bfa3b63090437bd27bf1e04db7ae1eae3cf
Time: 2014-11-27
Author: jack-list@xlk.org.uk
File Name: nilmtk/stats/totalenergy.py
Class Name:
Method Name: get_total_energy


Project Name: CellProfiler/CellProfiler
Commit Name: c65430b778f645fb8bc5ff81f08d8cf8c547a52d
Time: 2009-10-16
Author: thouis@1fc53939-2000-0410-845c-e8453a809027
File Name: pyCellProfiler/cellprofiler/modules/measureimagequality.py
Class Name: MeasureImageQuality
Method Name: test_valid


Project Name: Coder-Yu/RecQ
Commit Name: 06e423b08766d831d903cf4422d2c46735dd7821
Time: 2017-06-09
Author: yuyu2223@163.com
File Name: data/rating.py
Class Name: RatingDAO
Method Name: itemRated