<commit_before>/*
 * Copyright (C) 2000 - 2017 Silverpeas
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * As a special exception to the terms and conditions of version 3.0 of
 * the GPL, you may redistribute this Program in connection with Free/Libre
 * Open Source Software ("FLOSS") applications as described in Silverpeas's
 * FLOSS exception. You should have received a copy of the text describing
 * the FLOSS exception, and it is also available here:
 * "http://www.silverpeas.org/docs/core/legal/floss_exception.html"
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.silverpeas.core.util;

import org.silverpeas.core.SilverpeasRuntimeException;

import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Spliterator;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.UnaryOperator;

/**
 * A wrapper of {@link List} instances.
 * @author <NAME>
 */
public class SilverpeasListWrapper<E> implements SilverpeasList<E> {

  private final List<E> wrappedList;

  SilverpeasListWrapper(final List<E> wrappedList) {
    this.wrappedList = wrappedList;
  }

  @Override
  public long maxSize() {
    return wrappedList instanceof SilverpeasList ?
        ((SilverpeasList) wrappedList).maxSize() :
        size();
  }

  public boolean containsAll(Collection<?> c) {
    return wrappedList.containsAll(c);
  }

  public boolean equals(Object o) {
    return wrappedList.equals(o);
  }

  public int hashCode() {
    return wrappedList.hashCode();
  }

  public int size() {
    return wrappedList.size();
  }

  public boolean isEmpty() {
    return wrappedList.isEmpty();
  }

  public boolean contains(Object o) {
    return wrappedList.contains(o);
  }

  public int indexOf(Object o) {
    return wrappedList.indexOf(o);
  }

  public int lastIndexOf(Object o) {
    return wrappedList.lastIndexOf(o);
  }

  @SuppressWarnings("unchecked")
  public SilverpeasList<E> clone() {
    try {
      return (SilverpeasList) super.clone();
    } catch (CloneNotSupportedException e) {
      throw new SilverpeasRuntimeException(e);
    }
  }

  public Object[] toArray() {
    return wrappedList.toArray();
  }

  public <T> T[] toArray(T[] a) {
    return wrappedList.toArray(a);
  }

  public E get(int index) {
    return wrappedList.get(index);
  }

  public E set(int index, E element) {
    return wrappedList.set(index, element);
  }

  public boolean add(E e) {
    return wrappedList.add(e);
  }

  public void add(int index, E element) {
    wrappedList.add(index, element);
  }

  public E remove(int index) {
    return wrappedList.remove(index);
  }

  public boolean remove(Object o) {
    return wrappedList.remove(o);
  }

  public void clear() {
    wrappedList.clear();
  }

  public boolean addAll(Collection<? extends E> c) {
    return wrappedList.addAll(c);
  }

  public boolean addAll(int index, Collection<? extends E> c) {
    return wrappedList.addAll(index, c);
  }

  public boolean removeAll(Collection<?> c) {
    return wrappedList.removeAll(c);
  }

  public boolean retainAll(Collection<?> c) {
    return wrappedList.retainAll(c);
  }

  public ListIterator<E> listIterator(int index) {
    return wrappedList.listIterator(index);
  }

  public ListIterator<E> listIterator() {
    return wrappedList.listIterator();
  }

  public Iterator<E> iterator() {
    return wrappedList.iterator();
  }

  public List<E> subList(int fromIndex, int toIndex) {
    return wrappedList.subList(fromIndex, toIndex);
  }

  public void forEach(Consumer<? super E> action) {
    wrappedList.forEach(action);
  }

  public Spliterator<E> spliterator() {
    return wrappedList.spliterator();
  }

  public boolean removeIf(Predicate<? super E> filter) {
    return wrappedList.removeIf(filter);
  }

  public void replaceAll(UnaryOperator<E> operator) {
    wrappedList.replaceAll(operator);
  }

