"removeVPX" and "removeNonG722" methods are taken from github/mozilla/webrtc-landing
502556
function removeVPX(sdp) {
            if (!sdp || typeof sdp !== 'string') {
                throw 'Invalid arguments.';
            }

            // this method is NOT reliable

            sdp = sdp.replace('a=rtpmap:100 VP8/90000\r\n', '');
            sdp = sdp.replace('a=rtpmap:101 VP9/90000\r\n', '');

            sdp = sdp.replace(/m=video ([0-9]+) RTP\/SAVPF ([0-9 ]*) 100/g, 'm=video $1 RTP\/SAVPF $2');
            sdp = sdp.replace(/m=video ([0-9]+) RTP\/SAVPF ([0-9 ]*) 101/g, 'm=video $1 RTP\/SAVPF $2');

            sdp = sdp.replace(/m=video ([0-9]+) RTP\/SAVPF 100([0-9 ]*)/g, 'm=video $1 RTP\/SAVPF$2');
            sdp = sdp.replace(/m=video ([0-9]+) RTP\/SAVPF 101([0-9 ]*)/g, 'm=video $1 RTP\/SAVPF$2');

            sdp = sdp.replace('a=rtcp-fb:120 nack\r\n', '');
            sdp = sdp.replace('a=rtcp-fb:120 nack pli\r\n', '');
            sdp = sdp.replace('a=rtcp-fb:120 ccm fir\r\n', '');

            sdp = sdp.replace('a=rtcp-fb:101 nack\r\n', '');
            sdp = sdp.replace('a=rtcp-fb:101 nack pli\r\n', '');
            sdp = sdp.replace('a=rtcp-fb:101 ccm fir\r\n', '');

            return sdp;
        }
853061
function unhook(vNode, patch, index) {
    if (isVNode(vNode)) {
        if (vNode.hooks) {
            patch[index] = appendPatch(
                patch[index],
                new VPatch(
                    VPatch.PROPS,
                    vNode,
                    undefinedKeys(vNode.hooks)
                )
            )
        }

        if (vNode.descendantHooks || vNode.hasThunks) {
            var children = vNode.children
            var len = children.length
            for (var i = 0; i < len; i++) {
                var child = children[i]
                index += 1

                unhook(child, patch, index)

                if (isVNode(child) && child.count) {
                    index += child.count
                }
            }
        }
    } else if (isThunk(vNode)) {
        thunks(vNode, null, patch, index)
    }
}
349127
def vserver_delete(v_name, **connection_args):
    '''
    
    '''
    ret = True
    vserver = _vserver_get(v_name, **connection_args)
    if vserver is None:
        return False
    nitro = _connect(**connection_args)
    if nitro is None:
        return False
    try:
        NSLBVServer.delete(nitro, vserver)
    except NSNitroError as error:
        log.debug('netscaler module error - NSVServer.delete() failed: %s', error)
        ret = False
    _disconnect(nitro)
    return ret
1077634
function FakeWebSocket() {
		var
			self = this,
			url = arguments[0],
			protocols = arguments[1],
			listeners = {};


		// WebSocket is an EventTarget as per W3C spec.

		this.addEventListener = function (type, newListener) {
			var listenersType, i, listener;

			if (!type || !newListener) {
				return;
			}

			listenersType = listeners[type];
			if (listenersType === undefined) {
				listeners[type] = listenersType = [];
			}

			for (i = 0; !!(listener = listenersType[i]); i++) {
				if (listener === newListener) {
					return;
				}
			}

			listenersType.push(newListener);
		};

		this.removeEventListener = function (type, oldListener) {
			var listenersType, i, listener;

			if (!type || !oldListener) {
				return;
			}

			listenersType = listeners[type];
			if (listenersType === undefined) {
				return;
			}

			for (i = 0; !!(listener = listenersType[i]); i++) {
				if (listener === oldListener) {
					listenersType.splice(i, 1);
					break;
				}
			}

			if (listenersType.length === 0) {
				delete listeners[type];
			}
		};

		this.dispatchEvent = function (event) {
			var
				self = this,
				type,
				listenersType,
				dummyListener,
				stopImmediatePropagation = false,
				i, listener;

			if (!(event instanceof Event)) {
				throw new Error('first argument must be an instance of Event');
			}

			type = event.type;

			listenersType = (listeners[type] || []);

			dummyListener = this['on' + type];
			if (typeof dummyListener === 'function') {
				listenersType.push(dummyListener);
			}

			event.target = this;

			for (i = 0; !!(listener = listenersType[i]); i++) {
				if (stopImmediatePropagation) {
					break;
				}

				fire(listener, event);
			}

			return !event.defaultPrevented;

			function fire(listener, event) {
				// Avoid iOS WebSocket bug by running the listener within a setTimeout.
				setTimeout(function () {
					listener.call(self, event);
				});
			}
		};

		setTimeout(function () {
			// Create a native WebSocket instance.
			if (protocols) {
				self.ws = new NativeWebSocket(url, protocols);
			} else {
				self.ws = new NativeWebSocket(url);
			}

			// Set the native WebSocket events.

			self.ws.onopen = function (event) {
				setTimeout(function () {
					self.dispatchEvent(event);
				});
			};

			self.ws.onerror = function (event) {
				setTimeout(function () {
					self.dispatchEvent(event);
				});
			};

			self.ws.onclose = function (event) {
				setTimeout(function () {
					self.dispatchEvent(event);
				});
			};

			self.ws.onmessage = function (event) {
				setTimeout(function () {
					self.dispatchEvent(event);
				});
			};
		});
	}
