Software reuse has long being recognized as an important area amongst the software development companies in improving productivity and quality of their product. Reusing of early-stage software artifacts such as UML state machine diagrams increases the benefit reaped from reuse because it allows the reuse of related later-stage artifacts. Among the reuse task, matching and retrieval of similar artifacts from repository are considered the most important task. However, the space for searching the most similar artifacts from the repository can be large, and heuristics algorithm can efficiently be used to search large repositories. Existing work in the literature are based on graph matching using Genetic Algorithm (GA) and Particle Swamp Optimization (PSO). Different to the existing works, this paper presents the use of Finite State Machine and Cuckoo Search Algorithm (CSA) to match and retrieve state machine diagrams from repository. Experimental results show that our method is effective in retrieving the most similar state machine diagrams from repository for a given query.