06e423b08766d831d903cf4422d2c46735dd7821,data/rating.py,RatingDAO,containsItem,#RatingDAO#Any#,152

Before Change



    def containsItem(self,i):
        "whether item is in training set"
        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()

After Change



    def containsItem(self,i):
        "whether item is in training set"
        if self.item.has_key(i):
            return True
        else:
            return False

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

    def itemRated(self,i):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: containsItem


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: contains


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: rating