Creating error-free software artifacts is essential to increase software quality and potential re-usability. However, testing software artifacts to find defects and fix them is time consuming and costly, thus predicting the most error-prone software components can optimize the testing process by focusing testing resources on those components to save time and money. Much software defect prediction research has focused on higher granularity, e.g., file and package levels, and fewer have focused on the method level. In this paper, software defect prediction will be performed on highly imbalanced method-level datasets extracted from 23 open source Java projects. Eight ensemble learning algorithms will be applied to the datasets: Ada-Boost, Bagging, Gradient boost, Random Forest, Random Under sampling Boost, Easy Ensemble, Balanced Bagging and Balanced Random Forest. The results showed that the Balanced Random Forest classifier achieved the best results regarding recall and roc_auc values.