260869
function removeWrappingParagraphForFirefox(value) {
  var fakeContent = document.createElement('div');
  fakeContent.innerHTML = value;

  if (fakeContent.childNodes.length === 1) {
    var node = [].slice.call(fakeContent.childNodes)[0];
    if (node && node.nodeName === "P") {
      value = node.innerHTML;
    }
  }

  return value;
}
606370
function unbindFromStrings(target, entity, evt, methods){
    var methodNames = methods.split(/\s+/);

    _.each(methodNames,function(methodName) {
      var method = target[methodName];
      target.stopListening(entity, evt, method, target);
    });
  }
931809
def port_remove_nio_binding(self, port_number):
        

        if not self._ethernet_adapter.port_exists(port_number):
            raise VPCSError("Port {port_number} doesn't exist in adapter {adapter}".format(adapter=self._ethernet_adapter,
                                                                                           port_number=port_number))

        if self.is_running():
            yield from self._ubridge_send("bridge delete {name}".format(name="VPCS-{}".format(self._id)))

        nio = self._ethernet_adapter.get_nio(port_number)
        if isinstance(nio, NIOUDP):
            self.manager.port_manager.release_udp_port(nio.lport, self._project)
        self._ethernet_adapter.remove_nio(port_number)

        log.info('VPCS "{name}" [{id}]: {nio} removed from port {port_number}'.format(name=self._name,
                                                                                      id=self.id,
                                                                                      nio=nio,
                                                                                      port_number=port_number))
        return nio
1256690
def unbind(self, exchange, source, routing_key='', nowait=True,
               arguments={}, ticket=None, cb=None):
        '''
        
        '''
        nowait = nowait and self.allow_nowait() and not cb

        args = Writer()
        args.write_short(ticket or self.default_ticket).\
            write_shortstr(exchange).\
            write_shortstr(source).\
            write_shortstr(routing_key).\
            write_bit(nowait).\
            write_table(arguments or {})
        self.send_frame(MethodFrame(self.channel_id, 40, 40, args))

        if not nowait:
            self._unbind_cb.append(cb)
            self.channel.add_synchronous_cb(self._recv_unbind_ok)
320681
function cleanupProxyOnDestroy (object) {
      if (api.mediaCapturer && api.mediaCapturer.id === object.id) {
        api.mediaCapturer = null;
      }
      else if (proxies.hasOwnProperty(object.id)) {
        delete proxies[object.id];
      }

      if (object.$) {
        object.$.remove();
      }
    }
1302946
def _remove_vlan_from_all_sp_templates(self, handle, vlan_id, ucsm_ip):
        """"""
        sp_template_info_list = (
            CONF.ml2_cisco_ucsm.ucsms[ucsm_ip].sp_template_list.values())

        vlan_name = self.make_vlan_name(vlan_id)
        virtio_port_list = (
            CONF.ml2_cisco_ucsm.ucsms[ucsm_ip].ucsm_virtio_eth_ports)

        try:
            handle.StartTransaction()
            # sp_template_info_list is a list of tuples.
            # Each tuple is of the form :
            # (ucsm_ip, sp_template_path, sp_template)
            for sp_template_info in sp_template_info_list:
                sp_template_path = sp_template_info.path
                sp_template = sp_template_info.name

                sp_template_full_path = (sp_template_path +
                    const.SP_TEMPLATE_PREFIX + sp_template)

                obj = handle.GetManagedObject(
                    None,
                    self.ucsmsdk.LsServer.ClassId(),
                    {self.ucsmsdk.LsServer.DN: sp_template_full_path})
                if not obj:
                    LOG.error('UCS Manager network driver could not '
                        'find Service Profile template %s',
                        sp_template_full_path)
                    continue

                eth_port_paths = ["%s%s" % (sp_template_full_path, ep)
                    for ep in virtio_port_list]
                for eth_port_path in eth_port_paths:
                    eth = handle.GetManagedObject(
                        obj, self.ucsmsdk.VnicEther.ClassId(),
                        {self.ucsmsdk.VnicEther.DN: eth_port_path}, True)

                    if eth:
                        vlan_path = (eth_port_path +
                            const.VLAN_PATH_PREFIX + vlan_name)
                        vlan = handle.GetManagedObject(eth,
                            self.ucsmsdk.VnicEtherIf.ClassId(),
                            {self.ucsmsdk.VnicEtherIf.DN: vlan_path})
                        if vlan:
                            # Found vlan config. Now remove it.
                            handle.RemoveManagedObject(vlan)
                        else:
                            LOG.debug('UCS Manager network driver did not '
                            'find VLAN %s at %s', vlan_name, eth_port_path)
                    else:
                        LOG.debug('UCS Manager network driver did not '
                            'find ethernet port at %s', eth_port_path)
                handle.CompleteTransaction()
                return True
        except Exception as e:
            # Raise a Neutron exception. Include a description of
            # the original  exception.
            raise cexc.UcsmConfigDeleteFailed(config=vlan_id,
                                              ucsm_ip=ucsm_ip,
                                              exc=e)
