Source:
<code>private TypeDefinition buildProtobufTypeDefinition(Class<?> clazz, GeneratedMessageV3.Builder builder, Map<Class<?>, TypeDefinition> typeCache) { TypeDefinition typeDefinition = new TypeDefinition(clazz.getName()); if (builder == null) { return typeDefinition; } <START> Map<String, TypeDefinition> properties = new HashMap(); <END> Method[] methods = builder.getClass().getDeclaredMethods(); for (Method method : methods) { String methodName = method.getName(); if (isSimplePropertySettingMethod(method)) { properties.put(generateSimpleFiledName(methodName), TypeDefinitionBuilder.build(method.getGenericParameterTypes()[0], method.getParameterTypes()[0], typeCache)); continue; } else if (isMapPropertySettingMethod(method)) { Type type = method.getGenericParameterTypes()[0]; String fieldName = generateMapFieldName(methodName); validateMapType(fieldName, type.toString()); properties.put(fieldName, TypeDefinitionBuilder.build(type, method.getParameterTypes()[0], typeCache)); continue; } else if (isListPropertySettingMethod(method)) { Type type = method.getGenericReturnType(); String fieldName = generateListFieldName(methodName); validateListType(fieldName, type.toString()); TypeDefinition td; if (ProtocolStringList.class.isAssignableFrom(method.getReturnType())) { td = TypeDefinitionBuilder.build(STRING_LIST_TYPE, List.class, typeCache); } else { td = TypeDefinitionBuilder.build(type, method.getReturnType(), typeCache); } properties.put(fieldName, td); continue; } } typeDefinition.setProperties(properties); typeCache.put(clazz, typeDefinition); return typeDefinition; }</code><technical_language>'new HashMap<>()'</technical_language>

Target:
private TypeDefinition buildProtobufTypeDefinition(Class<?> clazz, GeneratedMessageV3.Builder builder, Map<Class<?>, TypeDefinition> typeCache) { TypeDefinition typeDefinition = new TypeDefinition(clazz.getName()); if (builder == null) { return typeDefinition; } Map<String, TypeDefinition> properties = new HashMap<>(); Method[] methods = builder.getClass().getDeclaredMethods(); for (Method method : methods) { String methodName = method.getName(); if (isSimplePropertySettingMethod(method)) { properties.put(generateSimpleFiledName(methodName), TypeDefinitionBuilder.build(method.getGenericParameterTypes()[0], method.getParameterTypes()[0], typeCache)); } else if (isMapPropertySettingMethod(method)) { Type type = method.getGenericParameterTypes()[0]; String fieldName = generateMapFieldName(methodName); validateMapType(fieldName, type.toString()); properties.put(fieldName, TypeDefinitionBuilder.build(type, method.getParameterTypes()[0], typeCache)); } else if (isListPropertySettingMethod(method)) { Type type = method.getGenericReturnType(); String fieldName = generateListFieldName(methodName); validateListType(fieldName, type.toString()); TypeDefinition td; if (ProtocolStringList.class.isAssignableFrom(method.getReturnType())) { td = TypeDefinitionBuilder.build(STRING_LIST_TYPE, List.class, typeCache); } else { td = TypeDefinitionBuilder.build(type, method.getReturnType(), typeCache); } properties.put(fieldName, td); } } typeDefinition.setProperties(properties); typeCache.put(clazz, typeDefinition); return typeDefinition; }