Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
36 | 2 | 3 | 0.973 | file_input_element_list[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 36 | 171 | Bio/Enzyme/__init__.py |
2 | 36 | 584 | Bio/UniGene/__init__.py |
| ||||
class RecordParser(AbstractParser): def __init__(self): self._scanner = _Scanner( ) self._consumer = _RecordConsumer( ) def parse(self,handle): if isinstance(handle,File.UndoHandle): uhandle = handle else: uhandle = File.UndoHandle(handle) self._scanner.feed(uhandle,self._consumer) return self._consumer.enzyme_record class Iterator: def __init__(self,handle,parser = None): self._uhandle = File.UndoHandle(handle) def next(self): self._parser = RecordParser( ) lines = [ ] while 1: line = self._uhandle.readline( ) if not line: break if line[ :2]=="//": break lines.append(line) if not lines: return None lines.append("//") data = string.join(lines,"") if self._parser is not None: return self._parser.parse(File.StringHandle(data)) return data def __iter__(self): return iter(self.next,None) |
| ||||
class RecordParser(AbstractParser): def __init__(self): self._scanner = _Scanner( ) self._consumer = _RecordConsumer( ) def parse(self,handle): if isinstance(handle,File.UndoHandle): uhandle = handle else: uhandle = File.UndoHandle(handle) self._scanner.feed(uhandle,self._consumer) return self._consumer.unigene_record class Iterator: def __init__(self,handle,parser = None): self._uhandle = File.UndoHandle(handle) def next(self): self._parser = RecordParser( ) lines = [ ] while 1: line = self._uhandle.readline( ) if not line: break if line[ :2]=="//": break lines.append(line) if not lines: return None lines.append("//") data = "".join(lines) if self._parser is not None: return self._parser.parse(File.StringHandle(data)) return data def __iter__(self): return iter(self.next,None) |
| |||
class RecordParser(AbstractParser): def __init__(self): self._scanner = _Scanner( ) self._consumer = _RecordConsumer( ) def parse(self,handle): if isinstance(handle,File.UndoHandle): uhandle = handle else: uhandle = File.UndoHandle(handle) self._scanner.feed(uhandle,self._consumer) return self._consumer. [[#variable77b85b20]] class Iterator: def __init__(self,handle,parser = None): self._uhandle = File.UndoHandle(handle) def next(self): self._parser = RecordParser( ) lines = [ ] while 1: line = self._uhandle.readline( ) if not line: break if line[ :2]=="//": break lines.append(line) if not lines: return None lines.append("//") data = [[#variable77b85b00]].join( [[#variable77b85aa0]]) if self._parser is not None: return self._parser.parse(File.StringHandle(data)) return data def __iter__(self): return iter(self.next,None) |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#77b85b20]] | unigene_record |
1 | 2 | [[#77b85b20]] | enzyme_record |
2 | 1 | [[#77b85b00]] | "" |
2 | 2 | [[#77b85b00]] | string |
3 | 1 | [[#77b85aa0]] | lines |
3 | 2 | [[#77b85aa0]] | lines,"" |