Arrows use two separate fields to track how long they have been in the ground. The one which is used to remove the effects is not stored in NBT and therefore reset when loading the arrow again.
- Give yourself a tipped arrow with effects
- Shoot it in the ground
- Wait 30 seconds
→ The arrow loses its effects, additionally /entitydata should show a life value above 600
- Repeat steps 1 and 2 but this time wait less than 30 seconds and reopen the world
- Inspect the NBT data of the arrow
→ It shows a life value higher than 600 but the arrow still has its effects
Based on 1.12 decompiled using MCP 9.40 PRE 1
The net.minecraft.entity.projectile.EntityArrow has two fields which both track how long the arrow is stuck in the ground. ticksInGround is used to remove the arrow after one minute and is written to NBT (life tag). timeInGround is used to remove the effects but is not written to NBT.
Since both fields are apparently tracking the same thing timeInGround should probably be removed and the life tag should be renamed to ticksInGround.
Additionally there are some situations in which ticksInGround is reset (methods EntityArrow.setThrowableHeading(double, double, double, float, float) and EntityArrow.setVelocity(double, double, double)) where inGround is not necessarily false.