add scala and java collections feature extract logic