Test-Driven Reuse: Improving the Selection of Semantically Relevant Code