Software systems have significantly grown and increased its complexity to unprecedented levels. Because of these characteristics, preventing software faults is extremely difficult. Therefore, automatic forecasting of errors is required, and it might assist developers deploy with limited resources more efficiently. Different methods on identifying and correcting these flaws at low cost were offered, which, significantly improves the effectiveness of the techniques. This work includes 4 steps to offer a new SDP model. The input data is preprocessed and from that, the “statistical features, raw features, higher order statistical features and proposed MI and entropy features” are extracted. Then, feature selection is done and appropriate features are elected via chi-square scheme. The elected features are detected via LSTM and DBN to predict the defects. The weights of LSTM and DBN are optimized by Opposite Behavior Learning Integrated SDO (OBLI-SDO) algorithm. Finally, examination is done to prove the betterment of OBLI-SDO.