Map<String, String> keyValueMap = new HashMap<>();
String keyPropertyListString = objectName.getKeyPropertyListString();
if (keyPropertyListString != null && !keyPropertyListString.isEmpty()) {
String[] keyValuePairs = keyPropertyListString.split(",");
for (String eachKeyValue : keyValuePairs) {
<BUG>String[] keyValue = eachKeyValue.split("=");
if (keyValue.length >= 1) {
keyValueMap.put(keyValue[0], keyValue.length == 2 ? keyValue[1] : "undefined");
}</BUG>
}

Map<String, String> keyValueMap = new HashMap<>();
String keyPropertyListString = objectName.getKeyPropertyListString();
if (keyPropertyListString != null && !keyPropertyListString.isEmpty()) {
String[] keyValuePairs = keyPropertyListString.split(",");
for (String eachKeyValue : keyValuePairs) {
String key = eachKeyValue.substring(0, eachKeyValue.indexOf("="));
String value =  eachKeyValue.length() > key.length() ? eachKeyValue.substring(key.length() + 1) : "undefined";
if (!key.isEmpty() && !value.isEmpty()) {
keyValueMap.put(key, value);
