Problem statement: Course instructors are facing serious problems in dealing with students who plagiarize programs especially when the number of students in the course is high. Among the proposed approach to handle this problem is by using automatic detection of plagiarism in programming projects. Preventive action is required rather than curing the problem so that programming students get the right message from the beginning. Approach: To address this problem, a surveillance system was proposed to record every programming activity. It is developed in an integrated development environment so that programming activity profile in Java format is created when students are developing their Java program. A non-intrusive and non-experimental setting approach was applied in which hidden data collection is conducted to observe students' behavior in natural programming setting. Experimental study effect i.e., Hawthorne effect and effect of expectation on subject behavior was exploited as prevention on plagiarism. Surveillance system produces two file types: Activity log to keep programming activity log information and Backup file to save the program writing record. Results: The proposed programming activity surveillance system, DwiCoder presented a programming activity report at the end of each programming session. Students can assess their own progress in developing a program in these three activities: Compilation, execution and modification. The report was presented in a simple and meaningful way to encourage student spend their own time in programming activity. Conclusion: By using DwiCoder, student's programming activity is continuously monitored and their behavior is under control. This system provides an effective prevention method in tackling plagiarism.