TODO Check values removing dirty entries (equals to -1)
168893
public void defrag() throws IOException {
    OLogManager.instance().debug(this, "Starting to defragment the segment %s of size=%d and filled=%d", file, file.getFileSize(),
        file.getFilledUpTo());

    OLogManager.instance().debug(this, "Defragmentation ended for segment %s. Current size=%d and filled=%d", file,
        file.getFileSize(), file.getFilledUpTo());
  }
435151
function clean(source) {
    if (!source) return BLANK;
    if (source.charCodeAt(0) === BOM_CODE) source = source.slice(1);
    source = source.replace(CR_REGEXP, BLANK).replace(TRAILING_WHITESPACE_REGEXP, BLANK);
    return source;
}
342232
def clean_values(self):
    
    for row in self.rows:
      for index, cell in enumerate(row):
        self.set_cell_value(row, index, self.clean_value(self.get_cell_value(cell)))
    return self
875681
public boolean removeInt(final int value)
    {
        @DoNotSub final int index = indexOf(value);
        if (-1 != index)
        {
            remove(index);

            return true;
        }

        return false;
    }
569680
def dirty(self):
        
        if self._dirty:
            return True
        else:
            for extension in self.recipe_extensions:
                if extension.dirty:
                    return True
        return False
1228498
function sanitizeValue(_ref) {
  var value = _ref.value,
      operator_keyword = _ref.operator_keyword,
      post_keyword = _ref.post_keyword;
  return parseInt(value, 10) * getMultiplier({
    operator_keyword: operator_keyword,
    post_keyword: post_keyword
  });
}
851356
private static int integerPart(String dirtyString) {
    int start = 0;

    while (start < dirtyString.length() && !Character.isDigit(dirtyString.charAt(start))) {
      ++start;
    }

    int end = start;
    while (end < dirtyString.length() && Character.isDigit(dirtyString.charAt(end))) {
      ++end;
    }

    if (start == end) {
      return 0;
    }

    return Integer.parseInt(dirtyString.substring(start, end));
  }
244179
function clean(value) {
  if (value === null || value === undefined) {
    return ''
  }

  return trim(
    collapse(String(value).replace(/[\u0021-\u0040]+/g, ' '))
  ).toLowerCase()
}
657121
def _prune_invalidated_entries(self):
        ""
        self.access_log_lock.acquire()
        self.access_log = deque(e for e in self.access_log if e.is_valid)
        self.access_log_lock.release()
951477
function indexOf(values, value){
    if (values.indexOf){
        return values.indexOf(value);
    } else {
        for (var i=0, len=values.length; i < len; i++){
            if (values[i] === value){
                return i;
            }
        }
        return -1;
    }
}
1139728
function cleanResultsStatus() {
        // remove criterias and spec if no criteria in spec
        for (const spec in mergedResults.specs) {
            if (!(spec in parseResults.specs.specTable) || Object.keys(parseResults.specs.specTable[spec].criteria).length === 0) {
                delete mergedResults.specs[spec];
            }
            else {
                const parsedCriteria = parseResults.specs.specTable[spec].criteria;
                const resultsCriteria = mergedResults.specs[spec];
                for (const criteria in resultsCriteria) {
                    if (!(criteria in parsedCriteria)) {
                        delete mergedResults.specs[spec][criteria];
                    }
                }
            }
        }
        for (const testcase in mergedResults.testcases) {
            if (!(testcase in parseResults.testcases.testcaseTable)) {
                delete mergedResults.testcases[testcase];
            }
        }
        // add criteria
        for (const spec in parseResults.specs.specTable) {
            if (!(spec in mergedResults.specs)) {
                mergedResults.specs[spec] = {};
            }
            const parsedCriteria = parseResults.specs.specTable[spec].criteria;
            const resultsCriteria = mergedResults.specs[spec];
            for (const criteria in parsedCriteria) {
                if (!(criteria in resultsCriteria)) {
                    mergedResults.specs[spec][criteria] = {
                        dateTime,
                        status: 'unknown',
                        resultsFolder: undefined,
                    };
                    if (criteria in criteriaAnalysis.specs[spec].manual) {
                        mergedResults.specs[spec][criteria].manual = true;
                    }
                }
            }
        }
        for (const testcase in parseResults.testcases.testcaseTable) {
            if (!(testcase in mergedResults.testcases)) {
                mergedResults.testcases[testcase] = {
                    dateTime,
                    status: 'unknown',
                    resultsFolder: undefined,
                };
            }
        }
        fs.writeFileSync(mergedResultsPath, JSON.stringify(mergedResults), { encoding: 'utf8' });
    }
1321057
function init () {
  return {
    cleanTs: 0,
    dirtyTs: 0,
    queue: false,
    write: false,
    value: null,
    since: -1
  }
}
936103
def clean(self, value):
        """"""

        if isinstance(value, numpy.ndarray):
            return value
        elif isinstance(value, (list, tuple)):
            return numpy.array(value)

        raise ParameterNotValidError
626360
def scrub(value, scrub_text=_keep_whitespace, scrub_number=_scrub_number):
    
    return _scrub(value, set(), [], scrub_text=scrub_text, scrub_number=scrub_number)
606730
@Override
    public void deleteValuesForField() {
        int shardNo = m_tableDef.getShardNumber(m_dbObj);
        m_dbTran.deleteAllObjectsColumn(m_tableDef, m_dbObj.getObjectID(), shardNo);
    }
833373
def _sanitize_numbers(uncleaned_numbers):
    
    cleaned_numbers = []
    for x in uncleaned_numbers:
        try:
            cleaned_numbers.append(int(x))
        except ValueError:
            cleaned_numbers.append(x)
    return cleaned_numbers
894116
def _clean_intenum(obj):
    """"""

    if isinstance(obj, dict):
        for key, value in obj.items():
            if isinstance(value, IntEnum):
                obj[key] = value.value
            elif isinstance(value, (dict, list)):
                obj[key] = _clean_intenum(value)
    elif isinstance(obj, list):
        for i, value in enumerate(obj):
            if isinstance(value, IntEnum):
                obj[i] = value.value
            elif isinstance(value, (dict, list)):
                obj[i] = _clean_intenum(value)

    return obj