Buggy code:
@ Slf4j @ Service public class CloudResourceMatcherService { @ Resource private CloudImageService cloudImageService ; @ Resource private CloudService cloudService ; @ Getter @ Setter public static class MatchableTemplates { private Map < String , NodeTemplate > computeTemplates = Maps . newHashMap ( ) ; private Map < String , NodeTemplate > networkTemplates = Maps . newHashMap ( ) ; private Map < String , NodeTemplate > storageTemplates = Maps . newHashMap ( ) ; } public CloudResourceMatcherService . MatchableTemplates getMatchableTemplates ( Topology topology , Map < String , IndexedNodeType > types ) { Map < String , NodeTemplate > allNodeTemplates = topology . getNodeTemplates ( ) ; CloudResourceMatcherService . MatchableTemplates matchableNodeTemplates = new CloudResourceMatcherService . MatchableTemplates ( ) ; if ( allNodeTemplates == null ) { return matchableNodeTemplates ; } for ( Map . Entry < String , NodeTemplate > nodeTemplateEntry : allNodeTemplates . entrySet ( ) ) { if ( ToscaUtils . isFromType ( COMPUTE_TYPE , types . get ( nodeTemplateEntry . getKey ( ) ) ) ) { matchableNodeTemplates . computeTemplates . put ( nodeTemplateEntry . getKey ( ) , nodeTemplateEntry . getValue ( ) ) ; } if ( ToscaUtils . isFromType ( NETWORK_TYPE , types . get ( nodeTemplateEntry . getKey ( ) ) ) ) { matchableNodeTemplates . networkTemplates . put ( nodeTemplateEntry . getKey ( ) , nodeTemplateEntry . getValue ( ) ) ; } if ( ToscaUtils . isFromType ( BLOCKSTORAGE_TYPE , types . get ( nodeTemplateEntry . getKey ( ) ) ) ) { <START_BUG> matchableNodeTemplates . networkTemplates . put ( nodeTemplateEntry . getKey ( ) , nodeTemplateEntry . getValue ( ) ) ; <END_BUG> } } return matchableNodeTemplates ; } public CloudResourceTopologyMatchResult matchTopology ( Topology topology , Cloud cloud , IPaaSProvider paaSProvider , CloudResourceMatcherConfig cloudResourceMatcherConfig , Map < String , IndexedNodeType > types ) { } public List < NetworkTemplate > matchNetworks ( Cloud cloud , CloudResourceMatcherConfig cloudResourceMatcherConfig , NodeTemplate nodeTemplate ) { } public List < StorageTemplate > matchStorages ( Cloud cloud , CloudResourceMatcherConfig cloudResourceMatcherConfig , NodeTemplate nodeTemplate ) { } public List < CloudImage > matchImages ( Cloud cloud , CloudResourceMatcherConfig cloudResourceMatcherConfig , NodeTemplate nodeTemplate ) { } public List < CloudImageFlavor > matchFlavors ( Cloud cloud , CloudResourceMatcherConfig cloudResourceMatcherConfig , IPaaSProvider paaSProvider , NodeTemplate nodeTemplate , CloudImage cloudImage ) { } private static interface ValueParser < T > { T parseValue ( String textValue ) { } } private static class IntegerValueParser implements CloudResourceMatcherService . ValueParser < Integer > { @ Override public Integer parseValue ( String textValue ) { } } private static class LongValueParser implements CloudResourceMatcherService . ValueParser < Long > { @ Override public Long parseValue ( String textValue ) { } } private static class TextValueParser implements CloudResourceMatcherService . ValueParser < String > { @ Override public String parseValue ( String textValue ) { } } private static class VersionValueParser implements CloudResourceMatcherService . ValueParser < Version > { @ Override public Version parseValue ( String textValue ) { } } private static interface ValueMatcher < T > { boolean matchValue ( T expected , T actual ) { } } private static class GreaterOrEqualValueMatcher < T extends Comparable > implements CloudResourceMatcherService . ValueMatcher < T > { @ Override public boolean matchValue ( T expected , T actual ) { } } private static class EqualMatcher < T > implements CloudResourceMatcherService . ValueMatcher < T > { @ Override public boolean matchValue ( T expected , T actual ) { } } private < T > boolean match ( Map < String , String > properties , String keyToCheck , T actualValue , CloudResourceMatcherService . ValueParser < T > valueParser , CloudResourceMatcherService . ValueMatcher < T > valueMatcher ) { } }

Fix:
matchableNodeTemplates . storageTemplates . put ( nodeTemplateEntry . getKey ( ) , nodeTemplateEntry . getValue ( ) ) ;