question: private void captureDifferentString ( String oldName , String newName , String appName , Map < String , String > map , String defaultValue ) { Reject . ifNull ( appName ) ; Reject . ifNull ( map ) ; if ( oldName == null && newName == null ) { map . put ( appName , defaultValue ) ; } else if ( newName != null && ! newName . equals ( oldName ) ) { map . put ( appName , newName ) ; } }
target:  Adds entries to the passed in map, using the supplied appName as the key. The default value will be used if both provided old and new names are null. The value inserted will be the newName value if it differs from the oldName value. No changes will be made to the map if the old and new names are equal.