Two mostly same codebase , how can i merge them appropiately?
<p>First of all, this topic is not about version control systems. We use version controlling :) but it is off-topic for now. </p>

<p>We had kind of a medium project written in Java. Later, we need something pretty much identical but in JavaFX platform. So instead of writing from scratch, we used our previously codebase and changed necessary parts to make it run on JavaFX. It wasn't a simple task, i dont suggest it if it is not the only way.... But it is done anyway.</p>

<p>My problem is, now we have two seperate code-bases that are %80 - %90 identical, and both are in active development. So when we add a new feature/bugfix to one, another needs to be fixed. </p>

<p>How can i refactor those projects that identical parts can be managed from one place. And also i need to loosely couple identical - different parts.</p>

<p>Thanks.</p>
