Autonomous cars have become increasingly popular in the last decade because of their numerous benefits, such as lower travel time, increased safety, and improved fuel economy. Many car manufacturing companies and tech giants are working on this technology to make fully autonomous automobiles or strengthen their existing driver-less cars. These cars use very complex, advanced, and sophisticated hardware technologies. However, the software is an equally important feature because it must operate all functions seamlessly while working in sync with other vehicle components. The software must analyze a large amount of data to make quick real-time decisions, so any vulnerabilities or bugs can be a severe problem to the vehicle and the passengers riding in it. Many researchers have proposed various software defect prediction schemes for different projects and applications, but most of them have focused on specific software issues and excluded others. Thus, their methods cannot be applied to the software of autonomous cars. In this paper, we propose an improved Artificial Neural Network (ANN) model, called Dropout-Artificial Neural Network (D-ANN), to solve this problem of defect prediction in autonomous cars. This inclusive model can consider all the parameters simultaneously for effective bugs prediction. The proposed model can be used for the software of any autonomous cars, and it is trained and evaluated using standard methods. The results obtained show that the proposed model predicts software defects with higher accuracy than other models.