Court frees 4 in murder case, blames police for “shoddy” probe