Marco,
With your test procedure I also get the correct number of hints.
So, I went back to my code and copied the procedure from the package into a stored procedure, kept the structure but removed identifying names and I get only one hint. Please see below
CREATE OR REPLACE PROCEDURE my_proc(v_one IN VARCHAR2,
v_two IN VARCHAR2)
IS
row_count integer;
cursor c_one is
select 1
from dual;
one_rcd c_one%rowtype;
cursor c_two( l_one CHAR, l_two char ) is
select 2
from dual
WHERE l_one = l_one
AND l_two = l_two;
two_rcd c_two%rowtype;
cursor c_three is
select *
from dual;
three_rcd c_three%rowtype;
BEGIN
open c_one;
-- process each
loop
FETCH c_one
INTO one_rcd;
EXIT WHEN(c_one%NOTFOUND);
-- a comment
insert into t_one
fields(f1)
select 'asdf'
from dual;
row_count := sql%rowcount;
-- another comment
update t_one
set f1 = 0;
row_count := sql%rowcount;
-- yet again a comment
open c_two( v_one, v_two);
loop
FETCH c_two
INTO two_rcd;
EXIT WHEN(c_two%NOTFOUND);
update t_one
set f1 = 4;
row_count := sql%rowcount;
if row_count = 0 -- comment here too
then
insert into t_one
fields(f1
)
values(6);
end if;
end loop; -- comment
close c_two;
end loop; -- getting each
close c_one;
-- not the last comment
open c_three;
loop
FETCH c_three
INTO three_rcd;
EXIT WHEN(c_three%NOTFOUND);
-- update tbl
update t_one
set f1 = 9;
row_count := sql%rowcount;
end loop; -- another loop ended
close c_three;
END my_proc;
[/code]