Migrating legacy software systems towards Service-Oriented Architectures (SOA) requires legacy code to be reused in services. Legacy code being suited to implement a given service may be scattered across a system and therefore, may be hard to find. This thesis presents an approach combining dynamic analysis and data mining techniques to identify legacy code able to implement services. Dynamic analysis was used to simulate the execution of business processes on a legacy system and tracing what code is executed during which step of a process. Data mining techniques were used to identify cohesive code that may be suited to implement services that support business processes. By using various clustering approaches as well as link analysis approaches, promising results with precision values up to 73% and recall values up to 95% were achieved.