I'm not familiar with the details of NJ Tenant Landlord law, but as a general rule, renters have what is called a "right to quiet enjoyment." In theory, a landlord could be found guilty of trespassing on his own property, and a renter has, up to a point, the right to permit or deny access to the leased premises. The lease would clearly outline the terms and conditions under which a landlord could enter without the tenant's permission (typically under emergency circumstances) and under which the landlord might grant access to the leased property to others.
Okay, there's the pretext for entry. Then one says he things the resident has a gun, giving the cop probable cause to enter-- and the door was already open anyway. Add to this a DA who is looking for advancement and you've got this abomination.