Source files: 340

Click here to show/hide file names

Clones detected: 1392

6751 of 37417 lines are duplicates (18.04%)

Parameters
clustering_threshold = 10
distance_threshold = 5
size_threshold = 5
hashing_depth = 1
clusterize_using_hash = False
clusterize_using_dcup = False

Time elapsed
Construction of AST : 56.86 seconds
Building statement hash : 0.24 seconds
Building patterns : 580.34 seconds
Marking similar statements : 990.54 seconds
Finding similar sequences of statements : 83.39 seconds
Refining candidates : 2514.01 seconds
Total time: 4225.39
Started at: Wed Jul 14 11:32:32 2010
Finished at: Wed Jul 14 12:01:14 2010

Clone # 1
Distance between two fragments = 0
Clone size = 81
Source file "./spacewalk/common/rhn_mpm.py"
The first line is 176
Source file "./server/handlers/app/rhn_mpm.py"
The first line is 153
def _read_bytes(self, stream, amt):
    ret = ''
    while amt:
        buf = stream.read(min(amt, self._buffer_size))
        if not buf:
            return ret
        ret = (ret) + (buf)
        amt = (amt) - (len(buf))
    return ret
def _read_bytes(self, stream, amt):
    ret = ''
    while amt:
        buf = stream.read(min(amt, self._buffer_size))
        if not buf:
            return ret
        ret = (ret) + (buf)
        amt = (amt) - (len(buf))
    return ret
def _read_header(self, header_data, header_flags):
    if (header_flags) & (MPM_HEADER_COMPRESSED_GZIP):
        t = cStringIO.StringIO(header_data)
        g = gzip.GzipFile(None, 'r', 0, t)
        header_data = g.read()
        g.close()
        t.close()
    try:
        params, foo = xmlrpclib.loads(header_data)
    except:
        raise
    self.header = MPM_Header(params[0])
def _read_header(self, header_data, header_flags):
    if (header_flags) & (MPM_HEADER_COMPRESSED_GZIP):
        t = cStringIO.StringIO(header_data)
        g = gzip.GzipFile(None, 'r', 0, t)
        header_data = g.read()
        g.close()
        t.close()
    try:
        params, foo = xmlrpclib.loads(header_data)
    except:
        raise
    self.header = MPM_Header(params[0])
def _read_payload(self, payload_stream, payload_flags):
    payload_stream.seek(0, 0)
    if (payload_flags) & (MPM_PAYLOAD_COMPRESSED_GZIP):
        g = gzip.GzipFile(None, 'r', 0, payload_stream)
        t = tempfile.TemporaryFile()
        self.stream_copy(g, t)
        g.close()
        payload_stream = t
    self.payload_stream = payload_stream
def _read_payload(self, payload_stream, payload_flags):
    payload_stream.seek(0, 0)
    if (payload_flags) & (MPM_PAYLOAD_COMPRESSED_GZIP):
        g = gzip.GzipFile(None, 'r', 0, payload_stream)
        t = tempfile.TemporaryFile()
        self.stream_copy(g, t)
        g.close()
        payload_stream = t
    self.payload_stream = payload_stream
def write(self, output_stream):
    if self.header is None:
        raise Exception()
    header_stream, header_size = self._encode_header()
    payload_stream, payload_size = self._encode_payload()
    lead_arr = (self._magic, 1, ('\x00') * (3), self.header_flags, self.payload_flags, header_size, payload_size, ('\x00') * (92))
    lead = apply(struct.pack, ((self._lead_format)) + (lead_arr))
    output_stream.write(lead)
    self.stream_copy(header_stream, output_stream)
    self.stream_copy(payload_stream, output_stream)
def write(self, output_stream):
    if self.header is None:
        raise Exception()
    header_stream, header_size = self._encode_header()
    payload_stream, payload_size = self._encode_payload()
    lead_arr = (self._magic, 1, ('\x00') * (3), self.header_flags, self.payload_flags, header_size, payload_size, ('\x00') * (92))
    lead = apply(struct.pack, ((self._lead_format)) + (lead_arr))
    output_stream.write(lead)
    self.stream_copy(header_stream, output_stream)
    self.stream_copy(payload_stream, output_stream)
def add_header_flag(self, flag):
    self.header_flags = (self.header_flags) | (flag)
def add_header_flag(self, flag):
    self.header_flags = (self.header_flags) | (flag)
def add_payload_flag(self, flag):
    self.payload_flags = (self.payload_flags) | (flag)
def add_payload_flag(self, flag):
    self.payload_flags = (self.payload_flags) | (flag)
def reset_header_flags(self):
    self.header_flags = 0
def reset_header_flags(self):
    self.header_flags = 0
def reset_payload_flags(self):
    self.payload_flags = 0
def reset_payload_flags(self):
    self.payload_flags = 0
def _encode_header(self):
    assert self.header is not None
    stream = tempfile.TemporaryFile()
    data = xmlrpclib.dumps((_replace_null(self.header)))
    if (self.header_flags) & (MPM_HEADER_COMPRESSED_GZIP):
        f = gzip.GzipFile(None, 'wb', 9, stream)
        f.write(data)
        f.close()
    else:
        stream.write(data)
    stream.flush()
    stream.seek(0, 2)
    size = stream.tell()
    stream.seek(0, 0)
    return (stream, size)
def _encode_header(self):
    assert self.header is not None
    stream = tempfile.TemporaryFile()
    data = xmlrpclib.dumps((_replace_null(self.header)))
    if (self.header_flags) & (MPM_HEADER_COMPRESSED_GZIP):
        f = gzip.GzipFile(None, 'wb', 9, stream)
        f.write(data)
        f.close()
    else:
        stream.write(data)
    stream.flush()
    stream.seek(0, 2)
    size = stream.tell()
    stream.seek(0, 0)
    return (stream, size)
def _encode_payload(self):
    assert self.payload_stream is not None
    stream = tempfile.TemporaryFile()
    if (self.payload_flags) & (MPM_PAYLOAD_COMPRESSED_GZIP):
        f = gzip.GzipFile(None, 'wb', 9, stream)
        self.stream_copy(self.payload_stream, f)
        f.close()
    else:
        stream = self.payload_stream
    stream.flush()
    stream.seek(0, 2)
    size = stream.tell()
    stream.seek(0, 0)
    return (stream, size)
def _encode_payload(self):
    assert self.payload_stream is not None
    stream = tempfile.TemporaryFile()
    if (self.payload_flags) & (MPM_PAYLOAD_COMPRESSED_GZIP):
        f = gzip.GzipFile(None, 'wb', 9, stream)
        self.stream_copy(self.payload_stream, f)
        f.close()
    else:
        stream = self.payload_stream
    stream.flush()
    stream.seek(0, 2)
    size = stream.tell()
    stream.seek(0, 0)
    return (stream, size)
def stream_copy(self, source, dest):
    while 1:
        buf = source.read(self._buffer_size)
        if not buf:
            break
        dest.write(buf)
def stream_copy(self, source, dest):
    while 1:
        buf = source.read(self._buffer_size)
        if not buf:
            break
        dest.write(buf)



Clone # 2
Distance between two fragments = 4
Clone size = 78
Source file "./server/test/unit-test/misc_functions.py"
The first line is 25
Source file "./server/test/misc_functions.py"
The first line is 48
def create_new_org():
    org_name = ('unittest-org-%.3f') % (time.time())
    org_password = ('unittest-password-%.3f') % (time.time())
    org_id = rhnServerGroup.create_new_org(org_name, org_password)
    rhnSQL.commit()
    return org_id
def create_new_org():
    org_name = ('unittest-org-%.3f') % (time.time())
    org_password = ('unittest-password-%.3f') % (time.time())
    org_id = rhnServerGroup.create_new_org(org_name, org_password)
    rhnSQL.commit()
    return (org_id, org_name, org_password)
def _create_server_group(org_id, name, description, max_members):
    s = rhnServerGroup.ServerGroup()
    s.set_org_id(org_id)
    s.set_name(name)
    s.set_description(description)
    s.set_max_members(max_members)
    s.save()
    rhnSQL.commit()
    return s
def _create_server_group(org_id, name, description, max_members):
    s = rhnServerGroup.ServerGroup()
    s.set_org_id(org_id)
    s.set_name(name)
    s.set_description(description)
    s.set_max_members(max_members)
    s.save()
    rhnSQL.commit()
    return s
def create_server_group(params):
    return apply(_create_server_group, (), params)
def create_server_group(params):
    return apply(_create_server_group, (), params)
def fetch_server_group(org_id, name):
    s = rhnServerGroup.ServerGroup()
    s.load(org_id, name)
    return s
def fetch_server_group(org_id, name):
    s = rhnServerGroup.ServerGroup()
    s.load(org_id, name)
    return s
_query_fetch_server_groups = rhnSQL.Statement('\n select sgm.server_group_id\n from rhnServerGroupMembers sgm,\n rhnServerGroup sg\n where sgm.server_id = :server_id\n and sgm.server_group_id = sg.id\n and sg.group_type is null\n') _query_fetch_server_groups = rhnSQL.Statement('\n select sgm.server_group_id\n from rhnServerGroupMembers sgm,\n rhnServerGroup sg\n where sgm.server_id = :server_id\n and sgm.server_group_id = sg.id\n and sg.group_type is null\n')
def fetch_server_groups(server_id):
    h = rhnSQL.prepare(_query_fetch_server_groups)
    h.execute(server_id=server_id)
    groups = map(lambda x: x['server_group_id'], (h.fetchall_dict()) or ([]))
    groups.sort()
    return groups
def fetch_server_groups(server_id):
    h = rhnSQL.prepare(_query_fetch_server_groups)
    h.execute(server_id=server_id)
    groups = map(lambda x: x['server_group_id'], (h.fetchall_dict()) or ([]))
    groups.sort()
    return groups
def build_server_group_params(**kwargs):
    params = {'org_id': 'no such org', 'name': ('unittest group name %.3f') % (time.time()), 'description': ('unittest group description %.3f') % (time.time()), 'max_members': 1001}
    params.update(kwargs)
    return params
def build_server_group_params(**kwargs):
    params = {'org_id': 'no such org', 'name': ('unittest group name %.3f') % (time.time()), 'description': ('unittest group description %.3f') % (time.time()), 'max_members': 1001}
    params.update(kwargs)
    return params
def create_new_user(org_id=None, username=None, password=None, roles=None):
    if org_id is None:
        org_id = create_new_org()
    else:
        org_id = lookup_org_id(org_id)
    if username is None:
        username = ('unittest-user-%.3f') % (time.time())
    if password is None:
        password = ('unittest-password-%.3f') % (time.time())
    if roles is None:
        roles = []
    u = rhnUser.User(username, password)
    u.set_org_id(org_id)
    u.save()
    u.contact['password'] = password
    u.save()
    user_id = u.getid()
    h = rhnSQL.prepare('\n select ug.id\n from rhnUserGroupType ugt, rhnUserGroup ug\n where ug.org_id = :org_id\n and ug.group_type = ugt.id\n and ugt.label = :role\n ')
    create_ugm = rhnSQL.Procedure('rhn_user.add_to_usergroup')
    for role in roles:
        h.execute(org_id=org_id, role=role)
        row = h.fetchone_dict()
        if not row:
            raise InvalidRoleError(org_id, role)
        user_group_id = row['id']
        create_ugm(user_id, user_group_id)
    rhnSQL.commit()
    return u
def create_new_user(org_id=None, username=None, password=None, roles=None):
    if org_id is None:
        org_id = create_new_org()
    else:
        org_id = lookup_org_id(org_id)
    if username is None:
        username = ('unittest-user-%.3f') % (time.time())
    if password is None:
        password = ('unittest-password-%.3f') % (time.time())
    if roles is None:
        roles = []
    u = rhnUser.User(username, password)
    u.set_org_id(org_id)
    u.save()
    u.contact['password'] = password
    u.save()
    user_id = u.getid()
    h = rhnSQL.prepare('\n select ug.id\n from rhnUserGroupType ugt, rhnUserGroup ug\n where ug.org_id = :org_id\n and ug.group_type = ugt.id\n and ugt.label = :role\n ')
    create_ugm = rhnSQL.Procedure('rhn_user.add_to_usergroup')
    for role in roles:
        h.execute(org_id=org_id, role=role)
        row = h.fetchone_dict()
        if not row:
            raise InvalidRoleError(org_id, role)
        user_group_id = row['id']
        create_ugm(user_id, user_group_id)
    rhnSQL.commit()
    return u
def lookup_org_id(org_id):
    if isinstance(org_id, types.StringType):
        u = rhnUser.search(org_id)
        if not u:
            raise rhnServerGroup.InvalidUserError(org_id)
        return u.contact['org_id']
    t = rhnSQL.Table('web_customer', 'id')
    row = t[org_id]
    if not row:
        raise rhnServerGroup.InvalidOrgError(org_id)
    return row['id']
def lookup_org_id(org_id):
    if isinstance(org_id, types.StringType):
        u = rhnUser.search(org_id)
        if not u:
            raise rhnServerGroup.InvalidUserError(org_id)
        return u.contact['org_id']
    t = rhnSQL.Table('web_customer', 'id')
    row = t[org_id]
    if not row:
        raise rhnServerGroup.InvalidOrgError(org_id)
    return row['id']
class InvalidEntitlementError(Exception):
    pass
class InvalidRoleError(Exception):
    pass



Clone # 3
Distance between two fragments = 0
Clone size = 35
Source file "./server/test/unit-test/misc_functions.py"
The first line is 150
Source file "./server/test/misc_functions.py"
The first line is 349
def create_activation_key(org_id=None, user_id=None, groups=None, channels=None, entitlement_level=None, note=None, server_id=None):
    if org_id is None:
        need_user = 1
        org_id = create_new_org()
    else:
        need_user = 0
    if user_id is None:
        if need_user:
            u = create_new_user(org_id=org_id)
            user_id = u.getid()
    else:
        u = rhnUser.User('', '')
        u.reload(user_id)
    if groups is None:
        groups = []
        for i in range(3):
            params = build_server_group_params(org_id=org_id)
            sg = create_server_group(params)
            groups.append(sg.get_id())
    if channels is None:
        channels = ['rhel-i386-as-3-beta', 'rhel-i386-as-2.1-beta']
    if entitlement_level is None:
        entitlement_level = 'provisioning_entitled'
    if note is None:
        note = ('Test activation key %d') % (int(time.time()))
    a = rhnActivationKey.ActivationKey()
    a.set_user_id(user_id)
    a.set_org_id(org_id)
    a.set_entitlement_level(entitlement_level)
    a.set_note(note)
    a.set_server_groups(groups)
    a.set_channels(channels)
    a.set_server_id(server_id)
    a.save()
    rhnSQL.commit()
    return a
def create_activation_key(org_id=None, user_id=None, groups=None, channels=None, entitlement_level=None, note=None, server_id=None):
    if org_id is None:
        need_user = 1
        org_id = create_new_org()
    else:
        need_user = 0
    if user_id is None:
        if need_user:
            u = create_new_user(org_id=org_id)
            user_id = u.getid()
    else:
        u = rhnUser.User('', '')
        u.reload(user_id)
    if groups is None:
        groups = []
        for i in range(3):
            params = build_server_group_params(org_id=org_id)
            sg = create_server_group(params)
            groups.append(sg.get_id())
    if channels is None:
        channels = ['rhel-i386-as-3-beta', 'rhel-i386-as-2.1-beta']
    if entitlement_level is None:
        entitlement_level = 'provisioning_entitled'
    if note is None:
        note = ('Test activation key %d') % (int(time.time()))
    a = rhnActivationKey.ActivationKey()
    a.set_user_id(user_id)
    a.set_org_id(org_id)
    a.set_entitlement_level(entitlement_level)
    a.set_note(note)
    a.set_server_groups(groups)
    a.set_channels(channels)
    a.set_server_id(server_id)
    a.save()
    rhnSQL.commit()
    return a



Clone # 4
Distance between two fragments = 4
Clone size = 33
Source file "./server/test/test_solve_dependencies.py"
The first line is 378
Source file "./server/test/test_solve_dependencies.py"
The first line is 317
def testUp2dateFilterGTE1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == 1) or (ret == 0)
def testUp2dateFilterGTE(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == 1) or (ret == 0)
def testUp2dateFilterLT1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == -1
def testUp2dateFilterLT(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == -1
def testUp2dateFilterLTE1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == -1) or (ret == 0)
def testUp2dateFilterLTE(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == -1) or (ret == 0)



Clone # 5
Distance between two fragments = 3
Clone size = 26
Source file "./satellite_tools/satsync.py"
The first line is 1279
Source file "./satellite_tools/satsync.py"
The first line is 1103
for channel, pids in missing_packages.items():
    package_count = len(pids)
    log(1, (messages.package_parsing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not package_count:
        continue
    log(1, ' * WARNING: this may be a very slow process.')
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1)
    ss = SequenceServer(pids[:], nevermorethan=self._batch_size)
    while not ss.doneYN():
        chunk = ss.getChunk()
        item_count = len(chunk)
        stream_loader.process(chunk)
        ss.clearChunk()
        pb.addTo(item_count)
        pb.printIncrement()
    pb.printComplete()
for channel, pids in missing_packages.items():
    package_count = len(pids)
    log(1, (messages.package_parsing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not package_count:
        continue
    log(1, messages.warning_slow)
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1)
    ss = SequenceServer(pids[:], nevermorethan=self._batch_size)
    while not ss.doneYN():
        chunk = ss.getChunk()
        item_count = len(chunk)
        stream_loader.process(chunk)
        ss.clearChunk()
        pb.addTo(item_count)
        pb.printIncrement()
    pb.printComplete()
h.close() h.close()
missing_packages = self._compute_not_cached_source_packages() missing_packages = self._missing_not_cached_packages()
for channel, pids in missing_packages.items():
    if pids:
        raise ReprocessingNeeded
for channel, pids in missing_packages.items():
    if pids:
        raise ReprocessingNeeded



Clone # 6
Distance between two fragments = 4
Clone size = 26
Source file "./server/importlib/channelImport.py"
The first line is 345
Source file "./server/importlib/channelImport.py"
The first line is 304
def preprocess(self):
    for rcm in self.batch:
        self.arches[rcm['arch']] = None
        self.channels[rcm['channel']] = None
def preprocess(self):
    for dcm in self.batch:
        self.arches[dcm['arch']] = None
        self.channels[dcm['channel']] = None
def fix(self):
    self.backend.lookupChannelArches(self.arches)
    self.backend.lookupChannels(self.channels)
    for dcm in self.batch:
        arch = self.arches[rcm['arch']]
        if arch is None:
            rcm.ignored = 1
            raise InvalidArchError(rcm['arch'], ('Invalid release_channel_map arch %s') % (rcm['arch']))
        channel = self.channels[rcm['channel']]
        if channel is None:
            rcm.ignored = 1
            raise InvalidChannelError(rcm['channel'], ('Invalid release_channel_map channel %s') % (rcm['channel']))
        rcm['arch'] = arch
        rcm['channel_id'] = channel['id']
def fix(self):
    self.backend.lookupChannelArches(self.arches)
    self.backend.lookupChannels(self.channels)
    for dcm in self.batch:
        arch = self.arches[dcm['arch']]
        if arch is None:
            dcm.ignored = 1
            raise InvalidArchError(dcm['arch'], ('Invalid dist_channel_map arch %s') % (dcm['arch']))
        channel = self.channels[dcm['channel']]
        if channel is None:
            dcm.ignored = 1
            raise InvalidChannelError(dcm['channel'], ('Invalid dist_channel_map channel %s') % (dcm['channel']))
        dcm['arch'] = arch
        dcm['channel_id'] = channel['id']
def submit(self):
    try:
        self.backend.processReleaseChannelMap(self.batch)
    except:
        self.backend.rollback()
        raise
    self.backend.commit()
def submit(self):
    try:
        self.backend.processDistChannelMap(self.batch)
    except:
        self.backend.rollback()
        raise
    self.backend.commit()



Clone # 7
Distance between two fragments = 2
Clone size = 24
Source file "./server/handlers/app/packages.py"
The first line is 521
Source file "./server/handlers/app/packages.py"
The first line is 357
if (pkg_info.has_key('checksum')) and (CFG.ENABLE_NVREA):
    checksum_exists = 1
    _checksum_sql_filter = 'and c.checksum = :checksum\n and c.checksum_type = :checksum_type'
if (package.has_key('checksum')) and (CFG.ENABLE_NVREA):
    checksum_exists = 1
    _checksum_sql_filter = 'and c.checksum = :checksum\n and c.checksum_type = :checksum_type'
h = rhnSQL.prepare((self._get_pkg_info_query) % (_checksum_sql_filter)) h = rhnSQL.prepare((self._get_pkg_info_query) % (_checksum_sql_filter))
pkg_epoch = None pkg_epoch = None
if pkg_info['epoch'] != '':
    pkg_epoch = pkg_info['epoch']
if package['epoch'] != '':
    pkg_epoch = package['epoch']
if checksum_exists:
    h.execute(pkg_name=pkg_info['name'], pkg_epoch=pkg_epoch, pkg_version=pkg_info['version'], pkg_rel=pkg_info['release'], pkg_arch=pkg_info['arch'], orgid=org_id, checksum_type=pkg_info['checksum_type'], checksum=pkg_info['checksum'])
else:
    h.execute(pkg_name=pkg_info['name'], pkg_epoch=pkg_epoch, pkg_version=pkg_info['version'], pkg_rel=pkg_info['release'], pkg_arch=pkg_info['arch'], orgid=org_id)
if checksum_exists:
    h.execute(pkg_name=package['name'], pkg_epoch=pkg_epoch, pkg_version=package['version'], pkg_rel=package['release'], pkg_arch=package['arch'], orgid=org_id, checksum_type=package['checksum_type'], checksum=package['checksum'])
else:
    h.execute(pkg_name=package['name'], pkg_epoch=pkg_epoch, pkg_version=package['version'], pkg_rel=package['release'], pkg_arch=package['arch'], orgid=org_id)
row = h.fetchone_dict() row = h.fetchone_dict()



Clone # 8
Distance between two fragments = 4
Clone size = 22
Source file "./server/handlers/app/packages.py"
The first line is 613
Source file "./server/handlers/app/packages.py"
The first line is 447
def getSourcePackageMD5sum(self, username, password, info):
    log_debug(3)
    self._MD5sum2Checksum_info(info)
    return self._Checksum2MD5sum_list(self.getSourcePackageChecksum(username, password, info))
def getPackageMD5sum(self, username, password, info):
    log_debug(3)
    self._MD5sum2Checksum_info(info)
    return self._Checksum2MD5sum_list(self.getPackageChecksum(username, password, info))
def getSourcePackageChecksumBySession(self, session_string, info):
    log_debug(3)
    pkg_infos = info.get('packages')
    channels = info.get('channels', [])
    force = info.get('force', 0)
    orgid = info.get('org_id')
    try:
        if orgid == 'null':
            null_org = 1
        else:
            null_org = None
        org_id, force = rhnPackageUpload.authenticate_session(session_string, channels=channels, null_org=null_org, force=force)
    except rhnSession.InvalidSessionError:
        raise rhnFault(33)
    except rhnSession.ExpiredSessionError:
        raise rhnFault(34)
    return self._getSourcePackageChecksum(org_id, pkg_infos)
def getPackageChecksumBySession(self, session_string, info):
    log_debug(3)
    pkg_infos = info.get('packages')
    channels = info.get('channels', [])
    force = info.get('force', 0)
    orgid = info.get('org_id')
    try:
        if orgid == 'null':
            null_org = 1
        else:
            null_org = None
        org_id, force = rhnPackageUpload.authenticate_session(session_string, channels=channels, null_org=null_org, force=force)
    except rhnSession.InvalidSessionError:
        raise rhnFault(33)
    except rhnSession.ExpiredSessionError:
        raise rhnFault(34)
    return self._getPackageChecksum(org_id, pkg_infos)



Clone # 9
Distance between two fragments = 1
Clone size = 20
Source file "./common/test/unit-test/test_gettext.py"
The first line is 130
Source file "./common/test/unit-test/test_gettext.py"
The first line is 74
def test_go_1(self):
    lang = 'en'
    s = 'Good day'
    target = s
    self._test(lang, s, target)
def test_en_1(self):
    lang = 'en'
    s = 'Good day'
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_en_missing_1(self):
    lang = 'en'
    s = "This string doesn't exist in the translation"
    target = s
    self._test(lang, s, target)
def test_en_missing_1(self):
    lang = 'en'
    s = "This string doesn't exist in the translation"
    target = s
    self._test(lang, s, target)



Clone # 10
Distance between two fragments = 2
Clone size = 20
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 463
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 432
def __solveDep_arch(self, system_id, deps, action, clientVersion):
    log_debug(5, system_id, deps, action, clientVersion)
    faultString = _('Invalid value %s (%s)')
    if type(deps) not in (ListType, TupleType):
        log_error('Invalid argument type', type(deps))
        raise rhnFault(30, (faultString) % ((deps, type(deps))))
    for dep in deps:
        if type(dep) is not StringType:
            log_error('Invalid dependency member', type(dep))
            raise rhnFault(30, (faultString) % ((dep, type(dep))))
    deps = filter(len, deps)
    if not deps:
        return []
    server = self.auth_system(system_id)
    log_debug(1, self.server_id, action, ('items: %d') % (len(deps)))
    result = rhnDependency.solve_dependencies_arch(self.server_id, deps, clientVersion)
    transport = rhnFlags.get('outputTransportOptions')
    transport['X-RHN-Action'] = action
    return result
def __solveDep(self, system_id, deps, action, clientVersion):
    log_debug(5, system_id, deps, action, clientVersion)
    faultString = _('Invalid value %s (%s)')
    if type(deps) not in (ListType, TupleType):
        log_error('Invalid argument type', type(deps))
        raise rhnFault(30, (faultString) % ((deps, type(deps))))
    for dep in deps:
        if type(dep) is not StringType:
            log_error('Invalid dependency member', type(dep))
            raise rhnFault(30, (faultString) % ((dep, type(dep))))
    deps = filter(len, deps)
    if not deps:
        return []
    server = self.auth_system(system_id)
    log_debug(1, self.server_id, action, ('items: %d') % (len(deps)))
    result = rhnDependency.solve_dependencies(self.server_id, deps, clientVersion)
    transport = rhnFlags.get('outputTransportOptions')
    transport['X-RHN-Action'] = action
    return result



Clone # 11
Distance between two fragments = 3
Clone size = 19
Source file "./server/test/unit-test/test_server_registration.py"
The first line is 225
Source file "./server/test/misc_functions.py"
The first line is 294
class Counter:
    _counter = 0
    def value(self):
        val = self._counter
        self._counter = (val) + (1)
        return val
class Counter:
    _counter = 0
    def value(self):
        val = self._counter
        self._counter = (val) + (1)
        return val
def build_new_system_params_with_username(**kwargs):
    import time
    val = Counter().value()
    rnd_string = ('%d-%d') % ((int(time.time()), val))
    params = {'os_release': '9', 'architecture': 'i686-redhat-linux', 'profile_name': ('unittest server ') + (rnd_string), 'username': 'no such user', 'password': 'no such password'}
    params.update(kwargs)
    if params.has_key('token'):
        params['token']
    return params
def build_sys_params_with_username(**kwargs):
    val = Counter().value()
    rnd_string = ('%s%s') % ((int(time.time()), val))
    params = {'os_release': '9', 'architecture': 'i386', 'profile_name': ('unittest server ') + (rnd_string), 'username': 'no such user', 'password': 'no such password'}
    params.update(kwargs)
    if params.has_key('token'):
        params['token']
    return params



Clone # 12
Distance between two fragments = 3
Clone size = 19
Source file "./server/rhnChannel.py"
The first line is 583
Source file "./server/rhnChannel.py"
The first line is 561
def delete_channel_families(entries):
    if not isinstance(entries, ListType):
        raise InvalidEntryError(entries, 'Not a list')
    ret = []
    for e in entries:
        if not isinstance(e, DictType):
            raise InvalidEntryError(e, 'Entry is not a dictionary')
        label = e.get('label')
        if not label:
            raise InvalidEntryError(e, 'Missing required field label')
        c = ChannelFamily()
        c.load_by_label(label)
        if not c.exists():
            ret.append(label)
            continue
        msg = _delete_channel_family(c)
        if msg is not None:
            ret.append(msg)
    return ret
def delete_channels(entries):
    if not isinstance(entries, ListType):
        raise InvalidEntryError(entries, 'Not a list')
    ret = []
    for e in entries:
        if not isinstance(e, DictType):
            raise InvalidEntryError(e, 'Entry is not a dictionary')
        label = e.get('label')
        if not label:
            raise InvalidEntryError(e, 'Missing required field label')
        c = Channel()
        c.load_by_label(label)
        if not c.exists():
            ret.append(label)
            continue
        msg = _delete_channel(c)
        if msg is not None:
            ret.append(msg)
    return ret



Clone # 13
Distance between two fragments = 4
Clone size = 17
Source file "./server/rhnChannel.py"
The first line is 670
Source file "./server/rhnChannel.py"
The first line is 646
if pattern:
    query = '\n select id \n from rhnChannel\n where label like :pattern\n '
    h = rhnSQL.prepare(query)
    h.execute(pattern=pattern)
else:
    query = 'select id from rhnChannel'
    h = rhnSQL.prepare(query)
    h.execute()
if pattern:
    query = '\n select id \n from rhnChannelFamily \n where org_id is null\n and label like :pattern\n '
    h = rhnSQL.prepare(query)
    h.execute(pattern=pattern)
else:
    query = 'select id from rhnChannelFamily where org_id is null'
    h = rhnSQL.prepare(query)
    h.execute()
ret = [] ret = []
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    channel_id = row['id']
    c = Channel().load_by_id(channel_id)
    ret.append(c.as_dict())
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    channel_family_id = row['id']
    c = ChannelFamily().load_by_id(channel_family_id)
    ret.append(c.as_dict())
return ret return ret



Clone # 14
Distance between two fragments = 0
Clone size = 17
Source file "./common/rhn_memusage.py"
The first line is 18
Source file "./server/test/test-cx_Oracle-memleak.py"
The first line is 24
def mem_usage():
    f = open('/proc/self/status')
    dict = {}
    while 1:
        line = f.readline()
        if not line:
            break
        arr = map(string.strip, string.split(line, ':', 1))
        if len(arr) == 1:
            continue
        dict[arr[0]] = arr[1]
    return (dict['Name'], dict['VmSize'], dict['VmRSS'], dict['VmData'])
def mem_usage():
    f = open('/proc/self/status')
    dict = {}
    while 1:
        line = f.readline()
        if not line:
            break
        arr = map(string.strip, string.split(line, ':', 1))
        if len(arr) == 1:
            continue
        dict[arr[0]] = arr[1]
    return (dict['Name'], dict['VmSize'], dict['VmRSS'], dict['VmData'])
def _line_value(line):
    arr = string.split(line, ':', 1)
    if len(arr) == 1:
        return None
    return string.strip(arr[1])
def _line_value(line):
    arr = string.split(line, ':', 1)
    if len(arr) == 1:
        return None
    return string.strip(arr[1])



Clone # 15
Distance between two fragments = 1
Clone size = 17
Source file "./server/importlib/packageImport.py"
The first line is 531
Source file "./server/importlib/packageImport.py"
The first line is 308
def submit(self):
    upload_force = self.uploadForce
    if (not upload_force) and (self._update_last_modified):
        upload_force = 0.5
    try:
        self.backend.processSourcePackages(self.batch, uploadForce=upload_force, forceVerify=self.forceVerify, ignoreUploaded=self.ignoreUploaded, transactional=self.transactional)
    except:
        self.backend.rollback()
        raise
    self.backend.commit()
    if not self._update_last_modified:
        for p in self.batch:
            if (p.diff) and (p.diff.level == 0.5):
                p.diff = None
def submit(self):
    upload_force = self.uploadForce
    if (not upload_force) and (self._update_last_modified):
        upload_force = 0.5
    try:
        self.backend.processPackages(self.batch, uploadForce=upload_force, forceVerify=self.forceVerify, ignoreUploaded=self.ignoreUploaded, transactional=self.transactional)
    except:
        self.backend.rollback()
        raise
    self.backend.commit()
    if not self._update_last_modified:
        for p in self.batch:
            if (p.diff) and (p.diff.level == 0.5):
                p.diff = None



Clone # 16
Distance between two fragments = 1
Clone size = 16
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 536
Source file "./server/rhnSQL/sql_lib.py"
The first line is 76
def __check_Int_String(name, value, package=package):
    if type(value) not in (StringType, IntType):
        log_error(("Field %s (%s)=`%s' in %s does not pass type checks") % ((name, type(value), str(value), str(package))))
        raise rhnFault(30, (_('Invalid value for %s in package tuple: %s (%s)')) % ((name, value, type(value))))
    value = str(value)
    if not len(value):
        log_error(('Field %s has an EMPTY value in %s') % ((value, package)))
    return value
def __check_Int_String(name, value, package=package):
    if type(value) not in (StringType, IntType):
        log_error(("Field %s (%s) = `%s' in %s does not pass type checks") % ((name, type(value), str(value), str(package))))
        raise rhnFault(30, (_('Invalid value for %s in package tuple: %s (%s)')) % ((name, value, type(value))))
    value = str(value)
    if not len(value):
        log_error(('Field %s has an EMPTY value in %s') % ((value, package)))
    return value
log_debug(4, package) log_debug(4, package)
if (type(package) not in (ListType, TupleType)) or (len(package) < 3):
    log_error(('Package argument %s (len = %d) does not pass type checks') % ((str(package), len(package))))
    raise rhnFault(30, (_('Invalid package parameter %s (%s)')) % ((package, type(package))))
if (type(package) not in (ListType, TupleType)) or (len(package) < 3):
    log_error(('Package argument %s (len = %d) does not pass type checks') % ((str(package), len(package))))
    raise rhnFault(30, (_('Invalid package parameter %s (%s)')) % ((package, type(package))))



Clone # 17
Distance between two fragments = 3
Clone size = 16
Source file "./server/test/test_leak4.py"
The first line is 21
Source file "./server/test/test_leak2.py"
The first line is 22
db = connect('rhnuser/rhnuser@webdev') dbh = Connect('rhnuser/rhnuser@webdev')
c = db.prepare('select 1 from dual') h = dbh.prepare('select 1 from dual')
start = time.time() start = time.time()
i = 0 i = 0
write = sys.stderr.write write = sys.stderr.write
while i < 10000:
    c.execute()
    if (i) % (100) == 0:
        f = open('/proc/self/status')
        l = f.readlines()
        vmsize = l[10][10:-1]
        vmrss = l[12][10:-1]
        f.close()
        write(('%d %.3f vsz: %s rss: %s \n') % ((i, (time.time()) - (start), vmsize, vmrss)))
    i = (i) + (1)
while i < 10000:
    h.execute()
    if (i) % (100) == 0:
        f = open('/proc/self/status')
        l = f.readlines()
        vmsize = l[10][10:-1]
        vmrss = l[12][10:-1]
        f.close()
        write(('%d %.3f vsz: %s rss: %s \n') % ((i, (time.time()) - (start), vmsize, vmrss)))
    i = (i) + (1)



Clone # 18
Distance between two fragments = 2
Clone size = 15
Source file "./server/handlers/app/channel.py"
The first line is 525
Source file "./server/handlers/app/channel.py"
The first line is 497
def revokeChannelPermission(self, label, role, commit, username, password):
    log_debug(3)
    self._auth(username, password)
    h = rhnSQL.prepare('\n delete from rhnchannelpermission\n where (channel_id, role_id, user_id) in\n (select c.id, cpr.id, wc.id\n from rhnchannelpermissionrole cpr,\n rhnchannel c,\n web_contact wc\n where wc.login = :username\n and c.label = :label\n and cpr.label = :role_label)\n ')
    try:
        h.execute(username=username, label=label, role_label=role)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0
def channelManagePermission(self, label, role, commit, username, password):
    log_debug(3)
    self._auth(username, password)
    h = rhnSQL.prepare('\n insert into rhnChannelPermission\n (channel_id, role_id, user_id)\n (select c.id, cpr.id, wc.id\n from rhnchannelpermissionrole cpr,\n rhnchannel c,\n web_contact wc\n where wc.login = :username \n and c.label = :label\n and cpr.label = :role_label)\n ')
    try:
        h.execute(username=username, label=label, role_label=role)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0



Clone # 19
Distance between two fragments = 0
Clone size = 15
Source file "./spacewalk/common/rhn_mpm.py"
The first line is 127
Source file "./server/handlers/app/rhn_mpm.py"
The first line is 103
_lead_format = '!16sB3s4L92s' _lead_format = '!16sB3s4L92s'
_magic = 'mpmpackage012345' _magic = 'mpmpackage012345'
def __init__(self):
    self.header = None
    self.payload_stream = None
    self.header_flags = MPM_HEADER_COMPRESSED_GZIP
    self.payload_flags = 0
    assert len(self._magic) == 16
    self._buffer_size = 16384
def __init__(self):
    self.header = None
    self.payload_stream = None
    self.header_flags = MPM_HEADER_COMPRESSED_GZIP
    self.payload_flags = 0
    assert len(self._magic) == 16
    self._buffer_size = 16384
def _read_lead(self, stream):
    lead = self._read_bytes(stream, 128)
    if len(lead) != 128:
        raise InvalidPackageError()
    arr = struct.unpack(self._lead_format, lead)
    return arr
def _read_lead(self, stream):
    lead = self._read_bytes(stream, 128)
    if len(lead) != 128:
        raise InvalidPackageError()
    arr = struct.unpack(self._lead_format, lead)
    return arr



Clone # 20
Distance between two fragments = 0
Clone size = 15
Source file "./satellite_tools/satComputePkgHeaders.py"
The first line is 28
Source file "./_apache.py"
The first line is 21
SERVER_RETURN = 0 SERVER_RETURN = 0
def log_error(*args):
    pass
def log_error(*args):
    pass
def make_table(*args):
    pass
def make_table(*args):
    pass
def parse_qs(*args):
    pass
def parse_qs(*args):
    pass
def parse_qsl(*args):
    pass
def parse_qsl(*args):
    pass
status = None status = None
table = None table = None
config_tree = None config_tree = None
server_root = None server_root = None
mpm_query = None mpm_query = None
exists_config_define = None exists_config_define = None



Clone # 21
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 378
Source file "./satellite_tools/sync_handlers.py"
The first line is 292
class ErrataContainer(xmlSource.ErrataContainer):
    def endItemCallback(self):
        xmlSource.ErrataContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ErrataCollection()
        c.add_erratum(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class PackageContainer(xmlSource.PackageContainer):
    def endItemCallback(self):
        xmlSource.PackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = PackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_errata_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(ErrataContainer())
    return handler
def get_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(PackageContainer())
    return handler



Clone # 22
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 378
Source file "./satellite_tools/sync_handlers.py"
The first line is 410
class ErrataContainer(xmlSource.ErrataContainer):
    def endItemCallback(self):
        xmlSource.ErrataContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ErrataCollection()
        c.add_erratum(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class KickstartableTreesContainer(xmlSource.KickstartableTreesContainer):
    def endItemCallback(self):
        xmlSource.KickstartableTreesContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = KickstartableTreesCollection()
        c.add_item(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_errata_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(ErrataContainer())
    return handler
def get_kickstarts_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(KickstartableTreesContainer())
    return handler



Clone # 23
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 378
Source file "./satellite_tools/sync_handlers.py"
The first line is 163
class ErrataContainer(xmlSource.ErrataContainer):
    def endItemCallback(self):
        xmlSource.ErrataContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ErrataCollection()
        c.add_erratum(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class ChannelContainer(xmlSource.ChannelContainer):
    def endItemCallback(self):
        xmlSource.ChannelContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ChannelCollection()
        c.add_channel(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_errata_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(ErrataContainer())
    return handler
def get_channel_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(ChannelContainer())
    return handler



Clone # 24
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 378
Source file "./satellite_tools/sync_handlers.py"
The first line is 319
class ErrataContainer(xmlSource.ErrataContainer):
    def endItemCallback(self):
        xmlSource.ErrataContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ErrataCollection()
        c.add_erratum(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class SourcePackageContainer(xmlSource.SourcePackageContainer):
    def endItemCallback(self):
        xmlSource.SourcePackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = SourcePackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_errata_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(ErrataContainer())
    return handler
def get_source_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(SourcePackageContainer())
    return handler



Clone # 25
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 292
Source file "./satellite_tools/sync_handlers.py"
The first line is 263
class PackageContainer(xmlSource.PackageContainer):
    def endItemCallback(self):
        xmlSource.PackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = PackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class ShortPackageContainer(xmlSource.IncompletePackageContainer):
    def endItemCallback(self):
        xmlSource.IncompletePackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ShortPackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(PackageContainer())
    return handler
def get_short_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(ShortPackageContainer())
    return handler



Clone # 26
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 292
Source file "./satellite_tools/sync_handlers.py"
The first line is 410
class PackageContainer(xmlSource.PackageContainer):
    def endItemCallback(self):
        xmlSource.PackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = PackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class KickstartableTreesContainer(xmlSource.KickstartableTreesContainer):
    def endItemCallback(self):
        xmlSource.KickstartableTreesContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = KickstartableTreesCollection()
        c.add_item(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(PackageContainer())
    return handler
def get_kickstarts_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(KickstartableTreesContainer())
    return handler



Clone # 27
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 292
Source file "./satellite_tools/sync_handlers.py"
The first line is 163
class PackageContainer(xmlSource.PackageContainer):
    def endItemCallback(self):
        xmlSource.PackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = PackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class ChannelContainer(xmlSource.ChannelContainer):
    def endItemCallback(self):
        xmlSource.ChannelContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ChannelCollection()
        c.add_channel(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(PackageContainer())
    return handler
def get_channel_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(ChannelContainer())
    return handler



Clone # 28
Distance between two fragments = 3
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 292
Source file "./satellite_tools/sync_handlers.py"
The first line is 319
class PackageContainer(xmlSource.PackageContainer):
    def endItemCallback(self):
        xmlSource.PackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = PackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class SourcePackageContainer(xmlSource.SourcePackageContainer):
    def endItemCallback(self):
        xmlSource.SourcePackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = SourcePackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(PackageContainer())
    return handler
def get_source_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(SourcePackageContainer())
    return handler



Clone # 29
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 263
Source file "./satellite_tools/sync_handlers.py"
The first line is 319
class ShortPackageContainer(xmlSource.IncompletePackageContainer):
    def endItemCallback(self):
        xmlSource.IncompletePackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ShortPackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class SourcePackageContainer(xmlSource.SourcePackageContainer):
    def endItemCallback(self):
        xmlSource.SourcePackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = SourcePackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_short_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(ShortPackageContainer())
    return handler
def get_source_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(SourcePackageContainer())
    return handler



Clone # 30
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 410
Source file "./satellite_tools/sync_handlers.py"
The first line is 163
class KickstartableTreesContainer(xmlSource.KickstartableTreesContainer):
    def endItemCallback(self):
        xmlSource.KickstartableTreesContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = KickstartableTreesCollection()
        c.add_item(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class ChannelContainer(xmlSource.ChannelContainer):
    def endItemCallback(self):
        xmlSource.ChannelContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ChannelCollection()
        c.add_channel(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_kickstarts_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(KickstartableTreesContainer())
    return handler
def get_channel_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(ChannelContainer())
    return handler



Clone # 31
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 410
Source file "./satellite_tools/sync_handlers.py"
The first line is 319
class KickstartableTreesContainer(xmlSource.KickstartableTreesContainer):
    def endItemCallback(self):
        xmlSource.KickstartableTreesContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = KickstartableTreesCollection()
        c.add_item(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class SourcePackageContainer(xmlSource.SourcePackageContainer):
    def endItemCallback(self):
        xmlSource.SourcePackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = SourcePackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_kickstarts_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(KickstartableTreesContainer())
    return handler
def get_source_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(SourcePackageContainer())
    return handler



Clone # 32
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/sync_handlers.py"
The first line is 163
Source file "./satellite_tools/sync_handlers.py"
The first line is 319
class ChannelContainer(xmlSource.ChannelContainer):
    def endItemCallback(self):
        xmlSource.ChannelContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ChannelCollection()
        c.add_channel(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class SourcePackageContainer(xmlSource.SourcePackageContainer):
    def endItemCallback(self):
        xmlSource.SourcePackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = SourcePackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
def get_channel_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(ChannelContainer())
    return handler
def get_source_package_handler():
    handler = xmlSource.SatelliteDispatchHandler()
    handler.set_container(SourcePackageContainer())
    return handler



Clone # 33
Distance between two fragments = 0
Clone size = 14
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 500
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 468
log_debug(5, system_id, deps, action, clientVersion) log_debug(5, system_id, deps, action, clientVersion)
faultString = _('Invalid value %s (%s)') faultString = _('Invalid value %s (%s)')
if type(deps) not in (ListType, TupleType):
    log_error('Invalid argument type', type(deps))
    raise rhnFault(30, (faultString) % ((deps, type(deps))))
if type(deps) not in (ListType, TupleType):
    log_error('Invalid argument type', type(deps))
    raise rhnFault(30, (faultString) % ((deps, type(deps))))
for dep in deps:
    if type(dep) is not StringType:
        log_error('Invalid dependency member', type(dep))
        raise rhnFault(30, (faultString) % ((dep, type(dep))))
for dep in deps:
    if type(dep) is not StringType:
        log_error('Invalid dependency member', type(dep))
        raise rhnFault(30, (faultString) % ((dep, type(dep))))
deps = filter(len, deps) deps = filter(len, deps)
if not deps:
    return []
if not deps:
    return []
server = self.auth_system(system_id) server = self.auth_system(system_id)
log_debug(1, self.server_id, action, ('items: %d') % (len(deps))) log_debug(1, self.server_id, action, ('items: %d') % (len(deps)))



Clone # 34
Distance between two fragments = 0
Clone size = 14
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 500
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 437
log_debug(5, system_id, deps, action, clientVersion) log_debug(5, system_id, deps, action, clientVersion)
faultString = _('Invalid value %s (%s)') faultString = _('Invalid value %s (%s)')
if type(deps) not in (ListType, TupleType):
    log_error('Invalid argument type', type(deps))
    raise rhnFault(30, (faultString) % ((deps, type(deps))))
if type(deps) not in (ListType, TupleType):
    log_error('Invalid argument type', type(deps))
    raise rhnFault(30, (faultString) % ((deps, type(deps))))
for dep in deps:
    if type(dep) is not StringType:
        log_error('Invalid dependency member', type(dep))
        raise rhnFault(30, (faultString) % ((dep, type(dep))))
for dep in deps:
    if type(dep) is not StringType:
        log_error('Invalid dependency member', type(dep))
        raise rhnFault(30, (faultString) % ((dep, type(dep))))
deps = filter(len, deps) deps = filter(len, deps)
if not deps:
    return []
if not deps:
    return []
server = self.auth_system(system_id) server = self.auth_system(system_id)
log_debug(1, self.server_id, action, ('items: %d') % (len(deps))) log_debug(1, self.server_id, action, ('items: %d') % (len(deps)))



Clone # 35
Distance between two fragments = 2
Clone size = 14
Source file "./satellite_tools/satsync.py"
The first line is 1669
Source file "./satellite_tools/satsync.py"
The first line is 1398
pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=erratum_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=kt_count, finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)
ss = SequenceServer(erratum_ids[:], nevermorethan=self._batch_size) ss = SequenceServer(ktids[:], nevermorethan=self._batch_size)
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 36
Distance between two fragments = 2
Clone size = 14
Source file "./satellite_tools/satsync.py"
The first line is 1669
Source file "./satellite_tools/satsync.py"
The first line is 1288
pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=erratum_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)
ss = SequenceServer(erratum_ids[:], nevermorethan=self._batch_size) ss = SequenceServer(pids[:], nevermorethan=self._batch_size)
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 37
Distance between two fragments = 2
Clone size = 14
Source file "./satellite_tools/satsync.py"
The first line is 1669
Source file "./satellite_tools/satsync.py"
The first line is 1112
pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=erratum_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)
ss = SequenceServer(erratum_ids[:], nevermorethan=self._batch_size) ss = SequenceServer(pids[:], nevermorethan=self._batch_size)
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 38
Distance between two fragments = 2
Clone size = 14
Source file "./satellite_tools/satsync.py"
The first line is 1398
Source file "./satellite_tools/satsync.py"
The first line is 1288
pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=kt_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)
ss = SequenceServer(ktids[:], nevermorethan=self._batch_size) ss = SequenceServer(pids[:], nevermorethan=self._batch_size)
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 39
Distance between two fragments = 2
Clone size = 14
Source file "./satellite_tools/satsync.py"
The first line is 1398
Source file "./satellite_tools/satsync.py"
The first line is 1112
pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=kt_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)
ss = SequenceServer(ktids[:], nevermorethan=self._batch_size) ss = SequenceServer(pids[:], nevermorethan=self._batch_size)
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 40
Distance between two fragments = 4
Clone size = 14
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 502
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 478
print '\n' print '\n'
log2stdout(1, 'Exporting arches extra...') log2stdout(1, 'Exporting arches...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)
self.set_filename(self.fm.getArchesExtraFile()) self.set_filename(self.fm.getArchesFile())
dumper.XML_Dumper.dump_server_group_type_server_arches(self) dumper.XML_Dumper.dump_arches(self)
pb.addTo(1) pb.addTo(1)
pb.printIncrement() pb.printIncrement()
pb.printComplete() pb.printComplete()
log2stdout(4, ('Arches Extra exported to %s') % (self.fm.getArchesExtraFile())) log2stdout(4, ('Arches exported to %s') % (self.fm.getArchesFile()))



Clone # 41
Distance between two fragments = 4
Clone size = 14
Source file "./server/handlers/config_mgmt/rhn_config_management.py"
The first line is 486
Source file "./server/handlers/config_mgmt/rhn_config_management.py"
The first line is 460
fdst = self._get_file(config_channel_dst, path, revision=revision_dst) fsrc = self._get_file(config_channel_src, path, revision=revision_src)
if not fdst:
    raise rhnFault(4011, ('File %s (revision %s) does not exist in channel %s') % ((path, revision_dst, config_channel_dst)), explain=0)
if not fsrc:
    raise rhnFault(4011, ('File %s (revision %s) does not exist in channel %s') % ((path, revision_src, config_channel_src)), explain=0)
if fdst['is_binary'] == 'Y':
    raise rhnFault(4004, ('File %s (revision %s) seems to contain binary data') % ((path, revision_dst)), explain=0)
if fsrc['is_binary'] == 'Y':
    raise rhnFault(4004, ('File %s (revision %s) seems to contain binary data') % ((path, revision_src)), explain=0)
fd, filename_dst = tempfile.mkstemp(prefix='/tmp/rhncfg-') fd, filename_src = tempfile.mkstemp(prefix='/tmp/rhncfg-')
fc_lob = fdst['file_contents'] fc_lob = fsrc['file_contents']
if fc_lob:
    os.write(fd, rhnSQL.read_lob(fc_lob))
if fc_lob:
    os.write(fd, rhnSQL.read_lob(fc_lob))
os.close(fd) os.close(fd)



Clone # 42
Distance between two fragments = 1
Clone size = 14
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 91
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 47
c = rhnChannel.ChannelFamily() c = rhnChannel.Channel()
for k, v in vdict.items():
    method = getattr(c, ('set_') + (k))
    method(v)
for k, v in vdict.items():
    method = getattr(c, ('set_') + (k))
    method(v)
c.save() c.save()
channel_id = c.get_id() channel_id = c.get_id()
c = rhnChannel.ChannelFamily() c = rhnChannel.Channel()
c.load_by_label(label) c.load_by_label(label)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
rhnSQL.commit() rhnSQL.commit()
return c return c



Clone # 43
Distance between two fragments = 0
Clone size = 14
Source file "./server/handlers/app/packages.py"
The first line is 677
Source file "./server/handlers/app/packages.py"
The first line is 549
row = h.fetchone_dict() row = h.fetchone_dict()
if not row:
    row_list[pkg] = ''
    continue
if not row:
    row_list[pkg] = ''
    continue
if row.has_key('path'):
    filePath = os.path.join(CFG.MOUNT_POINT, row['path'])
    if os.access(filePath, os.R_OK):
        if row.has_key('checksum'):
            row_list[pkg] = (row['checksum_type'], row['checksum'])
        else:
            row_list[pkg] = 'on-disk'
    else:
        log_error('Package not found', filePath)
        row_list[pkg] = ''
else:
    log_error('Package path null for package', filePath)
    row_list[pkg] = ''
if row.has_key('path'):
    filePath = os.path.join(CFG.MOUNT_POINT, row['path'])
    if os.access(filePath, os.R_OK):
        if row.has_key('checksum'):
            row_list[pkg] = (row['checksum_type'], row['checksum'])
        else:
            row_list[pkg] = 'on-disk'
    else:
        log_error('Package not found', filePath)
        row_list[pkg] = ''
else:
    log_error('Package path null for package', filePath)
    row_list[pkg] = ''



Clone # 44
Distance between two fragments = 0
Clone size = 13
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 324
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 264
val = rhnCache.get(key, compressed=0, raw=1, modified=last_modified) val = rhnCache.get(key, compressed=0, raw=1, modified=last_modified)
if val is None:
    log_debug(4, ('Cache MISS for %s (%s)') % ((channel_label, channel_id)))
    stream = self._cache_channel_packages_short(channel_id, key, last_modified)
else:
    log_debug(4, ('Cache HIT for %s (%s)') % ((channel_label, channel_id)))
    temp_stream = tempfile.TemporaryFile()
    temp_stream.write(val)
    temp_stream.flush()
    stream = self._normalize_compressed_stream(temp_stream)
if val is None:
    log_debug(4, ('Cache MISS for %s (%s)') % ((channel_label, channel_id)))
    stream = self._cache_channel_packages_short(channel_id, key, last_modified)
else:
    log_debug(4, ('Cache HIT for %s (%s)') % ((channel_label, channel_id)))
    temp_stream = tempfile.TemporaryFile()
    temp_stream.write(val)
    temp_stream.flush()
    stream = self._normalize_compressed_stream(temp_stream)
buffer_size = 16384 buffer_size = 16384



Clone # 45
Distance between two fragments = 3
Clone size = 13
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 550
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 526
print '\n' print '\n'
log2stdout(1, 'Exporting channel families...') log2stdout(1, 'Exporting blacklists...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)
self.set_filename(self.fm.getChannelFamiliesFile()) self.set_filename(self.fm.getBlacklistsFile())
dumper.XML_Dumper.dump_channel_families(self) dumper.XML_Dumper.dump_blacklist_obsoletes(self)
pb.addTo(1) pb.addTo(1)
pb.printIncrement() pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 46
Distance between two fragments = 3
Clone size = 13
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 550
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 502
print '\n' print '\n'
log2stdout(1, 'Exporting channel families...') log2stdout(1, 'Exporting arches extra...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)
self.set_filename(self.fm.getChannelFamiliesFile()) self.set_filename(self.fm.getArchesExtraFile())
dumper.XML_Dumper.dump_channel_families(self) dumper.XML_Dumper.dump_server_group_type_server_arches(self)
pb.addTo(1) pb.addTo(1)
pb.printIncrement() pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 47
Distance between two fragments = 3
Clone size = 13
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 550
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 478
print '\n' print '\n'
log2stdout(1, 'Exporting channel families...') log2stdout(1, 'Exporting arches...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)
self.set_filename(self.fm.getChannelFamiliesFile()) self.set_filename(self.fm.getArchesFile())
dumper.XML_Dumper.dump_channel_families(self) dumper.XML_Dumper.dump_arches(self)
pb.addTo(1) pb.addTo(1)
pb.printIncrement() pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 48
Distance between two fragments = 3
Clone size = 13
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 526
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 502
print '\n' print '\n'
log2stdout(1, 'Exporting blacklists...') log2stdout(1, 'Exporting arches extra...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)
self.set_filename(self.fm.getBlacklistsFile()) self.set_filename(self.fm.getArchesExtraFile())
dumper.XML_Dumper.dump_blacklist_obsoletes(self) dumper.XML_Dumper.dump_server_group_type_server_arches(self)
pb.addTo(1) pb.addTo(1)
pb.printIncrement() pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 49
Distance between two fragments = 3
Clone size = 13
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 526
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 478
print '\n' print '\n'
log2stdout(1, 'Exporting blacklists...') log2stdout(1, 'Exporting arches...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)
self.set_filename(self.fm.getBlacklistsFile()) self.set_filename(self.fm.getArchesFile())
dumper.XML_Dumper.dump_blacklist_obsoletes(self) dumper.XML_Dumper.dump_arches(self)
pb.addTo(1) pb.addTo(1)
pb.printIncrement() pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 50
Distance between two fragments = 4
Clone size = 13
Source file "./server/rhnChannel.py"
The first line is 1672
Source file "./server/rhnChannel.py"
The first line is 1554
log_debug(3, channel) log_debug(3, channel)
c_info = channel_info(channel) c_info = channel_info(channel)
if not c_info:
    raise rhnFault(40, ("could not find any data on channel '%s'") % (channel))
if not c_info:
    raise rhnFault(40, ("could not find any data on channel '%s'") % (channel))
cache_entry = ('blacklist_obsoletes-%s') % (channel) cache_entry = ('list_obsoletes-%s') % (channel)
ret = rhnCache.get(cache_entry, c_info['last_modified']) ret = rhnCache.get(cache_entry, c_info['last_modified'])
if ret:
    log_debug(4, 'Scored cache hit', channel)
    return ret
if ret:
    log_debug(4, 'Scored cache hit', channel)
    return ret
h = rhnSQL.prepare('\n select unique \n pnsrc.name src_name, \n bo.src_epoch,\n bo.src_version,\n bo.src_release,\n cdst.label dst_channel,\n pndst.name dst_name,\n bo.dst_epoch,\n bo.dst_version,\n bo.dst_release\n from \n rhnChannel csrc, rhnChannel cdst, \n rhnPackageName pnsrc, rhnPackageName pndst,\n rhnBlacklistObsoletes bo\n where bo.src_channel_id = csrc.id\n and csrc.label = :channel\n and bo.dst_channel_id = cdst.id (+)\n and bo.src_name_id = pnsrc.id\n and bo.dst_name_id = pndst.id\n order by pnsrc.name, pndst.name\n ') h = rhnSQL.prepare('\n select distinct\n pn.name,\n pe.version, pe.release, pe.epoch,\n pa.label arch,\n pc.name obsolete_name,\n pc.version obsolete_version,\n p_info.sense\n from rhnPackageCapability pc,\n rhnPackageArch pa,\n rhnPackageEVR pe,\n rhnPackageName pn,\n rhnPackage p,\n ( select cp.channel_id,\n po.package_id, po.capability_id, po.sense\n from rhnPackageObsoletes po,\n rhnChannelPackage cp,\n rhnChannel c\n where 1=1\n and c.label = :channel\n and c.id = cp.channel_id\n and cp.package_id = po.package_id\n minus\n -- obsoletes that are blacklisted follow\n select cp.channel_id,\n po.package_id, po.capability_id, po.sense\n from rhnPackageName pni,\n rhnPackageCapability pc,\n rhnBlacklistObsoletes bo,\n rhnPackage p,\n rhnPackageObsoletes po,\n rhnChannelPackage cp,\n rhnChannel c\n where 1=1\n and c.label = :channel\n and c.id = cp.channel_id\n -- find all the packages we have obsoletes for\n and cp.package_id = po.package_id\n -- now find the name, and get the blacklists that apply\n and po.package_id = p.id\n and p.name_id = bo.name_id\n and p.evr_id = bo.evr_id\n and p.package_arch_id = bo.package_arch_id\n -- now match the blacklisted names to the caps\n and po.capability_id = pc.id\n and pc.name = pni.name\n and bo.ignore_name_id = pni.id\n ) p_info\n where 1=1\n and p_info.package_id = p.id\n and p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p_info.capability_id = pc.id\n ')
h.execute(channel=str(channel)) h.execute(channel=str(channel))
result = [] hash = {}



Clone # 51
Distance between two fragments = 0
Clone size = 13
Source file "./spacewalk/common/rhn_mpm.py"
The first line is 280
Source file "./server/handlers/app/rhn_mpm.py"
The first line is 257
def _replace_null(obj):
    if obj is None:
        return ''
    if isinstance(obj, ListType):
        return map(_replace_null, obj)
    if isinstance(obj, TupleType):
        return tuple(_replace_null(list(obj)))
    if hasattr(obj, 'items'):
        dict = {}
        for k, v in obj.items():
            dict[_replace_null(k)] = _replace_null(v)
        return dict
    return obj
def _replace_null(obj):
    if obj is None:
        return ''
    if isinstance(obj, ListType):
        return map(_replace_null, obj)
    if isinstance(obj, TupleType):
        return tuple(_replace_null(list(obj)))
    if hasattr(obj, 'items'):
        dict = {}
        for k, v in obj.items():
            dict[_replace_null(k)] = _replace_null(v)
        return dict
    return obj



Clone # 52
Distance between two fragments = 0
Clone size = 12
Source file "./server/importlib/userAuth.py"
The first line is 205
Source file "./server/importlib/userAuth.py"
The first line is 167
org_id = user.contact['org_id'] org_id = user.contact['org_id']
user_id = user.getid() user_id = user.getid()
h = rhnSQL.prepare('\n select ugt.label\n from rhnUserGroupType ugt,\n rhnUserGroup ug,\n rhnUserGroupMembers ugm\n where ugm.user_id = :user_id\n and ugm.user_group_id = ug.id\n and ug.group_type = ugt.id\n ') h = rhnSQL.prepare('\n select ugt.label\n from rhnUserGroupType ugt,\n rhnUserGroup ug,\n rhnUserGroupMembers ugm\n where ugm.user_id = :user_id\n and ugm.user_group_id = ug.id\n and ug.group_type = ugt.id\n ')
h.execute(user_id=user_id) h.execute(user_id=user_id)
groups = [] groups = []
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    groups.append(row['label'])
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    groups.append(row['label'])
return (groups, org_id, user_id) return (groups, org_id, user_id)



Clone # 53
Distance between two fragments = 2
Clone size = 12
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 750
Source file "./satellite_tools/exporter/exportLib.py"
The first line is 208
channel_id = self._row['id'] channel_id = self._row['id']
arr = [] arr = []
mappings = [('rhn-channel-parent-channel', 'parent_channel'), ('rhn-channel-basedir', 'basedir'), ('rhn-channel-name', 'name'), ('rhn-channel-summary', 'summary'), ('rhn-channel-description', 'description'), ('rhn-channel-gpg-key-url', 'gpg_key_url'), ('rhn-channel-checksum-type', 'checksum_type')] mappings = [('rhn-channel-parent-channel', 'parent_channel'), ('rhn-channel-basedir', 'basedir'), ('rhn-channel-name', 'name'), ('rhn-channel-summary', 'summary'), ('rhn-channel-description', 'description'), ('rhn-channel-gpg-key-url', 'gpg_key_url'), ('rhn-channel-checksum-type', 'checksum_type')]
for k, v in mappings:
    arr.append(exportLib.SimpleDumper(self._writer, k, self._row[v]))
for k, v in mappings:
    arr.append(SimpleDumper(self._writer, k, self._row[v]))



Clone # 54
Distance between two fragments = 4
Clone size = 12
Source file "./server/importlib/test/test_blob_update.py"
The first line is 168
Source file "./server/importlib/test/test_blob_update.py"
The first line is 143
v1 = v[2] i1 = v[0]
v2 = v[3] i2 = v[1]
hval = {'id1': i1} hval = {'id1': i1}
if i2 is None:
    s = 'id2 is null'
else:
    s = 'id2 = :id2'
    hval['id2'] = i2
if i2 is None:
    s = 'id2 is null'
else:
    s = 'id2 = :id2'
    hval['id2'] = i2
h = rhnSQL.prepare((q) % (s)) h = rhnSQL.prepare((q) % (s))
apply(h.execute, (), hval) apply(h.execute, (), hval)
row = h.fetchone_dict() row = h.fetchone_dict()
val1 = row['val1'] val1 = row['val1']
val2 = row['val2'] val2 = row['val2']



Clone # 55
Distance between two fragments = 4
Clone size = 12
Source file "./satellite_tools/xmlSource.py"
The first line is 601
Source file "./satellite_tools/xmlSource.py"
The first line is 593
class RequiresItem(BaseItem):
    item_name = 'rhn-package-requires-entry'
    item_class = importLib.Dependency
    tagMap = {'sense': 'flags'}
class ProvidesItem(BaseItem):
    item_name = 'rhn-package-provides-entry'
    item_class = importLib.Dependency
    tagMap = {'sense': 'flags'}
addItem(RequiresItem) addItem(ProvidesItem)
class ConflictsItem(BaseItem):
    item_name = 'rhn-package-conflicts-entry'
    item_class = importLib.Dependency
    tagMap = {'sense': 'flags'}
class RequiresItem(BaseItem):
    item_name = 'rhn-package-requires-entry'
    item_class = importLib.Dependency
    tagMap = {'sense': 'flags'}
addItem(ConflictsItem) addItem(RequiresItem)



Clone # 56
Distance between two fragments = 4
Clone size = 12
Source file "./satellite_tools/xmlSource.py"
The first line is 609
Source file "./satellite_tools/xmlSource.py"
The first line is 593
class ConflictsItem(BaseItem):
    item_name = 'rhn-package-conflicts-entry'
    item_class = importLib.Dependency
    tagMap = {'sense': 'flags'}
class ProvidesItem(BaseItem):
    item_name = 'rhn-package-provides-entry'
    item_class = importLib.Dependency
    tagMap = {'sense': 'flags'}
addItem(ConflictsItem) addItem(ProvidesItem)
class ObsoletesItem(BaseItem):
    item_name = 'rhn-package-obsoletes-entry'
    item_class = importLib.Dependency
    tagMap = {'sense': 'flags'}
class RequiresItem(BaseItem):
    item_name = 'rhn-package-requires-entry'
    item_class = importLib.Dependency
    tagMap = {'sense': 'flags'}
addItem(ObsoletesItem) addItem(RequiresItem)



Clone # 57
Distance between two fragments = 3
Clone size = 13
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 953
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 918
class PackagesDumper(CachedDumper, exportLib.PackagesDumper):
    def __init__(self, writer, packages):
        h = rhnSQL.prepare("\n select \n p.id, \n p.org_id,\n pn.name, \n pe.evr.version version, \n pe.evr.release release, \n pe.evr.epoch epoch, \n pa.label package_arch,\n pg.name package_group, \n p.rpm_version, \n p.description,\n p.summary,\n p.package_size,\n p.payload_size,\n p.build_host, \n TO_CHAR(p.build_time, 'YYYYMMDDHH24MISS') build_time,\n sr.name source_rpm, \n c.checksum_type,\n c.checksum,\n p.vendor,\n p.payload_format, \n p.compat, \n p.header_sig,\n p.header_start,\n p.header_end,\n p.copyright,\n p.cookie,\n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackage p, rhnPackageName pn, rhnPackageEVR pe, \n rhnPackageArch pa, rhnPackageGroup pg, rhnSourceRPM sr,\n rhnChecksumView c\n where p.id = :package_id \n and p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p.package_group = pg.id\n and p.source_rpm_id = sr.id\n and p.checksum_id = c.id\n ")
        CachedDumper.__init__(self, writer, statement=h, params=packages)
    def _get_key(self, params):
        package_id = str(params['package_id'])
        hash_val = rhnLib.hash_object_id(package_id, 2)
        return ('xml-packages/%s/rhn-package-%s.xml') % ((hash_val, package_id))
    def _dump_subelement(self, data):
        log_debug(6, data)
        return exportLib.PackagesDumper.dump_subelement(self, data)
class ShortPackagesDumper(CachedDumper, exportLib.ShortPackagesDumper):
    def __init__(self, writer, packages):
        h = rhnSQL.prepare("\n select \n p.id,\n p.org_id,\n pn.name, \n pe.evr.version version, \n pe.evr.release release, \n pe.evr.epoch epoch, \n pa.label package_arch,\n c.checksum_type,\n c.checksum,\n p.package_size,\n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackage p, rhnPackageName pn, rhnPackageEVR pe, \n rhnPackageArch pa, rhnChecksumView c\n where p.id = :package_id \n and p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p.checksum_id = c.id\n ")
        CachedDumper.__init__(self, writer, statement=h, params=packages)
    def _get_key(self, params):
        package_id = str(params['package_id'])
        hash_val = rhnLib.hash_object_id(package_id, 2)
        return ('xml-short-packages/%s/rhn-package-short-%s.xml') % ((hash_val, package_id))
    def _dump_subelement(self, data):
        log_debug(6, data)
        return exportLib.ShortPackagesDumper.dump_subelement(self, data)



Clone # 58
Distance between two fragments = 3
Clone size = 12
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 1006
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 953
class SourcePackagesDumper(CachedDumper, exportLib.SourcePackagesDumper):
    def __init__(self, writer, packages):
        h = rhnSQL.prepare("\n select \n ps.id, \n sr.name source_rpm, \n pg.name package_group, \n ps.rpm_version, \n ps.payload_size,\n ps.build_host, \n TO_CHAR(ps.build_time, 'YYYYMMDDHH24MISS') build_time,\n sig.checksum sigchecksum,\n sig.checksum_type sigchecksum_type,\n ps.vendor,\n ps.cookie,\n ps.package_size,\n c.checksum_type,\n c.checksum,\n TO_CHAR(ps.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackageSource ps, rhnPackageGroup pg, rhnSourceRPM sr,\n rhnChecksumView c, rhnChecksumView sig\n where ps.id = :package_id\n and ps.package_group = pg.id\n and ps.source_rpm_id = sr.id\n and ps.checksum_id = c.id\n and ps.sigchecksum_id = sig.id\n ")
        CachedDumper.__init__(self, writer, statement=h, params=packages)
    def _get_key(self, params):
        package_id = str(params['package_id'])
        hash_val = rhnLib.hash_object_id(package_id, 2)
        return ('xml-packages/%s/rhn-source-package-%s.xml') % ((hash_val, package_id))
    def _dump_subelement(self, data):
        log_debug(6, data)
        return exportLib.SourcePackagesDumper.dump_subelement(self, data)
class PackagesDumper(CachedDumper, exportLib.PackagesDumper):
    def __init__(self, writer, packages):
        h = rhnSQL.prepare("\n select \n p.id, \n p.org_id,\n pn.name, \n pe.evr.version version, \n pe.evr.release release, \n pe.evr.epoch epoch, \n pa.label package_arch,\n pg.name package_group, \n p.rpm_version, \n p.description,\n p.summary,\n p.package_size,\n p.payload_size,\n p.build_host, \n TO_CHAR(p.build_time, 'YYYYMMDDHH24MISS') build_time,\n sr.name source_rpm, \n c.checksum_type,\n c.checksum,\n p.vendor,\n p.payload_format, \n p.compat, \n p.header_sig,\n p.header_start,\n p.header_end,\n p.copyright,\n p.cookie,\n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackage p, rhnPackageName pn, rhnPackageEVR pe, \n rhnPackageArch pa, rhnPackageGroup pg, rhnSourceRPM sr,\n rhnChecksumView c\n where p.id = :package_id \n and p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p.package_group = pg.id\n and p.source_rpm_id = sr.id\n and p.checksum_id = c.id\n ")
        CachedDumper.__init__(self, writer, statement=h, params=packages)
    def _get_key(self, params):
        package_id = str(params['package_id'])
        hash_val = rhnLib.hash_object_id(package_id, 2)
        return ('xml-packages/%s/rhn-package-%s.xml') % ((hash_val, package_id))
    def _dump_subelement(self, data):
        log_debug(6, data)
        return exportLib.PackagesDumper.dump_subelement(self, data)



Clone # 59
Distance between two fragments = 3
Clone size = 13
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 1006
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 918
class SourcePackagesDumper(CachedDumper, exportLib.SourcePackagesDumper):
    def __init__(self, writer, packages):
        h = rhnSQL.prepare("\n select \n ps.id, \n sr.name source_rpm, \n pg.name package_group, \n ps.rpm_version, \n ps.payload_size,\n ps.build_host, \n TO_CHAR(ps.build_time, 'YYYYMMDDHH24MISS') build_time,\n sig.checksum sigchecksum,\n sig.checksum_type sigchecksum_type,\n ps.vendor,\n ps.cookie,\n ps.package_size,\n c.checksum_type,\n c.checksum,\n TO_CHAR(ps.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackageSource ps, rhnPackageGroup pg, rhnSourceRPM sr,\n rhnChecksumView c, rhnChecksumView sig\n where ps.id = :package_id\n and ps.package_group = pg.id\n and ps.source_rpm_id = sr.id\n and ps.checksum_id = c.id\n and ps.sigchecksum_id = sig.id\n ")
        CachedDumper.__init__(self, writer, statement=h, params=packages)
    def _get_key(self, params):
        package_id = str(params['package_id'])
        hash_val = rhnLib.hash_object_id(package_id, 2)
        return ('xml-packages/%s/rhn-source-package-%s.xml') % ((hash_val, package_id))
    def _dump_subelement(self, data):
        log_debug(6, data)
        return exportLib.SourcePackagesDumper.dump_subelement(self, data)
class ShortPackagesDumper(CachedDumper, exportLib.ShortPackagesDumper):
    def __init__(self, writer, packages):
        h = rhnSQL.prepare("\n select \n p.id,\n p.org_id,\n pn.name, \n pe.evr.version version, \n pe.evr.release release, \n pe.evr.epoch epoch, \n pa.label package_arch,\n c.checksum_type,\n c.checksum,\n p.package_size,\n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackage p, rhnPackageName pn, rhnPackageEVR pe, \n rhnPackageArch pa, rhnChecksumView c\n where p.id = :package_id \n and p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p.checksum_id = c.id\n ")
        CachedDumper.__init__(self, writer, statement=h, params=packages)
    def _get_key(self, params):
        package_id = str(params['package_id'])
        hash_val = rhnLib.hash_object_id(package_id, 2)
        return ('xml-short-packages/%s/rhn-package-short-%s.xml') % ((hash_val, package_id))
    def _dump_subelement(self, data):
        log_debug(6, data)
        return exportLib.ShortPackagesDumper.dump_subelement(self, data)



Clone # 60
Distance between two fragments = 2
Clone size = 12
Source file "./server/rhnChannel.py"
The first line is 1246
Source file "./server/rhnChannel.py"
The first line is 1173
def list_all_packages_sql(channel_id):
    log_debug(3, channel_id)
    h = rhnSQL.prepare('\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n p.package_size \n from \n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageName pn,\n rhnPackageEVR pevr,\n rhnPackageArch pa\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.name_id = pn.id\n and p.evr_id = pevr.id\n and p.package_arch_id = pa.id\n order by pn.name, pevr.evr desc, pa.label\n ')
    h.execute(channel_id=str(channel_id))
    ret = h.fetchall_dict()
    if not ret:
        return []
    ret = map(lambda a: (a['name'], a['version'], a['release'], a['epoch'], a['arch'], a['package_size']), __stringify(ret))
    return ret
def list_packages_sql(channel_id):
    log_debug(3, channel_id)
    h = rhnSQL.prepare("\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n full_channel.package_size \n from \n rhnPackageArch pa,\n ( select \n p.name_id,\n max(pe.evr) evr\n from\n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageEVR pe\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.evr_id = pe.id\n group by p.name_id\n ) listall,\n ( select distinct\n p.package_size,\n p.name_id,\n p.evr_id,\n p.package_arch_id\n from\n rhnChannelPackage cp,\n rhnPackage p\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ) full_channel,\n -- Rank the package's arch\n ( select\n package_arch_id, \n count(*) rank\n from\n rhnServerPackageArchCompat\n group by package_arch_id\n ) arch_rank,\n rhnPackageName pn,\n rhnPackageEVR pevr\n where\n pn.id = listall.name_id\n -- link back to the specific package\n and full_channel.name_id = listall.name_id\n and full_channel.evr_id = pevr.id\n and pevr.evr = listall.evr\n and pa.id = full_channel.package_arch_id\n and pa.id = arch_rank.package_arch_id\n order by pn.name, arch_rank.rank desc\n ")
    h.execute(channel_id=str(channel_id))
    ret = h.fetchall_dict()
    if not ret:
        return []
    ret = map(lambda a: (a['name'], a['version'], a['release'], a['epoch'], a['arch'], a['package_size']), __stringify(ret))
    return ret



Clone # 61
Distance between two fragments = 1
Clone size = 12
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 112
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 72
c = rhnChannel.ChannelFamily() c = rhnChannel.Channel()
c.load_from_dict(vdict) c.load_from_dict(vdict)
c.save() c.save()
channel_id = c.get_id() channel_id = c.get_id()
c = rhnChannel.ChannelFamily() c = rhnChannel.Channel()
c.load_by_label(label) c.load_by_label(label)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
rhnSQL.commit() rhnSQL.commit()
return c return c



Clone # 62
Distance between two fragments = 0
Clone size = 12
Source file "./satellite_tools/test/test-iconv.py"
The first line is 41
Source file "./common/rhn_memusage.py"
The first line is 18
def mem_usage():
    f = open('/proc/self/status')
    dict = {}
    while 1:
        line = f.readline()
        if not line:
            break
        arr = map(string.strip, string.split(line, ':', 1))
        if len(arr) == 1:
            continue
        dict[arr[0]] = arr[1]
    return (dict['Name'], dict['VmSize'], dict['VmRSS'], dict['VmData'])
def mem_usage():
    f = open('/proc/self/status')
    dict = {}
    while 1:
        line = f.readline()
        if not line:
            break
        arr = map(string.strip, string.split(line, ':', 1))
        if len(arr) == 1:
            continue
        dict[arr[0]] = arr[1]
    return (dict['Name'], dict['VmSize'], dict['VmRSS'], dict['VmData'])



Clone # 63
Distance between two fragments = 0
Clone size = 12
Source file "./satellite_tools/test/test-iconv.py"
The first line is 41
Source file "./server/test/test-cx_Oracle-memleak.py"
The first line is 24
def mem_usage():
    f = open('/proc/self/status')
    dict = {}
    while 1:
        line = f.readline()
        if not line:
            break
        arr = map(string.strip, string.split(line, ':', 1))
        if len(arr) == 1:
            continue
        dict[arr[0]] = arr[1]
    return (dict['Name'], dict['VmSize'], dict['VmRSS'], dict['VmData'])
def mem_usage():
    f = open('/proc/self/status')
    dict = {}
    while 1:
        line = f.readline()
        if not line:
            break
        arr = map(string.strip, string.split(line, ':', 1))
        if len(arr) == 1:
            continue
        dict[arr[0]] = arr[1]
    return (dict['Name'], dict['VmSize'], dict['VmRSS'], dict['VmData'])



Clone # 64
Distance between two fragments = 4
Clone size = 12
Source file "./satellite_tools/diskImportLib.py"
The first line is 189
Source file "./satellite_tools/diskImportLib.py"
The first line is 182
class ServerChannelArchCompatContainer(xmlSource.ServerChannelArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerChannelArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerPackageArchCompatContainer(xmlSource.ServerPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ChannelPackageArchCompatContainer(xmlSource.ChannelPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerChannelArchCompatContainer(xmlSource.ServerChannelArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerChannelArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 65
Distance between two fragments = 4
Clone size = 12
Source file "./satellite_tools/diskImportLib.py"
The first line is 196
Source file "./satellite_tools/diskImportLib.py"
The first line is 182
class ChannelPackageArchCompatContainer(xmlSource.ChannelPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerPackageArchCompatContainer(xmlSource.ServerPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerGroupServerArchCompatContainer(xmlSource.ServerGroupServerArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerGroupServerArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerChannelArchCompatContainer(xmlSource.ServerChannelArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerChannelArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 66
Distance between two fragments = 2
Clone size = 12
Source file "./test/non-unit/server/rhnSQL/dbtests.py"
The first line is 237
Source file "./test/non-unit/server/rhnSQL/dbtests.py"
The first line is 199
QUERY_CREATE_TABLE = '\n CREATE TABLE %s(id NUMBER, name VARCHAR2(256), num NUMBER(5,2))\n ' QUERY_CREATE_TABLE = '\n CREATE TABLE %s(id INT, name TEXT, num NUMERIC(5,2))\n '
SIMPLE_PROCEDURE = '\nCREATE OR REPLACE FUNCTION \n return_int(returnme in integer) \nRETURN INTEGER AS\nBEGIN\n RETURN returnme;\nEND;\n ' SIMPLE_PROCEDURE = "\nCREATE OR REPLACE FUNCTION return_int(returnme INTEGER) RETURNS int AS $$\nDECLARE\n myInt int;\nBEGIN\n myInt := returnme;\n RETURN myInt;\nEND\n$$ LANGUAGE 'plpgsql';\n "
def setUp(self):
    self.temp_table = ('testtable%s') % (randint(1, 10000000))
    create_table_query = (self.QUERY_CREATE_TABLE) % (self.temp_table)
    cursor = rhnSQL.prepare(create_table_query)
    cursor.execute()
    RhnSQLDatabaseTests.setUp(self)
    cursor = rhnSQL.prepare(self.SIMPLE_PROCEDURE)
    cursor.execute()
def setUp(self):
    self.temp_table = ('testtable%s') % (randint(1, 10000000))
    create_table_query = (self.QUERY_CREATE_TABLE) % (self.temp_table)
    cursor = rhnSQL.prepare(create_table_query)
    cursor.execute()
    RhnSQLDatabaseTests.setUp(self)
    cursor = rhnSQL.prepare(self.SIMPLE_PROCEDURE)
    cursor.execute()



Clone # 67
Distance between two fragments = 1
Clone size = 12
Source file "./server/handlers/app/packages.py"
The first line is 216
Source file "./server/handlers/xp/packages.py"
The first line is 74
authobj.authzChannels(channelList) authobj.authzChannels(channelList)
h = rhnSQL.prepare('\n select sr.name source_rpm\n from rhnChannel c,\n rhnChannelNewestPackage cnp, \n rhnPackage p,\n rhnSourceRPM sr\n where cnp.channel_id = c.id\n and c.label = :channel_label\n and cnp.package_id = p.id\n and p.source_rpm_id = sr.id\n minus\n select sr.name source_rpm\n from rhnChannel c,\n rhnChannelNewestPackage cnp,\n rhnPackage p,\n rhnSourceRPM sr,\n rhnPackageSource ps\n where cnp.channel_id = c.id\n and c.label = :channel_label\n and cnp.package_id = p.id\n and p.source_rpm_id = sr.id\n and p.source_rpm_id = ps.source_rpm_id\n and (p.org_id = ps.org_id or\n (p.org_id is null and ps.org_id is null)\n )\n ') h = rhnSQL.prepare('\n select sr.name source_rpm\n from rhnChannel c,\n rhnChannelNewestPackage cnp,\n rhnPackage p,\n rhnSourceRPM sr\n where cnp.channel_id = c.id\n and c.label = :channel_label\n and cnp.package_id = p.id\n and p.source_rpm_id = sr.id\n minus\n select sr.name source_rpm\n from rhnChannel c,\n rhnChannelNewestPackage cnp,\n rhnPackage p,\n rhnSourceRPM sr,\n rhnPackageSource ps\n where cnp.channel_id = c.id\n and c.label = :channel_label\n and cnp.package_id = p.id\n and p.source_rpm_id = sr.id\n and p.source_rpm_id = ps.source_rpm_id\n and (p.org_id = ps.org_id or\n (p.org_id is null and ps.org_id is null)\n )\n ')
missing_packages = [] missing_packages = []
for c in channelList:
    h.execute(channel_label=c)
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        missing_packages.append([row['source_rpm'], c])
for c in channelList:
    h.execute(channel_label=c)
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        missing_packages.append([row['source_rpm'], c])
return missing_packages return missing_packages



Clone # 68
Distance between two fragments = 3
Clone size = 12
Source file "./satellite_tools/satsync.py"
The first line is 1702
Source file "./satellite_tools/satsync.py"
The first line is 1104
package_count = len(packages) package_count = len(pids)
log(1, (messages.package_importing) % ((channel, (package_count) or ('NONE RELEVANT')))) log(1, (messages.package_parsing) % ((channel, (package_count) or ('NONE RELEVANT'))))
if not package_count:
    continue
if not package_count:
    continue
log(1, messages.warning_slow) log(1, messages.warning_slow)
pb = ProgressBar(prompt='Importing: ', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)
ss = SequenceServer(packages[:], nevermorethan=self._batch_size) ss = SequenceServer(pids[:], nevermorethan=self._batch_size)



Clone # 69
Distance between two fragments = 4
Clone size = 12
Source file "./server/test/byterangetests.py"
The first line is 29
Source file "./server/test/byterangetests.py"
The first line is 21
def testNoRangeGroups(self):
    try:
        server.byterange.parse_byteranges('bytes=')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testEmptyRange(self):
    try:
        server.byterange.parse_byteranges('')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNegativeStart(self):
    try:
        server.byterange.parse_byteranges('bytes=-1-30')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoRangeGroups(self):
    try:
        server.byterange.parse_byteranges('bytes=')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass



Clone # 70
Distance between two fragments = 4
Clone size = 12
Source file "./server/test/byterangetests.py"
The first line is 44
Source file "./server/test/byterangetests.py"
The first line is 37
def testStartAfterEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=12-3')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNegativeStart(self):
    try:
        server.byterange.parse_byteranges('bytes=-1-30')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoStartOrEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testStartAfterEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=12-3')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass



Clone # 71
Distance between two fragments = 4
Clone size = 12
Source file "./server/test/byterangetests.py"
The first line is 58
Source file "./server/test/byterangetests.py"
The first line is 51
def testNoStartInvalidEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-0')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoStartOrEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testBadCharactersInRange(self):
    try:
        server.byterange.parse_byteranges('bytes=2-CB')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoStartInvalidEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-0')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass



Clone # 72
Distance between two fragments = 4
Clone size = 12
Source file "./server/test/byterangetests.py"
The first line is 37
Source file "./server/test/byterangetests.py"
The first line is 21
def testNegativeStart(self):
    try:
        server.byterange.parse_byteranges('bytes=-1-30')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testEmptyRange(self):
    try:
        server.byterange.parse_byteranges('')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testStartAfterEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=12-3')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoRangeGroups(self):
    try:
        server.byterange.parse_byteranges('bytes=')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass



Clone # 73
Distance between two fragments = 4
Clone size = 12
Source file "./server/test/byterangetests.py"
The first line is 51
Source file "./server/test/byterangetests.py"
The first line is 37
def testNoStartOrEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNegativeStart(self):
    try:
        server.byterange.parse_byteranges('bytes=-1-30')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoStartInvalidEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-0')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testStartAfterEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=12-3')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass



Clone # 74
Distance between two fragments = 4
Clone size = 12
Source file "./server/test/byterangetests.py"
The first line is 44
Source file "./server/test/byterangetests.py"
The first line is 21
def testStartAfterEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=12-3')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testEmptyRange(self):
    try:
        server.byterange.parse_byteranges('')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoStartOrEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoRangeGroups(self):
    try:
        server.byterange.parse_byteranges('bytes=')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass



Clone # 75
Distance between two fragments = 4
Clone size = 12
Source file "./server/test/byterangetests.py"
The first line is 58
Source file "./server/test/byterangetests.py"
The first line is 37
def testNoStartInvalidEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-0')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNegativeStart(self):
    try:
        server.byterange.parse_byteranges('bytes=-1-30')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testBadCharactersInRange(self):
    try:
        server.byterange.parse_byteranges('bytes=2-CB')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testStartAfterEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=12-3')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass



Clone # 76
Distance between two fragments = 4
Clone size = 12
Source file "./server/test/byterangetests.py"
The first line is 51
Source file "./server/test/byterangetests.py"
The first line is 21
def testNoStartOrEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testEmptyRange(self):
    try:
        server.byterange.parse_byteranges('')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoStartInvalidEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-0')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoRangeGroups(self):
    try:
        server.byterange.parse_byteranges('bytes=')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass



Clone # 77
Distance between two fragments = 4
Clone size = 12
Source file "./server/test/byterangetests.py"
The first line is 58
Source file "./server/test/byterangetests.py"
The first line is 21
def testNoStartInvalidEnd(self):
    try:
        server.byterange.parse_byteranges('bytes=-0')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testEmptyRange(self):
    try:
        server.byterange.parse_byteranges('')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testBadCharactersInRange(self):
    try:
        server.byterange.parse_byteranges('bytes=2-CB')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass
def testNoRangeGroups(self):
    try:
        server.byterange.parse_byteranges('bytes=')
        self.fail()
    except server.byterange.InvalidByteRangeException:
        pass



Clone # 78
Distance between two fragments = 3
Clone size = 12
Source file "./server/handlers/app/test/test_channel.py"
The first line is 255
Source file "./server/handlers/app/test/test_channel.py"
The first line is 232
def testrevokesubscribeChannelPermission(self):
    ret = channel.revokeChannelPermission(options['label'], 'subscribe', commit, username, password)
    h = rhnSQL.prepare('select id from rhnchannel where label = :label')
    h.execute(label=options['label'])
    ret = (h.fetchone_dict()) or ([])
    h2 = rhnSQL.prepare('\n select cpr.label\n from rhnchannelpermission cp,\n rhnchannelpermissionrole cpr\n where cpr.id = cp.role_id\n and cp.channel_id = :cid\n ')
    h2.execute(cid=ret['id'])
    ret2 = (h2.fetchone_dict()) or ([])
    if ret2:
        assert ret2['label'] != 'subscribe'
def testrevokemanageChannelPermission(self):
    ret = channel.revokeChannelPermission(options['label'], 'manage', commit, username, password)
    h = rhnSQL.prepare('select id from rhnchannel where label = :label')
    h.execute(label=options['label'])
    ret = (h.fetchone_dict()) or ([])
    h2 = rhnSQL.prepare('\n select cpr.label\n from rhnchannelpermission cp,\n rhnchannelpermissionrole cpr\n where cp.channel_id = :cid\n and cpr.id = cp.role_id\n ')
    h2.execute(cid=ret['id'])
    ret2 = (h2.fetchone_dict()) or ([])
    if ret2:
        assert ret2['label'] != 'manage'



Clone # 79
Distance between two fragments = 1
Clone size = 11
Source file "./server/test/test_leak.py"
The first line is 29
Source file "./server/test/test_leak4.py"
The first line is 30
while i < 10000:
    h.execute()
    if (i) % (100) == 0:
        f = open('/proc/self/status')
        l = f.readlines()
        vmsize = l[10][10:-1]
        vmrss = l[12][10:-1]
        f.close()
        write(('%d %.3f vsz: %s rss: %s \n') % ((i, (time.time()) - (start), vmsize, vmrss)))
    i = (i) + (1)
while i < 10000:
    c.execute()
    if (i) % (100) == 0:
        f = open('/proc/self/status')
        l = f.readlines()
        vmsize = l[10][10:-1]
        vmrss = l[12][10:-1]
        f.close()
        write(('%d %.3f vsz: %s rss: %s \n') % ((i, (time.time()) - (start), vmsize, vmrss)))
    i = (i) + (1)



Clone # 80
Distance between two fragments = 0
Clone size = 11
Source file "./server/test/test_leak.py"
The first line is 29
Source file "./server/test/test_leak2.py"
The first line is 29
while i < 10000:
    h.execute()
    if (i) % (100) == 0:
        f = open('/proc/self/status')
        l = f.readlines()
        vmsize = l[10][10:-1]
        vmrss = l[12][10:-1]
        f.close()
        write(('%d %.3f vsz: %s rss: %s \n') % ((i, (time.time()) - (start), vmsize, vmrss)))
    i = (i) + (1)
while i < 10000:
    h.execute()
    if (i) % (100) == 0:
        f = open('/proc/self/status')
        l = f.readlines()
        vmsize = l[10][10:-1]
        vmrss = l[12][10:-1]
        f.close()
        write(('%d %.3f vsz: %s rss: %s \n') % ((i, (time.time()) - (start), vmsize, vmrss)))
    i = (i) + (1)



Clone # 81
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 305
Source file "./server/test/test_solve_dependencies.py"
The first line is 292
def testUp2dateFilterGT(self):
    nlimitstr = '35:mozilla-0-0'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 1
def testUp2dateFilterEq(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 0



Clone # 82
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 366
Source file "./server/test/test_solve_dependencies.py"
The first line is 353
def testUp2dateFilterGT1(self):
    nlimitstr = 'mozilla-0-0:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 1
def testUp2dateFilterEq1(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 0



Clone # 83
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 329
Source file "./server/test/test_solve_dependencies.py"
The first line is 305
def testUp2dateFilterLT(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == -1
def testUp2dateFilterGT(self):
    nlimitstr = '35:mozilla-0-0'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 1



Clone # 84
Distance between two fragments = 3
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 341
Source file "./server/test/test_solve_dependencies.py"
The first line is 317
def testUp2dateFilterLTE(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == -1) or (ret == 0)
def testUp2dateFilterGTE(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == 1) or (ret == 0)



Clone # 85
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 353
Source file "./server/test/test_solve_dependencies.py"
The first line is 329
def testUp2dateFilterEq1(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 0
def testUp2dateFilterLT(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == -1



Clone # 86
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 390
Source file "./server/test/test_solve_dependencies.py"
The first line is 366
def testUp2dateFilterLT1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == -1
def testUp2dateFilterGT1(self):
    nlimitstr = 'mozilla-0-0:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 1



Clone # 87
Distance between two fragments = 3
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 402
Source file "./server/test/test_solve_dependencies.py"
The first line is 378
def testUp2dateFilterLTE1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == -1) or (ret == 0)
def testUp2dateFilterGTE1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == 1) or (ret == 0)



Clone # 88
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 329
Source file "./server/test/test_solve_dependencies.py"
The first line is 292
def testUp2dateFilterLT(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == -1
def testUp2dateFilterEq(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 0



Clone # 89
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 366
Source file "./server/test/test_solve_dependencies.py"
The first line is 329
def testUp2dateFilterGT1(self):
    nlimitstr = 'mozilla-0-0:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 1
def testUp2dateFilterLT(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == -1



Clone # 90
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 378
Source file "./server/test/test_solve_dependencies.py"
The first line is 341
def testUp2dateFilterGTE1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == 1) or (ret == 0)
def testUp2dateFilterLTE(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == -1) or (ret == 0)



Clone # 91
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 390
Source file "./server/test/test_solve_dependencies.py"
The first line is 353
def testUp2dateFilterLT1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == -1
def testUp2dateFilterEq1(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 0



Clone # 92
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 353
Source file "./server/test/test_solve_dependencies.py"
The first line is 305
def testUp2dateFilterEq1(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 0
def testUp2dateFilterGT(self):
    nlimitstr = '35:mozilla-0-0'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 1



Clone # 93
Distance between two fragments = 1
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 353
Source file "./server/test/test_solve_dependencies.py"
The first line is 292
def testUp2dateFilterEq1(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 0
def testUp2dateFilterEq(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 0



Clone # 94
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 366
Source file "./server/test/test_solve_dependencies.py"
The first line is 292
def testUp2dateFilterGT1(self):
    nlimitstr = 'mozilla-0-0:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 1
def testUp2dateFilterEq(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 0



Clone # 95
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 390
Source file "./server/test/test_solve_dependencies.py"
The first line is 305
def testUp2dateFilterLT1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == -1
def testUp2dateFilterGT(self):
    nlimitstr = '35:mozilla-0-0'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 1



Clone # 96
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 402
Source file "./server/test/test_solve_dependencies.py"
The first line is 317
def testUp2dateFilterLTE1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == -1) or (ret == 0)
def testUp2dateFilterGTE(self):
    nlimitstr = '35:mozilla-1-1'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == 1) or (ret == 0)



Clone # 97
Distance between two fragments = 4
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 390
Source file "./server/test/test_solve_dependencies.py"
The first line is 292
def testUp2dateFilterLT1(self):
    nlimitstr = 'mozilla-1-1:35'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == -1
def testUp2dateFilterEq(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert ret == 0



Clone # 98
Distance between two fragments = 3
Clone size = 11
Source file "./server/test/test_solve_dependencies.py"
The first line is 265
Source file "./server/test/test_solve_dependencies.py"
The first line is 241
def testEvrFilterLTE(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='<=', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == -1) or (ret == 0)
def testEvrFilterGTE(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='>=', limit=nlimitstr)
    ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
    assert (ret == 1) or (ret == 0)



Clone # 99
Distance between two fragments = 2
Clone size = 11
Source file "./server/handlers/xmlrpc/registration.py"
The first line is 909
Source file "./server/handlers/xmlrpc/registration.py"
The first line is 894
def delete_packages(self, system_id, packages):
    log_debug(5, system_id, packages)
    if CFG.DISABLE_PACKAGES:
        return 0
    packages = self._normalize_packages(system_id, packages)
    server = self.auth_system(system_id)
    log_debug(1, server.getid(), ('packages: %d') % (len(packages)))
    for package in packages:
        server.delete_package(package)
    server.save_packages()
    return 0
def add_packages(self, system_id, packages):
    log_debug(5, system_id, packages)
    if CFG.DISABLE_PACKAGES:
        return 0
    packages = self._normalize_packages(system_id, packages)
    server = self.auth_system(system_id)
    log_debug(1, server.getid(), ('packages: %d') % (len(packages)))
    for package in packages:
        server.add_package(package)
    server.save_packages()
    return 0



Clone # 100
Distance between two fragments = 1
Clone size = 11
Source file "./server/rhnPackage.py"
The first line is 348
Source file "./server/rhnPackage.py"
The first line is 282
rs = h.fetchone_dict() rs = h.fetchone_dict()
if not rs:
    log_debug(4, 'Error', 'Non-existant package requested', server_id, pkg)
    raise rhnFault(17, (_('Invalid RPM package %s requested')) % (pkg))
if not rs:
    log_debug(4, 'Error', 'Non-existant package requested', server_id, packageName)
    raise rhnFault(17, (_('Invalid RPM package %s requested')) % (packageName))
filePath = ('%s/%s') % ((CFG.MOUNT_POINT, rs['path'])) filePath = ('%s/%s') % ((CFG.MOUNT_POINT, rs['path']))
if not os.access(filePath, os.R_OK):
    log_error('Package not found', filePath)
    raise rhnFault(17, _('Package not found'))
if not os.access(filePath, os.R_OK):
    log_error('Package not found', filePath)
    raise rhnFault(17, _('Package not found'))
rhnFlags.set('Download-Accelerator-Path', rs['path']) rhnFlags.set('Download-Accelerator-Path', rs['path'])
return filePath return filePath



Clone # 101
Distance between two fragments = 4
Clone size = 11
Source file "./test/non-unit/server/rhnSQL/dbtests.py"
The first line is 173
Source file "./test/non-unit/server/rhnSQL/dbtests.py"
The first line is 160
def test_fetchall_dict(self):
    query = rhnSQL.prepare(('SELECT * FROM %s ORDER BY id') % (self.temp_table))
    query.execute()
    rows = query.fetchall_dict()
    self.assertEquals(len(TEST_IDS), len(rows))
    i = 0
    while i < len(TEST_IDS):
        self.assertEquals(TEST_IDS[i], rows[i]['id'])
        self.assertEquals(TEST_NAMES[i], rows[i]['name'])
        i = (i) + (1)
def test_fetchall(self):
    query = rhnSQL.prepare(('SELECT * FROM %s ORDER BY id') % (self.temp_table))
    query.execute()
    rows = query.fetchall()
    self.assertEquals(len(TEST_IDS), len(rows))
    i = 0
    while i < len(TEST_IDS):
        self.assertEquals(TEST_IDS[i], rows[i][0])
        self.assertEquals(TEST_NAMES[i], rows[i][1])
        i = (i) + (1)



Clone # 102
Distance between two fragments = 3
Clone size = 11
Source file "./server/action_extra_data/kickstart_guest.py"
The first line is 55
Source file "./server/action_extra_data/kickstart_guest.py"
The first line is 38
def initiate(server_id, action_id, data={}):
    log_debug(3, action_id)
    action_status = rhnFlags.get('action_status')
    if action_status == 3:
        ks_state = 'failed'
        next_action_type = None
    else:
        ks_state = 'in_progress'
        next_action_type = 'kickstart_guest.add_tools_channel'
    server_kickstart.update_kickstart_session(server_id, action_id, action_status, kickstart_state=ks_state, next_action_type=next_action_type)
def add_tools_channel(server_id, action_id, data={}):
    log_debug(3, action_id)
    action_status = rhnFlags.get('action_status')
    if action_status == 3:
        ks_state = 'failed'
        next_action_type = None
    else:
        ks_state = 'complete'
        next_action_type = 'kickstart_guest.schedule_virt_guest_pkg_install'
    server_kickstart.update_kickstart_session(server_id, action_id, action_status, kickstart_state=ks_state, next_action_type=next_action_type)



Clone # 103
Distance between two fragments = 4
Clone size = 11
Source file "./satellite_tools/exporter/exportLib.py"
The first line is 718
Source file "./satellite_tools/exporter/exportLib.py"
The first line is 567
tag_name = 'rhn-packages-short' tag_name = 'rhn-packages'
def set_iterator(self):
    if self._iterator:
        return self._iterator
    h = rhnSQL.prepare("\n select \n p.id, \n pn.name, \n pe.evr.version version, \n pe.evr.release release, \n pe.evr.epoch epoch, \n pa.label package_arch,\n c.checksum_type,\n c.checksum,\n p.org_id,\n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackage p, rhnPackageName pn, rhnPackageEVR pe, \n rhnPackageArch pa, rhnChecksumView c\n where p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p.path is not null\n and p.checksum_id = c.id\n and rownum < 3\n ")
    h.execute()
    return h
def set_iterator(self):
    if self._iterator:
        return self._iterator
    h = rhnSQL.prepare("\n select \n p.id,\n p.org_id, \n pn.name, \n pe.evr.version version, \n pe.evr.release release, \n pe.evr.epoch epoch, \n pa.label package_arch,\n pg.name package_group, \n p.rpm_version, \n p.description,\n p.summary,\n p.package_size,\n p.payload_size,\n p.build_host, \n TO_CHAR(p.build_time, 'YYYYMMDDHH24MISS') build_time,\n sr.name source_rpm, \n c.checksum_type,\n c.checksum,\n p.vendor,\n p.payload_format, \n p.compat, \n p.header_sig,\n p.copyright,\n p.cookie,\n p.header_start,\n p.header_end,\n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackage p, rhnPackageName pn, rhnPackageEVR pe, \n rhnPackageArch pa, rhnPackageGroup pg, rhnSourceRPM sr,\n rhnChecksumView c\n where p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p.package_group = pg.id\n and p.source_rpm_id = sr.id\n and p.path is not null\n and p.checksum_id = c.id\n and rownum < 3\n ")
    h.execute()
    return h
def dump_subelement(self, data):
    d = ShortPackageEntryDumper(self._writer, data)
    d.dump()
def dump_subelement(self, data):
    p = _PackageDumper(self._writer, data)
    p.dump()



Clone # 104
Distance between two fragments = 3
Clone size = 11
Source file "./server/rhnChannel.py"
The first line is 478
Source file "./server/rhnChannel.py"
The first line is 463
_query_update_dists = rhnSQL.Statement('\n update rhnDistChannelMap\n set channel_arch_id = :channel_arch_id,\n os = :os\n where channel_id = :channel_id\n and release = :release\n ') _query_add_dists = rhnSQL.Statement('\n insert into rhnDistChannelMap \n (channel_id, channel_arch_id, release, os)\n values (:channel_id, :channel_arch_id, :release, :os)\n ')
def _update_dists(self, releases, oses):
    if not releases:
        return None
    count = len(releases)
    channel_ids = ([self._row['id']]) * (count)
    channel_arch_ids = ([self._row['channel_arch_id']]) * (count)
    h = rhnSQL.prepare(self._query_update_dists)
    h.executemany(channel_id=channel_ids, channel_arch_id=channel_arch_ids, release=releases, os=oses)
def _add_dists(self, releases, oses):
    if not releases:
        return None
    count = len(releases)
    channel_ids = ([self._row['id']]) * (count)
    channel_arch_ids = ([self._row['channel_arch_id']]) * (count)
    h = rhnSQL.prepare(self._query_add_dists)
    h.executemany(channel_id=channel_ids, channel_arch_id=channel_arch_ids, release=releases, os=oses)



Clone # 105
Distance between two fragments = 4
Clone size = 10
Source file "./server/importlib/backend.py"
The first line is 529
Source file "./server/importlib/backend.py"
The first line is 436
def lookupChannelFamilies(self, hash):
    if not hash:
        return None
    sql = 'select id from rhnChannelFamily where label = :label'
    h = self.dbmodule.prepare(sql)
    for k in hash.keys():
        h.execute(label=k)
        row = h.fetchone_dict()
        if row:
            hash[k] = row['id']
def lookupChecksumTypes(self, checksumTypeHash):
    if not checksumTypeHash:
        return None
    sql = 'select id from rhnChecksumType where label = :label'
    h = self.dbmodule.prepare(sql)
    for l in checksumTypeHash.keys():
        h.execute(label=l)
        row = h.fetchone_dict()
        if row:
            checksumTypeHash[l] = row['id']



Clone # 106
Distance between two fragments = 4
Clone size = 10
Source file "./satellite_tools/sync_handlers.py"
The first line is 378
Source file "./satellite_tools/sync_handlers.py"
The first line is 263
class ErrataContainer(xmlSource.ErrataContainer):
    def endItemCallback(self):
        xmlSource.ErrataContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ErrataCollection()
        c.add_erratum(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class ShortPackageContainer(xmlSource.IncompletePackageContainer):
    def endItemCallback(self):
        xmlSource.IncompletePackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ShortPackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass



Clone # 107
Distance between two fragments = 4
Clone size = 10
Source file "./satellite_tools/sync_handlers.py"
The first line is 263
Source file "./satellite_tools/sync_handlers.py"
The first line is 410
class ShortPackageContainer(xmlSource.IncompletePackageContainer):
    def endItemCallback(self):
        xmlSource.IncompletePackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ShortPackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class KickstartableTreesContainer(xmlSource.KickstartableTreesContainer):
    def endItemCallback(self):
        xmlSource.KickstartableTreesContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = KickstartableTreesCollection()
        c.add_item(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass



Clone # 108
Distance between two fragments = 4
Clone size = 10
Source file "./satellite_tools/sync_handlers.py"
The first line is 263
Source file "./satellite_tools/sync_handlers.py"
The first line is 163
class ShortPackageContainer(xmlSource.IncompletePackageContainer):
    def endItemCallback(self):
        xmlSource.IncompletePackageContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ShortPackageCollection()
        c.add_package(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass
class ChannelContainer(xmlSource.ChannelContainer):
    def endItemCallback(self):
        xmlSource.ChannelContainer.endItemCallback(self)
        if not self.batch:
            return None
        c = ChannelCollection()
        c.add_channel(self.batch[-1])
        self.batch[:]
    def endContainerCallback(self):
        pass



Clone # 109
Distance between two fragments = 4
Clone size = 10
Source file "./server/config_common/templated_document.py"
The first line is 125
Source file "./server/config_common/templated_document.py"
The first line is 117
def net_intf_netmask(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['netmask']
def net_intf_ipaddr(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['ip_addr']
def net_intf_broadcast(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['broadcast']
def net_intf_netmask(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['netmask']



Clone # 110
Distance between two fragments = 4
Clone size = 10
Source file "./server/config_common/templated_document.py"
The first line is 142
Source file "./server/config_common/templated_document.py"
The first line is 134
def net_intf_hwaddr(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['hw_addr']
def net_intf_broadcast(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['broadcast']
def net_intf_module(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['module']
def net_intf_hwaddr(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['hw_addr']



Clone # 111
Distance between two fragments = 4
Clone size = 10
Source file "./server/config_common/templated_document.py"
The first line is 134
Source file "./server/config_common/templated_document.py"
The first line is 117
def net_intf_broadcast(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['broadcast']
def net_intf_ipaddr(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['ip_addr']
def net_intf_hwaddr(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['hw_addr']
def net_intf_netmask(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['netmask']



Clone # 112
Distance between two fragments = 4
Clone size = 10
Source file "./server/config_common/templated_document.py"
The first line is 142
Source file "./server/config_common/templated_document.py"
The first line is 117
def net_intf_hwaddr(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['hw_addr']
def net_intf_ipaddr(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['ip_addr']
def net_intf_module(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['module']
def net_intf_netmask(self, interface_name):
    iface = self._interface_info(interface_name)
    if not iface:
        return None
    return iface['netmask']



Clone # 113
Distance between two fragments = 4
Clone size = 10
Source file "./server/action_extra_data/rollback.py"
The first line is 22
Source file "./server/action_extra_data/packages.py"
The first line is 408
def config(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.config: Should do something useful with this data', server_id, action_id, data)
def refresh_list(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
def listTransactions(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
def delta(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_extra_data.packages.delta: Should do something useful with this data', server_id, action_id, data)



Clone # 114
Distance between two fragments = 4
Clone size = 10
Source file "./server/action_extra_data/up2date_config.py"
The first line is 23
Source file "./server/action_extra_data/rollback.py"
The first line is 28
def get(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.up2date_config.get: Should do something useful with this data', server_id, action_id, data)
def listTransactions(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
def update(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.up2date_config.update: Should do something useful with this data', server_id, action_id, data)
def rollback(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)



Clone # 115
Distance between two fragments = 4
Clone size = 10
Source file "./server/action_extra_data/up2date_config.py"
The first line is 23
Source file "./server/action_extra_data/rollback.py"
The first line is 22
def get(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.up2date_config.get: Should do something useful with this data', server_id, action_id, data)
def config(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.config: Should do something useful with this data', server_id, action_id, data)
def update(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.up2date_config.update: Should do something useful with this data', server_id, action_id, data)
def listTransactions(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)



Clone # 116
Distance between two fragments = 4
Clone size = 10
Source file "./server/action_extra_data/up2date_config.py"
The first line is 23
Source file "./server/action_extra_data/packages.py"
The first line is 408
def get(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.up2date_config.get: Should do something useful with this data', server_id, action_id, data)
def refresh_list(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
def update(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.up2date_config.update: Should do something useful with this data', server_id, action_id, data)
def delta(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_extra_data.packages.delta: Should do something useful with this data', server_id, action_id, data)



Clone # 117
Distance between two fragments = 3
Clone size = 10
Source file "./server/action_extra_data/rollback.py"
The first line is 28
Source file "./server/action_extra_data/rollback.py"
The first line is 22
def listTransactions(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
def config(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.config: Should do something useful with this data', server_id, action_id, data)
def rollback(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
def listTransactions(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)



Clone # 118
Distance between two fragments = 4
Clone size = 10
Source file "./server/action_extra_data/rollback.py"
The first line is 28
Source file "./server/action_extra_data/packages.py"
The first line is 408
def listTransactions(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
def refresh_list(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
def rollback(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
def delta(server_id, action_id, data={}):
    if not data:
        return None
    log_error('action_extra_data.packages.delta: Should do something useful with this data', server_id, action_id, data)



Clone # 119
Distance between two fragments = 0
Clone size = 10
Source file "./server/rhnDependency.py"
The first line is 734
Source file "./server/rhnDependency.py"
The first line is 652
if version > 1:
    return packages
if version > 1:
    return packages
result = [] result = []
for dep in deplist:
    if not packages[dep]:
        continue
    r = packages[dep][0]
    if r not in result:
        result.append(r)
for dep in deplist:
    if not packages[dep]:
        continue
    r = packages[dep][0]
    if r not in result:
        result.append(r)
return result return result



Clone # 120
Distance between two fragments = 4
Clone size = 10
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 439
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 232
def dump_kickstartable_trees(self, kickstart_labels=None):
    log_debug(2)
    writer = self._get_xml_writer()
    dumper = SatelliteDumper(writer, KickstartableTreesDumper(writer, kickstarts=kickstart_labels))
    dumper.dump()
    writer.flush()
    log_debug(4, 'OK')
    self.close()
    return 0
def dump_channels(self, channel_labels=None):
    log_debug(2)
    writer = self._get_xml_writer()
    dumper = SatelliteDumper(writer, ChannelsDumper(writer, channels=channel_labels))
    dumper.dump()
    writer.flush()
    log_debug(4, 'OK')
    self.close()
    return 0



Clone # 121
Distance between two fragments = 0
Clone size = 10
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 114
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 95
c.save() c.save()
channel_id = c.get_id() channel_id = c.get_id()
c = rhnChannel.ChannelFamily() c = rhnChannel.ChannelFamily()
c.load_by_label(label) c.load_by_label(label)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
rhnSQL.commit() rhnSQL.commit()
return c return c



Clone # 122
Distance between two fragments = 1
Clone size = 10
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 114
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 51
c.save() c.save()
channel_id = c.get_id() channel_id = c.get_id()
c = rhnChannel.ChannelFamily() c = rhnChannel.Channel()
c.load_by_label(label) c.load_by_label(label)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
rhnSQL.commit() rhnSQL.commit()
return c return c



Clone # 123
Distance between two fragments = 1
Clone size = 10
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 95
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 74
c.save() c.save()
channel_id = c.get_id() channel_id = c.get_id()
c = rhnChannel.ChannelFamily() c = rhnChannel.Channel()
c.load_by_label(label) c.load_by_label(label)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
rhnSQL.commit() rhnSQL.commit()
return c return c



Clone # 124
Distance between two fragments = 0
Clone size = 10
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 74
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 51
c.save() c.save()
channel_id = c.get_id() channel_id = c.get_id()
c = rhnChannel.Channel() c = rhnChannel.Channel()
c.load_by_label(label) c.load_by_label(label)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
for k, v in vdict.items():
    method = getattr(c, ('get_') + (k))
    dbv = method()
    self.assertEqual(v, dbv)
rhnSQL.commit() rhnSQL.commit()
return c return c



Clone # 125
Distance between two fragments = 4
Clone size = 10
Source file "./server/test/unit-test/misc_functions.py"
The first line is 128
Source file "./server/rhnServerGroup.py"
The first line is 71
if isinstance(org_id, types.StringType):
    u = rhnUser.search(org_id)
    if not u:
        raise rhnServerGroup.InvalidUserError(org_id)
    return u.contact['org_id']
if isinstance(org_id, types.StringType):
    u = rhnUser.search(org_id)
    if not u:
        raise InvalidUserError(org_id)
    return u.contact['org_id']
t = rhnSQL.Table('web_customer', 'id') t = rhnSQL.Table('web_customer', 'id')
row = t[org_id] row = t[org_id]
if not row:
    raise rhnServerGroup.InvalidOrgError(org_id)
if not row:
    raise InvalidOrgError(org_id)
return row['id'] return row['id']



Clone # 126
Distance between two fragments = 4
Clone size = 10
Source file "./server/test/misc_functions.py"
The first line is 151
Source file "./server/rhnServerGroup.py"
The first line is 71
if isinstance(org_id, types.StringType):
    u = rhnUser.search(org_id)
    if not u:
        raise rhnServerGroup.InvalidUserError(org_id)
    return u.contact['org_id']
if isinstance(org_id, types.StringType):
    u = rhnUser.search(org_id)
    if not u:
        raise InvalidUserError(org_id)
    return u.contact['org_id']
t = rhnSQL.Table('web_customer', 'id') t = rhnSQL.Table('web_customer', 'id')
row = t[org_id] row = t[org_id]
if not row:
    raise rhnServerGroup.InvalidOrgError(org_id)
if not row:
    raise InvalidOrgError(org_id)
return row['id'] return row['id']



Clone # 127
Distance between two fragments = 0
Clone size = 10
Source file "./server/handlers/xmlrpc/errata.py"
The first line is 163
Source file "./server/handlers/xmlrpc/errata.py"
The first line is 93
ret = [] ret = []
while 1:
    row = h.fetchone_dict()
    if row is None:
        break
    for k in row.keys():
        if row[k] is None:
            row[k] = 'N/A'
    ret.append(row)
while 1:
    row = h.fetchone_dict()
    if row is None:
        break
    for k in row.keys():
        if row[k] is None:
            row[k] = 'N/A'
    ret.append(row)
return ret return ret



Clone # 128
Distance between two fragments = 4
Clone size = 10
Source file "./satellite_tools/satsync.py"
The first line is 1223
Source file "./satellite_tools/satsync.py"
The first line is 908
m_channel_source_packages = missing_channel_source_packages[channel_label] = [] m_channel_packages = missing_channel_packages[channel_label] = []
m_fs_source_packages = missing_fs_source_packages[channel_label] = [] m_fs_packages = missing_fs_packages[channel_label] = []
pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)
if not upids:
    pb.printComplete()
    continue
if not upids:
    pb.printComplete()
    continue



Clone # 129
Distance between two fragments = 2
Clone size = 10
Source file "./server/test/unit-test/test_server_registration.py"
The first line is 131
Source file "./server/test/unit-test/test_server_registration.py"
The first line is 68
u = self._create_new_user() u = self._create_new_user()
username = u.contact['login'] username = u.contact['login']
password = u.contact['password'] password = u.contact['password']
params = build_new_system_params_with_username(username=username, password=password, os_release='2.1AS') params = build_new_system_params_with_username(username=username, password=password, os_release='2.1AS')
system_id = register_new_system(params) system_id = register_new_system(params)
rhnSQL.commit() rhnSQL.commit()
s1 = rhnServer.get(system_id) s = rhnServer.get(system_id)
self.assertNotEqual(s1, None) self.assertNotEqual(s, None)
server_id_1 = s1.getid() server_id = s.getid()



Clone # 130
Distance between two fragments = 4
Clone size = 10
Source file "./common/test/unit-test/test_gettext.py"
The first line is 81
Source file "./common/test/unit-test/test_gettext.py"
The first line is 74
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)
def test_en_1(self):
    lang = 'en'
    s = 'Good day'
    target = s
    self._test(lang, s, target)
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)



Clone # 131
Distance between two fragments = 4
Clone size = 10
Source file "./common/test/unit-test/test_gettext.py"
The first line is 137
Source file "./common/test/unit-test/test_gettext.py"
The first line is 130
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)
def test_go_1(self):
    lang = 'en'
    s = 'Good day'
    target = s
    self._test(lang, s, target)
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)



Clone # 132
Distance between two fragments = 4
Clone size = 10
Source file "./common/test/unit-test/test_gettext.py"
The first line is 88
Source file "./common/test/unit-test/test_gettext.py"
The first line is 74
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_en_1(self):
    lang = 'en'
    s = 'Good day'
    target = s
    self._test(lang, s, target)
def test_en_missing_1(self):
    lang = 'en'
    s = "This string doesn't exist in the translation"
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)



Clone # 133
Distance between two fragments = 4
Clone size = 10
Source file "./common/test/unit-test/test_gettext.py"
The first line is 144
Source file "./common/test/unit-test/test_gettext.py"
The first line is 130
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_go_1(self):
    lang = 'en'
    s = 'Good day'
    target = s
    self._test(lang, s, target)
def test_en_missing_1(self):
    lang = 'en'
    s = "This string doesn't exist in the translation"
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)



Clone # 134
Distance between two fragments = 4
Clone size = 10
Source file "./common/test/unit-test/test_gettext.py"
The first line is 116
Source file "./common/test/unit-test/test_gettext.py"
The first line is 88
def test_ro_3(self):
    lang = 'ro'
    s = 'What should I do now?'
    target = 'Ce sa fac acum?'
    self._test(lang, s, target)
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_ro_missing_1(self):
    lang = 'ro'
    s = "This string doesn't exist in the translation"
    target = s
    self._test(lang, s, target)
def test_en_missing_1(self):
    lang = 'en'
    s = "This string doesn't exist in the translation"
    target = s
    self._test(lang, s, target)



Clone # 135
Distance between two fragments = 4
Clone size = 10
Source file "./common/test/unit-test/test_gettext.py"
The first line is 144
Source file "./common/test/unit-test/test_gettext.py"
The first line is 116
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_ro_3(self):
    lang = 'ro'
    s = 'What should I do now?'
    target = 'Ce sa fac acum?'
    self._test(lang, s, target)
def test_en_missing_1(self):
    lang = 'en'
    s = "This string doesn't exist in the translation"
    target = s
    self._test(lang, s, target)
def test_ro_missing_1(self):
    lang = 'ro'
    s = "This string doesn't exist in the translation"
    target = s
    self._test(lang, s, target)



Clone # 136
Distance between two fragments = 4
Clone size = 10
Source file "./common/test/unit-test/test_gettext.py"
The first line is 130
Source file "./common/test/unit-test/test_gettext.py"
The first line is 88
def test_go_1(self):
    lang = 'en'
    s = 'Good day'
    target = s
    self._test(lang, s, target)
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)
def test_en_missing_1(self):
    lang = 'en'
    s = "This string doesn't exist in the translation"
    target = s
    self._test(lang, s, target)



Clone # 137
Distance between two fragments = 4
Clone size = 10
Source file "./common/test/unit-test/test_gettext.py"
The first line is 130
Source file "./common/test/unit-test/test_gettext.py"
The first line is 81
def test_go_1(self):
    lang = 'en'
    s = 'Good day'
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)



Clone # 138
Distance between two fragments = 4
Clone size = 10
Source file "./common/test/unit-test/test_gettext.py"
The first line is 137
Source file "./common/test/unit-test/test_gettext.py"
The first line is 74
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)
def test_en_1(self):
    lang = 'en'
    s = 'Good day'
    target = s
    self._test(lang, s, target)
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)



Clone # 139
Distance between two fragments = 4
Clone size = 10
Source file "./common/test/unit-test/test_gettext.py"
The first line is 144
Source file "./common/test/unit-test/test_gettext.py"
The first line is 74
def test_en_3(self):
    lang = 'en'
    s = 'What should I do now?'
    target = s
    self._test(lang, s, target)
def test_en_1(self):
    lang = 'en'
    s = 'Good day'
    target = s
    self._test(lang, s, target)
def test_en_missing_1(self):
    lang = 'en'
    s = "This string doesn't exist in the translation"
    target = s
    self._test(lang, s, target)
def test_en_2(self):
    lang = 'en'
    s = 'How do you do?'
    target = s
    self._test(lang, s, target)



Clone # 140
Distance between two fragments = 4
Clone size = 10
Source file "./satellite_tools/diskImportLib.py"
The first line is 164
Source file "./satellite_tools/diskImportLib.py"
The first line is 158
class PackageArchContainer(xmlSource.PackageArchContainer):
    def endContainerCallback(self):
        importer = archImport.PackageArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ChannelArchContainer(xmlSource.ChannelArchContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerArchContainer(xmlSource.ServerArchContainer):
    def endContainerCallback(self):
        importer = archImport.ServerArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class PackageArchContainer(xmlSource.PackageArchContainer):
    def endContainerCallback(self):
        importer = archImport.PackageArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 141
Distance between two fragments = 4
Clone size = 11
Source file "./satellite_tools/diskImportLib.py"
The first line is 176
Source file "./satellite_tools/diskImportLib.py"
The first line is 170
class CPUArchContainer(xmlSource.CPUArchContainer):
    def endContainerCallback(self):
        importer = archImport.CPUArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerArchContainer(xmlSource.ServerArchContainer):
    def endContainerCallback(self):
        importer = archImport.ServerArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerPackageArchCompatContainer(xmlSource.ServerPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class CPUArchContainer(xmlSource.CPUArchContainer):
    def endContainerCallback(self):
        importer = archImport.CPUArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 142
Distance between two fragments = 4
Clone size = 10
Source file "./satellite_tools/diskImportLib.py"
The first line is 170
Source file "./satellite_tools/diskImportLib.py"
The first line is 158
class ServerArchContainer(xmlSource.ServerArchContainer):
    def endContainerCallback(self):
        importer = archImport.ServerArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ChannelArchContainer(xmlSource.ChannelArchContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class CPUArchContainer(xmlSource.CPUArchContainer):
    def endContainerCallback(self):
        importer = archImport.CPUArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class PackageArchContainer(xmlSource.PackageArchContainer):
    def endContainerCallback(self):
        importer = archImport.PackageArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 143
Distance between two fragments = 4
Clone size = 12
Source file "./satellite_tools/diskImportLib.py"
The first line is 182
Source file "./satellite_tools/diskImportLib.py"
The first line is 170
class ServerPackageArchCompatContainer(xmlSource.ServerPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerArchContainer(xmlSource.ServerArchContainer):
    def endContainerCallback(self):
        importer = archImport.ServerArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerChannelArchCompatContainer(xmlSource.ServerChannelArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerChannelArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class CPUArchContainer(xmlSource.CPUArchContainer):
    def endContainerCallback(self):
        importer = archImport.CPUArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 144
Distance between two fragments = 4
Clone size = 11
Source file "./satellite_tools/diskImportLib.py"
The first line is 176
Source file "./satellite_tools/diskImportLib.py"
The first line is 158
class CPUArchContainer(xmlSource.CPUArchContainer):
    def endContainerCallback(self):
        importer = archImport.CPUArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ChannelArchContainer(xmlSource.ChannelArchContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerPackageArchCompatContainer(xmlSource.ServerPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class PackageArchContainer(xmlSource.PackageArchContainer):
    def endContainerCallback(self):
        importer = archImport.PackageArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 145
Distance between two fragments = 4
Clone size = 12
Source file "./satellite_tools/diskImportLib.py"
The first line is 189
Source file "./satellite_tools/diskImportLib.py"
The first line is 170
class ServerChannelArchCompatContainer(xmlSource.ServerChannelArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerChannelArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerArchContainer(xmlSource.ServerArchContainer):
    def endContainerCallback(self):
        importer = archImport.ServerArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ChannelPackageArchCompatContainer(xmlSource.ChannelPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class CPUArchContainer(xmlSource.CPUArchContainer):
    def endContainerCallback(self):
        importer = archImport.CPUArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 146
Distance between two fragments = 4
Clone size = 12
Source file "./satellite_tools/diskImportLib.py"
The first line is 182
Source file "./satellite_tools/diskImportLib.py"
The first line is 158
class ServerPackageArchCompatContainer(xmlSource.ServerPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ChannelArchContainer(xmlSource.ChannelArchContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerChannelArchCompatContainer(xmlSource.ServerChannelArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerChannelArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class PackageArchContainer(xmlSource.PackageArchContainer):
    def endContainerCallback(self):
        importer = archImport.PackageArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 147
Distance between two fragments = 4
Clone size = 12
Source file "./satellite_tools/diskImportLib.py"
The first line is 196
Source file "./satellite_tools/diskImportLib.py"
The first line is 170
class ChannelPackageArchCompatContainer(xmlSource.ChannelPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerArchContainer(xmlSource.ServerArchContainer):
    def endContainerCallback(self):
        importer = archImport.ServerArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerGroupServerArchCompatContainer(xmlSource.ServerGroupServerArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerGroupServerArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class CPUArchContainer(xmlSource.CPUArchContainer):
    def endContainerCallback(self):
        importer = archImport.CPUArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 148
Distance between two fragments = 4
Clone size = 12
Source file "./satellite_tools/diskImportLib.py"
The first line is 189
Source file "./satellite_tools/diskImportLib.py"
The first line is 158
class ServerChannelArchCompatContainer(xmlSource.ServerChannelArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerChannelArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ChannelArchContainer(xmlSource.ChannelArchContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ChannelPackageArchCompatContainer(xmlSource.ChannelPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class PackageArchContainer(xmlSource.PackageArchContainer):
    def endContainerCallback(self):
        importer = archImport.PackageArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 149
Distance between two fragments = 4
Clone size = 12
Source file "./satellite_tools/diskImportLib.py"
The first line is 196
Source file "./satellite_tools/diskImportLib.py"
The first line is 158
class ChannelPackageArchCompatContainer(xmlSource.ChannelPackageArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelPackageArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ChannelArchContainer(xmlSource.ChannelArchContainer):
    def endContainerCallback(self):
        importer = archImport.ChannelArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class ServerGroupServerArchCompatContainer(xmlSource.ServerGroupServerArchCompatContainer):
    def endContainerCallback(self):
        importer = archImport.ServerGroupServerArchCompatImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class PackageArchContainer(xmlSource.PackageArchContainer):
    def endContainerCallback(self):
        importer = archImport.PackageArchImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 150
Distance between two fragments = 3
Clone size = 10
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 644
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 346
while 1:
    buf = stream.read(buffer_size)
    if not buf:
        break
    try:
        self._raw_stream.write(buf)
    except IOError:
        log_error('Client appears to have closed connection')
        self.close_rpm()
        raise dumper.ClosedConnectionError
while 1:
    buff = stream.read(buffer_size)
    if not buff:
        break
    try:
        self._raw_stream.write(buff)
    except IOError:
        log_error('Client disconnected prematurely')
        self.close()
        raise dumper.ClosedConnectionError



Clone # 151
Distance between two fragments = 1
Clone size = 10
Source file "./server/test/test_solve_dependencies.py"
The first line is 367
Source file "./server/test/test_solve_dependencies.py"
The first line is 306
nlimitstr = 'mozilla-0-0:35' nlimitstr = '35:mozilla-0-0'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))
assert ret == 1 assert ret == 1



Clone # 152
Distance between two fragments = 4
Clone size = 10
Source file "./satellite_tools/satsync.py"
The first line is 1835
Source file "./satellite_tools/satsync.py"
The first line is 1391
errata_count = len(batch) kt_count = len(ktids)
log(1, (messages.errata_importing) % ((chn, (errata_count) or ('NONE RELEVANT')))) log(1, (messages.kickstart_parsing) % ((channel, (kt_count) or ('NONE RELEVANT'))))
if not errata_count:
    continue
if not kt_count:
    continue
pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=errata_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=kt_count, finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)



Clone # 153
Distance between two fragments = 4
Clone size = 10
Source file "./satellite_tools/satsync.py"
The first line is 1421
Source file "./satellite_tools/satsync.py"
The first line is 1835
files_count = len(files) errata_count = len(batch)
log(1, (messages.kickstart_downloading) % ((channel, (files_count) or ('NONE RELEVANT')))) log(1, (messages.errata_importing) % ((chn, (errata_count) or ('NONE RELEVANT'))))
if not files_count:
    continue
if not errata_count:
    continue
pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=files_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=errata_count, finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)



Clone # 154
Distance between two fragments = 3
Clone size = 10
Source file "./satellite_tools/satsync.py"
The first line is 1421
Source file "./satellite_tools/satsync.py"
The first line is 1391
files_count = len(files) kt_count = len(ktids)
log(1, (messages.kickstart_downloading) % ((channel, (files_count) or ('NONE RELEVANT')))) log(1, (messages.kickstart_parsing) % ((channel, (kt_count) or ('NONE RELEVANT'))))
if not files_count:
    continue
if not kt_count:
    continue
pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=files_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=kt_count, finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)



Clone # 155
Distance between two fragments = 4
Clone size = 10
Source file "./satellite_tools/satsync.py"
The first line is 1704
Source file "./satellite_tools/satsync.py"
The first line is 1282
log(1, (messages.package_importing) % ((channel, (package_count) or ('NONE RELEVANT')))) log(1, (messages.package_parsing) % ((channel, (package_count) or ('NONE RELEVANT'))))
if not package_count:
    continue
if not package_count:
    continue
log(1, messages.warning_slow) log(1, ' * WARNING: this may be a very slow process.')
pb = ProgressBar(prompt='Importing: ', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
if CFG.DEBUG > 2:
    pb.redrawYN = 0
if CFG.DEBUG > 2:
    pb.redrawYN = 0
pb.printAll(1) pb.printAll(1)



Clone # 156
Distance between two fragments = 0
Clone size = 10
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 556
Source file "./server/rhnSQL/sql_lib.py"
The first line is 96
if len(package) > 3:
    epoch = package[3]
    if epoch in ['(none)', 'None', None]:
        epoch = ''
    epoch = str(epoch)
else:
    epoch = ''
if len(package) > 3:
    epoch = package[3]
    if epoch in ['(none)', 'None', None]:
        epoch = ''
    epoch = str(epoch)
else:
    epoch = ''
name = __check_Int_String('name', name) name = __check_Int_String('name', name)
version = __check_Int_String('version', version) version = __check_Int_String('version', version)
release = __check_Int_String('release', release) release = __check_Int_String('release', release)
return [name, version, release, epoch] return [name, version, release, epoch]



Clone # 157
Distance between two fragments = 2
Clone size = 9
Source file "./satellite_tools/satsync.py"
The first line is 760
Source file "./satellite_tools/satsync.py"
The first line is 731
channel_object = self._channel_collection.get_channel(clabel, ctimestamp) channel_object = self._channel_collection.get_channel(plabel, timestamp)
assert channel_object is not None assert channel_object is not None
all_pkgs = (channel_object['all-packages']) or (channel_object['packages']) all_pkgs = (channel_object['all-packages']) or (channel_object['packages'])
pkgs_count = len(all_pkgs) pkgs_count = len(all_pkgs)
if clabel in ch_requested_imported:
    status = 'p'
else:
    status = '.'
if plabel in ch_requested_imported:
    status = 'p'
else:
    status = '.'
log(1, (p_format) % ((status, clabel, pkgs_count))) log(1, (p_format) % ((status, plabel, pkgs_count)))



Clone # 158
Distance between two fragments = 2
Clone size = 9
Source file "./server/rhnPackage.py"
The first line is 312
Source file "./server/rhnPackage.py"
The first line is 119
if pkg[3] == '':
    epochStatement = 'is NULL'
else:
    epochStatement = '= :epoch'
    param_dict['epoch'] = pkg[3]
if pkg[3] == '':
    epochStatement = 'is NULL'
else:
    epochStatement = '= :epoch'
    param_dict['epoch'] = pkg[3]
statement = ('\n select\n unique ps.path\n from\n rhnPackage p,\n rhnPackageSource ps,\n rhnPackageName pn,\n rhnPackageEVR pe,\n rhnPackageArch pa,\n rhnChannelPackage cp,\n rhnServerChannel sc\n where\n sc.server_id = :server_id\n and sc.channel_id = cp.channel_id\n and cp.package_id = p.id\n and p.source_rpm_id = ps.source_rpm_id\n and ((p.org_id is null and ps.org_id is null)\n or (p.org_id = ps.org_id))\n and p.name_id = pn.id\n and pn.name = :name\n and p.evr_id = pe.id\n and pe.version = :ver\n and pe.release = :rel\n and pe.epoch %s\n and p.package_arch_id = pa.id\n and pa.label = :arch\n ') % (epochStatement) statement = ('\n select\n p.id, p.path path, p.package_arch_id\n from\n rhnPackage p,\n rhnPackageName pn,\n rhnPackageEvr pe,\n rhnServerArch sa,\n rhnChannelPackage cp,\n rhnServerPackageArchCompat spac,\n rhnServerChannel sc\n where\n sc.server_id = :server_id\n and sc.channel_id = cp.channel_id\n and cp.package_id = p.id\n and p.name_id = pn.id\n and pn.name = :name\n and p.evr_id = pe.id\n and pe.version = :ver\n and pe.release = :rel\n and pe.epoch %s\n and p.package_arch_id = spac.package_arch_id\n and spac.server_arch_id = sa.id\n and sa.label = :server_arch\n order by spac.preference\n ') % (epochStatement)
h = rhnSQL.prepare(statement) h = rhnSQL.prepare(statement)
apply(h.execute, (), param_dict) apply(h.execute, (), param_dict)
rs = h.fetchone_dict() row = h.fetchone_dict()



Clone # 159
Distance between two fragments = 2
Clone size = 9
Source file "./test/runtests-postgresql.py"
The first line is 46
Source file "./test/runtests-oracle.py"
The first line is 45
def suite():
    return unittest.TestSuite((dbtests.postgresql_suite()))
def suite():
    return unittest.TestSuite((dbtests.oracle_suite()))
if __name__ == '__main__':
    try:
        import testoob
        testoob.main(defaultTest='suite')
    except ImportError:
        print 'These tests would run prettier if you installed testoob. :)'
        unittest.main(defaultTest='suite')
if __name__ == '__main__':
    try:
        import testoob
        testoob.main(defaultTest='suite')
    except ImportError:
        print 'These tests would run prettier if you install testoob. :)'
        unittest.main(defaultTest='suite')



Clone # 160
Distance between two fragments = 3
Clone size = 9
Source file "./test/runtests-postgresql.py"
The first line is 46
Source file "./test/runtests.py"
The first line is 39
def suite():
    return unittest.TestSuite((dbtests.postgresql_suite()))
def suite():
    return unittest.TestSuite((rhnsqltests.suite()))
if __name__ == '__main__':
    try:
        import testoob
        testoob.main(defaultTest='suite')
    except ImportError:
        print 'These tests would run prettier if you installed testoob. :)'
        unittest.main(defaultTest='suite')
if __name__ == '__main__':
    try:
        import testoob
        testoob.main(defaultTest='suite')
    except ImportError:
        print 'These tests would run prettier if you install testoob. :)'
        unittest.main(defaultTest='suite')



Clone # 161
Distance between two fragments = 2
Clone size = 9
Source file "./test/runtests-oracle.py"
The first line is 45
Source file "./test/runtests.py"
The first line is 39
def suite():
    return unittest.TestSuite((dbtests.oracle_suite()))
def suite():
    return unittest.TestSuite((rhnsqltests.suite()))
if __name__ == '__main__':
    try:
        import testoob
        testoob.main(defaultTest='suite')
    except ImportError:
        print 'These tests would run prettier if you install testoob. :)'
        unittest.main(defaultTest='suite')
if __name__ == '__main__':
    try:
        import testoob
        testoob.main(defaultTest='suite')
    except ImportError:
        print 'These tests would run prettier if you install testoob. :)'
        unittest.main(defaultTest='suite')



Clone # 162
Distance between two fragments = 2
Clone size = 9
Source file "./server/importlib/backend.py"
The first line is 1739
Source file "./server/importlib/backend.py"
The first line is 1759
if not hash:
    return None
if not hash:
    return None
tab = self.tables[tname] tab = self.tables[tname]
pks = tab.getPK() pks = tab.getPK()
k = pks[0] k = pks[0]
if not hash[k]:
    return None
if not hash[k]:
    return None
deleteObj = TableDelete(tab, self.dbmodule) updateObj = TableUpdate(tab, self.dbmodule)
deleteObj.query(hash) updateObj.query(hash)



Clone # 163
Distance between two fragments = 4
Clone size = 9
Source file "./server/importlib/backend.py"
The first line is 530
Source file "./server/importlib/backend.py"
The first line is 254
if not hash:
    return None
if not hash:
    return None
sql = 'select id from rhnChannelFamily where label = :label' sql = 'select id, channel_arch_id from rhnChannel where label = :label'
h = self.dbmodule.prepare(sql) h = self.dbmodule.prepare(sql)
for k in hash.keys():
    h.execute(label=k)
    row = h.fetchone_dict()
    if row:
        hash[k] = row['id']
for k in hash.keys():
    h.execute(label=k)
    row = h.fetchone_dict()
    if row:
        hash[k] = row



Clone # 164
Distance between two fragments = 3
Clone size = 9
Source file "./server/repomd/repository.py"
The first line is 213
Source file "./server/repomd/repository.py"
The first line is 209
def get_other_xml_file(self):
    xml_file = self.repository.get_other_xml_file()
    return self.__get_compressed_file(xml_file)
def get_primary_xml_file(self):
    xml_file = self.repository.get_primary_xml_file()
    return self.__get_compressed_file(xml_file)
def get_filelists_xml_file(self):
    xml_file = self.repository.get_filelists_xml_file()
    return self.__get_compressed_file(xml_file)
def get_other_xml_file(self):
    xml_file = self.repository.get_other_xml_file()
    return self.__get_compressed_file(xml_file)
def get_updateinfo_xml_file(self):
    xml_file = self.repository.get_updateinfo_xml_file()
    return self.__get_compressed_file(xml_file)
def get_filelists_xml_file(self):
    xml_file = self.repository.get_filelists_xml_file()
    return self.__get_compressed_file(xml_file)



Clone # 165
Distance between two fragments = 4
Clone size = 9
Source file "./satellite_tools/xmlDiskDumper.py"
The first line is 367
Source file "./satellite_tools/xmlDiskDumper.py"
The first line is 228
_loader_class = xmlSource.KickstartableTreesContainer _loader_class = xmlSource.IncompletePackageContainer
def setMixin(self):
    self._mixin = xmlDiskSource.KickstartDataDiskSource(self.mountPoint)
def setMixin(self):
    self._mixin = xmlDiskSource.ShortPackageDiskSource(self.mountPoint)
def setID(self, ks_label):
    return self._mixin.setID(ks_label)
def setID(self, id):
    return self._mixin.setID(id)
def _getMethod(self):
    return self.server.dump.kickstartable_trees
def _getMethod(self):
    return self.server.dump.packages_short
def _getArgs(self):
    return ([self._mixin.id])
def _getArgs(self):
    return ([self._mixin.id])



Clone # 166
Distance between two fragments = 2
Clone size = 9
Source file "./server/repomd/view.py"
The first line is 233
Source file "./server/repomd/view.py"
The first line is 197
def write_start(self):
    output = (((XML_ENCODING) + ('\n')) + (')) + (('packages="%d">') % (self.channel.num_packages))
    self.fileobj.write(output)
def write_start(self):
    output = (((XML_ENCODING) + ('\n')) + (')) + (('packages="%d">') % (self.channel.num_packages))
    self.fileobj.write(output)
def write_package(self, package):
    self.fileobj.write('\n'.join(self._get_package(package)))
def write_package(self, package):
    self.fileobj.write('\n'.join(self._get_package(package)))
def write_end(self):
    self.fileobj.write('')
def write_end(self):
    self.fileobj.write('')



Clone # 167
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 169
Source file "./server/action/virt.py"
The first line is 158
def shutdown(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_shutdown, action_id)
    except NoRowFoundException:
        raise InvalidAction('No shutdown actions found.')
    except NoUUIDException:
        raise InvalidAction(('Shutdown action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def start(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_start, action_id)
    except NoRowFoundException:
        raise InvalidAction('No start actions found.')
    except NoUUIDException:
        raise InvalidAction(('Start action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 168
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 180
Source file "./server/action/virt.py"
The first line is 169
def suspend(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_suspend, action_id)
    except NoRowFoundException:
        raise InvalidAction('No suspend actions found.')
    except NoUUIDException:
        raise InvalidAction(('Suspend action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def shutdown(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_shutdown, action_id)
    except NoRowFoundException:
        raise InvalidAction('No shutdown actions found.')
    except NoUUIDException:
        raise InvalidAction(('Shutdown action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 169
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 192
Source file "./server/action/virt.py"
The first line is 180
def resume(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_resume, action_id)
    except NoRowFoundException:
        raise InvalidAction('No resume actions found.')
    except NoUUIDException:
        raise InvalidAction(('Resume action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def suspend(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_suspend, action_id)
    except NoRowFoundException:
        raise InvalidAction('No suspend actions found.')
    except NoUUIDException:
        raise InvalidAction(('Suspend action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 170
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 203
Source file "./server/action/virt.py"
The first line is 192
def reboot(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_reboot, action_id)
    except NoRowFoundException:
        raise InvalidAction('No reboot actions found.')
    except NoUUIDException:
        raise InvalidAction(('Reboot action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def resume(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_resume, action_id)
    except NoRowFoundException:
        raise InvalidAction('No resume actions found.')
    except NoUUIDException:
        raise InvalidAction(('Resume action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 171
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 214
Source file "./server/action/virt.py"
The first line is 203
def destroy(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_destroy, action_id)
    except NoRowFoundException:
        raise InvalidAction('No destroy actions found.')
    except NoUUIDException:
        raise InvalidAction(('Destroy action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def reboot(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_reboot, action_id)
    except NoRowFoundException:
        raise InvalidAction('No reboot actions found.')
    except NoUUIDException:
        raise InvalidAction(('Reboot action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 172
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 180
Source file "./server/action/virt.py"
The first line is 158
def suspend(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_suspend, action_id)
    except NoRowFoundException:
        raise InvalidAction('No suspend actions found.')
    except NoUUIDException:
        raise InvalidAction(('Suspend action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def start(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_start, action_id)
    except NoRowFoundException:
        raise InvalidAction('No start actions found.')
    except NoUUIDException:
        raise InvalidAction(('Start action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 173
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 192
Source file "./server/action/virt.py"
The first line is 169
def resume(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_resume, action_id)
    except NoRowFoundException:
        raise InvalidAction('No resume actions found.')
    except NoUUIDException:
        raise InvalidAction(('Resume action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def shutdown(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_shutdown, action_id)
    except NoRowFoundException:
        raise InvalidAction('No shutdown actions found.')
    except NoUUIDException:
        raise InvalidAction(('Shutdown action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 174
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 203
Source file "./server/action/virt.py"
The first line is 180
def reboot(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_reboot, action_id)
    except NoRowFoundException:
        raise InvalidAction('No reboot actions found.')
    except NoUUIDException:
        raise InvalidAction(('Reboot action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def suspend(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_suspend, action_id)
    except NoRowFoundException:
        raise InvalidAction('No suspend actions found.')
    except NoUUIDException:
        raise InvalidAction(('Suspend action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 175
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 214
Source file "./server/action/virt.py"
The first line is 192
def destroy(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_destroy, action_id)
    except NoRowFoundException:
        raise InvalidAction('No destroy actions found.')
    except NoUUIDException:
        raise InvalidAction(('Destroy action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def resume(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_resume, action_id)
    except NoRowFoundException:
        raise InvalidAction('No resume actions found.')
    except NoUUIDException:
        raise InvalidAction(('Resume action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 176
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 192
Source file "./server/action/virt.py"
The first line is 158
def resume(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_resume, action_id)
    except NoRowFoundException:
        raise InvalidAction('No resume actions found.')
    except NoUUIDException:
        raise InvalidAction(('Resume action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def start(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_start, action_id)
    except NoRowFoundException:
        raise InvalidAction('No start actions found.')
    except NoUUIDException:
        raise InvalidAction(('Start action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 177
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 203
Source file "./server/action/virt.py"
The first line is 169
def reboot(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_reboot, action_id)
    except NoRowFoundException:
        raise InvalidAction('No reboot actions found.')
    except NoUUIDException:
        raise InvalidAction(('Reboot action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def shutdown(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_shutdown, action_id)
    except NoRowFoundException:
        raise InvalidAction('No shutdown actions found.')
    except NoUUIDException:
        raise InvalidAction(('Shutdown action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 178
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 214
Source file "./server/action/virt.py"
The first line is 180
def destroy(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_destroy, action_id)
    except NoRowFoundException:
        raise InvalidAction('No destroy actions found.')
    except NoUUIDException:
        raise InvalidAction(('Destroy action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def suspend(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_suspend, action_id)
    except NoRowFoundException:
        raise InvalidAction('No suspend actions found.')
    except NoUUIDException:
        raise InvalidAction(('Suspend action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 179
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 203
Source file "./server/action/virt.py"
The first line is 158
def reboot(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_reboot, action_id)
    except NoRowFoundException:
        raise InvalidAction('No reboot actions found.')
    except NoUUIDException:
        raise InvalidAction(('Reboot action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def start(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_start, action_id)
    except NoRowFoundException:
        raise InvalidAction('No start actions found.')
    except NoUUIDException:
        raise InvalidAction(('Start action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 180
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 214
Source file "./server/action/virt.py"
The first line is 169
def destroy(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_destroy, action_id)
    except NoRowFoundException:
        raise InvalidAction('No destroy actions found.')
    except NoUUIDException:
        raise InvalidAction(('Destroy action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def shutdown(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_shutdown, action_id)
    except NoRowFoundException:
        raise InvalidAction('No shutdown actions found.')
    except NoUUIDException:
        raise InvalidAction(('Shutdown action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 181
Distance between two fragments = 4
Clone size = 9
Source file "./server/action/virt.py"
The first line is 214
Source file "./server/action/virt.py"
The first line is 158
def destroy(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_destroy, action_id)
    except NoRowFoundException:
        raise InvalidAction('No destroy actions found.')
    except NoUUIDException:
        raise InvalidAction(('Destroy action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)
def start(server_id, action_id):
    log_debug(3)
    try:
        uuid = _get_uuid(_query_start, action_id)
    except NoRowFoundException:
        raise InvalidAction('No start actions found.')
    except NoUUIDException:
        raise InvalidAction(('Start action %s has no uuid associated with it.') % (str(action_id)))
    return (uuid)



Clone # 182
Distance between two fragments = 0
Clone size = 9
Source file "./spacewalk/common/rhn_mpm.py"
The first line is 41
Source file "./server/handlers/app/rhn_mpm.py"
The first line is 38
if (filename is None) and (file is None) and (fd is None):
    raise ValueError, 'No parameters passed'
if (filename is None) and (file is None) and (fd is None):
    raise ValueError, 'No parameters passed'
if filename is not None:
    f = open(filename)
elif file is not None:
    f = file
else:
    f = os.fdopen(os.dup(fd), 'r')
if filename is not None:
    f = open(filename)
elif file is not None:
    f = file
else:
    f = os.fdopen(os.dup(fd), 'r')
f.seek(0, 0) f.seek(0, 0)
p = MPM_Package() p = MPM_Package()



Clone # 183
Distance between two fragments = 1
Clone size = 9
Source file "./server/rhnDependency.py"
The first line is 720
Source file "./server/rhnDependency.py"
The first line is 635
if len(dict) > 1:
    matches = dict.keys()
    compats = filter(lambda a: a[:7] == 'compat-', matches)
    if (len(compats) > 0) and (len(compats) < len(matches)):
        for p in compats:
            dict[p]
if len(dict) > 1:
    matches = dict.keys()
    compats = filter(lambda a: a[:7] == 'compat-', matches)
    if (len(compats) > 0) and (len(compats) < len(matches)):
        for p in compats:
            dict[p]
l = dict.values() list_of_tuples = dict.values()
l.sort(lambda a, b: cmp(a[1], b[1])) list_of_tuples.sort(lambda a, b: cmp(a[1], b[1]))
packages[dep] = map(lambda x: x[0], l) packages[dep] = map(lambda x: x[0], list_of_tuples)



Clone # 184
Distance between two fragments = 0
Clone size = 9
Source file "./common/rhnTB.py"
The first line is 54
Source file "./server/handlers/config/test/test_template1.py"
The first line is 38
stack = [] stack = []
while 1:
    if not tb.tb_next:
        break
    tb = tb.tb_next
while 1:
    if not tb.tb_next:
        break
    tb = tb.tb_next
f = tb.tb_frame f = tb.tb_frame
while f:
    stack.append(f)
    f = f.f_back
while f:
    stack.append(f)
    f = f.f_back



Clone # 185
Distance between two fragments = 2
Clone size = 9
Source file "./satellite_tools/sync_handlers.py"
The first line is 339
Source file "./satellite_tools/sync_handlers.py"
The first line is 224
_shared_state = {} _shared_state = {}
def __init__(self):
    self.__dict__ = self._shared_state
    if not self._shared_state.keys():
        self._errata_hash = {}
        self._cache = None
        self._init_cache()
def __init__(self):
    self.__dict__ = self._shared_state
    if not self._shared_state.keys():
        self._packages_hash = {}
        self._cache = None
        self._init_cache()
def _init_cache(self):
    self._cache = syncCache.ErratumCache()
def _init_cache(self):
    self._cache = syncCache.ShortPackageCache()



Clone # 186
Distance between two fragments = 3
Clone size = 9
Source file "./server/handlers/app/test/test_channel.py"
The first line is 256
Source file "./server/handlers/app/test/test_channel.py"
The first line is 211
ret = channel.revokeChannelPermission(options['label'], 'subscribe', commit, username, password) ret2 = channel.channelManagePermission(options['label'], 'subscribe', commit, username, password)
h = rhnSQL.prepare('select id from rhnchannel where label = :label') h = rhnSQL.prepare('select id from rhnchannel where label = :label')
h.execute(label=options['label']) h.execute(label=options['label'])
ret = (h.fetchone_dict()) or ([]) ret = (h.fetchone_dict()) or ([])
h2 = rhnSQL.prepare('\n select cpr.label\n from rhnchannelpermission cp,\n rhnchannelpermissionrole cpr\n where cpr.id = cp.role_id\n and cp.channel_id = :cid\n ') h2 = rhnSQL.prepare('\n select cpr.label\n from rhnchannelpermission cp,\n rhnchannelpermissionrole cpr\n where cp.channel_id = :cid\n and cpr.id = cp.role_id\n ')
h2.execute(cid=ret['id']) h2.execute(cid=ret['id'])
ret2 = (h2.fetchone_dict()) or ([]) ret2 = (h2.fetchone_dict()) or ([])



Clone # 187
Distance between two fragments = 3
Clone size = 9
Source file "./server/handlers/app/test/test_channel.py"
The first line is 233
Source file "./server/handlers/app/test/test_channel.py"
The first line is 211
ret = channel.revokeChannelPermission(options['label'], 'manage', commit, username, password) ret2 = channel.channelManagePermission(options['label'], 'subscribe', commit, username, password)
h = rhnSQL.prepare('select id from rhnchannel where label = :label') h = rhnSQL.prepare('select id from rhnchannel where label = :label')
h.execute(label=options['label']) h.execute(label=options['label'])
ret = (h.fetchone_dict()) or ([]) ret = (h.fetchone_dict()) or ([])
h2 = rhnSQL.prepare('\n select cpr.label\n from rhnchannelpermission cp,\n rhnchannelpermissionrole cpr\n where cp.channel_id = :cid\n and cpr.id = cp.role_id\n ') h2 = rhnSQL.prepare('\n select cpr.label\n from rhnchannelpermission cp,\n rhnchannelpermissionrole cpr\n where cp.channel_id = :cid\n and cpr.id = cp.role_id\n ')
h2.execute(cid=ret['id']) h2.execute(cid=ret['id'])
ret2 = (h2.fetchone_dict()) or ([]) ret2 = (h2.fetchone_dict()) or ([])



Clone # 188
Distance between two fragments = 4
Clone size = 15
Source file "./satellite_tools/test/test-dump-arches.py"
The first line is 25
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 178
e = exportLib.SatelliteDumper(writer, exportLib.ChannelArchesDumper(writer, rpm_arch_type_only=r), exportLib.PackageArchesDumper(writer, rpm_arch_type_only=r), exportLib.ServerArchesDumper(writer, rpm_arch_type_only=r), exportLib.CPUArchesDumper(writer), exportLib.ServerPackageArchCompatDumper(writer, rpm_arch_type_only=r), exportLib.ServerChannelArchCompatDumper(writer, rpm_arch_type_only=r), exportLib.ChannelPackageArchCompatDumper(writer, rpm_arch_type_only=r)) dumper = SatelliteDumper(writer, exportLib.ChannelArchesDumper(writer, rpm_arch_type_only=rpm_arch_type_only), exportLib.PackageArchesDumper(writer, rpm_arch_type_only=rpm_arch_type_only), exportLib.ServerArchesDumper(writer, rpm_arch_type_only=rpm_arch_type_only), exportLib.CPUArchesDumper(writer), exportLib.ServerPackageArchCompatDumper(writer, rpm_arch_type_only=rpm_arch_type_only), exportLib.ServerChannelArchCompatDumper(writer, rpm_arch_type_only=rpm_arch_type_only), exportLib.ChannelPackageArchCompatDumper(writer, rpm_arch_type_only=rpm_arch_type_only))
e.dump() dumper.dump()



Clone # 189
Distance between two fragments = 0
Clone size = 9
Source file "./server/rhnSQL/sql_row.py"
The first line is 113
Source file "./server/rhnSQL/sql_row.py"
The first line is 99
ret = h.fetchone_dict() ret = h.fetchone_dict()
self.data = {} self.data = {}
if not ret:
    self.real = 0
    return 0
if not ret:
    self.real = 0
    return 0
for k in ret.keys():
    self.data[k] = (ret[k], 0)
for k in ret.keys():
    self.data[k] = (ret[k], 0)
self.real = 1 self.real = 1
return 1 return 1



Clone # 190
Distance between two fragments = 4
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 149
Source file "./server/test/test_solve_dependencies.py"
The first line is 138
def testAllReturn2(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.7.1', '1.1.el3.dag', '37', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0
def testAllReturn1(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.3.1', '0.dag.rhel3', '34', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0



Clone # 191
Distance between two fragments = 4
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 160
Source file "./server/test/test_solve_dependencies.py"
The first line is 149
def testAllReturn3(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.5', '2.rhfc1.dag', '38', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0
def testAllReturn2(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.7.1', '1.1.el3.dag', '37', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0



Clone # 192
Distance between two fragments = 3
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 171
Source file "./server/test/test_solve_dependencies.py"
The first line is 160
def testAllReturn4(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.6', '0.rhfc1.dag', '38', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0
def testAllReturn3(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.5', '2.rhfc1.dag', '38', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0



Clone # 193
Distance between two fragments = 4
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 160
Source file "./server/test/test_solve_dependencies.py"
The first line is 138
def testAllReturn3(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.5', '2.rhfc1.dag', '38', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0
def testAllReturn1(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.3.1', '0.dag.rhel3', '34', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0



Clone # 194
Distance between two fragments = 4
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 171
Source file "./server/test/test_solve_dependencies.py"
The first line is 149
def testAllReturn4(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.6', '0.rhfc1.dag', '38', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0
def testAllReturn2(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.7.1', '1.1.el3.dag', '37', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0



Clone # 195
Distance between two fragments = 4
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 171
Source file "./server/test/test_solve_dependencies.py"
The first line is 138
def testAllReturn4(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.6', '0.rhfc1.dag', '38', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0
def testAllReturn1(self):
    pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, all=1)
    exp_ret = ['mozilla', '1.3.1', '0.dag.rhel3', '34', 'i386']
    if exp_ret in pack[self.filename]:
        assert 1
    else:
        assert 0



Clone # 196
Distance between two fragments = 0
Clone size = 9
Source file "./server/handlers/app/channel.py"
The first line is 57
Source file "./server/handlers/app/comps.py"
The first line is 31
def _auth(self, username, password):
    if not (username) and (password):
        raise rhnFault(50, 'Missing username/password arguments', explain=0)
    authobj = auth(username, password)
    if not authobj:
        raise rhnFault(50, 'Invalid username/password arguments', explain=0)
    return authobj
def _auth(self, username, password):
    if not (username) and (password):
        raise rhnFault(50, 'Missing username/password arguments', explain=0)
    authobj = auth(username, password)
    if not authobj:
        raise rhnFault(50, 'Invalid username/password arguments', explain=0)
    return authobj



Clone # 197
Distance between two fragments = 1
Clone size = 9
Source file "./server/handlers/xmlrpc/registration.py"
The first line is 443
Source file "./server/handlers/xmlrpc/registration.py"
The first line is 403
try:
    newserv.save(1, channel)
except (rhnChannel.SubscriptionCountExceeded, rhnChannel.NoBaseChannelError), channel_error:
    raise rhnFault(70)
except rhnChannel.BaseChannelDeniedError, channel_error:
    raise rhnFault(71)
except server_lib.rhnSystemEntitlementException, e:
    raise rhnFault(90)
try:
    newserv.save(0, channel)
except (rhnChannel.SubscriptionCountExceeded, rhnChannel.NoBaseChannelError), channel_error:
    raise rhnFault(70)
except rhnChannel.BaseChannelDeniedError, channel_error:
    raise rhnFault(71)
except server_lib.rhnSystemEntitlementException, e:
    raise rhnFault(90)



Clone # 198
Distance between two fragments = 1
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 254
Source file "./server/test/test_solve_dependencies.py"
The first line is 266
nlimitstr = '38:mozilla-1.5-2.rhfc1.dag' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='<', limit=nlimitstr) pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='<=', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 199
Distance between two fragments = 1
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 254
Source file "./server/test/test_solve_dependencies.py"
The first line is 242
nlimitstr = '38:mozilla-1.5-2.rhfc1.dag' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='<', limit=nlimitstr) pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='>=', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 200
Distance between two fragments = 1
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 403
Source file "./server/test/test_solve_dependencies.py"
The first line is 391
nlimitstr = 'mozilla-1-1:35' nlimitstr = 'mozilla-1-1:35'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 201
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 403
Source file "./server/test/test_solve_dependencies.py"
The first line is 367
nlimitstr = 'mozilla-1-1:35' nlimitstr = 'mozilla-0-0:35'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 202
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 403
Source file "./server/test/test_solve_dependencies.py"
The first line is 354
nlimitstr = 'mozilla-1-1:35' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 203
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 403
Source file "./server/test/test_solve_dependencies.py"
The first line is 306
nlimitstr = 'mozilla-1-1:35' nlimitstr = '35:mozilla-0-0'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 204
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 403
Source file "./server/test/test_solve_dependencies.py"
The first line is 293
nlimitstr = 'mozilla-1-1:35' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 205
Distance between two fragments = 1
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 379
Source file "./server/test/test_solve_dependencies.py"
The first line is 391
nlimitstr = 'mozilla-1-1:35' nlimitstr = 'mozilla-1-1:35'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 206
Distance between two fragments = 1
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 379
Source file "./server/test/test_solve_dependencies.py"
The first line is 367
nlimitstr = 'mozilla-1-1:35' nlimitstr = 'mozilla-0-0:35'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 207
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 379
Source file "./server/test/test_solve_dependencies.py"
The first line is 354
nlimitstr = 'mozilla-1-1:35' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 208
Distance between two fragments = 1
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 379
Source file "./server/test/test_solve_dependencies.py"
The first line is 306
nlimitstr = 'mozilla-1-1:35' nlimitstr = '35:mozilla-0-0'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 209
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 379
Source file "./server/test/test_solve_dependencies.py"
The first line is 293
nlimitstr = 'mozilla-1-1:35' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 210
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 342
Source file "./server/test/test_solve_dependencies.py"
The first line is 367
nlimitstr = '35:mozilla-1-1' nlimitstr = 'mozilla-0-0:35'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 211
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 342
Source file "./server/test/test_solve_dependencies.py"
The first line is 354
nlimitstr = '35:mozilla-1-1' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 212
Distance between two fragments = 1
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 342
Source file "./server/test/test_solve_dependencies.py"
The first line is 330
nlimitstr = '35:mozilla-1-1' nlimitstr = '35:mozilla-1-1'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 213
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 342
Source file "./server/test/test_solve_dependencies.py"
The first line is 306
nlimitstr = '35:mozilla-1-1' nlimitstr = '35:mozilla-0-0'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 214
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 342
Source file "./server/test/test_solve_dependencies.py"
The first line is 293
nlimitstr = '35:mozilla-1-1' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 215
Distance between two fragments = 1
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 318
Source file "./server/test/test_solve_dependencies.py"
The first line is 367
nlimitstr = '35:mozilla-1-1' nlimitstr = 'mozilla-0-0:35'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 216
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 318
Source file "./server/test/test_solve_dependencies.py"
The first line is 354
nlimitstr = '35:mozilla-1-1' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 217
Distance between two fragments = 1
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 318
Source file "./server/test/test_solve_dependencies.py"
The first line is 330
nlimitstr = '35:mozilla-1-1' nlimitstr = '35:mozilla-1-1'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='<', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 218
Distance between two fragments = 1
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 318
Source file "./server/test/test_solve_dependencies.py"
The first line is 306
nlimitstr = '35:mozilla-1-1' nlimitstr = '35:mozilla-0-0'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 219
Distance between two fragments = 2
Clone size = 9
Source file "./server/test/test_solve_dependencies.py"
The first line is 318
Source file "./server/test/test_solve_dependencies.py"
The first line is 293
nlimitstr = '35:mozilla-1-1' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.up2date.solveDependencies_with_limits(self.myserver.getSystemId(), [self.filename], 2, limit_operator='==', limit=nlimitstr)
ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release'])) ret = rpm.labelCompare((pack[self.filename][0][3], pack[self.filename][0][1], pack[self.filename][0][2]), (nlimit['epoch'], nlimit['version'], nlimit['release']))



Clone # 220
Distance between two fragments = 0
Clone size = 9
Source file "./test/non-unit/server/rhnSQL/dbtests.py"
The first line is 124
Source file "./test/non-unit/server/rhnSQL/dbtests.py"
The first line is 92
query = rhnSQL.prepare(('SELECT * FROM %s WHERE id >= 1000 ORDER BY ID') % (self.temp_table)) query = rhnSQL.prepare(('SELECT * FROM %s WHERE id >= 1000 ORDER BY ID') % (self.temp_table))
query.execute() query.execute()
rows = query.fetchall() rows = query.fetchall()
self.assertEquals(2, len(rows)) self.assertEquals(2, len(rows))
self.assertEquals(1000, rows[0][0]) self.assertEquals(1000, rows[0][0])
self.assertEquals(1001, rows[1][0]) self.assertEquals(1001, rows[1][0])
self.assertEquals('Somebody', rows[0][1]) self.assertEquals('Somebody', rows[0][1])
self.assertEquals('Else', rows[1][1]) self.assertEquals('Else', rows[1][1])



Clone # 221
Distance between two fragments = 2
Clone size = 9
Source file "./server/action_extra_data/kickstart_guest.py"
The first line is 58
Source file "./server/action_extra_data/kickstart_guest.py"
The first line is 23
action_status = rhnFlags.get('action_status') action_status = rhnFlags.get('action_status')
if action_status == 3:
    ks_state = 'failed'
    next_action_type = None
else:
    ks_state = 'in_progress'
    next_action_type = 'kickstart_guest.add_tools_channel'
if action_status == 3:
    ks_state = 'failed'
    next_action_type = None
else:
    ks_state = 'complete'
    next_action_type = None
server_kickstart.update_kickstart_session(server_id, action_id, action_status, kickstart_state=ks_state, next_action_type=next_action_type) server_kickstart.update_kickstart_session(server_id, action_id, action_status, kickstart_state=ks_state, next_action_type=next_action_type)



Clone # 222
Distance between two fragments = 1
Clone size = 9
Source file "./server/action_extra_data/kickstart_guest.py"
The first line is 41
Source file "./server/action_extra_data/kickstart_guest.py"
The first line is 23
action_status = rhnFlags.get('action_status') action_status = rhnFlags.get('action_status')
if action_status == 3:
    ks_state = 'failed'
    next_action_type = None
else:
    ks_state = 'complete'
    next_action_type = 'kickstart_guest.schedule_virt_guest_pkg_install'
if action_status == 3:
    ks_state = 'failed'
    next_action_type = None
else:
    ks_state = 'complete'
    next_action_type = None
server_kickstart.update_kickstart_session(server_id, action_id, action_status, kickstart_state=ks_state, next_action_type=next_action_type) server_kickstart.update_kickstart_session(server_id, action_id, action_status, kickstart_state=ks_state, next_action_type=next_action_type)



Clone # 223
Distance between two fragments = 4
Clone size = 9
Source file "./server/rhnServer/server_kickstart.py"
The first line is 155
Source file "./server/rhnServer/server_kickstart.py"
The first line is 134
_query_lookup_kickstart_label = rhnSQL.Statement('\n select k.label\n from rhnKickstartSession ks, rhnKSData k\n where (\n (ks.old_server_id = :server_id and ks.new_server_id is NULL) \n or ks.new_server_id = :server_id\n or ks.host_server_id = :server_id\n )\n and ks.action_id = :action_id\n and k.id = ks.kickstart_id\n') _query_lookup_kickstart_session_id = rhnSQL.Statement('\n select ks.id\n from rhnKickstartSession ks\n where (\n (ks.old_server_id = :server_id and ks.new_server_id is NULL) \n or ks.new_server_id = :server_id\n or ks.host_server_id = :server_id\n )\n and ks.action_id = :action_id\n')
def get_kickstart_label(server_id, action_id):
    h = rhnSQL.prepare(_query_lookup_kickstart_label)
    h.execute(server_id=server_id, action_id=action_id)
    row = h.fetchone_dict()
    if not row:
        return None
    return row['label']
def get_kickstart_session_id(server_id, action_id):
    h = rhnSQL.prepare(_query_lookup_kickstart_session_id)
    h.execute(server_id=server_id, action_id=action_id)
    row = h.fetchone_dict()
    if not row:
        return None
    return row['id']



Clone # 224
Distance between two fragments = 0
Clone size = 9
Source file "./server/test/unit-test/test_rhnServerGroup.py"
The first line is 35
Source file "./server/test/unit-test/test_misc_functions.py"
The first line is 37
def tearDown(self):
    rhnSQL.rollback()
def tearDown(self):
    rhnSQL.rollback()
def test_new_org_1(self):
    org_id = misc_functions.create_new_org()
    h = rhnSQL.prepare('select id from web_customer where id = :id')
    h.execute(id=org_id)
    row = h.fetchone_dict()
    self.assertNotEqual(row, None)
    self.assertEqual(row['id'], org_id)
def test_new_org_1(self):
    org_id = misc_functions.create_new_org()
    h = rhnSQL.prepare('select id from web_customer where id = :id')
    h.execute(id=org_id)
    row = h.fetchone_dict()
    self.assertNotEqual(row, None)
    self.assertEqual(row['id'], org_id)



Clone # 225
Distance between two fragments = 3
Clone size = 8
Source file "./server/test/unit-test/test_server_registration.py"
The first line is 192
Source file "./server/test/unit-test/test_server_registration.py"
The first line is 115
params = build_new_system_params_with_token(token=token, os_release='2.1AS') params = build_new_system_params_with_token(token=token, os_release='2.1AS')
system_id = register_new_system(params) system_id = register_new_system(params)
rhnSQL.commit() rhnSQL.commit()
s = rhnServer.get(system_id) s = rhnServer.get(system_id)
self.assertNotEqual(s, None) self.assertNotEqual(s, None)
server_id = s.getid() server_id = s.getid()
sgs = misc_functions.fetch_server_groups(server_id) channels = rhnChannel.channels_for_server(server_id)



Clone # 226
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_tools/test/testnew.py"
The first line is 20
Source file "./satellite_tools/test/test-raw-download.py"
The first line is 20
data = xmlrpclib.dumps((systemid), methodname='dump.channel_families') buffer = xmlrpclib.dumps((systemid), methodname='dump.channel_families')
h = httplib.HTTP('roadrunner.devel.redhat.com') h = httplib.HTTP(server)
h.putrequest('POST', '/SAT-DUMP') h.putrequest('POST', '/SAT-DUMP')
h.putheader('Content-Type', 'text/xml') h.putheader('X-RHN-Satellite-XML-Dump-Version', '2.0')
h.putheader('Content-Length', str(len(data))) h.putheader('Content-Length', str(len(buffer)))
h.endheaders() h.endheaders()
h.send(data) h.send(buffer)
errcode, errmsg, headers = h.getreply() errcode, errmsg, headers = h.getreply()



Clone # 227
Distance between two fragments = 3
Clone size = 8
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 350
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 326
self.set_qos = 1 self.set_qos = 1
server = self.auth_system(system_id) server = self.auth_system(system_id)
log_debug(1, self.server_id, str(filename)[:100]) log_debug(1, self.server_id, str(package)[:100])
filePath = rhnPackage.get_source_package_path_by_name(self.server_id, filename) filePath = rhnPackage.get_source_package_path_by_nvre(self.server_id, package)
transport = rhnFlags.get('outputTransportOptions') transport = rhnFlags.get('outputTransportOptions')
transport['X-RHN-Action'] = 'source_package_by_name' transport['X-RHN-Action'] = 'source_package'
return rpclib.File(open(filePath, 'r'), name=filePath) return rpclib.File(open(filePath, 'r'), name=filePath)



Clone # 228
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 782
Source file "./satellite_tools/exporter/exportLib.py"
The first line is 239
h = rhnSQL.prepare(self._query_channel_families) h = rhnSQL.prepare(self._query_channel_families)
h.execute(channel_id=channel_id) h.execute(channel_id=channel_id)
arr.append(exportLib.ChannelFamiliesDumper(self._writer, data_iterator=h, ignore_subelements=1)) arr.append(ChannelFamiliesDumper(self._writer, data_iterator=h, ignore_subelements=1))
h = rhnSQL.prepare(self._query_dist_channel_map) h = rhnSQL.prepare(self._query_dist_channel_map)
h.execute(channel_id=channel_id) h.execute(channel_id=channel_id)
arr.append(exportLib.DistsDumper(self._writer, h)) arr.append(DistsDumper(self._writer, h))
h = self._get_cursor_source_packages() h = self._get_cursor_source_packages()



Clone # 229
Distance between two fragments = 2
Clone size = 8
Source file "./server/importlib/headerSource.py"
The first line is 87
Source file "./server/importlib/debPackage.py"
The first line is 88
vendor = self['vendor'] vendor = self['vendor']
if vendor is None:
    self['vendor'] = 'Red Hat, Inc.'
if vendor is None:
    self['vendor'] = 'Debian'
payloadFormat = self['payload_format'] payloadFormat = self['payload_format']
if payloadFormat is None:
    self['payload_format'] = 'cpio'
if payloadFormat is None:
    self['payload_format'] = 'ar'
if self['payload_size'] is None:
    self['payload_size'] = 0
if self['payload_size'] is None:
    self['payload_size'] = 0



Clone # 230
Distance between two fragments = 1
Clone size = 8
Source file "./satellite_tools/rhn_ssl_dbstore.py"
The first line is 63
Source file "./satellite_tools/rhn_satellite_activate.py"
The first line is 580
db_backend = CFG.DB_BACKEND db_backend = CFG.DB_BACKEND
db_host = CFG.DB_HOST db_host = CFG.DB_HOST
db_port = CFG.DB_PORT db_port = CFG.DB_PORT
db_user = CFG.DB_user db_user = CFG.DB_user
db_password = CFG.DB_PASSWORD db_password = CFG.DB_PASSWORD
db_name = CFG.DB_NAME database = CFG.DB_NAME
rhnSQL.initDB(backend=db_backend, host=db_host, port=db_port, username=db_user, password=db_password, database=db_name) rhnSQL.initDB(backend=db_backend, host=db_host, port=db_port, username=db_user, password=db_password, database=database)



Clone # 231
Distance between two fragments = 3
Clone size = 8
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 422
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 386
writer = self._get_xml_writer() writer = self._get_xml_writer()
d = dumper.SatelliteDumper(writer, dumper.ErrataDumper(writer, errata_hash.values())) d = dumper.SatelliteDumper(writer, dump_class(writer, packages_hash.values()))
d.dump() d.dump()
writer.flush() writer.flush()
log_debug(4, 'OK') log_debug(4, 'OK')
self.close() self.close()
return 0 return 0



Clone # 232
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/satsync.py"
The first line is 1848
Source file "./satellite_tools/satsync.py"
The first line is 1676
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    sync_handlers.import_errata(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 233
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/satsync.py"
The first line is 1848
Source file "./satellite_tools/satsync.py"
The first line is 1295
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    sync_handlers.import_errata(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 234
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/satsync.py"
The first line is 1848
Source file "./satellite_tools/satsync.py"
The first line is 1119
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    sync_handlers.import_errata(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 235
Distance between two fragments = 4
Clone size = 8
Source file "./server/action/virt.py"
The first line is 262
Source file "./server/action/virt.py"
The first line is 226
log_debug(3) log_debug(3)
prepared_query = rhnSQL.prepare(_query_schedulePoller) prepared_query = rhnSQL.prepare(_query_setMemory)
prepared_query.execute(action_id=action_id) prepared_query.execute(action_id=action_id)
row = prepared_query.fetchone_dict() row = prepared_query.fetchone_dict()
if not row:
    raise InvalidAction('No schedulePoller actions found.')
if not row:
    raise InvalidAction('No setMemory actions found.')
if not row.has_key('minute'):
    raise InvalidAction(('schedulePoller action %s has no minute associated with it.') % (str(action_id)))
if not row.has_key('uuid'):
    raise InvalidAction(('Set Memory action %s has no uuid.') % (str(action_id)))



Clone # 236
Distance between two fragments = 3
Clone size = 9
Source file "./server/rhnDependency.py"
The first line is 587
Source file "./server/rhnDependency.py"
The first line is 427
nvre = ['name', 'version', 'release', 'epoch', 'arch'] nvre = ['name', 'version', 'release', 'epoch', 'arch']
deplist = [] deplist = []
for dep in deps:
    if dep not in deplist:
        deplist.append(dep)
for dep in deps:
    if dep not in deplist:
        deplist.append(dep)
statement = ('%s UNION ALL %s UNION ALL %s') % ((__packages_sql, __provides_sql, __files_sql)) statement = ('%s UNION ALL %s UNION ALL %s') % ((__packages_all_sql, __provides_all_sql, __files_all_sql))
h = rhnSQL.prepare(statement) h = rhnSQL.prepare(statement)
packages = {} packages = {}



Clone # 237
Distance between two fragments = 2
Clone size = 8
Source file "./server/rhnRepository.py"
The first line is 136
Source file "./server/rhnRepository.py"
The first line is 81
def listAllPackages(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    packages = rhnChannel.list_all_packages(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return packages
def listPackages(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    packages = rhnChannel.list_packages(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return packages



Clone # 238
Distance between two fragments = 3
Clone size = 8
Source file "./server/rhnRepository.py"
The first line is 155
Source file "./server/rhnRepository.py"
The first line is 101
def listAllPackagesComplete(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    packages = rhnChannel.list_all_packages_complete(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return packages
def getObsoletes(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    obsoletes = rhnChannel.list_obsoletes(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return obsoletes



Clone # 239
Distance between two fragments = 2
Clone size = 8
Source file "./server/rhnRepository.py"
The first line is 155
Source file "./server/rhnRepository.py"
The first line is 136
def listAllPackagesComplete(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    packages = rhnChannel.list_all_packages_complete(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return packages
def listAllPackages(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    packages = rhnChannel.list_all_packages(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return packages



Clone # 240
Distance between two fragments = 2
Clone size = 8
Source file "./server/rhnRepository.py"
The first line is 155
Source file "./server/rhnRepository.py"
The first line is 81
def listAllPackagesComplete(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    packages = rhnChannel.list_all_packages_complete(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return packages
def listPackages(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    packages = rhnChannel.list_packages(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return packages



Clone # 241
Distance between two fragments = 3
Clone size = 8
Source file "./server/rhnRepository.py"
The first line is 101
Source file "./server/rhnRepository.py"
The first line is 136
def getObsoletes(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    obsoletes = rhnChannel.list_obsoletes(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return obsoletes
def listAllPackages(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    packages = rhnChannel.list_all_packages(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return packages



Clone # 242
Distance between two fragments = 3
Clone size = 8
Source file "./server/rhnRepository.py"
The first line is 101
Source file "./server/rhnRepository.py"
The first line is 81
def getObsoletes(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    obsoletes = rhnChannel.list_obsoletes(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return obsoletes
def listPackages(self, version):
    log_debug(3, self.channelName, version)
    self.__check_channel(version)
    packages = rhnChannel.list_packages(self.channelName)
    transportOptions = rhnFlags.get('outputTransportOptions')
    transportOptions['Last-Modified'] = rfc822time(timestamp(version))
    rhnFlags.set('compress_response', 1)
    return packages



Clone # 243
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 80
Source file "./test/johntest.py"
The first line is 71
def package(self, package):
    if package is None:
        return None
    if self._package is None:
        s = self._connect()
        sysid = self._get_sysid()
        self._package = s.up2date.package(sysid, package)
    return self._package
def header(self, pkglist):
    if pkglist is None:
        return None
    if self._header_data is None:
        s = self._connect()
        sysid = self._get_sysid()
        self._package_data = s.up2date.header(sysid, pkglist)
    return self._header_data



Clone # 244
Distance between two fragments = 0
Clone size = 8
Source file "./spacewalk/common/rhn_mpm.py"
The first line is 156
Source file "./server/handlers/app/rhn_mpm.py"
The first line is 132
self.__init__() self.__init__()
arr = self._read_lead(input_stream) arr = self._read_lead(input_stream)
magic = arr[0] magic = arr[0]
if magic != self._magic:
    raise InvalidPackageError()
if magic != self._magic:
    raise InvalidPackageError()
header_len, payload_len = (int(arr[5]), int(arr[6])) header_len, payload_len = (int(arr[5]), int(arr[6]))
header_flags, payload_flags = (arr[3], arr[4]) header_flags, payload_flags = (arr[3], arr[4])
file_size = ((128) + (header_len)) + (payload_len) file_size = ((128) + (header_len)) + (payload_len)



Clone # 245
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 247
Source file "./test/johntest.py"
The first line is 242
def get_signature(self):
    if self.login_dict.has_key(self._sig_key):
        return self.login_dict[self._sig_key]
    return None
def get_user_id(self):
    if self.login_dict.has_key(self._user_key):
        return self.login_dict[self._user_key]
    return None
def get_server_time(self):
    if self.login_dict.has_key(self._time_key):
        return self.login_dict[self._time_key]
    return None
def get_signature(self):
    if self.login_dict.has_key(self._sig_key):
        return self.login_dict[self._sig_key]
    return None



Clone # 246
Distance between two fragments = 4
Clone size = 8
Source file "./server/action/utils.py"
The first line is 204
Source file "./server/action/utils.py"
The first line is 196
def get_evr_id(self):
    if not self.evr_id:
        self._get_package_field_ids()
    return self.evr_id
def get_name_id(self):
    if not self.name_id:
        self._get_package_field_ids()
    return self.name_id
def get_arch_id(self):
    if not self.arch_id:
        self._get_package_field_ids()
    return self.arch_id
def get_evr_id(self):
    if not self.evr_id:
        self._get_package_field_ids()
    return self.evr_id



Clone # 247
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 252
Source file "./test/johntest.py"
The first line is 242
def get_server_time(self):
    if self.login_dict.has_key(self._time_key):
        return self.login_dict[self._time_key]
    return None
def get_user_id(self):
    if self.login_dict.has_key(self._user_key):
        return self.login_dict[self._user_key]
    return None
def get_expire_offset(self):
    if self.login_dict.has_key(self._expire_key):
        return self.login_dict[self._expire_key]
    return None
def get_signature(self):
    if self.login_dict.has_key(self._sig_key):
        return self.login_dict[self._sig_key]
    return None



Clone # 248
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 112
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 97
def get_packages_statement(self):
    query = ("\n select p.id package_id, \n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannelPackage cp, rhnPackage p, \n rhnChannelFamilyMembers cfm,\n (%s\n ) scf\n where scf.channel_family_id = cfm.channel_family_id\n and cfm.channel_id = cp.channel_id\n and cp.package_id = :package_id\n and p.id = :package_id\n ") % (self._channel_family_query)
    return DatabaseStatement().set_statement(rhnSQL.prepare(query))
def get_channels_statement(self):
    query = ("\n select c.id channel_id, c.label,\n\t ct.label as checksum_type,\n TO_CHAR(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannel c, rhnChannelFamilyMembers cfm,\n\t rhnChecksumType ct,\n (%s\n ) scf\n where scf.channel_family_id = cfm.channel_family_id\n and cfm.channel_id = c.id\n\t and c.checksum_type_id = ct.id(+)\n ") % (self._channel_family_query)
    return DatabaseStatement().set_statement(rhnSQL.prepare(query))
def get_source_packages_statement(self):
    query = ("\n select ps.id package_id,\n TO_CHAR(ps.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannelPackage cp, rhnPackage p, rhnPackageSource ps,\n rhnChannelFamilyMembers cfm,\n (%s\n ) scf\n where scf.channel_family_id = cfm.channel_family_id\n and cfm.channel_id = cp.channel_id\n and cp.package_id = p.id\n and p.source_rpm_id = ps.source_rpm_id\n and ((p.org_id is null and ps.org_id is null) or\n p.org_id = ps.org_id)\n and ps.id = :package_id\n ") % (self._channel_family_query)
    return DatabaseStatement().set_statement(rhnSQL.prepare(query))
def get_packages_statement(self):
    query = ("\n select p.id package_id, \n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannelPackage cp, rhnPackage p, \n rhnChannelFamilyMembers cfm,\n (%s\n ) scf\n where scf.channel_family_id = cfm.channel_family_id\n and cfm.channel_id = cp.channel_id\n and cp.package_id = :package_id\n and p.id = :package_id\n ") % (self._channel_family_query)
    return DatabaseStatement().set_statement(rhnSQL.prepare(query))



Clone # 249
Distance between two fragments = 4
Clone size = 8
Source file "./server/action/utils.py"
The first line is 212
Source file "./server/action/utils.py"
The first line is 196
def get_arch_id(self):
    if not self.arch_id:
        self._get_package_field_ids()
    return self.arch_id
def get_name_id(self):
    if not self.name_id:
        self._get_package_field_ids()
    return self.name_id
def get_id(self):
    if not self.id:
        self._get_package_field_ids()
    return self.id
def get_evr_id(self):
    if not self.evr_id:
        self._get_package_field_ids()
    return self.evr_id



Clone # 250
Distance between two fragments = 4
Clone size = 8
Source file "./server/action/utils.py"
The first line is 242
Source file "./server/action/utils.py"
The first line is 234
def get_release(self):
    if not self.release:
        self._get_package_info()
    return self.release
def get_version(self):
    if not self.version:
        self._get_package_info()
    return self.version
def get_epoch(self):
    if not self.epoch:
        self._get_package_info()
    return self.epoch
def get_release(self):
    if not self.release:
        self._get_package_info()
    return self.release



Clone # 251
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 97
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 127
def get_channels_statement(self):
    query = ("\n select c.id channel_id, c.label,\n\t ct.label as checksum_type,\n TO_CHAR(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannel c, rhnChannelFamilyMembers cfm,\n\t rhnChecksumType ct,\n (%s\n ) scf\n where scf.channel_family_id = cfm.channel_family_id\n and cfm.channel_id = c.id\n\t and c.checksum_type_id = ct.id(+)\n ") % (self._channel_family_query)
    return DatabaseStatement().set_statement(rhnSQL.prepare(query))
def get_source_packages_statement(self):
    query = ("\n select ps.id package_id,\n TO_CHAR(ps.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannelPackage cp, rhnPackage p, rhnPackageSource ps,\n rhnChannelFamilyMembers cfm,\n (%s\n ) scf\n where scf.channel_family_id = cfm.channel_family_id\n and cfm.channel_id = cp.channel_id\n and cp.package_id = p.id\n and p.source_rpm_id = ps.source_rpm_id\n and ((p.org_id is null and ps.org_id is null) or\n p.org_id = ps.org_id)\n and ps.id = :package_id\n ") % (self._channel_family_query)
    return DatabaseStatement().set_statement(rhnSQL.prepare(query))
def get_packages_statement(self):
    query = ("\n select p.id package_id, \n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannelPackage cp, rhnPackage p, \n rhnChannelFamilyMembers cfm,\n (%s\n ) scf\n where scf.channel_family_id = cfm.channel_family_id\n and cfm.channel_id = cp.channel_id\n and cp.package_id = :package_id\n and p.id = :package_id\n ") % (self._channel_family_query)
    return DatabaseStatement().set_statement(rhnSQL.prepare(query))
def get_errata_statement(self):
    query = ("\n select e.id errata_id, \n TO_CHAR(e.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannelErrata ce, rhnErrata e,\n rhnChannelFamilyMembers cfm,\n (%s\n ) scf\n where scf.channel_family_id = cfm.channel_family_id\n and cfm.channel_id = ce.channel_id\n and ce.errata_id = :errata_id\n and e.id = :errata_id\n ") % (self._channel_family_query)
    return DatabaseStatement().set_statement(rhnSQL.prepare(query))



Clone # 252
Distance between two fragments = 4
Clone size = 8
Source file "./server/action/utils.py"
The first line is 250
Source file "./server/action/utils.py"
The first line is 234
def get_epoch(self):
    if not self.epoch:
        self._get_package_info()
    return self.epoch
def get_version(self):
    if not self.version:
        self._get_package_info()
    return self.version
def get_arch(self):
    if not self.arch:
        self._get_package_info()
    return self.arch
def get_release(self):
    if not self.release:
        self._get_package_info()
    return self.release



Clone # 253
Distance between two fragments = 4
Clone size = 8
Source file "./server/action/utils.py"
The first line is 78
Source file "./server/action/utils.py"
The first line is 69
def get_channel_id(self):
    if not self.channel_id:
        self._get_channel_info()
    return self.channel_id
def is_subscribed_to_channel(self):
    if not self.found_channel:
        self._get_channel_info()
    return self.found_channel
def get_channel_label(self):
    if not self.channel_label:
        self._get_channel_info()
    return self.channel_label
def get_channel_id(self):
    if not self.channel_id:
        self._get_channel_info()
    return self.channel_id



Clone # 254
Distance between two fragments = 3
Clone size = 8
Source file "./satellite_tools/satsync.py"
The first line is 1968
Source file "./satellite_tools/satsync.py"
The first line is 1446
try:
    rpmManip.write_file(stream)
    break
except FileCreationError, e:
    msg = e[0]
    log2disk(-1, ('Unable to save file %s: %s') % ((rpmManip.full_path, msg)))
    continue
try:
    f.write_file(stream)
    break
except FileCreationError, e:
    msg = e[0]
    log2disk(-1, ('Unable to save file %s: %s') % ((path, msg)))
    continue



Clone # 255
Distance between two fragments = 0
Clone size = 8
Source file "./spacewalk/common/rhn_deb.py"
The first line is 42
Source file "./spacewalk/common/rhn_mpm.py"
The first line is 41
if (filename is None) and (file is None) and (fd is None):
    raise ValueError, 'No parameters passed'
if (filename is None) and (file is None) and (fd is None):
    raise ValueError, 'No parameters passed'
if filename is not None:
    f = open(filename)
elif file is not None:
    f = file
else:
    f = os.fdopen(os.dup(fd), 'r')
if filename is not None:
    f = open(filename)
elif file is not None:
    f = file
else:
    f = os.fdopen(os.dup(fd), 'r')
f.seek(0, 0) f.seek(0, 0)



Clone # 256
Distance between two fragments = 0
Clone size = 8
Source file "./spacewalk/common/rhn_deb.py"
The first line is 42
Source file "./server/handlers/app/rhn_mpm.py"
The first line is 38
if (filename is None) and (file is None) and (fd is None):
    raise ValueError, 'No parameters passed'
if (filename is None) and (file is None) and (fd is None):
    raise ValueError, 'No parameters passed'
if filename is not None:
    f = open(filename)
elif file is not None:
    f = file
else:
    f = os.fdopen(os.dup(fd), 'r')
if filename is not None:
    f = open(filename)
elif file is not None:
    f = file
else:
    f = os.fdopen(os.dup(fd), 'r')
f.seek(0, 0) f.seek(0, 0)



Clone # 257
Distance between two fragments = 4
Clone size = 8
Source file "./server/configFilesHandler.py"
The first line is 46
Source file "./server/configFilesHandler.py"
The first line is 43
class ConfigFileVersionMismatchError(ConfigFileError):
    pass
class ConfigFileExistsError(ConfigFileError):
    pass
class ConfigFileMissingDelimError(ConfigFileError):
    pass
class ConfigFileVersionMismatchError(ConfigFileError):
    pass
class ConfigFileMissingInfoError(ConfigFileError):
    pass
class ConfigFileMissingDelimError(ConfigFileError):
    pass
class ConfigFileMissingContentError(ConfigFileError):
    pass
class ConfigFileMissingInfoError(ConfigFileError):
    pass



Clone # 258
Distance between two fragments = 4
Clone size = 8
Source file "./server/configFilesHandler.py"
The first line is 58
Source file "./server/configFilesHandler.py"
The first line is 55
class ConfigFileMissingStatInfo(ConfigFileError):
    pass
class ConfigFileMissingContentError(ConfigFileError):
    pass
class ConfigFileTooLargeError(ConfigFileError):
    pass
class ConfigFileMissingStatInfo(ConfigFileError):
    pass
class ConfigFileExceedsQuota(ConfigFileError):
    pass
class ConfigFileTooLargeError(ConfigFileError):
    pass
class ConfigFilePathIncomplete(ConfigFileError):
    pass
class ConfigFileExceedsQuota(ConfigFileError):
    pass



Clone # 259
Distance between two fragments = 4
Clone size = 8
Source file "./server/importlib/importLib.py"
The first line is 744
Source file "./server/importlib/importLib.py"
The first line is 738
class InvalidArchError(ImportException):
    def __init__(self, arch, *rest):
        ImportException.__init__(self, rest)
        self.arch = arch
class InvalidPackageError(ImportException):
    def __init__(self, package, *rest):
        ImportException.__init__(self, rest)
        self.package = package
class InvalidChannelError(ImportException):
    def __init__(self, channel, *rest):
        ImportException.__init__(self, rest)
        self.channel = channel
class InvalidArchError(ImportException):
    def __init__(self, arch, *rest):
        ImportException.__init__(self, rest)
        self.arch = arch



Clone # 260
Distance between two fragments = 3
Clone size = 8
Source file "./server/importlib/importLib.py"
The first line is 756
Source file "./server/importlib/importLib.py"
The first line is 750
class MissingParentChannelError(ImportException):
    def __init__(self, channel, *rest):
        ImportException.__init__(self, rest)
        self.channel = channel
class InvalidChannelError(ImportException):
    def __init__(self, channel, *rest):
        ImportException.__init__(self, rest)
        self.channel = channel
class InvalidChannelFamilyError(ImportException):
    def __init__(self, channel_family, *rest):
        ImportException.__init__(self, rest)
        self.channel_family = channel_family
class MissingParentChannelError(ImportException):
    def __init__(self, channel, *rest):
        ImportException.__init__(self, rest)
        self.channel = channel



Clone # 261
Distance between two fragments = 4
Clone size = 8
Source file "./server/configFilesHandler.py"
The first line is 49
Source file "./server/configFilesHandler.py"
The first line is 43
class ConfigFileMissingDelimError(ConfigFileError):
    pass
class ConfigFileExistsError(ConfigFileError):
    pass
class ConfigFileMissingInfoError(ConfigFileError):
    pass
class ConfigFileVersionMismatchError(ConfigFileError):
    pass
class ConfigFileMissingContentError(ConfigFileError):
    pass
class ConfigFileMissingDelimError(ConfigFileError):
    pass
class ConfigFileMissingStatInfo(ConfigFileError):
    pass
class ConfigFileMissingInfoError(ConfigFileError):
    pass



Clone # 262
Distance between two fragments = 4
Clone size = 8
Source file "./server/importlib/importLib.py"
The first line is 750
Source file "./server/importlib/importLib.py"
The first line is 738
class InvalidChannelError(ImportException):
    def __init__(self, channel, *rest):
        ImportException.__init__(self, rest)
        self.channel = channel
class InvalidPackageError(ImportException):
    def __init__(self, package, *rest):
        ImportException.__init__(self, rest)
        self.package = package
class MissingParentChannelError(ImportException):
    def __init__(self, channel, *rest):
        ImportException.__init__(self, rest)
        self.channel = channel
class InvalidArchError(ImportException):
    def __init__(self, arch, *rest):
        ImportException.__init__(self, rest)
        self.arch = arch



Clone # 263
Distance between two fragments = 4
Clone size = 8
Source file "./server/rhnChannel.py"
The first line is 58
Source file "./server/rhnChannel.py"
The first line is 55
class InvalidEntryError(Exception):
    pass
class IncompatibilityError(Exception):
    pass
class InvalidDataError(Exception):
    pass
class InvalidEntryError(Exception):
    pass
class ForceNotSpecified(Exception):
    pass
class InvalidDataError(Exception):
    pass
class ChannelNotFoundError(Exception):
    pass
class ForceNotSpecified(Exception):
    pass



Clone # 264
Distance between two fragments = 4
Clone size = 8
Source file "./server/configFilesHandler.py"
The first line is 43
Source file "./server/configFilesHandler.py"
The first line is 52
class ConfigFileExistsError(ConfigFileError):
    pass
class ConfigFileMissingInfoError(ConfigFileError):
    pass
class ConfigFileVersionMismatchError(ConfigFileError):
    pass
class ConfigFileMissingContentError(ConfigFileError):
    pass
class ConfigFileMissingDelimError(ConfigFileError):
    pass
class ConfigFileMissingStatInfo(ConfigFileError):
    pass
class ConfigFileMissingInfoError(ConfigFileError):
    pass
class ConfigFileTooLargeError(ConfigFileError):
    pass



Clone # 265
Distance between two fragments = 4
Clone size = 8
Source file "./server/importlib/importLib.py"
The first line is 738
Source file "./server/importlib/importLib.py"
The first line is 756
class InvalidPackageError(ImportException):
    def __init__(self, package, *rest):
        ImportException.__init__(self, rest)
        self.package = package
class MissingParentChannelError(ImportException):
    def __init__(self, channel, *rest):
        ImportException.__init__(self, rest)
        self.channel = channel
class InvalidArchError(ImportException):
    def __init__(self, arch, *rest):
        ImportException.__init__(self, rest)
        self.arch = arch
class InvalidChannelFamilyError(ImportException):
    def __init__(self, channel_family, *rest):
        ImportException.__init__(self, rest)
        self.channel_family = channel_family



Clone # 266
Distance between two fragments = 4
Clone size = 8
Source file "./server/rhnChannel.py"
The first line is 55
Source file "./server/rhnChannel.py"
The first line is 61
class IncompatibilityError(Exception):
    pass
class InvalidDataError(Exception):
    pass
class InvalidEntryError(Exception):
    pass
class ForceNotSpecified(Exception):
    pass
class InvalidDataError(Exception):
    pass
class ChannelNotFoundError(Exception):
    pass
class ForceNotSpecified(Exception):
    pass
class NoToolsChannel(Exception):
    pass



Clone # 267
Distance between two fragments = 4
Clone size = 8
Source file "./server/configFilesHandler.py"
The first line is 43
Source file "./server/configFilesHandler.py"
The first line is 55
class ConfigFileExistsError(ConfigFileError):
    pass
class ConfigFileMissingContentError(ConfigFileError):
    pass
class ConfigFileVersionMismatchError(ConfigFileError):
    pass
class ConfigFileMissingStatInfo(ConfigFileError):
    pass
class ConfigFileMissingDelimError(ConfigFileError):
    pass
class ConfigFileTooLargeError(ConfigFileError):
    pass
class ConfigFileMissingInfoError(ConfigFileError):
    pass
class ConfigFileExceedsQuota(ConfigFileError):
    pass



Clone # 268
Distance between two fragments = 4
Clone size = 8
Source file "./server/rhnChannel.py"
The first line is 55
Source file "./server/rhnChannel.py"
The first line is 64
class IncompatibilityError(Exception):
    pass
class ForceNotSpecified(Exception):
    pass
class InvalidEntryError(Exception):
    pass
class ChannelNotFoundError(Exception):
    pass
class InvalidDataError(Exception):
    pass
class NoToolsChannel(Exception):
    pass
class ForceNotSpecified(Exception):
    pass
class NoChildChannels(Exception):
    pass



Clone # 269
Distance between two fragments = 4
Clone size = 8
Source file "./server/configFilesHandler.py"
The first line is 43
Source file "./server/configFilesHandler.py"
The first line is 58
class ConfigFileExistsError(ConfigFileError):
    pass
class ConfigFileMissingStatInfo(ConfigFileError):
    pass
class ConfigFileVersionMismatchError(ConfigFileError):
    pass
class ConfigFileTooLargeError(ConfigFileError):
    pass
class ConfigFileMissingDelimError(ConfigFileError):
    pass
class ConfigFileExceedsQuota(ConfigFileError):
    pass
class ConfigFileMissingInfoError(ConfigFileError):
    pass
class ConfigFilePathIncomplete(ConfigFileError):
    pass



Clone # 270
Distance between two fragments = 4
Clone size = 8
Source file "./server/rhnChannel.py"
The first line is 55
Source file "./server/rhnChannel.py"
The first line is 67
class IncompatibilityError(Exception):
    pass
class ChannelNotFoundError(Exception):
    pass
class InvalidEntryError(Exception):
    pass
class NoToolsChannel(Exception):
    pass
class InvalidDataError(Exception):
    pass
class NoChildChannels(Exception):
    pass
class ForceNotSpecified(Exception):
    pass
class InvalidChannel(Exception):
    pass



Clone # 271
Distance between two fragments = 4
Clone size = 8
Source file "./server/rhnDependency.py"
The first line is 287
Source file "./server/rhnDependency.py"
The first line is 290
class InvalidLimitField(SolveDependenciesError):
    pass
class InvalidLimitOperator(SolveDependenciesError):
    pass
class InvalidLimitOperator(SolveDependenciesError):
    pass
class InvalidLimit(SolveDependenciesError):
    pass
class InvalidLimit(SolveDependenciesError):
    pass
class IncompleteLimitInfo(SolveDependenciesError):
    pass
class IncompleteLimitInfo(SolveDependenciesError):
    pass
class MakeEvrError(SolveDependenciesError):
    pass



Clone # 272
Distance between two fragments = 0
Clone size = 8
Source file "./server/rhnDependency.py"
The first line is 682
Source file "./server/rhnDependency.py"
The first line is 590
deplist = [] deplist = []
for dep in deps:
    if dep not in deplist:
        deplist.append(dep)
for dep in deps:
    if dep not in deplist:
        deplist.append(dep)
statement = ('%s UNION ALL %s UNION ALL %s') % ((__packages_sql, __provides_sql, __files_sql)) statement = ('%s UNION ALL %s UNION ALL %s') % ((__packages_sql, __provides_sql, __files_sql))
h = rhnSQL.prepare(statement) h = rhnSQL.prepare(statement)
packages = {} packages = {}



Clone # 273
Distance between two fragments = 0
Clone size = 8
Source file "./server/importlib/packageUpload.py"
The first line is 188
Source file "./server/importlib/packageUpload.py"
The first line is 160
channelHash = {} channelHash = {}
channels = [] channels = []
for channel in channelList:
    if channelHash.has_key(channel):
        continue
    channels.append(channel)
    channelHash[channel] = None
for channel in channelList:
    if channelHash.has_key(channel):
        continue
    channels.append(channel)
    channelHash[channel] = None
rez = [] rez = []



Clone # 274
Distance between two fragments = 4
Clone size = 8
Source file "./server/rhnCapability.py"
The first line is 142
Source file "./server/rhnCapability.py"
The first line is 134
if updates['server_id']:
    h = rhnSQL.prepare('\n update rhnClientCapability\n set version = :version\n where server_id = :server_id\n and capability_name_id = :capability_name_id\n ')
    apply(h.executemany, (), updates)
if deletes['server_id']:
    h = rhnSQL.prepare('\n delete from rhnClientCapability\n where server_id = :server_id\n and capability_name_id = :capability_name_id\n ')
    apply(h.executemany, (), deletes)
if inserts['server_id']:
    h = rhnSQL.prepare('\n insert into rhnClientCapability \n (server_id, capability_name_id, version) \n values (:server_id, LOOKUP_CLIENT_CAPABILITY(:capability), :version)\n ')
    apply(h.executemany, (), inserts)
if updates['server_id']:
    h = rhnSQL.prepare('\n update rhnClientCapability\n set version = :version\n where server_id = :server_id\n and capability_name_id = :capability_name_id\n ')
    apply(h.executemany, (), updates)



Clone # 275
Distance between two fragments = 1
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 656
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 627
print '\n' print '\n'
log2stdout(1, 'Exporting short packages...') log2stdout(1, 'Exporting packages...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 276
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 723
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 749
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart data...') log2stdout(1, 'Exporting kickstart files...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_trees), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_files), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 277
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 723
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 809
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart data...') log2stdout(1, 'Exporting binary RPMs...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_trees), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.brpms), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 278
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 723
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 695
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart data...') log2stdout(1, 'Exporting errata...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_trees), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.errata_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 279
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 723
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 656
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart data...') log2stdout(1, 'Exporting short packages...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_trees), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 280
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 723
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 627
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart data...') log2stdout(1, 'Exporting packages...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_trees), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 281
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 723
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 573
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart data...') log2stdout(1, 'Exporting channel info...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_trees), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.channel_ids), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 282
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 749
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 809
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart files...') log2stdout(1, 'Exporting binary RPMs...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_files), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.brpms), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 283
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 749
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 695
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart files...') log2stdout(1, 'Exporting errata...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_files), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.errata_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 284
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 749
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 656
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart files...') log2stdout(1, 'Exporting short packages...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_files), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 285
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 749
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 627
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart files...') log2stdout(1, 'Exporting packages...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_files), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 286
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 749
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 573
print '\n' print '\n'
log2stdout(1, 'Exporting kickstart files...') log2stdout(1, 'Exporting channel info...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_files), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.channel_ids), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 287
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 809
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 695
print '\n' print '\n'
log2stdout(1, 'Exporting binary RPMs...') log2stdout(1, 'Exporting errata...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.brpms), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.errata_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 288
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 809
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 656
print '\n' print '\n'
log2stdout(1, 'Exporting binary RPMs...') log2stdout(1, 'Exporting short packages...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.brpms), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 289
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 809
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 627
print '\n' print '\n'
log2stdout(1, 'Exporting binary RPMs...') log2stdout(1, 'Exporting packages...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.brpms), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 290
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 809
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 573
print '\n' print '\n'
log2stdout(1, 'Exporting binary RPMs...') log2stdout(1, 'Exporting channel info...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.brpms), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.channel_ids), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 291
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 695
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 656
print '\n' print '\n'
log2stdout(1, 'Exporting errata...') log2stdout(1, 'Exporting short packages...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.errata_info), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 292
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 695
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 627
print '\n' print '\n'
log2stdout(1, 'Exporting errata...') log2stdout(1, 'Exporting packages...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.errata_info), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 293
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 695
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 573
print '\n' print '\n'
log2stdout(1, 'Exporting errata...') log2stdout(1, 'Exporting channel info...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.errata_info), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.channel_ids), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 294
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 656
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 573
print '\n' print '\n'
log2stdout(1, 'Exporting short packages...') log2stdout(1, 'Exporting channel info...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.channel_ids), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 295
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 627
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 573
print '\n' print '\n'
log2stdout(1, 'Exporting packages...') log2stdout(1, 'Exporting channel info...')
pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.channel_ids), self.pb_length, self.pb_char)
pb.printAll(1) pb.printAll(1)



Clone # 296
Distance between two fragments = 2
Clone size = 8
Source file "./server/rhnDependency.py"
The first line is 313
Source file "./server/rhnDependency.py"
The first line is 302
def __single_query_with_arch_and_id(server_id, deps, query):
    ret = {}
    h = rhnSQL.prepare(query)
    for dep in deps:
        h.execute(server_id=server_id, dep=dep)
        data = (h.fetchall()) or ([])
        ret[dep] = map(lambda a: a[:6], data)
    return ret
def __single_query(server_id, deps, query):
    ret = {}
    h = rhnSQL.prepare(query)
    for dep in deps:
        h.execute(server_id=server_id, dep=dep)
        data = (h.fetchall()) or ([])
        ret[dep] = map(lambda a: a[:4], data)
    return ret



Clone # 297
Distance between two fragments = 0
Clone size = 8
Source file "./server/importlib/debPackage.py"
The first line is 156
Source file "./server/importlib/headerSource.py"
The first line is 183
def _populateChannels(self, channels):
    l = []
    for channel in channels:
        dict = {'label': channel}
        obj = Channel()
        obj.populate(dict)
        l.append(obj)
    self['channels'] = l
def _populateChannels(self, channels):
    l = []
    for channel in channels:
        dict = {'label': channel}
        obj = Channel()
        obj.populate(dict)
        l.append(obj)
    self['channels'] = l



Clone # 298
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/test/test-download.py"
The first line is 50
Source file "./satellite_tools/test/test-download.py"
The first line is 45
if 0:
    f = s.dump.arches_extra(systemid)
    print f.read()
    sys.exit(0)
if 0:
    f = s.dump.channel_families(systemid)
    print f.read()
    sys.exit(0)
if 0:
    f = s.dump.arches(systemid)
    print f.read()
    sys.exit(0)
if 0:
    f = s.dump.arches_extra(systemid)
    print f.read()
    sys.exit(0)



Clone # 299
Distance between two fragments = 4
Clone size = 8
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 377
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 365
def solveDependencies(self, system_id, deps):
    log_debug(4, system_id)
    return self.__solveDep(system_id, deps, action='solvedep', clientVersion=2)
def solvedep(self, system_id, deps):
    log_debug(4, system_id)
    return self.__solveDep(system_id, deps, action='solvedep', clientVersion=1)
def solveDependencies_arch(self, system_id, deps):
    log_debug(4, system_id)
    return self.__solveDep_arch(system_id, deps, action='solvedep', clientVersion=2)
def solveDependencies(self, system_id, deps):
    log_debug(4, system_id)
    return self.__solveDep(system_id, deps, action='solvedep', clientVersion=2)



Clone # 300
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_tools/satsync.py"
The first line is 1268
Source file "./satellite_tools/satsync.py"
The first line is 1092
missing_packages = self._compute_not_cached_source_packages() missing_packages = self._missing_not_cached_packages()
h = sync_handlers.get_source_package_handler() h = sync_handlers.get_package_handler()
stream_loader = StreamProducer(h) stream_loader = StreamProducer(h)
if self.mountpoint:
    s = xmlDiskSource.SourcePackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getSourcePackageXmlStream
    stream_loader.set_wire_loader(s)
if self.mountpoint:
    s = xmlDiskSource.PackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getPackageXmlStream
    stream_loader.set_wire_loader(s)



Clone # 301
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_tools/satsync.py"
The first line is 1379
Source file "./satellite_tools/satsync.py"
The first line is 859
self._compute_unique_kickstarts() self._compute_unique_packages()
h = sync_handlers.get_kickstarts_handler() h = sync_handlers.get_short_package_handler()
stream_loader = StreamProducer(h) stream_loader = StreamProducer(h)
if self.mountpoint:
    s = xmlDiskSource.KickstartDataDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getKickstartsXmlStream
    stream_loader.set_wire_loader(s)
if self.mountpoint:
    s = xmlDiskSource.ShortPackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getChannelShortPackagesXmlStream
    stream_loader.set_wire_loader(s)



Clone # 302
Distance between two fragments = 4
Clone size = 8
Source file "./server/rhnVirtualization.py"
The first line is 964
Source file "./server/rhnVirtualization.py"
The first line is 953
handler.handle(host_sysid, crawl_began) handler.handle(guest_sysid, guest_exists)
handler.handle(host_sysid, crawl_ended) handler.handle(guest_sysid, crawl_began)
handler.handle(host_sysid, host_exists) handler.handle(guest_sysid, crawl_ended)
handler.handle(host_sysid, crawl_began) handler.handle(host_sysid, crawl_began)
handler.handle(host_sysid, dom0_exists) handler.handle(host_sysid, dom0_exists)
handler.handle(host_sysid, domU1_exists) handler.handle(host_sysid, domU1_exists)
handler.handle(host_sysid, domU2_exists) handler.handle(host_sysid, domU2_exists)
handler.handle(host_sysid, crawl_ended) handler.handle(host_sysid, crawl_ended)



Clone # 303
Distance between two fragments = 4
Clone size = 8
Source file "./server/rhnServer/server_token.py"
The first line is 1092
Source file "./server/rhnServer/server_token.py"
The first line is 1081
if history.has_key('packages'):
    report.write('Packages Scheduled for Installation:\n')
    report.write('
    \n')
        for p in history['packages']:
            report.write(('
  • %s
  • \n') % (p))
        if len(history['packages']) == 0:
            report.write('
  • No packages scheduled for automatic installation
  • \n'
    )
        report.write('
\n')
if history.has_key('groups'):
    report.write('System Group Membership Information:\n')
    report.write('
    \n')
        for g in history['groups']:
            report.write(('
  • %s
  • \n') % (g))
        if len(history['groups']) == 0:
            report.write('
  • The token does not include default System Group Membership
  • \n'
    )
        report.write('
\n')



Clone # 304
Distance between two fragments = 4
Clone size = 8
Source file "./server/rhnServer/server_token.py"
The first line is 1105
Source file "./server/rhnServer/server_token.py"
The first line is 1092
if history.has_key('config_channels'):
    report.write('Config Channel Subscription Information:\n')
    report.write('
    \n')
        for c in history['config_channels']:
            report.write(('
  • %s
  • \n') % (c))
        if len(history['config_channels']) == 0:
            report.write('
  • The token does not include default configuration channels
  • \n'
    )
        report.write('
\n')
if history.has_key('packages'):
    report.write('Packages Scheduled for Installation:\n')
    report.write('
    \n')
        for p in history['packages']:
            report.write(('
  • %s
  • \n') % (p))
        if len(history['packages']) == 0:
            report.write('
  • No packages scheduled for automatic installation
  • \n'
    )
        report.write('
\n')



Clone # 305
Distance between two fragments = 4
Clone size = 8
Source file "./server/rhnServer/server_token.py"
The first line is 1105
Source file "./server/rhnServer/server_token.py"
The first line is 1081
if history.has_key('config_channels'):
    report.write('Config Channel Subscription Information:\n')
    report.write('
    \n')
        for c in history['config_channels']:
            report.write(('
  • %s
  • \n') % (c))
        if len(history['config_channels']) == 0:
            report.write('
  • The token does not include default configuration channels
  • \n'
    )
        report.write('
\n')
if history.has_key('groups'):
    report.write('System Group Membership Information:\n')
    report.write('
    \n')
        for g in history['groups']:
            report.write(('
  • %s
  • \n') % (g))
        if len(history['groups']) == 0:
            report.write('
  • The token does not include default System Group Membership
  • \n'
    )
        report.write('
\n')



Clone # 306
Distance between two fragments = 4
Clone size = 8
Source file "./server/action_extra_data/virt.py"
The first line is 37
Source file "./server/action_extra_data/virt.py"
The first line is 34
def reboot(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def schedulePoller(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def resume(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def reboot(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def start(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def resume(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def suspend(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def start(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)



Clone # 307
Distance between two fragments = 4
Clone size = 8
Source file "./server/action_extra_data/virt.py"
The first line is 49
Source file "./server/action_extra_data/virt.py"
The first line is 46
def shutdown(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def suspend(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def destroy(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def shutdown(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def setMemory(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def destroy(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def setVCPUs(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def setMemory(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)



Clone # 308
Distance between two fragments = 4
Clone size = 8
Source file "./server/action_extra_data/virt.py"
The first line is 40
Source file "./server/action_extra_data/virt.py"
The first line is 34
def resume(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def schedulePoller(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def start(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def reboot(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def suspend(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def resume(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def shutdown(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def start(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)



Clone # 309
Distance between two fragments = 4
Clone size = 8
Source file "./server/action_extra_data/virt.py"
The first line is 43
Source file "./server/action_extra_data/virt.py"
The first line is 34
def start(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def schedulePoller(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def suspend(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def reboot(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def shutdown(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def resume(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def destroy(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def start(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)



Clone # 310
Distance between two fragments = 4
Clone size = 8
Source file "./server/action_extra_data/virt.py"
The first line is 46
Source file "./server/action_extra_data/virt.py"
The first line is 34
def suspend(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def schedulePoller(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def shutdown(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def reboot(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def destroy(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def resume(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def setMemory(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def start(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)



Clone # 311
Distance between two fragments = 4
Clone size = 8
Source file "./server/action_extra_data/virt.py"
The first line is 49
Source file "./server/action_extra_data/virt.py"
The first line is 34
def shutdown(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def schedulePoller(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def destroy(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def reboot(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def setMemory(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def resume(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def setVCPUs(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)
def start(server_id, action_id, data={}):
    _do_nothing(server_id, action_id)



Clone # 312
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 436
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 422
writer = self._get_xml_writer() writer = self._get_xml_writer()
d = dumper.SatelliteDumper(writer, dumper.KickstartableTreesDumper(writer, kickstarts=kickstarts)) d = dumper.SatelliteDumper(writer, dumper.ErrataDumper(writer, errata_hash.values()))
d.dump() d.dump()
writer.flush() writer.flush()
log_debug(4, 'OK') log_debug(4, 'OK')
self.close() self.close()
return 0 return 0



Clone # 313
Distance between two fragments = 3
Clone size = 8
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 386
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 391
writer = self._get_xml_writer() writer = self._get_xml_writer()
d = dumper.SatelliteDumper(writer, dump_class(writer, packages_hash.values())) dumper = SatelliteDumper(writer, dump_class(writer, packages_hash.values()))
d.dump() dumper.dump()
writer.flush() writer.flush()
log_debug(4, 'OK') log_debug(4, 'OK')
self.close() self.close()
return 0 return 0



Clone # 314
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 430
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 391
writer = self._get_xml_writer() writer = self._get_xml_writer()
dumper = SatelliteDumper(writer, ErrataDumper(writer, errata_hash.values())) dumper = SatelliteDumper(writer, dump_class(writer, packages_hash.values()))
dumper.dump() dumper.dump()
writer.flush() writer.flush()
log_debug(4, 'OK') log_debug(4, 'OK')
self.close() self.close()
return 0 return 0



Clone # 315
Distance between two fragments = 1
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 880
Source file "./satellite_tools/satsync.py"
The first line is 350
body = dumpEMAIL_LOG() body = dumpEMAIL_LOG()
if body:
    print '+++ sending log as an email +++'
    headers = {'Subject': ('Spacewalk Management Satellite Export report from %s') % (os.uname()[1])}
    sndr = 'rhn-satellite'
    rhnMail.send(headers, body, sender=sndr)
else:
    print '+++ email requested, but there is nothing to send +++'
if body:
    print '+++ sending log as an email +++'
    headers = {'Subject': ('RHN Management Satellite sync. report from %s') % (os.uname()[1])}
    sndr = 'rhn-satellite'
    rhnMail.send(headers, body, sender=sndr)
else:
    print '+++ email requested, but there is nothing to send +++'



Clone # 316
Distance between two fragments = 3
Clone size = 8
Source file "./server/importlib/backend.py"
The first line is 1116
Source file "./server/importlib/backend.py"
The first line is 880
if dcm.ignored:
    continue
if relcms.ignored:
    pass
h = lookup.query(dcm) h = lookup.query(relcms)
row = h.fetchone_dict() row = h.fetchone_dict()
if not row:
    extObject = {}
    _buildExternalValue(extObject, dcm, dcmTable)
    addHash(dmlobj.insert[dcmTable.name], extObject)
if not row:
    extObject = {}
    _buildExternalValue(extObject, relcms, rcmTable)
    addHash(dmlobj.insert[rcmTable.name], extObject)



Clone # 317
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 175
Source file "./test/johntest.py"
The first line is 170
def get_description(self, ch_index):
    if self.channel_list[ch_index].has_key(self._description):
        return self.channel_list[ch_index][self._description]
    return None
def get_last_modified(self, ch_index):
    if self.channel_list[ch_index].has_key(self._last_modified):
        return self.channel_list[ch_index][self._last_modified]
    return None
def get_name(self, ch_index):
    if self.channel_list[ch_index].has_key(self._name):
        return self.channel_list[ch_index][self._name]
    return None
def get_description(self, ch_index):
    if self.channel_list[ch_index].has_key(self._description):
        return self.channel_list[ch_index][self._description]
    return None



Clone # 318
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 185
Source file "./test/johntest.py"
The first line is 180
def get_local_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._local_channel):
        return self.channel_list[ch_index][self._local_channel]
    return None
def get_name(self, ch_index):
    if self.channel_list[ch_index].has_key(self._name):
        return self.channel_list[ch_index][self._name]
    return None
def get_arch(self, ch_index):
    if self.channel_list[ch_index].has_key(self._arch):
        return self.channel_list[ch_index][self._arch]
    return None
def get_local_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._local_channel):
        return self.channel_list[ch_index][self._local_channel]
    return None



Clone # 319
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 195
Source file "./test/johntest.py"
The first line is 190
def get_parent_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._parent_channel):
        return self.channel_list[ch_index][self._parent_channel]
    return None
def get_arch(self, ch_index):
    if self.channel_list[ch_index].has_key(self._arch):
        return self.channel_list[ch_index][self._arch]
    return None
def get_summary(self, ch_index):
    if self.channel_list[ch_index].has_key(self._summary):
        return self.channel_list[ch_index][self._summary]
    return None
def get_parent_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._parent_channel):
        return self.channel_list[ch_index][self._parent_channel]
    return None



Clone # 320
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 205
Source file "./test/johntest.py"
The first line is 200
def get_org_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._org_id):
        return self.channel_list[ch_index][self._org_id]
    return None
def get_summary(self, ch_index):
    if self.channel_list[ch_index].has_key(self._summary):
        return self.channel_list[ch_index][self._summary]
    return None
def get_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._id):
        return self.channel_list[ch_index][self._id]
    return None
def get_org_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._org_id):
        return self.channel_list[ch_index][self._org_id]
    return None



Clone # 321
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 180
Source file "./test/johntest.py"
The first line is 170
def get_name(self, ch_index):
    if self.channel_list[ch_index].has_key(self._name):
        return self.channel_list[ch_index][self._name]
    return None
def get_last_modified(self, ch_index):
    if self.channel_list[ch_index].has_key(self._last_modified):
        return self.channel_list[ch_index][self._last_modified]
    return None
def get_local_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._local_channel):
        return self.channel_list[ch_index][self._local_channel]
    return None
def get_description(self, ch_index):
    if self.channel_list[ch_index].has_key(self._description):
        return self.channel_list[ch_index][self._description]
    return None



Clone # 322
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 190
Source file "./test/johntest.py"
The first line is 180
def get_arch(self, ch_index):
    if self.channel_list[ch_index].has_key(self._arch):
        return self.channel_list[ch_index][self._arch]
    return None
def get_name(self, ch_index):
    if self.channel_list[ch_index].has_key(self._name):
        return self.channel_list[ch_index][self._name]
    return None
def get_parent_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._parent_channel):
        return self.channel_list[ch_index][self._parent_channel]
    return None
def get_local_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._local_channel):
        return self.channel_list[ch_index][self._local_channel]
    return None



Clone # 323
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 200
Source file "./test/johntest.py"
The first line is 190
def get_summary(self, ch_index):
    if self.channel_list[ch_index].has_key(self._summary):
        return self.channel_list[ch_index][self._summary]
    return None
def get_arch(self, ch_index):
    if self.channel_list[ch_index].has_key(self._arch):
        return self.channel_list[ch_index][self._arch]
    return None
def get_org_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._org_id):
        return self.channel_list[ch_index][self._org_id]
    return None
def get_parent_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._parent_channel):
        return self.channel_list[ch_index][self._parent_channel]
    return None



Clone # 324
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 210
Source file "./test/johntest.py"
The first line is 200
def get_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._id):
        return self.channel_list[ch_index][self._id]
    return None
def get_summary(self, ch_index):
    if self.channel_list[ch_index].has_key(self._summary):
        return self.channel_list[ch_index][self._summary]
    return None
def get_label(self, ch_index):
    if self.channel_list[ch_index].has_key(self._label):
        return self.channel_list[ch_index][self._label]
    return None
def get_org_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._org_id):
        return self.channel_list[ch_index][self._org_id]
    return None



Clone # 325
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 185
Source file "./test/johntest.py"
The first line is 170
def get_local_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._local_channel):
        return self.channel_list[ch_index][self._local_channel]
    return None
def get_last_modified(self, ch_index):
    if self.channel_list[ch_index].has_key(self._last_modified):
        return self.channel_list[ch_index][self._last_modified]
    return None
def get_arch(self, ch_index):
    if self.channel_list[ch_index].has_key(self._arch):
        return self.channel_list[ch_index][self._arch]
    return None
def get_description(self, ch_index):
    if self.channel_list[ch_index].has_key(self._description):
        return self.channel_list[ch_index][self._description]
    return None



Clone # 326
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 195
Source file "./test/johntest.py"
The first line is 180
def get_parent_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._parent_channel):
        return self.channel_list[ch_index][self._parent_channel]
    return None
def get_name(self, ch_index):
    if self.channel_list[ch_index].has_key(self._name):
        return self.channel_list[ch_index][self._name]
    return None
def get_summary(self, ch_index):
    if self.channel_list[ch_index].has_key(self._summary):
        return self.channel_list[ch_index][self._summary]
    return None
def get_local_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._local_channel):
        return self.channel_list[ch_index][self._local_channel]
    return None



Clone # 327
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 205
Source file "./test/johntest.py"
The first line is 190
def get_org_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._org_id):
        return self.channel_list[ch_index][self._org_id]
    return None
def get_arch(self, ch_index):
    if self.channel_list[ch_index].has_key(self._arch):
        return self.channel_list[ch_index][self._arch]
    return None
def get_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._id):
        return self.channel_list[ch_index][self._id]
    return None
def get_parent_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._parent_channel):
        return self.channel_list[ch_index][self._parent_channel]
    return None



Clone # 328
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 190
Source file "./test/johntest.py"
The first line is 170
def get_arch(self, ch_index):
    if self.channel_list[ch_index].has_key(self._arch):
        return self.channel_list[ch_index][self._arch]
    return None
def get_last_modified(self, ch_index):
    if self.channel_list[ch_index].has_key(self._last_modified):
        return self.channel_list[ch_index][self._last_modified]
    return None
def get_parent_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._parent_channel):
        return self.channel_list[ch_index][self._parent_channel]
    return None
def get_description(self, ch_index):
    if self.channel_list[ch_index].has_key(self._description):
        return self.channel_list[ch_index][self._description]
    return None



Clone # 329
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 200
Source file "./test/johntest.py"
The first line is 180
def get_summary(self, ch_index):
    if self.channel_list[ch_index].has_key(self._summary):
        return self.channel_list[ch_index][self._summary]
    return None
def get_name(self, ch_index):
    if self.channel_list[ch_index].has_key(self._name):
        return self.channel_list[ch_index][self._name]
    return None
def get_org_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._org_id):
        return self.channel_list[ch_index][self._org_id]
    return None
def get_local_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._local_channel):
        return self.channel_list[ch_index][self._local_channel]
    return None



Clone # 330
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 210
Source file "./test/johntest.py"
The first line is 190
def get_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._id):
        return self.channel_list[ch_index][self._id]
    return None
def get_arch(self, ch_index):
    if self.channel_list[ch_index].has_key(self._arch):
        return self.channel_list[ch_index][self._arch]
    return None
def get_label(self, ch_index):
    if self.channel_list[ch_index].has_key(self._label):
        return self.channel_list[ch_index][self._label]
    return None
def get_parent_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._parent_channel):
        return self.channel_list[ch_index][self._parent_channel]
    return None



Clone # 331
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 195
Source file "./test/johntest.py"
The first line is 170
def get_parent_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._parent_channel):
        return self.channel_list[ch_index][self._parent_channel]
    return None
def get_last_modified(self, ch_index):
    if self.channel_list[ch_index].has_key(self._last_modified):
        return self.channel_list[ch_index][self._last_modified]
    return None
def get_summary(self, ch_index):
    if self.channel_list[ch_index].has_key(self._summary):
        return self.channel_list[ch_index][self._summary]
    return None
def get_description(self, ch_index):
    if self.channel_list[ch_index].has_key(self._description):
        return self.channel_list[ch_index][self._description]
    return None



Clone # 332
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 205
Source file "./test/johntest.py"
The first line is 180
def get_org_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._org_id):
        return self.channel_list[ch_index][self._org_id]
    return None
def get_name(self, ch_index):
    if self.channel_list[ch_index].has_key(self._name):
        return self.channel_list[ch_index][self._name]
    return None
def get_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._id):
        return self.channel_list[ch_index][self._id]
    return None
def get_local_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._local_channel):
        return self.channel_list[ch_index][self._local_channel]
    return None



Clone # 333
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 200
Source file "./test/johntest.py"
The first line is 170
def get_summary(self, ch_index):
    if self.channel_list[ch_index].has_key(self._summary):
        return self.channel_list[ch_index][self._summary]
    return None
def get_last_modified(self, ch_index):
    if self.channel_list[ch_index].has_key(self._last_modified):
        return self.channel_list[ch_index][self._last_modified]
    return None
def get_org_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._org_id):
        return self.channel_list[ch_index][self._org_id]
    return None
def get_description(self, ch_index):
    if self.channel_list[ch_index].has_key(self._description):
        return self.channel_list[ch_index][self._description]
    return None



Clone # 334
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 210
Source file "./test/johntest.py"
The first line is 180
def get_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._id):
        return self.channel_list[ch_index][self._id]
    return None
def get_name(self, ch_index):
    if self.channel_list[ch_index].has_key(self._name):
        return self.channel_list[ch_index][self._name]
    return None
def get_label(self, ch_index):
    if self.channel_list[ch_index].has_key(self._label):
        return self.channel_list[ch_index][self._label]
    return None
def get_local_channel(self, ch_index):
    if self.channel_list[ch_index].has_key(self._local_channel):
        return self.channel_list[ch_index][self._local_channel]
    return None



Clone # 335
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 205
Source file "./test/johntest.py"
The first line is 170
def get_org_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._org_id):
        return self.channel_list[ch_index][self._org_id]
    return None
def get_last_modified(self, ch_index):
    if self.channel_list[ch_index].has_key(self._last_modified):
        return self.channel_list[ch_index][self._last_modified]
    return None
def get_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._id):
        return self.channel_list[ch_index][self._id]
    return None
def get_description(self, ch_index):
    if self.channel_list[ch_index].has_key(self._description):
        return self.channel_list[ch_index][self._description]
    return None



Clone # 336
Distance between two fragments = 4
Clone size = 8
Source file "./test/johntest.py"
The first line is 210
Source file "./test/johntest.py"
The first line is 170
def get_id(self, ch_index):
    if self.channel_list[ch_index].has_key(self._id):
        return self.channel_list[ch_index][self._id]
    return None
def get_last_modified(self, ch_index):
    if self.channel_list[ch_index].has_key(self._last_modified):
        return self.channel_list[ch_index][self._last_modified]
    return None
def get_label(self, ch_index):
    if self.channel_list[ch_index].has_key(self._label):
        return self.channel_list[ch_index][self._label]
    return None
def get_description(self, ch_index):
    if self.channel_list[ch_index].has_key(self._description):
        return self.channel_list[ch_index][self._description]
    return None



Clone # 337
Distance between two fragments = 3
Clone size = 8
Source file "./server/action/kickstart_guest.py"
The first line is 49
Source file "./server/action/kickstart_host.py"
The first line is 40
virt_host_package_name = 'rhn-virtualization-guest' messaging_package_name = 'osad'
tools_channel = SubscribedChannel(server_id, 'rhn-tools') tools_channel = SubscribedChannel(server_id, 'rhn-tools')
found_tools_channel = tools_channel.is_subscribed_to_channel() found_tools_channel = tools_channel.is_subscribed_to_channel()
if not found_tools_channel:
    raise InvalidAction('System not subscribed to the RHN Tools channel.')
if not found_tools_channel:
    raise InvalidAction('System not subscribed to the RHN Tools channel.')
rhn_v12n_package = ChannelPackage(server_id, virt_host_package_name) rhn_v12n_package = ChannelPackage(server_id, virt_host_package_name)
if not rhn_v12n_package.exists():
    raise InvalidAction('Could not find the rhn-virtualization-guest package.')
if not rhn_v12n_package.exists():
    raise InvalidAction('Could not find the rhn-virtualization-host package.')



Clone # 338
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/exporter/exportLib.py"
The first line is 783
Source file "./satellite_tools/exporter/exportLib.py"
The first line is 718
tag_name = 'rhn-source-packages' tag_name = 'rhn-packages-short'
def set_iterator(self):
    if self._iterator:
        return self._iterator
    h = rhnSQL.prepare("\n select \n ps.id, \n sr.name source_rpm, \n pg.name package_group, \n ps.rpm_version, \n ps.payload_size,\n ps.build_host, \n TO_CHAR(ps.build_time, 'YYYYMMDDHH24MISS') build_time,\n sig.checksum sigchecksum,\n sig.checksum_type sigchecksum_type,\n ps.vendor,\n ps.cookie,\n ps.package_size,\n c.checksum_type,\n c.checksum,\n TO_CHAR(ps.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackageSource ps, rhnPackageGroup pg, rhnSourceRPM sr,\n rhnChecksumView c, rhnChecksumView sig\n where ps.package_group = pg.id\n and ps.source_rpm_id = sr.id\n and ps.path is not null\n and ps.checksum_id = c.id\n and ps.sigchecksum_id = sig.id\n and rownum < 3\n ")
    h.execute()
    return h
def set_iterator(self):
    if self._iterator:
        return self._iterator
    h = rhnSQL.prepare("\n select \n p.id, \n pn.name, \n pe.evr.version version, \n pe.evr.release release, \n pe.evr.epoch epoch, \n pa.label package_arch,\n c.checksum_type,\n c.checksum,\n p.org_id,\n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackage p, rhnPackageName pn, rhnPackageEVR pe, \n rhnPackageArch pa, rhnChecksumView c\n where p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p.path is not null\n and p.checksum_id = c.id\n and rownum < 3\n ")
    h.execute()
    return h



Clone # 339
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/exporter/exportLib.py"
The first line is 783
Source file "./satellite_tools/exporter/exportLib.py"
The first line is 567
tag_name = 'rhn-source-packages' tag_name = 'rhn-packages'
def set_iterator(self):
    if self._iterator:
        return self._iterator
    h = rhnSQL.prepare("\n select \n ps.id, \n sr.name source_rpm, \n pg.name package_group, \n ps.rpm_version, \n ps.payload_size,\n ps.build_host, \n TO_CHAR(ps.build_time, 'YYYYMMDDHH24MISS') build_time,\n sig.checksum sigchecksum,\n sig.checksum_type sigchecksum_type,\n ps.vendor,\n ps.cookie,\n ps.package_size,\n c.checksum_type,\n c.checksum,\n TO_CHAR(ps.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackageSource ps, rhnPackageGroup pg, rhnSourceRPM sr,\n rhnChecksumView c, rhnChecksumView sig\n where ps.package_group = pg.id\n and ps.source_rpm_id = sr.id\n and ps.path is not null\n and ps.checksum_id = c.id\n and ps.sigchecksum_id = sig.id\n and rownum < 3\n ")
    h.execute()
    return h
def set_iterator(self):
    if self._iterator:
        return self._iterator
    h = rhnSQL.prepare("\n select \n p.id,\n p.org_id, \n pn.name, \n pe.evr.version version, \n pe.evr.release release, \n pe.evr.epoch epoch, \n pa.label package_arch,\n pg.name package_group, \n p.rpm_version, \n p.description,\n p.summary,\n p.package_size,\n p.payload_size,\n p.build_host, \n TO_CHAR(p.build_time, 'YYYYMMDDHH24MISS') build_time,\n sr.name source_rpm, \n c.checksum_type,\n c.checksum,\n p.vendor,\n p.payload_format, \n p.compat, \n p.header_sig,\n p.copyright,\n p.cookie,\n p.header_start,\n p.header_end,\n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackage p, rhnPackageName pn, rhnPackageEVR pe, \n rhnPackageArch pa, rhnPackageGroup pg, rhnSourceRPM sr,\n rhnChecksumView c\n where p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p.package_group = pg.id\n and p.source_rpm_id = sr.id\n and p.path is not null\n and p.checksum_id = c.id\n and rownum < 3\n ")
    h.execute()
    return h



Clone # 340
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_tools/satComputePkgHeaders.py"
The first line is 168
Source file "./satellite_tools/sync_handlers.py"
The first line is 728
h.execute() h.execute()
ret = {} cfs = {}
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    ret[row['label']] = row['id']
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    cfs[row['label']] = 1
return ret return cfs



Clone # 341
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_tools/satComputePkgHeaders.py"
The first line is 167
Source file "./server/apacheHandler.py"
The first line is 158
h = rhnSQL.prepare(self._query_get_channels) h = rhnSQL.prepare('select label, value from rhnTemplateString')
h.execute() h.execute()
ret = {} templateStrings = {}
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    ret[row['label']] = row['id']
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    templateStrings[row['label']] = row['value']



Clone # 342
Distance between two fragments = 2
Clone size = 8
Source file "./server/test/unit-test/test_server_registration.py"
The first line is 118
Source file "./server/test/unit-test/test_server_registration.py"
The first line is 74
system_id = register_new_system(params) system_id = register_new_system(params)
rhnSQL.commit() rhnSQL.commit()
s = rhnServer.get(system_id) s = rhnServer.get(system_id)
self.assertNotEqual(s, None) self.assertNotEqual(s, None)
server_id = s.getid() server_id = s.getid()
channels = rhnChannel.channels_for_server(server_id) channels = rhnChannel.channels_for_server(server_id)
self.assertEqual(len(channels), 1) self.assertEqual(len(channels), 1)
self.assertEqual(channels[0]['label'], base_channel) self.assertEqual(channels[0]['label'], self._channel)



Clone # 343
Distance between two fragments = 2
Clone size = 8
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 182
Source file "./server/handlers/xmlrpc/up2date.py"
The first line is 166
transport = rhnFlags.get('outputTransportOptions') transport = rhnFlags.get('outputTransportOptions')
transport['X-RHN-Action'] = 'unsubscribeChannel' transport['X-RHN-Action'] = 'subscribeChannel'
self.auth_system(system_id) self.auth_system(system_id)
log_debug(1, self.server_id, channelNames) log_debug(1, self.server_id, channelNames)
for channelName in channelNames:
    rhnChannel.unsubscribe_channel(self.server_id, channelName, username, passwd)
for channelName in channelNames:
    rhnChannel.subscribe_channel(self.server_id, channelName, username, passwd)
return 0 return 0



Clone # 344
Distance between two fragments = 2
Clone size = 8
Source file "./satellite_tools/satsync.py"
The first line is 1848
Source file "./satellite_tools/satsync.py"
The first line is 1405
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    sync_handlers.import_errata(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
while not ss.doneYN():
    chunk = ss.getChunk()
    item_count = len(chunk)
    stream_loader.process(chunk)
    ss.clearChunk()
    pb.addTo(item_count)
    pb.printIncrement()
pb.printComplete() pb.printComplete()



Clone # 345
Distance between two fragments = 1
Clone size = 8
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 314
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 251
db_last_modified = int(rhnLib_common.timestamp(channel_obj['last_modified'])) db_last_modified = int(rhnLib.timestamp(channel_obj['last_modified']))
last_modified = int(rhnLib_common.timestamp(last_modified)) last_modified = int(rhnLib.timestamp(last_modified))
log_debug(3, 'last modified', last_modified, 'db last modified', db_last_modified) log_debug(3, 'last modified', last_modified, 'db last modified', db_last_modified)
if last_modified != db_last_modified:
    raise rhnFault(3013, 'The requested channel version does not match the upstream version', explain=0)
if last_modified != db_last_modified:
    raise rhnFault(3013, 'The requested channel version does not match the upstream version', explain=0)
channel_id = channel_obj['channel_id'] channel_id = channel_obj['channel_id']



Clone # 346
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 403
Source file "./satellite_exporter/handlers/non_auth_dumper.py"
The first line is 367
erratum = str(erratum) package = str(package)
if erratum[:len(prefix)] != prefix:
    raise rhnFault(3004, ('Wrong erratum name %s') % (erratum))
if package[:len(prefix)] != prefix:
    raise rhnFault(3002, ('Invalid package name %s') % (package))
errata_id = erratum[len(prefix):] package_id = package[len(prefix):]
try:
    errata_id = int(errata_id)
except ValueError:
    raise rhnFault(3004, ('Wrong erratum name %s') % (erratum))
try:
    package_id = int(package_id)
except ValueError:
    raise rhnFault(3002, ('Invalid package name %s') % (package))



Clone # 347
Distance between two fragments = 4
Clone size = 8
Source file "./server/handlers/xmlrpc/registration.py"
The first line is 1348
Source file "./server/handlers/xmlrpc/registration.py"
The first line is 1178
user = rhnUser.search(username) user = rhnUser.search(username)
if user is None:
    log_error('invalid username', username)
    raise rhnFault(2)
if user is None:
    log_error('invalid username', username)
    raise rhnFault(2)
if not user.check_password(password):
    log_error('User password check failed', username)
    raise rhnFault(2)
if not user.check_password(password):
    log_error('User password check failed', username)
    raise rhnFault(2)
server_arch = normalize_server_arch(arch) val = contact_info.get('state')



Clone # 348
Distance between two fragments = 0
Clone size = 8
Source file "./server/test/unit-test/rhnSQL/test_executemany.py"
The first line is 30
Source file "./server/test/unit-test/rhnSQL/test_1.py"
The first line is 28
def _cleanup(self):
    try:
        rhnSQL.execute(('drop table %s') % (self.table_name))
    except rhnSQL.SQLStatementPrepareError:
        pass
def _cleanup(self):
    try:
        rhnSQL.execute(('drop table %s') % (self.table_name))
    except rhnSQL.SQLStatementPrepareError:
        pass
def tearDown(self):
    self._cleanup()
    rhnSQL.commit()
def tearDown(self):
    self._cleanup()
    rhnSQL.commit()



Clone # 349
Distance between two fragments = 0
Clone size = 8
Source file "./server/rhnActivationKey.py"
The first line is 325
Source file "./server/rhnServerGroup.py"
The first line is 98
def startswith(s, prefix):
    return s[:len(prefix)] == prefix
def startswith(s, prefix):
    return s[:len(prefix)] == prefix
class CallableObj:
    def __init__(self, name, func):
        self.func = func
        self.name = name
    def __call__(self, *args, **kwargs):
        return apply(self.func, ((self.name)) + (args), kwargs)
class CallableObj:
    def __init__(self, name, func):
        self.func = func
        self.name = name
    def __call__(self, *args, **kwargs):
        return apply(self.func, ((self.name)) + (args), kwargs)



Clone # 350
Distance between two fragments = 3
Clone size = 8
Source file "./satellite_tools/diskImportLib.py"
The first line is 149
Source file "./satellite_tools/diskImportLib.py"
The first line is 140
class ProductNamesContainer(xmlSource.ProductNamesContainer):
    def endContainerCallback(self):
        if not self.batch:
            return None
        importer = productNamesImport.ProductNamesImport(self.batch, get_backend())
        importer.run()
        self.batch = []
class BlacklistObsoletesContainer(xmlSource.BlacklistObsoletesContainer):
    def endContainerCallback(self):
        if not self.batch:
            return None
        importer = blacklistImport.BlacklistObsoletesImport(self.batch, get_backend())
        importer.run()
        self.batch = []



Clone # 351
Distance between two fragments = 3
Clone size = 8
Source file "./server/handlers/app/packages.py"
The first line is 204
Source file "./server/handlers/app/packages.py"
The first line is 149
def listMissingSourcePackages(self, channelList, username, password):
    log_debug(5, channelList, username)
    authobj = auth(username, password)
    return self._listMissingSourcePackages(authobj, channelList)
def listChannel(self, channelList, username, password):
    log_debug(5, channelList, username)
    authobj = auth(username, password)
    return self._listChannel(authobj, channelList)
def listMissingSourcePackagesBySession(self, channelList, session_string):
    log_debug(5, channelList, session_string)
    authobj = auth_session(session_string)
    return self._listMissingSourcePackages(authobj, channelList)
def listChannelBySession(self, channelList, session_string):
    log_debug(5, channelList, session_string)
    authobj = auth_session(session_string)
    return self._listChannel(authobj, channelList)



Clone # 352
Distance between two fragments = 3
Clone size = 8
Source file "./server/handlers/app/packages.py"
The first line is 204
Source file "./server/handlers/app/packages.py"
The first line is 133
def listMissingSourcePackages(self, channelList, username, password):
    log_debug(5, channelList, username)
    authobj = auth(username, password)
    return self._listMissingSourcePackages(authobj, channelList)
def listChannelSource(self, channelList, username, password):
    log_debug(5, channelList, username)
    authobj = auth(username, password)
    return self._listChannelSource(authobj, channelList)
def listMissingSourcePackagesBySession(self, channelList, session_string):
    log_debug(5, channelList, session_string)
    authobj = auth_session(session_string)
    return self._listMissingSourcePackages(authobj, channelList)
def listChannelSourceBySession(self, channelList, session_string):
    log_debug(5, channelList, session_string)
    authobj = auth_session(session_string)
    return self._listChannelSource(authobj, channelList)



Clone # 353
Distance between two fragments = 3
Clone size = 8
Source file "./server/handlers/app/packages.py"
The first line is 149
Source file "./server/handlers/app/packages.py"
The first line is 133
def listChannel(self, channelList, username, password):
    log_debug(5, channelList, username)
    authobj = auth(username, password)
    return self._listChannel(authobj, channelList)
def listChannelSource(self, channelList, username, password):
    log_debug(5, channelList, username)
    authobj = auth(username, password)
    return self._listChannelSource(authobj, channelList)
def listChannelBySession(self, channelList, session_string):
    log_debug(5, channelList, session_string)
    authobj = auth_session(session_string)
    return self._listChannel(authobj, channelList)
def listChannelSourceBySession(self, channelList, session_string):
    log_debug(5, channelList, session_string)
    authobj = auth_session(session_string)
    return self._listChannelSource(authobj, channelList)



Clone # 354
Distance between two fragments = 3
Clone size = 8
Source file "./server/handlers/app/packages.py"
The first line is 112
Source file "./server/handlers/app/packages.py"
The first line is 88
def uploadSourcePackageInfo(self, username, password, info):
    log_debug(5, username, info)
    authobj = auth(username, password)
    return self._uploadSourcePackageInfo(authobj, info)
def uploadPackageInfo(self, username, password, info):
    log_debug(5, username, info)
    authobj = auth(username, password)
    return self._uploadPackageInfo(authobj, info)
def uploadSourcePackageInfoBySession(self, session_string, info):
    log_debug(5, session_string)
    authobj = auth_session(session_string)
    return self._uploadSourcePackageInfo(authobj, info)
def uploadPackageInfoBySession(self, session_string, info):
    log_debug(5, session_string)
    authobj = auth_session(session_string)
    return self._uploadPackageInfo(authobj, info)



Clone # 355
Distance between two fragments = 2
Clone size = 8
Source file "./server/rhnServer/server_kickstart.py"
The first line is 229
Source file "./server/rhnServer/server_kickstart.py"
The first line is 198
row = get_kickstart_session_info(kickstart_session_id, server_id) row = get_kickstart_session_info(kickstart_session_id, server_id)
org_id = row['org_id'] org_id = row['org_id']
scheduler = row['scheduler'] scheduler = row['scheduler']
action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart.schedule_sync', action_name='Schedule a package sync', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='packages.runTransaction', action_name='Package delta', delta_time=0, scheduler=scheduler, org_id=org_id)



Clone # 356
Distance between two fragments = 4
Clone size = 7
Source file "./server/handlers/config_mgmt/rhn_config_management.py"
The first line is 92
Source file "./server/handlers/config/rhn_config_management.py"
The first line is 296
insert_call = rhnSQL.Function('rhn_config.insert_channel', rhnSQL.types.NUMBER()) insert_call = rhnSQL.Function('rhn_config.insert_channel', rhnSQL.types.NUMBER())
config_channel_id = insert_call(self.org_id, 'normal', config_channel_name, config_channel, config_channel_description) config_channel_id = insert_call(self.org_id, 'server_import', name, label, description)



Clone # 357
Distance between two fragments = 0
Clone size = 7
Source file "./server/test/test_xmlrpc_up2date.py"
The first line is 39
Source file "./server/test/test_solve_dependencies.py"
The first line is 40
self.directory = '/home/devel/wregglej/testrpms' self.directory = '/home/devel/wregglej/testrpms'
self.filename = 'libcaps.so' self.filename = 'libcaps.so'
self.arch = 'i386' self.arch = 'i386'
self.myserver = TestServer() self.myserver = TestServer()
self.serv_id = self.myserver.getServerId() self.serv_id = self.myserver.getServerId()
self.myserver.upload_packages(self.directory) self.myserver.upload_packages(self.directory)
self.up2date = self.myserver.getUp2date() self.up2date = self.myserver.getUp2date()



Clone # 358
Distance between two fragments = 4
Clone size = 7
Source file "./server/importlib/backend.py"
The first line is 1010
Source file "./server/importlib/backend.py"
The first line is 925
if not virt_labels:
    return None
if not c_ids:
    return None
hdel = self.dbmodule.prepare('\n delete from rhnVirtSubLevel\n where label = :vsl_label\n ') hdel = self.dbmodule.prepare('\n delete from rhnChannelFamilyMembers\n where channel_id = :channel_id\n ')
hins = self.dbmodule.prepare('\n insert into rhnVirtSubLevel \n (label, name)\n values (:vsl_label, :vsl_text)\n ') hins = self.dbmodule.prepare('\n insert into rhnChannelFamilyMembers (channel_id, channel_family_id)\n values (:channel_id, :channel_family_id)\n ')
hdel.executemany(vsl_label=virt_labels) hdel.executemany(channel_id=c_ids)



Clone # 359
Distance between two fragments = 4
Clone size = 7
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 241
Source file "./server/test/unit-test/test_rhnChannel.py"
The first line is 205
if not hasattr(self, '_counter'):
    self._counter = 0
if not hasattr(self, '_counter'):
    self._counter = 0
label = kwargs.get('label') label = kwargs.get('label')
if label is None:
    label = ('rhn-unittest-%.3f-%s') % ((time.time(), self._counter))
    self._counter = (self._counter) + (1)
if label is None:
    label = ('rhn-unittest-%.3f-%s') % ((time.time(), self._counter))
    self._counter = (self._counter) + (1)
product_url = (kwargs.get('product_url')) or ('http://rhn.redhat.com') release = (kwargs.get('release')) or (('release-') + (label))



Clone # 360
Distance between two fragments = 2
Clone size = 7
Source file "./server/rhnVirtualization.py"
The first line is 681
Source file "./server/rhnVirtualization.py"
The first line is 489
if new_values_array:
    new_values = string.join(new_values_array, ', ')
    bindings['row_id'] = existing_row['instance_id']
    update_sql = ('\n UPDATE rhnVirtualInstanceInfo SET %s WHERE instance_id=:row_id\n ') % (new_values)
    query = rhnSQL.prepare(update_sql)
    query.execute(, **bindings)
if new_values_array:
    new_values = string.join(new_values_array, ', ')
    bindings['row_id'] = existing_row['id']
    update_sql = ('\n UPDATE rhnVirtualInstance SET %s WHERE id=:row_id\n ') % (new_values)
    query = rhnSQL.prepare(update_sql)
    query.execute(, **bindings)



Clone # 361
Distance between two fragments = 2
Clone size = 7
Source file "./server/rhnDependency.py"
The first line is 349
Source file "./server/rhnDependency.py"
The first line is 340
holder[1] = string.split(holder[1], '-') holder[0] = string.split(holder[0], '-')
ret = {'name': '-'.join(holder[1][:-2]), 'version': holder[1][-2], 'release': holder[1][-1], 'epoch': holder[0]} ret = {'name': '-'.join(holder[0][:-2]), 'version': holder[0][-2], 'release': holder[0][-1], 'epoch': holder[1]}
return ret return ret



Clone # 362
Distance between two fragments = 4
Clone size = 8
Source file "./server/repomd/view.py"
The first line is 233
Source file "./server/repomd/view.py"
The first line is 164
def write_start(self):
    output = (((XML_ENCODING) + ('\n')) + (')) + (('packages="%d">') % (self.channel.num_packages))
    self.fileobj.write(output)
def write_start(self):
    output = ((((XML_ENCODING) + ('\n')) + (')) + ('xmlns:rpm="http://linux.duke.edu/metadata/rpm" ')) + (('packages="%d">') % (self.channel.num_packages))
    self.fileobj.write(output)
def write_package(self, package):
    self.fileobj.write('\n'.join(self._get_package(package)))
def write_package(self, package):
    self.fileobj.write('\n'.join(self._get_package(package)))



Clone # 363
Distance between two fragments = 4
Clone size = 8
Source file "./server/repomd/view.py"
The first line is 197
Source file "./server/repomd/view.py"
The first line is 164
def write_start(self):
    output = (((XML_ENCODING) + ('\n')) + (')) + (('packages="%d">') % (self.channel.num_packages))
    self.fileobj.write(output)
def write_start(self):
    output = ((((XML_ENCODING) + ('\n')) + (')) + ('xmlns:rpm="http://linux.duke.edu/metadata/rpm" ')) + (('packages="%d">') % (self.channel.num_packages))
    self.fileobj.write(output)
def write_package(self, package):
    self.fileobj.write('\n'.join(self._get_package(package)))
def write_package(self, package):
    self.fileobj.write('\n'.join(self._get_package(package)))



Clone # 364
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/xmlSource.py"
The first line is 651
Source file "./satellite_tools/xmlSource.py"
The first line is 634
addItem(ChannelErratumItem) addItem(FileItem)
class ReleaseItem(BaseItem):
    item_name = 'rhn-release'
    item_class = importLib.ReleaseChannelMap
    tagMap = {'channel-arch': 'channel_arch'}
class DistItem(BaseItem):
    item_name = 'rhn-dist'
    item_class = importLib.DistChannelMap
    tagMap = {'channel-arch': 'channel_arch'}
addItem(ReleaseItem) addItem(DistItem)



Clone # 365
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/xmlSource.py"
The first line is 615
Source file "./satellite_tools/xmlSource.py"
The first line is 591
addItem(ConflictsItem) addItem(ChangelogItem)
class ObsoletesItem(BaseItem):
    item_name = 'rhn-package-obsoletes-entry'
    item_class = importLib.Dependency
    tagMap = {'sense': 'flags'}
class ProvidesItem(BaseItem):
    item_name = 'rhn-package-provides-entry'
    item_class = importLib.Dependency
    tagMap = {'sense': 'flags'}
addItem(ObsoletesItem) addItem(ProvidesItem)



Clone # 366
Distance between two fragments = 1
Clone size = 7
Source file "./server/handlers/config_mgmt/rhn_config_management.py"
The first line is 348
Source file "./server/handlers/config_mgmt/rhn_config_management.py"
The first line is 216
log_debug(1) log_debug(1)
session = dict.get('session') session = dict.get('session')
self._validate_session(session) self._validate_session(session)
config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
path = dict.get('path') path = dict.get('path')
h = rhnSQL.prepare(self._query_lookup_config_file_by_channel) h = rhnSQL.prepare(self._query_list_file_revisions)
h.execute(org_id=self.org_id, config_channel=config_channel, path=path) h.execute(org_id=self.org_id, config_channel=config_channel, path=path)



Clone # 367
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 463
Source file "./satellite_tools/satComputePkgHeaders.py"
The first line is 168
h.execute() h.execute()
all_channels_hash = {} ret = {}
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    all_channels_hash[row['label']] = row
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    ret[row['label']] = row['id']



Clone # 368
Distance between two fragments = 2
Clone size = 7
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 463
Source file "./satellite_tools/sync_handlers.py"
The first line is 728
h.execute() h.execute()
all_channels_hash = {} cfs = {}
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    all_channels_hash[row['label']] = row
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    cfs[row['label']] = 1



Clone # 369
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/dumper.py"
The first line is 463
Source file "./server/apacheHandler.py"
The first line is 159
h.execute() h.execute()
all_channels_hash = {} templateStrings = {}
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    all_channels_hash[row['label']] = row
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    templateStrings[row['label']] = row['value']



Clone # 370
Distance between two fragments = 1
Clone size = 7
Source file "./server/rhnDependency.py"
The first line is 516
Source file "./server/rhnDependency.py"
The first line is 720
if len(dict) > 1:
    matches = dict.keys()
    compats = filter(lambda a: a[:7] == 'compat-', matches)
    if (len(compats) > 0) and (len(compats) < len(matches)):
        for p in compats:
            dict[p]
if len(dict) > 1:
    matches = dict.keys()
    compats = filter(lambda a: a[:7] == 'compat-', matches)
    if (len(compats) > 0) and (len(compats) < len(matches)):
        for p in compats:
            dict[p]
list_of_tuples = dict.values() l = dict.values()



Clone # 371
Distance between two fragments = 0
Clone size = 7
Source file "./server/rhnDependency.py"
The first line is 516
Source file "./server/rhnDependency.py"
The first line is 635
if len(dict) > 1:
    matches = dict.keys()
    compats = filter(lambda a: a[:7] == 'compat-', matches)
    if (len(compats) > 0) and (len(compats) < len(matches)):
        for p in compats:
            dict[p]
if len(dict) > 1:
    matches = dict.keys()
    compats = filter(lambda a: a[:7] == 'compat-', matches)
    if (len(compats) > 0) and (len(compats) < len(matches)):
        for p in compats:
            dict[p]
list_of_tuples = dict.values() list_of_tuples = dict.values()



Clone # 372
Distance between two fragments = 3
Clone size = 8
Source file "./server/rhnDependency.py"
The first line is 682
Source file "./server/rhnDependency.py"
The first line is 430
deplist = [] deplist = []
for dep in deps:
    if dep not in deplist:
        deplist.append(dep)
for dep in deps:
    if dep not in deplist:
        deplist.append(dep)
statement = ('%s UNION ALL %s UNION ALL %s') % ((__packages_sql, __provides_sql, __files_sql)) statement = ('%s UNION ALL %s UNION ALL %s') % ((__packages_all_sql, __provides_all_sql, __files_all_sql))
h = rhnSQL.prepare(statement) h = rhnSQL.prepare(statement)
packages = {} packages = {}



Clone # 373
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/satComputePkgHeaders.py"
The first line is 170
Source file "./server/rhnActivationKey.py"
The first line is 156
ret = {} ret = {}
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    ret[row['label']] = row['id']
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    ret[row['label']] = None
return ret return ret



Clone # 374
Distance between two fragments = 2
Clone size = 7
Source file "./satellite_tools/sync_handlers.py"
The first line is 730
Source file "./server/rhnActivationKey.py"
The first line is 156
cfs = {} ret = {}
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    cfs[row['label']] = 1
while 1:
    row = h.fetchone_dict()
    if not row:
        break
    ret[row['label']] = None
return cfs return ret



Clone # 375
Distance between two fragments = 0
Clone size = 7
Source file "./server/rhnDependency.py"
The first line is 700
Source file "./server/rhnDependency.py"
The first line is 608
dict = {} dict = {}
h.execute(server_id=server_id, dep=dep) h.execute(server_id=server_id, dep=dep)
rs = (h.fetchall_dict()) or ([]) rs = (h.fetchall_dict()) or ([])
if not rs:
    log_error('Unable to solve dependency', server_id, dep)
    packages[dep] = []
    continue
if not rs:
    log_error('Unable to solve dependency', server_id, dep)
    packages[dep] = []
    continue



Clone # 376
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/reposync.py"
The first line is 250
Source file "./server/action/utils.py"
The first line is 109
self.checksum = None self.package_name = package_name
self.unique_id = None self.package_info = None
self.name = None self.id = None
self.version = None self.version = None
self.release = None self.release = None
self.epoch = None self.epoch = None
self.arch = None self.arch = None



Clone # 377
Distance between two fragments = 2
Clone size = 7
Source file "./server/rhnChannel.py"
The first line is 1247
Source file "./server/rhnChannel.py"
The first line is 1408
log_debug(3, channel_id) log_debug(3, channel_id)
h = rhnSQL.prepare('\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n p.package_size \n from \n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageName pn,\n rhnPackageEVR pevr,\n rhnPackageArch pa\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.name_id = pn.id\n and p.evr_id = pevr.id\n and p.package_arch_id = pa.id\n order by pn.name, pevr.evr desc, pa.label\n ') h = rhnSQL.prepare('\n select\n p.path\n from \n rhnPackage p,\n rhnChannelPackage cp\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ')
h.execute(channel_id=str(channel_id)) h.execute(channel_id=str(channel_id))
ret = h.fetchall_dict() ret = h.fetchall()
if not ret:
    return []
if not ret:
    return []



Clone # 378
Distance between two fragments = 2
Clone size = 7
Source file "./server/rhnChannel.py"
The first line is 1174
Source file "./server/rhnChannel.py"
The first line is 1408
log_debug(3, channel_id) log_debug(3, channel_id)
h = rhnSQL.prepare("\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n full_channel.package_size \n from \n rhnPackageArch pa,\n ( select \n p.name_id,\n max(pe.evr) evr\n from\n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageEVR pe\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.evr_id = pe.id\n group by p.name_id\n ) listall,\n ( select distinct\n p.package_size,\n p.name_id,\n p.evr_id,\n p.package_arch_id\n from\n rhnChannelPackage cp,\n rhnPackage p\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ) full_channel,\n -- Rank the package's arch\n ( select\n package_arch_id, \n count(*) rank\n from\n rhnServerPackageArchCompat\n group by package_arch_id\n ) arch_rank,\n rhnPackageName pn,\n rhnPackageEVR pevr\n where\n pn.id = listall.name_id\n -- link back to the specific package\n and full_channel.name_id = listall.name_id\n and full_channel.evr_id = pevr.id\n and pevr.evr = listall.evr\n and pa.id = full_channel.package_arch_id\n and pa.id = arch_rank.package_arch_id\n order by pn.name, arch_rank.rank desc\n ") h = rhnSQL.prepare('\n select\n p.path\n from \n rhnPackage p,\n rhnChannelPackage cp\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ')
h.execute(channel_id=str(channel_id)) h.execute(channel_id=str(channel_id))
ret = h.fetchall_dict() ret = h.fetchall()
if not ret:
    return []
if not ret:
    return []



Clone # 379
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/sync_handlers.py"
The first line is 363
Source file "./satellite_tools/sync_handlers.py"
The first line is 249
def get_erratum(self, erratum_id, timestamp):
    return self._cache.cache_get(erratum_id, timestamp=timestamp)
def get_package(self, package_id, timestamp):
    return self._cache.cache_get(package_id, timestamp=timestamp)
def has_erratum(self, erratum_id, timestamp):
    return self._cache.cache_has_key(erratum_id, timestamp=timestamp)
def has_package(self, package_id, timestamp):
    return self._cache.cache_has_key(package_id, timestamp=timestamp)
def reset(self):
    self._shared_state.clear()
    self.__init__()
def reset(self):
    self._shared_state.clear()
    self.__init__()



Clone # 380
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/satsync.py"
The first line is 1653
Source file "./satellite_tools/satsync.py"
The first line is 1270
h = sync_handlers.get_errata_handler() h = sync_handlers.get_source_package_handler()
stream_loader = StreamProducer(h) stream_loader = StreamProducer(h)
if self.mountpoint:
    s = xmlDiskSource.ErrataDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getErrataXmlStream
    stream_loader.set_wire_loader(s)
if self.mountpoint:
    s = xmlDiskSource.SourcePackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getSourcePackageXmlStream
    stream_loader.set_wire_loader(s)



Clone # 381
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/satsync.py"
The first line is 1653
Source file "./satellite_tools/satsync.py"
The first line is 1094
h = sync_handlers.get_errata_handler() h = sync_handlers.get_package_handler()
stream_loader = StreamProducer(h) stream_loader = StreamProducer(h)
if self.mountpoint:
    s = xmlDiskSource.ErrataDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getErrataXmlStream
    stream_loader.set_wire_loader(s)
if self.mountpoint:
    s = xmlDiskSource.PackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getPackageXmlStream
    stream_loader.set_wire_loader(s)



Clone # 382
Distance between two fragments = 4
Clone size = 7
Source file "./server/rhnActivationKey.py"
The first line is 291
Source file "./server/rhnActivationKey.py"
The first line is 266
token_id = self._row_reg_token['id'] token_id = self._row_reg_token['id']
inserts, deletes = self._diff_hashes(db_channels, self._channels) inserts, deletes = self._diff_hashes(db_server_groups, self._server_groups)
if deletes:
    token_ids = ([token_id]) * (len(deletes))
    h = rhnSQL.prepare(self._query_delete_channels)
    h.executemany(token_id=token_ids, channel_id=deletes)
if deletes:
    token_ids = ([token_id]) * (len(deletes))
    h = rhnSQL.prepare(self._query_delete_groups)
    h.executemany(token_id=token_ids, server_group_id=deletes)



Clone # 383
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/satsync.py"
The first line is 1653
Source file "./satellite_tools/satsync.py"
The first line is 1381
h = sync_handlers.get_errata_handler() h = sync_handlers.get_kickstarts_handler()
stream_loader = StreamProducer(h) stream_loader = StreamProducer(h)
if self.mountpoint:
    s = xmlDiskSource.ErrataDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getErrataXmlStream
    stream_loader.set_wire_loader(s)
if self.mountpoint:
    s = xmlDiskSource.KickstartDataDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getKickstartsXmlStream
    stream_loader.set_wire_loader(s)



Clone # 384
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/satsync.py"
The first line is 1653
Source file "./satellite_tools/satsync.py"
The first line is 861
h = sync_handlers.get_errata_handler() h = sync_handlers.get_short_package_handler()
stream_loader = StreamProducer(h) stream_loader = StreamProducer(h)
if self.mountpoint:
    s = xmlDiskSource.ErrataDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getErrataXmlStream
    stream_loader.set_wire_loader(s)
if self.mountpoint:
    s = xmlDiskSource.ShortPackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getChannelShortPackagesXmlStream
    stream_loader.set_wire_loader(s)



Clone # 385
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/satsync.py"
The first line is 1381
Source file "./satellite_tools/satsync.py"
The first line is 1270
h = sync_handlers.get_kickstarts_handler() h = sync_handlers.get_source_package_handler()
stream_loader = StreamProducer(h) stream_loader = StreamProducer(h)
if self.mountpoint:
    s = xmlDiskSource.KickstartDataDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getKickstartsXmlStream
    stream_loader.set_wire_loader(s)
if self.mountpoint:
    s = xmlDiskSource.SourcePackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getSourcePackageXmlStream
    stream_loader.set_wire_loader(s)



Clone # 386
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/satsync.py"
The first line is 1381
Source file "./satellite_tools/satsync.py"
The first line is 1094
h = sync_handlers.get_kickstarts_handler() h = sync_handlers.get_package_handler()
stream_loader = StreamProducer(h) stream_loader = StreamProducer(h)
if self.mountpoint:
    s = xmlDiskSource.KickstartDataDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getKickstartsXmlStream
    stream_loader.set_wire_loader(s)
if self.mountpoint:
    s = xmlDiskSource.PackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getPackageXmlStream
    stream_loader.set_wire_loader(s)



Clone # 387
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/satsync.py"
The first line is 1270
Source file "./satellite_tools/satsync.py"
The first line is 861
h = sync_handlers.get_source_package_handler() h = sync_handlers.get_short_package_handler()
stream_loader = StreamProducer(h) stream_loader = StreamProducer(h)
if self.mountpoint:
    s = xmlDiskSource.SourcePackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getSourcePackageXmlStream
    stream_loader.set_wire_loader(s)
if self.mountpoint:
    s = xmlDiskSource.ShortPackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getChannelShortPackagesXmlStream
    stream_loader.set_wire_loader(s)



Clone # 388
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/satsync.py"
The first line is 1094
Source file "./satellite_tools/satsync.py"
The first line is 861
h = sync_handlers.get_package_handler() h = sync_handlers.get_short_package_handler()
stream_loader = StreamProducer(h) stream_loader = StreamProducer(h)
if self.mountpoint:
    s = xmlDiskSource.PackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getPackageXmlStream
    stream_loader.set_wire_loader(s)
if self.mountpoint:
    s = xmlDiskSource.ShortPackageDiskSource(self.mountpoint)
    stream_loader.set_disk_loader(s)
else:
    s = self.xmlWireServer.getChannelShortPackagesXmlStream
    stream_loader.set_wire_loader(s)



Clone # 389
Distance between two fragments = 4
Clone size = 8
Source file "./server/test/unit-test/test_misc_functions.py"
The first line is 105
Source file "./server/test/unit-test/test_misc_functions.py"
The first line is 85
quantity = 17 quantity = 19
misc_functions.grant_entitlements(org_id, entitlement_level, quantity) misc_functions.grant_channel_family_entitlements(org_id, channel_family, quantity)
h = rhnSQL.prepare('\n select sg.max_members quantity\n from rhnServerGroupType sgt, rhnServerGroup sg\n where sg.org_id = :org_id\n and sg.group_type = sgt.id\n and sgt.label = :entitlement_level\n ') h = rhnSQL.prepare('\n select cfp.max_members\n from rhnChannelFamily cf, rhnChannelFamilyPermissions cfp\n where cfp.org_id = :org_id\n and cfp.channel_family_id = cf.id\n and cf.label = :channel_family\n ')
h.execute(org_id=org_id, entitlement_level=entitlement_level) h.execute(org_id=org_id, channel_family=channel_family)
row = h.fetchone_dict() row = h.fetchone_dict()
self.assertNotEqual(row, None) self.assertNotEqual(row, None)



Clone # 390
Distance between two fragments = 2
Clone size = 7
Source file "./server/test/test_solve_dependencies.py"
The first line is 201
Source file "./server/test/test_solve_dependencies.py"
The first line is 193
def testMakeEvr1(self):
    nlimitstr = 'mozilla-1.5-2.rhfc1.dag:38'
    nlimit = rhnDependency.make_evr(nlimitstr)
    assert (nlimit['epoch'] == '38') and (nlimit['name'] == 'mozilla') and (nlimit['version'] == '1.5') and (nlimit['release'] == '2.rhfc1.dag')
def testMakeEvr(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    assert (nlimit['epoch'] == '38') and (nlimit['name'] == 'mozilla') and (nlimit['version'] == '1.5') and (nlimit['release'] == '2.rhfc1.dag')



Clone # 391
Distance between two fragments = 3
Clone size = 7
Source file "./server/test/test_solve_dependencies.py"
The first line is 209
Source file "./server/test/test_solve_dependencies.py"
The first line is 201
def testMakeEvr2(self):
    nlimitstr = 'mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    assert (nlimit['epoch'] == None) and (nlimit['name'] == 'mozilla') and (nlimit['version'] == '1.5') and (nlimit['release'] == '2.rhfc1.dag')
def testMakeEvr1(self):
    nlimitstr = 'mozilla-1.5-2.rhfc1.dag:38'
    nlimit = rhnDependency.make_evr(nlimitstr)
    assert (nlimit['epoch'] == '38') and (nlimit['name'] == 'mozilla') and (nlimit['version'] == '1.5') and (nlimit['release'] == '2.rhfc1.dag')



Clone # 392
Distance between two fragments = 3
Clone size = 7
Source file "./server/test/test_solve_dependencies.py"
The first line is 209
Source file "./server/test/test_solve_dependencies.py"
The first line is 193
def testMakeEvr2(self):
    nlimitstr = 'mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    assert (nlimit['epoch'] == None) and (nlimit['name'] == 'mozilla') and (nlimit['version'] == '1.5') and (nlimit['release'] == '2.rhfc1.dag')
def testMakeEvr(self):
    nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
    nlimit = rhnDependency.make_evr(nlimitstr)
    assert (nlimit['epoch'] == '38') and (nlimit['name'] == 'mozilla') and (nlimit['version'] == '1.5') and (nlimit['release'] == '2.rhfc1.dag')



Clone # 393
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/xmlDiskSource.py"
The first line is 210
Source file "./satellite_tools/xmlDiskSource.py"
The first line is 96
class BlacklistsDiskSource(DiskSource):
    subdir = 'blacklists'
    def _getFile(self, create=0):
        dirname = self._getDir(create)
        if (create) and (not os.path.isdir(dirname)):
            createPath(dirname, logging=0)
        return ('%s/blacklists.xml') % (dirname)
class ChannelFamilyDiskSource(DiskSource):
    subdir = 'channel_families'
    def _getFile(self, create=0):
        dirname = self._getDir(create)
        if (create) and (not os.path.isdir(dirname)):
            createPath(dirname, logging=0)
        return ('%s/channel_families.xml') % (dirname)



Clone # 394
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/xmlDiskSource.py"
The first line is 210
Source file "./satellite_tools/xmlDiskSource.py"
The first line is 85
class BlacklistsDiskSource(DiskSource):
    subdir = 'blacklists'
    def _getFile(self, create=0):
        dirname = self._getDir(create)
        if (create) and (not os.path.isdir(dirname)):
            createPath(dirname, logging=0)
        return ('%s/blacklists.xml') % (dirname)
class ProductnamesDiskSource(DiskSource):
    subdir = 'product_names'
    def _getFile(self, create=0):
        dirname = self._getDir(create)
        if (create) and (not os.path.isdir(dirname)):
            createPath(dirname, logging=0)
        return ('%s/product_names.xml') % (dirname)



Clone # 395
Distance between two fragments = 3
Clone size = 7
Source file "./satellite_tools/xmlDiskSource.py"
The first line is 96
Source file "./satellite_tools/xmlDiskSource.py"
The first line is 85
class ChannelFamilyDiskSource(DiskSource):
    subdir = 'channel_families'
    def _getFile(self, create=0):
        dirname = self._getDir(create)
        if (create) and (not os.path.isdir(dirname)):
            createPath(dirname, logging=0)
        return ('%s/channel_families.xml') % (dirname)
class ProductnamesDiskSource(DiskSource):
    subdir = 'product_names'
    def _getFile(self, create=0):
        dirname = self._getDir(create)
        if (create) and (not os.path.isdir(dirname)):
            createPath(dirname, logging=0)
        return ('%s/product_names.xml') % (dirname)



Clone # 396
Distance between two fragments = 2
Clone size = 7
Source file "./server/handlers/xmlrpc/registration.py"
The first line is 1080
Source file "./server/handlers/xmlrpc/registration.py"
The first line is 1070
def privacy_statement(self, lang=None):
    log_debug(1, ('lang: %s') % (lang))
    if lang:
        cat.setlangs(lang)
    msg = _('Red Hat Network Privacy Statement')
    rhnFlags.set('compress_response', 1)
    return msg
def welcome_message(self, lang=None):
    log_debug(1, ('lang: %s') % (lang))
    if lang:
        cat.setlangs(lang)
    msg = _('Red Hat Network Welcome Message')
    rhnFlags.set('compress_response', 1)
    return msg



Clone # 397
Distance between two fragments = 4
Clone size = 7
Source file "./server/rhnPackage.py"
The first line is 162
Source file "./server/rhnPackage.py"
The first line is 89
if row['path'] is None:
    log_error('Package path null for package id', row['id'])
    raise rhnFault(17, (_('Invalid RPM package %s requested')) % (str(pkg)))
if max_row['path'] is None:
    log_error('Package path null for package id', max_row['id'])
    raise rhnFault(17, (_('Invalid RPM package %s requested')) % (pkg_spec))
filePath = ('%s/%s') % ((CFG.MOUNT_POINT, row['path'])) filePath = ('%s/%s') % ((CFG.MOUNT_POINT, max_row['path']))
if not os.access(filePath, os.R_OK):
    log_error('Package not found', filePath)
    raise rhnFault(17, _('Package not found'))
if not os.access(filePath, os.R_OK):
    log_error('Package not found', filePath)
    raise rhnFault(17, _('Package not found'))



Clone # 398
Distance between two fragments = 3
Clone size = 7
Source file "./server/repomd/repository.py"
The first line is 87
Source file "./server/repomd/repository.py"
The first line is 75
def get_other_xml_file(self):
    ret = self.get_other_cache()
    if not ret:
        viewobj = self.get_other_view()
        self.generate_files([viewobj])
        ret = self.get_other_cache()
    return ret
def get_primary_xml_file(self):
    ret = self.get_primary_cache()
    if not ret:
        viewobj = self.get_primary_view()
        self.generate_files([viewobj])
        ret = self.get_primary_cache()
    return ret



Clone # 399
Distance between two fragments = 3
Clone size = 7
Source file "./server/repomd/repository.py"
The first line is 99
Source file "./server/repomd/repository.py"
The first line is 87
def get_filelists_xml_file(self):
    ret = self.get_filelists_cache()
    if not ret:
        viewobj = self.get_filelists_view()
        self.generate_files([viewobj])
        ret = self.get_filelists_cache()
    return ret
def get_other_xml_file(self):
    ret = self.get_other_cache()
    if not ret:
        viewobj = self.get_other_view()
        self.generate_files([viewobj])
        ret = self.get_other_cache()
    return ret



Clone # 400
Distance between two fragments = 3
Clone size = 7
Source file "./server/repomd/repository.py"
The first line is 99
Source file "./server/repomd/repository.py"
The first line is 75
def get_filelists_xml_file(self):
    ret = self.get_filelists_cache()
    if not ret:
        viewobj = self.get_filelists_view()
        self.generate_files([viewobj])
        ret = self.get_filelists_cache()
    return ret
def get_primary_xml_file(self):
    ret = self.get_primary_cache()
    if not ret:
        viewobj = self.get_primary_view()
        self.generate_files([viewobj])
        ret = self.get_primary_cache()
    return ret



Clone # 401
Distance between two fragments = 4
Clone size = 7
Source file "./server/importlib/archImport.py"
The first line is 119
Source file "./server/importlib/archImport.py"
The first line is 101
arches1_lookup_method_name = 'lookupChannelArches' arches1_lookup_method_name = 'lookupServerArches'
arches2_lookup_method_name = 'lookupPackageArches' arches2_lookup_method_name = 'lookupPackageArches'
arches1_name = 'channel-arch' arches1_name = 'server-arch'
arches2_name = 'package-arch' arches2_name = 'package-arch'
arches1_field_name = 'channel_arch_id' arches1_field_name = 'server_arch_id'
arches2_field_name = 'package_arch_id' arches2_field_name = 'package_arch_id'
submit_method_name = 'processChannelPackageArchCompatMap' submit_method_name = 'processServerPackageArchCompatMap'



Clone # 402
Distance between two fragments = 4
Clone size = 7
Source file "./server/importlib/archImport.py"
The first line is 110
Source file "./server/importlib/archImport.py"
The first line is 101
arches1_lookup_method_name = 'lookupServerArches' arches1_lookup_method_name = 'lookupServerArches'
arches2_lookup_method_name = 'lookupChannelArches' arches2_lookup_method_name = 'lookupPackageArches'
arches1_name = 'server-arch' arches1_name = 'server-arch'
arches2_name = 'channel-arch' arches2_name = 'package-arch'
arches1_field_name = 'server_arch_id' arches1_field_name = 'server_arch_id'
arches2_field_name = 'channel_arch_id' arches2_field_name = 'package_arch_id'
submit_method_name = 'processServerChannelArchCompatMap' submit_method_name = 'processServerPackageArchCompatMap'



Clone # 403
Distance between two fragments = 4
Clone size = 7
Source file "./server/importlib/archImport.py"
The first line is 110
Source file "./server/importlib/archImport.py"
The first line is 129
arches1_lookup_method_name = 'lookupServerArches' arches1_lookup_method_name = 'lookupServerArches'
arches2_lookup_method_name = 'lookupChannelArches' arches2_lookup_method_name = 'lookupServerGroupTypes'
arches1_name = 'server-arch' arches1_name = 'server-arch'
arches2_name = 'channel-arch' arches2_name = 'server-group-type'
arches1_field_name = 'server_arch_id' arches1_field_name = 'server_arch_id'
arches2_field_name = 'channel_arch_id' arches2_field_name = 'server_group_type'
submit_method_name = 'processServerChannelArchCompatMap' submit_method_name = 'processServerGroupServerArchCompatMap'



Clone # 404
Distance between two fragments = 4
Clone size = 7
Source file "./server/importlib/archImport.py"
The first line is 101
Source file "./server/importlib/archImport.py"
The first line is 129
arches1_lookup_method_name = 'lookupServerArches' arches1_lookup_method_name = 'lookupServerArches'
arches2_lookup_method_name = 'lookupPackageArches' arches2_lookup_method_name = 'lookupServerGroupTypes'
arches1_name = 'server-arch' arches1_name = 'server-arch'
arches2_name = 'package-arch' arches2_name = 'server-group-type'
arches1_field_name = 'server_arch_id' arches1_field_name = 'server_arch_id'
arches2_field_name = 'package_arch_id' arches2_field_name = 'server_group_type'
submit_method_name = 'processServerPackageArchCompatMap' submit_method_name = 'processServerGroupServerArchCompatMap'



Clone # 405
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 418
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 384
query = '\n\t\t select rktf.relative_filename "relative-path", \n\t\t c.checksum_type "checksum-type", c.checksum,\n rktf.file_size "file-size",\n\t\t TO_CHAR(rktf.last_modified, \'YYYYMMDDHH24MISS\') "last-modified", \n\t\t\t rkt.base_path "base-path",\n\t\t rkt.label label, \n\t\t\t TO_CHAR(rkt.modified, \'YYYYMMDDHH24MISS\') "modified"\n\t\t from rhnKSTreeFile rktf, rhnKickstartableTree rkt,\n rhnChecksumView c\n\t\t where rktf.kstree_id = :kstree_id\n\t\t and rkt.id = rktf.kstree_id\n and rktf.checksum_id = c.id\n\t ' query = "\n\t select kt.id kstree_id, kt.label kickstart_label, \n\t\t TO_CHAR(kt.last_modified, 'YYYYMMDDHH24MISS') last_modified\n\t\t from rhnKickstartableTree kt\n\t\t where kt.channel_id = :channel_id\n\t\t "
if self.start_date:
    query += "\n\t\t and rkt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n\t\t and rkt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n "
if self.start_date:
    query += "\n\t\t and (kt.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n\t\t or kt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n\t\t and (kt.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and kt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n\t\t and kt.org_id is Null\n "
self.kickstart_files_query = rhnSQL.Statement(query) self.kickstart_trees_query = rhnSQL.Statement(query)
kickstart_files = rhnSQL.prepare(self.kickstart_files_query) kickstart_data = rhnSQL.prepare(self.kickstart_trees_query)



Clone # 406
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 418
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 347
query = '\n\t\t select rktf.relative_filename "relative-path", \n\t\t c.checksum_type "checksum-type", c.checksum,\n rktf.file_size "file-size",\n\t\t TO_CHAR(rktf.last_modified, \'YYYYMMDDHH24MISS\') "last-modified", \n\t\t\t rkt.base_path "base-path",\n\t\t rkt.label label, \n\t\t\t TO_CHAR(rkt.modified, \'YYYYMMDDHH24MISS\') "modified"\n\t\t from rhnKSTreeFile rktf, rhnKickstartableTree rkt,\n rhnChecksumView c\n\t\t where rktf.kstree_id = :kstree_id\n\t\t and rkt.id = rktf.kstree_id\n and rktf.checksum_id = c.id\n\t ' query = '\n select e.id errata_id,\n\t\t TO_CHAR(e.last_modified,\'YYYYMMDDHH24MISS\') last_modified,\n\t\t e.advisory_name "advisory-name"\n\t from rhnChannelErrata ce, rhnErrata e\n\t\t where ce.channel_id = :channel_id\n\t\t and ce.errata_id = e.id\n\t\t'
if self.start_date:
    query += "\n\t\t and rkt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n\t\t and rkt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n "
if self.start_date:
    query += "\n and (ce.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or e.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n and (ce.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and e.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.kickstart_files_query = rhnSQL.Statement(query) self.errata_query = rhnSQL.Statement(query)
kickstart_files = rhnSQL.prepare(self.kickstart_files_query) errata_data = rhnSQL.prepare(self.errata_query)



Clone # 407
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 418
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 273
query = '\n\t\t select rktf.relative_filename "relative-path", \n\t\t c.checksum_type "checksum-type", c.checksum,\n rktf.file_size "file-size",\n\t\t TO_CHAR(rktf.last_modified, \'YYYYMMDDHH24MISS\') "last-modified", \n\t\t\t rkt.base_path "base-path",\n\t\t rkt.label label, \n\t\t\t TO_CHAR(rkt.modified, \'YYYYMMDDHH24MISS\') "modified"\n\t\t from rhnKSTreeFile rktf, rhnKickstartableTree rkt,\n rhnChecksumView c\n\t\t where rktf.kstree_id = :kstree_id\n\t\t and rkt.id = rktf.kstree_id\n and rktf.checksum_id = c.id\n\t ' query = "\n select rp.id package_id, \n\t\t TO_CHAR(rp.last_modified, 'YYYYMMDDHH24MISS') last_modified\n\t\t from rhnPackage rp, rhnChannelPackage rcp\n\t\t where rcp.channel_id = :channel_id\n\t\t and rcp.package_id = rp.id\n\t\t"
if self.start_date:
    query += "\n\t\t and rkt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n\t\t and rkt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n "
if self.start_date:
    query += "\n and (rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS') \n )\n and (rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.kickstart_files_query = rhnSQL.Statement(query) self.package_query = rhnSQL.Statement(query)
kickstart_files = rhnSQL.prepare(self.kickstart_files_query) package_data = rhnSQL.prepare(self.package_query)



Clone # 408
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 384
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 347
query = "\n\t select kt.id kstree_id, kt.label kickstart_label, \n\t\t TO_CHAR(kt.last_modified, 'YYYYMMDDHH24MISS') last_modified\n\t\t from rhnKickstartableTree kt\n\t\t where kt.channel_id = :channel_id\n\t\t " query = '\n select e.id errata_id,\n\t\t TO_CHAR(e.last_modified,\'YYYYMMDDHH24MISS\') last_modified,\n\t\t e.advisory_name "advisory-name"\n\t from rhnChannelErrata ce, rhnErrata e\n\t\t where ce.channel_id = :channel_id\n\t\t and ce.errata_id = e.id\n\t\t'
if self.start_date:
    query += "\n\t\t and (kt.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n\t\t or kt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n\t\t and (kt.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and kt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n\t\t and kt.org_id is Null\n "
if self.start_date:
    query += "\n and (ce.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or e.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n and (ce.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and e.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.kickstart_trees_query = rhnSQL.Statement(query) self.errata_query = rhnSQL.Statement(query)
kickstart_data = rhnSQL.prepare(self.kickstart_trees_query) errata_data = rhnSQL.prepare(self.errata_query)



Clone # 409
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 402
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 369
self.kickstart_trees = [] self.errata_info = []
log2stdout(1, 'Gathering kickstart data...') log2stdout(1, 'Gathering errata info...')
for channel_id in self.channel_ids:
    kickstart_data.execute(channel_id=channel_id['channel_id'], **dates)
    a_tree = (kickstart_data.fetchall_dict()) or ([])
    if a_tree:
        self.kickstart_trees = (self.kickstart_trees) + (a_tree)
for channel_id in self.channel_ids:
    errata_data.execute(channel_id=channel_id['channel_id'], **dates)
    an_errata = (errata_data.fetchall_dict()) or ([])
    if an_errata:
        self.errata_info = (self.errata_info) + (an_errata)



Clone # 410
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 384
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 273
query = "\n\t select kt.id kstree_id, kt.label kickstart_label, \n\t\t TO_CHAR(kt.last_modified, 'YYYYMMDDHH24MISS') last_modified\n\t\t from rhnKickstartableTree kt\n\t\t where kt.channel_id = :channel_id\n\t\t " query = "\n select rp.id package_id, \n\t\t TO_CHAR(rp.last_modified, 'YYYYMMDDHH24MISS') last_modified\n\t\t from rhnPackage rp, rhnChannelPackage rcp\n\t\t where rcp.channel_id = :channel_id\n\t\t and rcp.package_id = rp.id\n\t\t"
if self.start_date:
    query += "\n\t\t and (kt.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n\t\t or kt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n\t\t and (kt.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and kt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n\t\t and kt.org_id is Null\n "
if self.start_date:
    query += "\n and (rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS') \n )\n and (rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.kickstart_trees_query = rhnSQL.Statement(query) self.package_query = rhnSQL.Statement(query)
kickstart_data = rhnSQL.prepare(self.kickstart_trees_query) package_data = rhnSQL.prepare(self.package_query)



Clone # 411
Distance between two fragments = 4
Clone size = 8
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 402
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 294
self.kickstart_trees = [] self.pkg_info = []
log2stdout(1, 'Gathering kickstart data...') log2stdout(1, 'Gathering package info...')
for channel_id in self.channel_ids:
    kickstart_data.execute(channel_id=channel_id['channel_id'], **dates)
    a_tree = (kickstart_data.fetchall_dict()) or ([])
    if a_tree:
        self.kickstart_trees = (self.kickstart_trees) + (a_tree)
for channel_id in self.channel_ids:
    package_data.execute(channel_id=channel_id['channel_id'], **dates)
    a_package = (package_data.fetchall_dict()) or ([])
    if a_package:
        self.pkg_info = (self.pkg_info) + (a_package)



Clone # 412
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 347
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 273
query = '\n select e.id errata_id,\n\t\t TO_CHAR(e.last_modified,\'YYYYMMDDHH24MISS\') last_modified,\n\t\t e.advisory_name "advisory-name"\n\t from rhnChannelErrata ce, rhnErrata e\n\t\t where ce.channel_id = :channel_id\n\t\t and ce.errata_id = e.id\n\t\t' query = "\n select rp.id package_id, \n\t\t TO_CHAR(rp.last_modified, 'YYYYMMDDHH24MISS') last_modified\n\t\t from rhnPackage rp, rhnChannelPackage rcp\n\t\t where rcp.channel_id = :channel_id\n\t\t and rcp.package_id = rp.id\n\t\t"
if self.start_date:
    query += "\n and (ce.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or e.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n and (ce.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and e.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
if self.start_date:
    query += "\n and (rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS') \n )\n and (rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.errata_query = rhnSQL.Statement(query) self.package_query = rhnSQL.Statement(query)
errata_data = rhnSQL.prepare(self.errata_query) package_data = rhnSQL.prepare(self.package_query)



Clone # 413
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 369
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 294
self.errata_info = [] self.pkg_info = []
log2stdout(1, 'Gathering errata info...') log2stdout(1, 'Gathering package info...')
for channel_id in self.channel_ids:
    errata_data.execute(channel_id=channel_id['channel_id'], **dates)
    an_errata = (errata_data.fetchall_dict()) or ([])
    if an_errata:
        self.errata_info = (self.errata_info) + (an_errata)
for channel_id in self.channel_ids:
    package_data.execute(channel_id=channel_id['channel_id'], **dates)
    a_package = (package_data.fetchall_dict()) or ([])
    if a_package:
        self.pkg_info = (self.pkg_info) + (a_package)



Clone # 414
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 418
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 239
query = '\n\t\t select rktf.relative_filename "relative-path", \n\t\t c.checksum_type "checksum-type", c.checksum,\n rktf.file_size "file-size",\n\t\t TO_CHAR(rktf.last_modified, \'YYYYMMDDHH24MISS\') "last-modified", \n\t\t\t rkt.base_path "base-path",\n\t\t rkt.label label, \n\t\t\t TO_CHAR(rkt.modified, \'YYYYMMDDHH24MISS\') "modified"\n\t\t from rhnKSTreeFile rktf, rhnKickstartableTree rkt,\n rhnChecksumView c\n\t\t where rktf.kstree_id = :kstree_id\n\t\t and rkt.id = rktf.kstree_id\n and rktf.checksum_id = c.id\n\t ' query = '\n select rcp.package_id id, rp.path path\n\t\t from rhnChannelPackage rcp, rhnPackage rp\n\t\t where rcp.package_id = rp.id\n\t\t and rcp.channel_id = :channel_id\n '
if self.start_date:
    query += "\n\t\t and rkt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n\t\t and rkt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n "
if self.start_date:
    query += "\n and (rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS') \n )\n and (rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.kickstart_files_query = rhnSQL.Statement(query) self.brpm_query = rhnSQL.Statement(query)
kickstart_files = rhnSQL.prepare(self.kickstart_files_query) brpm_data = rhnSQL.prepare(self.brpm_query)



Clone # 415
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 384
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 239
query = "\n\t select kt.id kstree_id, kt.label kickstart_label, \n\t\t TO_CHAR(kt.last_modified, 'YYYYMMDDHH24MISS') last_modified\n\t\t from rhnKickstartableTree kt\n\t\t where kt.channel_id = :channel_id\n\t\t " query = '\n select rcp.package_id id, rp.path path\n\t\t from rhnChannelPackage rcp, rhnPackage rp\n\t\t where rcp.package_id = rp.id\n\t\t and rcp.channel_id = :channel_id\n '
if self.start_date:
    query += "\n\t\t and (kt.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n\t\t or kt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n\t\t and (kt.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and kt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n\t\t and kt.org_id is Null\n "
if self.start_date:
    query += "\n and (rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS') \n )\n and (rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.kickstart_trees_query = rhnSQL.Statement(query) self.brpm_query = rhnSQL.Statement(query)
kickstart_data = rhnSQL.prepare(self.kickstart_trees_query) brpm_data = rhnSQL.prepare(self.brpm_query)



Clone # 416
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 347
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 239
query = '\n select e.id errata_id,\n\t\t TO_CHAR(e.last_modified,\'YYYYMMDDHH24MISS\') last_modified,\n\t\t e.advisory_name "advisory-name"\n\t from rhnChannelErrata ce, rhnErrata e\n\t\t where ce.channel_id = :channel_id\n\t\t and ce.errata_id = e.id\n\t\t' query = '\n select rcp.package_id id, rp.path path\n\t\t from rhnChannelPackage rcp, rhnPackage rp\n\t\t where rcp.package_id = rp.id\n\t\t and rcp.channel_id = :channel_id\n '
if self.start_date:
    query += "\n and (ce.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or e.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n and (ce.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and e.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
if self.start_date:
    query += "\n and (rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS') \n )\n and (rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.errata_query = rhnSQL.Statement(query) self.brpm_query = rhnSQL.Statement(query)
errata_data = rhnSQL.prepare(self.errata_query) brpm_data = rhnSQL.prepare(self.brpm_query)



Clone # 417
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 273
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 239
query = "\n select rp.id package_id, \n\t\t TO_CHAR(rp.last_modified, 'YYYYMMDDHH24MISS') last_modified\n\t\t from rhnPackage rp, rhnChannelPackage rcp\n\t\t where rcp.channel_id = :channel_id\n\t\t and rcp.package_id = rp.id\n\t\t" query = '\n select rcp.package_id id, rp.path path\n\t\t from rhnChannelPackage rcp, rhnPackage rp\n\t\t where rcp.package_id = rp.id\n\t\t and rcp.channel_id = :channel_id\n '
if self.start_date:
    query += "\n and (rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS') \n )\n and (rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
if self.start_date:
    query += "\n and (rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS') \n )\n and (rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.package_query = rhnSQL.Statement(query) self.brpm_query = rhnSQL.Statement(query)
package_data = rhnSQL.prepare(self.package_query) brpm_data = rhnSQL.prepare(self.brpm_query)



Clone # 418
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 314
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 418
query = "\n select ps.id package_id, \n\t\t TO_CHAR(ps.last_modified,'YYYYMMDDHH24MISS') last_modified, ps.source_rpm_id source_rpm_id\n from rhnPackageSource ps\n\t\t" query = '\n\t\t select rktf.relative_filename "relative-path", \n\t\t c.checksum_type "checksum-type", c.checksum,\n rktf.file_size "file-size",\n\t\t TO_CHAR(rktf.last_modified, \'YYYYMMDDHH24MISS\') "last-modified", \n\t\t\t rkt.base_path "base-path",\n\t\t rkt.label label, \n\t\t\t TO_CHAR(rkt.modified, \'YYYYMMDDHH24MISS\') "modified"\n\t\t from rhnKSTreeFile rktf, rhnKickstartableTree rkt,\n rhnChecksumView c\n\t\t where rktf.kstree_id = :kstree_id\n\t\t and rkt.id = rktf.kstree_id\n and rktf.checksum_id = c.id\n\t '
if self.start_date:
    query += "\n\t where (ps.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or ps.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n\t and (ps.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and ps.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
if self.start_date:
    query += "\n\t\t and rkt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n\t\t and rkt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n "
self.source_package_query = rhnSQL.Statement(query) self.kickstart_files_query = rhnSQL.Statement(query)
source_package_data = rhnSQL.prepare(self.source_package_query) kickstart_files = rhnSQL.prepare(self.kickstart_files_query)



Clone # 419
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 314
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 384
query = "\n select ps.id package_id, \n\t\t TO_CHAR(ps.last_modified,'YYYYMMDDHH24MISS') last_modified, ps.source_rpm_id source_rpm_id\n from rhnPackageSource ps\n\t\t" query = "\n\t select kt.id kstree_id, kt.label kickstart_label, \n\t\t TO_CHAR(kt.last_modified, 'YYYYMMDDHH24MISS') last_modified\n\t\t from rhnKickstartableTree kt\n\t\t where kt.channel_id = :channel_id\n\t\t "
if self.start_date:
    query += "\n\t where (ps.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or ps.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n\t and (ps.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and ps.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
if self.start_date:
    query += "\n\t\t and (kt.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n\t\t or kt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n\t\t and (kt.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and kt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n\t\t and kt.org_id is Null\n "
self.source_package_query = rhnSQL.Statement(query) self.kickstart_trees_query = rhnSQL.Statement(query)
source_package_data = rhnSQL.prepare(self.source_package_query) kickstart_data = rhnSQL.prepare(self.kickstart_trees_query)



Clone # 420
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 314
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 347
query = "\n select ps.id package_id, \n\t\t TO_CHAR(ps.last_modified,'YYYYMMDDHH24MISS') last_modified, ps.source_rpm_id source_rpm_id\n from rhnPackageSource ps\n\t\t" query = '\n select e.id errata_id,\n\t\t TO_CHAR(e.last_modified,\'YYYYMMDDHH24MISS\') last_modified,\n\t\t e.advisory_name "advisory-name"\n\t from rhnChannelErrata ce, rhnErrata e\n\t\t where ce.channel_id = :channel_id\n\t\t and ce.errata_id = e.id\n\t\t'
if self.start_date:
    query += "\n\t where (ps.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or ps.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n\t and (ps.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and ps.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
if self.start_date:
    query += "\n and (ce.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or e.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n and (ce.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and e.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.source_package_query = rhnSQL.Statement(query) self.errata_query = rhnSQL.Statement(query)
source_package_data = rhnSQL.prepare(self.source_package_query) errata_data = rhnSQL.prepare(self.errata_query)



Clone # 421
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 314
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 273
query = "\n select ps.id package_id, \n\t\t TO_CHAR(ps.last_modified,'YYYYMMDDHH24MISS') last_modified, ps.source_rpm_id source_rpm_id\n from rhnPackageSource ps\n\t\t" query = "\n select rp.id package_id, \n\t\t TO_CHAR(rp.last_modified, 'YYYYMMDDHH24MISS') last_modified\n\t\t from rhnPackage rp, rhnChannelPackage rcp\n\t\t where rcp.channel_id = :channel_id\n\t\t and rcp.package_id = rp.id\n\t\t"
if self.start_date:
    query += "\n\t where (ps.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or ps.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n\t and (ps.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and ps.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
if self.start_date:
    query += "\n and (rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS') \n )\n and (rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.source_package_query = rhnSQL.Statement(query) self.package_query = rhnSQL.Statement(query)
source_package_data = rhnSQL.prepare(self.source_package_query) package_data = rhnSQL.prepare(self.package_query)



Clone # 422
Distance between two fragments = 4
Clone size = 7
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 314
Source file "./satellite_tools/disk_dumper/iss.py"
The first line is 239
query = "\n select ps.id package_id, \n\t\t TO_CHAR(ps.last_modified,'YYYYMMDDHH24MISS') last_modified, ps.source_rpm_id source_rpm_id\n from rhnPackageSource ps\n\t\t" query = '\n select rcp.package_id id, rp.path path\n\t\t from rhnChannelPackage rcp, rhnPackage rp\n\t\t where rcp.package_id = rp.id\n\t\t and rcp.channel_id = :channel_id\n '
if self.start_date:
    query += "\n\t where (ps.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or ps.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n )\n\t and (ps.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and ps.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
if self.start_date:
    query += "\n and (rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')\n or rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS') \n )\n and (rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')\n )\n "
self.source_package_query = rhnSQL.Statement(query) self.brpm_query = rhnSQL.Statement(query)
source_package_data = rhnSQL.prepare(self.source_package_query) brpm_data = rhnSQL.prepare(self.brpm_query)



Clone # 423
Distance between two fragments = 1
Clone size = 7
Source file "./server/test/test_solve_dependencies.py"
The first line is 266
Source file "./server/test/test_solve_dependencies.py"
The first line is 231
nlimitstr = '38:mozilla-1.5-2.rhfc1.dag' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='>', limit=nlimitstr)



Clone # 424
Distance between two fragments = 1
Clone size = 7
Source file "./server/test/test_solve_dependencies.py"
The first line is 254
Source file "./server/test/test_solve_dependencies.py"
The first line is 231
nlimitstr = '38:mozilla-1.5-2.rhfc1.dag' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='<', limit=nlimitstr) pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='>', limit=nlimitstr)



Clone # 425
Distance between two fragments = 1
Clone size = 7
Source file "./server/test/test_solve_dependencies.py"
The first line is 242
Source file "./server/test/test_solve_dependencies.py"
The first line is 231
nlimitstr = '38:mozilla-1.5-2.rhfc1.dag' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='>=', limit=nlimitstr) pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='>', limit=nlimitstr)



Clone # 426
Distance between two fragments = 1
Clone size = 7
Source file "./server/test/test_solve_dependencies.py"
The first line is 266
Source file "./server/test/test_solve_dependencies.py"
The first line is 219
nlimitstr = '38:mozilla-1.5-2.rhfc1.dag' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='<=', limit=nlimitstr) pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='==', limit=nlimitstr)



Clone # 427
Distance between two fragments = 1
Clone size = 7
Source file "./server/test/test_solve_dependencies.py"
The first line is 254
Source file "./server/test/test_solve_dependencies.py"
The first line is 219
nlimitstr = '38:mozilla-1.5-2.rhfc1.dag' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='<', limit=nlimitstr) pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='==', limit=nlimitstr)



Clone # 428
Distance between two fragments = 1
Clone size = 7
Source file "./server/test/test_solve_dependencies.py"
The first line is 242
Source file "./server/test/test_solve_dependencies.py"
The first line is 219
nlimitstr = '38:mozilla-1.5-2.rhfc1.dag' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='>=', limit=nlimitstr) pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='==', limit=nlimitstr)



Clone # 429
Distance between two fragments = 1
Clone size = 7
Source file "./server/test/test_solve_dependencies.py"
The first line is 231
Source file "./server/test/test_solve_dependencies.py"
The first line is 219
nlimitstr = '38:mozilla-1.5-2.rhfc1.dag' nlimitstr = '38:mozilla-1.5-2.rhfc1.dag'
nlimit = rhnDependency.make_evr(nlimitstr) nlimit = rhnDependency.make_evr(nlimitstr)
pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='>', limit=nlimitstr) pack = self.solve_deps_with_limits(self.serv_id, [self.filename], 2, limit_operator='==', limit=nlimitstr)



Clone # 430
Distance between two fragments = 3
Clone size = 7
Source file "./server/rhnServer/server_token.py"
The first line is 1106
Source file "./server/rhnServer/server_token.py"
The first line is 1072
report.write('Config Channel Subscription Information:\n') report.write('Channel Subscription Information:\n')
report.write('
    \n')
report.write('
    \n')
for c in history['config_channels']:
    report.write(('
  • %s
  • \n') % (c))
    for c in history['channels']:
        report.write(('
  • %s
  • \n') % (c))
    if len(history['config_channels']) == 0:
        report.write('
  • The token does not include default configuration channels
  • \n'
    )
    if len(history['channels']) == 0:
        report.write('
  • The token does not include default Channel Subscriptions
  • \n'
    )
    report.write('\n') report.write('\n')



    Clone # 431
    Distance between two fragments = 4
    Clone size = 7
    Source file "./server/rhnServer/server_token.py"
    The first line is 1093
    Source file "./server/rhnServer/server_token.py"
    The first line is 1072
    report.write('Packages Scheduled for Installation:\n') report.write('Channel Subscription Information:\n')
    report.write('
      \n')
    report.write('
      \n')
    for p in history['packages']:
        report.write(('
  • %s
  • \n') % (p))
    for c in history['channels']:
        report.write(('
  • %s
  • \n') % (c))
    if len(history['packages']) == 0:
        report.write('
  • No packages scheduled for automatic installation
  • \n'
    )
    if len(history['channels']) == 0:
        report.write('
  • The token does not include default Channel Subscriptions
  • \n'
    )
    report.write('\n') report.write('\n')



    Clone # 432
    Distance between two fragments = 4
    Clone size = 7
    Source file "./server/rhnServer/server_token.py"
    The first line is 1082
    Source file "./server/rhnServer/server_token.py"
    The first line is 1072
    report.write('System Group Membership Information:\n') report.write('Channel Subscription Information:\n')
    report.write('
      \n')
    report.write('
      \n')
    for g in history['groups']:
        report.write(('
  • %s
  • \n') % (g))
    for c in history['channels']:
        report.write(('
  • %s
  • \n') % (c))
    if len(history['groups']) == 0:
        report.write('
  • The token does not include default System Group Membership
  • \n'
    )
    if len(history['channels']) == 0:
        report.write('
  • The token does not include default Channel Subscriptions
  • \n'
    )
    report.write('\n') report.write('\n')



    Clone # 433
    Distance between two fragments = 4
    Clone size = 7
    Source file "./satellite_tools/xmlSource.py"
    The first line is 1083
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 241
    handler.set_container(PackageArchContainer()) handler.set_container(ChannelArchContainer())
    handler.set_container(ChannelArchContainer()) handler.set_container(PackageArchContainer())
    handler.set_container(CPUArchContainer()) handler.set_container(ServerArchContainer())
    handler.set_container(ServerPackageArchCompatContainer()) handler.set_container(ServerPackageArchCompatContainer())
    handler.set_container(ServerChannelArchCompatContainer()) handler.set_container(ServerChannelArchCompatContainer())
    handler.set_container(ChannelPackageArchCompatContainer()) handler.set_container(ChannelPackageArchCompatContainer())
    handler.set_container(ServerGroupServerArchCompatContainer()) handler.set_container(CPUArchContainer())



    Clone # 434
    Distance between two fragments = 3
    Clone size = 7
    Source file "./satellite_tools/gentree.py"
    The first line is 284
    Source file "./satellite_tools/gentree.py"
    The first line is 207
    dumper.prune(pkgIds) dumper.prune(errata)
    for pkg in pkgIds:
        package_source.setID(pkg)
        stream = package_source.load()
        dumper.setID(pkg)
        dumper.setInputStream(stream)
        dumper.dump(force=force)
    for err in errata:
        errata_source.setID(err)
        stream = errata_source.load()
        dumper.setID(err)
        dumper.setInputStream(stream)
        dumper.dump(force=force)



    Clone # 435
    Distance between two fragments = 4
    Clone size = 7
    Source file "./server/handlers/app/channel.py"
    The first line is 454
    Source file "./server/handlers/app/channel.py"
    The first line is 162
    h = rhnSQL.prepare('\n insert into rhnDistChannelMap \n (channel_id, channel_arch_id, os, release)\n values\n (:channel_id, :channel_arch_id, :os, :release)\n ') h = rhnSQL.prepare(('insert into rhnChannel (%s) values (%s)') % ((field_names, bind_vars)))
    try:
        apply(h.execute, (), kwargs)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)
    try:
        apply(h.execute, (), params)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)



    Clone # 436
    Distance between two fragments = 4
    Clone size = 7
    Source file "./satellite_tools/sync_handlers.py"
    The first line is 728
    Source file "./server/apacheHandler.py"
    The first line is 159
    h.execute() h.execute()
    cfs = {} templateStrings = {}
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        cfs[row['label']] = 1
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        templateStrings[row['label']] = row['value']



    Clone # 437
    Distance between two fragments = 3
    Clone size = 7
    Source file "./server/importlib/backend.py"
    The first line is 162
    Source file "./server/rhnServer/server_packages.py"
    The first line is 214
    h.execute() h.execute()
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        hash[row['label']] = row['id']
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        package_arches_hash[row['id']] = row['label']
    return hash return package_arches_hash



    Clone # 438
    Distance between two fragments = 2
    Clone size = 7
    Source file "./server/rhnServer/server_lib.py"
    The first line is 199
    Source file "./server/rhnServer/server_class.py"
    The first line is 856
    h = rhnSQL.prepare('\n select 1 from rhnProxyInfo where server_id = :server_id\n union\n select 1 from rhnSatelliteInfo where server_id = :server_id\n ') h = rhnSQL.prepare('\n select 1\n from rhnServerLock\n where server_id = :server_id\n ')
    h.execute(server_id=server_id) h.execute(server_id=server_id)
    ret = h.fetchone_dict() row = h.fetchone_dict()
    if ret:
        return 1
    if row:
        return 1
    return 0 return 0



    Clone # 439
    Distance between two fragments = 3
    Clone size = 7
    Source file "./server/rhnServer/server_lib.py"
    The first line is 199
    Source file "./server/rhnUser.py"
    The first line is 438
    h = rhnSQL.prepare('\n select 1 from rhnProxyInfo where server_id = :server_id\n union\n select 1 from rhnSatelliteInfo where server_id = :server_id\n ') h = rhnSQL.prepare('\n select 1 from rhnWebContactDisabled\n where login_uc = upper(:username)\n ')
    h.execute(server_id=server_id) h.execute(username=username)
    ret = h.fetchone_dict() row = h.fetchone_dict()
    if ret:
        return 1
    if row:
        return 1
    return 0 return 0



    Clone # 440
    Distance between two fragments = 2
    Clone size = 7
    Source file "./server/rhnServer/server_class.py"
    The first line is 856
    Source file "./server/rhnUser.py"
    The first line is 438
    h = rhnSQL.prepare('\n select 1\n from rhnServerLock\n where server_id = :server_id\n ') h = rhnSQL.prepare('\n select 1 from rhnWebContactDisabled\n where login_uc = upper(:username)\n ')
    h.execute(server_id=server_id) h.execute(username=username)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if row:
        return 1
    if row:
        return 1
    return 0 return 0



    Clone # 441
    Distance between two fragments = 0
    Clone size = 7
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 1393
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 1348
    user = rhnUser.search(username) user = rhnUser.search(username)
    if user is None:
        log_error('invalid username', username)
        raise rhnFault(2)
    if user is None:
        log_error('invalid username', username)
        raise rhnFault(2)
    if not user.check_password(password):
        log_error('User password check failed', username)
        raise rhnFault(2)
    if not user.check_password(password):
        log_error('User password check failed', username)
        raise rhnFault(2)



    Clone # 442
    Distance between two fragments = 0
    Clone size = 7
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 1393
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 1178
    user = rhnUser.search(username) user = rhnUser.search(username)
    if user is None:
        log_error('invalid username', username)
        raise rhnFault(2)
    if user is None:
        log_error('invalid username', username)
        raise rhnFault(2)
    if not user.check_password(password):
        log_error('User password check failed', username)
        raise rhnFault(2)
    if not user.check_password(password):
        log_error('User password check failed', username)
        raise rhnFault(2)



    Clone # 443
    Distance between two fragments = 4
    Clone size = 7
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 291
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 258
    _query__get_errata_ids = rhnSQL.Statement("\n select ce.errata_id, e.advisory_name,\n TO_CHAR(e.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannelErrata ce, rhnErrata e\n where ce.channel_id = :channel_id\n and ce.errata_id = e.id\n ") _query_get_package_ids = rhnSQL.Statement('\n select package_id \n from rhnChannelPackage\n where channel_id = :channel_id\n ')
    def _get_errata_ids(self):
        channel_id = self._row['id']
        h = rhnSQL.prepare(self._query__get_errata_ids)
        h.execute(channel_id=channel_id)
        return map(lambda x: x['errata_id'], (h.fetchall_dict()) or ([]))
    def _get_package_ids(self):
        channel_id = self._row['id']
        h = rhnSQL.prepare(self._query_get_package_ids)
        h.execute(channel_id=channel_id)
        return map(lambda x: x['package_id'], (h.fetchall_dict()) or ([]))



    Clone # 444
    Distance between two fragments = 0
    Clone size = 7
    Source file "./satellite_tools/test/testxmlparser.py"
    The first line is 32
    Source file "./satellite_tools/test/testlibxml2parser.py"
    The first line is 21
    def startElement(self, element, attrs):
        print ('Start: %s') % (element)
    def startElement(self, element, attrs):
        print ('Start: %s') % (element)
    def endElement(self, element):
        print ('End: %s') % (element)
    def endElement(self, element):
        print ('End: %s') % (element)
    def characters(self, data):
        global chars
        chars.append(data)
    def characters(self, data):
        global chars
        chars.append(data)



    Clone # 445
    Distance between two fragments = 2
    Clone size = 7
    Source file "./server/importlib/channelImport.py"
    The first line is 130
    Source file "./server/importlib/channelImport.py"
    The first line is 121
    if (channel.has_key('release')) and (channel['release'] is not None):
        for release in channel['release']:
            arch = release['channel_arch']
            if self.arches[arch] is None:
                channel.ignored = 1
                raise InvalidArchError(arch, ('Unsupported channel arch %s') % (arch))
            release['channel_arch_id'] = self.arches[arch]
    if (channel.has_key('dists')) and (channel['dists'] is not None):
        for dist in channel['dists']:
            arch = dist['channel_arch']
            if self.arches[arch] is None:
                channel.ignored = 1
                raise InvalidArchError(arch, ('Unsupported channel arch %s') % (arch))
            dist['channel_arch_id'] = self.arches[arch]



    Clone # 446
    Distance between two fragments = 4
    Clone size = 7
    Source file "./server/importlib/importLib.py"
    The first line is 259
    Source file "./server/importlib/importLib.py"
    The first line is 249
    class ChangeLog(Item):
        attributeTypes = {'name': StringType, 'text': StringType, 'time': DateType}
        def __init__(self):
            Item.__init__(self, self.attributeTypes)
    class Dependency(Item):
        attributeTypes = {'name': StringType, 'version': StringType, 'flags': IntType}
        def __init__(self):
            Item.__init__(self, self.attributeTypes)



    Clone # 447
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 659
    Source file "./server/importlib/backend.py"
    The first line is 655
    def processPackageArches(self, arches):
        self.__processObjectCollection(arches, 'rhnPackageArch', uploadForce=4, ignoreUploaded=1, severityLimit=4)
    def processChannelArches(self, arches):
        self.__processObjectCollection(arches, 'rhnChannelArch', uploadForce=4, ignoreUploaded=1, severityLimit=4)
    def processServerArches(self, arches):
        self.__processObjectCollection(arches, 'rhnServerArch', uploadForce=4, ignoreUploaded=1, severityLimit=4)
    def processPackageArches(self, arches):
        self.__processObjectCollection(arches, 'rhnPackageArch', uploadForce=4, ignoreUploaded=1, severityLimit=4)



    Clone # 448
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 663
    Source file "./server/importlib/backend.py"
    The first line is 655
    def processServerArches(self, arches):
        self.__processObjectCollection(arches, 'rhnServerArch', uploadForce=4, ignoreUploaded=1, severityLimit=4)
    def processChannelArches(self, arches):
        self.__processObjectCollection(arches, 'rhnChannelArch', uploadForce=4, ignoreUploaded=1, severityLimit=4)
    def processCPUArches(self, arches):
        self.__processObjectCollection(arches, 'rhnCPUArch', uploadForce=4, ignoreUploaded=1, severityLimit=4)
    def processPackageArches(self, arches):
        self.__processObjectCollection(arches, 'rhnPackageArch', uploadForce=4, ignoreUploaded=1, severityLimit=4)



    Clone # 449
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/gentree.py"
    The first line is 222
    Source file "./satellite_tools/gentree.py"
    The first line is 117
    for ks_tree_label in ks_tree_labels:
        ksdata_source.setID(ks_tree_label)
        stream = ksdata_source.load()
        dumper.setID(ks_tree_label)
        dumper.setInputStream(stream)
        dumper.dump(force=force)
    for channel in channels:
        channel_source.setChannel(channel)
        stream = channel_source.load()
        dumper.setChannel(channel)
        dumper.setInputStream(stream)
        dumper.dump(force=force)



    Clone # 450
    Distance between two fragments = 3
    Clone size = 7
    Source file "./server/handlers/app/channel.py"
    The first line is 193
    Source file "./server/handlers/app/channel.py"
    The first line is 162
    h = rhnSQL.prepare(('update rhnChannel set %s where id = :id') % (set_clause)) h = rhnSQL.prepare(('insert into rhnChannel (%s) values (%s)') % ((field_names, bind_vars)))
    try:
        apply(h.execute, (), params)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)
    try:
        apply(h.execute, (), params)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)



    Clone # 451
    Distance between two fragments = 1
    Clone size = 6
    Source file "./server/importlib/channelImport.py"
    The first line is 372
    Source file "./server/importlib/productNamesImport.py"
    The first line is 30
    def submit(self):
        try:
            self.backend.processReleaseChannelMap(self.batch)
        except:
            self.backend.rollback()
            raise
        self.backend.commit()
    def submit(self):
        try:
            self.backend.processProductNames(self.batch)
        except:
            self.backend.rollback()
            raise
        self.backend.commit()



    Clone # 452
    Distance between two fragments = 1
    Clone size = 6
    Source file "./server/importlib/channelImport.py"
    The first line is 330
    Source file "./server/importlib/productNamesImport.py"
    The first line is 30
    def submit(self):
        try:
            self.backend.processDistChannelMap(self.batch)
        except:
            self.backend.rollback()
            raise
        self.backend.commit()
    def submit(self):
        try:
            self.backend.processProductNames(self.batch)
        except:
            self.backend.rollback()
            raise
        self.backend.commit()



    Clone # 453
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 1060
    Source file "./server/importlib/backend.py"
    The first line is 1010
    if not vsl_ids:
        return None
    if not virt_labels:
        return None
    hdel = self.dbmodule.prepare('\n delete from rhnSGTypeVirtSubLevel\n where server_group_type_id = :sgt_id\n ') hdel = self.dbmodule.prepare('\n delete from rhnVirtSubLevel\n where label = :vsl_label\n ')
    hins = self.dbmodule.prepare('\n insert into rhnSGTypeVirtSubLevel \n (virt_sub_level_id, server_group_type_id)\n values (:vsl_id, :sgt_id)\n ') hins = self.dbmodule.prepare('\n insert into rhnVirtSubLevel \n (label, name)\n values (:vsl_label, :vsl_text)\n ')



    Clone # 454
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 1060
    Source file "./server/importlib/backend.py"
    The first line is 925
    if not vsl_ids:
        return None
    if not c_ids:
        return None
    hdel = self.dbmodule.prepare('\n delete from rhnSGTypeVirtSubLevel\n where server_group_type_id = :sgt_id\n ') hdel = self.dbmodule.prepare('\n delete from rhnChannelFamilyMembers\n where channel_id = :channel_id\n ')
    hins = self.dbmodule.prepare('\n insert into rhnSGTypeVirtSubLevel \n (virt_sub_level_id, server_group_type_id)\n values (:vsl_id, :sgt_id)\n ') hins = self.dbmodule.prepare('\n insert into rhnChannelFamilyMembers (channel_id, channel_family_id)\n values (:channel_id, :channel_family_id)\n ')



    Clone # 455
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 975
    Source file "./server/importlib/backend.py"
    The first line is 1060
    if not vsl_ids:
        return None
    if not vsl_ids:
        return None
    hdel = self.dbmodule.prepare('\n delete from rhnChannelFamilyVirtSubLevel\n where channel_family_id = :channel_family_id\n ') hdel = self.dbmodule.prepare('\n delete from rhnSGTypeVirtSubLevel\n where server_group_type_id = :sgt_id\n ')
    hins = self.dbmodule.prepare('\n insert into rhnChannelFamilyVirtSubLevel \n (virt_sub_level_id, channel_family_id)\n values (:vsl_id, :channel_family_id)\n ') hins = self.dbmodule.prepare('\n insert into rhnSGTypeVirtSubLevel \n (virt_sub_level_id, server_group_type_id)\n values (:vsl_id, :sgt_id)\n ')



    Clone # 456
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 975
    Source file "./server/importlib/backend.py"
    The first line is 1010
    if not vsl_ids:
        return None
    if not virt_labels:
        return None
    hdel = self.dbmodule.prepare('\n delete from rhnChannelFamilyVirtSubLevel\n where channel_family_id = :channel_family_id\n ') hdel = self.dbmodule.prepare('\n delete from rhnVirtSubLevel\n where label = :vsl_label\n ')
    hins = self.dbmodule.prepare('\n insert into rhnChannelFamilyVirtSubLevel \n (virt_sub_level_id, channel_family_id)\n values (:vsl_id, :channel_family_id)\n ') hins = self.dbmodule.prepare('\n insert into rhnVirtSubLevel \n (label, name)\n values (:vsl_label, :vsl_text)\n ')



    Clone # 457
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 975
    Source file "./server/importlib/backend.py"
    The first line is 925
    if not vsl_ids:
        return None
    if not c_ids:
        return None
    hdel = self.dbmodule.prepare('\n delete from rhnChannelFamilyVirtSubLevel\n where channel_family_id = :channel_family_id\n ') hdel = self.dbmodule.prepare('\n delete from rhnChannelFamilyMembers\n where channel_id = :channel_id\n ')
    hins = self.dbmodule.prepare('\n insert into rhnChannelFamilyVirtSubLevel \n (virt_sub_level_id, channel_family_id)\n values (:vsl_id, :channel_family_id)\n ') hins = self.dbmodule.prepare('\n insert into rhnChannelFamilyMembers (channel_id, channel_family_id)\n values (:channel_id, :channel_family_id)\n ')



    Clone # 458
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 975
    Source file "./server/importlib/backend.py"
    The first line is 841
    if not vsl_ids:
        return None
    if not errata_channel_ids:
        return None
    hdel = self.dbmodule.prepare('\n delete from rhnChannelFamilyVirtSubLevel\n where channel_family_id = :channel_family_id\n ') hdel = self.dbmodule.prepare('\n delete from rhnErrataQueue where errata_id = :errata_id\n ')
    hins = self.dbmodule.prepare('\n insert into rhnChannelFamilyVirtSubLevel \n (virt_sub_level_id, channel_family_id)\n values (:vsl_id, :channel_family_id)\n ') h = self.dbmodule.prepare('\n insert into rhnErrataQueue (errata_id, channel_id, next_action) \n values (:errata_id, :channel_id, sysdate + :timeout / 86400)\n ')



    Clone # 459
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 1060
    Source file "./server/importlib/backend.py"
    The first line is 841
    if not vsl_ids:
        return None
    if not errata_channel_ids:
        return None
    hdel = self.dbmodule.prepare('\n delete from rhnSGTypeVirtSubLevel\n where server_group_type_id = :sgt_id\n ') hdel = self.dbmodule.prepare('\n delete from rhnErrataQueue where errata_id = :errata_id\n ')
    hins = self.dbmodule.prepare('\n insert into rhnSGTypeVirtSubLevel \n (virt_sub_level_id, server_group_type_id)\n values (:vsl_id, :sgt_id)\n ') h = self.dbmodule.prepare('\n insert into rhnErrataQueue (errata_id, channel_id, next_action) \n values (:errata_id, :channel_id, sysdate + :timeout / 86400)\n ')



    Clone # 460
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 1010
    Source file "./server/importlib/backend.py"
    The first line is 841
    if not virt_labels:
        return None
    if not errata_channel_ids:
        return None
    hdel = self.dbmodule.prepare('\n delete from rhnVirtSubLevel\n where label = :vsl_label\n ') hdel = self.dbmodule.prepare('\n delete from rhnErrataQueue where errata_id = :errata_id\n ')
    hins = self.dbmodule.prepare('\n insert into rhnVirtSubLevel \n (label, name)\n values (:vsl_label, :vsl_text)\n ') h = self.dbmodule.prepare('\n insert into rhnErrataQueue (errata_id, channel_id, next_action) \n values (:errata_id, :channel_id, sysdate + :timeout / 86400)\n ')



    Clone # 461
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 925
    Source file "./server/importlib/backend.py"
    The first line is 841
    if not c_ids:
        return None
    if not errata_channel_ids:
        return None
    hdel = self.dbmodule.prepare('\n delete from rhnChannelFamilyMembers\n where channel_id = :channel_id\n ') hdel = self.dbmodule.prepare('\n delete from rhnErrataQueue where errata_id = :errata_id\n ')
    hins = self.dbmodule.prepare('\n insert into rhnChannelFamilyMembers (channel_id, channel_family_id)\n values (:channel_id, :channel_family_id)\n ') h = self.dbmodule.prepare('\n insert into rhnErrataQueue (errata_id, channel_id, next_action) \n values (:errata_id, :channel_id, sysdate + :timeout / 86400)\n ')



    Clone # 462
    Distance between two fragments = 3
    Clone size = 6
    Source file "./test/non-unit/server/rhnSQL/dbtests.py"
    The first line is 144
    Source file "./test/non-unit/server/rhnSQL/dbtests.py"
    The first line is 152
    query = ('SELECT * FROM %s WHERE id = 1 ORDER BY id') % (self.temp_table) query = ('SELECT * FROM %s WHERE id = 1 ORDER BY id') % (self.temp_table)
    cursor = rhnSQL.prepare(query) cursor = rhnSQL.prepare(query)
    cursor.execute() cursor.execute()
    results = cursor.fetchone() results = cursor.fetchone_dict()
    self.assertEquals(TEST_IDS[0], results[0]) self.assertEquals(TEST_IDS[0], results['id'])
    self.assertEquals(TEST_NAMES[0], results[1]) self.assertEquals(TEST_NAMES[0], results['name'])



    Clone # 463
    Distance between two fragments = 4
    Clone size = 7
    Source file "./satellite_tools/syncLib.py"
    The first line is 228
    Source file "./satellite_tools/syncLib.py"
    The first line is 215
    msg = ('Error: expected %s bytes, got %s bytes') % ((self.file_size, l_file_size)) msg = ('IOError: %s') % (e)
    log(-1, msg, stream=sys.stderr) log(-1, msg, stream=sys.stderr)
    try:
        os.unlink(self.full_path)
    except:
        pass
    try:
        os.unlink(self.full_path)
    except:
        pass
    raise FileCreationError(msg) raise FileCreationError(msg)



    Clone # 464
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/rhnPackage.py"
    The first line is 354
    Source file "./server/rhnPackage.py"
    The first line is 200
    filePath = ('%s/%s') % ((CFG.MOUNT_POINT, rs['path'])) filePath = ('%s/%s') % ((CFG.MOUNT_POINT, rs['path']))
    if not os.access(filePath, os.R_OK):
        log_error('Package not found', filePath)
        raise rhnFault(17, _('Package not found'))
    if not os.access(filePath, os.R_OK):
        log_error('Package not found', filePath)
        raise rhnFault(17, _('Package not found'))
    rhnFlags.set('Download-Accelerator-Path', rs['path']) rhnFlags.set('Download-Accelerator-Path', rs['path'])
    return filePath return filePath



    Clone # 465
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/rhnPackage.py"
    The first line is 288
    Source file "./server/rhnPackage.py"
    The first line is 200
    filePath = ('%s/%s') % ((CFG.MOUNT_POINT, rs['path'])) filePath = ('%s/%s') % ((CFG.MOUNT_POINT, rs['path']))
    if not os.access(filePath, os.R_OK):
        log_error('Package not found', filePath)
        raise rhnFault(17, _('Package not found'))
    if not os.access(filePath, os.R_OK):
        log_error('Package not found', filePath)
        raise rhnFault(17, _('Package not found'))
    rhnFlags.set('Download-Accelerator-Path', rs['path']) rhnFlags.set('Download-Accelerator-Path', rs['path'])
    return filePath return filePath



    Clone # 466
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/repomd/repository.py"
    The first line is 218
    Source file "./server/repomd/repository.py"
    The first line is 209
    def get_filelists_xml_file(self):
        xml_file = self.repository.get_filelists_xml_file()
        return self.__get_compressed_file(xml_file)
    def get_primary_xml_file(self):
        xml_file = self.repository.get_primary_xml_file()
        return self.__get_compressed_file(xml_file)
    def get_updateinfo_xml_file(self):
        xml_file = self.repository.get_updateinfo_xml_file()
        return self.__get_compressed_file(xml_file)
    def get_other_xml_file(self):
        xml_file = self.repository.get_other_xml_file()
        return self.__get_compressed_file(xml_file)



    Clone # 467
    Distance between two fragments = 2
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 874
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 852
    channel_id = self._row['id'] channel_id = self._row['id']
    if LOWER_LIMIT:
        h = rhnSQL.prepare(self._query_get_kickstartable_trees_by_limits)
        h.execute(channel_id=channel_id, lower_limit=LOWER_LIMIT, upper_limit=UPPER_LIMIT)
    else:
        h = rhnSQL.prepare(self._query_get_kickstartable_trees)
        h.execute(channel_id=channel_id)
    if LOWER_LIMIT:
        h = rhnSQL.prepare(self._query__get_errata_ids_by_limits)
        h.execute(channel_id=channel_id, lower_limit=LOWER_LIMIT, upper_limit=UPPER_LIMIT)
    else:
        h = rhnSQL.prepare(self._query__get_errata_ids)
        h.execute(channel_id=channel_id)



    Clone # 468
    Distance between two fragments = 0
    Clone size = 6
    Source file "./satellite_tools/xmlWireSource.py"
    The first line is 469
    Source file "./satellite_tools/xmlWireSource.py"
    The first line is 266
    release = nvrea[2] release = nvrea[2]
    epoch = nvrea[3] epoch = nvrea[3]
    if epoch:
        release = ('%s:%s') % ((release, epoch))
    if epoch:
        release = ('%s:%s') % ((release, epoch))
    package_name = ('%s-%s-%s.%s.rpm') % ((nvrea[0], nvrea[1], release, nvrea[4])) package_name = ('%s-%s-%s.%s.rpm') % ((nvrea[0], nvrea[1], release, nvrea[4]))



    Clone # 469
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 797
    Source file "./server/rhnDependency.py"
    The first line is 762
    limit_version = limit['version'] pkg2_version = pkg2['version']
    limit_release = limit['release'] pkg2_release = pkg2['release']
    if evr_epoch is not None:
        evr_epoch = str(evr_epoch)
    elif evr_epoch == '':
        evr_epoch = None
    if pkg1_epoch is not None:
        pkg1_epoch = str(pkg1_epoch)
    elif pkg1_epoch == '':
        pkg1_epoch = None



    Clone # 470
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 354
    Source file "./server/rhnVirtualization.py"
    The first line is 801
    if virt_type == 'para':
        virt_type = rhnVirtualization.VirtualizationType.PARA
    elif virt_type == 'fully':
        virt_type = rhnVirtualization.VirtualizationType.FULLY
    else:
        raise Exception(('Unknown virtualization type: %s') % (virt_type))
    if virt_type == 'para':
        virt_type = VirtualizationType.PARA
    elif virt_type == 'fully':
        virt_type = VirtualizationType.FULLY
    else:
        raise Exception(('Unknown virtualization type: %s') % (virt_type))



    Clone # 471
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/action_extra_data/reboot.py"
    The first line is 23
    Source file "./server/action_extra_data/kickstart.py"
    The first line is 24
    def reboot(server_id, action_id, data={}):
        log_debug(3, action_id)
        action_status = rhnFlags.get('action_status')
        server_kickstart.update_kickstart_session(server_id, action_id, action_status, kickstart_state='restarted', next_action_type=None)
    def initiate(server_id, action_id, data={}):
        log_debug(3, action_id)
        action_status = rhnFlags.get('action_status')
        server_kickstart.update_kickstart_session(server_id, action_id, action_status, kickstart_state='injected', next_action_type='reboot.reboot')



    Clone # 472
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/action/kickstart.py"
    The first line is 115
    Source file "./server/action/kickstart.py"
    The first line is 68
    log_debug(3, server_id, action_id) log_debug(3, server_id, action_id)
    kickstart_session_id = server_kickstart.get_kickstart_session_id(server_id, action_id) kickstart_session_id = server_kickstart.get_kickstart_session_id(server_id, action_id)
    if kickstart_session_id is None:
        raise InvalidAction('Could not find kickstart session ID')
    if kickstart_session_id is None:
        raise InvalidAction('Could not find kickstart session ID')
    row = server_kickstart.get_kickstart_session_info(kickstart_session_id, server_id) row = server_kickstart.get_kickstart_session_info(kickstart_session_id, server_id)



    Clone # 473
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/rhnServer/server_packages.py"
    The first line is 101
    Source file "./server/rhnServer/server_packages.py"
    The first line is 84
    log_debug(4, sysid, entry) log_debug(4, sysid, entry)
    p = dbPackage(entry) p = dbPackage(entry)
    if p is None:
        return -1
    if p is None:
        return -1
    if not self.__loaded:
        self.reload_packages_byid(sysid)
    if not self.__loaded:
        self.reload_packages_byid(sysid)



    Clone # 474
    Distance between two fragments = 1
    Clone size = 6
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 630
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 101
    log_debug(3, 'is_closed', self._is_closed) log_debug(4, 'is_closed', self._is_closed)
    if self._is_closed:
        raise Exception, 'Trying to write to a closed connection'
    if self._is_closed:
        raise Exception, 'Trying to write to a closed connection'
    if self._headers_sent:
        return None
    if self._headers_sent:
        return None
    self._headers_sent = 1 self._headers_sent = 1



    Clone # 475
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 972
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 911
    log_debug(5, system_id, packages) log_debug(5, system_id, packages)
    if CFG.DISABLE_PACKAGES:
        return 0
    if CFG.DISABLE_PACKAGES:
        return 0
    packages = self._normalize_packages(system_id, packages) packages = self._normalize_packages(system_id, packages)
    server = self.auth_system(system_id) server = self.auth_system(system_id)
    log_debug(1, server.getid(), ('packages: %d') % (len(packages))) log_debug(1, server.getid(), ('packages: %d') % (len(packages)))



    Clone # 476
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 972
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 896
    log_debug(5, system_id, packages) log_debug(5, system_id, packages)
    if CFG.DISABLE_PACKAGES:
        return 0
    if CFG.DISABLE_PACKAGES:
        return 0
    packages = self._normalize_packages(system_id, packages) packages = self._normalize_packages(system_id, packages)
    server = self.auth_system(system_id) server = self.auth_system(system_id)
    log_debug(1, server.getid(), ('packages: %d') % (len(packages))) log_debug(1, server.getid(), ('packages: %d') % (len(packages)))



    Clone # 477
    Distance between two fragments = 1
    Clone size = 6
    Source file "./server/apacheRequest.py"
    The first line is 162
    Source file "./server/apacheRequest.py"
    The first line is 153
    log_debug(4, 'rhnSQL.SQLError caught', e) log_debug(4, 'rhnSQL.SQLSchemaError caught', e)
    rhnSQL.rollback() rhnSQL.rollback()
    Traceback(method, self.req, extra=('SQL Error generated: %s') % (e), severity='schema') Traceback(method, self.req, extra=('SQL Error generated: %s') % (e), severity='schema')
    return apache.HTTP_INTERNAL_SERVER_ERROR return apache.HTTP_INTERNAL_SERVER_ERROR



    Clone # 478
    Distance between two fragments = 2
    Clone size = 6
    Source file "./common/rhnApache.py"
    The first line is 94
    Source file "./common/rhnApache.py"
    The first line is 89
    ret = self._set_other(req) ret = self._set_proxy_info(req)
    if ret != apache.OK:
        return ret
    if ret != apache.OK:
        return ret
    ret = self._set_lang(req) ret = self._set_other(req)
    if ret != apache.OK:
        return ret
    if ret != apache.OK:
        return ret



    Clone # 479
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/satsync.py"
    The first line is 1841
    Source file "./satellite_tools/satsync.py"
    The first line is 1669
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=errata_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=erratum_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)
    ss = SequenceServer(batch, nevermorethan=self._batch_size) ss = SequenceServer(erratum_ids[:], nevermorethan=self._batch_size)



    Clone # 480
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/satsync.py"
    The first line is 1841
    Source file "./satellite_tools/satsync.py"
    The first line is 1288
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=errata_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)
    ss = SequenceServer(batch, nevermorethan=self._batch_size) ss = SequenceServer(pids[:], nevermorethan=self._batch_size)



    Clone # 481
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/satsync.py"
    The first line is 1841
    Source file "./satellite_tools/satsync.py"
    The first line is 1112
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=errata_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)
    ss = SequenceServer(batch, nevermorethan=self._batch_size) ss = SequenceServer(pids[:], nevermorethan=self._batch_size)



    Clone # 482
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/satsync.py"
    The first line is 1709
    Source file "./satellite_tools/satsync.py"
    The first line is 1669
    pb = ProgressBar(prompt='Importing: ', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=erratum_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)
    ss = SequenceServer(packages[:], nevermorethan=self._batch_size) ss = SequenceServer(erratum_ids[:], nevermorethan=self._batch_size)



    Clone # 483
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/satsync.py"
    The first line is 1709
    Source file "./satellite_tools/satsync.py"
    The first line is 1398
    pb = ProgressBar(prompt='Importing: ', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=kt_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)
    ss = SequenceServer(packages[:], nevermorethan=self._batch_size) ss = SequenceServer(ktids[:], nevermorethan=self._batch_size)



    Clone # 484
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/satsync.py"
    The first line is 1428
    Source file "./satellite_tools/satsync.py"
    The first line is 1669
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=files_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=erratum_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)
    ss = SequenceServer(files[:], nevermorethan=1) ss = SequenceServer(erratum_ids[:], nevermorethan=self._batch_size)



    Clone # 485
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/satsync.py"
    The first line is 1428
    Source file "./satellite_tools/satsync.py"
    The first line is 1288
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=files_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)
    ss = SequenceServer(files[:], nevermorethan=1) ss = SequenceServer(pids[:], nevermorethan=self._batch_size)



    Clone # 486
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/satsync.py"
    The first line is 1428
    Source file "./satellite_tools/satsync.py"
    The first line is 1112
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=files_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)
    ss = SequenceServer(files[:], nevermorethan=1) ss = SequenceServer(pids[:], nevermorethan=self._batch_size)



    Clone # 487
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/action_extra_data/hardware.py"
    The first line is 19
    Source file "./server/action_extra_data/errata.py"
    The first line is 21
    __rhnexport__ = ['refresh_list'] __rhnexport__ = ['update']
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.hardware.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.errata.update: Should do something useful with this data', server_id, action_id, data)



    Clone # 488
    Distance between two fragments = 2
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 617
    Source file "./satellite_tools/xmlSource.py"
    The first line is 609
    class ObsoletesItem(BaseItem):
        item_name = 'rhn-package-obsoletes-entry'
        item_class = importLib.Dependency
        tagMap = {'sense': 'flags'}
    class ConflictsItem(BaseItem):
        item_name = 'rhn-package-conflicts-entry'
        item_class = importLib.Dependency
        tagMap = {'sense': 'flags'}
    addItem(ObsoletesItem) addItem(ConflictsItem)



    Clone # 489
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 668
    Source file "./satellite_tools/xmlSource.py"
    The first line is 730
    addItem(BugItem) addItem(BlacklistObsoleteItem)
    class KeywordItem(BaseItem):
        item_name = 'rhn-erratum-keyword'
        item_class = importLib.Keyword
        tagMap = {}
    class ProductNamesItem(BaseItem):
        item_name = 'rhn-product-name'
        item_class = importLib.ProductName
        tagMap = {}
    addItem(KeywordItem) addItem(ProductNamesItem)



    Clone # 490
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 730
    Source file "./satellite_tools/xmlSource.py"
    The first line is 724
    addItem(BlacklistObsoleteItem) addItem(ErrataFileItem)
    class ProductNamesItem(BaseItem):
        item_name = 'rhn-product-name'
        item_class = importLib.ProductName
        tagMap = {}
    class BlacklistObsoleteItem(BaseItem):
        item_name = 'rhn-blacklist-obsolete'
        item_class = importLib.BlacklistObsoletes
        tagMap = {}
    addItem(ProductNamesItem) addItem(BlacklistObsoleteItem)



    Clone # 491
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 730
    Source file "./satellite_tools/xmlSource.py"
    The first line is 705
    addItem(BlacklistObsoleteItem) addItem(ErratumItem)
    class ProductNamesItem(BaseItem):
        item_name = 'rhn-product-name'
        item_class = importLib.ProductName
        tagMap = {}
    class ErrorItem(BaseItem):
        item_name = 'rhn-error'
        item_class = importLib.Error
        tagMap = {}
    addItem(ProductNamesItem) addItem(ErrorItem)



    Clone # 492
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 668
    Source file "./satellite_tools/xmlSource.py"
    The first line is 724
    addItem(BugItem) addItem(ErrataFileItem)
    class KeywordItem(BaseItem):
        item_name = 'rhn-erratum-keyword'
        item_class = importLib.Keyword
        tagMap = {}
    class BlacklistObsoleteItem(BaseItem):
        item_name = 'rhn-blacklist-obsolete'
        item_class = importLib.BlacklistObsoletes
        tagMap = {}
    addItem(KeywordItem) addItem(BlacklistObsoleteItem)



    Clone # 493
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 668
    Source file "./satellite_tools/xmlSource.py"
    The first line is 705
    addItem(BugItem) addItem(ErratumItem)
    class KeywordItem(BaseItem):
        item_name = 'rhn-erratum-keyword'
        item_class = importLib.Keyword
        tagMap = {}
    class ErrorItem(BaseItem):
        item_name = 'rhn-error'
        item_class = importLib.Error
        tagMap = {}
    addItem(KeywordItem) addItem(ErrorItem)



    Clone # 494
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 724
    Source file "./satellite_tools/xmlSource.py"
    The first line is 705
    addItem(ErrataFileItem) addItem(ErratumItem)
    class BlacklistObsoleteItem(BaseItem):
        item_name = 'rhn-blacklist-obsolete'
        item_class = importLib.BlacklistObsoletes
        tagMap = {}
    class ErrorItem(BaseItem):
        item_name = 'rhn-error'
        item_class = importLib.Error
        tagMap = {}
    addItem(BlacklistObsoleteItem) addItem(ErrorItem)



    Clone # 495
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/handlers/xp/packages.py"
    The first line is 31
    Source file "./server/handlers/app/packages.py"
    The first line is 52
    log_debug(3) log_debug(3)
    RPC_Base.__init__(self) RPC_Base.__init__(self)
    self.functions.append('uploadPackageInfo') self.functions.append('uploadPackageInfo')
    self.functions.append('uploadSourcePackageInfo') self.functions.append('uploadPackageInfoBySession')
    self.functions.append('listChannel') self.functions.append('uploadSourcePackageInfo')
    self.functions.append('listMissingSourcePackages') self.functions.append('uploadSourcePackageInfoBySession')



    Clone # 496
    Distance between two fragments = 1
    Clone size = 6
    Source file "./server/action/virt.py"
    The first line is 142
    Source file "./server/action/virt.py"
    The first line is 125
    log_debug(3) log_debug(3)
    prepared_query = rhnSQL.prepare(_query_refresh) prepared_query = rhnSQL.prepare(query_str)
    prepared_query.execute(action_id=action_id) prepared_query.execute(action_id=action_id)
    row = prepared_query.fetchone_dict() row = prepared_query.fetchone_dict()
    if not row:
        raise NoRowFoundException()
    if not row:
        raise NoRowFoundException()



    Clone # 497
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/action/virt.py"
    The first line is 248
    Source file "./server/action/virt.py"
    The first line is 262
    log_debug(3) log_debug(3)
    prepared_query = rhnSQL.prepare(_query_getVCPUs) prepared_query = rhnSQL.prepare(_query_schedulePoller)
    prepared_query.execute(action_id=action_id) prepared_query.execute(action_id=action_id)
    row = prepared_query.fetchone_dict() row = prepared_query.fetchone_dict()
    if not row:
        raise InvalidAction('No VCPU actions found.')
    if not row:
        raise InvalidAction('No schedulePoller actions found.')



    Clone # 498
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/action/virt.py"
    The first line is 248
    Source file "./server/action/virt.py"
    The first line is 226
    log_debug(3) log_debug(3)
    prepared_query = rhnSQL.prepare(_query_getVCPUs) prepared_query = rhnSQL.prepare(_query_setMemory)
    prepared_query.execute(action_id=action_id) prepared_query.execute(action_id=action_id)
    row = prepared_query.fetchone_dict() row = prepared_query.fetchone_dict()
    if not row:
        raise InvalidAction('No VCPU actions found.')
    if not row:
        raise InvalidAction('No setMemory actions found.')



    Clone # 499
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/action/rhnsd.py"
    The first line is 32
    Source file "./server/action/kickstart.py"
    The first line is 44
    log_debug(3) log_debug(3)
    h = rhnSQL.prepare(_query_lookup_interval) h = rhnSQL.prepare(_query_initiate)
    h.execute(action_id=actionId) h.execute(action_id=action_id)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise rhnException('rhnsd reconfig action scheduled, but no entries in rhnActionDaemonConfig found')
    if not row:
        raise InvalidAction('Kickstart action without an associated kickstart')



    Clone # 500
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/action/virt.py"
    The first line is 248
    Source file "./server/action/kickstart.py"
    The first line is 44
    log_debug(3) log_debug(3)
    prepared_query = rhnSQL.prepare(_query_getVCPUs) h = rhnSQL.prepare(_query_initiate)
    prepared_query.execute(action_id=action_id) h.execute(action_id=action_id)
    row = prepared_query.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise InvalidAction('No VCPU actions found.')
    if not row:
        raise InvalidAction('Kickstart action without an associated kickstart')



    Clone # 501
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/action/rhnsd.py"
    The first line is 32
    Source file "./server/action/kickstart_guest.py"
    The first line is 75
    log_debug(3) log_debug(3)
    h = rhnSQL.prepare(_query_lookup_interval) h = rhnSQL.prepare(_query_initiate_guest)
    h.execute(action_id=actionId) h.execute(action_id=action_id)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise rhnException('rhnsd reconfig action scheduled, but no entries in rhnActionDaemonConfig found')
    if not row:
        raise InvalidAction('Kickstart action without an associated kickstart')



    Clone # 502
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/action/virt.py"
    The first line is 248
    Source file "./server/action/kickstart_guest.py"
    The first line is 75
    log_debug(3) log_debug(3)
    prepared_query = rhnSQL.prepare(_query_getVCPUs) h = rhnSQL.prepare(_query_initiate_guest)
    prepared_query.execute(action_id=action_id) h.execute(action_id=action_id)
    row = prepared_query.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise InvalidAction('No VCPU actions found.')
    if not row:
        raise InvalidAction('Kickstart action without an associated kickstart')



    Clone # 503
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/action/virt.py"
    The first line is 262
    Source file "./server/action/kickstart.py"
    The first line is 44
    log_debug(3) log_debug(3)
    prepared_query = rhnSQL.prepare(_query_schedulePoller) h = rhnSQL.prepare(_query_initiate)
    prepared_query.execute(action_id=action_id) h.execute(action_id=action_id)
    row = prepared_query.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise InvalidAction('No schedulePoller actions found.')
    if not row:
        raise InvalidAction('Kickstart action without an associated kickstart')



    Clone # 504
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/action/virt.py"
    The first line is 226
    Source file "./server/action/kickstart.py"
    The first line is 44
    log_debug(3) log_debug(3)
    prepared_query = rhnSQL.prepare(_query_setMemory) h = rhnSQL.prepare(_query_initiate)
    prepared_query.execute(action_id=action_id) h.execute(action_id=action_id)
    row = prepared_query.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise InvalidAction('No setMemory actions found.')
    if not row:
        raise InvalidAction('Kickstart action without an associated kickstart')



    Clone # 505
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/action/virt.py"
    The first line is 262
    Source file "./server/action/kickstart_guest.py"
    The first line is 75
    log_debug(3) log_debug(3)
    prepared_query = rhnSQL.prepare(_query_schedulePoller) h = rhnSQL.prepare(_query_initiate_guest)
    prepared_query.execute(action_id=action_id) h.execute(action_id=action_id)
    row = prepared_query.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise InvalidAction('No schedulePoller actions found.')
    if not row:
        raise InvalidAction('Kickstart action without an associated kickstart')



    Clone # 506
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/action/virt.py"
    The first line is 226
    Source file "./server/action/kickstart_guest.py"
    The first line is 75
    log_debug(3) log_debug(3)
    prepared_query = rhnSQL.prepare(_query_setMemory) h = rhnSQL.prepare(_query_initiate_guest)
    prepared_query.execute(action_id=action_id) h.execute(action_id=action_id)
    row = prepared_query.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise InvalidAction('No setMemory actions found.')
    if not row:
        raise InvalidAction('Kickstart action without an associated kickstart')



    Clone # 507
    Distance between two fragments = 1
    Clone size = 6
    Source file "./server/action/kickstart.py"
    The first line is 44
    Source file "./server/action/kickstart_guest.py"
    The first line is 75
    log_debug(3) log_debug(3)
    h = rhnSQL.prepare(_query_initiate) h = rhnSQL.prepare(_query_initiate_guest)
    h.execute(action_id=action_id) h.execute(action_id=action_id)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise InvalidAction('Kickstart action without an associated kickstart')
    if not row:
        raise InvalidAction('Kickstart action without an associated kickstart')



    Clone # 508
    Distance between two fragments = 1
    Clone size = 6
    Source file "./server/action_extra_data/configfiles.py"
    The first line is 40
    Source file "./server/action_extra_data/script.py"
    The first line is 62
    log_debug(3) log_debug(3)
    h = rhnSQL.prepare(_query_reset_upload_files) h = rhnSQL.prepare(_query_clear_output)
    h.execute(server_id=server_id, action_id=action_id) h.execute(server_id=server_id, action_id=action_id)
    if not data:
        log_debug(4, 'No data sent by client')
        return None
    if not data:
        log_debug(4, 'No data sent by client')
        return None



    Clone # 509
    Distance between two fragments = 3
    Clone size = 7
    Source file "./server/action_extra_data/packages.py"
    The first line is 388
    Source file "./server/action_extra_data/packages.py"
    The first line is 381
    if (not isinstance(needs_pkg, ListType)) or (len(needs_pkg) < 2):
        log_error(('action_extra_data.packages.remove: server %s, action %s: failed dep: bad needs package spec %s (type %s, len %s)') % ((server_id, action_id, needs_pkg, type(needs_pkg), len(needs_pkg))))
        raise InvalidDep
    if (not isinstance(pkg, ListType)) or (len(pkg) < 3):
        log_error(('action_extra_data.packages.remove: server %s, action %s: failed dep: bad package spec %s (type %s, len %s)') % ((server_id, action_id, pkg, type(pkg), len(pkg))))
        raise InvalidDep
    needs_pkg = map(str, needs_pkg[:2]) pkg = map(str, pkg[:3])



    Clone # 510
    Distance between two fragments = 4
    Clone size = 6
    Source file "./test/johntest.py"
    The first line is 50
    Source file "./test/johntest.py"
    The first line is 43
    def list_channels(self):
        if self._channel_data is None:
            s = self._connect()
            sysid = self._get_sysid()
            self._channel_data = ChannelList(s.up2date.listChannels(sysid))
        return self._channel_data
    def login(self):
        if self._login is None:
            s = self._connect()
            sysid = self._get_sysid()
            self._login = LoginInfo(s.up2date.login(sysid))
        return self._login



    Clone # 511
    Distance between two fragments = 4
    Clone size = 6
    Source file "./test/johntest.py"
    The first line is 57
    Source file "./test/johntest.py"
    The first line is 50
    def list_packages(self):
        if self._package_data is None:
            s = self._connect()
            sysid = self._get_sysid()
            self._package_data = PackagesList(s.up2date.listall(sysid))
        return self._package_data
    def list_channels(self):
        if self._channel_data is None:
            s = self._connect()
            sysid = self._get_sysid()
            self._channel_data = ChannelList(s.up2date.listChannels(sysid))
        return self._channel_data



    Clone # 512
    Distance between two fragments = 4
    Clone size = 6
    Source file "./test/johntest.py"
    The first line is 57
    Source file "./test/johntest.py"
    The first line is 43
    def list_packages(self):
        if self._package_data is None:
            s = self._connect()
            sysid = self._get_sysid()
            self._package_data = PackagesList(s.up2date.listall(sysid))
        return self._package_data
    def login(self):
        if self._login is None:
            s = self._connect()
            sysid = self._get_sysid()
            self._login = LoginInfo(s.up2date.login(sysid))
        return self._login



    Clone # 513
    Distance between two fragments = 1
    Clone size = 6
    Source file "./server/test/unit-test/test_rhnChannel.py"
    The first line is 172
    Source file "./server/test/unit-test/test_rhnChannel.py"
    The first line is 152
    rhnSQL.commit() rhnSQL.commit()
    for entry in entries:
        label = entry['label']
        c = rhnChannel.ChannelFamily().load_by_label(label)
        self.failIf(c.exists())
    for entry in entries:
        label = entry['label']
        c = rhnChannel.Channel().load_by_label(label)
        self.failIf(c.exists())
    return entries return entries



    Clone # 514
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlWireSource.py"
    The first line is 196
    Source file "./satellite_tools/xmlWireSource.py"
    The first line is 191
    def getArchesExtraXmlStream(self):
        self._prepare()
        return self._openSocketStream('dump.arches_extra', (self.systemid))
    def getArchesXmlStream(self):
        self._prepare()
        return self._openSocketStream('dump.arches', (self.systemid))
    def getProductNamesXmlStream(self):
        self._prepare()
        return self._openSocketStream('dump.product_names', (self.systemid))
    def getArchesExtraXmlStream(self):
        self._prepare()
        return self._openSocketStream('dump.arches_extra', (self.systemid))



    Clone # 515
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlWireSource.py"
    The first line is 201
    Source file "./satellite_tools/xmlWireSource.py"
    The first line is 191
    def getProductNamesXmlStream(self):
        self._prepare()
        return self._openSocketStream('dump.product_names', (self.systemid))
    def getArchesXmlStream(self):
        self._prepare()
        return self._openSocketStream('dump.arches', (self.systemid))
    def getChannelFamilyXmlStream(self):
        self._prepare()
        return self._openSocketStream('dump.channel_families', (self.systemid))
    def getArchesExtraXmlStream(self):
        self._prepare()
        return self._openSocketStream('dump.arches_extra', (self.systemid))



    Clone # 516
    Distance between two fragments = 4
    Clone size = 6
    Source file "./common/rhnConfig.py"
    The first line is 402
    Source file "./common/rhnConfig.py"
    The first line is 396
    def _getParsedConfig(self):
        self.__check()
        return self.__parsedConfig
    def _getDefaults(self):
        self.__check()
        return self.__defaults
    def _getConfigs(self):
        self.__check()
        return self.__configs
    def _getParsedConfig(self):
        self.__check()
        return self.__parsedConfig



    Clone # 517
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/gentree.py"
    The first line is 285
    Source file "./satellite_tools/gentree.py"
    The first line is 222
    for pkg in pkgIds:
        package_source.setID(pkg)
        stream = package_source.load()
        dumper.setID(pkg)
        dumper.setInputStream(stream)
        dumper.dump(force=force)
    for ks_tree_label in ks_tree_labels:
        ksdata_source.setID(ks_tree_label)
        stream = ksdata_source.load()
        dumper.setID(ks_tree_label)
        dumper.setInputStream(stream)
        dumper.dump(force=force)



    Clone # 518
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/gentree.py"
    The first line is 285
    Source file "./satellite_tools/gentree.py"
    The first line is 117
    for pkg in pkgIds:
        package_source.setID(pkg)
        stream = package_source.load()
        dumper.setID(pkg)
        dumper.setInputStream(stream)
        dumper.dump(force=force)
    for channel in channels:
        channel_source.setChannel(channel)
        stream = channel_source.load()
        dumper.setChannel(channel)
        dumper.setInputStream(stream)
        dumper.dump(force=force)



    Clone # 519
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/gentree.py"
    The first line is 222
    Source file "./satellite_tools/gentree.py"
    The first line is 208
    for ks_tree_label in ks_tree_labels:
        ksdata_source.setID(ks_tree_label)
        stream = ksdata_source.load()
        dumper.setID(ks_tree_label)
        dumper.setInputStream(stream)
        dumper.dump(force=force)
    for err in errata:
        errata_source.setID(err)
        stream = errata_source.load()
        dumper.setID(err)
        dumper.setInputStream(stream)
        dumper.dump(force=force)



    Clone # 520
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/gentree.py"
    The first line is 208
    Source file "./satellite_tools/gentree.py"
    The first line is 117
    for err in errata:
        errata_source.setID(err)
        stream = errata_source.load()
        dumper.setID(err)
        dumper.setInputStream(stream)
        dumper.dump(force=force)
    for channel in channels:
        channel_source.setChannel(channel)
        stream = channel_source.load()
        dumper.setChannel(channel)
        dumper.setInputStream(stream)
        dumper.dump(force=force)



    Clone # 521
    Distance between two fragments = 1
    Clone size = 7
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 785
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 474
    def set_iterator(self):
        if self._iterator:
            return self._iterator
        h = rhnSQL.prepare("\n select \n ps.id, \n sr.name source_rpm, \n pg.name package_group, \n ps.rpm_version, \n ps.payload_size,\n ps.build_host, \n TO_CHAR(ps.build_time, 'YYYYMMDDHH24MISS') build_time,\n sig.checksum sigchecksum,\n sig.checksum_type sigchecksum_type,\n ps.vendor,\n ps.cookie,\n ps.package_size,\n c.checksum_type,\n c.checksum,\n TO_CHAR(ps.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackageSource ps, rhnPackageGroup pg, rhnSourceRPM sr,\n rhnChecksumView c, rhnChecksumView sig\n where ps.package_group = pg.id\n and ps.source_rpm_id = sr.id\n and ps.path is not null\n and ps.checksum_id = c.id\n and ps.sigchecksum_id = sig.id\n and rownum < 3\n ")
        h.execute()
        return h
    def set_iterator(self):
        if self._iterator:
            return self._iterator
        h = rhnSQL.prepare('select cf.* from rhnChannelFamily')
        h.execute()
        return h



    Clone # 522
    Distance between two fragments = 1
    Clone size = 7
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 720
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 474
    def set_iterator(self):
        if self._iterator:
            return self._iterator
        h = rhnSQL.prepare("\n select \n p.id, \n pn.name, \n pe.evr.version version, \n pe.evr.release release, \n pe.evr.epoch epoch, \n pa.label package_arch,\n c.checksum_type,\n c.checksum,\n p.org_id,\n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackage p, rhnPackageName pn, rhnPackageEVR pe, \n rhnPackageArch pa, rhnChecksumView c\n where p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p.path is not null\n and p.checksum_id = c.id\n and rownum < 3\n ")
        h.execute()
        return h
    def set_iterator(self):
        if self._iterator:
            return self._iterator
        h = rhnSQL.prepare('select cf.* from rhnChannelFamily')
        h.execute()
        return h



    Clone # 523
    Distance between two fragments = 1
    Clone size = 7
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 569
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 474
    def set_iterator(self):
        if self._iterator:
            return self._iterator
        h = rhnSQL.prepare("\n select \n p.id,\n p.org_id, \n pn.name, \n pe.evr.version version, \n pe.evr.release release, \n pe.evr.epoch epoch, \n pa.label package_arch,\n pg.name package_group, \n p.rpm_version, \n p.description,\n p.summary,\n p.package_size,\n p.payload_size,\n p.build_host, \n TO_CHAR(p.build_time, 'YYYYMMDDHH24MISS') build_time,\n sr.name source_rpm, \n c.checksum_type,\n c.checksum,\n p.vendor,\n p.payload_format, \n p.compat, \n p.header_sig,\n p.copyright,\n p.cookie,\n p.header_start,\n p.header_end,\n TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnPackage p, rhnPackageName pn, rhnPackageEVR pe, \n rhnPackageArch pa, rhnPackageGroup pg, rhnSourceRPM sr,\n rhnChecksumView c\n where p.name_id = pn.id\n and p.evr_id = pe.id\n and p.package_arch_id = pa.id\n and p.package_group = pg.id\n and p.source_rpm_id = sr.id\n and p.path is not null\n and p.checksum_id = c.id\n and rownum < 3\n ")
        h.execute()
        return h
    def set_iterator(self):
        if self._iterator:
            return self._iterator
        h = rhnSQL.prepare('select cf.* from rhnChannelFamily')
        h.execute()
        return h



    Clone # 524
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 46
    Source file "./server/rhnChannel.py"
    The first line is 55
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class IncompatibilityError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidEntryError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidDataError(Exception):
        pass



    Clone # 525
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 55
    Source file "./server/rhnChannel.py"
    The first line is 64
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class ForceNotSpecified(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class NoToolsChannel(Exception):
        pass



    Clone # 526
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnChannel.py"
    The first line is 55
    class ConfigFileExistsError(ConfigFileError):
        pass
    class IncompatibilityError(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidEntryError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidDataError(Exception):
        pass



    Clone # 527
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 52
    Source file "./server/rhnChannel.py"
    The first line is 64
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class ForceNotSpecified(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class NoToolsChannel(Exception):
        pass



    Clone # 528
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 61
    Source file "./server/configFilesHandler.py"
    The first line is 55
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass



    Clone # 529
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 49
    Source file "./server/rhnChannel.py"
    The first line is 55
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class IncompatibilityError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidEntryError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidDataError(Exception):
        pass



    Clone # 530
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 58
    Source file "./server/rhnChannel.py"
    The first line is 64
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class ForceNotSpecified(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class NoToolsChannel(Exception):
        pass



    Clone # 531
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 58
    Source file "./server/configFilesHandler.py"
    The first line is 43
    class InvalidEntryError(Exception):
        pass
    class ConfigFileExistsError(ConfigFileError):
        pass
    class InvalidDataError(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class ForceNotSpecified(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass



    Clone # 532
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 67
    Source file "./server/configFilesHandler.py"
    The first line is 52
    class ChannelNotFoundError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class NoToolsChannel(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class NoChildChannels(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass



    Clone # 533
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 70
    Source file "./server/rhnChannel.py"
    The first line is 67
    class NoToolsChannel(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class NoChildChannels(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class InvalidChannel(Exception):
        pass
    class NoChildChannels(Exception):
        pass



    Clone # 534
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/configFilesHandler.py"
    The first line is 43
    class ServerArch(BaseTypedArch):
        pass
    class ConfigFileExistsError(ConfigFileError):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass



    Clone # 535
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/configFilesHandler.py"
    The first line is 46
    class ServerArch(BaseTypedArch):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass



    Clone # 536
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnChannel.py"
    The first line is 55
    class ServerArch(BaseTypedArch):
        pass
    class IncompatibilityError(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class InvalidEntryError(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class InvalidDataError(Exception):
        pass



    Clone # 537
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/configFilesHandler.py"
    The first line is 52
    class IncompatibilityError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidEntryError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidDataError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass



    Clone # 538
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 64
    Source file "./server/configFilesHandler.py"
    The first line is 61
    class ForceNotSpecified(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class NoToolsChannel(Exception):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass



    Clone # 539
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnChannel.py"
    The first line is 61
    class ConfigFileExistsError(ConfigFileError):
        pass
    class InvalidDataError(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class ForceNotSpecified(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class ChannelNotFoundError(Exception):
        pass



    Clone # 540
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 52
    Source file "./server/rhnChannel.py"
    The first line is 70
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class NoToolsChannel(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class NoChildChannels(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidChannel(Exception):
        pass



    Clone # 541
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/configFilesHandler.py"
    The first line is 49
    class ServerArch(BaseTypedArch):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass



    Clone # 542
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/configFilesHandler.py"
    The first line is 55
    class IncompatibilityError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidEntryError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidDataError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass



    Clone # 543
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnChannel.py"
    The first line is 58
    class ServerArch(BaseTypedArch):
        pass
    class InvalidEntryError(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class InvalidDataError(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class ForceNotSpecified(Exception):
        pass



    Clone # 544
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnChannel.py"
    The first line is 64
    class ConfigFileExistsError(ConfigFileError):
        pass
    class ForceNotSpecified(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class NoToolsChannel(Exception):
        pass



    Clone # 545
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/configFilesHandler.py"
    The first line is 52
    class ServerArch(BaseTypedArch):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass



    Clone # 546
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/configFilesHandler.py"
    The first line is 58
    class IncompatibilityError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidEntryError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidDataError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass



    Clone # 547
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnChannel.py"
    The first line is 61
    class ServerArch(BaseTypedArch):
        pass
    class InvalidDataError(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class ForceNotSpecified(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class ChannelNotFoundError(Exception):
        pass



    Clone # 548
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnChannel.py"
    The first line is 67
    class ConfigFileExistsError(ConfigFileError):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class NoToolsChannel(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class NoChildChannels(Exception):
        pass



    Clone # 549
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/configFilesHandler.py"
    The first line is 55
    class ServerArch(BaseTypedArch):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass



    Clone # 550
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/configFilesHandler.py"
    The first line is 61
    class ConfigFileExistsError(ConfigFileError):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass



    Clone # 551
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/configFilesHandler.py"
    The first line is 61
    class IncompatibilityError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidEntryError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class InvalidDataError(Exception):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass



    Clone # 552
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 58
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class DBblob(DBtype):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class DBdate(DBtype):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 553
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 55
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class DBblob(DBtype):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class DBdate(DBtype):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 554
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 52
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class DBblob(DBtype):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class DBdate(DBtype):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 555
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 49
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class DBblob(DBtype):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class DBdate(DBtype):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 556
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 46
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class DBblob(DBtype):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class DBdate(DBtype):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 557
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class ConfigFileExistsError(ConfigFileError):
        pass
    class DBblob(DBtype):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class DBdate(DBtype):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 558
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 67
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class ChannelNotFoundError(Exception):
        pass
    class DBblob(DBtype):
        pass
    class NoToolsChannel(Exception):
        pass
    class DBdate(DBtype):
        pass
    class NoChildChannels(Exception):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 559
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 64
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class ForceNotSpecified(Exception):
        pass
    class DBblob(DBtype):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class DBdate(DBtype):
        pass
    class NoToolsChannel(Exception):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 560
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 61
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class InvalidDataError(Exception):
        pass
    class DBblob(DBtype):
        pass
    class ForceNotSpecified(Exception):
        pass
    class DBdate(DBtype):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 561
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 58
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class InvalidEntryError(Exception):
        pass
    class DBblob(DBtype):
        pass
    class InvalidDataError(Exception):
        pass
    class DBdate(DBtype):
        pass
    class ForceNotSpecified(Exception):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 562
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class IncompatibilityError(Exception):
        pass
    class DBblob(DBtype):
        pass
    class InvalidEntryError(Exception):
        pass
    class DBdate(DBtype):
        pass
    class InvalidDataError(Exception):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 563
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnDependency.py"
    The first line is 287
    class ServerArch(BaseTypedArch):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 564
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 52
    Source file "./server/rhnDependency.py"
    The first line is 287
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 565
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 49
    Source file "./server/rhnDependency.py"
    The first line is 287
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 566
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 46
    Source file "./server/rhnDependency.py"
    The first line is 287
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 567
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnDependency.py"
    The first line is 287
    class ConfigFileExistsError(ConfigFileError):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 568
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnDependency.py"
    The first line is 290
    class ConfigFileExistsError(ConfigFileError):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass



    Clone # 569
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnDependency.py"
    The first line is 293
    class ConfigFileExistsError(ConfigFileError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass



    Clone # 570
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 61
    Source file "./server/rhnDependency.py"
    The first line is 287
    class InvalidDataError(Exception):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class ForceNotSpecified(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 571
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 58
    Source file "./server/rhnDependency.py"
    The first line is 287
    class InvalidEntryError(Exception):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class InvalidDataError(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ForceNotSpecified(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 572
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/rhnDependency.py"
    The first line is 287
    class IncompatibilityError(Exception):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class InvalidEntryError(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class InvalidDataError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 573
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/rhnDependency.py"
    The first line is 290
    class IncompatibilityError(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class InvalidEntryError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class InvalidDataError(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass



    Clone # 574
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/rhnDependency.py"
    The first line is 293
    class IncompatibilityError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class InvalidEntryError(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class InvalidDataError(Exception):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass



    Clone # 575
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnChannel.py"
    The first line is 64
    class ServerArch(BaseTypedArch):
        pass
    class ForceNotSpecified(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class NoToolsChannel(Exception):
        pass



    Clone # 576
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnChannel.py"
    The first line is 70
    class ConfigFileExistsError(ConfigFileError):
        pass
    class NoToolsChannel(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class NoChildChannels(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidChannel(Exception):
        pass



    Clone # 577
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 49
    Source file "./server/rhnChannel.py"
    The first line is 64
    class SubscriptionCountExceeded(ChannelException):
        pass
    class ForceNotSpecified(Exception):
        pass
    class ModifiedError(ChannelException):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class NoToolsChannel(Exception):
        pass



    Clone # 578
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 61
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class DBblob(DBtype):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class DBdate(DBtype):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 579
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 55
    Source file "./server/rhnDependency.py"
    The first line is 287
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 580
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    Source file "./server/rhnDependency.py"
    The first line is 293
    class DBblob(DBtype):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class DBdate(DBtype):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class DBdateTime(DBtype):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass



    Clone # 581
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    Source file "./server/rhnChannel.py"
    The first line is 70
    class DBblob(DBtype):
        pass
    class NoToolsChannel(Exception):
        pass
    class DBdate(DBtype):
        pass
    class NoChildChannels(Exception):
        pass
    class DBdateTime(DBtype):
        pass
    class InvalidChannel(Exception):
        pass



    Clone # 582
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 287
    Source file "./server/rhnChannel.py"
    The first line is 64
    class InvalidLimitField(SolveDependenciesError):
        pass
    class ForceNotSpecified(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class NoToolsChannel(Exception):
        pass



    Clone # 583
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 290
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class DBblob(DBtype):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class DBdate(DBtype):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class DBdateTime(DBtype):
        pass



    Clone # 584
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/configFilesHandler.py"
    The first line is 58
    class ServerArch(BaseTypedArch):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass



    Clone # 585
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 287
    Source file "./server/configFilesHandler.py"
    The first line is 58
    class InvalidLimitField(SolveDependenciesError):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass



    Clone # 586
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnDependency.py"
    The first line is 290
    class ServerArch(BaseTypedArch):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass



    Clone # 587
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnChannel.py"
    The first line is 67
    class ServerArch(BaseTypedArch):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class NoToolsChannel(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class NoChildChannels(Exception):
        pass



    Clone # 588
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 287
    Source file "./server/rhnChannel.py"
    The first line is 67
    class InvalidLimitField(SolveDependenciesError):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class NoToolsChannel(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class NoChildChannels(Exception):
        pass



    Clone # 589
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 49
    Source file "./server/rhnChannel.py"
    The first line is 67
    class SubscriptionCountExceeded(ChannelException):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class ModifiedError(ChannelException):
        pass
    class NoToolsChannel(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class NoChildChannels(Exception):
        pass



    Clone # 590
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    class DBblob(DBtype):
        pass
    class InvalidUserError(Exception):
        pass
    class DBdate(DBtype):
        pass
    class InvalidOrgError(Exception):
        pass
    class DBdateTime(DBtype):
        pass
    class InvalidServerGroupError(Exception):
        pass



    Clone # 591
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    class DBblob(DBtype):
        pass
    class RecoverableParseException(SAXParseException):
        pass
    class DBdate(DBtype):
        pass
    class FatalParseException(SAXParseException):
        pass
    class DBdateTime(DBtype):
        pass
    class WarningParseException(SAXParseException):
        pass



    Clone # 592
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    Source file "./server/importlib/importLib.py"
    The first line is 483
    class DBblob(DBtype):
        pass
    class ServerArch(BaseTypedArch):
        pass
    class DBdate(DBtype):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class DBdateTime(DBtype):
        pass
    class ChannelArch(BaseTypedArch):
        pass



    Clone # 593
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    Source file "./server/rhnDependency.py"
    The first line is 287
    class DBblob(DBtype):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class DBdate(DBtype):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class DBdateTime(DBtype):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 594
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class DBblob(DBtype):
        pass
    class InvalidPackageError(Exception):
        pass
    class DBdate(DBtype):
        pass
    class NullPathPackageError(Exception):
        pass
    class DBdateTime(DBtype):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 595
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    Source file "./server/rhnLib.py"
    The first line is 112
    class DBblob(DBtype):
        pass
    class InvalidAction(Exception):
        pass
    class DBdate(DBtype):
        pass
    class EmptyAction(Exception):
        pass
    class DBdateTime(DBtype):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 596
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class DBblob(DBtype):
        pass
    class InvalidTokenError(Exception):
        pass
    class DBdate(DBtype):
        pass
    class InvalidChannelError(Exception):
        pass
    class DBdateTime(DBtype):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 597
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backendLib.py"
    The first line is 46
    Source file "./server/rhnChannel.py"
    The first line is 34
    class DBblob(DBtype):
        pass
    class NoBaseChannelError(Exception):
        pass
    class DBdate(DBtype):
        pass
    class InvalidServerArchError(Exception):
        pass
    class DBdateTime(DBtype):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 598
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    class InvalidUserError(Exception):
        pass
    class RecoverableParseException(SAXParseException):
        pass
    class InvalidOrgError(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass



    Clone # 599
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/configFilesHandler.py"
    The first line is 61
    class InvalidUserError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidOrgError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass



    Clone # 600
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/importlib/importLib.py"
    The first line is 483
    class InvalidUserError(Exception):
        pass
    class ServerArch(BaseTypedArch):
        pass
    class InvalidOrgError(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass



    Clone # 601
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/configFilesHandler.py"
    The first line is 58
    class InvalidUserError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidOrgError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass



    Clone # 602
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/configFilesHandler.py"
    The first line is 55
    class InvalidUserError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidOrgError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass



    Clone # 603
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/configFilesHandler.py"
    The first line is 52
    class InvalidUserError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidOrgError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass



    Clone # 604
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/configFilesHandler.py"
    The first line is 49
    class InvalidUserError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidOrgError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass



    Clone # 605
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/configFilesHandler.py"
    The first line is 46
    class InvalidUserError(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidOrgError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass



    Clone # 606
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/configFilesHandler.py"
    The first line is 43
    class InvalidUserError(Exception):
        pass
    class ConfigFileExistsError(ConfigFileError):
        pass
    class InvalidOrgError(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass



    Clone # 607
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnDependency.py"
    The first line is 290
    class InvalidUserError(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class InvalidOrgError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass



    Clone # 608
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnDependency.py"
    The first line is 287
    class InvalidUserError(Exception):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class InvalidOrgError(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 609
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnChannel.py"
    The first line is 67
    class InvalidUserError(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class InvalidOrgError(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class NoChildChannels(Exception):
        pass



    Clone # 610
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnChannel.py"
    The first line is 64
    class InvalidUserError(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass
    class InvalidOrgError(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class NoToolsChannel(Exception):
        pass



    Clone # 611
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnChannel.py"
    The first line is 61
    class InvalidUserError(Exception):
        pass
    class InvalidDataError(Exception):
        pass
    class InvalidOrgError(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass



    Clone # 612
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnChannel.py"
    The first line is 58
    class InvalidUserError(Exception):
        pass
    class InvalidEntryError(Exception):
        pass
    class InvalidOrgError(Exception):
        pass
    class InvalidDataError(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass



    Clone # 613
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnChannel.py"
    The first line is 55
    class InvalidUserError(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class InvalidOrgError(Exception):
        pass
    class InvalidEntryError(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class InvalidDataError(Exception):
        pass



    Clone # 614
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnChannel.py"
    The first line is 52
    class InvalidUserError(Exception):
        pass
    class ModifiedError(ChannelException):
        pass
    class InvalidOrgError(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class InvalidEntryError(Exception):
        pass



    Clone # 615
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnChannel.py"
    The first line is 49
    class InvalidUserError(Exception):
        pass
    class SubscriptionCountExceeded(ChannelException):
        pass
    class InvalidOrgError(Exception):
        pass
    class ModifiedError(ChannelException):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class IncompatibilityError(Exception):
        pass



    Clone # 616
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnChannel.py"
    The first line is 70
    class InvalidUserError(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class InvalidOrgError(Exception):
        pass
    class NoChildChannels(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class InvalidChannel(Exception):
        pass



    Clone # 617
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class InvalidUserError(Exception):
        pass
    class InvalidPackageError(Exception):
        pass
    class InvalidOrgError(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 618
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnLib.py"
    The first line is 112
    class InvalidUserError(Exception):
        pass
    class InvalidAction(Exception):
        pass
    class InvalidOrgError(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 619
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class InvalidUserError(Exception):
        pass
    class InvalidTokenError(Exception):
        pass
    class InvalidOrgError(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 620
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnDependency.py"
    The first line is 293
    class InvalidUserError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class InvalidOrgError(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass



    Clone # 621
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServerGroup.py"
    The first line is 22
    Source file "./server/rhnChannel.py"
    The first line is 34
    class InvalidUserError(Exception):
        pass
    class NoBaseChannelError(Exception):
        pass
    class InvalidOrgError(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class InvalidServerGroupError(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 622
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/configFilesHandler.py"
    The first line is 61
    class RecoverableParseException(SAXParseException):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class FatalParseException(SAXParseException):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass



    Clone # 623
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/importlib/importLib.py"
    The first line is 483
    class RecoverableParseException(SAXParseException):
        pass
    class ServerArch(BaseTypedArch):
        pass
    class FatalParseException(SAXParseException):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ChannelArch(BaseTypedArch):
        pass



    Clone # 624
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/configFilesHandler.py"
    The first line is 58
    class RecoverableParseException(SAXParseException):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class FatalParseException(SAXParseException):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass



    Clone # 625
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/configFilesHandler.py"
    The first line is 55
    class RecoverableParseException(SAXParseException):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class FatalParseException(SAXParseException):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass



    Clone # 626
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/configFilesHandler.py"
    The first line is 52
    class RecoverableParseException(SAXParseException):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class FatalParseException(SAXParseException):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass



    Clone # 627
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/configFilesHandler.py"
    The first line is 49
    class RecoverableParseException(SAXParseException):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class FatalParseException(SAXParseException):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass



    Clone # 628
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/configFilesHandler.py"
    The first line is 46
    class RecoverableParseException(SAXParseException):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class FatalParseException(SAXParseException):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass



    Clone # 629
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/configFilesHandler.py"
    The first line is 43
    class RecoverableParseException(SAXParseException):
        pass
    class ConfigFileExistsError(ConfigFileError):
        pass
    class FatalParseException(SAXParseException):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass



    Clone # 630
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnDependency.py"
    The first line is 290
    class RecoverableParseException(SAXParseException):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class FatalParseException(SAXParseException):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class WarningParseException(SAXParseException):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass



    Clone # 631
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnDependency.py"
    The first line is 287
    class RecoverableParseException(SAXParseException):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class FatalParseException(SAXParseException):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class WarningParseException(SAXParseException):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 632
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnChannel.py"
    The first line is 67
    class RecoverableParseException(SAXParseException):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class NoToolsChannel(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass
    class NoChildChannels(Exception):
        pass



    Clone # 633
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnChannel.py"
    The first line is 64
    class RecoverableParseException(SAXParseException):
        pass
    class ForceNotSpecified(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass
    class NoToolsChannel(Exception):
        pass



    Clone # 634
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnChannel.py"
    The first line is 61
    class RecoverableParseException(SAXParseException):
        pass
    class InvalidDataError(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class ForceNotSpecified(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ChannelNotFoundError(Exception):
        pass



    Clone # 635
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnChannel.py"
    The first line is 58
    class RecoverableParseException(SAXParseException):
        pass
    class InvalidEntryError(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class InvalidDataError(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ForceNotSpecified(Exception):
        pass



    Clone # 636
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnChannel.py"
    The first line is 55
    class RecoverableParseException(SAXParseException):
        pass
    class IncompatibilityError(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class InvalidEntryError(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass
    class InvalidDataError(Exception):
        pass



    Clone # 637
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnChannel.py"
    The first line is 70
    class RecoverableParseException(SAXParseException):
        pass
    class NoToolsChannel(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class NoChildChannels(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass
    class InvalidChannel(Exception):
        pass



    Clone # 638
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class RecoverableParseException(SAXParseException):
        pass
    class InvalidPackageError(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class NullPathPackageError(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 639
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnLib.py"
    The first line is 112
    class RecoverableParseException(SAXParseException):
        pass
    class InvalidAction(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class EmptyAction(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 640
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class RecoverableParseException(SAXParseException):
        pass
    class InvalidTokenError(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class InvalidChannelError(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 641
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnDependency.py"
    The first line is 293
    class RecoverableParseException(SAXParseException):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class FatalParseException(SAXParseException):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class WarningParseException(SAXParseException):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass



    Clone # 642
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlSource.py"
    The first line is 59
    Source file "./server/rhnChannel.py"
    The first line is 34
    class RecoverableParseException(SAXParseException):
        pass
    class NoBaseChannelError(Exception):
        pass
    class FatalParseException(SAXParseException):
        pass
    class InvalidServerArchError(Exception):
        pass
    class WarningParseException(SAXParseException):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 643
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 61
    Source file "./server/importlib/importLib.py"
    The first line is 483
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class ServerArch(BaseTypedArch):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass
    class ChannelArch(BaseTypedArch):
        pass



    Clone # 644
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 61
    Source file "./server/rhnDependency.py"
    The first line is 287
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidLimitField(SolveDependenciesError):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass



    Clone # 645
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 61
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidPackageError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class NullPathPackageError(Exception):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 646
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 61
    Source file "./server/rhnLib.py"
    The first line is 112
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidAction(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class EmptyAction(Exception):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 647
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 61
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidTokenError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class InvalidChannelError(Exception):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 648
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 61
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class NoBaseChannelError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ConfigFilePathIncomplete(ConfigFileError):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 649
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnChannel.py"
    The first line is 70
    class ServerArch(BaseTypedArch):
        pass
    class NoToolsChannel(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class NoChildChannels(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class InvalidChannel(Exception):
        pass



    Clone # 650
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 287
    Source file "./server/rhnChannel.py"
    The first line is 70
    class InvalidLimitField(SolveDependenciesError):
        pass
    class NoToolsChannel(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class NoChildChannels(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class InvalidChannel(Exception):
        pass



    Clone # 651
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 49
    Source file "./server/rhnChannel.py"
    The first line is 70
    class SubscriptionCountExceeded(ChannelException):
        pass
    class NoToolsChannel(Exception):
        pass
    class ModifiedError(ChannelException):
        pass
    class NoChildChannels(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class InvalidChannel(Exception):
        pass



    Clone # 652
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ServerArch(BaseTypedArch):
        pass
    class InvalidPackageError(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class NullPathPackageError(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 653
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 58
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidPackageError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class NullPathPackageError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 654
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 55
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidPackageError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class NullPathPackageError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 655
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 52
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidPackageError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class NullPathPackageError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 656
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 49
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidPackageError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class NullPathPackageError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 657
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 46
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidPackageError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class NullPathPackageError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 658
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ConfigFileExistsError(ConfigFileError):
        pass
    class InvalidPackageError(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class NullPathPackageError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 659
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 290
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class InvalidPackageError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class NullPathPackageError(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 660
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 287
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class InvalidLimitField(SolveDependenciesError):
        pass
    class InvalidPackageError(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class NullPathPackageError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 661
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 67
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ChannelNotFoundError(Exception):
        pass
    class InvalidPackageError(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class NoChildChannels(Exception):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 662
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 64
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ForceNotSpecified(Exception):
        pass
    class InvalidPackageError(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 663
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 61
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class InvalidDataError(Exception):
        pass
    class InvalidPackageError(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 664
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 58
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class InvalidEntryError(Exception):
        pass
    class InvalidPackageError(Exception):
        pass
    class InvalidDataError(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 665
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class IncompatibilityError(Exception):
        pass
    class InvalidPackageError(Exception):
        pass
    class InvalidEntryError(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class InvalidDataError(Exception):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 666
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 52
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class ModifiedError(ChannelException):
        pass
    class InvalidPackageError(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class InvalidEntryError(Exception):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 667
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 49
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class SubscriptionCountExceeded(ChannelException):
        pass
    class InvalidPackageError(Exception):
        pass
    class ModifiedError(ChannelException):
        pass
    class NullPathPackageError(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 668
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnLib.py"
    The first line is 112
    class ServerArch(BaseTypedArch):
        pass
    class InvalidAction(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class EmptyAction(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 669
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 58
    Source file "./server/rhnLib.py"
    The first line is 112
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidAction(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class EmptyAction(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 670
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 55
    Source file "./server/rhnLib.py"
    The first line is 112
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidAction(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class EmptyAction(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 671
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 52
    Source file "./server/rhnLib.py"
    The first line is 112
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidAction(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class EmptyAction(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 672
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 49
    Source file "./server/rhnLib.py"
    The first line is 112
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidAction(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class EmptyAction(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 673
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 46
    Source file "./server/rhnLib.py"
    The first line is 112
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidAction(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class EmptyAction(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 674
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnLib.py"
    The first line is 112
    class ConfigFileExistsError(ConfigFileError):
        pass
    class InvalidAction(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class EmptyAction(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 675
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 290
    Source file "./server/rhnLib.py"
    The first line is 112
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class InvalidAction(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class EmptyAction(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 676
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 287
    Source file "./server/rhnLib.py"
    The first line is 112
    class InvalidLimitField(SolveDependenciesError):
        pass
    class InvalidAction(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class EmptyAction(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 677
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 67
    Source file "./server/rhnLib.py"
    The first line is 112
    class ChannelNotFoundError(Exception):
        pass
    class InvalidAction(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class NoChildChannels(Exception):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 678
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 64
    Source file "./server/rhnLib.py"
    The first line is 112
    class ForceNotSpecified(Exception):
        pass
    class InvalidAction(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 679
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 61
    Source file "./server/rhnLib.py"
    The first line is 112
    class InvalidDataError(Exception):
        pass
    class InvalidAction(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 680
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 58
    Source file "./server/rhnLib.py"
    The first line is 112
    class InvalidEntryError(Exception):
        pass
    class InvalidAction(Exception):
        pass
    class InvalidDataError(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 681
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/rhnLib.py"
    The first line is 112
    class IncompatibilityError(Exception):
        pass
    class InvalidAction(Exception):
        pass
    class InvalidEntryError(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class InvalidDataError(Exception):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 682
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 52
    Source file "./server/rhnLib.py"
    The first line is 112
    class ModifiedError(ChannelException):
        pass
    class InvalidAction(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class InvalidEntryError(Exception):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 683
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 49
    Source file "./server/rhnLib.py"
    The first line is 112
    class SubscriptionCountExceeded(ChannelException):
        pass
    class InvalidAction(Exception):
        pass
    class ModifiedError(ChannelException):
        pass
    class EmptyAction(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 684
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ServerArch(BaseTypedArch):
        pass
    class InvalidTokenError(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class InvalidChannelError(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 685
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 58
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidTokenError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidChannelError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 686
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 55
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidTokenError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidChannelError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 687
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 52
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidTokenError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidChannelError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 688
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 49
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidTokenError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidChannelError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 689
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 46
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidTokenError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidChannelError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 690
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ConfigFileExistsError(ConfigFileError):
        pass
    class InvalidTokenError(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidChannelError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 691
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 290
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class InvalidTokenError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class InvalidChannelError(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 692
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 287
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class InvalidLimitField(SolveDependenciesError):
        pass
    class InvalidTokenError(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class InvalidChannelError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 693
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 67
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ChannelNotFoundError(Exception):
        pass
    class InvalidTokenError(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class NoChildChannels(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 694
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 64
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ForceNotSpecified(Exception):
        pass
    class InvalidTokenError(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 695
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 61
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class InvalidDataError(Exception):
        pass
    class InvalidTokenError(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 696
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 58
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class InvalidEntryError(Exception):
        pass
    class InvalidTokenError(Exception):
        pass
    class InvalidDataError(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 697
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class IncompatibilityError(Exception):
        pass
    class InvalidTokenError(Exception):
        pass
    class InvalidEntryError(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class InvalidDataError(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 698
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 52
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class ModifiedError(ChannelException):
        pass
    class InvalidTokenError(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class InvalidEntryError(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 699
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 49
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class SubscriptionCountExceeded(ChannelException):
        pass
    class InvalidTokenError(Exception):
        pass
    class ModifiedError(ChannelException):
        pass
    class InvalidChannelError(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 700
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnDependency.py"
    The first line is 293
    class ServerArch(BaseTypedArch):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass



    Clone # 701
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 287
    Source file "./server/rhnDependency.py"
    The first line is 293
    class InvalidLimitField(SolveDependenciesError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass



    Clone # 702
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/importLib.py"
    The first line is 483
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ServerArch(BaseTypedArch):
        pass
    class NoBaseChannelError(Exception):
        pass
    class PackageArch(BaseTypedArch):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ChannelArch(BaseTypedArch):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 703
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 58
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class NoBaseChannelError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ConfigFileExceedsQuota(ConfigFileError):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 704
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 55
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class NoBaseChannelError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ConfigFileTooLargeError(ConfigFileError):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 705
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 52
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class NoBaseChannelError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ConfigFileMissingStatInfo(ConfigFileError):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 706
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 49
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class NoBaseChannelError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ConfigFileMissingContentError(ConfigFileError):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 707
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 46
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class NoBaseChannelError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ConfigFileMissingInfoError(ConfigFileError):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 708
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/configFilesHandler.py"
    The first line is 43
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ConfigFileExistsError(ConfigFileError):
        pass
    class NoBaseChannelError(Exception):
        pass
    class ConfigFileVersionMismatchError(ConfigFileError):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ConfigFileMissingDelimError(ConfigFileError):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 709
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 290
    Source file "./server/rhnChannel.py"
    The first line is 34
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class NoBaseChannelError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class InvalidServerArchError(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 710
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 287
    Source file "./server/rhnChannel.py"
    The first line is 34
    class InvalidLimitField(SolveDependenciesError):
        pass
    class NoBaseChannelError(Exception):
        pass
    class InvalidLimitOperator(SolveDependenciesError):
        pass
    class InvalidServerArchError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 711
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 67
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ChannelNotFoundError(Exception):
        pass
    class NoBaseChannelError(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class NoChildChannels(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 712
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 64
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ForceNotSpecified(Exception):
        pass
    class NoBaseChannelError(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class NoToolsChannel(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 713
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 61
    Source file "./server/rhnChannel.py"
    The first line is 34
    class InvalidDataError(Exception):
        pass
    class NoBaseChannelError(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ChannelNotFoundError(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 714
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 58
    Source file "./server/rhnChannel.py"
    The first line is 34
    class InvalidEntryError(Exception):
        pass
    class NoBaseChannelError(Exception):
        pass
    class InvalidDataError(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ForceNotSpecified(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 715
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 55
    Source file "./server/rhnChannel.py"
    The first line is 34
    class IncompatibilityError(Exception):
        pass
    class NoBaseChannelError(Exception):
        pass
    class InvalidEntryError(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class InvalidDataError(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 716
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 52
    Source file "./server/rhnChannel.py"
    The first line is 34
    class ModifiedError(ChannelException):
        pass
    class NoBaseChannelError(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class InvalidEntryError(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 717
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 49
    Source file "./server/rhnChannel.py"
    The first line is 34
    class SubscriptionCountExceeded(ChannelException):
        pass
    class NoBaseChannelError(Exception):
        pass
    class ModifiedError(ChannelException):
        pass
    class InvalidServerArchError(Exception):
        pass
    class IncompatibilityError(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 718
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 70
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    class NoToolsChannel(Exception):
        pass
    class InvalidPackageError(Exception):
        pass
    class NoChildChannels(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class InvalidChannel(Exception):
        pass
    class MissingPackageError(Exception):
        pass



    Clone # 719
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 70
    Source file "./server/rhnLib.py"
    The first line is 112
    class NoToolsChannel(Exception):
        pass
    class InvalidAction(Exception):
        pass
    class NoChildChannels(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class InvalidChannel(Exception):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 720
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 70
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class NoToolsChannel(Exception):
        pass
    class InvalidTokenError(Exception):
        pass
    class NoChildChannels(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class InvalidChannel(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 721
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 70
    Source file "./server/rhnChannel.py"
    The first line is 34
    class NoToolsChannel(Exception):
        pass
    class NoBaseChannelError(Exception):
        pass
    class NoChildChannels(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class InvalidChannel(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 722
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    Source file "./server/rhnLib.py"
    The first line is 112
    class InvalidPackageError(Exception):
        pass
    class InvalidAction(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class MissingPackageError(Exception):
        pass
    class ShadowAction(Exception):
        pass



    Clone # 723
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class InvalidPackageError(Exception):
        pass
    class InvalidTokenError(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class MissingPackageError(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 724
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    Source file "./server/rhnDependency.py"
    The first line is 293
    class InvalidPackageError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class NullPathPackageError(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class MissingPackageError(Exception):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass



    Clone # 725
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 32
    Source file "./server/rhnChannel.py"
    The first line is 34
    class InvalidPackageError(Exception):
        pass
    class NoBaseChannelError(Exception):
        pass
    class NullPathPackageError(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class MissingPackageError(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 726
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnLib.py"
    The first line is 112
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    class InvalidAction(Exception):
        pass
    class InvalidTokenError(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class ShadowAction(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass



    Clone # 727
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnLib.py"
    The first line is 112
    Source file "./server/rhnDependency.py"
    The first line is 293
    class InvalidAction(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class EmptyAction(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class ShadowAction(Exception):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass



    Clone # 728
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnLib.py"
    The first line is 112
    Source file "./server/rhnChannel.py"
    The first line is 34
    class InvalidAction(Exception):
        pass
    class NoBaseChannelError(Exception):
        pass
    class EmptyAction(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class ShadowAction(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 729
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    Source file "./server/rhnDependency.py"
    The first line is 293
    class InvalidTokenError(Exception):
        pass
    class InvalidLimit(SolveDependenciesError):
        pass
    class InvalidChannelError(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class InvalidEntitlementError(Exception):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass



    Clone # 730
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnActivationKey.py"
    The first line is 26
    Source file "./server/rhnChannel.py"
    The first line is 34
    class InvalidTokenError(Exception):
        pass
    class NoBaseChannelError(Exception):
        pass
    class InvalidChannelError(Exception):
        pass
    class InvalidServerArchError(Exception):
        pass
    class InvalidEntitlementError(Exception):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 731
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 293
    Source file "./server/rhnChannel.py"
    The first line is 34
    class InvalidLimit(SolveDependenciesError):
        pass
    class NoBaseChannelError(Exception):
        pass
    class IncompleteLimitInfo(SolveDependenciesError):
        pass
    class InvalidServerArchError(Exception):
        pass
    class MakeEvrError(SolveDependenciesError):
        pass
    class BaseChannelDeniedError(Exception):
        pass



    Clone # 732
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 465
    Source file "./server/importlib/backend.py"
    The first line is 1266
    all_channels_hash = {} channels = {}
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        all_channels_hash[row['label']] = row
    while 1:
        row = statement.fetchone_dict()
        if not row:
            break
        channels[row['channel_id']] = None



    Clone # 733
    Distance between two fragments = 2
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 465
    Source file "./server/rhnActivationKey.py"
    The first line is 156
    all_channels_hash = {} ret = {}
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        all_channels_hash[row['label']] = row
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        ret[row['label']] = None



    Clone # 734
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 1266
    Source file "./satellite_tools/sync_handlers.py"
    The first line is 730
    channels = {} cfs = {}
    while 1:
        row = statement.fetchone_dict()
        if not row:
            break
        channels[row['channel_id']] = None
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        cfs[row['label']] = 1



    Clone # 735
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnActivationKey.py"
    The first line is 156
    Source file "./server/apacheHandler.py"
    The first line is 161
    ret = {} templateStrings = {}
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        ret[row['label']] = None
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        templateStrings[row['label']] = row['value']



    Clone # 736
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 858
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 510
    arr = [] arr = []
    mappings = [('rhn-package-changelog-entry-name', 'name'), ('rhn-package-changelog-entry-text', 'text')] mappings = [('rhn-channel-family-name', 'name'), ('rhn-channel-family-product-url', 'product_url')]
    for k, v in mappings:
        arr.append(SimpleDumper(self._writer, k, self._row[v]))
    for k, v in mappings:
        arr.append(SimpleDumper(self._writer, k, self._row[v]))



    Clone # 737
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 725
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 552
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_trees), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 738
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 725
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 528
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_trees), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 739
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 725
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 504
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_trees), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 740
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 725
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 480
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_trees), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 741
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 751
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 552
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_files), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 742
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 751
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 528
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_files), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 743
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 751
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 504
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_files), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 744
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 751
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 480
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.kickstart_files), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 745
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 811
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 552
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.brpms), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 746
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 811
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 528
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.brpms), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 747
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 811
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 504
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.brpms), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 748
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 811
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 480
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.brpms), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 749
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 697
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 552
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.errata_info), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 750
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 697
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 528
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.errata_info), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 751
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 697
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 504
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.errata_info), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 752
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 697
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 480
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.errata_info), self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 753
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 552
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 658
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 754
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 552
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 629
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 755
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 528
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 658
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 756
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 528
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 629
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 757
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 504
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 658
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 758
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 504
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 629
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 759
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 480
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 658
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 760
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 480
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 629
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.pkg_info), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 761
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 552
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 575
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.channel_ids), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 762
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 528
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 575
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.channel_ids), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 763
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 504
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 575
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.channel_ids), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 764
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 480
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 575
    pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, 1, self.pb_length, self.pb_char) pb = progress_bar.ProgressBar(self.pb_label, self.pb_complete, len(self.channel_ids), self.pb_length, self.pb_char)
    pb.printAll(1) pb.printAll(1)



    Clone # 765
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/importlib/headerSource.py"
    The first line is 48
    Source file "./server/importlib/debPackage.py"
    The first line is 51
    field = f field = f
    if self.tagMap.has_key(f):
        field = self.tagMap[f]
        if not field:
            continue
    if self.tagMap.has_key(f):
        field = self.tagMap[f]
        if not field:
            continue
    val = header[field] val = header[field]



    Clone # 766
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/satComputePkgHeaders.py"
    The first line is 33
    Source file "./satellite_tools/satComputePkgHeaders.py"
    The first line is 30
    def make_table(*args):
        pass
    def log_error(*args):
        pass
    def parse_qs(*args):
        pass
    def make_table(*args):
        pass
    def parse_qsl(*args):
        pass
    def parse_qs(*args):
        pass



    Clone # 767
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/satComputePkgHeaders.py"
    The first line is 33
    Source file "./_apache.py"
    The first line is 23
    def make_table(*args):
        pass
    def log_error(*args):
        pass
    def parse_qs(*args):
        pass
    def make_table(*args):
        pass
    def parse_qsl(*args):
        pass
    def parse_qs(*args):
        pass



    Clone # 768
    Distance between two fragments = 3
    Clone size = 6
    Source file "./_apache.py"
    The first line is 26
    Source file "./satellite_tools/satComputePkgHeaders.py"
    The first line is 30
    def make_table(*args):
        pass
    def log_error(*args):
        pass
    def parse_qs(*args):
        pass
    def make_table(*args):
        pass
    def parse_qsl(*args):
        pass
    def parse_qs(*args):
        pass



    Clone # 769
    Distance between two fragments = 3
    Clone size = 6
    Source file "./_apache.py"
    The first line is 26
    Source file "./_apache.py"
    The first line is 23
    def make_table(*args):
        pass
    def log_error(*args):
        pass
    def parse_qs(*args):
        pass
    def make_table(*args):
        pass
    def parse_qsl(*args):
        pass
    def parse_qs(*args):
        pass



    Clone # 770
    Distance between two fragments = 4
    Clone size = 7
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1617
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1307
    def set_iterator(self):
        query = rhnSQL.prepare('\n select label, name from rhnProductName\n ')
        query.execute()
        return query
    def set_iterator(self):
        h = rhnSQL.prepare(self._query_set_iterator)
        h.execute()
        return h
    def dump_subelement(self, data):
        EmptyDumper(self._writer, 'rhn-product-name', data).dump()
    def dump_subelement(self, data):
        EmptyDumper(self._writer, 'rhn-server-group-type', data).dump()



    Clone # 771
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/handlers/app/channel.py"
    The first line is 140
    Source file "./server/handlers/app/channel.py"
    The first line is 118
    if commit:
        rhnSQL.commit()
        message = 'Success. Committing transaction.'
    else:
        rhnSQL.rollback()
        message = 'Success. Rolling back transaction. --commit not specified'
    if commit:
        rhnSQL.commit()
        message = 'Success. Committing transaction.'
    else:
        rhnSQL.rollback()
        message = 'Success. Rolling back transaction. --commit not specified'
    return message return message



    Clone # 772
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 487
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 483
    def packages_short(self, packages=[]):
        self.set_channel_family_query()
        return self.dump_packages_short(packages=packages)
    def packages(self, packages=[]):
        self.set_channel_family_query()
        return self.dump_packages(packages=packages)
    def source_packages(self, packages=[]):
        self.set_channel_family_query()
        return self.dump_source_packages(packages=packages)
    def packages_short(self, packages=[]):
        self.set_channel_family_query()
        return self.dump_packages_short(packages=packages)



    Clone # 773
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 314
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 306
    log_debug(1, 'SCHEDULING VIRT GUEST PACKAGE INSTALL...') log_debug(1, 'SCHEDULING VIRT HOST PACKAGE INSTALL...')
    action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_guest.schedule_virt_guest_pkg_install', action_name='Schedule install of rhn-virtualization-guest package.', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_host.schedule_virt_host_pkg_install', action_name='Schedule install of rhn-virtualization-host package.', delta_time=0, scheduler=scheduler, org_id=org_id)



    Clone # 774
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 1160
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 1146
    handle_error(msg, tbout.getvalue()) handle_error(msg, tb)
    if self.options.email:
        sendMail()
    if self.options.email:
        sendMail()
    if self.options.print_report:
        print_report()
    if self.options.print_report:
        print_report()
    sys.exit(-1) sys.exit(-1)



    Clone # 775
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 326
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 294
    for package in packages:
        print 'Dumping source package', package
        dumper.setID(package)
        ret = dumper.dump(force=self.options.force)
        if ret:
            print ' Wrote', ret
    for package in packages:
        print 'Dumping short package', package
        dumper.setID(package)
        ret = dumper.dump(force=1)
        if ret:
            print ' Wrote', ret



    Clone # 776
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/repomd/repository.py"
    The first line is 339
    Source file "./server/repomd/repository.py"
    The first line is 335
    filelists = self.__compute_checksums(timestamp, self.repository.get_filelists_xml_file(), self.compressed_repository.get_filelists_xml_file()) primary = self.__compute_checksums(timestamp, self.repository.get_primary_xml_file(), self.compressed_repository.get_primary_xml_file())
    other = self.__compute_checksums(timestamp, self.repository.get_other_xml_file(), self.compressed_repository.get_other_xml_file()) filelists = self.__compute_checksums(timestamp, self.repository.get_filelists_xml_file(), self.compressed_repository.get_filelists_xml_file())



    Clone # 777
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/repomd/repository.py"
    The first line is 343
    Source file "./server/repomd/repository.py"
    The first line is 335
    other = self.__compute_checksums(timestamp, self.repository.get_other_xml_file(), self.compressed_repository.get_other_xml_file()) primary = self.__compute_checksums(timestamp, self.repository.get_primary_xml_file(), self.compressed_repository.get_primary_xml_file())
    updateinfo = self.__compute_checksums(timestamp, self.repository.get_updateinfo_xml_file(), self.compressed_repository.get_updateinfo_xml_file()) filelists = self.__compute_checksums(timestamp, self.repository.get_filelists_xml_file(), self.compressed_repository.get_filelists_xml_file())



    Clone # 778
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/action_extra_data/virt.py"
    The first line is 52
    Source file "./server/action_extra_data/virt.py"
    The first line is 46
    def destroy(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)
    def suspend(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)
    def setMemory(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)
    def shutdown(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)
    def setVCPUs(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)
    def destroy(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)



    Clone # 779
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/action_extra_data/virt.py"
    The first line is 52
    Source file "./server/action_extra_data/virt.py"
    The first line is 34
    def destroy(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)
    def schedulePoller(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)
    def setMemory(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)
    def reboot(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)
    def setVCPUs(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)
    def resume(server_id, action_id, data={}):
        _do_nothing(server_id, action_id)



    Clone # 780
    Distance between two fragments = 1
    Clone size = 6
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 153
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 113
    token = t.get_token() token = t.get_token()
    params = build_new_system_params_with_token(token=token, os_release='2.1AS') params = build_new_system_params_with_token(token=token, os_release='2.1AS')
    system_id = register_new_system(params) system_id = register_new_system(params)
    rhnSQL.commit() rhnSQL.commit()
    s2 = rhnServer.get(system_id) s = rhnServer.get(system_id)



    Clone # 781
    Distance between two fragments = 1
    Clone size = 6
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 175
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 87
    u = self._create_new_user() u = self._create_new_user()
    org_id = u.contact['org_id'] org_id = u.contact['org_id']
    entitlements = self._entitlements entitlements = self._entitlements
    t = misc_functions.create_activation_key(org_id=u.contact['org_id'], entitlement_level=entitlements, user_id=u.getid()) t = misc_functions.create_activation_key(org_id=u.contact['org_id'], entitlement_level=entitlements, user_id=u.getid())
    token1 = t.get_token() token = t.get_token()



    Clone # 782
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/test/unit-test/test_rhnChannel.py"
    The first line is 65
    Source file "./server/test/unit-test/test_rhnChannel.py"
    The first line is 40
    cf = rhnChannel.ChannelFamily() cf = rhnChannel.ChannelFamily()
    cf.load_from_dict(self._new_channel_family_dict()) cf.load_from_dict(self._new_channel_family_dict())
    cf.save() cf.save()
    label = cf.get_label() label = cf.get_label()
    vdict = self._new_channel_dict(label=label, channel_family=label) vdict = self._new_channel_dict(label=label, channel_family=label)
    c = rhnChannel.Channel() c = rhnChannel.Channel()



    Clone # 783
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/test/test_strict_channel_package_subscription.py"
    The first line is 59
    Source file "./server/importlib/test/test_strict_channel_package_subscription.py"
    The first line is 53
    p = importLib.IncompletePackage() p = importLib.IncompletePackage()
    p.populate(package_template) p.populate(package_template)
    p['release'] = '3' p['release'] = '2'
    p['channels'] = [channel] p['channels'] = [channel]
    batch.append(p) batch.append(p)
    backend = backendOracle.OracleBackend() p = importLib.IncompletePackage()



    Clone # 784
    Distance between two fragments = 1
    Clone size = 7
    Source file "./satellite_tools/satsync.py"
    The first line is 1792
    Source file "./satellite_tools/satsync.py"
    The first line is 1724
    tbOut = cStringIO.StringIO() tbOut = cStringIO.StringIO()
    Traceback(mail=0, ostream=tbOut, with_locals=1) Traceback(mail=0, ostream=tbOut, with_locals=1)
    log(-1, ('ERROR: %s Exception caught during import: %s') % ((e.__class__.__name__, e)), stream=sys.stderr) log(-1, ('ERROR: %s Exception caught during import: %s') % ((e.__class__.__name__, e)), stream=sys.stderr)
    log(-1, ('TRACEBACK: %s') % (tbOut.getvalue()), stream=sys.stderr) log(-1, ('TRACEBACK: %s') % (tbOut.getvalue()), stream=sys.stderr)
    sys.exit(14) sys.exit(13)



    Clone # 785
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnSQL/driver_postgresql.py"
    The first line is 188
    Source file "./server/rhnSQL/driver_cx_Oracle.py"
    The first line is 483
    try:
        c = self.prepare('select 1')
        c.execute()
    except:
        log_error(("DATABASE CONNECTION TO '%s' LOST") % (self.database), ('Exception information: %s') % (sys.exc_info()[1]))
        self.connect()
    try:
        h = self.prepare('select 1 from dual')
        h.execute()
    except:
        log_error(("DATABASE CONNECTION TO '%s' LOST") % (self.dbtxt), ('Exception information: %s') % (sys.exc_info()[1]))
        self.connect()



    Clone # 786
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/rhnSQL/__init__.py"
    The first line is 206
    Source file "./server/rhnSQL/__init__.py"
    The first line is 203
    def DateFromTicks(*args, **kwargs):
        db = __test_DB()
        return apply(db.DateFromTicks, args, kwargs)
    def TimestampFromTicks(*args, **kwargs):
        db = __test_DB()
        return apply(db.TimestampFromTicks, args, kwargs)
    def Date(*args, **kwargs):
        db = __test_DB()
        return apply(db.Date, args, kwargs)
    def DateFromTicks(*args, **kwargs):
        db = __test_DB()
        return apply(db.DateFromTicks, args, kwargs)



    Clone # 787
    Distance between two fragments = 0
    Clone size = 6
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1458
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1087
    def set_iterator(self):
        checksum_arr = [{'type': self._row['checksum_type'], 'value': self._row['checksum']}]
        arr = [_ChecksumDumper(self._writer, data_iterator=ArrayIterator(checksum_arr))]
        return ArrayIterator(arr)
    def set_iterator(self):
        checksum_arr = [{'type': self._row['checksum_type'], 'value': self._row['checksum']}]
        arr = [_ChecksumDumper(self._writer, data_iterator=ArrayIterator(checksum_arr))]
        return ArrayIterator(arr)



    Clone # 788
    Distance between two fragments = 0
    Clone size = 6
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1458
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 773
    def set_iterator(self):
        checksum_arr = [{'type': self._row['checksum_type'], 'value': self._row['checksum']}]
        arr = [_ChecksumDumper(self._writer, data_iterator=ArrayIterator(checksum_arr))]
        return ArrayIterator(arr)
    def set_iterator(self):
        checksum_arr = [{'type': self._row['checksum_type'], 'value': self._row['checksum']}]
        arr = [_ChecksumDumper(self._writer, data_iterator=ArrayIterator(checksum_arr))]
        return ArrayIterator(arr)



    Clone # 789
    Distance between two fragments = 0
    Clone size = 6
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1087
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 773
    def set_iterator(self):
        checksum_arr = [{'type': self._row['checksum_type'], 'value': self._row['checksum']}]
        arr = [_ChecksumDumper(self._writer, data_iterator=ArrayIterator(checksum_arr))]
        return ArrayIterator(arr)
    def set_iterator(self):
        checksum_arr = [{'type': self._row['checksum_type'], 'value': self._row['checksum']}]
        arr = [_ChecksumDumper(self._writer, data_iterator=ArrayIterator(checksum_arr))]
        return ArrayIterator(arr)



    Clone # 790
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 289
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 280
    class SourcePackageDumper(ShortPackageDumper):
        _loader_class = xmlSource.SourcePackageContainer
        def setMixin(self):
            self._mixin = xmlDiskSource.SourcePackageDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.source_packages
    class PackageDumper(ShortPackageDumper):
        _loader_class = xmlSource.PackageContainer
        def setMixin(self):
            self._mixin = xmlDiskSource.PackageDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.packages



    Clone # 791
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 298
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 289
    class ErrataDumper(ShortPackageDumper):
        _loader_class = xmlSource.ErrataContainer
        def setMixin(self):
            self._mixin = xmlDiskSource.ErrataDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.errata
    class SourcePackageDumper(ShortPackageDumper):
        _loader_class = xmlSource.SourcePackageContainer
        def setMixin(self):
            self._mixin = xmlDiskSource.SourcePackageDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.source_packages



    Clone # 792
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 298
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 280
    class ErrataDumper(ShortPackageDumper):
        _loader_class = xmlSource.ErrataContainer
        def setMixin(self):
            self._mixin = xmlDiskSource.ErrataDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.errata
    class PackageDumper(ShortPackageDumper):
        _loader_class = xmlSource.PackageContainer
        def setMixin(self):
            self._mixin = xmlDiskSource.PackageDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.packages



    Clone # 793
    Distance between two fragments = 2
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 203
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 196
    class ServerGroupServerArchCompatContainer(xmlSource.ServerGroupServerArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerGroupServerArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ChannelPackageArchCompatContainer(xmlSource.ChannelPackageArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ChannelPackageArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 794
    Distance between two fragments = 2
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 203
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 182
    class ServerGroupServerArchCompatContainer(xmlSource.ServerGroupServerArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerGroupServerArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ServerPackageArchCompatContainer(xmlSource.ServerPackageArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerPackageArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 795
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/req_channels.py"
    The first line is 160
    Source file "./server/rhnServerGroup.py"
    The first line is 101
    class Method:
        def __init__(self, name, func):
            self._func = func
            self._name = name
        def __call__(self, *args, **kwargs):
            return apply(self._func, ((self._name)) + (args), kwargs)
    class CallableObj:
        def __init__(self, name, func):
            self.func = func
            self.name = name
        def __call__(self, *args, **kwargs):
            return apply(self.func, ((self.name)) + (args), kwargs)



    Clone # 796
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/rhnActivationKey.py"
    The first line is 329
    Source file "./server/rhnLib.py"
    The first line is 192
    class CallableObj:
        def __init__(self, name, func):
            self.func = func
            self.name = name
        def __call__(self, *args, **kwargs):
            return apply(self.func, ((self.name)) + (args), kwargs)
    class CallableObj:
        def __init__(self, name, func):
            self.func = func
            self.name = name
        def __call__(self, *args, **kwargs):
            return apply(self.func, ((self.name)) + (args), kwargs)



    Clone # 797
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnActivationKey.py"
    The first line is 329
    Source file "./satellite_tools/req_channels.py"
    The first line is 160
    class CallableObj:
        def __init__(self, name, func):
            self.func = func
            self.name = name
        def __call__(self, *args, **kwargs):
            return apply(self.func, ((self.name)) + (args), kwargs)
    class Method:
        def __init__(self, name, func):
            self._func = func
            self._name = name
        def __call__(self, *args, **kwargs):
            return apply(self._func, ((self._name)) + (args), kwargs)



    Clone # 798
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnLib.py"
    The first line is 192
    Source file "./satellite_tools/req_channels.py"
    The first line is 160
    class CallableObj:
        def __init__(self, name, func):
            self.func = func
            self.name = name
        def __call__(self, *args, **kwargs):
            return apply(self.func, ((self.name)) + (args), kwargs)
    class Method:
        def __init__(self, name, func):
            self._func = func
            self._name = name
        def __call__(self, *args, **kwargs):
            return apply(self._func, ((self._name)) + (args), kwargs)



    Clone # 799
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/rhnLib.py"
    The first line is 192
    Source file "./server/rhnServerGroup.py"
    The first line is 101
    class CallableObj:
        def __init__(self, name, func):
            self.func = func
            self.name = name
        def __call__(self, *args, **kwargs):
            return apply(self.func, ((self.name)) + (args), kwargs)
    class CallableObj:
        def __init__(self, name, func):
            self.func = func
            self.name = name
        def __call__(self, *args, **kwargs):
            return apply(self.func, ((self.name)) + (args), kwargs)



    Clone # 800
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/action/configfiles.py"
    The first line is 101
    Source file "./server/action/configfiles.py"
    The first line is 105
    def deploy(server_id, action_id):
        log_debug(3)
        return _get_files(server_id, action_id)
    def verify(server_id, action_id):
        log_debug(3)
        return _get_files(server_id, action_id)
    def verify(server_id, action_id):
        log_debug(3)
        return _get_files(server_id, action_id)
    def diff(server_id, action_id):
        log_debug(3)
        return _get_files(server_id, action_id)



    Clone # 801
    Distance between two fragments = 1
    Clone size = 6
    Source file "./satellite_tools/satComputePkgHeaders.py"
    The first line is 171
    Source file "./server/importlib/backend.py"
    The first line is 163
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        ret[row['label']] = row['id']
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        hash[row['label']] = row['id']
    return ret return hash



    Clone # 802
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/satComputePkgHeaders.py"
    The first line is 171
    Source file "./server/rhnServer/server_packages.py"
    The first line is 215
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        ret[row['label']] = row['id']
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        package_arches_hash[row['id']] = row['label']
    return ret return package_arches_hash



    Clone # 803
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/sync_handlers.py"
    The first line is 731
    Source file "./server/importlib/backend.py"
    The first line is 163
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        cfs[row['label']] = 1
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        hash[row['label']] = row['id']
    return cfs return hash



    Clone # 804
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 163
    Source file "./server/rhnActivationKey.py"
    The first line is 157
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        hash[row['label']] = row['id']
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        ret[row['label']] = None
    return hash return ret



    Clone # 805
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/rhnServer/server_token.py"
    The first line is 193
    Source file "./server/rhnActivationKey.py"
    The first line is 70
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        server_group_id = row['server_group_id']
        server_groups[server_group_id] = row
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        server_group_id = row['server_group_id']
        ret[server_group_id] = None



    Clone # 806
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/action/solarispkgs.py"
    The first line is 21
    Source file "./server/action_extra_data/solarispkgs.py"
    The first line is 22
    __rhnexport__ = ['install', 'remove', 'patchInstall', 'patchRemove', 'patchClusterInstall', 'patchClusterRemove', 'refresh_list'] __rhnexport__ = ['install', 'remove', 'patchInstall', 'patchRemove', 'patchClusterInstall', 'patchClusterRemove', 'refresh_list']
    _query_install = rhnSQL.Statement('\n select distinct\n pn.name name,\n pe.epoch epoch,\n pe.version version,\n pe.release release,\n pa.label arch,\n c.label channel_label,\n nvl2(c.parent_channel, 0, 1) is_parent_channel\n from rhnActionPackage ap,\n rhnPackage p,\n rhnPackageName pn,\n rhnPackageEVR pe,\n rhnPackageArch pa,\n rhnServerChannel sc,\n rhnChannelPackage cp,\n rhnChannel c\n where ap.action_id = :action_id\n and ap.evr_id = p.evr_id\n and ap.evr_id = pe.id\n and ap.name_id = p.name_id\n and ap.name_id = pn.id\n and p.package_arch_id = pa.id\n and p.id = cp.package_id\n and cp.channel_id = sc.channel_id\n and sc.server_id = :server_id\n and sc.channel_id = c.id\n') _query_lookup_action_package = rhnSQL.Statement('\n select ap.id\n from rhnActionPackage ap\n where ap.action_id = :action_id\n and ap.name_id = LOOKUP_PACKAGE_NAME(:name)\n and ap.evr_id = LOOKUP_EVR(:epoch, :version, :release)\n')
    _query_remove = rhnSQL.Statement('\n select distinct\n pn.name name,\n pe.epoch epoch,\n pe.version version,\n pe.release release,\n pa.label arch\n from rhnActionPackage ap,\n rhnPackageName pn,\n rhnPackageEVR pe,\n rhnPackageArch pa\n where ap.action_id = :action_id\n and ap.evr_id = pe.id\n and ap.name_id = pn.id\n and ap.package_arch_id = pa.id (+)\n') _query_delete_server_action_package_result = rhnSQL.Statement('\n delete from rhnServerActionPackageResult\n where server_id = :server_id\n and action_package_id in\n (select ap.id\n from rhnActionPackage ap\n where ap.action_id = :action_id)\n')



    Clone # 807
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/importlib/userAuth.py"
    The first line is 61
    Source file "./server/importlib/userAuth.py"
    The first line is 50
    if self.isSuperuser():
        log_debug(4, 'Is channel admin because isa superuser')
        return 1
    if self.isSuperuser():
        log_debug(4, 'Is org admin because isa superuser')
        return 1
    if 'org_admin' in self.groups:
        log_debug(4, 'Is channel admin because isa org admin')
        return 1
    if 'org_admin' in self.groups:
        log_debug(4, 'Is org admin')
        return 1



    Clone # 808
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/rhnActivationKey.py"
    The first line is 317
    Source file "./server/rhnServerGroup.py"
    The first line is 91
    def __getattr__(self, name):
        if startswith(name, 'get_'):
            return CallableObj(name[4:], self._get)
        if startswith(name, 'set_'):
            return CallableObj(name[4:], self._set)
        raise AttributeError(name)
    def __getattr__(self, name):
        if startswith(name, 'get_'):
            return CallableObj(name[4:], self._get)
        if startswith(name, 'set_'):
            return CallableObj(name[4:], self._set)
        raise AttributeError(name)



    Clone # 809
    Distance between two fragments = 3
    Clone size = 7
    Source file "./test/unit/spacewalk/test/server/rhnsql-tests.py"
    The first line is 64
    Source file "./test/unit/spacewalk/test/server/rhnsql-tests.py"
    The first line is 52
    query = "SELECT TO_CHAR(issued, 'YYYY-MM-DD HH24:MI:SS') issued FROM rhnSatelliteCert WHERE id=:id, name=:name" query = 'INSERT INTO people(a, b, c, d) VALUES(:a, :b, :a, :b)'
    expected_query = "SELECT TO_CHAR(issued, 'YYYY-MM-DD HH24:MI:SS') issued FROM rhnSatelliteCert WHERE id=$1, name=$2" expected_query = 'INSERT INTO people(a, b, c, d) VALUES($1, $2, $3, $4)'
    new_query, param_index, args_found = convert_named_query_params(query) new_query, param_index, args_found = convert_named_query_params(query)
    self.assertEquals(expected_query, new_query) self.assertEquals(expected_query, new_query)
    self.assertEquals(2, args_found) self.assertEquals(4, args_found)
    self.assertEquals(2, len(param_index.keys())) self.assertEquals(2, len(param_index.keys()))



    Clone # 810
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1270
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1238
    tag_name = 'rhn-channel-package-arch-compatibility-map' tag_name = 'rhn-server-channel-arch-compatibility-map'
    _subelement_tag = 'rhn-channel-package-arch-compat' _subelement_tag = 'rhn-server-channel-arch-compat'
    _query_rpm_arch_type_only = rhnSQL.Statement('\n select ca.label "channel-arch",\n pa.label "package-arch"\n from rhnChannelPackageArchCompat cpac, \n rhnChannelArch ca,\n rhnPackageArch pa,\n rhnArchType aac,\n rhnArchType aap\n where cpac.channel_arch_id = ca.id\n and cpac.package_arch_id = pa.id\n and ca.arch_type_id = aac.id\n and aac.label = \'rpm\'\n and pa.arch_type_id = aap.id\n and aap.label = \'rpm\'\n ') _query_rpm_arch_type_only = rhnSQL.Statement('\n select sa.label "server-arch", \n ca.label "channel-arch"\n from rhnServerChannelArchCompat scac, \n rhnServerArch sa,\n rhnChannelArch ca,\n rhnArchType aas,\n rhnArchType aac\n where scac.server_arch_id = sa.id\n and scac.channel_arch_id = ca.id\n and sa.arch_type_id = aas.id\n and aas.label = \'rpm\'\n and ca.arch_type_id = aac.id\n and aac.label = \'rpm\'\n ')
    _query_arch_type_all = rhnSQL.Statement('\n select ca.label "channel-arch",\n pa.label "package-arch"\n from rhnChannelPackageArchCompat cpac, \n rhnChannelArch ca,\n rhnPackageArch pa\n where cpac.channel_arch_id = ca.id\n and cpac.package_arch_id = pa.id\n ') _query_arch_type_all = rhnSQL.Statement('\n select sa.label "server-arch", \n ca.label "channel-arch"\n from rhnServerChannelArchCompat scac, \n rhnServerArch sa,\n rhnChannelArch ca\n where scac.server_arch_id = sa.id\n and scac.channel_arch_id = ca.id\n ')



    Clone # 811
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1270
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1205
    tag_name = 'rhn-channel-package-arch-compatibility-map' tag_name = 'rhn-server-package-arch-compatibility-map'
    _subelement_tag = 'rhn-channel-package-arch-compat' _subelement_tag = 'rhn-server-package-arch-compat'
    _query_rpm_arch_type_only = rhnSQL.Statement('\n select ca.label "channel-arch",\n pa.label "package-arch"\n from rhnChannelPackageArchCompat cpac, \n rhnChannelArch ca,\n rhnPackageArch pa,\n rhnArchType aac,\n rhnArchType aap\n where cpac.channel_arch_id = ca.id\n and cpac.package_arch_id = pa.id\n and ca.arch_type_id = aac.id\n and aac.label = \'rpm\'\n and pa.arch_type_id = aap.id\n and aap.label = \'rpm\'\n ') _query_rpm_arch_type_only = rhnSQL.Statement('\n select sa.label "server-arch", \n pa.label "package-arch",\n spac.preference\n from rhnServerPackageArchCompat spac, \n rhnServerArch sa,\n rhnPackageArch pa,\n rhnArchType aas,\n rhnArchType aap\n where spac.server_arch_id = sa.id\n and spac.package_arch_id = pa.id\n and sa.arch_type_id = aas.id\n and aas.label = \'rpm\'\n and pa.arch_type_id = aap.id\n and aap.label = \'rpm\'\n ')
    _query_arch_type_all = rhnSQL.Statement('\n select ca.label "channel-arch",\n pa.label "package-arch"\n from rhnChannelPackageArchCompat cpac, \n rhnChannelArch ca,\n rhnPackageArch pa\n where cpac.channel_arch_id = ca.id\n and cpac.package_arch_id = pa.id\n ') _query_arch_type_all = rhnSQL.Statement('\n select sa.label "server-arch", \n pa.label "package-arch",\n spac.preference\n from rhnServerPackageArchCompat spac, \n rhnServerArch sa,\n rhnPackageArch pa\n where spac.server_arch_id = sa.id\n and spac.package_arch_id = pa.id\n ')



    Clone # 812
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1238
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1205
    tag_name = 'rhn-server-channel-arch-compatibility-map' tag_name = 'rhn-server-package-arch-compatibility-map'
    _subelement_tag = 'rhn-server-channel-arch-compat' _subelement_tag = 'rhn-server-package-arch-compat'
    _query_rpm_arch_type_only = rhnSQL.Statement('\n select sa.label "server-arch", \n ca.label "channel-arch"\n from rhnServerChannelArchCompat scac, \n rhnServerArch sa,\n rhnChannelArch ca,\n rhnArchType aas,\n rhnArchType aac\n where scac.server_arch_id = sa.id\n and scac.channel_arch_id = ca.id\n and sa.arch_type_id = aas.id\n and aas.label = \'rpm\'\n and ca.arch_type_id = aac.id\n and aac.label = \'rpm\'\n ') _query_rpm_arch_type_only = rhnSQL.Statement('\n select sa.label "server-arch", \n pa.label "package-arch",\n spac.preference\n from rhnServerPackageArchCompat spac, \n rhnServerArch sa,\n rhnPackageArch pa,\n rhnArchType aas,\n rhnArchType aap\n where spac.server_arch_id = sa.id\n and spac.package_arch_id = pa.id\n and sa.arch_type_id = aas.id\n and aas.label = \'rpm\'\n and pa.arch_type_id = aap.id\n and aap.label = \'rpm\'\n ')
    _query_arch_type_all = rhnSQL.Statement('\n select sa.label "server-arch", \n ca.label "channel-arch"\n from rhnServerChannelArchCompat scac, \n rhnServerArch sa,\n rhnChannelArch ca\n where scac.server_arch_id = sa.id\n and scac.channel_arch_id = ca.id\n ') _query_arch_type_all = rhnSQL.Statement('\n select sa.label "server-arch", \n pa.label "package-arch",\n spac.preference\n from rhnServerPackageArchCompat spac, \n rhnServerArch sa,\n rhnPackageArch pa\n where spac.server_arch_id = sa.id\n and spac.package_arch_id = pa.id\n ')



    Clone # 813
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/rhnVirtualization.py"
    The first line is 547
    Source file "./server/rhnVirtualization.py"
    The first line is 419
    get_id_sql = "SELECT sequence_nextval('rhn_vi_id_seq') as id FROM dual" get_id_sql = "SELECT sequence_nextval('rhn_vi_id_seq') as id FROM dual"
    query = rhnSQL.prepare(get_id_sql) query = rhnSQL.prepare(get_id_sql)
    query.execute() query.execute()
    row = (query.fetchone_dict()) or ({}) row = (query.fetchone_dict()) or ({})
    if (not row) or (not row.has_key('id')):
        raise VirtualizationEventError('unable to get virt instance id')
    if (not row) or (not row.has_key('id')):
        raise VirtualizationEventError('unable to get virt instance id')



    Clone # 814
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/test/misc_functions.py"
    The first line is 251
    Source file "./server/test/misc_functions.py"
    The first line is 214
    _counter = 0 _counter = 0
    label = kwargs.get('label') label = kwargs.get('label')
    if label is None:
        label = ('rhn-unittest-%.3f-%s') % ((time.time(), _counter))
        _counter = (_counter) + (1)
    if label is None:
        label = ('rhn-unittest-%.3f-%s') % ((time.time(), _counter))
        _counter = (_counter) + (1)
    product_url = (kwargs.get('product_url')) or ('http://rhn.redhat.com') release = (kwargs.get('release')) or (('release-') + (label))



    Clone # 815
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1615
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1381
    tag_name = 'rhn-product-names' tag_name = 'rhn-kickstartable-trees'
    def set_iterator(self):
        query = rhnSQL.prepare('\n select label, name from rhnProductName\n ')
        query.execute()
        return query
    def set_iterator(self):
        h = rhnSQL.prepare('\n select kt.id, \n c.label channel, \n kt.base_path "base-path", \n kt.label, \n kt.boot_image "boot-image",\n ktt.name "kstree-type-name",\n ktt.label "kstree-type-label",\n kit.name "install-type-name",\n kit.label "install-type-label",\n TO_CHAR(kt.last_modified, \'YYYYMMDDHH24MISS\') "last-modified"\n from rhnKickstartableTree kt,\n rhnKSTreeType ktt,\n rhnKSInstallType kit,\n rhnChannel c\n where kt.channel_id = c.id\n and ktt.id = kt.kstree_type\n and kit.id = kt.install_type\n and kt.org_id is NULL\n ')
        h.execute()
        return h



    Clone # 816
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1615
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1357
    tag_name = 'rhn-product-names' tag_name = 'rhn-blacklist-obsoletes'
    def set_iterator(self):
        query = rhnSQL.prepare('\n select label, name from rhnProductName\n ')
        query.execute()
        return query
    def set_iterator(self):
        h = rhnSQL.prepare('\n select pn1.name, pe.epoch, pe.version, pe.release, \n pa.name "package-arch", pn2.name "ignored-name"\n from rhnBlacklistObsoletes bo, \n rhnPackageName pn1, rhnPackageEVR pe, rhnPackageArch pa,\n rhnPackageName pn2\n where bo.name_id = pn1.id\n and bo.evr_id = pe.id\n and bo.package_arch_id = pa.id\n and bo.ignore_name_id = pn2.id\n ')
        h.execute()
        return h



    Clone # 817
    Distance between two fragments = 2
    Clone size = 6
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1381
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1357
    tag_name = 'rhn-kickstartable-trees' tag_name = 'rhn-blacklist-obsoletes'
    def set_iterator(self):
        h = rhnSQL.prepare('\n select kt.id, \n c.label channel, \n kt.base_path "base-path", \n kt.label, \n kt.boot_image "boot-image",\n ktt.name "kstree-type-name",\n ktt.label "kstree-type-label",\n kit.name "install-type-name",\n kit.label "install-type-label",\n TO_CHAR(kt.last_modified, \'YYYYMMDDHH24MISS\') "last-modified"\n from rhnKickstartableTree kt,\n rhnKSTreeType ktt,\n rhnKSInstallType kit,\n rhnChannel c\n where kt.channel_id = c.id\n and ktt.id = kt.kstree_type\n and kit.id = kt.install_type\n and kt.org_id is NULL\n ')
        h.execute()
        return h
    def set_iterator(self):
        h = rhnSQL.prepare('\n select pn1.name, pe.epoch, pe.version, pe.release, \n pa.name "package-arch", pn2.name "ignored-name"\n from rhnBlacklistObsoletes bo, \n rhnPackageName pn1, rhnPackageEVR pe, rhnPackageArch pa,\n rhnPackageName pn2\n where bo.name_id = pn1.id\n and bo.evr_id = pe.id\n and bo.package_arch_id = pa.id\n and bo.ignore_name_id = pn2.id\n ')
        h.execute()
        return h



    Clone # 818
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/xmlDiskSource.py"
    The first line is 230
    Source file "./satellite_tools/xmlDiskSource.py"
    The first line is 107
    subdir = 'kickstart_trees' subdir = 'channels'
    def __init__(self, mountPoint):
        DiskSource.__init__(self, mountPoint)
        self.id = None
    def __init__(self, mountPoint):
        DiskSource.__init__(self, mountPoint)
        self.channel = None
    def setID(self, ks_label):
        self.id = ks_label
    def setChannel(self, channel):
        self.channel = channel



    Clone # 819
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 1266
    Source file "./server/rhnActivationKey.py"
    The first line is 156
    channels = {} ret = {}
    while 1:
        row = statement.fetchone_dict()
        if not row:
            break
        channels[row['channel_id']] = None
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        ret[row['label']] = None



    Clone # 820
    Distance between two fragments = 3
    Clone size = 7
    Source file "./server/handlers/app/channel.py"
    The first line is 454
    Source file "./server/handlers/app/channel.py"
    The first line is 193
    h = rhnSQL.prepare('\n insert into rhnDistChannelMap \n (channel_id, channel_arch_id, os, release)\n values\n (:channel_id, :channel_arch_id, :os, :release)\n ') h = rhnSQL.prepare(('update rhnChannel set %s where id = :id') % (set_clause))
    try:
        apply(h.execute, (), kwargs)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)
    try:
        apply(h.execute, (), params)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)



    Clone # 821
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 195
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 137
    system_id = register_new_system(params) system_id = register_new_system(params)
    rhnSQL.commit() rhnSQL.commit()
    s = rhnServer.get(system_id) s1 = rhnServer.get(system_id)
    self.assertNotEqual(s, None) self.assertNotEqual(s1, None)
    server_id = s.getid() server_id_1 = s1.getid()
    sgs = misc_functions.fetch_server_groups(server_id) groups1 = misc_functions.fetch_server_groups(server_id_1)



    Clone # 822
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 195
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 74
    system_id = register_new_system(params) system_id = register_new_system(params)
    rhnSQL.commit() rhnSQL.commit()
    s = rhnServer.get(system_id) s = rhnServer.get(system_id)
    self.assertNotEqual(s, None) self.assertNotEqual(s, None)
    server_id = s.getid() server_id = s.getid()
    sgs = misc_functions.fetch_server_groups(server_id) channels = rhnChannel.channels_for_server(server_id)



    Clone # 823
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 168
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 127
    h = rhnSQL.prepare(_query_lookup_kickstart_label) h = rhnSQL.prepare(_query_get_next_action_id)
    h.execute(server_id=server_id, action_id=action_id) h.execute(action_id=action_id, next_action_type=next_action_type)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        return None
    if not row:
        return None
    return row['label'] return row['id']



    Clone # 824
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 146
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 127
    h = rhnSQL.prepare(_query_lookup_kickstart_session_id) h = rhnSQL.prepare(_query_get_next_action_id)
    h.execute(server_id=server_id, action_id=action_id) h.execute(action_id=action_id, next_action_type=next_action_type)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        return None
    if not row:
        return None
    return row['id'] return row['id']



    Clone # 825
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/rhnSQL/driver_cx_Oracle.py"
    The first line is 89
    Source file "./server/rhnSQL/driver_postgresql.py"
    The first line is 253
    params = ','.join([('%s: %s') % ((str(key), str(value))) for key, value in kw.items() ]) params = ','.join([('%s: %s') % ((str(key), str(value))) for key, value in kw.items() ])
    log_debug(5, ('Executing SQL: "%s" with bind params: {%s}') % ((self.sql, params))) log_debug(5, ('Executing SQL: "%s" with bind params: {%s}') % ((self.sql, params)))
    if self.sql is None:
        raise rhnException('Cannot execute empty cursor')
    if self.sql is None:
        raise rhnException('Cannot execute empty cursor')



    Clone # 826
    Distance between two fragments = 1
    Clone size = 6
    Source file "./server/test/unit-test/rhnSQL/test_lob.py"
    The first line is 61
    Source file "./server/test/unit-test/rhnSQL/test_lob.py"
    The first line is 48
    h = rhnSQL.prepare('\n select val from misatestlob where id = :id\n ') h = rhnSQL.prepare('\n select val from misatestlob where id = :id for update of val\n ')
    h.execute(id=new_id) h.execute(id=new_id)
    row = h.fetchone_dict() row = h.fetchone_dict()
    self.assertNotEqual(row, None) self.assertNotEqual(row, None)
    lob = row['val'] lob = row['val']



    Clone # 827
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 102
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 58
    ds.setID(ks_label) dumper.setChannel(channel)
    f = ds.load() f = dumper.load()
    oldContainer = handler.get_container(xmlSource.KickstartableTreesContainer.container_name) oldContainer = handler.get_container(xmlSource.ChannelContainer.container_name)
    newContainer = xmlSource.KickstartableTreesContainer() newContainer = xmlSource.ChannelContainer()
    handler.set_container(newContainer) handler.set_container(newContainer)
    handler.process(f) handler.process(f)



    Clone # 828
    Distance between two fragments = 3
    Clone size = 7
    Source file "./server/handlers/applet/applet.py"
    The first line is 69
    Source file "./server/rhnServer/server_lib.py"
    The first line is 199
    h = rhnSQL.prepare(self._query_lookup_base_channel) h = rhnSQL.prepare('\n select 1 from rhnProxyInfo where server_id = :server_id\n union\n select 1 from rhnSatelliteInfo where server_id = :server_id\n ')
    h.execute(server_id=server_id) h.execute(server_id=server_id)
    row = h.fetchone_dict() ret = h.fetchone_dict()
    if row:
        return 1
    if ret:
        return 1
    return 0 return 0



    Clone # 829
    Distance between two fragments = 2
    Clone size = 7
    Source file "./server/handlers/applet/applet.py"
    The first line is 69
    Source file "./server/rhnServer/server_class.py"
    The first line is 856
    h = rhnSQL.prepare(self._query_lookup_base_channel) h = rhnSQL.prepare('\n select 1\n from rhnServerLock\n where server_id = :server_id\n ')
    h.execute(server_id=server_id) h.execute(server_id=server_id)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if row:
        return 1
    if row:
        return 1
    return 0 return 0



    Clone # 830
    Distance between two fragments = 3
    Clone size = 7
    Source file "./server/handlers/applet/applet.py"
    The first line is 69
    Source file "./server/rhnUser.py"
    The first line is 438
    h = rhnSQL.prepare(self._query_lookup_base_channel) h = rhnSQL.prepare('\n select 1 from rhnWebContactDisabled\n where login_uc = upper(:username)\n ')
    h.execute(server_id=server_id) h.execute(username=username)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if row:
        return 1
    if row:
        return 1
    return 0 return 0



    Clone # 831
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/handlers/app/channel.py"
    The first line is 333
    Source file "./server/rhnUser.py"
    The first line is 412
    h = rhnSQL.prepare('select org_id from web_contact \n where login_uc = UPPER(:org_id)') h = rhnSQL.prepare('\n select w.id from web_contact w\n where w.login_uc = upper(:username)\n ')
    h.execute(org_id=org_id) h.execute(username=username)
    row = h.fetchone_dict() data = h.fetchone_dict()
    if row:
        return row['org_id']
    if data:
        return data['id']



    Clone # 832
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServer/server_lib.py"
    The first line is 199
    Source file "./server/rhnServer/server_class.py"
    The first line is 274
    h = rhnSQL.prepare('\n select 1 from rhnProxyInfo where server_id = :server_id\n union\n select 1 from rhnSatelliteInfo where server_id = :server_id\n ') h = rhnSQL.prepare('\n select 1\n from rhnChannel c, rhnServerChannel sc\n where sc.server_id = :server_id\n and sc.channel_id = c.id\n and c.parent_channel IS NULL\n and sysdate - c.end_of_life > 0\n ')
    h.execute(server_id=server_id) h.execute(server_id=self.getid())
    ret = h.fetchone_dict() ret = h.fetchone_dict()
    if ret:
        return 1
    if ret:
        return 1



    Clone # 833
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/action/packages.py"
    The first line is 50
    Source file "./server/action/errata.py"
    The first line is 31
    h = rhnSQL.prepare(_query_action_verify_packages) h = rhnSQL.prepare(statement)
    h.execute(actionid=actionId) h.execute(action_id=actionId)
    tmppackages = h.fetchall_dict() ret = h.fetchall_dict()
    if not tmppackages:
        raise InvalidAction(('invalid action %s for server %s') % ((actionId, serverId)))
    if not ret:
        raise InvalidAction(('errata.update: Unknown action id %s for server %s') % ((actionId, serverId)))



    Clone # 834
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnMapping.py"
    The first line is 23
    Source file "./server/rhnServer/server_lib.py"
    The first line is 227
    h = rhnSQL.prepare('\n select canon_version\n from rhnRedHatCanonVersion rhcv\n where rhcv.version = :version\n ') h = rhnSQL.prepare('\n select s.name, si.checkin_counter - ((sysdate - s.created) * 100) ticks\n from rhnServer s, rhnServerInfo si\n where s.id = si.server_id\n and sysdate - s.created > 7\n and s.id = :server_id\n ')
    h.execute(version=version) h.execute(server_id=server_id)
    ret = h.fetchone_dict() ret = h.fetchone_dict()
    if not ret:
        return version
    if not ret:
        return 1



    Clone # 835
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnMapping.py"
    The first line is 23
    Source file "./server/rhnChannel.py"
    The first line is 777
    h = rhnSQL.prepare('\n select canon_version\n from rhnRedHatCanonVersion rhcv\n where rhcv.version = :version\n ') h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified \n from\n rhnChannelArch ca\n rhnChannel c,\n rhnChannelPermissions cp\n where\n cp.org_id = :org_id\n and cp.channel_id = c.id\n and c.channel_arch_id = ca.id\n ")
    h.execute(version=version) h.execute(org_id=org_id)
    ret = h.fetchone_dict() ret = h.fetchall_dict()
    if not ret:
        return version
    if not ret:
        return []



    Clone # 836
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 1249
    Source file "./server/rhnChannel.py"
    The first line is 1315
    h = rhnSQL.prepare('\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n p.package_size \n from \n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageName pn,\n rhnPackageEVR pevr,\n rhnPackageArch pa\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.name_id = pn.id\n and p.evr_id = pevr.id\n and p.package_arch_id = pa.id\n order by pn.name, pevr.evr desc, pa.label\n ') g = rhnSQL.prepare("\n select\n pp.package_id,\n 'provides',\n pp.capability_id,\n pp.sense,\n pc.name,\n pc.version\n from\n rhnPackageProvides pp,\n rhnPackageCapability pc\n where\n pp.package_id = :package_id\n and pp.capability_id = pc.id\n union all\n select\n pr.package_id,\n 'requires',\n pr.capability_id,\n pr.sense,\n pc.name,\n pc.version\n from\n rhnPackageRequires pr,\n rhnPackageCapability pc\n where\n pr.package_id = :package_id\n and pr.capability_id = pc.id\n union all\n select\n pcon.package_id,\n 'conflicts',\n pcon.capability_id,\n pcon.sense,\n pc.name,\n pc.version\n from\n rhnPackageConflicts pcon,\n rhnPackageCapability pc\n where\n pcon.package_id = :package_id\n and pcon.capability_id = pc.id\n union all\n select\n po.package_id,\n 'obsoletes',\n po.capability_id,\n po.sense,\n pc.name,\n pc.version\n from\n rhnPackageObsoletes po,\n rhnPackageCapability pc\n where\n po.package_id = :package_id\n and po.capability_id = pc.id\n ")
    h.execute(channel_id=str(channel_id)) h.execute(channel_id=str(channel_id))
    ret = h.fetchall_dict() ret = h.fetchall_dict()
    if not ret:
        return []
    if not ret:
        return []



    Clone # 837
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 1176
    Source file "./server/rhnChannel.py"
    The first line is 1315
    h = rhnSQL.prepare("\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n full_channel.package_size \n from \n rhnPackageArch pa,\n ( select \n p.name_id,\n max(pe.evr) evr\n from\n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageEVR pe\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.evr_id = pe.id\n group by p.name_id\n ) listall,\n ( select distinct\n p.package_size,\n p.name_id,\n p.evr_id,\n p.package_arch_id\n from\n rhnChannelPackage cp,\n rhnPackage p\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ) full_channel,\n -- Rank the package's arch\n ( select\n package_arch_id, \n count(*) rank\n from\n rhnServerPackageArchCompat\n group by package_arch_id\n ) arch_rank,\n rhnPackageName pn,\n rhnPackageEVR pevr\n where\n pn.id = listall.name_id\n -- link back to the specific package\n and full_channel.name_id = listall.name_id\n and full_channel.evr_id = pevr.id\n and pevr.evr = listall.evr\n and pa.id = full_channel.package_arch_id\n and pa.id = arch_rank.package_arch_id\n order by pn.name, arch_rank.rank desc\n ") g = rhnSQL.prepare("\n select\n pp.package_id,\n 'provides',\n pp.capability_id,\n pp.sense,\n pc.name,\n pc.version\n from\n rhnPackageProvides pp,\n rhnPackageCapability pc\n where\n pp.package_id = :package_id\n and pp.capability_id = pc.id\n union all\n select\n pr.package_id,\n 'requires',\n pr.capability_id,\n pr.sense,\n pc.name,\n pc.version\n from\n rhnPackageRequires pr,\n rhnPackageCapability pc\n where\n pr.package_id = :package_id\n and pr.capability_id = pc.id\n union all\n select\n pcon.package_id,\n 'conflicts',\n pcon.capability_id,\n pcon.sense,\n pc.name,\n pc.version\n from\n rhnPackageConflicts pcon,\n rhnPackageCapability pc\n where\n pcon.package_id = :package_id\n and pcon.capability_id = pc.id\n union all\n select\n po.package_id,\n 'obsoletes',\n po.capability_id,\n po.sense,\n pc.name,\n pc.version\n from\n rhnPackageObsoletes po,\n rhnPackageCapability pc\n where\n po.package_id = :package_id\n and po.capability_id = pc.id\n ")
    h.execute(channel_id=str(channel_id)) h.execute(channel_id=str(channel_id))
    ret = h.fetchall_dict() ret = h.fetchall_dict()
    if not ret:
        return []
    if not ret:
        return []



    Clone # 838
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServer/server_lib.py"
    The first line is 227
    Source file "./server/rhnChannel.py"
    The first line is 777
    h = rhnSQL.prepare('\n select s.name, si.checkin_counter - ((sysdate - s.created) * 100) ticks\n from rhnServer s, rhnServerInfo si\n where s.id = si.server_id\n and sysdate - s.created > 7\n and s.id = :server_id\n ') h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified \n from\n rhnChannelArch ca\n rhnChannel c,\n rhnChannelPermissions cp\n where\n cp.org_id = :org_id\n and cp.channel_id = c.id\n and c.channel_arch_id = ca.id\n ")
    h.execute(server_id=server_id) h.execute(org_id=org_id)
    ret = h.fetchone_dict() ret = h.fetchall_dict()
    if not ret:
        return 1
    if not ret:
        return []



    Clone # 839
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 1410
    Source file "./server/rhnChannel.py"
    The first line is 1315
    h = rhnSQL.prepare('\n select\n p.path\n from \n rhnPackage p,\n rhnChannelPackage cp\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ') g = rhnSQL.prepare("\n select\n pp.package_id,\n 'provides',\n pp.capability_id,\n pp.sense,\n pc.name,\n pc.version\n from\n rhnPackageProvides pp,\n rhnPackageCapability pc\n where\n pp.package_id = :package_id\n and pp.capability_id = pc.id\n union all\n select\n pr.package_id,\n 'requires',\n pr.capability_id,\n pr.sense,\n pc.name,\n pc.version\n from\n rhnPackageRequires pr,\n rhnPackageCapability pc\n where\n pr.package_id = :package_id\n and pr.capability_id = pc.id\n union all\n select\n pcon.package_id,\n 'conflicts',\n pcon.capability_id,\n pcon.sense,\n pc.name,\n pc.version\n from\n rhnPackageConflicts pcon,\n rhnPackageCapability pc\n where\n pcon.package_id = :package_id\n and pcon.capability_id = pc.id\n union all\n select\n po.package_id,\n 'obsoletes',\n po.capability_id,\n po.sense,\n pc.name,\n pc.version\n from\n rhnPackageObsoletes po,\n rhnPackageCapability pc\n where\n po.package_id = :package_id\n and po.capability_id = pc.id\n ")
    h.execute(channel_id=str(channel_id)) h.execute(channel_id=str(channel_id))
    ret = h.fetchall() ret = h.fetchall_dict()
    if not ret:
        return []
    if not ret:
        return []



    Clone # 840
    Distance between two fragments = 0
    Clone size = 6
    Source file "./server/test/unit-test/test_rhnChannel.py"
    The first line is 249
    Source file "./server/test/misc_functions.py"
    The first line is 258
    product_url = (kwargs.get('product_url')) or ('http://rhn.redhat.com') product_url = (kwargs.get('product_url')) or ('http://rhn.redhat.com')
    vdict = {'label': label, 'name': (kwargs.get('name')) or (label), 'product_url': product_url} vdict = {'label': label, 'name': (kwargs.get('name')) or (label), 'product_url': product_url}
    return vdict return vdict



    Clone # 841
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 1104
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 910
    def _get_key(self, params):
        kickstart_label = params['kickstart_label']
        return ('xml-kickstartable-tree/%s.xml') % (kickstart_label)
    def _get_key(self, params):
        channel_id = params['channel_id']
        return ('xml-channels/rhn-channel-%d.xml') % (channel_id)
    def _dump_subelement(self, data):
        log_debug(6, data)
        return exportLib.KickstartableTreesDumper.dump_subelement(self, data)
    def _dump_subelement(self, data):
        log_debug(6, data)
        return exportLib.ChannelsDumper.dump_subelement(self, data)



    Clone # 842
    Distance between two fragments = 2
    Clone size = 6
    Source file "./common/rhnApache.py"
    The first line is 94
    Source file "./common/rhnApache.py"
    The first line is 76
    ret = self._set_other(req) ret = self._init_request_processor(req)
    if ret != apache.OK:
        return ret
    if ret != apache.OK:
        return ret
    ret = self._set_lang(req) ret = self._set_client_info(req)
    if ret != apache.OK:
        return ret
    if ret != apache.OK:
        return ret



    Clone # 843
    Distance between two fragments = 2
    Clone size = 6
    Source file "./common/rhnApache.py"
    The first line is 89
    Source file "./common/rhnApache.py"
    The first line is 76
    ret = self._set_proxy_info(req) ret = self._init_request_processor(req)
    if ret != apache.OK:
        return ret
    if ret != apache.OK:
        return ret
    ret = self._set_other(req) ret = self._set_client_info(req)
    if ret != apache.OK:
        return ret
    if ret != apache.OK:
        return ret



    Clone # 844
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/test/test_solve_dependencies.py"
    The first line is 91
    Source file "./server/test/test_solve_dependencies.py"
    The first line is 55
    def testReturnTypeLimit(self):
        assert type(self.solve_deps_with_limits(self.serv_id, [], 2)) == type({})
    def testReturnType(self):
        assert type(self.solve_deps_arch(self.serv_id, [], 2)) == type({})
    def testKeyTypeLimit(self):
        assert type(self.solve_deps_with_limits(self.serv_id, [self.filename], 2).keys()[0]) == type('a')
    def testKeyType(self):
        assert type(self.solve_deps_arch(self.serv_id, [self.filename], 2).keys()[0]) == type('a')
    def testValueTypeLimit(self):
        assert type(self.solve_deps_with_limits(self.serv_id, [self.filename], 2)[self.filename]) == type([])
    def testValueType(self):
        assert type(self.solve_deps_arch(self.serv_id, [self.filename], 2)[self.filename]) == type([])



    Clone # 845
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/test/test_solve_dependencies.py"
    The first line is 100
    Source file "./server/test/test_solve_dependencies.py"
    The first line is 64
    def testNestedValueTypeLimit(self):
        assert type(self.solve_deps_with_limits(self.serv_id, [self.filename], 2)[self.filename][0]) == type([])
    def testNestedValueType(self):
        assert type(self.solve_deps_arch(self.serv_id, [self.filename], 2)[self.filename][0]) == type([])
    def testNestedValueLengthLimit(self):
        assert len(self.solve_deps_with_limits(self.serv_id, [self.filename], 2)[self.filename][0]) > 0
    def testNestedValueLength(self):
        assert len(self.solve_deps_arch(self.serv_id, [self.filename], 2)[self.filename][0]) > 0
    def testNestedValueLengthLimit2(self):
        assert len(self.solve_deps_with_limits(self.serv_id, [self.filename], 2)[self.filename][0]) == 5
    def testNestedValueLength2(self):
        assert len(self.solve_deps_arch(self.serv_id, [self.filename], 2)[self.filename][0]) == 5



    Clone # 846
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/test/test_solve_dependencies.py"
    The first line is 109
    Source file "./server/test/test_solve_dependencies.py"
    The first line is 73
    def testNestedValueTypeLimit0(self):
        assert type(self.solve_deps_with_limits(self.serv_id, [self.filename], 2)[self.filename][0][0]) == type('a')
    def testNestedValueType0(self):
        assert type(self.solve_deps_arch(self.serv_id, [self.filename], 2)[self.filename][0][0]) == type('a')
    def testNestedValueTypeLimit1(self):
        assert type(self.solve_deps_with_limits(self.serv_id, [self.filename], 2)[self.filename][0][1]) == type('a')
    def testNestedValueType1(self):
        assert type(self.solve_deps_arch(self.serv_id, [self.filename], 2)[self.filename][0][1]) == type('a')
    def testNestedValueTypeLimit2(self):
        assert type(self.solve_deps_with_limits(self.serv_id, [self.filename], 2)[self.filename][0][2]) == type('a')
    def testNestedValueType2(self):
        assert type(self.solve_deps_arch(self.serv_id, [self.filename], 2)[self.filename][0][2]) == type('a')



    Clone # 847
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/test/test_solve_dependencies.py"
    The first line is 118
    Source file "./server/test/test_solve_dependencies.py"
    The first line is 82
    def testNestedValueTypeLimit3(self):
        assert type(self.solve_deps_with_limits(self.serv_id, [self.filename], 2)[self.filename][0][3]) == type('a')
    def testNestedValueType3(self):
        assert type(self.solve_deps_arch(self.serv_id, [self.filename], 2)[self.filename][0][3]) == type('a')
    def testNestedValueTypeLimit4(self):
        assert type(self.solve_deps_with_limits(self.serv_id, [self.filename], 2)[self.filename][0][4]) == type('a')
    def testNestedValueType4(self):
        assert type(self.solve_deps_arch(self.serv_id, [self.filename], 2)[self.filename][0][4]) == type('a')
    def testVerifyArchLimit(self):
        assert self.solve_deps_with_limits(self.serv_id, [self.filename], 2)[self.filename][0][4] == self.arch
    def testVerifyArch(self):
        assert self.solve_deps_arch(self.serv_id, [self.filename], 2)[self.filename][0][4] == self.arch



    Clone # 848
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 65
    Source file "./server/test/byterangetests.py"
    The first line is 51
    def testBadCharactersInRange(self):
        try:
            server.byterange.parse_byteranges('bytes=2-CB')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass
    def testNoStartOrEnd(self):
        try:
            server.byterange.parse_byteranges('bytes=-')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass



    Clone # 849
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 65
    Source file "./server/test/byterangetests.py"
    The first line is 37
    def testBadCharactersInRange(self):
        try:
            server.byterange.parse_byteranges('bytes=2-CB')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass
    def testNegativeStart(self):
        try:
            server.byterange.parse_byteranges('bytes=-1-30')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass



    Clone # 850
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/repomd/repository.py"
    The first line is 259
    Source file "./server/repomd/repository.py"
    The first line is 254
    def get_other_xml_file(self):
        return self._cached(self.other_prefix, self.repository.get_other_xml_file)
    def get_primary_xml_file(self):
        return self._cached(self.primary_prefix, self.repository.get_primary_xml_file)
    def get_filelists_xml_file(self):
        return self._cached(self.filelists_prefix, self.repository.get_filelists_xml_file)
    def get_other_xml_file(self):
        return self._cached(self.other_prefix, self.repository.get_other_xml_file)



    Clone # 851
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/repomd/repository.py"
    The first line is 263
    Source file "./server/repomd/repository.py"
    The first line is 254
    def get_filelists_xml_file(self):
        return self._cached(self.filelists_prefix, self.repository.get_filelists_xml_file)
    def get_primary_xml_file(self):
        return self._cached(self.primary_prefix, self.repository.get_primary_xml_file)
    def get_updateinfo_xml_file(self):
        return self._cached(self.updateinfo_prefix, self.repository.get_updateinfo_xml_file)
    def get_other_xml_file(self):
        return self._cached(self.other_prefix, self.repository.get_other_xml_file)



    Clone # 852
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 65
    Source file "./server/test/byterangetests.py"
    The first line is 21
    def testBadCharactersInRange(self):
        try:
            server.byterange.parse_byteranges('bytes=2-CB')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass
    def testEmptyRange(self):
        try:
            server.byterange.parse_byteranges('')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass



    Clone # 853
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 65
    Source file "./server/test/byterangetests.py"
    The first line is 88
    def testBadCharactersInRange(self):
        try:
            server.byterange.parse_byteranges('bytes=2-CB')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass
    def testMultipleRanges(self):
        try:
            server.byterange.parse_byteranges('bytes=1-3,9-12')
            self.fail()
        except server.byterange.UnsatisfyableByteRangeException:
            pass



    Clone # 854
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 58
    Source file "./server/test/byterangetests.py"
    The first line is 88
    def testNoStartInvalidEnd(self):
        try:
            server.byterange.parse_byteranges('bytes=-0')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass
    def testMultipleRanges(self):
        try:
            server.byterange.parse_byteranges('bytes=1-3,9-12')
            self.fail()
        except server.byterange.UnsatisfyableByteRangeException:
            pass



    Clone # 855
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 51
    Source file "./server/test/byterangetests.py"
    The first line is 88
    def testNoStartOrEnd(self):
        try:
            server.byterange.parse_byteranges('bytes=-')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass
    def testMultipleRanges(self):
        try:
            server.byterange.parse_byteranges('bytes=1-3,9-12')
            self.fail()
        except server.byterange.UnsatisfyableByteRangeException:
            pass



    Clone # 856
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 44
    Source file "./server/test/byterangetests.py"
    The first line is 88
    def testStartAfterEnd(self):
        try:
            server.byterange.parse_byteranges('bytes=12-3')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass
    def testMultipleRanges(self):
        try:
            server.byterange.parse_byteranges('bytes=1-3,9-12')
            self.fail()
        except server.byterange.UnsatisfyableByteRangeException:
            pass



    Clone # 857
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 37
    Source file "./server/test/byterangetests.py"
    The first line is 88
    def testNegativeStart(self):
        try:
            server.byterange.parse_byteranges('bytes=-1-30')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass
    def testMultipleRanges(self):
        try:
            server.byterange.parse_byteranges('bytes=1-3,9-12')
            self.fail()
        except server.byterange.UnsatisfyableByteRangeException:
            pass



    Clone # 858
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 29
    Source file "./server/test/byterangetests.py"
    The first line is 88
    def testNoRangeGroups(self):
        try:
            server.byterange.parse_byteranges('bytes=')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass
    def testMultipleRanges(self):
        try:
            server.byterange.parse_byteranges('bytes=1-3,9-12')
            self.fail()
        except server.byterange.UnsatisfyableByteRangeException:
            pass



    Clone # 859
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 21
    Source file "./server/test/byterangetests.py"
    The first line is 88
    def testEmptyRange(self):
        try:
            server.byterange.parse_byteranges('')
            self.fail()
        except server.byterange.InvalidByteRangeException:
            pass
    def testMultipleRanges(self):
        try:
            server.byterange.parse_byteranges('bytes=1-3,9-12')
            self.fail()
        except server.byterange.UnsatisfyableByteRangeException:
            pass



    Clone # 860
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/test/byterangetests.py"
    The first line is 112
    Source file "./server/test/byterangetests.py"
    The first line is 105
    def testSuffixLargerThanFileSize(self):
        try:
            server.byterange.parse_byteranges('bytes=-80', 79)
            self.fail()
        except server.byterange.UnsatisfyableByteRangeException:
            pass
    def testStartPastFileSize(self):
        try:
            server.byterange.parse_byteranges('bytes=50-60', 50)
            self.fail()
        except server.byterange.UnsatisfyableByteRangeException:
            pass



    Clone # 861
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 677
    Source file "./server/importlib/backend.py"
    The first line is 672
    def processServerChannelArchCompatMap(self, entries):
        self.__populateTable('rhnServerChannelArchCompat', entries, delete_extra=1)
    def processServerPackageArchCompatMap(self, entries):
        self.__populateTable('rhnServerPackageArchCompat', entries, delete_extra=1)
    def processChannelPackageArchCompatMap(self, entries):
        self.__populateTable('rhnChannelPackageArchCompat', entries, delete_extra=1)
    def processServerChannelArchCompatMap(self, entries):
        self.__populateTable('rhnServerChannelArchCompat', entries, delete_extra=1)



    Clone # 862
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/importlib/backend.py"
    The first line is 682
    Source file "./server/importlib/backend.py"
    The first line is 672
    def processChannelPackageArchCompatMap(self, entries):
        self.__populateTable('rhnChannelPackageArchCompat', entries, delete_extra=1)
    def processServerPackageArchCompatMap(self, entries):
        self.__populateTable('rhnServerPackageArchCompat', entries, delete_extra=1)
    def processServerGroupServerArchCompatMap(self, entries):
        self.__populateTable('rhnServerServerGroupArchCompat', entries, delete_extra=1)
    def processServerChannelArchCompatMap(self, entries):
        self.__populateTable('rhnServerChannelArchCompat', entries, delete_extra=1)



    Clone # 863
    Distance between two fragments = 2
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 230
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 223
    class SourcePackageContainer(xmlSource.SourcePackageContainer):
        def endContainerCallback(self):
            importer = SourcePackageImport(self.batch, get_backend())
            importer.setIgnoreUploaded(1)
            importer.run()
            self.batch = []
    class PackageContainer(xmlSource.PackageContainer):
        def endContainerCallback(self):
            importer = PackageImport(self.batch, get_backend())
            importer.setIgnoreUploaded(1)
            importer.run()
            self.batch = []



    Clone # 864
    Distance between two fragments = 2
    Clone size = 6
    Source file "./spacewalk/common/fileutils.py"
    The first line is 30
    Source file "./common/rhnCache.py"
    The first line is 43
    def cleanupAbsPath(path):
        if path is None:
            return None
        return os.path.abspath(os.path.expanduser(os.path.expandvars(path)))
    def cleanupPath(path):
        if path is None:
            return None
        return os.path.normpath(os.path.expanduser(os.path.expandvars(path)))



    Clone # 865
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 384
    Source file "./server/rhnDependency.py"
    The first line is 381
    def find_by_packages_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __packages_all_sql)
    def find_by_packages(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __packages_sql)
    def find_by_provides(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __provides_sql)
    def find_by_packages_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __packages_all_sql)



    Clone # 866
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 391
    Source file "./server/rhnDependency.py"
    The first line is 388
    def find_by_provides_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __provides_all_sql)
    def find_by_provides(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __provides_sql)
    def find_by_files(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __files_sql)
    def find_by_provides_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __provides_all_sql)



    Clone # 867
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 388
    Source file "./server/rhnDependency.py"
    The first line is 381
    def find_by_provides(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __provides_sql)
    def find_by_packages(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __packages_sql)
    def find_by_provides_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __provides_all_sql)
    def find_by_packages_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __packages_all_sql)



    Clone # 868
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 395
    Source file "./server/rhnDependency.py"
    The first line is 388
    def find_by_files(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __files_sql)
    def find_by_provides(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __provides_sql)
    def find_by_files_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __files_all_sql)
    def find_by_provides_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __provides_all_sql)



    Clone # 869
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 391
    Source file "./server/rhnDependency.py"
    The first line is 381
    def find_by_provides_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __provides_all_sql)
    def find_by_packages(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __packages_sql)
    def find_by_files(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __files_sql)
    def find_by_packages_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __packages_all_sql)



    Clone # 870
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnDependency.py"
    The first line is 395
    Source file "./server/rhnDependency.py"
    The first line is 381
    def find_by_files(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __files_sql)
    def find_by_packages(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __packages_sql)
    def find_by_files_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __files_all_sql)
    def find_by_packages_all(server_id, deps):
        log_debug(4, server_id, deps)
        return __single_query(server_id, deps, __packages_all_sql)



    Clone # 871
    Distance between two fragments = 0
    Clone size = 5
    Source file "./spacewalk/common/rhn_mpm.py"
    The first line is 169
    Source file "./server/handlers/app/rhn_mpm.py"
    The first line is 146
    header_data = self._read_bytes(input_stream, header_len) header_data = self._read_bytes(input_stream, header_len)
    payload_stream = tempfile.TemporaryFile() payload_stream = tempfile.TemporaryFile()
    self.stream_copy(input_stream, payload_stream) self.stream_copy(input_stream, payload_stream)
    self._read_header(header_data, header_flags) self._read_header(header_data, header_flags)
    self._read_payload(payload_stream, payload_flags) self._read_payload(payload_stream, payload_flags)



    Clone # 872
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/test/misc_functions.py"
    The first line is 287
    Source file "./server/test/unit-test/misc_functions.py"
    The first line is 96
    u = rhnUser.User(username, password) u = rhnUser.User(username, password)
    u.set_org_id(org_id) u.set_org_id(org_id)
    u.save() u.save()
    u.contact['password'] = password u.contact['password'] = password
    u.save() u.save()



    Clone # 873
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/test/misc_functions.py"
    The first line is 287
    Source file "./server/test/misc_functions.py"
    The first line is 119
    u = rhnUser.User(username, password) u = rhnUser.User(username, password)
    u.set_org_id(org_id) u.set_org_id(org_id)
    u.save() u.save()
    u.contact['password'] = password u.contact['password'] = password
    u.save() u.save()



    Clone # 874
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnActivationKey.py"
    The first line is 179
    Source file "./server/rhnServerGroup.py"
    The first line is 80
    t = rhnSQL.Table('rhnServerGroupType', 'label') t = rhnSQL.Table('web_customer', 'id')
    row = t[entitlement_level] row = t[org_id]
    if not row:
        raise InvalidEntitlementError(entitlement_level)
    if not row:
        raise InvalidOrgError(org_id)
    return row['id'] return row['id']



    Clone # 875
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 625
    Source file "./server/rhnVirtualization.py"
    The first line is 682
    new_values = string.join(new_values_array, ', ') new_values = string.join(new_values_array, ', ')
    bindings['row_id'] = existing_row['rvi_id'] bindings['row_id'] = existing_row['instance_id']
    update_sql = ('\n UPDATE rhnVirtualInstance SET %s WHERE id=:row_id\n ') % (new_values) update_sql = ('\n UPDATE rhnVirtualInstanceInfo SET %s WHERE instance_id=:row_id\n ') % (new_values)
    query = rhnSQL.prepare(update_sql) query = rhnSQL.prepare(update_sql)



    Clone # 876
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 625
    Source file "./server/rhnVirtualization.py"
    The first line is 490
    new_values = string.join(new_values_array, ', ') new_values = string.join(new_values_array, ', ')
    bindings['row_id'] = existing_row['rvi_id'] bindings['row_id'] = existing_row['id']
    update_sql = ('\n UPDATE rhnVirtualInstance SET %s WHERE id=:row_id\n ') % (new_values) update_sql = ('\n UPDATE rhnVirtualInstance SET %s WHERE id=:row_id\n ') % (new_values)
    query = rhnSQL.prepare(update_sql) query = rhnSQL.prepare(update_sql)



    Clone # 877
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 1719
    Source file "./server/rhnChannel.py"
    The first line is 1714
    dst = map(lambda k, row=row: row[k], map(lambda k: ('dst_') + (k), keys)) src = map(lambda k, row=row: row[k], map(lambda k: ('src_') + (k), keys))
    for i in [1, 2, 3]:
        if dst[i] is None:
            dst[i] = ''
    for i in [1, 2, 3]:
        if src[i] is None:
            src[i] = ''



    Clone # 878
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 155
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 192
    params = build_new_system_params_with_token(token=token, os_release='2.1AS') params = build_new_system_params_with_token(token=token, os_release='2.1AS')
    system_id = register_new_system(params) system_id = register_new_system(params)
    rhnSQL.commit() rhnSQL.commit()
    s2 = rhnServer.get(system_id) s = rhnServer.get(system_id)



    Clone # 879
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/rhnFlags.py"
    The first line is 84
    Source file "./common/rhnFlags.py"
    The first line is 72
    global __F global __F
    try:
        return __F
    except NameError:
        __F = {}
    try:
        __F.clear()
    except NameError:
        __F = {}



    Clone # 880
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/userAuth.py"
    The first line is 68
    Source file "./server/importlib/userAuth.py"
    The first line is 54
    if 'channel_admin' in self.groups:
        log_debug(4, 'Is channel admin')
        return 1
    if 'org_admin' in self.groups:
        log_debug(4, 'Is org admin')
        return 1
    log_debug(4, 'Is NOT channel admin') log_debug(4, 'Is NOT org admin')
    return 0 return 0



    Clone # 881
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/userAuth.py"
    The first line is 68
    Source file "./server/importlib/userAuth.py"
    The first line is 43
    if 'channel_admin' in self.groups:
        log_debug(4, 'Is channel admin')
        return 1
    if 'rhn_superuser' in self.groups:
        log_debug(4, 'Is superuser')
        return 1
    log_debug(4, 'Is NOT channel admin') log_debug(4, 'Is NOT superuser')
    return 0 return 0



    Clone # 882
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/userAuth.py"
    The first line is 54
    Source file "./server/importlib/userAuth.py"
    The first line is 43
    if 'org_admin' in self.groups:
        log_debug(4, 'Is org admin')
        return 1
    if 'rhn_superuser' in self.groups:
        log_debug(4, 'Is superuser')
        return 1
    log_debug(4, 'Is NOT org admin') log_debug(4, 'Is NOT superuser')
    return 0 return 0



    Clone # 883
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/config_common/templated_document.py"
    The first line is 151
    Source file "./server/config_common/templated_document.py"
    The first line is 134
    def net_intf_module(self, interface_name):
        iface = self._interface_info(interface_name)
        if not iface:
            return None
        return iface['module']
    def net_intf_broadcast(self, interface_name):
        iface = self._interface_info(interface_name)
        if not iface:
            return None
        return iface['broadcast']



    Clone # 884
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/config_common/templated_document.py"
    The first line is 151
    Source file "./server/config_common/templated_document.py"
    The first line is 117
    def net_intf_module(self, interface_name):
        iface = self._interface_info(interface_name)
        if not iface:
            return None
        return iface['module']
    def net_intf_ipaddr(self, interface_name):
        iface = self._interface_info(interface_name)
        if not iface:
            return None
        return iface['ip_addr']



    Clone # 885
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 387
    Source file "./satellite_tools/xmlSource.py"
    The first line is 382
    addItem(PackageArchItem) addItem(ServerArchItem)
    class ChannelArchItem(BaseArchItem):
        item_name = 'rhn-channel-arch'
        item_class = importLib.ChannelArch
    class PackageArchItem(BaseArchItem):
        item_name = 'rhn-package-arch'
        item_class = importLib.PackageArch
    addItem(ChannelArchItem) addItem(PackageArchItem)



    Clone # 886
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 397
    Source file "./satellite_tools/xmlSource.py"
    The first line is 392
    addItem(CPUArchItem) addItem(ChannelArchItem)
    class ServerPackageArchCompatItem(BaseItem):
        item_name = 'rhn-server-package-arch-compat'
        item_class = importLib.ServerPackageArchCompat
    class CPUArchItem(BaseItem):
        item_name = 'rhn-cpu-arch'
        item_class = importLib.CPUArch
    addItem(ServerPackageArchCompatItem) addItem(CPUArchItem)



    Clone # 887
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 407
    Source file "./satellite_tools/xmlSource.py"
    The first line is 402
    addItem(ServerChannelArchCompatItem) addItem(ServerPackageArchCompatItem)
    class ChannelPackageArchCompatItem(BaseItem):
        item_name = 'rhn-channel-package-arch-compat'
        item_class = importLib.ChannelPackageArchCompat
    class ServerChannelArchCompatItem(BaseItem):
        item_name = 'rhn-server-channel-arch-compat'
        item_class = importLib.ServerChannelArchCompat
    addItem(ChannelPackageArchCompatItem) addItem(ServerChannelArchCompatItem)



    Clone # 888
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 402
    Source file "./satellite_tools/xmlSource.py"
    The first line is 392
    addItem(ServerPackageArchCompatItem) addItem(ChannelArchItem)
    class ServerChannelArchCompatItem(BaseItem):
        item_name = 'rhn-server-channel-arch-compat'
        item_class = importLib.ServerChannelArchCompat
    class CPUArchItem(BaseItem):
        item_name = 'rhn-cpu-arch'
        item_class = importLib.CPUArch
    addItem(ServerChannelArchCompatItem) addItem(CPUArchItem)



    Clone # 889
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 412
    Source file "./satellite_tools/xmlSource.py"
    The first line is 402
    addItem(ChannelPackageArchCompatItem) addItem(ServerPackageArchCompatItem)
    class ServerGroupServerArchCompatItem(BaseItem):
        item_name = 'rhn-server-group-server-arch-compat'
        item_class = importLib.ServerGroupServerArchCompat
    class ServerChannelArchCompatItem(BaseItem):
        item_name = 'rhn-server-channel-arch-compat'
        item_class = importLib.ServerChannelArchCompat
    addItem(ServerGroupServerArchCompatItem) addItem(ServerChannelArchCompatItem)



    Clone # 890
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 407
    Source file "./satellite_tools/xmlSource.py"
    The first line is 392
    addItem(ServerChannelArchCompatItem) addItem(ChannelArchItem)
    class ChannelPackageArchCompatItem(BaseItem):
        item_name = 'rhn-channel-package-arch-compat'
        item_class = importLib.ChannelPackageArchCompat
    class CPUArchItem(BaseItem):
        item_name = 'rhn-cpu-arch'
        item_class = importLib.CPUArch
    addItem(ChannelPackageArchCompatItem) addItem(CPUArchItem)



    Clone # 891
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 412
    Source file "./satellite_tools/xmlSource.py"
    The first line is 392
    addItem(ChannelPackageArchCompatItem) addItem(ChannelArchItem)
    class ServerGroupServerArchCompatItem(BaseItem):
        item_name = 'rhn-server-group-server-arch-compat'
        item_class = importLib.ServerGroupServerArchCompat
    class CPUArchItem(BaseItem):
        item_name = 'rhn-cpu-arch'
        item_class = importLib.CPUArch
    addItem(ServerGroupServerArchCompatItem) addItem(CPUArchItem)



    Clone # 892
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 550
    Source file "./server/rhnChannel.py"
    The first line is 528
    if not isinstance(e, DictType):
        raise InvalidEntryError(e, 'Entry is not a dictionary')
    if not isinstance(e, DictType):
        raise InvalidEntryError(e, 'Entry is not a dictionary')
    for f in mandatory_fields:
        if not e.has_key(f):
            raise InvalidEntryError(e, ('Missing required field %s') % (f))
    for f in mandatory_fields:
        if not e.has_key(f):
            raise InvalidEntryError(e, ('Missing required field %s') % (f))



    Clone # 893
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnUser.py"
    The first line is 758
    Source file "./server/rhnUser.py"
    The first line is 638
    if not password:
        raise rhnFault(12)
    if not password:
        raise rhnFault(12)
    if len(password) < CFG.MIN_PASSWD_LEN:
        raise rhnFault(14, (_('password must be at least %d characters')) % (CFG.MIN_PASSWD_LEN))
    if len(username) < CFG.MIN_USER_LEN:
        raise rhnFault(13, (_('username should be at least %d characters')) % (CFG.MIN_USER_LEN))



    Clone # 894
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 391
    Source file "./server/importlib/backend.py"
    The first line is 330
    if not hash:
        return None
    if not erratum:
        return None
    sql = '\n select c.label channel, pcm.is_source\n from rhnPathChannelMap pcm, rhnChannel c\n where pcm.path = :path\n and pcm.channel_id = c.id\n ' sql = '\n select advisory \n from rhnErrata \n where advisory_name = :advisory_name\n '
    h = self.dbmodule.prepare(sql) h = self.dbmodule.prepare(sql)



    Clone # 895
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 391
    Source file "./server/importlib/backend.py"
    The first line is 347
    if not hash:
        return None
    if not erratum:
        return None
    sql = '\n select c.label channel, pcm.is_source\n from rhnPathChannelMap pcm, rhnChannel c\n where pcm.path = :path\n and pcm.channel_id = c.id\n ' sql = '\n select id \n from rhnErrataSeverity \n where label = :severity\n '
    h = self.dbmodule.prepare(sql) h = self.dbmodule.prepare(sql)



    Clone # 896
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 391
    Source file "./server/importlib/backend.py"
    The first line is 375
    if not hash:
        return None
    if not hash:
        return None
    sql = '\n select c.label channel, pcm.is_source\n from rhnPathChannelMap pcm, rhnChannel c\n where pcm.path = :path\n and pcm.channel_id = c.id\n ' sql = '\n select beehive_path, ftp_path\n from rhnBeehivePathMap\n where path = :path\n '
    h = self.dbmodule.prepare(sql) h = self.dbmodule.prepare(sql)



    Clone # 897
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 391
    Source file "./server/importlib/backend.py"
    The first line is 118
    if not hash:
        return None
    if not toinsert[0]:
        return None
    sql = '\n select c.label channel, pcm.is_source\n from rhnPathChannelMap pcm, rhnChannel c\n where pcm.path = :path\n and pcm.channel_id = c.id\n ' sql = '\n insert into rhnPackageCapability \n (id, name, version) values\n (:id, :name, :version)\n '
    h = self.dbmodule.prepare(sql) h = self.dbmodule.prepare(sql)



    Clone # 898
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 330
    Source file "./server/importlib/backend.py"
    The first line is 347
    if not erratum:
        return None
    if not erratum:
        return None
    sql = '\n select advisory \n from rhnErrata \n where advisory_name = :advisory_name\n ' sql = '\n select id \n from rhnErrataSeverity \n where label = :severity\n '
    h = self.dbmodule.prepare(sql) h = self.dbmodule.prepare(sql)



    Clone # 899
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 330
    Source file "./server/importlib/backend.py"
    The first line is 375
    if not erratum:
        return None
    if not hash:
        return None
    sql = '\n select advisory \n from rhnErrata \n where advisory_name = :advisory_name\n ' sql = '\n select beehive_path, ftp_path\n from rhnBeehivePathMap\n where path = :path\n '
    h = self.dbmodule.prepare(sql) h = self.dbmodule.prepare(sql)



    Clone # 900
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 347
    Source file "./server/importlib/backend.py"
    The first line is 375
    if not erratum:
        return None
    if not hash:
        return None
    sql = '\n select id \n from rhnErrataSeverity \n where label = :severity\n ' sql = '\n select beehive_path, ftp_path\n from rhnBeehivePathMap\n where path = :path\n '
    h = self.dbmodule.prepare(sql) h = self.dbmodule.prepare(sql)



    Clone # 901
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 375
    Source file "./server/importlib/backend.py"
    The first line is 118
    if not hash:
        return None
    if not toinsert[0]:
        return None
    sql = '\n select beehive_path, ftp_path\n from rhnBeehivePathMap\n where path = :path\n ' sql = '\n insert into rhnPackageCapability \n (id, name, version) values\n (:id, :name, :version)\n '
    h = self.dbmodule.prepare(sql) h = self.dbmodule.prepare(sql)



    Clone # 902
    Distance between two fragments = 1
    Clone size = 5
    Source file "./common/rhnCache.py"
    The first line is 321
    Source file "./common/rhnCache.py"
    The first line is 249
    def set(self, name, value, modified=None, user='root', group='root', mode=493):
        f = self.set_file(name, modified, user, group, mode)
        f.write(value)
        f.close()
    def set(self, name, value, modified=None, user='root', group='root', mode=493):
        fd = self.set_file(name, modified, user, group, mode)
        fd.write(value)
        fd.close()



    Clone # 903
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnSQL/sql_table.py"
    The first line is 75
    Source file "./server/rhnSQL/sql_row.py"
    The first line is 41
    sql = ('select %s from %s where rownum = 0') % ((self.__hashid, self.__table)) sql = ('select %s from %s where rownum = 0') % ((self.hashname, self.table))
    try:
        h = self.__db.prepare(sql)
    except:
        raise ValueError, 'Invalid table or column'
    try:
        h = self.db.prepare(sql)
    except:
        raise ValueError, 'Invalid table or column'
    del h del h



    Clone # 904
    Distance between two fragments = 0
    Clone size = 5
    Source file "./test/non-unit/server/rhnSQL/dbtests.py"
    The first line is 112
    Source file "./test/non-unit/server/rhnSQL/dbtests.py"
    The first line is 84
    query = ('INSERT INTO %s(id, name) VALUES(:id, :name)') % (self.temp_table) query = ('INSERT INTO %s(id, name) VALUES(:id, :name)') % (self.temp_table)
    ids = [1000, 1001] ids = [1000, 1001]
    names = ['Somebody', 'Else'] names = ['Somebody', 'Else']
    cursor = rhnSQL.prepare(query) cursor = rhnSQL.prepare(query)



    Clone # 905
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/packages.py"
    The first line is 414
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 23
    def delta(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.delta: Should do something useful with this data', server_id, action_id, data)
    def get(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.get: Should do something useful with this data', server_id, action_id, data)



    Clone # 906
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/packages.py"
    The first line is 414
    Source file "./server/action_extra_data/rollback.py"
    The first line is 22
    def delta(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.delta: Should do something useful with this data', server_id, action_id, data)
    def config(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.config: Should do something useful with this data', server_id, action_id, data)



    Clone # 907
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/packages.py"
    The first line is 414
    Source file "./server/action_extra_data/packages.py"
    The first line is 408
    def delta(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.delta: Should do something useful with this data', server_id, action_id, data)
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)



    Clone # 908
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/action_extra_data/solarispkgs.py"
    The first line is 124
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 29
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_debug('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.update: Should do something useful with this data', server_id, action_id, data)



    Clone # 909
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/action_extra_data/solarispkgs.py"
    The first line is 124
    Source file "./server/action_extra_data/rollback.py"
    The first line is 34
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_debug('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def rollback(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)



    Clone # 910
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/solarispkgs.py"
    The first line is 124
    Source file "./server/action_extra_data/hardware.py"
    The first line is 21
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_debug('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.hardware.refresh_list: Should do something useful with this data', server_id, action_id, data)



    Clone # 911
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/action_extra_data/solarispkgs.py"
    The first line is 124
    Source file "./server/action_extra_data/errata.py"
    The first line is 23
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_debug('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.errata.update: Should do something useful with this data', server_id, action_id, data)



    Clone # 912
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 29
    Source file "./server/action_extra_data/hardware.py"
    The first line is 21
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.update: Should do something useful with this data', server_id, action_id, data)
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.hardware.refresh_list: Should do something useful with this data', server_id, action_id, data)



    Clone # 913
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 29
    Source file "./server/action_extra_data/errata.py"
    The first line is 23
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.update: Should do something useful with this data', server_id, action_id, data)
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.errata.update: Should do something useful with this data', server_id, action_id, data)



    Clone # 914
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/rollback.py"
    The first line is 34
    Source file "./server/action_extra_data/hardware.py"
    The first line is 21
    def rollback(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.hardware.refresh_list: Should do something useful with this data', server_id, action_id, data)



    Clone # 915
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/rollback.py"
    The first line is 34
    Source file "./server/action_extra_data/errata.py"
    The first line is 23
    def rollback(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.errata.update: Should do something useful with this data', server_id, action_id, data)



    Clone # 916
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/action_extra_data/solarispkgs.py"
    The first line is 124
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 23
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_debug('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def get(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.get: Should do something useful with this data', server_id, action_id, data)



    Clone # 917
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/action_extra_data/solarispkgs.py"
    The first line is 124
    Source file "./server/action_extra_data/rollback.py"
    The first line is 28
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_debug('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def listTransactions(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)



    Clone # 918
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/action_extra_data/solarispkgs.py"
    The first line is 124
    Source file "./server/action_extra_data/rollback.py"
    The first line is 22
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_debug('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def config(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.config: Should do something useful with this data', server_id, action_id, data)



    Clone # 919
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/action_extra_data/solarispkgs.py"
    The first line is 124
    Source file "./server/action_extra_data/packages.py"
    The first line is 414
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_debug('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def delta(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.delta: Should do something useful with this data', server_id, action_id, data)



    Clone # 920
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/action_extra_data/solarispkgs.py"
    The first line is 124
    Source file "./server/action_extra_data/packages.py"
    The first line is 408
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_debug('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)



    Clone # 921
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 29
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 23
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.update: Should do something useful with this data', server_id, action_id, data)
    def get(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.get: Should do something useful with this data', server_id, action_id, data)



    Clone # 922
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 29
    Source file "./server/action_extra_data/rollback.py"
    The first line is 22
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.update: Should do something useful with this data', server_id, action_id, data)
    def config(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.config: Should do something useful with this data', server_id, action_id, data)



    Clone # 923
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 29
    Source file "./server/action_extra_data/packages.py"
    The first line is 408
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.update: Should do something useful with this data', server_id, action_id, data)
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)



    Clone # 924
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/rollback.py"
    The first line is 34
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 23
    def rollback(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
    def get(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.get: Should do something useful with this data', server_id, action_id, data)



    Clone # 925
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/rollback.py"
    The first line is 34
    Source file "./server/action_extra_data/rollback.py"
    The first line is 22
    def rollback(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
    def config(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.config: Should do something useful with this data', server_id, action_id, data)



    Clone # 926
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/rollback.py"
    The first line is 34
    Source file "./server/action_extra_data/packages.py"
    The first line is 408
    def rollback(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)



    Clone # 927
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/hardware.py"
    The first line is 21
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 23
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.hardware.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def get(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.get: Should do something useful with this data', server_id, action_id, data)



    Clone # 928
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/hardware.py"
    The first line is 21
    Source file "./server/action_extra_data/rollback.py"
    The first line is 28
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.hardware.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def listTransactions(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)



    Clone # 929
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/hardware.py"
    The first line is 21
    Source file "./server/action_extra_data/rollback.py"
    The first line is 22
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.hardware.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def config(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.config: Should do something useful with this data', server_id, action_id, data)



    Clone # 930
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/hardware.py"
    The first line is 21
    Source file "./server/action_extra_data/packages.py"
    The first line is 414
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.hardware.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def delta(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.delta: Should do something useful with this data', server_id, action_id, data)



    Clone # 931
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/action_extra_data/hardware.py"
    The first line is 21
    Source file "./server/action_extra_data/packages.py"
    The first line is 408
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.hardware.refresh_list: Should do something useful with this data', server_id, action_id, data)
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)



    Clone # 932
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/errata.py"
    The first line is 23
    Source file "./server/action_extra_data/up2date_config.py"
    The first line is 23
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.errata.update: Should do something useful with this data', server_id, action_id, data)
    def get(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.up2date_config.get: Should do something useful with this data', server_id, action_id, data)



    Clone # 933
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/errata.py"
    The first line is 23
    Source file "./server/action_extra_data/rollback.py"
    The first line is 28
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.errata.update: Should do something useful with this data', server_id, action_id, data)
    def listTransactions(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.listTransactions: Should do something useful with this data', server_id, action_id, data)



    Clone # 934
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/errata.py"
    The first line is 23
    Source file "./server/action_extra_data/rollback.py"
    The first line is 22
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.errata.update: Should do something useful with this data', server_id, action_id, data)
    def config(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.rollback.config: Should do something useful with this data', server_id, action_id, data)



    Clone # 935
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/errata.py"
    The first line is 23
    Source file "./server/action_extra_data/packages.py"
    The first line is 414
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.errata.update: Should do something useful with this data', server_id, action_id, data)
    def delta(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.delta: Should do something useful with this data', server_id, action_id, data)



    Clone # 936
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action_extra_data/errata.py"
    The first line is 23
    Source file "./server/action_extra_data/packages.py"
    The first line is 408
    def update(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_error.errata.update: Should do something useful with this data', server_id, action_id, data)
    def refresh_list(server_id, action_id, data={}):
        if not data:
            return None
        log_error('action_extra_data.packages.refresh_list: Should do something useful with this data', server_id, action_id, data)



    Clone # 937
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 340
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 313
    print 'Dumping errata', erratum print 'Dumping package', package
    dumper.setID(erratum) dumper.setID(package)
    ret = dumper.dump(force=self.options.force, timestamp=timestamp) ret = dumper.dump(force=self.options.force, timestamp=last_modified)
    if ret:
        print ' Wrote', ret
    if ret:
        print ' Wrote', ret



    Clone # 938
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 39
    Source file "./server/test/unit-test/test_misc_functions.py"
    The first line is 33
    def setUp(self):
        initCFG('server.xmlrpc')
        rhnSQL.initDB(DB)
    def setUp(self):
        initCFG('server')
        rhnSQL.initDB(DB)
    def tearDown(self):
        rhnSQL.rollback()
    def tearDown(self):
        rhnSQL.rollback()



    Clone # 939
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 315
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 283
    action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_guest.schedule_virt_guest_pkg_install', action_name='Schedule install of rhn-virtualization-guest package.', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_guest.add_tools_channel', action_name='Subscribe guest to RHN Tools channel.', delta_time=0, scheduler=scheduler, org_id=org_id)



    Clone # 940
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 315
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 276
    action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_guest.schedule_virt_guest_pkg_install', action_name='Schedule install of rhn-virtualization-guest package.', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_host.add_tools_channel', action_name='Subscribe server to RHN Tools channel.', delta_time=0, scheduler=scheduler, org_id=org_id)



    Clone # 941
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 307
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 283
    action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_host.schedule_virt_host_pkg_install', action_name='Schedule install of rhn-virtualization-host package.', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_guest.add_tools_channel', action_name='Subscribe guest to RHN Tools channel.', delta_time=0, scheduler=scheduler, org_id=org_id)



    Clone # 942
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 307
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 276
    action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_host.schedule_virt_host_pkg_install', action_name='Schedule install of rhn-virtualization-host package.', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_host.add_tools_channel', action_name='Subscribe server to RHN Tools channel.', delta_time=0, scheduler=scheduler, org_id=org_id)



    Clone # 943
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 283
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 276
    action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_guest.add_tools_channel', action_name='Subscribe guest to RHN Tools channel.', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_host.add_tools_channel', action_name='Subscribe server to RHN Tools channel.', delta_time=0, scheduler=scheduler, org_id=org_id)



    Clone # 944
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 315
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 234
    action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_guest.schedule_virt_guest_pkg_install', action_name='Schedule install of rhn-virtualization-guest package.', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart.schedule_sync', action_name='Schedule a package sync', delta_time=0, scheduler=scheduler, org_id=org_id)



    Clone # 945
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 307
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 234
    action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_host.schedule_virt_host_pkg_install', action_name='Schedule install of rhn-virtualization-host package.', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart.schedule_sync', action_name='Schedule a package sync', delta_time=0, scheduler=scheduler, org_id=org_id)



    Clone # 946
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 283
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 234
    action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_guest.add_tools_channel', action_name='Subscribe guest to RHN Tools channel.', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart.schedule_sync', action_name='Schedule a package sync', delta_time=0, scheduler=scheduler, org_id=org_id)



    Clone # 947
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 276
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 234
    action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart_host.add_tools_channel', action_name='Subscribe server to RHN Tools channel.', delta_time=0, scheduler=scheduler, org_id=org_id) action_id = rhnAction.schedule_server_action(server_id, action_type='kickstart.schedule_sync', action_name='Schedule a package sync', delta_time=0, scheduler=scheduler, org_id=org_id)



    Clone # 948
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 701
    Source file "./server/rhnVirtualization.py"
    The first line is 692
    def __confirm_domains(self, system_id):
        update_sql = '\n UPDATE rhnVirtualInstance\n SET confirmed=1\n WHERE host_system_id=:sysid\n '
        query = rhnSQL.prepare(update_sql)
        query.execute(sysid=system_id)
    def __unconfirm_domains(self, system_id):
        update_sql = '\n UPDATE rhnVirtualInstance\n SET confirmed=0\n WHERE host_system_id=:sysid\n '
        query = rhnSQL.prepare(update_sql)
        query.execute(sysid=system_id)



    Clone # 949
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/handlers/app/packages.py"
    The first line is 641
    Source file "./server/handlers/app/packages.py"
    The first line is 478
    def getSourcePackageMD5sumBySession(self, session_string, info):
        log_debug(3)
        self._MD5sum2Checksum_info(info)
        return self._Checksum2MD5sum_list(self.getSourcePackageChecksumBySession(session_string, info))
    def getPackageMD5sumBySession(self, session_string, info):
        log_debug(3)
        self._MD5sum2Checksum_info(info)
        return self._Checksum2MD5sum_list(self.getPackageChecksumBySession(session_string, info))



    Clone # 950
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 682
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 665
    def get_server_package_profile(server_id):
        h = rhnSQL.prepare('\n select pn.name, pe.version, pe.release, pe.epoch, pa.label\n from rhnServerPackage sp,\n rhnPackageName pn,\n rhnPackageEVR pe,\n rhnPackageArch pa\n where sp.server_id = :server_id\n and sp.name_id = pn.id\n and sp.evr_id = pe.id\n and sp.package_arch_id = pa.id\n ')
        h.execute(server_id=server_id)
        return _packages_from_cursor(h)
    def get_kisckstart_session_package_profile(kickstart_session_id):
        h = rhnSQL.prepare('\n select pn.name, pe.version, pe.release, pe.epoch, pa.label\n from rhnKickstartSession ks,\n rhnServerProfilePackage spp,\n rhnPackageName pn,\n rhnPackageEVR pe,\n rhnPackageArch pa\n where ks.id = :kickstart_session_id\n and ks.server_profile_id = spp.server_profile_id\n and spp.name_id = pn.id\n and spp.evr_id = pe.id\n and spp.package_arch_id = pa.id\n ')
        h.execute(kickstart_session_id=kickstart_session_id)
        return _packages_from_cursor(h)



    Clone # 951
    Distance between two fragments = 0
    Clone size = 5
    Source file "./common/rhnTB.py"
    The first line is 75
    Source file "./server/handlers/config/test/test_template1.py"
    The first line is 57
    try:
        s = str(value)
    except:
        s = ''
    try:
        s = str(value)
    except:
        s = ''
    if len(s) > (100) * (1024):
        s = ''
    if len(s) > (100) * (1024):
        s = ''



    Clone # 952
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 768
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 225
    channel_product_details = self._get_channel_product_details() channel_product_details = self._get_channel_product_details()
    arr.append(exportLib.SimpleDumper(self._writer, 'rhn-channel-product-name', channel_product_details[0])) arr.append(SimpleDumper(self._writer, 'rhn-channel-product-name', channel_product_details[0]))
    arr.append(exportLib.SimpleDumper(self._writer, 'rhn-channel-product-version', channel_product_details[1])) arr.append(SimpleDumper(self._writer, 'rhn-channel-product-version', channel_product_details[1]))



    Clone # 953
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/importlib/channelImport.py"
    The first line is 132
    Source file "./server/importlib/channelImport.py"
    The first line is 93
    arch = release['channel_arch'] arch = channel['channel_arch']
    if self.arches[arch] is None:
        channel.ignored = 1
        raise InvalidArchError(arch, ('Unsupported channel arch %s') % (arch))
    if self.arches[arch] is None:
        channel.ignored = 1
        raise InvalidArchError(arch, ('Unsupported channel arch %s') % (arch))
    release['channel_arch_id'] = self.arches[arch] channel['channel_arch_id'] = self.arches[arch]



    Clone # 954
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/importlib/channelImport.py"
    The first line is 123
    Source file "./server/importlib/channelImport.py"
    The first line is 93
    arch = dist['channel_arch'] arch = channel['channel_arch']
    if self.arches[arch] is None:
        channel.ignored = 1
        raise InvalidArchError(arch, ('Unsupported channel arch %s') % (arch))
    if self.arches[arch] is None:
        channel.ignored = 1
        raise InvalidArchError(arch, ('Unsupported channel arch %s') % (arch))
    dist['channel_arch_id'] = self.arches[arch] channel['channel_arch_id'] = self.arches[arch]



    Clone # 955
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 369
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 355
    last_modified = package['last_modified'] last_modified = p['last_modified']
    last_modified = rhnLib.timestamp(last_modified) last_modified = rhnLib.timestamp(last_modified)
    dumper.setID(package) dumper.setID(package)
    dumper.set_utime(last_modified) dumper.set_utime(last_modified)
    dumper.dump(force=self.options.force) dumper.dump(force=self.options.force)



    Clone # 956
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/sat/cert.py"
    The first line is 38
    Source file "./server/rhnChannel.py"
    The first line is 2148
    server_id = self.server.server['id'] server_id = server.server['id']
    h = rhnSQL.prepare('\n select cert\n from rhnSatelliteInfo si\n where si.server_id = :server_id') h = rhnSQL.prepare('\n select sc.channel_id\n from rhnServerChannel sc\n where sc.server_id = :server_id\n ')
    h.execute(server_id=server_id) h.execute(server_id=server_id)
    row = h.fetchone_dict() ret = h.fetchone_dict()



    Clone # 957
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/archImport.py"
    The first line is 88
    Source file "./server/importlib/archImport.py"
    The first line is 82
    arch2_name = entry[self.arches2_name] arch1_name = entry[self.arches1_name]
    val = self.arches2.get(arch2_name) val = self.arches1.get(arch1_name)
    if not val:
        raise ValueError(('Unsupported arch %s') % (arch2_name))
    if not val:
        raise ValueError(('Unsupported arch %s') % (arch1_name))
    entry[self.arches2_field_name] = val entry[self.arches1_field_name] = val



    Clone # 958
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/test/test_channel.py"
    The first line is 40
    Source file "./server/handlers/app/test/test_channel.py"
    The first line is 191
    version = options['dist_release'] version = options['dist_release']
    kargs = {'channel_id': 217, 'channel_arch_id': 500, 'release': version} kargs = {'channel_id': 217, 'channel_arch_id': 500, 'release': version}



    Clone # 959
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 1765
    Source file "./server/importlib/backend.py"
    The first line is 1725
    if not hash[k]:
        return None
    if not hash[k]:
        return None
    updateObj = TableUpdate(tab, self.dbmodule) insertObj = TableInsert(tab, self.dbmodule)
    updateObj.query(hash) insertObj.query(hash)
    return None return None



    Clone # 960
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 485
    Source file "./server/rhnServer/server_packages.py"
    The first line is 424
    sigkeys = rhn_rpm.RPM_Header(header).signatures sigkeys = rhn_rpm.RPM_Header(header).signatures
    key_id = None key_id = None
    for sig in sigkeys:
        if sig['signature_type'] == 'gpg':
            key_id = sig['key_id']
    for sig in sigkeys:
        if sig['signature_type'] == 'gpg':
            key_id = sig['key_id']



    Clone # 961
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 367
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 210
    _loader_class = xmlSource.KickstartableTreesContainer _loader_class = xmlSource.ChannelContainer
    def setMixin(self):
        self._mixin = xmlDiskSource.KickstartDataDiskSource(self.mountPoint)
    def setMixin(self):
        self._mixin = xmlDiskSource.ChannelDiskSource(self.mountPoint)
    def setID(self, ks_label):
        return self._mixin.setID(ks_label)
    def setChannel(self, channel):
        return self._mixin.setChannel(channel)



    Clone # 962
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 228
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 210
    _loader_class = xmlSource.IncompletePackageContainer _loader_class = xmlSource.ChannelContainer
    def setMixin(self):
        self._mixin = xmlDiskSource.ShortPackageDiskSource(self.mountPoint)
    def setMixin(self):
        self._mixin = xmlDiskSource.ChannelDiskSource(self.mountPoint)
    def setID(self, id):
        return self._mixin.setID(id)
    def setChannel(self, channel):
        return self._mixin.setChannel(channel)



    Clone # 963
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnServer/server_hardware.py"
    The first line is 139
    Source file "./server/rhnServer/server_hardware.py"
    The first line is 115
    extra = {'vendorid': 'prop1', 'deviceid': 'prop2', 'subvendorid': 'prop3', 'subdeviceid': 'prop4'} extra = {'pnpmfr': 'prop1', 'pnpdesc': 'prop2', 'pnpmodel': 'prop3', 'pnpcompat': 'prop4'}



    Clone # 964
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnServer/server_hardware.py"
    The first line is 139
    Source file "./server/rhnServer/server_hardware.py"
    The first line is 100
    extra = {'vendorid': 'prop1', 'deviceid': 'prop2', 'subvendorid': 'prop3', 'subdeviceid': 'prop4'} extra = {'monitor': 'prop1', 'width': 'prop2', 'height': 'prop3', 'freq': 'prop4'}



    Clone # 965
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnServer/server_hardware.py"
    The first line is 115
    Source file "./server/rhnServer/server_hardware.py"
    The first line is 100
    extra = {'pnpmfr': 'prop1', 'pnpdesc': 'prop2', 'pnpmodel': 'prop3', 'pnpcompat': 'prop4'} extra = {'monitor': 'prop1', 'width': 'prop2', 'height': 'prop3', 'freq': 'prop4'}



    Clone # 966
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/test/test_xmlrpc_up2date.py"
    The first line is 21
    Source file "./server/test/test_solve_dependencies.py"
    The first line is 22
    def make_nvre_dict(epoch, version, release):
        return {'epoch': epoch, 'version': version, 'release': release}
    def make_nvre_dict(epoch, version, release):
        return {'epoch': epoch, 'version': version, 'release': release}



    Clone # 967
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/xmlrpc/up2date.py"
    The first line is 319
    Source file "./server/handlers/xmlrpc/up2date.py"
    The first line is 293
    log_debug(5, 'Begin', package) log_debug(5, 'Begin', package)
    package = check_package_spec(package) package = check_package_spec(package)
    self.set_qos = 1 self.set_qos = 1
    server = self.auth_system(system_id) server = self.auth_system(system_id)
    log_debug(1, self.server_id, str(package)[:100]) log_debug(1, self.server_id, str(package)[:100])



    Clone # 968
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/kickstartImport.py"
    The first line is 23
    Source file "./server/importlib/importLib.py"
    The first line is 677
    Import.__init__(self, batch, backend) Import.__init__(self, batch, backend)
    self.channels = {} self.names = {}
    self.kstree_types = {} self.evrs = {}
    self.ks_install_types = {} self.checksums = {}
    self.checksums = {} self.package_arches = {}



    Clone # 969
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/handlers/xmlrpc/queue.py"
    The first line is 574
    Source file "./server/handlers/xmlrpc/queue.py"
    The first line is 516
    log_debug(3, self.server_id, actionId) log_debug(3, self.server_id, actionId)
    statement = '\n select distinct\n pkglist.name name,\n -- decode the evr object selected earlier\n pkglist.evr.version version,\n pkglist.evr.release release\n from ( \n -- get the max of the two possible cases\n select\n pl.name name,\n max(pl.evr) evr\n from (\n -- if the EVR is specifically requested...\n select\n pn.name name,\n pe.evr evr\n from \n rhnActionPackage ap,\n rhnPackage p,\n rhnPackageName pn,\n rhnPackageEVR pe,\n rhnServerChannel sc,\n rhnChannelPackage cp\n where\n ap.action_id = :action_id\n and ap.evr_id is NOT NULL\n and ap.evr_id = p.evr_id\n and ap.evr_id = pe.id\n and ap.name_id = p.name_id\n and ap.name_id = pn.id\n and p.id = cp.package_id\n and cp.channel_id = sc.channel_id\n and sc.server_id = :server_id\n UNION\n -- when no EVR requested, we need to compute the max available\n -- from the channels the server is subscribed to\n select\n pn.name name,\n max(pevr.evr) evr\n from\n rhnActionPackage ap,\n rhnServerChannel sc,\n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageEVR pevr,\n rhnPackageName pn\n where\n ap.action_id = :action_id\n and ap.evr_id is null\n and ap.name_id = pn.id\n and ap.name_id = p.name_id\n and p.evr_id = pevr.id\n and sc.server_id = :server_id\n and sc.channel_id = cp.channel_id\n and cp.package_id = p.id\n group by pn.name\n ) pl\n group by pl.name\n ) pkglist\n ' sql = '\n select\n pn.name name,\n pl.evr.version version,\n pl.evr.release release\n from (\n select\n p.name_id,\n max(pe.evr) evr\n from\n rhnPackageEVR pe,\n rhnChannelPackage cp,\n rhnPackage p,\n rhnServerChannel sc,\n (\n select\n p_name.name_id id\n from\n rhnActionErrataUpdate aeu,\n rhnErrataPackage ep,\n rhnPackage p_name\n where\n aeu.action_id = :action_id\n and aeu.errata_id = ep.errata_id\n and ep.package_id = p_name.id\n ) nids\n where\n nids.id = p.name_id\n and p.evr_id = pe.id\n and p.id = cp.package_id\n and cp.channel_id = sc.channel_id\n and sc.server_id = :server_id\n group by p.name_id\n ) pl,\n rhnPackageName pn\n where\n pn.id = pl.name_id\n '
    h = rhnSQL.prepare(statement) h = rhnSQL.prepare(sql)
    h.execute(action_id=actionId, server_id=self.server_id) h.execute(action_id=actionId, server_id=self.server_id)



    Clone # 970
    Distance between two fragments = 2
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 55
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 48
    def test_setlangs_ro(self):
        lang = 'ro'
        self._setup(lang)
        langs = rhnTranslate.cat.getlangs()
        self.failUnless(langs[0] == lang)
    def test_setlangs_en(self):
        lang = 'en'
        self._setup(lang)
        langs = rhnTranslate.cat.getlangs()
        self.failUnless(langs[0] == lang)



    Clone # 971
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 2344
    Source file "./satellite_tools/satsync.py"
    The first line is 165
    actionDict['channels'] = 1 actionDict['channels'] = 1
    actionDict['blacklists'] = 0 actionDict['blacklists'] = 0
    actionDict['arches'] = 0 actionDict['arches'] = 0
    actionDict['channel-families'] = 1 actionDict['channel-families'] = 1
    channels = [] channels = []



    Clone # 972
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/rhnDependency.py"
    The first line is 618
    Source file "./server/rhnDependency.py"
    The first line is 487
    if p['epoch'] == None:
        p['epoch'] = ''
    if p['epoch'] == None:
        p['epoch'] = ''
    entry = [] entry = []
    map(lambda f, e=entry, p=p: e.append(p[f]), nvre) map(lambda f, e=entry, p=p: e.append(p[f]), nvre)
    name_key = entry[0] name_key = entry[0]



    Clone # 973
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/action/packages.py"
    The first line is 88
    Source file "./server/handlers/xmlrpc/errata.py"
    The first line is 229
    if package['epoch'] is None:
        package['epoch'] = ''
    if package['epoch'] is None:
        package['epoch'] = ''
    pkg_arch = '' pkg_arch = ''
    if multiarch:
        pkg_arch = (package['arch']) or ('')
    if multiarch:
        pkg_arch = (package['arch']) or ('')



    Clone # 974
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/req_channels.py"
    The first line is 118
    Source file "./satellite_tools/req_channels.py"
    The first line is 111
    if self._imported.has_key(c):
        imported[c]
        self._end_of_service.append(c)
        continue
    if self._imported.has_key(c):
        imported[c]
        self._requested_imported.append(c)
        continue
    self._typos.append(c) self._requested_new.append(c)



    Clone # 975
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1709
    Source file "./satellite_tools/satsync.py"
    The first line is 1428
    pb = ProgressBar(prompt='Importing: ', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=files_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 976
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1709
    Source file "./satellite_tools/satsync.py"
    The first line is 1841
    pb = ProgressBar(prompt='Importing: ', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=errata_count, finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 977
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1841
    Source file "./satellite_tools/satsync.py"
    The first line is 1225
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=errata_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 978
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1841
    Source file "./satellite_tools/satsync.py"
    The first line is 910
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=errata_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 979
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1709
    Source file "./satellite_tools/satsync.py"
    The first line is 1225
    pb = ProgressBar(prompt='Importing: ', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 980
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1709
    Source file "./satellite_tools/satsync.py"
    The first line is 910
    pb = ProgressBar(prompt='Importing: ', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 981
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1669
    Source file "./satellite_tools/satsync.py"
    The first line is 1225
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=erratum_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 982
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1669
    Source file "./satellite_tools/satsync.py"
    The first line is 910
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=erratum_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 983
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1428
    Source file "./satellite_tools/satsync.py"
    The first line is 1225
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=files_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 984
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1428
    Source file "./satellite_tools/satsync.py"
    The first line is 910
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=files_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 985
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1398
    Source file "./satellite_tools/satsync.py"
    The first line is 1225
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=kt_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 986
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1398
    Source file "./satellite_tools/satsync.py"
    The first line is 910
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=kt_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 987
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1288
    Source file "./satellite_tools/satsync.py"
    The first line is 1225
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 988
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1288
    Source file "./satellite_tools/satsync.py"
    The first line is 910
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 989
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1112
    Source file "./satellite_tools/satsync.py"
    The first line is 1225
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 990
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1112
    Source file "./satellite_tools/satsync.py"
    The first line is 910
    pb = ProgressBar(prompt='Downloading:', endTag=' - complete', finalSize=package_count, finalBarLength=40, stream=sys.stdout) pb = ProgressBar(prompt='Diffing: ', endTag=' - complete', finalSize=len(upids), finalBarLength=40, stream=sys.stdout)
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    if CFG.DEBUG > 2:
        pb.redrawYN = 0
    pb.printAll(1) pb.printAll(1)



    Clone # 991
    Distance between two fragments = 2
    Clone size = 6
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 502
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 455
    log_debug(4) log_debug(4)
    if kickstart_labels:
        if not isinstance(kickstart_labels, ListType):
            raise rhnFault(3000, ('Expected list of kickstart labels, got %s') % (type(kickstart_labels)))
    if channel_labels:
        if not isinstance(channel_labels, ListType):
            raise rhnFault(3000, ('Expected list of channels, got %s') % (type(channel_labels)))



    Clone # 992
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 993
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 994
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 995
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 996
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 997
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/handlers/app/channel.py"
    The first line is 376
    Source file "./server/handlers/app/channel.py"
    The first line is 266
    log_debug(3) log_debug(3)
    authobj = self._auth(username, password) authobj = self._auth(username, password)
    authobj.isChannelAdmin() authobj.isChannelAdmin()
    h = rhnSQL.prepare('\n delete from rhnChannelFamilyMembers where channel_id = :channel_id') h = rhnSQL.prepare('select * from rhnChannel where label = :label')
    h.execute(channel_id=channel_id) h.execute(label=name)



    Clone # 998
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 296
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 268
    log_debug(3) log_debug(3)
    row = get_kickstart_session_info(kickstart_session_id, server_id) row = get_kickstart_session_info(kickstart_session_id, server_id)
    org_id = row['org_id'] org_id = row['org_id']
    scheduler = row['scheduler'] scheduler = row['scheduler']
    ks_type_id = row['virtualization_type'] ks_type_id = row['virtualization_type']



    Clone # 999
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    d.dump() d.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1000
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 382
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 235
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') path = dict.get('path')



    Clone # 1001
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 348
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 186
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') path = dict.get('path')



    Clone # 1002
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 216
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 186
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') path = dict.get('path')



    Clone # 1003
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 382
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 410
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') row = self.lookup_org_config_channel_by_name(config_channel)



    Clone # 1004
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 235
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 410
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') row = self.lookup_org_config_channel_by_name(config_channel)



    Clone # 1005
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 382
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 348
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') path = dict.get('path')



    Clone # 1006
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 382
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 216
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') path = dict.get('path')



    Clone # 1007
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 382
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 186
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') path = dict.get('path')



    Clone # 1008
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 235
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 348
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') path = dict.get('path')



    Clone # 1009
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 235
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 216
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') path = dict.get('path')



    Clone # 1010
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 235
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 186
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    path = dict.get('path') path = dict.get('path')



    Clone # 1011
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 410
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 348
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    row = self.lookup_org_config_channel_by_name(config_channel) path = dict.get('path')



    Clone # 1012
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 410
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 216
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    row = self.lookup_org_config_channel_by_name(config_channel) path = dict.get('path')



    Clone # 1013
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 410
    Source file "./server/handlers/config_mgmt/rhn_config_management.py"
    The first line is 186
    log_debug(1) log_debug(1)
    session = dict.get('session') session = dict.get('session')
    self._validate_session(session) self._validate_session(session)
    config_channel = dict.get('config_channel') config_channel = dict.get('config_channel')
    row = self.lookup_org_config_channel_by_name(config_channel) path = dict.get('path')



    Clone # 1014
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/action/rollback.py"
    The first line is 36
    Source file "./server/handlers/app/channel.py"
    The first line is 245
    log_debug(3) log_debug(3)
    h = rhnSQL.prepare('\n select \n rt1.rpm_trans_id from_rpm_trans_id,\n rt2.rpm_trans_id to_rpm_trans_id\n from \n rhnActionTransactions rat, \n rhnTransaction rt1, \n rhnTransaction rt2\n where \n rat.action_id = :action_id\n and rat.from_trans_id = rt1.id\n and rat.to_trans_id = rt2.id\n -- One row per customer, please\n and rownum < 2\n ') h = rhnSQL.prepare('\n select cfm.channel_family_id, cf.label channel_family\n from rhnChannelFamilyMembers cfm,\n rhnChannelFamily cf\n where cfm.channel_id = :channel_id\n and cfm.channel_family_id = cf.id\n ')
    h.execute(action_id=actionId) h.execute(channel_id=channel_id)
    row = h.fetchone_dict() row = h.fetchone_dict()



    Clone # 1015
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/packages.py"
    The first line is 594
    Source file "./server/handlers/app/packages.py"
    The first line is 620
    log_debug(3) log_debug(3)
    pkg_infos = info.get('packages') pkg_infos = info.get('packages')
    channels = info.get('channels', []) channels = info.get('channels', [])
    force = info.get('force', 0) force = info.get('force', 0)
    orgid = info.get('org_id') orgid = info.get('org_id')



    Clone # 1016
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/packages.py"
    The first line is 594
    Source file "./server/handlers/app/packages.py"
    The first line is 457
    log_debug(3) log_debug(3)
    pkg_infos = info.get('packages') pkg_infos = info.get('packages')
    channels = info.get('channels', []) channels = info.get('channels', [])
    force = info.get('force', 0) force = info.get('force', 0)
    orgid = info.get('org_id') orgid = info.get('org_id')



    Clone # 1017
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/packages.py"
    The first line is 594
    Source file "./server/handlers/app/packages.py"
    The first line is 430
    log_debug(3) log_debug(3)
    pkg_infos = info.get('packages') pkg_infos = info.get('packages')
    channels = info.get('channels', []) channels = info.get('channels', [])
    force = info.get('force', 0) force = info.get('force', 0)
    orgid = info.get('org_id') orgid = info.get('org_id')



    Clone # 1018
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/packages.py"
    The first line is 620
    Source file "./server/handlers/app/packages.py"
    The first line is 430
    log_debug(3) log_debug(3)
    pkg_infos = info.get('packages') pkg_infos = info.get('packages')
    channels = info.get('channels', []) channels = info.get('channels', [])
    force = info.get('force', 0) force = info.get('force', 0)
    orgid = info.get('org_id') orgid = info.get('org_id')



    Clone # 1019
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/packages.py"
    The first line is 457
    Source file "./server/handlers/app/packages.py"
    The first line is 430
    log_debug(3) log_debug(3)
    pkg_infos = info.get('packages') pkg_infos = info.get('packages')
    channels = info.get('channels', []) channels = info.get('channels', [])
    force = info.get('force', 0) force = info.get('force', 0)
    orgid = info.get('org_id') orgid = info.get('org_id')



    Clone # 1020
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/gentree.py"
    The first line is 143
    Source file "./satellite_tools/gentree.py"
    The first line is 136
    ps = xmlDiskSource.SourcePackageDiskSource(mountPoint) ps = xmlDiskSource.PackageDiskSource(mountPoint)
    dumper = xmlDiskDumper.SourcePackageDumper(destMountPoint, compression=9) dumper = xmlDiskDumper.PackageDumper(destMountPoint, compression=9)
    actions.remove('sourcepackages') actions.remove('packages')
    _dump_channel_objects(dumper, ps, mountPoint, channels, handler, sources=1, all=0, force=force) _dump_channel_objects(dumper, ps, mountPoint, channels, handler, sources=0, all=0, force=force)



    Clone # 1021
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/gentree.py"
    The first line is 136
    Source file "./satellite_tools/gentree.py"
    The first line is 129
    ps = xmlDiskSource.PackageDiskSource(mountPoint) ps = xmlDiskSource.ShortPackageDiskSource(mountPoint)
    dumper = xmlDiskDumper.PackageDumper(destMountPoint, compression=9) dumper = xmlDiskDumper.ShortPackageDumper(destMountPoint, compression=9)
    actions.remove('packages') actions.remove('shortpackages')
    _dump_channel_objects(dumper, ps, mountPoint, channels, handler, sources=0, all=0, force=force) _dump_channel_objects(dumper, ps, mountPoint, channels, handler, sources=0, all=1, force=force)



    Clone # 1022
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/importlib/mpmSource.py"
    The first line is 179
    Source file "./server/importlib/mpmSource.py"
    The first line is 163
    mapping = {'solaris_patch_set': mpmSolarisPatchSetInfo} mapping = {'solaris_patch': mpmSolarisPatchInfo}
    for k, v in mapping.items():
        self._populate_solaris_tag(k, v, header)
    for k, v in mapping.items():
        self._populate_solaris_tag(k, v, header)
    list_ = [] list_ = []



    Clone # 1023
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/action/configfiles.py"
    The first line is 26
    Source file "./server/action_extra_data/configfiles.py"
    The first line is 23
    __rhnexport__ = ['upload', 'deploy', 'verify', 'diff', 'mtime_upload'] __rhnexport__ = ['upload', 'deploy', 'verify', 'diff', 'mtime_upload']
    _query_upload_files = rhnSQL.Statement('\n select cfn.path\n from rhnActionConfigFileName acfn, rhnConfigFileName cfn\n where acfn.server_id = :server_id\n and acfn.action_id = :action_id\n and acfn.config_file_name_id = cfn.id\n') _query_reset_upload_files = rhnSQL.Statement('\n update rhnActionConfigFileName\n set failure_id = NULL\n where server_id = :server_id\n and action_id = :action_id\n')
    _query_mtime_upload_info = rhnSQL.Statement("\n select TO_CHAR(start_date, 'YYYY-MM-DD HH24:MI:SS') as start_date,\n TO_CHAR(end_date, 'YYYY-MM-DD HH24:MI:SS') as end_date,\n TO_CHAR(sysdate, 'YYYY-MM-DD HH24:MI:SS') as now,\n import_contents\n from rhnActionConfigDate\n where action_id = :action_id\n") _query_mark_upload_files = rhnSQL.Statement('\n update rhnActionConfigFileName\n set failure_id = :failure_id\n where server_id = :server_id\n and action_id = :action_id\n and config_file_name_id = lookup_config_filename(:path)\n')



    Clone # 1024
    Distance between two fragments = 0
    Clone size = 5
    Source file "./spacewalk/common/rhn_mpm.py"
    The first line is 265
    Source file "./spacewalk/common/rhn_mpm.py"
    The first line is 250
    stream.flush() stream.flush()
    stream.seek(0, 2) stream.seek(0, 2)
    size = stream.tell() size = stream.tell()
    stream.seek(0, 0) stream.seek(0, 0)
    return (stream, size) return (stream, size)



    Clone # 1025
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/rhn_mpm.py"
    The first line is 242
    Source file "./server/handlers/app/rhn_mpm.py"
    The first line is 227
    stream.flush() stream.flush()
    stream.seek(0, 2) stream.seek(0, 2)
    size = stream.tell() size = stream.tell()
    stream.seek(0, 0) stream.seek(0, 0)
    return (stream, size) return (stream, size)



    Clone # 1026
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    d.dump() d.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1027
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1028
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 425
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    d.dump() d.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1029
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 425
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1030
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 389
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    d.dump() d.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1031
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 389
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1032
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    d.dump() d.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1033
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1034
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1035
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1036
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 394
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1037
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1038
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1039
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1040
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1041
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 291
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1042
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1043
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1044
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 394
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1045
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1046
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1047
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1048
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 193
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1049
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/test/unit-test/rhnSQL/test_executemany.py"
    The first line is 22
    Source file "./server/test/unit-test/rhnSQL/test_1.py"
    The first line is 20
    self.table_name = ('misatest_%d') % (os.getpid()) self.table_name = ('misatest_%d') % (os.getpid())
    rhnSQL.initDB(DB) rhnSQL.initDB(DB)
    self._cleanup() self._cleanup()
    rhnSQL.execute(('create table %s (id int, val varchar2(10))') % (self.table_name)) rhnSQL.execute(('create table %s (id int, val varchar2(10))') % (self.table_name))



    Clone # 1050
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 546
    Source file "./server/handlers/app/channel.py"
    The first line is 396
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0 return 0



    Clone # 1051
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 546
    Source file "./server/handlers/app/channel.py"
    The first line is 367
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0 return 0



    Clone # 1052
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 546
    Source file "./server/handlers/app/channel.py"
    The first line is 204
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0 return 0



    Clone # 1053
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 518
    Source file "./server/handlers/app/channel.py"
    The first line is 396
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0 return 0



    Clone # 1054
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 518
    Source file "./server/handlers/app/channel.py"
    The first line is 367
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0 return 0



    Clone # 1055
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 518
    Source file "./server/handlers/app/channel.py"
    The first line is 204
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0 return 0



    Clone # 1056
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 396
    Source file "./server/handlers/app/channel.py"
    The first line is 367
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0 return 0



    Clone # 1057
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 396
    Source file "./server/handlers/app/channel.py"
    The first line is 204
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0 return 0



    Clone # 1058
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 367
    Source file "./server/handlers/app/channel.py"
    The first line is 204
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    if commit:
        rhnSQL.commit()
    else:
        rhnSQL.rollback()
        return 1
    return 0 return 0



    Clone # 1059
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/importlib/importLib.py"
    The first line is 179
    Source file "./server/importlib/importLib.py"
    The first line is 186
    class ChannelErratum(Information):
        attributeTypes = {'id': StringType, 'advisory_name': StringType, 'last_modified': DateType}
    class IncompleteSourcePackage(Information):
        attributeTypes = {'id': StringType, 'source_rpm': StringType, 'last_modified': DateType}



    Clone # 1060
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/headerSource.py"
    The first line is 319
    Source file "./server/importlib/headerSource.py"
    The first line is 327
    class rpmProvides(Dependency):
        tagMap = {'name': 'provides', 'version': 'provideversion', 'flags': 'provideflags'}
    class rpmRequires(Dependency):
        tagMap = {'name': 'requirename', 'version': 'requireversion', 'flags': 'requireflags'}



    Clone # 1061
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/headerSource.py"
    The first line is 327
    Source file "./server/importlib/headerSource.py"
    The first line is 335
    class rpmRequires(Dependency):
        tagMap = {'name': 'requirename', 'version': 'requireversion', 'flags': 'requireflags'}
    class rpmConflicts(Dependency):
        tagMap = {'name': 'conflictname', 'version': 'conflictversion', 'flags': 'conflictflags'}



    Clone # 1062
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/headerSource.py"
    The first line is 335
    Source file "./server/importlib/headerSource.py"
    The first line is 343
    class rpmConflicts(Dependency):
        tagMap = {'name': 'conflictname', 'version': 'conflictversion', 'flags': 'conflictflags'}
    class rpmObsoletes(Dependency):
        tagMap = {'name': 'obsoletename', 'version': 'obsoleteversion', 'flags': 'obsoleteflags'}



    Clone # 1063
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/headerSource.py"
    The first line is 335
    Source file "./server/importlib/headerSource.py"
    The first line is 319
    class rpmConflicts(Dependency):
        tagMap = {'name': 'conflictname', 'version': 'conflictversion', 'flags': 'conflictflags'}
    class rpmProvides(Dependency):
        tagMap = {'name': 'provides', 'version': 'provideversion', 'flags': 'provideflags'}



    Clone # 1064
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/headerSource.py"
    The first line is 343
    Source file "./server/importlib/headerSource.py"
    The first line is 327
    class rpmObsoletes(Dependency):
        tagMap = {'name': 'obsoletename', 'version': 'obsoleteversion', 'flags': 'obsoleteflags'}
    class rpmRequires(Dependency):
        tagMap = {'name': 'requirename', 'version': 'requireversion', 'flags': 'requireflags'}



    Clone # 1065
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/headerSource.py"
    The first line is 343
    Source file "./server/importlib/headerSource.py"
    The first line is 319
    class rpmObsoletes(Dependency):
        tagMap = {'name': 'obsoletename', 'version': 'obsoleteversion', 'flags': 'obsoleteflags'}
    class rpmProvides(Dependency):
        tagMap = {'name': 'provides', 'version': 'provideversion', 'flags': 'provideflags'}



    Clone # 1066
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnChannel.py"
    The first line is 2031
    Source file "./server/rhnChannel.py"
    The first line is 1777
    log_debug(3, server_id, channel, username) log_debug(3, server_id, channel, username)
    __auth_user(server_id, username, password) __auth_user(server_id, username, password)
    h = rhnSQL.prepare('\n select id, parent_channel from rhnChannel where label = :channel\n ') h = rhnSQL.prepare('select id from rhnChannel where label = :channel')
    h.execute(channel=channel) h.execute(channel=str(channel))
    ret = h.fetchone_dict() ret = h.fetchone_dict()



    Clone # 1067
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/repomd/view.py"
    The first line is 218
    Source file "./server/repomd/view.py"
    The first line is 186
    output = [] output = []
    output.append((' ') % ((package.checksum, package.name, package.arch))) output.append((' ') % ((package.checksum, package.name, package.arch)))
    output.append((' ') % ((package.epoch, package.version, package.release))) output.append((' ') % ((package.epoch, package.version, package.release)))



    Clone # 1068
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/importlib/backendLib.py"
    The first line is 371
    Source file "./server/importlib/backendLib.py"
    The first line is 274
    hash = {} hash = {}
    for i in range(len(key)):
        pk = self.pks[i]
        if not key[i]:
            hash[pk] = []
    for i in range(len(key)):
        pk = self.pks[i]
        if not key[i]:
            hash[pk] = []



    Clone # 1069
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/test/unit-test/misc_functions.py"
    The first line is 167
    Source file "./server/test/unit-test/test_rhnActivationKey.py"
    The first line is 44
    groups = [] groups = []
    for i in range(3):
        params = build_server_group_params(org_id=org_id)
        sg = create_server_group(params)
        groups.append(sg.get_id())
    for i in range(3):
        params = misc_functions.build_server_group_params(org_id=org_id)
        sg = misc_functions.create_server_group(params)
        groups.append(sg.get_id())



    Clone # 1070
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/test/misc_functions.py"
    The first line is 366
    Source file "./server/test/unit-test/test_rhnActivationKey.py"
    The first line is 44
    groups = [] groups = []
    for i in range(3):
        params = build_server_group_params(org_id=org_id)
        sg = create_server_group(params)
        groups.append(sg.get_id())
    for i in range(3):
        params = misc_functions.build_server_group_params(org_id=org_id)
        sg = misc_functions.create_server_group(params)
        groups.append(sg.get_id())



    Clone # 1071
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/repomd/domain.py"
    The first line is 83
    Source file "./server/action/utils.py"
    The first line is 111
    self.title = None self.package_info = None
    self.advisory_type = None self.id = None
    self.version = None self.version = None
    self.issued = None self.release = None
    self.updated = None self.epoch = None



    Clone # 1072
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/reposync.py"
    The first line is 250
    Source file "./server/repomd/domain.py"
    The first line is 82
    self.checksum = None self.readable_id = None
    self.unique_id = None self.title = None
    self.name = None self.advisory_type = None
    self.version = None self.version = None
    self.release = None self.issued = None



    Clone # 1073
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/reposync.py"
    The first line is 249
    Source file "./server/repomd/domain.py"
    The first line is 51
    self.checksum_type = None self.checksum_type = None
    self.checksum = None self.summary = None
    self.unique_id = None self.description = None
    self.name = None self.vendor = None
    self.version = None self.build_time = None



    Clone # 1074
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/reposync.py"
    The first line is 249
    Source file "./server/repomd/domain.py"
    The first line is 48
    self.checksum_type = None self.arch = None
    self.checksum = None self.checksum = None
    self.unique_id = None self.checksum_type = None
    self.name = None self.summary = None
    self.version = None self.description = None



    Clone # 1075
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/repomd/domain.py"
    The first line is 85
    Source file "./server/repomd/domain.py"
    The first line is 48
    self.version = None self.arch = None
    self.issued = None self.checksum = None
    self.updated = None self.checksum_type = None
    self.synopsis = None self.summary = None
    self.description = None self.description = None



    Clone # 1076
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/rhnConfig.py"
    The first line is 421
    Source file "./common/rhnConfig.py"
    The first line is 418
    print '__parsedConfig: dictionary of parsed /etc/rhn/rhn.conf file.' print '__defaults: dictionary of parsed defaults.'
    pprint(self.__parsedConfig) pprint(self.__defaults)
    print print
    print '__configs: dictionary of the merged options keyed by component.' print '__parsedConfig: dictionary of parsed /etc/rhn/rhn.conf file.'
    pprint(self.__configs) pprint(self.__parsedConfig)



    Clone # 1077
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 362
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 424
    print 'Dumping srpms' print 'Dumping kickstart data'
    dumper = xmlDiskDumper.SourceRPMDumper(self.options.mountpoint, server=self.server, compression=self.compression) dumper = xmlDiskDumper.KickstartDataDumper(self.options.mountpoint, server=self.server, compression=self.compression)
    channels = self._load_channels() channels = self._load_channels()
    packages = self._get_channel_object_ids(channels, 'source-packages') ks_labels = self._get_channel_object_ids(channels, 'kickstartable_trees')



    Clone # 1078
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 362
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 347
    print 'Dumping srpms' print 'Dumping rpms'
    dumper = xmlDiskDumper.SourceRPMDumper(self.options.mountpoint, server=self.server, compression=self.compression) dumper = xmlDiskDumper.BinaryRPMDumper(self.options.mountpoint, server=self.server, compression=self.compression)
    channels = self._load_channels() channels = self._load_channels()
    packages = self._get_channel_object_ids(channels, 'source-packages') packages = self._get_channel_object_ids(channels, 'packages')



    Clone # 1079
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 362
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 321
    print 'Dumping srpms' print 'Dumping source packages'
    dumper = xmlDiskDumper.SourceRPMDumper(self.options.mountpoint, server=self.server, compression=self.compression) dumper = xmlDiskDumper.SourcePackageDumper(self.options.mountpoint, server=self.server, compression=self.compression)
    channels = self._load_channels() channels = self._load_channels()
    packages = self._get_channel_object_ids(channels, 'source-packages') packages = self._get_channel_object_ids(channels, 'source-packages')



    Clone # 1080
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 424
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 347
    print 'Dumping kickstart data' print 'Dumping rpms'
    dumper = xmlDiskDumper.KickstartDataDumper(self.options.mountpoint, server=self.server, compression=self.compression) dumper = xmlDiskDumper.BinaryRPMDumper(self.options.mountpoint, server=self.server, compression=self.compression)
    channels = self._load_channels() channels = self._load_channels()
    ks_labels = self._get_channel_object_ids(channels, 'kickstartable_trees') packages = self._get_channel_object_ids(channels, 'packages')



    Clone # 1081
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 424
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 321
    print 'Dumping kickstart data' print 'Dumping source packages'
    dumper = xmlDiskDumper.KickstartDataDumper(self.options.mountpoint, server=self.server, compression=self.compression) dumper = xmlDiskDumper.SourcePackageDumper(self.options.mountpoint, server=self.server, compression=self.compression)
    channels = self._load_channels() channels = self._load_channels()
    ks_labels = self._get_channel_object_ids(channels, 'kickstartable_trees') packages = self._get_channel_object_ids(channels, 'source-packages')



    Clone # 1082
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 347
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 321
    print 'Dumping rpms' print 'Dumping source packages'
    dumper = xmlDiskDumper.BinaryRPMDumper(self.options.mountpoint, server=self.server, compression=self.compression) dumper = xmlDiskDumper.SourcePackageDumper(self.options.mountpoint, server=self.server, compression=self.compression)
    channels = self._load_channels() channels = self._load_channels()
    packages = self._get_channel_object_ids(channels, 'packages') packages = self._get_channel_object_ids(channels, 'source-packages')



    Clone # 1083
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 334
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 304
    print 'Dumping errata' print 'Dumping packages'
    dumper = xmlDiskDumper.ErrataDumper(self.options.mountpoint, server=self.server, compression=self.compression) dumper = xmlDiskDumper.PackageDumper(self.options.mountpoint, server=self.server, compression=self.compression)
    channels = self._load_channels() channels = self._load_channels()
    errata = self._get_channel_errata(channels) packages = self._get_all_packages(channels)



    Clone # 1084
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 334
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 289
    print 'Dumping errata' print 'Dumping short packages'
    dumper = xmlDiskDumper.ErrataDumper(self.options.mountpoint, server=self.server, compression=self.compression) dumper = xmlDiskDumper.ShortPackageDumper(self.options.mountpoint, server=self.server, compression=self.compression)
    channels = self._load_channels() channels = self._load_channels()
    errata = self._get_channel_errata(channels) packages = self._get_all_packages(channels)



    Clone # 1085
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 304
    Source file "./satellite_tools/exporter/exporter.py"
    The first line is 289
    print 'Dumping packages' print 'Dumping short packages'
    dumper = xmlDiskDumper.PackageDumper(self.options.mountpoint, server=self.server, compression=self.compression) dumper = xmlDiskDumper.ShortPackageDumper(self.options.mountpoint, server=self.server, compression=self.compression)
    channels = self._load_channels() channels = self._load_channels()
    packages = self._get_all_packages(channels) packages = self._get_all_packages(channels)



    Clone # 1086
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/config_common/templated_document.py"
    The first line is 84
    Source file "./server/config_common/templated_document.py"
    The first line is 77
    def ipaddr(self):
        network_infos = self.server.hardware_by_class(NetworkInformation)
        if network_infos:
            return network_infos[0].data['ipaddr']
        else:
            return None
    def hostname(self):
        network_infos = self.server.hardware_by_class(NetworkInformation)
        if network_infos:
            return network_infos[0].data['hostname']
        else:
            return None



    Clone # 1087
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/UserDictCase.py"
    The first line is 73
    Source file "./common/UserDictCase.py"
    The first line is 29
    lk = k lkey = key
    if isinstance(k, StringType):
        lk = string.lower(k)
    if isinstance(key, StringType):
        lkey = string.lower(key)
    self.data[lk] = v self.data[lkey] = value
    self.kcase[lk] = k self.kcase[lkey] = key



    Clone # 1088
    Distance between two fragments = 1
    Clone size = 5
    Source file "./common/rhnRepository.py"
    The first line is 176
    Source file "./server/rhnRepository.py"
    The first line is 345
    s = None stat_info = None
    try:
        s = os.stat(filePath)
    except:
        raise rhnFault(17, ('Unable to read package %s') % (os.path.basename(filePath)))
    try:
        stat_info = os.stat(filePath)
    except:
        raise rhnFault(17, ('Unable to read package %s') % (os.path.basename(filePath)))



    Clone # 1089
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/importlib/packageImport.py"
    The first line is 557
    Source file "./server/importlib/packageImport.py"
    The first line is 488
    def _comparePackages(self, package1, package2):
        if (package1['checksum_type'] == package2['checksum_type']) and (package1['checksum'] == package2['checksum']):
            return None
        raise Exception('Different packages in the same batch')
    def _comparePackages(self, package1, package2):
        if (package1['checksum_type'] == package2['checksum_type']) and (package1['checksum'] == package2['checksum']):
            return None
        raise Exception('Different packages in the same batch')



    Clone # 1090
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 1322
    Source file "./server/importlib/backend.py"
    The first line is 1288
    if not affected_channels.has_key(channel_id):
        modified_packages = ([], [])
        affected_channels[channel_id] = modified_packages
    else:
        modified_packages = affected_channels[channel_id]
    if not affected_channels.has_key(channelId):
        modified_packages = ([], [])
        affected_channels[channelId] = modified_packages
    else:
        modified_packages = affected_channels[channelId]
    modified_packages[1].append(package_id) modified_packages[0].append(package.id)



    Clone # 1091
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1597
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1359
    def set_iterator(self):
        h = rhnSQL.prepare('\n select id, product, version, beta\n from rhnChannelProduct\n ')
        h.execute()
        return h
    def set_iterator(self):
        h = rhnSQL.prepare('\n select pn1.name, pe.epoch, pe.version, pe.release, \n pa.name "package-arch", pn2.name "ignored-name"\n from rhnBlacklistObsoletes bo, \n rhnPackageName pn1, rhnPackageEVR pe, rhnPackageArch pa,\n rhnPackageName pn2\n where bo.name_id = pn1.id\n and bo.evr_id = pe.id\n and bo.package_arch_id = pa.id\n and bo.ignore_name_id = pn2.id\n ')
        h.execute()
        return h



    Clone # 1092
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1597
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1383
    def set_iterator(self):
        h = rhnSQL.prepare('\n select id, product, version, beta\n from rhnChannelProduct\n ')
        h.execute()
        return h
    def set_iterator(self):
        h = rhnSQL.prepare('\n select kt.id, \n c.label channel, \n kt.base_path "base-path", \n kt.label, \n kt.boot_image "boot-image",\n ktt.name "kstree-type-name",\n ktt.label "kstree-type-label",\n kit.name "install-type-name",\n kit.label "install-type-label",\n TO_CHAR(kt.last_modified, \'YYYYMMDDHH24MISS\') "last-modified"\n from rhnKickstartableTree kt,\n rhnKSTreeType ktt,\n rhnKSInstallType kit,\n rhnChannel c\n where kt.channel_id = c.id\n and ktt.id = kt.kstree_type\n and kit.id = kt.install_type\n and kt.org_id is NULL\n ')
        h.execute()
        return h



    Clone # 1093
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1597
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1617
    def set_iterator(self):
        h = rhnSQL.prepare('\n select id, product, version, beta\n from rhnChannelProduct\n ')
        h.execute()
        return h
    def set_iterator(self):
        query = rhnSQL.prepare('\n select label, name from rhnProductName\n ')
        query.execute()
        return query



    Clone # 1094
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1597
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1100
    def set_iterator(self):
        h = rhnSQL.prepare('\n select id, product, version, beta\n from rhnChannelProduct\n ')
        h.execute()
        return h
    def set_iterator(self):
        h = rhnSQL.prepare(('\n select id, label, name\n from %s\n ') % (self.table_name))
        h.execute()
        return h



    Clone # 1095
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 1215
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 1206
    for k in info_keys:
        val = contact_info.get(k)
        if val is not None:
            log_debug(6, 'Info', k, val)
            user.set_info(k, val)
    for k in contact_perm_keys:
        val = contact_info.get(k)
        if val is not None:
            log_debug(6, 'Contact', k, val)
            user.set_contact_perm(k, val)



    Clone # 1096
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/test/unit-test/misc_functions.py"
    The first line is 114
    Source file "./server/rhnServerGroup.py"
    The first line is 44
    h.execute(org_id=org_id, role=role) h.execute(org_id=org_id, name=name)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise InvalidRoleError(org_id, role)
    if not row:
        raise InvalidServerGroupError(org_id, name)
    user_group_id = row['id'] server_group_id = row['id']



    Clone # 1097
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/test/misc_functions.py"
    The first line is 137
    Source file "./server/rhnServerGroup.py"
    The first line is 44
    h.execute(org_id=org_id, role=role) h.execute(org_id=org_id, name=name)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise InvalidRoleError(org_id, role)
    if not row:
        raise InvalidServerGroupError(org_id, name)
    user_group_id = row['id'] server_group_id = row['id']



    Clone # 1098
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/handlers/xmlrpc/up2date.py"
    The first line is 218
    Source file "./server/handlers/xmlrpc/up2date.py"
    The first line is 200
    log_debug(5, system_id) log_debug(5, system_id)
    self.auth_system(system_id) self.auth_system(system_id)
    log_debug(1, self.server_id) log_debug(1, self.server_id)
    transport = rhnFlags.get('outputTransportOptions') transport = rhnFlags.get('outputTransportOptions')
    transport['X-RHN-Action'] = 'listall_size' transport['X-RHN-Action'] = 'listall'



    Clone # 1099
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 781
    Source file "./satellite_tools/satsync.py"
    The first line is 774
    log(1, ' typos:') log(1, (t_format) % ('end-of-service'))
    status = '?' status = 'e'
    for chn in ch_typos:
        log(1, (p_format) % ((status, chn, '')))
    for chn in ch_end_of_service:
        log(1, (p_format) % ((status, chn, '')))
    log(2, '') log(2, '')



    Clone # 1100
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 1408
    Source file "./server/rhnChannel.py"
    The first line is 740
    log_debug(3, channel_id) log_debug(3, server_id)
    h = rhnSQL.prepare('\n select\n p.path\n from \n rhnPackage p,\n rhnChannelPackage cp\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ') h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannel c, rhnChannelArch ca, rhnServerChannel sc\n where sc.server_id = :server_id\n and sc.channel_id = c.id\n and c.channel_arch_id = ca.id\n and c.parent_channel is NULL\n ")
    h.execute(channel_id=str(channel_id)) h.execute(server_id=str(server_id))
    ret = h.fetchall() ret = h.fetchone_dict()



    Clone # 1101
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 1247
    Source file "./server/rhnChannel.py"
    The first line is 740
    log_debug(3, channel_id) log_debug(3, server_id)
    h = rhnSQL.prepare('\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n p.package_size \n from \n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageName pn,\n rhnPackageEVR pevr,\n rhnPackageArch pa\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.name_id = pn.id\n and p.evr_id = pevr.id\n and p.package_arch_id = pa.id\n order by pn.name, pevr.evr desc, pa.label\n ') h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannel c, rhnChannelArch ca, rhnServerChannel sc\n where sc.server_id = :server_id\n and sc.channel_id = c.id\n and c.channel_arch_id = ca.id\n and c.parent_channel is NULL\n ")
    h.execute(channel_id=str(channel_id)) h.execute(server_id=str(server_id))
    ret = h.fetchall_dict() ret = h.fetchone_dict()



    Clone # 1102
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 1174
    Source file "./server/rhnChannel.py"
    The first line is 740
    log_debug(3, channel_id) log_debug(3, server_id)
    h = rhnSQL.prepare("\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n full_channel.package_size \n from \n rhnPackageArch pa,\n ( select \n p.name_id,\n max(pe.evr) evr\n from\n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageEVR pe\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.evr_id = pe.id\n group by p.name_id\n ) listall,\n ( select distinct\n p.package_size,\n p.name_id,\n p.evr_id,\n p.package_arch_id\n from\n rhnChannelPackage cp,\n rhnPackage p\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ) full_channel,\n -- Rank the package's arch\n ( select\n package_arch_id, \n count(*) rank\n from\n rhnServerPackageArchCompat\n group by package_arch_id\n ) arch_rank,\n rhnPackageName pn,\n rhnPackageEVR pevr\n where\n pn.id = listall.name_id\n -- link back to the specific package\n and full_channel.name_id = listall.name_id\n and full_channel.evr_id = pevr.id\n and pevr.evr = listall.evr\n and pa.id = full_channel.package_arch_id\n and pa.id = arch_rank.package_arch_id\n order by pn.name, arch_rank.rank desc\n ") h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannel c, rhnChannelArch ca, rhnServerChannel sc\n where sc.server_id = :server_id\n and sc.channel_id = c.id\n and c.channel_arch_id = ca.id\n and c.parent_channel is NULL\n ")
    h.execute(channel_id=str(channel_id)) h.execute(server_id=str(server_id))
    ret = h.fetchall_dict() ret = h.fetchone_dict()



    Clone # 1103
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 1408
    Source file "./server/rhnChannel.py"
    The first line is 713
    log_debug(3, channel_id) log_debug(3, channel)
    h = rhnSQL.prepare('\n select\n p.path\n from \n rhnPackage p,\n rhnChannelPackage cp\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ') h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from\n rhnChannel c,\n rhnChannelArch ca\n where\n c.channel_arch_id = ca.id\n and c.label = :channel\n ")
    h.execute(channel_id=str(channel_id)) h.execute(channel=str(channel))
    ret = h.fetchall() ret = h.fetchone_dict()



    Clone # 1104
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 1247
    Source file "./server/rhnChannel.py"
    The first line is 713
    log_debug(3, channel_id) log_debug(3, channel)
    h = rhnSQL.prepare('\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n p.package_size \n from \n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageName pn,\n rhnPackageEVR pevr,\n rhnPackageArch pa\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.name_id = pn.id\n and p.evr_id = pevr.id\n and p.package_arch_id = pa.id\n order by pn.name, pevr.evr desc, pa.label\n ') h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from\n rhnChannel c,\n rhnChannelArch ca\n where\n c.channel_arch_id = ca.id\n and c.label = :channel\n ")
    h.execute(channel_id=str(channel_id)) h.execute(channel=str(channel))
    ret = h.fetchall_dict() ret = h.fetchone_dict()



    Clone # 1105
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 1174
    Source file "./server/rhnChannel.py"
    The first line is 713
    log_debug(3, channel_id) log_debug(3, channel)
    h = rhnSQL.prepare("\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n full_channel.package_size \n from \n rhnPackageArch pa,\n ( select \n p.name_id,\n max(pe.evr) evr\n from\n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageEVR pe\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.evr_id = pe.id\n group by p.name_id\n ) listall,\n ( select distinct\n p.package_size,\n p.name_id,\n p.evr_id,\n p.package_arch_id\n from\n rhnChannelPackage cp,\n rhnPackage p\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ) full_channel,\n -- Rank the package's arch\n ( select\n package_arch_id, \n count(*) rank\n from\n rhnServerPackageArchCompat\n group by package_arch_id\n ) arch_rank,\n rhnPackageName pn,\n rhnPackageEVR pevr\n where\n pn.id = listall.name_id\n -- link back to the specific package\n and full_channel.name_id = listall.name_id\n and full_channel.evr_id = pevr.id\n and pevr.evr = listall.evr\n and pa.id = full_channel.package_arch_id\n and pa.id = arch_rank.package_arch_id\n order by pn.name, arch_rank.rank desc\n ") h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from\n rhnChannel c,\n rhnChannelArch ca\n where\n c.channel_arch_id = ca.id\n and c.label = :channel\n ")
    h.execute(channel_id=str(channel_id)) h.execute(channel=str(channel))
    ret = h.fetchall_dict() ret = h.fetchone_dict()



    Clone # 1106
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 740
    Source file "./server/rhnChannel.py"
    The first line is 713
    log_debug(3, server_id) log_debug(3, channel)
    h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannel c, rhnChannelArch ca, rhnServerChannel sc\n where sc.server_id = :server_id\n and sc.channel_id = c.id\n and c.channel_arch_id = ca.id\n and c.parent_channel is NULL\n ") h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from\n rhnChannel c,\n rhnChannelArch ca\n where\n c.channel_arch_id = ca.id\n and c.label = :channel\n ")
    h.execute(server_id=str(server_id)) h.execute(channel=str(channel))
    ret = h.fetchone_dict() ret = h.fetchone_dict()



    Clone # 1107
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 862
    Source file "./server/rhnChannel.py"
    The first line is 1408
    log_debug(3, channel_id) log_debug(3, channel_id)
    h = rhnSQL.prepare('\n select\n rcf.label\n from \n rhnChannelFamily rcf,\n rhnChannelFamilyMembers rcfm\n where\n rcfm.channel_id = :channel_id\n and rcfm.channel_family_id = rcf.id\n and rcf.org_id is not null\n ') h = rhnSQL.prepare('\n select\n p.path\n from \n rhnPackage p,\n rhnChannelPackage cp\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ')
    h.execute(channel_id=str(channel_id)) h.execute(channel_id=str(channel_id))
    label = h.fetchone() ret = h.fetchall()



    Clone # 1108
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 862
    Source file "./server/rhnChannel.py"
    The first line is 1247
    log_debug(3, channel_id) log_debug(3, channel_id)
    h = rhnSQL.prepare('\n select\n rcf.label\n from \n rhnChannelFamily rcf,\n rhnChannelFamilyMembers rcfm\n where\n rcfm.channel_id = :channel_id\n and rcfm.channel_family_id = rcf.id\n and rcf.org_id is not null\n ') h = rhnSQL.prepare('\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n p.package_size \n from \n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageName pn,\n rhnPackageEVR pevr,\n rhnPackageArch pa\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.name_id = pn.id\n and p.evr_id = pevr.id\n and p.package_arch_id = pa.id\n order by pn.name, pevr.evr desc, pa.label\n ')
    h.execute(channel_id=str(channel_id)) h.execute(channel_id=str(channel_id))
    label = h.fetchone() ret = h.fetchall_dict()



    Clone # 1109
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 862
    Source file "./server/rhnChannel.py"
    The first line is 1174
    log_debug(3, channel_id) log_debug(3, channel_id)
    h = rhnSQL.prepare('\n select\n rcf.label\n from \n rhnChannelFamily rcf,\n rhnChannelFamilyMembers rcfm\n where\n rcfm.channel_id = :channel_id\n and rcfm.channel_family_id = rcf.id\n and rcf.org_id is not null\n ') h = rhnSQL.prepare("\n select\n pn.name, \n pevr.version, \n pevr.release, \n pevr.epoch, \n pa.label arch, \n full_channel.package_size \n from \n rhnPackageArch pa,\n ( select \n p.name_id,\n max(pe.evr) evr\n from\n rhnChannelPackage cp,\n rhnPackage p,\n rhnPackageEVR pe\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n and p.evr_id = pe.id\n group by p.name_id\n ) listall,\n ( select distinct\n p.package_size,\n p.name_id,\n p.evr_id,\n p.package_arch_id\n from\n rhnChannelPackage cp,\n rhnPackage p\n where\n cp.channel_id = :channel_id\n and cp.package_id = p.id\n ) full_channel,\n -- Rank the package's arch\n ( select\n package_arch_id, \n count(*) rank\n from\n rhnServerPackageArchCompat\n group by package_arch_id\n ) arch_rank,\n rhnPackageName pn,\n rhnPackageEVR pevr\n where\n pn.id = listall.name_id\n -- link back to the specific package\n and full_channel.name_id = listall.name_id\n and full_channel.evr_id = pevr.id\n and pevr.evr = listall.evr\n and pa.id = full_channel.package_arch_id\n and pa.id = arch_rank.package_arch_id\n order by pn.name, arch_rank.rank desc\n ")
    h.execute(channel_id=str(channel_id)) h.execute(channel_id=str(channel_id))
    label = h.fetchone() ret = h.fetchall_dict()



    Clone # 1110
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 862
    Source file "./server/rhnChannel.py"
    The first line is 740
    log_debug(3, channel_id) log_debug(3, server_id)
    h = rhnSQL.prepare('\n select\n rcf.label\n from \n rhnChannelFamily rcf,\n rhnChannelFamilyMembers rcfm\n where\n rcfm.channel_id = :channel_id\n and rcfm.channel_family_id = rcf.id\n and rcf.org_id is not null\n ') h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from rhnChannel c, rhnChannelArch ca, rhnServerChannel sc\n where sc.server_id = :server_id\n and sc.channel_id = c.id\n and c.channel_arch_id = ca.id\n and c.parent_channel is NULL\n ")
    h.execute(channel_id=str(channel_id)) h.execute(server_id=str(server_id))
    label = h.fetchone() ret = h.fetchone_dict()



    Clone # 1111
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 862
    Source file "./server/rhnChannel.py"
    The first line is 713
    log_debug(3, channel_id) log_debug(3, channel)
    h = rhnSQL.prepare('\n select\n rcf.label\n from \n rhnChannelFamily rcf,\n rhnChannelFamilyMembers rcfm\n where\n rcfm.channel_id = :channel_id\n and rcfm.channel_family_id = rcf.id\n and rcf.org_id is not null\n ') h = rhnSQL.prepare("\n select\n ca.label arch,\n c.id,\n c.parent_channel,\n c.org_id,\n c.label,\n c.name,\n c.summary,\n c.description,\n to_char(c.last_modified, 'YYYYMMDDHH24MISS') last_modified\n from\n rhnChannel c,\n rhnChannelArch ca\n where\n c.channel_arch_id = ca.id\n and c.label = :channel\n ")
    h.execute(channel_id=str(channel_id)) h.execute(channel=str(channel))
    label = h.fetchone() ret = h.fetchone_dict()



    Clone # 1112
    Distance between two fragments = 4
    Clone size = 8
    Source file "./server/handlers/app/channel.py"
    The first line is 541
    Source file "./server/handlers/app/channel.py"
    The first line is 423
    try:
        h.execute(username=username, label=label, role_label=role)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)
    try:
        h.execute(channel_id=channel_id, old_channel_family_id=old_channel_family_id, new_channel_family_id=new_channel_family_id)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)



    Clone # 1113
    Distance between two fragments = 4
    Clone size = 8
    Source file "./server/handlers/app/channel.py"
    The first line is 513
    Source file "./server/handlers/app/channel.py"
    The first line is 423
    try:
        h.execute(username=username, label=label, role_label=role)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)
    try:
        h.execute(channel_id=channel_id, old_channel_family_id=old_channel_family_id, new_channel_family_id=new_channel_family_id)
    except rhnSQL.SQLError, e:
        rhnSQL.rollback()
        raise rhnFault(23, str(e.args[1]), explain=0)



    Clone # 1114
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 958
    Source file "./server/rhnVirtualization.py"
    The first line is 956
    handler.handle(host_sysid, domU1_exists) handler.handle(host_sysid, crawl_began)
    handler.handle(host_sysid, domU2_exists) handler.handle(host_sysid, dom0_exists)
    handler.handle(host_sysid, crawl_ended) handler.handle(host_sysid, domU1_exists)
    handler.handle(host_sysid, crawl_began) handler.handle(host_sysid, domU2_exists)
    handler.handle(host_sysid, crawl_ended) handler.handle(host_sysid, crawl_ended)



    Clone # 1115
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 960
    Source file "./server/rhnVirtualization.py"
    The first line is 957
    handler.handle(host_sysid, crawl_ended) handler.handle(host_sysid, dom0_exists)
    handler.handle(host_sysid, crawl_began) handler.handle(host_sysid, domU1_exists)
    handler.handle(host_sysid, crawl_ended) handler.handle(host_sysid, domU2_exists)
    handler.handle(host_sysid, host_exists) handler.handle(host_sysid, crawl_ended)
    handler.handle(host_sysid, crawl_began) handler.handle(host_sysid, crawl_began)



    Clone # 1116
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 957
    Source file "./server/rhnVirtualization.py"
    The first line is 952
    handler.handle(host_sysid, dom0_exists) handler.handle(host_sysid, host_exists)
    handler.handle(host_sysid, domU1_exists) handler.handle(guest_sysid, guest_exists)
    handler.handle(host_sysid, domU2_exists) handler.handle(guest_sysid, crawl_began)
    handler.handle(host_sysid, crawl_ended) handler.handle(guest_sysid, crawl_ended)
    handler.handle(host_sysid, crawl_began) handler.handle(host_sysid, crawl_began)



    Clone # 1117
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 971
    Source file "./server/rhnVirtualization.py"
    The first line is 958
    handler.handle(host_sysid, crawl_began) handler.handle(host_sysid, domU1_exists)
    handler.handle(host_sysid, dom0_exists) handler.handle(host_sysid, domU2_exists)
    handler.handle(host_sysid, domU1_exists) handler.handle(host_sysid, crawl_ended)
    handler.handle(host_sysid, domU2_exists) handler.handle(host_sysid, crawl_began)
    handler.handle(host_sysid, crawl_ended) handler.handle(host_sysid, crawl_ended)



    Clone # 1118
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 959
    Source file "./server/rhnVirtualization.py"
    The first line is 952
    handler.handle(host_sysid, domU2_exists) handler.handle(host_sysid, host_exists)
    handler.handle(host_sysid, crawl_ended) handler.handle(guest_sysid, guest_exists)
    handler.handle(host_sysid, crawl_began) handler.handle(guest_sysid, crawl_began)
    handler.handle(host_sysid, crawl_ended) handler.handle(guest_sysid, crawl_ended)
    handler.handle(host_sysid, host_exists) handler.handle(host_sysid, crawl_began)



    Clone # 1119
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 974
    Source file "./server/rhnVirtualization.py"
    The first line is 958
    handler.handle(host_sysid, domU2_exists) handler.handle(host_sysid, domU1_exists)
    handler.handle(host_sysid, crawl_ended) handler.handle(host_sysid, domU2_exists)
    handler.handle(guest_sysid, guest_exists) handler.handle(host_sysid, crawl_ended)
    handler.handle(guest_sysid, crawl_began) handler.handle(host_sysid, crawl_began)
    handler.handle(guest_sysid, crawl_ended) handler.handle(host_sysid, crawl_ended)



    Clone # 1120
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 125
    Source file "./server/rhnChannel.py"
    The first line is 119
    def load_by_id(self, obj_id):
        self.__init__()
        self._row = rhnSQL.Row(self._table_name, 'id')
        self._row.load(obj_id)
        return self
    def load_by_label(self, label):
        self.__init__()
        self._row = rhnSQL.Row(self._table_name, 'label')
        self._row.load(label)
        return self



    Clone # 1121
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/test/test-internal.py"
    The first line is 39
    Source file "./satellite_tools/test/test-download.py"
    The first line is 91
    if 1:
        f = s.dump.get_ks_file('ks-redhat-advanced-server-i386', 'images/boot.img')
        print f.read()
        f.close()
        sys.exit(0)
    if 1:
        f = s.dump.packages(systemid, ['rhn-package-231787'])
        print f.read()
        f.close()
        sys.exit(0)



    Clone # 1122
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/test/test-internal.py"
    The first line is 39
    Source file "./satellite_tools/test/test-download.py"
    The first line is 83
    if 1:
        f = s.dump.get_ks_file('ks-redhat-advanced-server-i386', 'images/boot.img')
        print f.read()
        f.close()
        sys.exit(0)
    if 1:
        f = s.dump.errata(systemid, ['rhn-erratum-1950'])
        print f.read()
        f.close()
        sys.exit(0)



    Clone # 1123
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/test/test-download.py"
    The first line is 91
    Source file "./satellite_tools/test/test-download.py"
    The first line is 83
    if 1:
        f = s.dump.packages(systemid, ['rhn-package-231787'])
        print f.read()
        f.close()
        sys.exit(0)
    if 1:
        f = s.dump.errata(systemid, ['rhn-erratum-1950'])
        print f.read()
        f.close()
        sys.exit(0)



    Clone # 1124
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 904
    Source file "./server/rhnVirtualization.py"
    The first line is 898
    guest_exists = (int(time.time()), EventType.EXISTS, TargetType.SYSTEM, {PropertyType.UUID: '2e2e2e2e2e2e2e2e', PropertyType.IDENTITY: IdentityType.GUEST}) host_exists = (int(time.time()), EventType.EXISTS, TargetType.SYSTEM, {PropertyType.UUID: None, PropertyType.IDENTITY: IdentityType.HOST})



    Clone # 1125
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/connection.py"
    The first line is 97
    Source file "./satellite_tools/connection.py"
    The first line is 83
    class GETServer(rpclib.GETServer):
        _transport_class = Transport
        _transport_class_https = SafeTransport
        _transport_class_proxy = ProxyTransport
        _transport_class_https_proxy = SafeProxyTransport
    class _Server(rpclib.Server):
        _transport_class = Transport
        _transport_class_https = SafeTransport
        _transport_class_proxy = ProxyTransport
        _transport_class_https_proxy = SafeProxyTransport



    Clone # 1126
    Distance between two fragments = 4
    Clone size = 5
    Source file "./spacewalk/common/fileutils.py"
    The first line is 345
    Source file "./spacewalk/common/fileutils.py"
    The first line is 332
    try:
        gid = grp.getgrnam(name)[2]
    except KeyError:
        sys.stderr.write(('XXX: Group %s does not exist\n') % (name))
        return None
    try:
        uid = pwd.getpwnam(name)[2]
    except KeyError:
        sys.stderr.write(('XXX: User %s does not exist\n') % (name))
        return None



    Clone # 1127
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 389
    d.dump() d.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1128
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1129
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1130
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 394
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1131
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1132
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1133
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1134
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 439
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1135
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 425
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    d.dump() d.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1136
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 425
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1137
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 425
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1138
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 425
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 394
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1139
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 425
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1140
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 425
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1141
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 425
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1142
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 425
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1143
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 389
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    d.dump() d.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1144
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 389
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1145
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 389
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1146
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 389
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1147
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 389
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1148
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 389
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1149
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 389
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1150
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1151
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1152
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 394
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1153
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1154
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1155
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1156
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_exporter/handlers/non_auth_dumper.py"
    The first line is 304
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    d.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1157
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1158
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 394
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1159
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 448
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1160
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1161
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1162
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1163
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 433
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1164
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 394
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1165
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 394
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1166
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 394
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1167
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 394
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1168
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 240
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1169
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 207
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1170
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 226
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 169
    dumper.dump() dumper.dump()
    writer.flush() writer.flush()
    log_debug(4, 'OK') log_debug(4, 'OK')
    self.close() self.close()
    return 0 return 0



    Clone # 1171
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_exporter/satexport.py"
    The first line is 39
    Source file "./server/apacheUploadServer.py"
    The first line is 35
    options = req.get_options() options = req.get_options()
    if not options.has_key('RHNComponentType'):
        return apache.OK
    if not options.has_key('RHNComponentType'):
        return apache.OK
    initCFG(options['RHNComponentType']) initCFG(options['RHNComponentType'])
    initLOG(CFG.LOG_FILE, CFG.DEBUG) initLOG(CFG.LOG_FILE, CFG.DEBUG)



    Clone # 1172
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_exporter/satexport.py"
    The first line is 39
    Source file "./server/apacheHandler.py"
    The first line is 66
    options = req.get_options() options = req.get_options()
    if not options.has_key('RHNComponentType'):
        return apache.OK
    if not options.has_key('RHNComponentType'):
        return apache.OK
    initCFG(options['RHNComponentType']) initCFG(options['RHNComponentType'])
    initLOG(CFG.LOG_FILE, CFG.DEBUG) initLOG(CFG.LOG_FILE, CFG.DEBUG)



    Clone # 1173
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/apacheUploadServer.py"
    The first line is 35
    Source file "./server/apacheHandler.py"
    The first line is 66
    options = req.get_options() options = req.get_options()
    if not options.has_key('RHNComponentType'):
        return apache.OK
    if not options.has_key('RHNComponentType'):
        return apache.OK
    initCFG(options['RHNComponentType']) initCFG(options['RHNComponentType'])
    initLOG(CFG.LOG_FILE, CFG.DEBUG) initLOG(CFG.LOG_FILE, CFG.DEBUG)



    Clone # 1174
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnServer/server_class.py"
    The first line is 785
    Source file "./server/rhnServer/server_kickstart.py"
    The first line is 91
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        break
    if not row:
        break
    server_group_id = row['system_group_id'] guest_id = row['virtual_system_id']
    log_debug(5, ('Subscribing server to group %s') % (server_group_id)) log_debug(4, ('Deleting guest server: %s') % (guest_id))



    Clone # 1175
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnServer/server_token.py"
    The first line is 194
    Source file "./server/rhnServer/server_token.py"
    The first line is 67
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        break
    if not row:
        break
    server_group_id = row['server_group_id'] channel_id = row['id']
    server_groups[server_group_id] = row chash[channel_id] = row



    Clone # 1176
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnActivationKey.py"
    The first line is 71
    Source file "./server/rhnServer/server_token.py"
    The first line is 67
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        break
    if not row:
        break
    server_group_id = row['server_group_id'] channel_id = row['id']
    ret[server_group_id] = None chash[channel_id] = row



    Clone # 1177
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1574
    Source file "./server/rhnServer/server_token.py"
    The first line is 239
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        break
    if not row:
        break
    advisory_name = row['advisory_name'] pn_id = row['name_id']
    erratum_id = row['id'] pa_id = row['arch_id']



    Clone # 1178
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1574
    Source file "./server/rhnCapability.py"
    The first line is 100
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        break
    if not row:
        break
    advisory_name = row['advisory_name'] name = row['capability']
    erratum_id = row['id'] version = row['version']



    Clone # 1179
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1574
    Source file "./server/rhnCapability.py"
    The first line is 66
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        break
    if not row:
        break
    advisory_name = row['advisory_name'] name = row['capability']
    erratum_id = row['id'] version = row['version']



    Clone # 1180
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnServer/server_token.py"
    The first line is 239
    Source file "./server/rhnCapability.py"
    The first line is 100
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        break
    if not row:
        break
    pn_id = row['name_id'] name = row['capability']
    pa_id = row['arch_id'] version = row['version']



    Clone # 1181
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnServer/server_token.py"
    The first line is 239
    Source file "./server/rhnCapability.py"
    The first line is 66
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        break
    if not row:
        break
    pn_id = row['name_id'] name = row['capability']
    pa_id = row['arch_id'] version = row['version']



    Clone # 1182
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/rhnCapability.py"
    The first line is 100
    Source file "./server/rhnCapability.py"
    The first line is 66
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        break
    if not row:
        break
    name = row['capability'] name = row['capability']
    version = row['version'] version = row['version']



    Clone # 1183
    Distance between two fragments = 1
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/iss.py"
    The first line is 925
    Source file "./satellite_tools/satsync.py"
    The first line is 2127
    tbOut = cStringIO.StringIO() tbOut = cStringIO.StringIO()
    Traceback(mail=0, ostream=tbOut, with_locals=1) Traceback(mail=0, ostream=tbOut, with_locals=1)
    log(-1, ('SQL ERROR during xml processing: %s') % (e), stream=sys.stderr) log(-1, ('SQL ERROR during xml processing: %s') % (e), stream=sys.stderr)
    log(-1, ('TRACEBACK: %s') % (tbOut.getvalue()), stream=sys.stderr) log(-1, ('TRACEBACK: %s') % (tbOut.getvalue()), stream=sys.stderr)
    sys.exit(-1) sys.exit(17)



    Clone # 1184
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnHandler.py"
    The first line is 74
    Source file "./server/handlers/xmlrpc/proxy.py"
    The first line is 52
    if not entitlements:
        log_error('Server Not Entitled', self.server_id)
        raise rhnFault(31, (_('Service not enabled for system profile: "%s"')) % (server.server['name']))
    if not row:
        log_error('Server not entitled for Proxy', self.server_id)
        raise rhnFault(1002, (_('RHN Proxy service not enabled for server profile: "%s"')) % (server.server['name']))



    Clone # 1185
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/apacheServer.py"
    The first line is 23
    Source file "./server/apacheUploadServer.py"
    The first line is 144
    apache_server = apacheHandler() apache_server = UploadHandler()
    HeaderParserHandler = apache_server.headerParserHandler HeaderParserHandler = apache_server.headerParserHandler
    Handler = apache_server.handler Handler = apache_server.handler
    CleanupHandler = apache_server.cleanupHandler CleanupHandler = apache_server.cleanupHandler
    LogHandler = apache_server.logHandler LogHandler = apache_server.logHandler



    Clone # 1186
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/satCerts.py"
    The first line is 535
    Source file "./server/importlib/backend.py"
    The first line is 274
    row = h.execute() row = h.fetchone_dict()
    if row:
        return None
    if row:
        return None
    _query_create_chfam = "\n INSERT INTO rhnChannelFamily\n (id, name, label, org_id, product_url)\n VALUES (sequence_nextval('rhn_channel_family_id_seq'), :name, :label, :org, :url)\n\n " _query_priv_cf_org = '\n insert into rhnPrivateChannelFamily\n (channel_family_id, org_id) values\n (:cfid, :orgid)\n '



    Clone # 1187
    Distance between two fragments = 2
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 151
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 144
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_en_3(self):
        lang = 'en'
        s = 'What should I do now?'
        target = s
        self._test(lang, s, target)



    Clone # 1188
    Distance between two fragments = 2
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 95
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 88
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_en_3(self):
        lang = 'en'
        s = 'What should I do now?'
        target = s
        self._test(lang, s, target)



    Clone # 1189
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 95
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)



    Clone # 1190
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 109
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    def test_ro_2(self):
        lang = 'ro'
        s = 'How do you do?'
        target = 'Ce mai faceti?'
        self._test(lang, s, target)
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)



    Clone # 1191
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 116
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 109
    def test_ro_3(self):
        lang = 'ro'
        s = 'What should I do now?'
        target = 'Ce sa fac acum?'
        self._test(lang, s, target)
    def test_ro_2(self):
        lang = 'ro'
        s = 'How do you do?'
        target = 'Ce mai faceti?'
        self._test(lang, s, target)



    Clone # 1192
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 123
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 116
    def test_ro_missing_1(self):
        lang = 'ro'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_ro_3(self):
        lang = 'ro'
        s = 'What should I do now?'
        target = 'Ce sa fac acum?'
        self._test(lang, s, target)



    Clone # 1193
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 88
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)
    def test_en_3(self):
        lang = 'en'
        s = 'What should I do now?'
        target = s
        self._test(lang, s, target)



    Clone # 1194
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 109
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 95
    def test_ro_2(self):
        lang = 'ro'
        s = 'How do you do?'
        target = 'Ce mai faceti?'
        self._test(lang, s, target)
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)



    Clone # 1195
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 116
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    def test_ro_3(self):
        lang = 'ro'
        s = 'What should I do now?'
        target = 'Ce sa fac acum?'
        self._test(lang, s, target)
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)



    Clone # 1196
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 123
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 109
    def test_ro_missing_1(self):
        lang = 'ro'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_ro_2(self):
        lang = 'ro'
        s = 'How do you do?'
        target = 'Ce mai faceti?'
        self._test(lang, s, target)



    Clone # 1197
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 130
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 116
    def test_go_1(self):
        lang = 'en'
        s = 'Good day'
        target = s
        self._test(lang, s, target)
    def test_ro_3(self):
        lang = 'ro'
        s = 'What should I do now?'
        target = 'Ce sa fac acum?'
        self._test(lang, s, target)



    Clone # 1198
    Distance between two fragments = 2
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 95
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 74
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_en_1(self):
        lang = 'en'
        s = 'Good day'
        target = s
        self._test(lang, s, target)



    Clone # 1199
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 81
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)
    def test_en_2(self):
        lang = 'en'
        s = 'How do you do?'
        target = s
        self._test(lang, s, target)



    Clone # 1200
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 109
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 88
    def test_ro_2(self):
        lang = 'ro'
        s = 'How do you do?'
        target = 'Ce mai faceti?'
        self._test(lang, s, target)
    def test_en_3(self):
        lang = 'en'
        s = 'What should I do now?'
        target = s
        self._test(lang, s, target)



    Clone # 1201
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 116
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 95
    def test_ro_3(self):
        lang = 'ro'
        s = 'What should I do now?'
        target = 'Ce sa fac acum?'
        self._test(lang, s, target)
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)



    Clone # 1202
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 123
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    def test_ro_missing_1(self):
        lang = 'ro'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)



    Clone # 1203
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 130
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 109
    def test_go_1(self):
        lang = 'en'
        s = 'Good day'
        target = s
        self._test(lang, s, target)
    def test_ro_2(self):
        lang = 'ro'
        s = 'How do you do?'
        target = 'Ce mai faceti?'
        self._test(lang, s, target)



    Clone # 1204
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 137
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 116
    def test_en_2(self):
        lang = 'en'
        s = 'How do you do?'
        target = s
        self._test(lang, s, target)
    def test_ro_3(self):
        lang = 'ro'
        s = 'What should I do now?'
        target = 'Ce sa fac acum?'
        self._test(lang, s, target)



    Clone # 1205
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 144
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 123
    def test_en_3(self):
        lang = 'en'
        s = 'What should I do now?'
        target = s
        self._test(lang, s, target)
    def test_ro_missing_1(self):
        lang = 'ro'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)



    Clone # 1206
    Distance between two fragments = 2
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 151
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 130
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_go_1(self):
        lang = 'en'
        s = 'Good day'
        target = s
        self._test(lang, s, target)



    Clone # 1207
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 130
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    def test_go_1(self):
        lang = 'en'
        s = 'Good day'
        target = s
        self._test(lang, s, target)
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)



    Clone # 1208
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 74
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)
    def test_en_1(self):
        lang = 'en'
        s = 'Good day'
        target = s
        self._test(lang, s, target)



    Clone # 1209
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 109
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 74
    def test_ro_2(self):
        lang = 'ro'
        s = 'How do you do?'
        target = 'Ce mai faceti?'
        self._test(lang, s, target)
    def test_en_1(self):
        lang = 'en'
        s = 'Good day'
        target = s
        self._test(lang, s, target)



    Clone # 1210
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 116
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 81
    def test_ro_3(self):
        lang = 'ro'
        s = 'What should I do now?'
        target = 'Ce sa fac acum?'
        self._test(lang, s, target)
    def test_en_2(self):
        lang = 'en'
        s = 'How do you do?'
        target = s
        self._test(lang, s, target)



    Clone # 1211
    Distance between two fragments = 3
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 123
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 88
    def test_ro_missing_1(self):
        lang = 'ro'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_en_3(self):
        lang = 'en'
        s = 'What should I do now?'
        target = s
        self._test(lang, s, target)



    Clone # 1212
    Distance between two fragments = 2
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 130
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 95
    def test_go_1(self):
        lang = 'en'
        s = 'Good day'
        target = s
        self._test(lang, s, target)
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)



    Clone # 1213
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 137
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    def test_en_2(self):
        lang = 'en'
        s = 'How do you do?'
        target = s
        self._test(lang, s, target)
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)



    Clone # 1214
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 144
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 109
    def test_en_3(self):
        lang = 'en'
        s = 'What should I do now?'
        target = s
        self._test(lang, s, target)
    def test_ro_2(self):
        lang = 'ro'
        s = 'How do you do?'
        target = 'Ce mai faceti?'
        self._test(lang, s, target)



    Clone # 1215
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 151
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 116
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_ro_3(self):
        lang = 'ro'
        s = 'What should I do now?'
        target = 'Ce sa fac acum?'
        self._test(lang, s, target)



    Clone # 1216
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 144
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    def test_en_3(self):
        lang = 'en'
        s = 'What should I do now?'
        target = s
        self._test(lang, s, target)
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)



    Clone # 1217
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 151
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 109
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_ro_2(self):
        lang = 'ro'
        s = 'How do you do?'
        target = 'Ce mai faceti?'
        self._test(lang, s, target)



    Clone # 1218
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 116
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 74
    def test_ro_3(self):
        lang = 'ro'
        s = 'What should I do now?'
        target = 'Ce sa fac acum?'
        self._test(lang, s, target)
    def test_en_1(self):
        lang = 'en'
        s = 'Good day'
        target = s
        self._test(lang, s, target)



    Clone # 1219
    Distance between two fragments = 2
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 144
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 95
    def test_en_3(self):
        lang = 'en'
        s = 'What should I do now?'
        target = s
        self._test(lang, s, target)
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)



    Clone # 1220
    Distance between two fragments = 4
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 151
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 102
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_ro_1(self):
        lang = 'ro'
        s = 'Good day'
        target = 'Buna ziua'
        self._test(lang, s, target)



    Clone # 1221
    Distance between two fragments = 2
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 151
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 88
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_en_3(self):
        lang = 'en'
        s = 'What should I do now?'
        target = s
        self._test(lang, s, target)



    Clone # 1222
    Distance between two fragments = 2
    Clone size = 5
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 151
    Source file "./common/test/unit-test/test_gettext.py"
    The first line is 74
    def test_en_missing_1(self):
        lang = 'en'
        s = "This string doesn't exist in the translation"
        target = s
        self._test(lang, s, target)
    def test_en_1(self):
        lang = 'en'
        s = 'Good day'
        target = s
        self._test(lang, s, target)



    Clone # 1223
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/syncCache.py"
    The first line is 78
    Source file "./satellite_tools/syncCache.py"
    The first line is 62
    class ErratumCache(BaseCache):
        _subdir = 'errata'
        def _get_key(self, object_id):
            hash_val = hash_object_id(object_id, 1)
            return os.path.join('satsync', self._subdir, hash_val, str(object_id))
    class BasePackageCache(BaseCache):
        _subdir = '__unknown__'
        def _get_key(self, object_id):
            hash_val = hash_object_id(object_id, 2)
            return os.path.join('satsync', self._subdir, hash_val, str(object_id))



    Clone # 1224
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/importlib/debPackage.py"
    The first line is 122
    Source file "./server/importlib/mpmSource.py"
    The first line is 123
    mapping = {'provides': headerSource.rpmProvides, 'requires': headerSource.rpmRequires, 'conflicts': headerSource.rpmConflicts, 'obsoletes': headerSource.rpmObsoletes} mapping = {'provides': headerSource.rpmProvides, 'requires': headerSource.rpmRequires, 'conflicts': headerSource.rpmConflicts, 'obsoletes': headerSource.rpmObsoletes}



    Clone # 1225
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/rhnSQL/driver_cx_Oracle.py"
    The first line is 453
    Source file "./server/rhnSQL/driver_cx_Oracle.py"
    The first line is 444
    try:
        c = self.dbh.cursor()
    except cx_Oracle.DatabaseError, error:
        e = error[0]
        raise sql_base.SQLSchemaError(e.code, e.message, e.context)
    try:
        c = self.dbh.cursor()
    except cx_Oracle.DatabaseError, error:
        e = error[0]
        raise sql_base.SQLSchemaError(e.code, e.message, e.context)



    Clone # 1226
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 222
    Source file "./server/rhnChannel.py"
    The first line is 216
    def load_by_id(self, label):
        BaseChannelObject.load_by_id(self, label)
        self._load_channel_families()
        self._load_dists()
        return self
    def load_by_label(self, label):
        BaseChannelObject.load_by_label(self, label)
        self._load_channel_families()
        self._load_dists()
        return self



    Clone # 1227
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnVirtualization.py"
    The first line is 670
    Source file "./server/rhnVirtualization.py"
    The first line is 660
    if (properties.has_key(PropertyType.STATE)) and (existing_row['state'] != properties[PropertyType.STATE]):
        new_values_array.append('\n state = (\n SELECT rvis.id \n FROM rhnVirtualInstanceState rvis \n WHERE rvis.label = :state)\n ')
        bindings['state'] = properties[PropertyType.STATE]
    if (properties.has_key(PropertyType.TYPE)) and (existing_row['instance_type'] != properties[PropertyType.TYPE]):
        new_values_array.append('\n instance_type = (\n select rvit.id\n from rhnVirtualInstanceType rvit\n where rvit.label = :virt_type)\n ')
        bindings['virt_type'] = properties[PropertyType.TYPE]



    Clone # 1228
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/importlib/channelImport.py"
    The first line is 373
    Source file "./server/importlib/packageImport.py"
    The first line is 292
    try:
        self.backend.processReleaseChannelMap(self.batch)
    except:
        self.backend.rollback()
        raise
    try:
        self.backend.processCapabilities(self.capabilities)
    except:
        self.backend.rollback()
        raise
    self.backend.commit() self.backend.commit()



    Clone # 1229
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/importlib/channelImport.py"
    The first line is 331
    Source file "./server/importlib/packageImport.py"
    The first line is 292
    try:
        self.backend.processDistChannelMap(self.batch)
    except:
        self.backend.rollback()
        raise
    try:
        self.backend.processCapabilities(self.capabilities)
    except:
        self.backend.rollback()
        raise
    self.backend.commit() self.backend.commit()



    Clone # 1230
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/importlib/packageImport.py"
    The first line is 292
    Source file "./server/importlib/productNamesImport.py"
    The first line is 31
    try:
        self.backend.processCapabilities(self.capabilities)
    except:
        self.backend.rollback()
        raise
    try:
        self.backend.processProductNames(self.batch)
    except:
        self.backend.rollback()
        raise
    self.backend.commit() self.backend.commit()



    Clone # 1231
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 287
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 141
    while 1:
        buff = stream.read(buffer_size)
        if not buff:
            break
        self._raw_stream.write(buff)
    while 1:
        buff = stream.read(self.buffer_size)
        if not buff:
            break
        f.write(buff)



    Clone # 1232
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 168
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 141
    while 1:
        buff = f.read(self.buffer_size)
        if not buff:
            break
        dstream.write(buff)
    while 1:
        buff = stream.read(self.buffer_size)
        if not buff:
            break
        f.write(buff)



    Clone # 1233
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 287
    Source file "./server/rhnPackageUpload.py"
    The first line is 50
    while 1:
        buff = stream.read(buffer_size)
        if not buff:
            break
        self._raw_stream.write(buff)
    while 1:
        buf = req.read(buffer_size)
        if not buf:
            break
        t.write(buf)



    Clone # 1234
    Distance between two fragments = 4
    Clone size = 5
    Source file "./spacewalk/common/rhn_mpm.py"
    The first line is 273
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 168
    while 1:
        buf = source.read(self._buffer_size)
        if not buf:
            break
        dest.write(buf)
    while 1:
        buff = f.read(self.buffer_size)
        if not buff:
            break
        dstream.write(buff)



    Clone # 1235
    Distance between two fragments = 4
    Clone size = 5
    Source file "./spacewalk/common/rhn_mpm.py"
    The first line is 273
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 141
    while 1:
        buf = source.read(self._buffer_size)
        if not buf:
            break
        dest.write(buf)
    while 1:
        buff = stream.read(self.buffer_size)
        if not buff:
            break
        f.write(buff)



    Clone # 1236
    Distance between two fragments = 4
    Clone size = 5
    Source file "./spacewalk/common/rhn_mpm.py"
    The first line is 273
    Source file "./server/rhnPackageUpload.py"
    The first line is 50
    while 1:
        buf = source.read(self._buffer_size)
        if not buf:
            break
        dest.write(buf)
    while 1:
        buf = req.read(buffer_size)
        if not buf:
            break
        t.write(buf)



    Clone # 1237
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/app/rhn_mpm.py"
    The first line is 250
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 168
    while 1:
        buf = source.read(self._buffer_size)
        if not buf:
            break
        dest.write(buf)
    while 1:
        buff = f.read(self.buffer_size)
        if not buff:
            break
        dstream.write(buff)



    Clone # 1238
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/app/rhn_mpm.py"
    The first line is 250
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 141
    while 1:
        buf = source.read(self._buffer_size)
        if not buf:
            break
        dest.write(buf)
    while 1:
        buff = stream.read(self.buffer_size)
        if not buff:
            break
        f.write(buff)



    Clone # 1239
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/app/rhn_mpm.py"
    The first line is 250
    Source file "./server/rhnPackageUpload.py"
    The first line is 50
    while 1:
        buf = source.read(self._buffer_size)
        if not buf:
            break
        dest.write(buf)
    while 1:
        buf = req.read(buffer_size)
        if not buf:
            break
        t.write(buf)



    Clone # 1240
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 210
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 203
    class ChannelFamilyContainer(xmlSource.ChannelFamilyContainer):
        def endContainerCallback(self):
            importer = ChannelFamilyImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ServerGroupServerArchCompatContainer(xmlSource.ServerGroupServerArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerGroupServerArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1241
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 216
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 210
    class ChannelContainer(xmlSource.ChannelContainer):
        def endContainerCallback(self):
            importer = ChannelImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ChannelFamilyContainer(xmlSource.ChannelFamilyContainer):
        def endContainerCallback(self):
            importer = ChannelFamilyImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1242
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 210
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 196
    class ChannelFamilyContainer(xmlSource.ChannelFamilyContainer):
        def endContainerCallback(self):
            importer = ChannelFamilyImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ChannelPackageArchCompatContainer(xmlSource.ChannelPackageArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ChannelPackageArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1243
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 216
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 203
    class ChannelContainer(xmlSource.ChannelContainer):
        def endContainerCallback(self):
            importer = ChannelImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ServerGroupServerArchCompatContainer(xmlSource.ServerGroupServerArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerGroupServerArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1244
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 210
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 189
    class ChannelFamilyContainer(xmlSource.ChannelFamilyContainer):
        def endContainerCallback(self):
            importer = ChannelFamilyImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ServerChannelArchCompatContainer(xmlSource.ServerChannelArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerChannelArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1245
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 216
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 196
    class ChannelContainer(xmlSource.ChannelContainer):
        def endContainerCallback(self):
            importer = ChannelImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ChannelPackageArchCompatContainer(xmlSource.ChannelPackageArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ChannelPackageArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1246
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 210
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 182
    class ChannelFamilyContainer(xmlSource.ChannelFamilyContainer):
        def endContainerCallback(self):
            importer = ChannelFamilyImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ServerPackageArchCompatContainer(xmlSource.ServerPackageArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerPackageArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1247
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 216
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 189
    class ChannelContainer(xmlSource.ChannelContainer):
        def endContainerCallback(self):
            importer = ChannelImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ServerChannelArchCompatContainer(xmlSource.ServerChannelArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerChannelArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1248
    Distance between two fragments = 2
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 203
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 170
    class ServerGroupServerArchCompatContainer(xmlSource.ServerGroupServerArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerGroupServerArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ServerArchContainer(xmlSource.ServerArchContainer):
        def endContainerCallback(self):
            importer = archImport.ServerArchImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1249
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 210
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 176
    class ChannelFamilyContainer(xmlSource.ChannelFamilyContainer):
        def endContainerCallback(self):
            importer = ChannelFamilyImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class CPUArchContainer(xmlSource.CPUArchContainer):
        def endContainerCallback(self):
            importer = archImport.CPUArchImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1250
    Distance between two fragments = 3
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 216
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 182
    class ChannelContainer(xmlSource.ChannelContainer):
        def endContainerCallback(self):
            importer = ChannelImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ServerPackageArchCompatContainer(xmlSource.ServerPackageArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerPackageArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1251
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 210
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 170
    class ChannelFamilyContainer(xmlSource.ChannelFamilyContainer):
        def endContainerCallback(self):
            importer = ChannelFamilyImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ServerArchContainer(xmlSource.ServerArchContainer):
        def endContainerCallback(self):
            importer = archImport.ServerArchImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1252
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 216
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 176
    class ChannelContainer(xmlSource.ChannelContainer):
        def endContainerCallback(self):
            importer = ChannelImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class CPUArchContainer(xmlSource.CPUArchContainer):
        def endContainerCallback(self):
            importer = archImport.CPUArchImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1253
    Distance between two fragments = 2
    Clone size = 6
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 203
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 158
    class ServerGroupServerArchCompatContainer(xmlSource.ServerGroupServerArchCompatContainer):
        def endContainerCallback(self):
            importer = archImport.ServerGroupServerArchCompatImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ChannelArchContainer(xmlSource.ChannelArchContainer):
        def endContainerCallback(self):
            importer = archImport.ChannelArchImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1254
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 210
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 164
    class ChannelFamilyContainer(xmlSource.ChannelFamilyContainer):
        def endContainerCallback(self):
            importer = ChannelFamilyImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class PackageArchContainer(xmlSource.PackageArchContainer):
        def endContainerCallback(self):
            importer = archImport.PackageArchImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1255
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 216
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 170
    class ChannelContainer(xmlSource.ChannelContainer):
        def endContainerCallback(self):
            importer = ChannelImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ServerArchContainer(xmlSource.ServerArchContainer):
        def endContainerCallback(self):
            importer = archImport.ServerArchImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1256
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 210
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 158
    class ChannelFamilyContainer(xmlSource.ChannelFamilyContainer):
        def endContainerCallback(self):
            importer = ChannelFamilyImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ChannelArchContainer(xmlSource.ChannelArchContainer):
        def endContainerCallback(self):
            importer = archImport.ChannelArchImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1257
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 216
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 164
    class ChannelContainer(xmlSource.ChannelContainer):
        def endContainerCallback(self):
            importer = ChannelImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class PackageArchContainer(xmlSource.PackageArchContainer):
        def endContainerCallback(self):
            importer = archImport.PackageArchImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1258
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 216
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 158
    class ChannelContainer(xmlSource.ChannelContainer):
        def endContainerCallback(self):
            importer = ChannelImport(self.batch, get_backend())
            importer.run()
            self.batch = []
    class ChannelArchContainer(xmlSource.ChannelArchContainer):
        def endContainerCallback(self):
            importer = archImport.ChannelArchImport(self.batch, get_backend())
            importer.run()
            self.batch = []



    Clone # 1259
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 298
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 466
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        dict[row['package_arch_id']] = None
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        all_channels_hash[row['label']] = row



    Clone # 1260
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 298
    Source file "./server/importlib/backend.py"
    The first line is 1267
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        dict[row['package_arch_id']] = None
    while 1:
        row = statement.fetchone_dict()
        if not row:
            break
        channels[row['channel_id']] = None



    Clone # 1261
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 298
    Source file "./satellite_tools/sync_handlers.py"
    The first line is 731
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        dict[row['package_arch_id']] = None
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        cfs[row['label']] = 1



    Clone # 1262
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 298
    Source file "./server/rhnActivationKey.py"
    The first line is 157
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        dict[row['package_arch_id']] = None
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        ret[row['label']] = None



    Clone # 1263
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 466
    Source file "./server/importlib/backend.py"
    The first line is 163
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        all_channels_hash[row['label']] = row
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        hash[row['label']] = row['id']



    Clone # 1264
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 163
    Source file "./server/apacheHandler.py"
    The first line is 162
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        hash[row['label']] = row['id']
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        templateStrings[row['label']] = row['value']



    Clone # 1265
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnServer/server_packages.py"
    The first line is 215
    Source file "./server/apacheHandler.py"
    The first line is 162
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        package_arches_hash[row['id']] = row['label']
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        templateStrings[row['label']] = row['value']



    Clone # 1266
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 522
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 466
    while 1:
        row = hk.fetchone_dict()
        if not row:
            break
        all_ks_hash[row['kickstart_label']] = row
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        all_channels_hash[row['label']] = row



    Clone # 1267
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 522
    Source file "./satellite_tools/sync_handlers.py"
    The first line is 731
    while 1:
        row = hk.fetchone_dict()
        if not row:
            break
        all_ks_hash[row['kickstart_label']] = row
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        cfs[row['label']] = 1



    Clone # 1268
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 522
    Source file "./server/importlib/backend.py"
    The first line is 1267
    while 1:
        row = hk.fetchone_dict()
        if not row:
            break
        all_ks_hash[row['kickstart_label']] = row
    while 1:
        row = statement.fetchone_dict()
        if not row:
            break
        channels[row['channel_id']] = None



    Clone # 1269
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 522
    Source file "./server/importlib/backend.py"
    The first line is 298
    while 1:
        row = hk.fetchone_dict()
        if not row:
            break
        all_ks_hash[row['kickstart_label']] = row
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        dict[row['package_arch_id']] = None



    Clone # 1270
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 522
    Source file "./server/rhnActivationKey.py"
    The first line is 157
    while 1:
        row = hk.fetchone_dict()
        if not row:
            break
        all_ks_hash[row['kickstart_label']] = row
    while 1:
        row = h.fetchone_dict()
        if not row:
            break
        ret[row['label']] = None



    Clone # 1271
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/handlers/xp/packages.py"
    The first line is 114
    Source file "./server/handlers/xp/rhnlint.py"
    The first line is 84
    def auth(login, password):
        authobj = UserAuth()
        authobj.auth(login, password)
        authobj.authzOrg({'orgId': authobj.org_id})
        return authobj
    def auth(login, password):
        authobj = UserAuth()
        authobj.auth(login, password)
        authobj.authzOrg({'orgId': authobj.org_id})
        return authobj



    Clone # 1272
    Distance between two fragments = 2
    Clone size = 5
    Source file "./test/unit/spacewalk/test/server/rhnsql-tests.py"
    The first line is 52
    Source file "./test/unit/spacewalk/test/server/rhnsql-tests.py"
    The first line is 32
    query = 'INSERT INTO people(a, b, c, d) VALUES(:a, :b, :a, :b)' query = 'INSERT INTO people(id, name, phone) VALUES(:id, :name, :phone)'
    expected_query = 'INSERT INTO people(a, b, c, d) VALUES($1, $2, $3, $4)' expected_query = 'INSERT INTO people(id, name, phone) VALUES($1, $2, $3)'
    new_query, param_index, args_found = convert_named_query_params(query) new_query, param_index, args_found = convert_named_query_params(query)
    self.assertEquals(expected_query, new_query) self.assertEquals(expected_query, new_query)



    Clone # 1273
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 440
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 423
    def set_attributes(self):
        return {'id': ('rhn-erratum-%s') % (self._row['errata_id']), 'advisory-name': self._row['advisory_name'], 'last-modified': _dbtime2timestamp(self._row['last_modified'])}
    def set_attributes(self):
        return {'id': ('rhn-source-package-%s') % (self._row['id']), 'source-rpm': self._row['source_rpm'], 'last-modified': _dbtime2timestamp(self._row['last_modified'])}



    Clone # 1274
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1617
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1100
    def set_iterator(self):
        query = rhnSQL.prepare('\n select label, name from rhnProductName\n ')
        query.execute()
        return query
    def set_iterator(self):
        h = rhnSQL.prepare(('\n select id, label, name\n from %s\n ') % (self.table_name))
        h.execute()
        return h



    Clone # 1275
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1383
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1100
    def set_iterator(self):
        h = rhnSQL.prepare('\n select kt.id, \n c.label channel, \n kt.base_path "base-path", \n kt.label, \n kt.boot_image "boot-image",\n ktt.name "kstree-type-name",\n ktt.label "kstree-type-label",\n kit.name "install-type-name",\n kit.label "install-type-label",\n TO_CHAR(kt.last_modified, \'YYYYMMDDHH24MISS\') "last-modified"\n from rhnKickstartableTree kt,\n rhnKSTreeType ktt,\n rhnKSInstallType kit,\n rhnChannel c\n where kt.channel_id = c.id\n and ktt.id = kt.kstree_type\n and kit.id = kt.install_type\n and kt.org_id is NULL\n ')
        h.execute()
        return h
    def set_iterator(self):
        h = rhnSQL.prepare(('\n select id, label, name\n from %s\n ') % (self.table_name))
        h.execute()
        return h



    Clone # 1276
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1359
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1100
    def set_iterator(self):
        h = rhnSQL.prepare('\n select pn1.name, pe.epoch, pe.version, pe.release, \n pa.name "package-arch", pn2.name "ignored-name"\n from rhnBlacklistObsoletes bo, \n rhnPackageName pn1, rhnPackageEVR pe, rhnPackageArch pa,\n rhnPackageName pn2\n where bo.name_id = pn1.id\n and bo.evr_id = pe.id\n and bo.package_arch_id = pa.id\n and bo.ignore_name_id = pn2.id\n ')
        h.execute()
        return h
    def set_iterator(self):
        h = rhnSQL.prepare(('\n select id, label, name\n from %s\n ') % (self.table_name))
        h.execute()
        return h



    Clone # 1277
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlDiskSource.py"
    The first line is 249
    Source file "./satellite_tools/xmlDiskSource.py"
    The first line is 232
    def __init__(self, mountPoint):
        KickstartDataDiskSource.__init__(self, mountPoint)
        self.relative_path = None
    def __init__(self, mountPoint):
        DiskSource.__init__(self, mountPoint)
        self.id = None
    def set_relative_path(self, relative_path):
        self.relative_path = relative_path
    def setID(self, ks_label):
        self.id = ks_label



    Clone # 1278
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/xmlDiskSource.py"
    The first line is 249
    Source file "./satellite_tools/xmlDiskSource.py"
    The first line is 109
    def __init__(self, mountPoint):
        KickstartDataDiskSource.__init__(self, mountPoint)
        self.relative_path = None
    def __init__(self, mountPoint):
        DiskSource.__init__(self, mountPoint)
        self.channel = None
    def set_relative_path(self, relative_path):
        self.relative_path = relative_path
    def setChannel(self, channel):
        self.channel = channel



    Clone # 1279
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 645
    Source file "./satellite_tools/xmlSource.py"
    The first line is 559
    item_name = 'erratum' item_name = 'source-package'
    item_class = importLib.ChannelErratum item_class = importLib.IncompleteSourcePackage
    tagMap = {'last-modified': 'last_modified', 'advisory-name': 'advisory_name'} tagMap = {'last-modified': 'last_modified', 'source-rpm': 'source_rpm'}



    Clone # 1280
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 1387
    Source file "./server/importlib/backend.py"
    The first line is 136
    h.execute(p=k) h.execute(name=cve_name)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if row:
        hash[k] = row['id']
        continue
    if row:
        cveHash[cve_name] = row['id']
        continue



    Clone # 1281
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/handlers/xmlrpc/errata.py"
    The first line is 29
    Source file "./server/handlers/applet/applet.py"
    The first line is 33
    rhnHandler.__init__(self) rhnHandler.__init__(self)
    self.functions = [] self.functions = []
    self.functions.append('GetByPackage') self.functions.append('poll_status')
    self.functions.append('getPackageErratum') self.functions.append('poll_packages')
    self.functions.append('getErrataInfo') self.functions.append('tie_uuid')



    Clone # 1282
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/handlers/xmlrpc/queue.py"
    The first line is 486
    Source file "./server/handlers/config/rhn_config_management.py"
    The first line is 268
    self.auth_system(system_id) self.auth_system(systemid)
    log_debug(1, self.server_id) log_debug(1, self.server_id)
    h = rhnSQL.prepare('\n select\n count(action_id) id\n from\n rhnServerAction r\n where\n r.server_id = :server_id\n and r.status in (0, 1)\n ') h = rhnSQL.prepare(self._query_lookup_import_channel)
    h.execute(server_id=self.server_id) h.execute(server_id=self.server_id)
    data = h.fetchone_dict() row = h.fetchone_dict()



    Clone # 1283
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 249
    Source file "./satellite_tools/xmlSource.py"
    The first line is 1089
    handler.set_container(ChannelContainer()) handler.set_container(ServerGroupServerArchCompatContainer())
    handler.set_container(PackageContainer()) handler.set_container(BlacklistObsoletesContainer())
    handler.set_container(BlacklistObsoletesContainer()) handler.set_container(KickstartableTreesContainer())
    handler.set_container(ProductNamesContainer()) handler.set_conatiner(ProductNamesContainer())
    return handler return handler



    Clone # 1284
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/xmlrpc/up2date.py"
    The first line is 47
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 112
    rhnHandler.__init__(self) rhnHandler.__init__(self)
    self.functions.append('login') self.functions.append('activate_registration_number')
    self.functions.append('listChannels') self.functions.append('activate_hardware_info')
    self.functions.append('subscribeChannels') self.functions.append('available_eus_channels')
    self.functions.append('unsubscribeChannels') self.functions.append('add_hw_profile')



    Clone # 1285
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 241
    Source file "./satellite_tools/xmlSource.py"
    The first line is 1079
    handler.set_container(ChannelArchContainer()) handler.set_container(SourcePackageContainer())
    handler.set_container(PackageArchContainer()) handler.set_container(ErrataContainer())
    handler.set_container(ServerArchContainer()) handler.set_container(ServerArchContainer())
    handler.set_container(ServerPackageArchCompatContainer()) handler.set_container(PackageArchContainer())
    handler.set_container(ServerChannelArchCompatContainer()) handler.set_container(ChannelArchContainer())



    Clone # 1286
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 247
    Source file "./satellite_tools/xmlSource.py"
    The first line is 1086
    handler.set_container(CPUArchContainer()) handler.set_container(ServerPackageArchCompatContainer())
    handler.set_container(ChannelFamilyContainer()) handler.set_container(ServerChannelArchCompatContainer())
    handler.set_container(ChannelContainer()) handler.set_container(ChannelPackageArchCompatContainer())
    handler.set_container(PackageContainer()) handler.set_container(ServerGroupServerArchCompatContainer())
    handler.set_container(BlacklistObsoletesContainer()) handler.set_container(BlacklistObsoletesContainer())



    Clone # 1287
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 243
    Source file "./satellite_tools/xmlSource.py"
    The first line is 1080
    handler.set_container(ServerArchContainer()) handler.set_container(ErrataContainer())
    handler.set_container(ServerPackageArchCompatContainer()) handler.set_container(ServerArchContainer())
    handler.set_container(ServerChannelArchCompatContainer()) handler.set_container(PackageArchContainer())
    handler.set_container(ChannelPackageArchCompatContainer()) handler.set_container(ChannelArchContainer())
    handler.set_container(CPUArchContainer()) handler.set_container(CPUArchContainer())



    Clone # 1288
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 1082
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 241
    handler.set_container(ServerArchContainer()) handler.set_container(ChannelArchContainer())
    handler.set_container(PackageArchContainer()) handler.set_container(PackageArchContainer())
    handler.set_container(ChannelArchContainer()) handler.set_container(ServerArchContainer())
    handler.set_container(CPUArchContainer()) handler.set_container(ServerPackageArchCompatContainer())
    handler.set_container(ServerPackageArchCompatContainer()) handler.set_container(ServerChannelArchCompatContainer())



    Clone # 1289
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/app/packages.py"
    The first line is 72
    Source file "./server/handlers/xmlrpc/up2date.py"
    The first line is 53
    self.functions.append('login') self.functions.append('login')
    self.functions.append('check_session') self.functions.append('listChannels')
    self.functions.append('getPackageChecksum') self.functions.append('subscribeChannels')
    self.functions.append('getPackageChecksumBySession') self.functions.append('unsubscribeChannels')
    self.functions.append('getSourcePackageChecksum') self.functions.append('history')



    Clone # 1290
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 1084
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 241
    handler.set_container(ChannelArchContainer()) handler.set_container(ChannelArchContainer())
    handler.set_container(CPUArchContainer()) handler.set_container(PackageArchContainer())
    handler.set_container(ServerPackageArchCompatContainer()) handler.set_container(ServerArchContainer())
    handler.set_container(ServerChannelArchCompatContainer()) handler.set_container(ServerPackageArchCompatContainer())
    handler.set_container(ChannelPackageArchCompatContainer()) handler.set_container(ServerChannelArchCompatContainer())



    Clone # 1291
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 247
    Source file "./satellite_tools/xmlSource.py"
    The first line is 1075
    handler.set_container(CPUArchContainer()) handler.set_container(ChannelFamilyContainer())
    handler.set_container(ChannelFamilyContainer()) handler.set_container(ChannelContainer())
    handler.set_container(ChannelContainer()) handler.set_container(IncompletePackageContainer())
    handler.set_container(PackageContainer()) handler.set_container(PackageContainer())
    handler.set_container(BlacklistObsoletesContainer()) handler.set_container(SourcePackageContainer())



    Clone # 1292
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/xmlrpc/registration.py"
    The first line is 112
    Source file "./server/handlers/xmlrpc/queue.py"
    The first line is 40
    rhnHandler.__init__(self) rhnHandler.__init__(self)
    self.functions.append('activate_registration_number') self.functions.append('get')
    self.functions.append('activate_hardware_info') self.functions.append('get_future_actions')
    self.functions.append('available_eus_channels') self.functions.append('length')
    self.functions.append('add_hw_profile') self.functions.append('submit')



    Clone # 1293
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/xmlrpc/up2date.py"
    The first line is 47
    Source file "./server/handlers/xmlrpc/queue.py"
    The first line is 40
    rhnHandler.__init__(self) rhnHandler.__init__(self)
    self.functions.append('login') self.functions.append('get')
    self.functions.append('listChannels') self.functions.append('get_future_actions')
    self.functions.append('subscribeChannels') self.functions.append('length')
    self.functions.append('unsubscribeChannels') self.functions.append('submit')



    Clone # 1294
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/xmlSource.py"
    The first line is 1075
    Source file "./satellite_tools/diskImportLib.py"
    The first line is 248
    handler.set_container(ChannelFamilyContainer()) handler.set_container(ChannelFamilyContainer())
    handler.set_container(ChannelContainer()) handler.set_container(ChannelContainer())
    handler.set_container(IncompletePackageContainer()) handler.set_container(PackageContainer())
    handler.set_container(PackageContainer()) handler.set_container(BlacklistObsoletesContainer())
    handler.set_container(SourcePackageContainer()) handler.set_container(ProductNamesContainer())



    Clone # 1295
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 307
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 178
    class BlacklistsDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.BlacklistsDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.blacklist_obsoletes
    class ArchesDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ArchesDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.arches



    Clone # 1296
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 315
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 186
    class ProductNamesDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ProductNamesDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.product_names
    class ArchesExtraDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ArchesExtraDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.arches_extra



    Clone # 1297
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 358
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 315
    class SourceRPMDumper(BinaryRPMDumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.SourceRPMDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.get_source_rpm
    class ProductNamesDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ProductNamesDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.product_names



    Clone # 1298
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 358
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 186
    class SourceRPMDumper(BinaryRPMDumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.SourceRPMDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.get_source_rpm
    class ArchesExtraDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ArchesExtraDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.arches_extra



    Clone # 1299
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 358
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 307
    class SourceRPMDumper(BinaryRPMDumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.SourceRPMDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.get_source_rpm
    class BlacklistsDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.BlacklistsDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.blacklist_obsoletes



    Clone # 1300
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 358
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 178
    class SourceRPMDumper(BinaryRPMDumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.SourceRPMDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.get_source_rpm
    class ArchesDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ArchesDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.arches



    Clone # 1301
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 315
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 307
    class ProductNamesDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ProductNamesDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.product_names
    class BlacklistsDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.BlacklistsDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.blacklist_obsoletes



    Clone # 1302
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 315
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 178
    class ProductNamesDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ProductNamesDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.product_names
    class ArchesDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ArchesDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.arches



    Clone # 1303
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 186
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 307
    class ArchesExtraDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ArchesExtraDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.arches_extra
    class BlacklistsDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.BlacklistsDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.blacklist_obsoletes



    Clone # 1304
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 186
    Source file "./satellite_tools/xmlDiskDumper.py"
    The first line is 178
    class ArchesExtraDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ArchesExtraDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.arches_extra
    class ArchesDumper(Dumper):
        def setMixin(self):
            self._mixin = xmlDiskSource.ArchesDiskSource(self.mountPoint)
        def _getMethod(self):
            return self.server.dump.arches



    Clone # 1305
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/configFilesHandler.py"
    The first line is 342
    Source file "./server/configFilesHandler.py"
    The first line is 314
    h = rhnSQL.prepare(self._query_lookup_config_info) h = rhnSQL.prepare(self._query_get_content_row)
    apply(h.execute, (), file) apply(h.execute, (), file)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        raise rhnException('This query should always return a row')
    if not row:
        raise rhnException("Row should have been inserted but it's not")



    Clone # 1306
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnServer/server_packages.py"
    The first line is 340
    Source file "./server/rhnServer/server_packages.py"
    The first line is 325
    h = rhnSQL.prepare('\n delete from rhnServerNeededCache\n where\n server_id = :server_id\n and package_id = :package_id\n ') h = rhnSQL.prepare('\n delete from rhnServerNeededCache\n where\n server_id = :server_id\n and errata_id = :errata_id\n and package_id = :package_id\n ')
    dict = rhnLib.transpose_to_hash(null_errata, ['errata_id', 'package_id']) dict = rhnLib.transpose_to_hash(non_null_errata, ['errata_id', 'package_id'])
    dict['server_id'] = ([server_id]) * (len(dict['package_id'])) dict['server_id'] = ([server_id]) * (len(dict['package_id']))



    Clone # 1307
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/test/TestRhnpush.py"
    The first line is 37
    Source file "./server/test/TestRedhat.py"
    The first line is 97
    server = SimpleXMLRPCServer.SimpleXMLRPCServer(addr=('', 16000)) server = SimpleXMLRPCServer.SimpleXMLRPCServer(addr=('', 8000))
    for func in app.functions:
        print func
        server.register_function(getattr(app, func), name=('app.%s') % (func))
    for func in rpc_downloads.functions:
        print func
        server.register_function(getattr(rpc_downloads, func), name=('downloads.%s') % (func))
    server.serve_forever() server.serve_forever()



    Clone # 1308
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnSQL/sql_table.py"
    The first line is 202
    Source file "./server/rhnSQL/sql_sequence.py"
    The first line is 37
    h.execute() cursor.execute()
    row = h.fetchone_dict() ret = cursor.fetchone_dict()
    if row is None:
        return 0
    if ret is None:
        return ret
    return int(row['id']) return int(ret['id'])



    Clone # 1309
    Distance between two fragments = 4
    Clone size = 5
    Source file "./test/non-unit/server/rhnSQL/dbtests.py"
    The first line is 161
    Source file "./test/non-unit/server/rhnSQL/dbtests.py"
    The first line is 124
    query = rhnSQL.prepare(('SELECT * FROM %s ORDER BY id') % (self.temp_table)) query = rhnSQL.prepare(('SELECT * FROM %s WHERE id >= 1000 ORDER BY ID') % (self.temp_table))
    query.execute() query.execute()
    rows = query.fetchall() rows = query.fetchall()
    self.assertEquals(len(TEST_IDS), len(rows)) self.assertEquals(2, len(rows))



    Clone # 1310
    Distance between two fragments = 4
    Clone size = 5
    Source file "./test/non-unit/server/rhnSQL/dbtests.py"
    The first line is 161
    Source file "./test/non-unit/server/rhnSQL/dbtests.py"
    The first line is 92
    query = rhnSQL.prepare(('SELECT * FROM %s ORDER BY id') % (self.temp_table)) query = rhnSQL.prepare(('SELECT * FROM %s WHERE id >= 1000 ORDER BY ID') % (self.temp_table))
    query.execute() query.execute()
    rows = query.fetchall() rows = query.fetchall()
    self.assertEquals(len(TEST_IDS), len(rows)) self.assertEquals(2, len(rows))



    Clone # 1311
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 137
    Source file "./server/test/unit-test/test_server_registration.py"
    The first line is 118
    system_id = register_new_system(params) system_id = register_new_system(params)
    rhnSQL.commit() rhnSQL.commit()
    s1 = rhnServer.get(system_id) s = rhnServer.get(system_id)
    self.assertNotEqual(s1, None) self.assertNotEqual(s, None)
    server_id_1 = s1.getid() server_id = s.getid()



    Clone # 1312
    Distance between two fragments = 4
    Clone size = 5
    Source file "./spacewalk/common/checksum.py"
    The first line is 57
    Source file "./server/rhnPackageUpload.py"
    The first line is 50
    while 1:
        buffer = f.read(buffer_size)
        if not buffer:
            break
        m.update(buffer)
    while 1:
        buf = req.read(buffer_size)
        if not buf:
            break
        t.write(buf)



    Clone # 1313
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/action_extra_data/configfiles.py"
    The first line is 43
    Source file "./server/action_extra_data/script.py"
    The first line is 95
    h = rhnSQL.prepare(_query_reset_upload_files) h = rhnSQL.prepare(_query_get_output_row)
    h.execute(server_id=server_id, action_id=action_id) h.execute(server_id=server_id, action_id=action_id)
    if not data:
        log_debug(4, 'No data sent by client')
        return None
    if not output:
        log_debug(4, 'No output sent by client')
        return None



    Clone # 1314
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/action_extra_data/script.py"
    The first line is 95
    Source file "./server/action_extra_data/script.py"
    The first line is 65
    h = rhnSQL.prepare(_query_get_output_row) h = rhnSQL.prepare(_query_clear_output)
    h.execute(server_id=server_id, action_id=action_id) h.execute(server_id=server_id, action_id=action_id)
    if not output:
        log_debug(4, 'No output sent by client')
        return None
    if not data:
        log_debug(4, 'No data sent by client')
        return None



    Clone # 1315
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1144
    Source file "./satellite_tools/satsync.py"
    The first line is 1054
    missing_source_packages_count = len(missing_fs_source_packages) missing_packages_count = len(missing_fs_packages)
    log(1, (' Fetching any missing SRPMs: %s (%s)') % ((channel, (missing_source_packages_count) or ('NONE MISSING')))) log(1, (' Fetching any missing RPMs: %s (%s)') % ((channel, (missing_packages_count) or ('NONE MISSING'))))
    if missing_source_packages_count == 0:
        continue
    if missing_packages_count == 0:
        continue



    Clone # 1316
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1835
    Source file "./satellite_tools/satsync.py"
    The first line is 1702
    errata_count = len(batch) package_count = len(packages)
    log(1, (messages.errata_importing) % ((chn, (errata_count) or ('NONE RELEVANT')))) log(1, (messages.package_importing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not errata_count:
        continue
    if not package_count:
        continue



    Clone # 1317
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1835
    Source file "./satellite_tools/satsync.py"
    The first line is 1280
    errata_count = len(batch) package_count = len(pids)
    log(1, (messages.errata_importing) % ((chn, (errata_count) or ('NONE RELEVANT')))) log(1, (messages.package_parsing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not errata_count:
        continue
    if not package_count:
        continue



    Clone # 1318
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1835
    Source file "./satellite_tools/satsync.py"
    The first line is 1104
    errata_count = len(batch) package_count = len(pids)
    log(1, (messages.errata_importing) % ((chn, (errata_count) or ('NONE RELEVANT')))) log(1, (messages.package_parsing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not errata_count:
        continue
    if not package_count:
        continue



    Clone # 1319
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1421
    Source file "./satellite_tools/satsync.py"
    The first line is 1702
    files_count = len(files) package_count = len(packages)
    log(1, (messages.kickstart_downloading) % ((channel, (files_count) or ('NONE RELEVANT')))) log(1, (messages.package_importing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not files_count:
        continue
    if not package_count:
        continue



    Clone # 1320
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1421
    Source file "./satellite_tools/satsync.py"
    The first line is 1280
    files_count = len(files) package_count = len(pids)
    log(1, (messages.kickstart_downloading) % ((channel, (files_count) or ('NONE RELEVANT')))) log(1, (messages.package_parsing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not files_count:
        continue
    if not package_count:
        continue



    Clone # 1321
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1421
    Source file "./satellite_tools/satsync.py"
    The first line is 1104
    files_count = len(files) package_count = len(pids)
    log(1, (messages.kickstart_downloading) % ((channel, (files_count) or ('NONE RELEVANT')))) log(1, (messages.package_parsing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not files_count:
        continue
    if not package_count:
        continue



    Clone # 1322
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1391
    Source file "./satellite_tools/satsync.py"
    The first line is 1702
    kt_count = len(ktids) package_count = len(packages)
    log(1, (messages.kickstart_parsing) % ((channel, (kt_count) or ('NONE RELEVANT')))) log(1, (messages.package_importing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not kt_count:
        continue
    if not package_count:
        continue



    Clone # 1323
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1391
    Source file "./satellite_tools/satsync.py"
    The first line is 1280
    kt_count = len(ktids) package_count = len(pids)
    log(1, (messages.kickstart_parsing) % ((channel, (kt_count) or ('NONE RELEVANT')))) log(1, (messages.package_parsing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not kt_count:
        continue
    if not package_count:
        continue



    Clone # 1324
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/satsync.py"
    The first line is 1391
    Source file "./satellite_tools/satsync.py"
    The first line is 1104
    kt_count = len(ktids) package_count = len(pids)
    log(1, (messages.kickstart_parsing) % ((channel, (kt_count) or ('NONE RELEVANT')))) log(1, (messages.package_parsing) % ((channel, (package_count) or ('NONE RELEVANT'))))
    if not kt_count:
        continue
    if not package_count:
        continue



    Clone # 1325
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnUser.py"
    The first line is 437
    Source file "./server/rhnUser.py"
    The first line is 411
    username = str(user) username = str(username)
    h = rhnSQL.prepare('\n select 1 from rhnWebContactDisabled\n where login_uc = upper(:username)\n ') h = rhnSQL.prepare('\n select w.id from web_contact w\n where w.login_uc = upper(:username)\n ')
    h.execute(username=username) h.execute(username=username)
    row = h.fetchone_dict() data = h.fetchone_dict()



    Clone # 1326
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnUser.py"
    The first line is 455
    Source file "./server/rhnUser.py"
    The first line is 437
    user = str(user) username = str(user)
    h = rhnSQL.prepare('\n select w.id, w.password, w.old_password, w.org_id, ui.use_pam_authentication\n from web_contact w, rhnUserInfo ui\n where w.login_uc = upper(:p1)\n and w.id = ui.user_id\n ') h = rhnSQL.prepare('\n select 1 from rhnWebContactDisabled\n where login_uc = upper(:username)\n ')
    h.execute(p1=user) h.execute(username=username)
    data = h.fetchone_dict() row = h.fetchone_dict()



    Clone # 1327
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnUser.py"
    The first line is 455
    Source file "./server/rhnUser.py"
    The first line is 411
    user = str(user) username = str(username)
    h = rhnSQL.prepare('\n select w.id, w.password, w.old_password, w.org_id, ui.use_pam_authentication\n from web_contact w, rhnUserInfo ui\n where w.login_uc = upper(:p1)\n and w.id = ui.user_id\n ') h = rhnSQL.prepare('\n select w.id from web_contact w\n where w.login_uc = upper(:username)\n ')
    h.execute(p1=user) h.execute(username=username)
    data = h.fetchone_dict() data = h.fetchone_dict()



    Clone # 1328
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnUser.py"
    The first line is 455
    Source file "./server/rhnMapping.py"
    The first line is 21
    user = str(user) version = str(version)
    h = rhnSQL.prepare('\n select w.id, w.password, w.old_password, w.org_id, ui.use_pam_authentication\n from web_contact w, rhnUserInfo ui\n where w.login_uc = upper(:p1)\n and w.id = ui.user_id\n ') h = rhnSQL.prepare('\n select canon_version\n from rhnRedHatCanonVersion rhcv\n where rhcv.version = :version\n ')
    h.execute(p1=user) h.execute(version=version)
    data = h.fetchone_dict() ret = h.fetchone_dict()



    Clone # 1329
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/rhnUser.py"
    The first line is 437
    Source file "./server/rhnMapping.py"
    The first line is 21
    username = str(user) version = str(version)
    h = rhnSQL.prepare('\n select 1 from rhnWebContactDisabled\n where login_uc = upper(:username)\n ') h = rhnSQL.prepare('\n select canon_version\n from rhnRedHatCanonVersion rhcv\n where rhcv.version = :version\n ')
    h.execute(username=username) h.execute(version=version)
    row = h.fetchone_dict() ret = h.fetchone_dict()



    Clone # 1330
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnUser.py"
    The first line is 411
    Source file "./server/rhnMapping.py"
    The first line is 21
    username = str(username) version = str(version)
    h = rhnSQL.prepare('\n select w.id from web_contact w\n where w.login_uc = upper(:username)\n ') h = rhnSQL.prepare('\n select canon_version\n from rhnRedHatCanonVersion rhcv\n where rhcv.version = :version\n ')
    h.execute(username=username) h.execute(version=version)
    data = h.fetchone_dict() ret = h.fetchone_dict()



    Clone # 1331
    Distance between two fragments = 4
    Clone size = 7
    Source file "./server/test/unit-test/rhnSQL/test_lob.py"
    The first line is 43
    Source file "./server/action_extra_data/configfiles.py"
    The first line is 284
    h = rhnSQL.prepare('\n insert into misatestlob (id, val) values (:id, empty_blob())\n ') h = rhnSQL.prepare(_query_add_result_diff)
    h.execute(id=new_id) h.execute(action_config_revision_id=action_config_revision_id)
    h = rhnSQL.prepare('\n select val from misatestlob where id = :id for update of val\n ') h = rhnSQL.prepare(_query_update_result)
    h.execute(id=new_id) h.execute(action_config_revision_id=action_config_revision_id)
    row = h.fetchone_dict() row = h.fetchone_dict()



    Clone # 1332
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 380
    Source file "./server/handlers/config/rhn_config_management.py"
    The first line is 69
    h = rhnSQL.prepare('\n delete from rhnChannelFamilyMembers where channel_id = :channel_id') h = rhnSQL.prepare('\n delete from rhnServerConfigChannel where server_id = :server_id\n ')
    h.execute(channel_id=channel_id) h.execute(server_id=server_id)
    h = rhnSQL.prepare('\n insert into rhnChannelFamilyMembers (channel_id, channel_family_id )\n values (:channel_id, :channel_family_id)\n ') h = rhnSQL.prepare('\n insert into rhnServerConfigChannel (server_id, config_channel_id, position)\n select :server_id, id, :position\n from rhnConfigChannel\n where name = :config_channel\n and org_id = :org_id\n ')



    Clone # 1333
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 380
    Source file "./server/test/unit-test/rhnSQL/test_lob.py"
    The first line is 43
    h = rhnSQL.prepare('\n delete from rhnChannelFamilyMembers where channel_id = :channel_id') h = rhnSQL.prepare('\n insert into misatestlob (id, val) values (:id, empty_blob())\n ')
    h.execute(channel_id=channel_id) h.execute(id=new_id)
    h = rhnSQL.prepare('\n insert into rhnChannelFamilyMembers (channel_id, channel_family_id )\n values (:channel_id, :channel_family_id)\n ') h = rhnSQL.prepare('\n select val from misatestlob where id = :id for update of val\n ')



    Clone # 1334
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/config/rhn_config_management.py"
    The first line is 69
    Source file "./server/test/unit-test/rhnSQL/test_lob.py"
    The first line is 43
    h = rhnSQL.prepare('\n delete from rhnServerConfigChannel where server_id = :server_id\n ') h = rhnSQL.prepare('\n insert into misatestlob (id, val) values (:id, empty_blob())\n ')
    h.execute(server_id=server_id) h.execute(id=new_id)
    h = rhnSQL.prepare('\n insert into rhnServerConfigChannel (server_id, config_channel_id, position)\n select :server_id, id, :position\n from rhnConfigChannel\n where name = :config_channel\n and org_id = :org_id\n ') h = rhnSQL.prepare('\n select val from misatestlob where id = :id for update of val\n ')



    Clone # 1335
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/test/unit-test/test_rhnServerGroup.py"
    The first line is 41
    Source file "./server/test/unit-test/test_misc_functions.py"
    The first line is 54
    h = rhnSQL.prepare('select id from web_customer where id = :id') h = rhnSQL.prepare('select login, org_id from web_contact where id = :id')
    h.execute(id=org_id) h.execute(id=uid)
    row = h.fetchone_dict() row = h.fetchone_dict()
    self.assertNotEqual(row, None) self.assertNotEqual(row, None)
    self.assertEqual(row['id'], org_id) self.assertEqual(row['login'], login)



    Clone # 1336
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/test/unit-test/test_misc_functions.py"
    The first line is 43
    Source file "./server/test/unit-test/test_misc_functions.py"
    The first line is 54
    h = rhnSQL.prepare('select id from web_customer where id = :id') h = rhnSQL.prepare('select login, org_id from web_contact where id = :id')
    h.execute(id=org_id) h.execute(id=uid)
    row = h.fetchone_dict() row = h.fetchone_dict()
    self.assertNotEqual(row, None) self.assertNotEqual(row, None)
    self.assertEqual(row['id'], org_id) self.assertEqual(row['login'], login)



    Clone # 1337
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 346
    Source file "./server/importlib/backend.py"
    The first line is 1179
    h.execute(org_id=org_id) statement.execute(label=label)
    row = h.fetchone_dict() product = statement.fetchone_dict()
    if row:
        return row['id']
    if product:
        return product['id']
    return '' return None



    Clone # 1338
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/importlib/backend.py"
    The first line is 1199
    Source file "./server/importlib/backend.py"
    The first line is 1179
    statement.execute(label=label) statement.execute(label=label)
    org_id = statement.fetchone_dict() product = statement.fetchone_dict()
    if org_id:
        return org_id
    if product:
        return product['id']
    return None return None



    Clone # 1339
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/handlers/app/channel.py"
    The first line is 333
    Source file "./server/handlers/app/channel.py"
    The first line is 345
    h = rhnSQL.prepare('select org_id from web_contact \n where login_uc = UPPER(:org_id)') h = rhnSQL.prepare('select id from web_customer where id = :org_id')
    h.execute(org_id=org_id) h.execute(org_id=org_id)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if row:
        return row['org_id']
    if row:
        return row['id']



    Clone # 1340
    Distance between two fragments = 3
    Clone size = 6
    Source file "./server/handlers/app/channel.py"
    The first line is 345
    Source file "./server/rhnUser.py"
    The first line is 412
    h = rhnSQL.prepare('select id from web_customer where id = :org_id') h = rhnSQL.prepare('\n select w.id from web_contact w\n where w.login_uc = upper(:username)\n ')
    h.execute(org_id=org_id) h.execute(username=username)
    row = h.fetchone_dict() data = h.fetchone_dict()
    if row:
        return row['id']
    if data:
        return data['id']



    Clone # 1341
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/handlers/app/channel.py"
    The first line is 320
    Source file "./server/rhnMapping.py"
    The first line is 23
    h = rhnSQL.prepare('select id from rhnChannelArch where label = :label') h = rhnSQL.prepare('\n select canon_version\n from rhnRedHatCanonVersion rhcv\n where rhcv.version = :version\n ')
    h.execute(label=label) h.execute(version=version)
    row = h.fetchone_dict() ret = h.fetchone_dict()
    if not row:
        return 0
    if not ret:
        return version



    Clone # 1342
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 320
    Source file "./satellite_tools/satCerts.py"
    The first line is 572
    h = rhnSQL.prepare('select id from rhnChannelArch where label = :label') h = rhnSQL.prepare(_query_lookup_cfid)
    h.execute(label=label) h.execute(orgid=orgid)
    row = h.fetchone_dict() cfid = h.fetchone_dict()
    if not row:
        return 0
    if not cfid:
        return None



    Clone # 1343
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnMapping.py"
    The first line is 23
    Source file "./satellite_tools/satCerts.py"
    The first line is 572
    h = rhnSQL.prepare('\n select canon_version\n from rhnRedHatCanonVersion rhcv\n where rhcv.version = :version\n ') h = rhnSQL.prepare(_query_lookup_cfid)
    h.execute(version=version) h.execute(orgid=orgid)
    ret = h.fetchone_dict() cfid = h.fetchone_dict()
    if not ret:
        return version
    if not cfid:
        return None



    Clone # 1344
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/handlers/app/channel.py"
    The first line is 320
    Source file "./server/rhnServer/server_lib.py"
    The first line is 227
    h = rhnSQL.prepare('select id from rhnChannelArch where label = :label') h = rhnSQL.prepare('\n select s.name, si.checkin_counter - ((sysdate - s.created) * 100) ticks\n from rhnServer s, rhnServerInfo si\n where s.id = si.server_id\n and sysdate - s.created > 7\n and s.id = :server_id\n ')
    h.execute(label=label) h.execute(server_id=server_id)
    row = h.fetchone_dict() ret = h.fetchone_dict()
    if not row:
        return 0
    if not ret:
        return 1



    Clone # 1345
    Distance between two fragments = 4
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 320
    Source file "./server/rhnMapping.py"
    The first line is 39
    h = rhnSQL.prepare('select id from rhnChannelArch where label = :label') h = rhnSQL.prepare('select id from rhnPackageArch where label = :label')
    h.execute(label=label) h.execute(label=name)
    row = h.fetchone_dict() ret = h.fetchone_dict()
    if not row:
        return 0
    if not ret:
        return None



    Clone # 1346
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnMapping.py"
    The first line is 23
    Source file "./server/rhnMapping.py"
    The first line is 39
    h = rhnSQL.prepare('\n select canon_version\n from rhnRedHatCanonVersion rhcv\n where rhcv.version = :version\n ') h = rhnSQL.prepare('select id from rhnPackageArch where label = :label')
    h.execute(version=version) h.execute(label=name)
    ret = h.fetchone_dict() ret = h.fetchone_dict()
    if not ret:
        return version
    if not ret:
        return None



    Clone # 1347
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 320
    Source file "./satellite_tools/satCerts.py"
    The first line is 323
    h = rhnSQL.prepare('select id from rhnChannelArch where label = :label') h = rhnSQL.prepare(_query_latest_version)
    h.execute(label=label) h.execute(label=label)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        return 0
    if not row:
        return None



    Clone # 1348
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnMapping.py"
    The first line is 23
    Source file "./satellite_tools/satCerts.py"
    The first line is 323
    h = rhnSQL.prepare('\n select canon_version\n from rhnRedHatCanonVersion rhcv\n where rhcv.version = :version\n ') h = rhnSQL.prepare(_query_latest_version)
    h.execute(version=version) h.execute(label=label)
    ret = h.fetchone_dict() row = h.fetchone_dict()
    if not ret:
        return version
    if not row:
        return None



    Clone # 1349
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/handlers/app/channel.py"
    The first line is 320
    Source file "./server/handlers/app/channel.py"
    The first line is 304
    h = rhnSQL.prepare('select id from rhnChannelArch where label = :label') h = rhnSQL.prepare('select * from rhnChannelFamily where label = :label')
    h.execute(label=label) h.execute(label=name)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        return 0
    if not row:
        return 0



    Clone # 1350
    Distance between two fragments = 4
    Clone size = 6
    Source file "./satellite_tools/satCerts.py"
    The first line is 572
    Source file "./server/rhnServer/server_lib.py"
    The first line is 227
    h = rhnSQL.prepare(_query_lookup_cfid) h = rhnSQL.prepare('\n select s.name, si.checkin_counter - ((sysdate - s.created) * 100) ticks\n from rhnServer s, rhnServerInfo si\n where s.id = si.server_id\n and sysdate - s.created > 7\n and s.id = :server_id\n ')
    h.execute(orgid=orgid) h.execute(server_id=server_id)
    cfid = h.fetchone_dict() ret = h.fetchone_dict()
    if not cfid:
        return None
    if not ret:
        return 1



    Clone # 1351
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/satCerts.py"
    The first line is 572
    Source file "./satellite_tools/satCerts.py"
    The first line is 323
    h = rhnSQL.prepare(_query_lookup_cfid) h = rhnSQL.prepare(_query_latest_version)
    h.execute(orgid=orgid) h.execute(label=label)
    cfid = h.fetchone_dict() row = h.fetchone_dict()
    if not cfid:
        return None
    if not row:
        return None



    Clone # 1352
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServer/server_lib.py"
    The first line is 227
    Source file "./server/rhnMapping.py"
    The first line is 39
    h = rhnSQL.prepare('\n select s.name, si.checkin_counter - ((sysdate - s.created) * 100) ticks\n from rhnServer s, rhnServerInfo si\n where s.id = si.server_id\n and sysdate - s.created > 7\n and s.id = :server_id\n ') h = rhnSQL.prepare('select id from rhnPackageArch where label = :label')
    h.execute(server_id=server_id) h.execute(label=name)
    ret = h.fetchone_dict() ret = h.fetchone_dict()
    if not ret:
        return 1
    if not ret:
        return None



    Clone # 1353
    Distance between two fragments = 4
    Clone size = 6
    Source file "./server/rhnServer/server_lib.py"
    The first line is 227
    Source file "./satellite_tools/satCerts.py"
    The first line is 323
    h = rhnSQL.prepare('\n select s.name, si.checkin_counter - ((sysdate - s.created) * 100) ticks\n from rhnServer s, rhnServerInfo si\n where s.id = si.server_id\n and sysdate - s.created > 7\n and s.id = :server_id\n ') h = rhnSQL.prepare(_query_latest_version)
    h.execute(server_id=server_id) h.execute(label=label)
    ret = h.fetchone_dict() row = h.fetchone_dict()
    if not ret:
        return 1
    if not row:
        return None



    Clone # 1354
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnMapping.py"
    The first line is 39
    Source file "./satellite_tools/satCerts.py"
    The first line is 323
    h = rhnSQL.prepare('select id from rhnPackageArch where label = :label') h = rhnSQL.prepare(_query_latest_version)
    h.execute(label=name) h.execute(label=label)
    ret = h.fetchone_dict() row = h.fetchone_dict()
    if not ret:
        return None
    if not row:
        return None



    Clone # 1355
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnMapping.py"
    The first line is 39
    Source file "./server/handlers/app/channel.py"
    The first line is 304
    h = rhnSQL.prepare('select id from rhnPackageArch where label = :label') h = rhnSQL.prepare('select * from rhnChannelFamily where label = :label')
    h.execute(label=name) h.execute(label=name)
    ret = h.fetchone_dict() row = h.fetchone_dict()
    if not ret:
        return None
    if not row:
        return 0



    Clone # 1356
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/satCerts.py"
    The first line is 323
    Source file "./server/handlers/app/channel.py"
    The first line is 304
    h = rhnSQL.prepare(_query_latest_version) h = rhnSQL.prepare('select * from rhnChannelFamily where label = :label')
    h.execute(label=label) h.execute(label=name)
    row = h.fetchone_dict() row = h.fetchone_dict()
    if not row:
        return None
    if not row:
        return 0



    Clone # 1357
    Distance between two fragments = 0
    Clone size = 5
    Source file "./server/test/unit-test/test_rhnChannel.py"
    The first line is 213
    Source file "./server/test/misc_functions.py"
    The first line is 221
    release = (kwargs.get('release')) or (('release-') + (label)) release = (kwargs.get('release')) or (('release-') + (label))
    os = (kwargs.get('os')) or ('Unittest Distro') os = (kwargs.get('os')) or ('Unittest Distro')
    if kwargs.has_key('org_id'):
        org_id = kwargs['org_id']
    else:
        org_id = 'rhn-noc'
    if kwargs.has_key('org_id'):
        org_id = kwargs['org_id']
    else:
        org_id = 'rhn-noc'



    Clone # 1358
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 1079
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 887
    _query_lookup_ks_tree = rhnSQL.Statement('\n select kt.id,\n c.label channel,\n kt.base_path "base-path",\n kt.label,\n kt.boot_image "boot-image",\n ktt.name "kstree-type-name",\n ktt.label "kstree-type-label",\n kit.name "install-type-name",\n kit.label "install-type-label",\n TO_CHAR(kt.last_modified, \'YYYYMMDDHH24MISS\') "last-modified"\n from rhnKickstartableTree kt, \n rhnKSTreeType ktt,\n rhnKSInstallType kit,\n rhnChannel c\n where kt.channel_id = c.id\n and ktt.id = kt.kstree_type\n and kit.id = kt.install_type\n and kt.org_id is NULL\n and kt.label = :kickstart_label\n ') _query_list_channels = rhnSQL.Statement("\n select c.id, c.label, ca.label channel_arch, c.basedir, c.name,\n c.summary, c.description, c.gpg_key_url, c.org_id,\n TO_CHAR(c.last_modified, 'YYYYMMDDHH24MISS') last_modified,\n c.channel_product_id,\n pc.label parent_channel,\n cp.product channel_product,\n cp.version channel_product_version,\n cp.beta channel_product_beta,\n c.receiving_updates,\n ct.label checksum_type\n from rhnChannel c, rhnChannelArch ca, rhnChannel pc, rhnChannelProduct cp,\n rhnChecksumType ct\n where c.id = :channel_id\n and c.channel_arch_id = ca.id\n and c.parent_channel = pc.id (+)\n and c.channel_product_id = cp.id (+)\n and c.checksum_type_id = ct.id (+)\n ")
    def __init__(self, writer, kickstarts):
        h = rhnSQL.prepare(self._query_lookup_ks_tree)
        CachedDumper.__init__(self, writer, statement=h, params=kickstarts)
    def __init__(self, writer, channels):
        h = rhnSQL.prepare(self._query_list_channels)
        CachedDumper.__init__(self, writer, statement=h, params=channels)



    Clone # 1359
    Distance between two fragments = 2
    Clone size = 6
    Source file "./server/handlers/sat/get_handler.py"
    The first line is 35
    Source file "./server/apacheRequest.py"
    The first line is 522
    f = repository.get_function(method) f = repository.get_function(method)
    if f is None:
        raise apacheRequest.UnknownXML(("function '%s' invalid; path_info is %s") % ((method, self.req.path_info)))
    if f is None:
        raise UnknownXML(("function '%s' invalid; path_info is %s") % ((method, self.req.path_info)))
    return f return f



    Clone # 1360
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/configFilesHandler.py"
    The first line is 450
    Source file "./server/configFilesHandler.py"
    The first line is 417
    _query_update_config_file = rhnSQL.Statement('\n update rhnConfigFile\n set latest_config_revision_id = :config_revision_id,\n state_id = :state_id\n where config_channel_id = :config_channel_id\n and config_file_name_id = lookup_config_filename(:path)\n ') _query_update_revision = rhnSQL.Statement('\n update rhnConfigRevision \n set modified = sysdate \n where id = :config_revision_id\n ')
    def _update_config_file(self, file):
        h = rhnSQL.prepare(self._query_update_config_file)
        apply(h.execute, (), file)
    def _update_revision(self, file):
        h = rhnSQL.prepare(self._query_update_revision)
        apply(h.execute, (), file)



    Clone # 1361
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 1675
    Source file "./server/rhnChannel.py"
    The first line is 1452
    c_info = channel_info(channel) c_info = channel_info(channel)
    if not c_info:
        raise rhnFault(40, ("could not find any data on channel '%s'") % (channel))
    if not c_info:
        raise rhnFault(40, ("could not find any data on channel '%s'") % (channel))
    cache_entry = ('blacklist_obsoletes-%s') % (channel) cache_entry = ('%s-%s') % ((cache_prefix, channel))
    ret = rhnCache.get(cache_entry, c_info['last_modified']) ret = rhnCache.get(cache_entry, c_info['last_modified'])



    Clone # 1362
    Distance between two fragments = 3
    Clone size = 5
    Source file "./server/rhnChannel.py"
    The first line is 1557
    Source file "./server/rhnChannel.py"
    The first line is 1452
    c_info = channel_info(channel) c_info = channel_info(channel)
    if not c_info:
        raise rhnFault(40, ("could not find any data on channel '%s'") % (channel))
    if not c_info:
        raise rhnFault(40, ("could not find any data on channel '%s'") % (channel))
    cache_entry = ('list_obsoletes-%s') % (channel) cache_entry = ('%s-%s') % ((cache_prefix, channel))
    ret = rhnCache.get(cache_entry, c_info['last_modified']) ret = rhnCache.get(cache_entry, c_info['last_modified'])



    Clone # 1363
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/rhnSQL/driver_cx_Oracle.py"
    The first line is 512
    Source file "./server/rhnSQL/driver_cx_Oracle.py"
    The first line is 197
    def _get_oracle_error_info(self, error):
        if isinstance(error, cx_Oracle.DatabaseError):
            e = error[0]
            return (e.code, e.message, e.context)
        return str(error)
    def _get_oracle_error_info(self, error):
        if isinstance(error, cx_Oracle.DatabaseError):
            e = error[0]
            return (e.code, e.message, self.sql)
        return str(error)



    Clone # 1364
    Distance between two fragments = 1
    Clone size = 5
    Source file "./common/rhnCache.py"
    The first line is 395
    Source file "./common/rhnCache.py"
    The first line is 379
    def get_file(self, name, modified=None):
        try:
            return self.cache.get_file(name, modified)
        except KeyError:
            return None
    def get(self, name, modified=None):
        try:
            return self.cache.get(name, modified)
        except KeyError:
            return None



    Clone # 1365
    Distance between two fragments = 1
    Clone size = 5
    Source file "./common/rhnApache.py"
    The first line is 262
    Source file "./server/apacheHandler.py"
    The first line is 37
    def timer(last):
        if not last:
            return 0
        log_debug(2, ('Request served in %.2f sec') % (((time.time()) - (last))))
        return 0
    def timer(last):
        if not last:
            return 0
        log_debug(2, ('%.2f sec') % (((time.time()) - (last))))
        return 0



    Clone # 1366
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/importlib/headerSource.py"
    The first line is 75
    Source file "./server/importlib/debPackage.py"
    The first line is 77
    self['path'] = path self['path'] = path
    self['org_id'] = org_id self['org_id'] = org_id
    self['header_start'] = header_start self['header_start'] = None
    self['header_end'] = header_end self['header_end'] = None
    self['last_modified'] = localtime(time.time()) self['last_modified'] = localtime(time.time())



    Clone # 1367
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/action/packages.py"
    The first line is 110
    Source file "./server/action/packages.py"
    The first line is 104
    def update(serverId, actionId):
        h = rhnSQL.prepare(_packageStatement_update)
        h.execute(serverid=serverId, actionid=actionId)
        tmppackages = h.fetchall_dict()
        return handle_action(serverId, actionId, tmppackages)
    def remove(serverId, actionId):
        h = rhnSQL.prepare(_packageStatement_remove)
        h.execute(serverid=serverId, actionid=actionId)
        tmppackages = h.fetchall_dict()
        return handle_action(serverId, actionId, tmppackages)



    Clone # 1368
    Distance between two fragments = 1
    Clone size = 5
    Source file "./server/test/test_leak3.py"
    The first line is 20
    Source file "./server/test/test_leak2.py"
    The first line is 21
    print os.getpid() print os.getpid()
    dbh = connect('rhnuser/rhnuser@webdev') dbh = Connect('rhnuser/rhnuser@webdev')
    h = dbh.prepare('select 1 from dual') h = dbh.prepare('select 1 from dual')
    start = time.time() start = time.time()
    i = 0 i = 0



    Clone # 1369
    Distance between two fragments = 2
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 875
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 795
    if LOWER_LIMIT:
        h = rhnSQL.prepare(self._query_get_kickstartable_trees_by_limits)
        h.execute(channel_id=channel_id, lower_limit=LOWER_LIMIT, upper_limit=UPPER_LIMIT)
    else:
        h = rhnSQL.prepare(self._query_get_kickstartable_trees)
        h.execute(channel_id=channel_id)
    if LOWER_LIMIT:
        h = rhnSQL.prepare(self._query__get_errata_ids_by_limits)
        h.execute(channel_id=channel_id, lower_limit=LOWER_LIMIT, upper_limit=UPPER_LIMIT)
    else:
        h = rhnSQL.prepare(self._query__get_errata_ids)
        h.execute(channel_id=channel_id)



    Clone # 1370
    Distance between two fragments = 0
    Clone size = 5
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 853
    Source file "./satellite_tools/disk_dumper/dumper.py"
    The first line is 795
    if LOWER_LIMIT:
        h = rhnSQL.prepare(self._query__get_errata_ids_by_limits)
        h.execute(channel_id=channel_id, lower_limit=LOWER_LIMIT, upper_limit=UPPER_LIMIT)
    else:
        h = rhnSQL.prepare(self._query__get_errata_ids)
        h.execute(channel_id=channel_id)
    if LOWER_LIMIT:
        h = rhnSQL.prepare(self._query__get_errata_ids_by_limits)
        h.execute(channel_id=channel_id, lower_limit=LOWER_LIMIT, upper_limit=UPPER_LIMIT)
    else:
        h = rhnSQL.prepare(self._query__get_errata_ids)
        h.execute(channel_id=channel_id)



    Clone # 1371
    Distance between two fragments = 2
    Clone size = 5
    Source file "./server/importlib/channelImport.py"
    The first line is 432
    Source file "./server/importlib/channelImport.py"
    The first line is 409
    rhnSQL.initDB('rhnsat/rhnsat@rhnsat') rhnSQL.initDB('rhnsat/rhnsat@rhnsat')
    backend.init() backend.init()
    cfimp = ChannelFamilyImport(batch, backend) dcmimp = DistChannelMapImport(batch, backend)
    cfimp.run() dcmimp.run()
    sys.exit(0) sys.exit(0)



    Clone # 1372
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 430
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 413
    class ChannelErrataDumper(BaseDumper):
        tag_name = 'rhn-channel-errata'
        def dump_subelement(self, data):
            d = _ChannelErratumDumper(self._writer, data)
            d.dump()
    class ChannelSourcePackagesDumper(BaseDumper):
        tag_name = 'source-packages'
        def dump_subelement(self, data):
            d = _ChannelSourcePackageDumper(self._writer, data)
            d.dump()



    Clone # 1373
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 447
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 430
    class DistsDumper(BaseDumper):
        tag_name = 'rhn-dists'
        def dump_subelement(self, data):
            d = _DistDumper(self._writer, data)
            d.dump()
    class ChannelErrataDumper(BaseDumper):
        tag_name = 'rhn-channel-errata'
        def dump_subelement(self, data):
            d = _ChannelErratumDumper(self._writer, data)
            d.dump()



    Clone # 1374
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1044
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 447
    class _ErratumFilesDumper(BaseDumper):
        tag_name = 'rhn-erratum-files'
        def dump_subelement(self, data):
            d = _ErratumFileEntryDumper(self._writer, data)
            d.dump()
    class DistsDumper(BaseDumper):
        tag_name = 'rhn-dists'
        def dump_subelement(self, data):
            d = _DistDumper(self._writer, data)
            d.dump()



    Clone # 1375
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1044
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1438
    class _ErratumFilesDumper(BaseDumper):
        tag_name = 'rhn-erratum-files'
        def dump_subelement(self, data):
            d = _ErratumFileEntryDumper(self._writer, data)
            d.dump()
    class _KickstartFilesDumper(BaseDumper):
        tag_name = 'rhn-kickstart-files'
        def dump_subelement(self, data):
            d = _KickstartFileEntryDumper(self._writer, data)
            d.dump()



    Clone # 1376
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1044
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 430
    class _ErratumFilesDumper(BaseDumper):
        tag_name = 'rhn-erratum-files'
        def dump_subelement(self, data):
            d = _ErratumFileEntryDumper(self._writer, data)
            d.dump()
    class ChannelErrataDumper(BaseDumper):
        tag_name = 'rhn-channel-errata'
        def dump_subelement(self, data):
            d = _ChannelErratumDumper(self._writer, data)
            d.dump()



    Clone # 1377
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1044
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 413
    class _ErratumFilesDumper(BaseDumper):
        tag_name = 'rhn-erratum-files'
        def dump_subelement(self, data):
            d = _ErratumFileEntryDumper(self._writer, data)
            d.dump()
    class ChannelSourcePackagesDumper(BaseDumper):
        tag_name = 'source-packages'
        def dump_subelement(self, data):
            d = _ChannelSourcePackageDumper(self._writer, data)
            d.dump()



    Clone # 1378
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1044
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 847
    class _ErratumFilesDumper(BaseDumper):
        tag_name = 'rhn-erratum-files'
        def dump_subelement(self, data):
            d = _ErratumFileEntryDumper(self._writer, data)
            d.dump()
    class _ChangelogDumper(BaseDumper):
        tag_name = 'rhn-package-changelog'
        def dump_subelement(self, data):
            c = _ChangelogEntryDumper(self._writer, data)
            c.dump()



    Clone # 1379
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1044
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1026
    class _ErratumFilesDumper(BaseDumper):
        tag_name = 'rhn-erratum-files'
        def dump_subelement(self, data):
            d = _ErratumFileEntryDumper(self._writer, data)
            d.dump()
    class _ErratumBuglistDumper(BaseDumper):
        tag_name = 'rhn-erratum-bugs'
        def dump_subelement(self, data):
            d = _ErratumBugDumper(self._writer, data)
            d.dump()



    Clone # 1380
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 447
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1438
    class DistsDumper(BaseDumper):
        tag_name = 'rhn-dists'
        def dump_subelement(self, data):
            d = _DistDumper(self._writer, data)
            d.dump()
    class _KickstartFilesDumper(BaseDumper):
        tag_name = 'rhn-kickstart-files'
        def dump_subelement(self, data):
            d = _KickstartFileEntryDumper(self._writer, data)
            d.dump()



    Clone # 1381
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 447
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 413
    class DistsDumper(BaseDumper):
        tag_name = 'rhn-dists'
        def dump_subelement(self, data):
            d = _DistDumper(self._writer, data)
            d.dump()
    class ChannelSourcePackagesDumper(BaseDumper):
        tag_name = 'source-packages'
        def dump_subelement(self, data):
            d = _ChannelSourcePackageDumper(self._writer, data)
            d.dump()



    Clone # 1382
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 447
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 847
    class DistsDumper(BaseDumper):
        tag_name = 'rhn-dists'
        def dump_subelement(self, data):
            d = _DistDumper(self._writer, data)
            d.dump()
    class _ChangelogDumper(BaseDumper):
        tag_name = 'rhn-package-changelog'
        def dump_subelement(self, data):
            c = _ChangelogEntryDumper(self._writer, data)
            c.dump()



    Clone # 1383
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 447
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1026
    class DistsDumper(BaseDumper):
        tag_name = 'rhn-dists'
        def dump_subelement(self, data):
            d = _DistDumper(self._writer, data)
            d.dump()
    class _ErratumBuglistDumper(BaseDumper):
        tag_name = 'rhn-erratum-bugs'
        def dump_subelement(self, data):
            d = _ErratumBugDumper(self._writer, data)
            d.dump()



    Clone # 1384
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1438
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 430
    class _KickstartFilesDumper(BaseDumper):
        tag_name = 'rhn-kickstart-files'
        def dump_subelement(self, data):
            d = _KickstartFileEntryDumper(self._writer, data)
            d.dump()
    class ChannelErrataDumper(BaseDumper):
        tag_name = 'rhn-channel-errata'
        def dump_subelement(self, data):
            d = _ChannelErratumDumper(self._writer, data)
            d.dump()



    Clone # 1385
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1438
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 413
    class _KickstartFilesDumper(BaseDumper):
        tag_name = 'rhn-kickstart-files'
        def dump_subelement(self, data):
            d = _KickstartFileEntryDumper(self._writer, data)
            d.dump()
    class ChannelSourcePackagesDumper(BaseDumper):
        tag_name = 'source-packages'
        def dump_subelement(self, data):
            d = _ChannelSourcePackageDumper(self._writer, data)
            d.dump()



    Clone # 1386
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1438
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 847
    class _KickstartFilesDumper(BaseDumper):
        tag_name = 'rhn-kickstart-files'
        def dump_subelement(self, data):
            d = _KickstartFileEntryDumper(self._writer, data)
            d.dump()
    class _ChangelogDumper(BaseDumper):
        tag_name = 'rhn-package-changelog'
        def dump_subelement(self, data):
            c = _ChangelogEntryDumper(self._writer, data)
            c.dump()



    Clone # 1387
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1438
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1026
    class _KickstartFilesDumper(BaseDumper):
        tag_name = 'rhn-kickstart-files'
        def dump_subelement(self, data):
            d = _KickstartFileEntryDumper(self._writer, data)
            d.dump()
    class _ErratumBuglistDumper(BaseDumper):
        tag_name = 'rhn-erratum-bugs'
        def dump_subelement(self, data):
            d = _ErratumBugDumper(self._writer, data)
            d.dump()



    Clone # 1388
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 430
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 847
    class ChannelErrataDumper(BaseDumper):
        tag_name = 'rhn-channel-errata'
        def dump_subelement(self, data):
            d = _ChannelErratumDumper(self._writer, data)
            d.dump()
    class _ChangelogDumper(BaseDumper):
        tag_name = 'rhn-package-changelog'
        def dump_subelement(self, data):
            c = _ChangelogEntryDumper(self._writer, data)
            c.dump()



    Clone # 1389
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 413
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 847
    class ChannelSourcePackagesDumper(BaseDumper):
        tag_name = 'source-packages'
        def dump_subelement(self, data):
            d = _ChannelSourcePackageDumper(self._writer, data)
            d.dump()
    class _ChangelogDumper(BaseDumper):
        tag_name = 'rhn-package-changelog'
        def dump_subelement(self, data):
            c = _ChangelogEntryDumper(self._writer, data)
            c.dump()



    Clone # 1390
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 430
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1026
    class ChannelErrataDumper(BaseDumper):
        tag_name = 'rhn-channel-errata'
        def dump_subelement(self, data):
            d = _ChannelErratumDumper(self._writer, data)
            d.dump()
    class _ErratumBuglistDumper(BaseDumper):
        tag_name = 'rhn-erratum-bugs'
        def dump_subelement(self, data):
            d = _ErratumBugDumper(self._writer, data)
            d.dump()



    Clone # 1391
    Distance between two fragments = 3
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 413
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1026
    class ChannelSourcePackagesDumper(BaseDumper):
        tag_name = 'source-packages'
        def dump_subelement(self, data):
            d = _ChannelSourcePackageDumper(self._writer, data)
            d.dump()
    class _ErratumBuglistDumper(BaseDumper):
        tag_name = 'rhn-erratum-bugs'
        def dump_subelement(self, data):
            d = _ErratumBugDumper(self._writer, data)
            d.dump()



    Clone # 1392
    Distance between two fragments = 4
    Clone size = 5
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 847
    Source file "./satellite_tools/exporter/exportLib.py"
    The first line is 1026
    class _ChangelogDumper(BaseDumper):
        tag_name = 'rhn-package-changelog'
        def dump_subelement(self, data):
            c = _ChangelogEntryDumper(self._writer, data)
            c.dump()
    class _ErratumBuglistDumper(BaseDumper):
        tag_name = 'rhn-erratum-bugs'
        def dump_subelement(self, data):
            d = _ErratumBugDumper(self._writer, data)
            d.dump()



    Clone Digger is aimed to find software clones in Python and Java programs. It is provided under the GPL license and can be downloaded from the site http://clonedigger.sourceforge.net