removes reference from the type definition

    If type is not reference type, it will be returned as is.
505347
def remove_reference(type_):
    
    nake_type = remove_alias(type_)
    if not is_reference(nake_type):
        return type_

    return nake_type.base
166696
function () {
        // we unlink every member from it's parent (assuming this is their parent)
        this.all().forEach(PropertyList._unlinkItemFromParent);

        this.members.length = 0; // remove all items from list

        // now we remove all items from index reference
        Object.keys(this.reference).forEach(function (key) {
            delete this.reference[key];
        }.bind(this));
    }
148055
private void eliminateCallTargetArgAt(Node ref, int argIndex) {
    Node callArgNode = ReferenceMap.getArgumentForCallOrNewOrDotCall(ref, argIndex);
    if (callArgNode != null) {
      NodeUtil.deleteNode(callArgNode, compiler);
    }
  }
904385
def clear_relation(cls):
        
        for k, v in cls.properties.items():
            if isinstance(v, ReferenceProperty):
                if hasattr(v, 'collection_name') and hasattr(v.reference_class, v.collection_name):
                    delattr(v.reference_class, v.collection_name)

                    if isinstance(v, OneToOne):
                        #append to reference_class._onetoone
                        del v.reference_class._onetoone[v.collection_name]
1213455
public void clear(PhantomReference<T> reference) {
        Optional.ofNullable(registeredMap.remove(reference)).ifPresent(a -> reference.clear());
    }
140808
private void removeUnnecessaryHasOneToSelf() {
		model.getPrimaryAttributes();
		String[] hasOne = model.getHasOne();
		String[] hasOneLocalColumn = model.getHasOneLocalColumn();
		String[] hasOneReferencedColumn = model.getHasOneReferencedColumn();


		for(int i = 0; i < hasOne.length; i++){
			boolean hasOneLocalInPrimary = CStringUtils.inArray(model.getPrimaryAttributes(), hasOneLocalColumn[i]);
			boolean hasOneReferencedInPrimary = CStringUtils.inArray(model.getPrimaryAttributes(), hasOneReferencedColumn[i]);

			if(hasOne[i].equals(model.getTableName()) && hasOneLocalColumn[i].equals(hasOneReferencedColumn[i]) &&
					hasOneLocalInPrimary && hasOneReferencedInPrimary ){

				model = removeFromHasOne(model, hasOne[i]);
			}
		}

	}
630189
function removeReference(name, opposite) {
  const ref = this.references[name]
  _.unset(this.references, name)
  if (ref.opposite !== undefined) {
    if (opposite) {
      _.unset(ref.type.references, ref.opposite)
    } else {
      _.unset(ref.type.references[ref.opposite], 'opposite')
    }
  }
}
956802
public boolean removeReference(K key, ServiceReference<V> reference) {
        if (key == null)
            return false;

        ConcurrentServiceReferenceSet<V> csrs = elementMap.get(key);
        if (csrs == null) {
            return false;
        }
        return csrs.removeReference(reference);
    }
1053711
def clearData(self, type: str = '') -> None:
        
        type = normalize_type(type)
        if not type:
            self.__data.clear()
        elif type in self.__data:
            del self.__data[type]
1207845
public static <T> T convert(TypeReference<T> reference, Object value) throws ConvertException{
		return convert(reference.getType(), value, null);
	}
706206
def del_reference(self, source, target, **kwargs):
        
        rc = api.get_tool("reference_catalog")
        uid = api.get_uid(target)
        rc.deleteReference(source, uid, self.relationship)
        # unlink the version of the reference
        self.link_version(source, target)
1337599
public static boolean isAbstract(TypeRef  typeRef) {
        DefinitionRepository repository =  DefinitionRepository.getRepository();
        TypeDef def = repository.getDefinition(typeRef);
        if (def == null && typeRef instanceof ClassRef) {
            def = ((ClassRef)typeRef).getDefinition();
        }
        return def != null ? def.isAbstract() : false;
    }
138237
public void removeService(ServiceReference reference, Object service) {
        if (serviceRegistration != null) {
            serviceRegistration.unregister();
            serviceRegistration = null;
        }

        String alias = this.getAlias();
        ((HttpService) service).unregister(alias);
        if (servlet instanceof WebappServlet)
            ((WebappServlet)servlet).free();
        servlet = null;
    }
1276883
public void unlink(Object source, CollectionDescriptor cds, Object referenceToUnlink)
    {
        if(cds.isMtoNRelation())
        {
            m_broker.deleteMtoNImplementor(new MtoNImplementor(cds, source, referenceToUnlink));
        }
        else
        {
            ClassDescriptor cld = m_broker.getClassDescriptor(referenceToUnlink.getClass());
            m_broker.unlinkFK(referenceToUnlink, cld, cds);
        }
    }
438993
public void removeConverter(final TypeConverter tc) {
        if (tc.getSupportedTypes() == null) {
            untypedTypeEncoders.remove(tc);
            registeredConverterClasses.remove(tc.getClass());
        } else {
            for (final Entry<Class, List<TypeConverter>> entry : tcMap.entrySet()) {
                List<TypeConverter> list = entry.getValue();
                if (list.contains(tc)) {
                    list.remove(tc);
                }
                if (list.isEmpty()) {
                    tcMap.remove(entry.getKey());
                }
            }
            registeredConverterClasses.remove(tc.getClass());
        }

    }
916119
protected void removeTypeConversions(String... types) {
		for (final String type : types) {
			final Iterator<ConversionMapping> iterator = this.conversions.iterator();
			while (iterator.hasNext()) {
				final ConversionMapping pair = iterator.next();
				if (Strings.equal(pair.getSource(), type)) {
					iterator.remove();
					break;
				}
			}
		}
		refreshListUI();
		this.list.refresh(true);
		enableButtons();
		preferenceValueChanged();
	}
936929
private void eliminateDeadCode(TypeElement type, AbstractTypeDeclaration node) {
    List<BodyDeclaration> decls = node.getBodyDeclarations();
    String clazz = elementUtil.getBinaryName(type);
    if (deadCodeMap.containsClass(clazz)) {
      stripClass(node);
    } else {
      removeDeadMethods(clazz, decls);
      removeDeadFields(clazz, decls);
    }
  }