The LCS (Longest Common Subsequence) algorithm is a well-known algorithm that finds the longest subsequence from two different strings while preserving the relative order between the characters that make up the strings. When migrating from source code to Software Product Line Engineering (SPLE), the process of identifying commonality and variability is a crucial step and many studies have applied the LCS algorithm for this process, but this algorithm can be applied only to two sources although the cases of three or more sources are common. This study proposes a method that extracts common and variable code lines from three or more sources. The proposed method consists of the preprocessing phase that divides sources into sections by reflecting the characteristics of their programming languages, and the phase for applying the LCS algorithm. To evaluate the proposed method, we applied it to ArgoUML-SPL and compared the result with the original platform of ArgoUML-SPL, which confirmed that common and variable code lines were effectively identified.