remove findbugs warning and set creation
removed warnings
removed unnecessary copy of set
simplified code
generalized setLeaves
reduced set creation
simplified code
refactored common code in ConstantExtractor