Code duplication is considered as bad practice that complicates the maintenance and evolution of software. Detecting duplicated code is a difficult task because of the large amount of data to be checked and the fact that a priori it is unknown which code part has been duplicated. In this paper, we present a tool called DUPLOC that supports code duplication detection in a visual and exploratory or an automatic way. 1 Why we need to deal with Duplicated Code Duplicated code is a phenomenon that occurs frequently in large systems. Although duplication can have its justifications, it is considered bad practice. The reasons programmers duplicate code are multi-fold [Bak95] : making a copy of a code fragment is simpler and faster than writing the code from