Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
8 | 2 | 3 | 0.980 | compound_stmt |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 8 | 115 | Bio/NMR/xpktools.py |
2 | 8 | 124 | Bio/NMR/xpktools.py |
| ||||
def _try_open_read(fn): # Try to open a file for reading. Exit on IOError try : infile = open(fn,"r") except IOError,e: print "file",fn,"could not be opened for reading - quitting." sys.exit(0) return infile |
| ||||
def _try_open_write(fn): # Try to open a file for writing. Exit on IOError try : infile = open(fn,"w") except IOError,e: print "file",fn,"could not be opened for writing - quitting." sys.exit(0) return infile |
| |||
def [[#variable2ecdabe0]](fn): # Try to open a file for writing. Exit on IOError # Try to open a file for reading. Exit on IOError try : infile = open(fn, [[#variable2ecdab40]]) except IOError,e: print "file",fn, [[#variable2ecdaac0]] sys.exit(0) return infile |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#2ecdabe0]] | _try_open_write |
1 | 2 | [[#2ecdabe0]] | _try_open_read |
2 | 1 | [[#2ecdab40]] | "w" |
2 | 2 | [[#2ecdab40]] | "r" |
3 | 1 | [[#2ecdaac0]] | "could not be opened for writing - quitting." |
3 | 2 | [[#2ecdaac0]] | "could not be opened for reading - quitting." |