Clones the attribute
482293
public Attribute export(JavaClass cl, JavaClass target)
  {
    target.getConstantPool().addUTF8(getName());
      
    OpaqueAttribute attr = new OpaqueAttribute(getName());

    byte []value = new byte[_value.length];
    System.arraycopy(_value, 0, value, 0, _value.length);
    
    attr.setValue(value);

    return attr;
  }
1088512
def transfer_attributes(target)
            target.no, target.generation = @no, @generation
            target.parent = @parent
            if self.indirect?
                target.set_indirect(true)
                target.set_document(@document)
            end

            target
        end
650015
function(el, deep) {
    var sub = document.createElement(el.nodeName)
      , attr = el.attributes
      , i = attr.length;

    while (i--) {
      if (attr[i].nodeValue) {
        sub.setAttribute(attr[i].name, attr[i].value);
      }
    }

    if (el.namespaceURI) {
      sub.namespaceURI = el.namespaceURI;
    }

    if (el.baseURI) {
      sub.baseURI = el.baseURI;
    }

    if (deep) {
      DOM.setContent(sub, DOM.getContent(el));
    }

    return clone; 
  }
970415
def clone(self):
        '''
        
        '''
        return HtmlElement(self.tag, self.prefix, self.suffix, self.display,
                           self.margin_before, self.margin_after, self.padding,
                           self.whitespace)
529712
function(el, attrName, oldValue) {
                    if (can.data(can.$(el), "canHasAttributesBindings")) {
                        return setImmediate(function() {
                            can.trigger(el, {
                                    type: "attributes",
                                    attributeName: attrName,
                                    target: el,
                                    oldValue: oldValue,
                                    bubbles: false
                                }, []);
                        });
                    }
                }
967905
function clone() {
      return new this.constructor(this.models, {
        url: 'function' === typeof this.url ? this.url() : this.url,
        model: this.model,
        database: this.database,
        comparator: this.comparator
      });
    }
117092
def clone(self) -> "Event":
        
        return self.__class__(copy.deepcopy(self.event), copy.deepcopy(self.metadata))
762281
function( attr, val ) {
				var orgVal = this.getAttribute( attr );
				if ( val !== orgVal ) {
					!this._.attrChanges && ( this._.attrChanges = {} );

					// Saved the original attribute val.
					if ( !( attr in this._.attrChanges ) )
						this._.attrChanges[ attr ] = orgVal;

					this.setAttribute( attr, val );
				}
			}
1227104
def shallow_clone(result)
        case result
        when Array
          result.map {|item| shallow_clone(item)}
        when ActiveRecord::Base
          result.class.send(:instantiate, result.instance_variable_get(:@attributes))
        end
      end
662634
def _wrap_attribute(self, attr):
        """"""
        if not attr:
            const = const_factory(attr)
            const.parent = self
            return const
        return attr
110582
def _clone_properties(self):
    """"""
    cls = self.__class__
    if self._properties is cls._properties:
      self._properties = dict(cls._properties)
39171
def clone(self):
        

        p = type(self)(self.id)
        p.hooks = list(self.hooks)
        p.instance = self.instance
        return p
580485
function (attribute, key) {
                    if (this.inject && this.inject.hasOwnProperty(key)) {
                        return attribute;
                    } else if (attribute instanceof Bindable) {
                        return attribute.clone();
                    } else if (attribute && (attribute.clone instanceof Function)) {
                        return attribute.clone();
                    } else if (_.isArray(attribute)) {
                        var retArray = [];
                        for (var i = 0; i < attribute.length; i++) {
                            retArray.push(this._cloneAttribute(attribute[i]));
                        }
                        return retArray;
                    } else if (attribute instanceof Date) {
                        return new Date(attribute.getTime());
                    } else if (_.isObject(attribute)) {
                        var retObject = {};
                        for (var attrKey in attribute) {
                            if (attribute.hasOwnProperty(attrKey)) {
                                retObject[attrKey] = this._cloneAttribute(attribute[attrKey], attrKey);
                            }
                        }
                        return retObject;
                    } else {
                        return attribute;
                    }
                }
729751
function optimizeAttributes(attrs) {
		// clone all attributes to make sure that original objects are 
		// not modified
		attrs = attrs.map(function(attr) {
			return utils.clone(attr);
		});
		
		var lookup = {};

		return attrs.filter(function(attr) {
			if (!(attr.name in lookup)) {
				return lookup[attr.name] = attr;
			}
			
			var la = lookup[attr.name];
			
			if (attr.name.toLowerCase() == 'class') {
				la.value += (la.value.length ? ' ' : '') + attr.value;
			} else {
				la.value = attr.value;
				la.isImplied = !!attr.isImplied;
			}
			
			return false;
		});
	}
481523
function() {
      // inherit instance attributes
      var clonable = this.prototype._instanceAttributes;
      // merge attributes from element
      var a$ = this.attributes;
      for (var i=0, l=a$.length, a; (i<l) && (a=a$[i]); i++) {  
        if (this.isInstanceAttribute(a.name)) {
          clonable[a.name] = a.value;
        }
      }
    }
350079
def clone(cls, objective, model=None, **kwargs):
        
        return cls(cls._substitute_variables(objective, model=model), name=objective.name,
                   direction=objective.direction, sloppy=True, **kwargs)
305474
def clone(cls, variable, **kwargs):
        
        return cls(variable.name, lb=variable.lb, ub=variable.ub, type=variable.type, **kwargs)