question: private Map replaceMapKey ( Map attributes , Set attributeNames ) { if ( attributeNames != null ) { Iterator iter = attributeNames . iterator ( ) ; while ( iter . hasNext ( ) ) { String attrName = ( String ) iter . next ( ) ; String attrNameLower = attrName . toLowerCase ( ) ; if ( attributes . containsKey ( attrNameLower ) ) { Object attrValue = attributes . get ( attrNameLower ) ; attributes . remove ( attrNameLower ) ; attributes . put ( attrName , attrValue ) ; } } } return attributes ; }
target:  Method that replace the map key with key found set