311301
public static void removeTimerService(Context envCtx, String appName, TimerService timerService) {
		if(envCtx != null) {
			try {
				javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName);
				sipContext.unbind(TIMER_SERVICE_JNDI_NAME);
			} catch (NamingException e) {
				logger.error(sm.getString("naming.unbindFailed", e));
			}
		}
	}
343671
def remove(self):
        

        xmlrpc = XMLRPCConnection()
        try:
            xmlrpc.connection.remove_vrf(
                {
                    'vrf': { 'id': self.id },
                    'auth': self._auth_opts.options
                })
        except xmlrpclib.Fault as xml_fault:
            raise _fault_to_exception(xml_fault)
        if self.id in _cache['VRF']:
            del(_cache['VRF'][self.id])
1179594
function removeServer(provider) {
        var i;
        for (i = 0; i < _serverProviders.length; i++) {
            if (provider === _serverProviders[i]) {
                _serverProviders.splice(i, 1);
            }
        }
    }
799338
private void stripAllCalls(Map<String, TweakInfo> tweakInfos) {
    for (TweakInfo tweakInfo : tweakInfos.values()) {
      boolean isRegistered = tweakInfo.isRegistered();
      for (TweakFunctionCall functionCall : tweakInfo.functionCalls) {
        Node callNode = functionCall.callNode;
        Node parent = callNode.getParent();
        if (functionCall.tweakFunc.isGetterFunction()) {
          Node newValue;
          if (isRegistered) {
            newValue = tweakInfo.getDefaultValueNode().cloneNode();
          } else {
            // When we find a getter of an unregistered tweak, there has
            // already been a warning about it, so now just use a default
            // value when stripping.
            TweakFunction registerFunction =
                functionCall.tweakFunc.registerFunction;
            newValue = registerFunction.createDefaultValueNode();
          }
          parent.replaceChild(callNode, newValue);
          compiler.reportChangeToEnclosingScope(parent);
        } else {
          Node voidZeroNode = IR.voidNode(IR.number(0).srcref(callNode))
              .srcref(callNode);
          parent.replaceChild(callNode, voidZeroNode);
          compiler.reportChangeToEnclosingScope(parent);
        }
      }
    }
  }
135444
public void removeTangoUserListener(ITangoUserListener listener, String attrName)
            throws DevFailed {
        synchronized (moni) {
            TangoUser tangoUser;
            String key = deviceName+"/"+attrName;
            if ((tangoUser = tango_user_source.get(key)) != null)
                tangoUser.removeTangoUserListener(listener);
        }
    }
1308621
function wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {
  if (!window.RTCPeerConnection) {
    return;
  }
  var proto = window.RTCPeerConnection.prototype;
  var nativeAddEventListener = proto.addEventListener;
  proto.addEventListener = function(nativeEventName, cb) {
    if (nativeEventName !== eventNameToWrap) {
      return nativeAddEventListener.apply(this, arguments);
    }
    var wrappedCallback = function(e) {
      var modifiedEvent = wrapper(e);
      if (modifiedEvent) {
        cb(modifiedEvent);
      }
    };
    this._eventMap = this._eventMap || {};
    this._eventMap[cb] = wrappedCallback;
    return nativeAddEventListener.apply(this, [nativeEventName,
      wrappedCallback]);
  };

  var nativeRemoveEventListener = proto.removeEventListener;
  proto.removeEventListener = function(nativeEventName, cb) {
    if (nativeEventName !== eventNameToWrap || !this._eventMap
        || !this._eventMap[cb]) {
      return nativeRemoveEventListener.apply(this, arguments);
    }
    var unwrappedCb = this._eventMap[cb];
    delete this._eventMap[cb];
    return nativeRemoveEventListener.apply(this, [nativeEventName,
      unwrappedCb]);
  };

  Object.defineProperty(proto, 'on' + eventNameToWrap, {
    get: function() {
      return this['_on' + eventNameToWrap];
    },
    set: function(cb) {
      if (this['_on' + eventNameToWrap]) {
        this.removeEventListener(eventNameToWrap,
            this['_on' + eventNameToWrap]);
        delete this['_on' + eventNameToWrap];
      }
      if (cb) {
        this.addEventListener(eventNameToWrap,
            this['_on' + eventNameToWrap] = cb);
      }
    },
    enumerable: true,
    configurable: true
  });
}
104136
function(sName, sXHRMethod) {
			var bRemove = delete mRegistry[sXHRMethod][sName];
			Log.debug("Unregister '" + sName + "' for XHR function '" + sXHRMethod + (bRemove ? "'" : "' failed"), XHRINTERCEPTOR);
			return bRemove;
		}