def completionmatches(self,text,line,flag=0):
        groups=[]
        programs=[]
        groupwiseprograms={}
        info = self.get_supervisor().getAllProcessInfo()
        for i in info:
            programs.append(i['name'])
            if groups not in i['group']:
                groups.append(i['group'])
                groupwiseprograms[i['group']]=[]
            groupwiseprograms[i['group']].append(i['name'])
        total=[]
        for i in groups:
            if i in programs:
                total.append(i+' ')
            else:
                for n in groupwiseprograms[i]:
                    total.append(i+':'+n+' ')
        if flag:
            # add/remove require only the group name
            return [i+' ' for i in groups if i.startswith(text)]
        if len(line.split()) == 1:
            return total
        else:
            current=line.split()[-1]
            if line.endswith(' ') and len(line.split()) > 1:
                results=[i for i in total if i.startswith(text)]
                return results
            if ':' in current:
                g=current.split(':')[0]
                results = [i+' ' for i in groupwiseprograms[g]
                           if i.startswith(text)]
                return results
            results = [i for i in total if i.startswith(text)]
            return results
dataset/ETHPy150Open XiaoMi/minos/supervisor/supervisor/supervisorctl.py/Controller.completionmatches/swapped operands of `not in`