Residual based adaptive FreeFem++ code of the Laplace equation (Code is running fine but good results not coming)

Dear all experts, i am trying to compute data oscillations of poisson equation in FreeFem++. Here, is the formula>


( My doubt is how to compute osc^2(f, \tau_h) in FreeFem++ ?? and does last term of (3.2) contains only intalledges term??).

I have used adaptive code of poisson equation of the FreeFem++ tutorial. Here, is the code>
Poisson_adapt_my_code.edp (4.7 KB)
( I have rewritten the code to compute the errors and indicator)
I have to use the following adaptive algorithm>

Is the above code following the above adaptive algorithm??. If not, then how to modify the code to follow the above adaptive algorithm.

I am very grateful if i get any suggestion regarding this. Thanks in advance.

Dear all experts and respected professors, i have done the code still good results is not coming.
Here, is my code>( latest code of Adaptive Poisson DG)
Poisson_adapt_refine.edp (5.3 KB)

I need results as in the following table>

I am trying to verify the results of the first Example of the following paper:
Numerical Methods Partial - 2019 - Cui - A posteriori error estimate for discontinuous Galerkin finite element method on.pdf (1.7 MB)

I have used the following tutorial code:

Any help is this regard will be useful for me. I am not getting why good results not coming as in the above table.
Thanks in advance!.