The document presents an approach to detect code clones using abstract syntax trees (AST). Code cloning occurs when code is duplicated through copy-paste, increasing maintenance costs and the risk of bugs. The proposed approach first parses code into an AST, then applies algorithms to find identical and near-identical subtrees, code sequences, and more complex clones. Detecting clones using the AST approach allows identifying exact and near-miss clones in a way that is simpler than previous techniques but still powerful. Benefits of detecting and removing clones include reduced defects, maintenance costs, and improved code quality.