Transforming Legacy Systems into Software Product Lines