CloneSet46


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
36230.973file_input_element_list[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
136171
Bio/Enzyme/__init__.py
236584
Bio/UniGene/__init__.py
Clone Instance
1
Line Count
36
Source Line
171
Source File
Bio/Enzyme/__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) 
         


Clone Instance
2
Line Count
36
Source Line
584
Source File
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.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) 
         


Clone AbstractionParameter Count: 3Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#77b85b20]]
unigene_record 
12[[#77b85b20]]
enzyme_record 
21[[#77b85b00]]
"" 
22[[#77b85b00]]
string 
31[[#77b85aa0]]
lines 
32[[#77b85aa0]]
lines,""