Programming education has become an essential skill for the digital generation. However, it presents a unique set of challenges that can be difficult for beginners. Educational data mining (EDM) has been increasingly utilized in programming education to enhance learning outcomes and understand students' learning behavior. By collecting and analyzing data from various sources, such as students' learning activities, interactions with learning resources, and assessment results, EDM can provide valuable insights into students' learning performance and potential areas for improvement. This paper presents a systematic literature review of recent literature (last five years) and reports on state of the art and trends in using EDM for student performance prediction in programming courses. It provides a comprehensive analysis of the input data used in previous work, exploring the different types of datasets used and the features that affect student performance. In addition, it addresses the predictive objectives and target variables for performance prediction in programming courses. On the other hand, it explores the most common prediction approaches, data pre-processing procedures, cross-validation methods, and evaluation metrics used to describe the performance of prediction algorithms. In addition, we discuss the limitations and challenges of various prediction approaches and provide valuable insights and directions for future research.