Plagiarism in connection with computer programming education is a serious problem. This problem is common to many universities around the world, and the University of Oslo (UoO) makes no exception. The major problem is that students plagiarize homework programming assignments written by fellow students. To deal with this situation plagiarism detection software has been developed to assess the similarity between program listings. Such software is exposed to the daunting task of minimizing the numbers of false negatives and false positives at the same time, i.e. finding the highest number of copies while avoiding those which are not. UoO uses a distributed system for delivering such assignments, called Joly. This system compares program listings by using an attribute counting metric. This is a very general metric and here I investigate whether a less general-purpose metric tuned to the particularities of programming code may perform better than the one currently being used in Joly. To this endI have developed two new structure based similarity measures which quantify the structural similarity between abstract syntax trees (AST). More specifically, I have (i) modified the standard AST representation to ease the comparison between trees, (ii) identified the most common cheating strategies employed by students, (iii) assessed the changes these strategies have on the AST structures, (iv) developed and implemented two new AST similarity measuring algorithms, ASTSIM-NWand ASTSIM-LCS, focused on uncovering plagiarism based on the most common cheating strategies leaving the most distinct AST footprints, and (v) compared the performance of the two new algorithms relative to the one being currently used in Joly. Even though the test results need to be interpreted with caution, the combined use of the two new algorithms appears to perform better in terms of false negatives and false positives. This suggests that they should be considered as candidates for complementing the current attribute counting approach in Joly and thus be exposed to more extensive testing and polishing.