add the property to be used with the String object
960799
function addProperty(prop, func){
  Object.defineProperty(String.prototype, prop, {
    enumerable: true,
    configurable: false,
    get: func
  });
}
1372685
public function addProperty(string $property) : self
    {
        $property = strtolower($property);
        if (!in_array($property, $this->properties, true)) {
            $this->properties[] = $property;
        }

        return $this;
    }
306218
public void setFromString(String prop, String ...val) {
    if (val.length == 1) {
      String[] vals = val[0].split("[\\s,]+");
      set(prop, vals);
    } else {
      set(prop, val);
    }
  }
312306
def insert (self, properties, value):
        
        assert is_iterable_typed(properties, basestring)
        assert isinstance(value, basestring)
        self.__properties.append(properties)
        self.__values.append(value)
987224
function stringifyJSONProperties(obj) {
        var i,
            properties = [];

        for (i in obj) {
            properties.push(
                typeof obj[i] === 'string' ?
                        obj[i] :
                        utils.addQuotes(i) + ': ' + stringifyJSONProperties(obj[i])
            );
        }

        return '{\n' + properties.join(',\n\n') + '\n}';
    }
574949
def addProperty(self, property):
		"""
			'"""
		if self.has_key(property.id):
			raise DuplicatePropertyError
		else:
			self.data[property.id] = property
			self.order.append(property)
26339
def add(self, name, obj=None):
        """"""
        if obj:
            text = '\n::\n\n' + indent(str(obj))
        else:
            text = views.view(name, self.dstore)
        if text:
            title = self.title[name]
            line = '-' * len(title)
            self.text += '\n'.join(['\n\n' + title, line, text])
1249099
function addParameter(prop, object, key) {
                var value = _.result(object, key);
                if (value !== undefined && value !== null && sonarOptions.excludedProperties.indexOf(prop) === -1) {
                    args.push('-D' + prop + '=' + value);
                }
            }
1230882
def add_property(self, name, fn, cached=True):
        
        if name in self.__properties:
            raise KeyError("Trying to add a property '%s' that already exists on this %s object." % (name, self.__class__.__name__))
        self.__properties[name] = (fn, cached)
237030
public FulltextMatch addProperty(
                    final String property
                    )
    {
        if (property == null) {
            throw new IllegalArgumentException( "no property specified" );
        }

        _properties.add( property );

        return this;
    }
746744
private void appendProperty(StringBuffer sb, String propertyName,
			Object propertyValue) {

		if (propertyValue != null) {
			propertyValue = propertyValue.toString().replaceAll("\\s+", " ")
					.trim();
		}
		sb.append(ljust(propertyName + ":", 45) + propertyValue + "\n");
	}
1135755
function addMetaProperty (object, propName, value) {
  defineProperty(object, propName, {
    enumerable: false,
    value
  })
}
34656
function(object) {
      var str = '';

      var first = true;

      for (var key in object) {
        if (Object.prototype.hasOwnProperty.call(object, key)) {
          var val = object[key];

          str += first ? '?' : '&';
          str += key;
          str += '=';
          str += val;

          first = false;
        }
      }

      return str;
    }
163636
private void addToStringMethod(boolean keyOnly) {
        TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class);

        Modifiers modifiers = Modifiers.PUBLIC.toSynchronized(true);
        MethodInfo mi = addMethodIfNotFinal(modifiers,
                                            keyOnly ?
                                            TO_STRING_KEY_ONLY_METHOD_NAME :
                                            TO_STRING_METHOD_NAME,
                                            TypeDesc.STRING, null);

        if (mi == null) {
            return;
        }

        CodeBuilder b = new CodeBuilder(mi);
        b.newObject(stringBuilder);
        b.dup();
        b.invokeConstructor(stringBuilder, null);
        b.loadConstant(mStorableType.getName());
        invokeAppend(b, TypeDesc.STRING);

        String detail;
        if (keyOnly) {
            detail = " (key only) {";
        } else {
            detail = " {";
        }

        b.loadConstant(detail);
        invokeAppend(b, TypeDesc.STRING);

        // First pass, just print primary keys.

        LocalVariable commaCountVar = b.createLocalVariable(null, TypeDesc.INT);
        b.loadConstant(-1);
        b.storeLocal(commaCountVar);

        for (StorableProperty property : mInfo.getPrimaryKeyProperties().values()) {
            addPropertyAppendCall(b, property, commaCountVar);
        }

        // Second pass, print non-primary keys.

        if (!keyOnly) {
            for (StorableProperty property : mAllProperties.values()) {
                // Don't print any derived or join properties since they may throw an exception.
                if (!property.isPrimaryKeyMember() &&
                    (!property.isDerived()) && (!property.isJoin()))
                {
                    addPropertyAppendCall(b, property, commaCountVar);
                }
            }
        }

        b.loadConstant('}');
        invokeAppend(b, TypeDesc.CHAR);

        // For key string, also show all the alternate keys. This makes the
        // FetchNoneException message more helpful.
        if (keyOnly) {
            int altKeyCount = mInfo.getAlternateKeyCount();
            for (int i=0; i<altKeyCount; i++) {
                b.loadConstant(-1);
                b.storeLocal(commaCountVar);

                b.loadConstant(", {");
                invokeAppend(b, TypeDesc.STRING);

                StorableKey<S> key = mInfo.getAlternateKey(i);

                for (OrderedProperty<S> op : key.getProperties()) {
                    StorableProperty<S> property = op.getChainedProperty().getPrimeProperty();
                    addPropertyAppendCall(b, property, commaCountVar);
                }

                b.loadConstant('}');
                invokeAppend(b, TypeDesc.CHAR);
            }
        }

        b.invokeVirtual(stringBuilder, TO_STRING_METHOD_NAME, TypeDesc.STRING, null);
        b.returnValue(TypeDesc.STRING);
    }
428597
def add_property(self, pred, obj):
        
        pred = Uri(pred)
        try:
            self[pred].append(obj)
        # except AttributeError:
        #     new_list = [self[pred]]
        #     new_list.append(obj)
        #     self[pred] = new_list
        except KeyError:
            try:
                new_prop = self.properties[pred]
            except AttributeError:
                self.properties = {}
                self.add_property(pred, obj)
                return
            except KeyError:
                try:
                    new_prop = MODULE.rdfclass.properties[pred]
                except KeyError:
                    new_prop = MODULE.rdfclass.make_property({},
                                                      pred, self.class_names)
                try:
                    self.properties[pred] = new_prop
                except AttributeError:
                    self.properties = {pred: new_prop}
            init_prop = new_prop(self, get_attr(self, "dataset"))
            setattr(self,
                    pred,
                    init_prop)
            self[pred] = init_prop
            self[pred].append(obj)
        if self.dataset:
            self.dataset.add_rmap_item(self, pred, obj)
442228
def add_from_string(self, strdata):
        """"""
        if self.tree is None:
            self.tree = tree = ET.ElementTree(ET.fromstring(strdata))
            self.root = tree.getroot()
            self.objects = {}
        else:
            # TODO: append to current tree
            pass
436286
function addExtra(properties, extra) {
    for(var key in extra){
      if(extra.hasOwnProperty(key)) {
        properties[key] = extra[key];
      }
    }

    return properties;
  }