Abstract-With the popularization of software version control system and defect tracking tools, large amounts of software development data is recorded. How to effectively use these data to improve the quality of software development, has become a hot topic in recent years. Software defect prediction technology can take full advantage of the historical data to build predictive models and automatically detect defective modules for efficient software test to improve the quality of a software system. But the class-imbalanced data makes the prediction model classifying a modules as a defective-free one easily, while the misclassification of defective modules generally incurs much higher cost risk than the misclassification of defective-free ones. To resolve this problem, we propose a cost-sensitive software defect prediction method using dictionary learning. It iteratively optimizes the classifier parameters and the dictionary atoms, to ensure that the extracted features (sparse representation) are optimal for the trained classifier; Moreover, we take the different misclassification costs into account, increasing the punishment on misclassification defective modules in the procedure of dictionary learning, making classification inclining to classify a module as a defective one. Experimental results on the 10 classimbalanced data sets of NASA show that our method is more effective than other methods.