N.Y. Criminal Procedure Law § 170.40
1. An information, a simplified traffic information, a prosecutor's information or a misdemeanor complaint, or any count thereof, may be dismissed in the interest of justice, as provided in paragraph (g) of subdivision one of section 170.30 when, even though there may be no basis for dismissal as a matter of law upon any ground specified in paragraphs (a) through (f) of said subdivision one of section 170.30, such dismissal is required as a matter of judicial discretion by the existence of some compelling factor, consideration or circumstance clearly demonstrating that conviction or prosecution of the defendant upon such accusatory instrument or count would constitute or result in injustice. In determining whether such compelling factor, consideration, or circumstance exists, the court must, to the extent applicable, examine and consider, individually and collectively, the following: