TODO handle composite values
421196
public void fromDmr(Object entity, String javaName, ModelType dmrType, Class<?> propertyType, ModelNode dmrPayload) throws Exception {

        Method target = entity.getClass().getMethod(javaName, propertyType);
        @SuppressWarnings("unchecked")
        List<Property> properties = dmrPayload.isDefined() ? dmrPayload.asPropertyList() : EMPTY_LIST;
        if(properties.isEmpty())
        {
            target.invoke(entity, EMPTY_MAP);
        }
        else
        {
            Map<String, Object> map = new HashMap<>(properties.size());

            for (Property prop : properties) {
                map.put(prop.getName(), toJavaValue(prop.getValue().getType(), prop.getValue()));
            }

            target.invoke(entity, map);
        }
    }
339172
function processValuesFromContext(node, params, msg, varList) {
                let pMsg = {};
                Object.assign(pMsg, params);
                varList.forEach((varItem) => {
                    if (varItem.type === undefined || params[varItem.type] === undefined) {
                        pMsg[varItem.name] = params[varItem.name];
                    } else if (params[varItem.type] === 'flow' || params[varItem.type] === 'global') {
                        pMsg[varItem.name] = RED.util.evaluateNodeProperty(params[varItem.name], params[varItem.type], node, msg);
                        pMsg[varItem.type] = params[varItem.type];
                        console.log('Inside flow or global');
                        console.log(varItem.name + ' - - ' + pMsg[varItem.name]);
                    } else {
                        pMsg[varItem.name] = params[varItem.name];
                        pMsg[varItem.type] = params[varItem.type];
                    }
                });
                return pMsg;
            }
495821
@Override
	protected void toDPT(final String value, final short[] dst, final int index)
		throws KNXFormatException
	{
		try {
			toDPT(Long.decode(removeUnit(value)).longValue(), dst, index);
		}
		catch (final NumberFormatException e) {
			throw newException("wrong value format", value);
		}
	}
1162502
function toDefault(val, def) {
    if (is_1.isValue(val) && !(is_1.isEmpty(val) && !is_1.isEmpty(def)))
        return val;
    return is_1.isValue(def) ? def : null;
}
1128667
private Object prepareCompositeIdObject(final SingularAttribute attribute, Object compositeId,
            Map<String, String> uniquePKs, MetamodelImpl metaModel)
    {
        Field[] fields = attribute.getBindableJavaType().getDeclaredFields();
        EmbeddableType embeddable = metaModel.embeddable(attribute.getBindableJavaType());

        for (Field field : attribute.getBindableJavaType().getDeclaredFields())
        {
            if (!ReflectUtils.isTransientOrStatic(field))
            {
                if (metaModel.isEmbeddable(((AbstractAttribute) embeddable.getAttribute(field.getName()))
                        .getBindableJavaType()))
                {
                    try
                    {
                        field.setAccessible(true);
                        Object embeddedObject = prepareCompositeIdObject(
                                (SingularAttribute) embeddable.getAttribute(field.getName()),
                                KunderaCoreUtils.initialize(((AbstractAttribute) embeddable.getAttribute(field
                                        .getName())).getBindableJavaType(), field.get(compositeId)), uniquePKs,
                                metaModel);
                        PropertyAccessorHelper.set(compositeId, field, embeddedObject);
                    }
                    catch (IllegalAccessException e)
                    {
                        log.error(e.getMessage());
                    }
                }
                else
                {
                    PropertyAccessorHelper.set(
                            compositeId,
                            field,
                            PropertyAccessorHelper.fromSourceToTargetClass(field.getType(), String.class,
                                    uniquePKs.get(field.getName())));
                }
            }
        }
        return compositeId;
    }
279963
function handlePropertyValues(schema, values, prop) {
    var length = values.length
    var result = []
    var index = -1
    var value

    while (++index < length) {
        value = handlePropertyValue(schema, values[index], prop)

        if (value !== null && value !== undefined) {
            result.push(value)
        }
    }

    return result
}
246306
@Override
    public String handle(final Object value) {
        if (value instanceof Double) {
            return String.format(Locale.US, "%.14f", (Double) value);
        } else {
            throw new IllegalArgumentException("Can't serialize anything but Double");
        }
    }
874690
private String parseValue(String fieldType, Object value) {
		if (TypeConver.isBasicType(fieldType)) {
			if (value != null) {
				return value.toString();
			} else {
				return null;
			}
		}
		return null;
	}
503743
function(values) {
      if (!this.isMultiValue) {
        throw new Error(
          this.name + ': does not not support mulitValue.\n' +
          'override isMultiValue'
        );
      }

      var len = values.length;
      var i = 0;
      this.removeAllValues();

      if (len > 0 &&
          typeof(values[0]) === 'object' &&
          'icaltype' in values[0]) {
        this.resetType(values[0].icaltype);
      }

      if (this.isDecorated) {
        for (; i < len; i++) {
          this._setDecoratedValue(values[i], i);
        }
      } else {
        for (; i < len; i++) {
          this.jCal[VALUE_INDEX + i] = values[i];
        }
      }
    }
1336932
def process_value_pairs(self, tokens, type_):
        
        key, body = self.check_composite_tokens(type_, tokens)
        key_name = self.key_name(key)

        d = CaseInsensitiveOrderedDict(CaseInsensitiveOrderedDict)

        for t in body:
            k = self.clean_string(t[0].value).lower()
            v = self.clean_string(t[1].value)

            if k in d.keys():
                log.warning("A duplicate key ({}) was found in {}. Only the last value ({}) will be used. ".format(
                            k, type_, v))

            d[k] = v

        if self.include_position:
            pd = self.create_position_dict(key, body)
            d["__position__"] = pd

        d["__type__"] = key_name

        # return the token as well as the processed dict so the
        # composites function works the same way
        return d
514005
@Override
	public void bind(String name, Object obj) throws NamingException
    {
        bind(new CompositeName(name), obj);
    }
4916
function convertRawVariant(rawColumnValue, column, context)
{
  var ret;

  // if the input is a non-empty string, convert it to a json object
  if (Util.string.isNotNullOrEmpty(rawColumnValue))
  {
    try
    {
      ret = eval("(" + rawColumnValue + ")");
    }
    catch (parseError)
    {
      // TODO: log the error

      // throw the error
      throw parseError;
    }
  }

  return ret;
}
1010227
function BatchOp(type, key, value) {
  this.type = type;
  this.key = key;
  this.value = value;
}
938044
@SuppressWarnings("unchecked") // cast to generic Map will always be okay in this case
    private void validateEventValue(Object value, int depth) {
        if (value instanceof String) {
            String strValue = (String) value;
            if (strValue.length() >= 10000) {
                throw new InvalidEventException("An event cannot contain a string property value longer than 10," +
                        "000 characters.");
            }
        } else if (value instanceof Map) {
            validateEvent((Map<String, Object>) value, depth + 1);
        } else if (value instanceof Iterable) {
            for (Object listElement : (Iterable) value) {
                validateEventValue(listElement, depth);
            }
        }
    }
867901
protected void handleRequestValue(final Date value, final boolean valid, final String text) {
		// As setData() clears the text value (if valid), this must be called first so it can be set after
		setData(value);
		DateFieldModel model = getOrCreateComponentModel();
		model.validDate = valid;
		model.text = text;
	}
797327
@Override
	public String getValue(Match m, int col)
	{
		switch(col)
		{
			case 0:
			{
				return getGeneSymbol(m, "controller ER");
			}
			case 1:
			{
				return concat(getModifications(m, "controller simple PE", "controller PE"), " ");
			}
			case 2:
			{
				return getGeneSymbol(m, "changed ER");
			}
			case 3:
			{
				return concat(getDeltaModifications(m,
					"input simple PE", "input PE", "output simple PE", "output PE")[0], " ");
			}
			case 4:
			{
				return concat(getDeltaModifications(m,
					"input simple PE", "input PE", "output simple PE", "output PE")[1], " ");
			}
			default: throw new RuntimeException("Invalid col number: " + col);
		}
	}
53471
function parseValue(expr) {
  switch(expr.kind) {
    case 'array':
      if (expr.items.length === 0) {
        return [];
      }
      var isKeyed = expr.items.every((item) => item.key !== null)
      var items = expr.items.map(parseValue)
      if (isKeyed) {
        items = items.reduce((acc, val) => Object.assign({}, acc, val), {})
      }
      return items
    case 'entry':
      if (expr.key) {
        return { [parseKey(expr.key)]: parseValue(expr.value) }
      }
      return parseValue(expr.value)
    case 'string':
      return expr.value
    case 'number':
      return parseInt(expr.value, 10)
    case 'boolean':
      return expr.value
    default:
      throw new Error(`Unexpected PHP value: "${expr.kind}", details: ${JSON.stringify(expr)}`)
  }
}