Deletes non-constant dead fields from a type's body declarations list.
430687
private void removeDeadFields(String clazz, List<BodyDeclaration> declarations) {
    Iterator<BodyDeclaration> declarationsIter = declarations.iterator();
    while (declarationsIter.hasNext()) {
      BodyDeclaration declaration = declarationsIter.next();
      if (declaration instanceof FieldDeclaration) {
        FieldDeclaration field = (FieldDeclaration) declaration;
        Iterator<VariableDeclarationFragment> fragmentsIter = field.getFragments().iterator();
        while (fragmentsIter.hasNext()) {
          VariableDeclarationFragment fragment = fragmentsIter.next();
          // Don't delete any constants because we can't detect their use. Instead,
          // these are translated by the TypeDeclarationGenerator as #define directives,
          // so the enclosing type can still be deleted if otherwise empty.
          VariableElement var = fragment.getVariableElement();
          if (var.getConstantValue() == null
              && deadCodeMap.containsField(clazz, ElementUtil.getName(var))) {
            fragmentsIter.remove();
          }
        }
        if (field.getFragments().isEmpty()) {
          declarationsIter.remove();
        }
      }
    }
  }
1139128
public void onClearTypes(List<String> types) {

        if (types != null) {
            m_galleryDialog.getTypesTab().uncheckTypes(types);
        }
    }
751867
def cleanup_parameter_values
        abandoned_parameter_values = Discerner::ParameterValue.order(:id).to_a - updated_parameter_values - blank_parameter_values

        if self.options[:prune_dictionaries].blank?
          notification_message "if option --prune_dictionaries is not specified, parameter values for dictionaries that are not in parsed definition file should be deleted manually. Use `rake discerner:delete_dictionary' NAME='My dictionary name'"
          abandoned_parameter_values = abandoned_parameter_values.reject{|v| abandoned_dictionaries.include?(v.parameter.parameter_category.dictionary)}
        end

        used_parameter_values      = abandoned_parameter_values.select{|p| p.used_in_search?}
        not_used_parameter_values  = abandoned_parameter_values - used_parameter_values

        used_parameter_values.each do |r|
          notification_message("marking parameter value #{r.name} as deleted");
          r.deleted_at = Time.now
          error_message "parameter value could not be marked as deleted: #{r.errors.full_messages}", r.name unless r.save
        end

        unless not_used_parameter_values.blank?
          notification_message("permanently deleting parameter values #{not_used_parameter_values.map{|r| r.name}.join(', ')}");
          not_used_parameter_values.each{|r| r.destroy}
        end
      end
1296348
def clear(self):
        """"""
        for field in self.__privfields__:
            delattr(self, field)
            setattr(self, field, MPI(0))
658363
public void clear()
    {
        _version++;
        if (_version>1000)
        {
            _version=0;
            for (int i=_fields.size();i-->0;)
            {
                Field field=(Field)_fields.get(i);
                if (field!=null)
                    field.clear();
            }
        }
    }
1141406
public void clearBody() {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "clearBody");
    getPayload().setChoiceField(JmsMapBodyAccess.BODY, JmsMapBodyAccess.IS_BODY_EMPTY);
    // Need to create a new empty map, otherwise the old values appear from the buffer d343628
    bodyMap = new JsMsgMap(null, null);                                             // d343628
    // We also need to mark it as 'changed'. It would be have been nice to just        d327036.1
    // call getBodyMap().clear(), but we can't if the CCSID isn't supported            d327036.1
    bodyMap.setChanged();                                                           // d327036.1
    clearCachedLengths();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "clearBody");
  }
755298
private void removeDeadMethods(String clazz, List<BodyDeclaration> declarations) {
    Iterator<BodyDeclaration> declarationsIter = declarations.iterator();
    while (declarationsIter.hasNext()) {
      BodyDeclaration declaration = declarationsIter.next();
      if (declaration instanceof MethodDeclaration) {
        MethodDeclaration method = (MethodDeclaration) declaration;
        ExecutableElement elem = method.getExecutableElement();
        String name = typeUtil.getReferenceName(elem);
        String signature = typeUtil.getReferenceSignature(elem);
        if (deadCodeMap.containsMethod(clazz, name, signature)) {
          if (method.isConstructor()) {
            deadCodeMap.addConstructorRemovedClass(clazz);
          }
          if (Modifier.isNative(method.getModifiers())) {
            removeMethodOCNI(method);
          }
          declarationsIter.remove();
        }
      }
    }
  }
