Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
6 | 5 | 3 | 0.951 | compound_stmt |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 7 | 29 | BioSQL/DBUtils.py |
2 | 6 | 55 | BioSQL/DBUtils.py |
3 | 6 | 62 | BioSQL/DBUtils.py |
4 | 6 | 86 | BioSQL/DBUtils.py |
5 | 6 | 93 | BioSQL/DBUtils.py |
| ||||
def last_id(self,cursor,table): # XXX: Unsafe without transactions isolation table = self.tname(table) sql = "select max(%s_id) from %s"%(table,table) cursor.execute(sql) rv = cursor.fetchone( ) return rv[0] |
| ||||
def next_id(self,cursor,table): table = self.tname(table) sql = "select nextval('%s_pk_seq')"%table cursor.execute(sql) rv = cursor.fetchone( ) return rv[0] |
| ||||
def last_id(self,cursor,table): table = self.tname(table) sql = "select currval('%s_pk_seq')"%table cursor.execute(sql) rv = cursor.fetchone( ) return rv[0] |
| ||||
def next_id(self,cursor,table): table = self.tname(table) sql = "select nextval('%s_pk_seq')"%table cursor.execute(sql) rv = cursor.fetchone( ) return rv[0] |
| ||||
def last_id(self,cursor,table): table = self.tname(table) sql = "select currval('%s_pk_seq')"%table cursor.execute(sql) rv = cursor.fetchone( ) return rv[0] |
| |||
def [[#variable7c341fc0]](self,cursor,table): # XXX: Unsafe without transactions isolation table = self.tname(table) sql = [[#variable7c3418e0]]% [[#variable7c341fe0]] cursor.execute(sql) rv = cursor.fetchone( ) return rv[0] |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#7c341fc0]] | last_id |
1 | 2 | [[#7c341fc0]] | next_id |
1 | 3 | [[#7c341fc0]] | last_id |
1 | 4 | [[#7c341fc0]] | next_id |
1 | 5 | [[#7c341fc0]] | last_id |
2 | 1 | [[#7c3418e0]] | "select currval('%s_pk_seq')" |
2 | 2 | [[#7c3418e0]] | "select nextval('%s_pk_seq')" |
2 | 3 | [[#7c3418e0]] | "select max(%s_id) from %s" |
2 | 4 | [[#7c3418e0]] | "select nextval('%s_pk_seq')" |
2 | 5 | [[#7c3418e0]] | "select currval('%s_pk_seq')" |
3 | 1 | [[#7c341fe0]] | table |
3 | 2 | [[#7c341fe0]] | table |
3 | 3 | [[#7c341fe0]] | (table,table) |
3 | 4 | [[#7c341fe0]] | table |
3 | 5 | [[#7c341fe0]] | table |