  public void sort(Comparator<? super E> c) {
    wrappedList.sort(c);
  }
}
<commit_msg>Take into account the analysis result of coverty scan<commit_after>/*
 * Copyright (C) 2000 - 2017 Silverpeas
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * As a special exception to the terms and conditions of version 3.0 of
 * the GPL, you may redistribute this Program in connection with Free/Libre
 * Open Source Software ("FLOSS") applications as described in Silverpeas's
 * FLOSS exception. You should have received a copy of the text describing
 * the FLOSS exception, and it is also available here:
 * "http://www.silverpeas.org/docs/core/legal/floss_exception.html"
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.silverpeas.core.util;

import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Spliterator;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.UnaryOperator;

/**
 * A wrapper of {@link List} instances.
 * @author <NAME>
 */
public class SilverpeasListWrapper<E> implements SilverpeasList<E> {

  private final List<E> wrappedList;

  SilverpeasListWrapper(final List<E> wrappedList) {
    this.wrappedList = wrappedList;
  }

  @Override
  public long maxSize() {
    return wrappedList instanceof SilverpeasList ?
        ((SilverpeasList) wrappedList).maxSize() :
        size();
  }

  public boolean containsAll(Collection<?> c) {
    return wrappedList.containsAll(c);
  }

  public boolean equals(Object o) {
    return wrappedList.equals(o);
  }

  public int hashCode() {
    return wrappedList.hashCode();
  }

  public int size() {
    return wrappedList.size();
  }

  public boolean isEmpty() {
    return wrappedList.isEmpty();
  }

  public boolean contains(Object o) {
    return wrappedList.contains(o);
  }

  public int indexOf(Object o) {
    return wrappedList.indexOf(o);
  }

  public int lastIndexOf(Object o) {
    return wrappedList.lastIndexOf(o);
  }

  public Object[] toArray() {
    return wrappedList.toArray();
  }

  public <T> T[] toArray(T[] a) {
    return wrappedList.toArray(a);
  }

  public E get(int index) {
    return wrappedList.get(index);
  }

  public E set(int index, E element) {
    return wrappedList.set(index, element);
  }

  public boolean add(E e) {
    return wrappedList.add(e);
  }

  public void add(int index, E element) {
    wrappedList.add(index, element);
  }

  public E remove(int index) {
    return wrappedList.remove(index);
  }

  public boolean remove(Object o) {
    return wrappedList.remove(o);
  }

  public void clear() {
    wrappedList.clear();
  }

  public boolean addAll(Collection<? extends E> c) {
    return wrappedList.addAll(c);
  }

  public boolean addAll(int index, Collection<? extends E> c) {
    return wrappedList.addAll(index, c);
  }

  public boolean removeAll(Collection<?> c) {
    return wrappedList.removeAll(c);
  }

  public boolean retainAll(Collection<?> c) {
    return wrappedList.retainAll(c);
  }

  public ListIterator<E> listIterator(int index) {
    return wrappedList.listIterator(index);
  }

  public ListIterator<E> listIterator() {
    return wrappedList.listIterator();
  }

  public Iterator<E> iterator() {
    return wrappedList.iterator();
  }

  public List<E> subList(int fromIndex, int toIndex) {
    return wrappedList.subList(fromIndex, toIndex);
  }

  public void forEach(Consumer<? super E> action) {
    wrappedList.forEach(action);
  }

  public Spliterator<E> spliterator() {
    return wrappedList.spliterator();
  }

  public boolean removeIf(Predicate<? super E> filter) {
    return wrappedList.removeIf(filter);
  }

  public void replaceAll(UnaryOperator<E> operator) {
    wrappedList.replaceAll(operator);
  }

  public void sort(Comparator<? super E> c) {
    wrappedList.sort(c);
  }
}

{'fraction_non_alphanumeric': 0.10327288810260947, 'fraction_numerical': 0.0024325519681556835, 'mean_word_length': 3.708485163977095, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '681224', 'n_tokens_mistral': 2762, 'n_tokens_neox': 2679, 'n_words': 836}