Abstract:Clustering analysis oriented to software defect data is dividing different software defect data to different clusters according to some criterion. The result of clustering is that defect data in the same cluster is similar while defect data in different clusters is different. It is significant to find the distribution law of software defect make testing scheme and optimize testing process. Due to that the clustering results of K-Means is dependent on distribution of samples, a data dimensionality reduction method based on PSO is proposed. Simulation experiment shows that the clustering accuracy and quality are improved to some extent.