Section 512(2) in The Code of Criminal Procedure, 1989 (1933 A. D.)
(2)Record of evidence when offender unknown. - If it appears that an offence punishable with death or imprisonment for life has been committed by some person or persons unknown, the High Court may direct that any [Judicial Magistrate] [Substituted by Act XL of 1966 for 'Magistrate'.] of the first class shall hold an inquiry and examine any witnesses who can give evidence concerning the offence. Any depositions so taken may be given in evidence against any person who is subsequently accused of the offence, if the deponent is dead or incapable of giving evidence or beyond the limits of Jammu and Kashmir State.