automated mining code selection