Assessing the Quality and Security of AI-Generated Code: A Quantitative Analysis