1304614
public static void cleanup ()
  {
    // Reinitialize singletons to the default values
    if (LocaleCache.isInstantiated ())
      LocaleCache.getInstance ().reinitialize ();
    if (CountryCache.isInstantiated ())
      CountryCache.getInstance ().reinitialize ();
    if (LanguageCache.isInstantiated ())
      LanguageCache.getInstance ().reinitialize ();
    if (SerializationConverterRegistry.isInstantiated ())
      SerializationConverterRegistry.getInstance ().reinitialize ();
    if (MimeTypeDeterminator.isInstantiated ())
      MimeTypeDeterminator.getInstance ().reinitialize ();
    if (ThirdPartyModuleRegistry.isInstantiated ())
      ThirdPartyModuleRegistry.getInstance ().reinitialize ();
    if (TypeConverterRegistry.isInstantiated ())
      TypeConverterRegistry.getInstance ().reinitialize ();
    if (URLProtocolRegistry.isInstantiated ())
      URLProtocolRegistry.getInstance ().reinitialize ();
    if (EqualsImplementationRegistry.isInstantiated ())
      EqualsImplementationRegistry.getInstance ().reinitialize ();
    if (HashCodeImplementationRegistry.isInstantiated ())
      HashCodeImplementationRegistry.getInstance ().reinitialize ();

    // Clear caches
    if (DefaultTextResolver.isInstantiated ())
      DefaultTextResolver.getInstance ().clearCache ();
    EnumHelper.clearCache ();
    ResourceBundleHelper.clearCache ();
    if (RegExCache.isInstantiated ())
      RegExCache.getInstance ().clearCache ();
    CollatorHelper.clearCache ();
    LocaleHelper.clearCache ();
    StatisticsManager.clearCache ();
    SystemProperties.clearWarnedPropertyNames ();
    if (ImageDataManager.isInstantiated ())
      ImageDataManager.getInstance ().clearCache ();

    // Clean this one last as it is used in equals and hashCode implementations!
    ClassHierarchyCache.clearCache ();
  }
910327
def cleaniddfield(acomm):
    """"""
    for key in list(acomm.keys()):
        val = acomm[key]
        acomm[key.lower()] = val
    for key in list(acomm.keys()):
        val = acomm[key]
        if key != key.lower():
            acomm.pop(key)
    return acomm
309338
synchronized private void clearCachedStructures() {
        mapsInitialized = false;
        packageMap = new HashMap();
        classSource = new HashMap();
        unqNameTable = null;
        nameSpaceChanged();
    }
989947
private void cleanup() {
        StatsDataReference ref = null;
        while ((ref = (StatsDataReference) statisticsReferenceQueue.poll()) != null) {
            StatsData oldStats = null;
            StatsData updatedStats = null;
            do {
                oldStats = terminatedThreadStats.get();
                updatedStats = aggregateStats(oldStats, ref.statsData);
            } while (!terminatedThreadStats.compareAndSet(oldStats, updatedStats));
            allReferences.remove(ref);
        }
    }
166987
static synchronized void clearTLDOverrides() {
        inUse = false;
        countryCodeTLDsPlus = MemoryReductionUtil.EMPTY_STRING_ARRAY;
        countryCodeTLDsMinus = MemoryReductionUtil.EMPTY_STRING_ARRAY;
        genericTLDsPlus = MemoryReductionUtil.EMPTY_STRING_ARRAY;
        genericTLDsMinus = MemoryReductionUtil.EMPTY_STRING_ARRAY;
    }
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]
779031
def DeleteSignedBinaryReferences(self,
                                   binary_id,
                                   cursor=None):
    """"""
    cursor.execute(
        """
      DELETE FROM signed_binary_references
      WHERE binary_type = %s AND binary_path_hash = %s
    """, [
        binary_id.binary_type.SerializeToDataStore(),
        mysql_utils.Hash(binary_id.path)
    ])
203508
private void deleteObject(DBObject dbObj) {
        for (String fieldName : dbObj.getUpdatedFieldNames()) {
            FieldUpdater fieldUpdater = FieldUpdater.createFieldUpdater(this, dbObj, fieldName);
            fieldUpdater.deleteValuesForField();
        }
        m_dbTran.deleteObjectRow(m_tableDef, dbObj.getObjectID());
    }
1025772
public void clearBody() {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "clearBody");
    softRefToDocument = null;
    clearCachedLengths();
    getPayload().setChoiceField(JmsTextBodyAccess.BODY, JmsTextBodyAccess.IS_BODY_EMPTY);
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "clearBody");
  }
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);
    }
  }