Properly extract from Scala and Java sources.