CloneSet530


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
46230.959additive_expression
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14656
E:/TSE/Projects-CloneDR/sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/tab/TriggerDetailsTab.java
24538
E:/TSE/Projects-CloneDR/sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/tab/TriggerSourceTab.java
Next
Last
Clone Instance
1
Line Count
46
Source Line
56
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/tab/TriggerDetailsTab.java

"select condition_timing AS trigger_time, " + "       v.manip AS triggering_event, " + "       action_orientation AS granularity, " + "       event_object_table AS table_name " + "FROM information_schema.triggers t, " + "(select  trigger_schema, " + "        trigger_name, " + "        rtrim( " + "            max(case when pos=0 then manip else \'\' end)|| " + "            max(case when pos=1 then manip else \'\' end)|| " + "            max(case when pos=2 then manip else \'\' end), \' or \' " + "            ) as manip " + "from ( " + "    select a.trigger_schema, " + "           a.trigger_name, " + "           a.event_manipulation||\' or \' as manip, " + "           d.cnt, " + "           a.rnk as pos " + "    from (  select trigger_name, " + "                   trigger_schema, " + "                   event_manipulation, " + "                   (select count(distinct is1.event_manipulation) " + "                    from information_schema.triggers is1 " + "                    where is2.event_manipulation < is1.event_manipulation) as rnk " + "            from information_schema.triggers is2 " + "          ) a, " + "         (select trigger_schema, trigger_name, count(event_manipulation) as cnt " + "          from ( " + "                select trigger_schema, " + "                       trigger_name, " + "                       event_manipulation, " + "                       (select count(distinct is3.event_manipulation) " + "                        from information_schema.triggers is3 " + "                        where is4.event_manipulation < is3.event_manipulation) as rnk " + "                from information_schema.triggers is4 " + "                ) y " + "          group by trigger_schema, trigger_name) d " + "    where d.trigger_name = a.trigger_name " + "    and d.trigger_schema = a.trigger_schema " + ") x " + "group by trigger_schema, trigger_name " + "order by 1) v " + "where t.trigger_schema = v.trigger_schema " + "and t.trigger_name = v.trigger_name " + "and t.trigger_schema = ? " + "and t.trigger_name = ? "


First
Previous
Clone Instance
2
Line Count
45
Source Line
38
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/tab/TriggerSourceTab.java

"select \'create trigger \' || t.trigger_name || \' \' || condition_timing " + "|| \' \' || v.manip || \' on \' || event_object_table " + "|| \' for each \' || action_orientation || \' \' || action_statement as trigdef " + "FROM information_schema.triggers t, " + "(select  trigger_schema, " + "        trigger_name, " + "        rtrim( " + "            max(case when pos=0 then manip else \'\' end)|| " + "            max(case when pos=1 then manip else \'\' end)|| " + "            max(case when pos=2 then manip else \'\' end), \' or \' " + "            ) as manip " + "from ( " + "    select a.trigger_schema, " + "           a.trigger_name, " + "           a.event_manipulation||\' or \' as manip, " + "           d.cnt, " + "           a.rnk as pos " + "    from (  select trigger_name, " + "                   trigger_schema, " + "                   event_manipulation, " + "                   (select count(distinct is1.event_manipulation) " + "                    from information_schema.triggers is1 " + "                    where is2.event_manipulation < is1.event_manipulation) as rnk " + "            from information_schema.triggers is2 " + "          ) a, " + "         (select trigger_schema, trigger_name, count(event_manipulation) as cnt " + "          from ( " + "                select trigger_schema, " + "                       trigger_name, " + "                       event_manipulation, " + "                       (select count(distinct is3.event_manipulation) " + "                        from information_schema.triggers is3 " + "                        where is4.event_manipulation < is3.event_manipulation) as rnk " + "                from information_schema.triggers is4 " + "                ) y " + "          group by trigger_schema, trigger_name) d " + "    where d.trigger_name = a.trigger_name " + "    and d.trigger_schema = a.trigger_schema " + ") x " + "group by trigger_schema, trigger_name " + "order by 1) v " + "where t.trigger_schema = v.trigger_schema " + "and t.trigger_name = v.trigger_name " + "and t.trigger_schema = ? " + "and t.trigger_name = ? "


Clone AbstractionParameter Count: 3Parameter Bindings

 [[#variable1cedd360]] +  [[#variable1cede140]] +  [[#variable1cedd3c0]] + "FROM information_schema.triggers t, " + "(select  trigger_schema, " + "        trigger_name, " + "        rtrim( " + "            max(case when pos=0 then manip else \'\' end)|| " + "            max(case when pos=1 then manip else \'\' end)|| " + "            max(case when pos=2 then manip else \'\' end), \' or \' " + "            ) as manip " + "from ( " + "    select a.trigger_schema, " + "           a.trigger_name, " + "           a.event_manipulation||\' or \' as manip, " + "           d.cnt, " + "           a.rnk as pos " + "    from (  select trigger_name, " + "                   trigger_schema, " + "                   event_manipulation, " + "                   (select count(distinct is1.event_manipulation) " + "                    from information_schema.triggers is1 " + "                    where is2.event_manipulation < is1.event_manipulation) as rnk " + "            from information_schema.triggers is2 " + "          ) a, " + "         (select trigger_schema, trigger_name, count(event_manipulation) as cnt " + "          from ( " + "                select trigger_schema, " + "                       trigger_name, " + "                       event_manipulation, " + "                       (select count(distinct is3.event_manipulation) " + "                        from information_schema.triggers is3 " + "                        where is4.event_manipulation < is3.event_manipulation) as rnk " + "                from information_schema.triggers is4 " + "                ) y " + "          group by trigger_schema, trigger_name) d " + "    where d.trigger_name = a.trigger_name " + "    and d.trigger_schema = a.trigger_schema " + ") x " + "group by trigger_schema, trigger_name " + "order by 1) v " + "where t.trigger_schema = v.trigger_schema " + "and t.trigger_name = v.trigger_name " + "and t.trigger_schema = ? " + "and t.trigger_name = ? "
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1cedd360]]
"select condition_timing AS trigger_time, " + "       v.manip AS triggering_event, " 
12[[#1cedd360]]
"select \'create trigger \' || t.trigger_name || \' \' || condition_timing " 
21[[#1cede140]]
"       action_orientation AS granularity, " 
22[[#1cede140]]
"|| \' \' || v.manip || \' on \' || event_object_table " 
31[[#1cedd3c0]]
"       event_object_table AS table_name " 
32[[#1cedd3c0]]
"|| \' for each \' || action_orientation || \' \' || action_statement as trigdef "