Throughout the software lifecycle, a huge amount of knowledge is accumulated around the source code. In our work, we focus on agile software requirements, more specifically on user stories, and on issues and merge requests of the version control platforms, opened for implementing user stories. In this paper, we present a method that leverages the use of this knowledge to guide an SPL migration. In addition to user stories and the source code itself, we exploit domain ontologies to enrich and better organize this knowledge. We consider merge requests in version control systems as the hub between user stories (requirements) and the source code (implementation). In this work, we aim to synthesize feature models by combining several approaches. Natural language processing and clustering of user stories are used to identify features (NLP step). Formal concept analysis is used to hierarchically classify them (FCA step). Logical rules generated by analyzing the results of NLP and FCA steps are used to refine feature constraints. We implemented and evaluated this method on a dataset from our industrial partner. The obtained results showed the efficiency of our method in properly synthesizing feature models towards an SPL migration of our partner's code base.