CloneSet33


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
113210.989class_body_declarations[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1113635
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/common/notify/impl/DelegatingNotifyingListImpl.java
2113650
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/common/notify/impl/NotifyingListImpl.java
Next
Last
Clone Instance
1
Line Count
113
Source Line
635
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/common/notify/impl/DelegatingNotifyingListImpl.java

/**
 * Adds each object from start to end of the array at each successive index in the list 
 * and returns whether any objects were added;
 * it does no ranging checking, uniqueness checking, inverse updating, or notification.
 * @param index the index at which to add.
 * @param objects the objects to be added.
 * @param start the index of first object to be added.
 * @param end the index past the last object to be added.
 * @return whether any objects were added.
 */
protected boolean doAddAllUnique(int index, Object[] objects, int start, int end) {
  return super.addAllUnique(index, objects, start, end);
}

/**
 * Adds the object at the end of the list and returns the potentially updated notification chain;
 * it does no {@link #inverseAdd inverse} updating.
 * This implementation generates notifications as {@link #isNotificationRequired required}.
 * @param object the object to be added.
 * @return the notification chain.
 * @see #isNotificationRequired
 * @see #hasInverse
 * @see #inverseAdd
 */
public NotificationChain basicAdd(E object, NotificationChain notifications) {
  if (isNotificationRequired()) {
    int index = size();
    boolean oldIsSet = isSet();
    doAddUnique(index, object);
    NotificationImpl notification = createNotification(Notification.ADD, null, object, index, oldIsSet);
    if (notifications == null) {
      notifications = notification;
    }
    else {
      notifications.add(notification);
    }
  }
  else {
    doAddUnique(size(), object);
  }
  return notifications;
}

/**
 * Removes the object at the index from the list and returns it.
 * In addition to the normal effects, 
 * this override implementation generates notifications as {@link #isNotificationRequired required} 
 * and delegates to {@link #inverseRemove inverseRemove} as {@link #hasInverse required}.
 * @param index the position of the object to remove.
 * @return the removed object.
 * @exception IndexOutOfBoundsException if the index isn't within the size range.
 * @see #isNotificationRequired
 * @see #hasInverse
 * @see #inverseRemove
 */
@Override public E remove(int index) {
  if (isNotificationRequired()) {
    NotificationChain notifications = null;
    boolean oldIsSet = isSet();
    if (hasShadow()) {
      notifications = shadowRemove(basicGet(index), null);
    }
    E oldObject;
    NotificationImpl notification = createNotification(Notification.REMOVE, oldObject = doRemove(index), null, index, oldIsSet);
    if (hasInverse() && oldObject != null) {
      notifications = inverseRemove(oldObject, notifications);
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    else {
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    return oldObject;
  }
  else {
    E oldObject = doRemove(index);
    if (hasInverse() && oldObject != null) {
      NotificationChain notifications = inverseRemove(oldObject, null);
      if (notifications != null)
        notifications.dispatch();
    }
    return oldObject;
  }
}

/**
 * Removes the object at the index from the list and returns it;
 * it does no inverse updating, or notification.
 * @param index the position of the object to remove.
 * @return the removed object.
 * @exception IndexOutOfBoundsException if the index isn't within the size range.
 */
protected E doRemove(int index) {
  return super.remove(index);
}


First
Previous
Clone Instance
2
Line Count
113
Source Line
650
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/common/notify/impl/NotifyingListImpl.java

/**
 * Adds each object from start to end of the array at each successive index in the list 
 * and returns whether any objects were added;
 * it does no ranging checking, uniqueness checking, inverse updating, or notification.
 * @param index the index at which to add.
 * @param objects the objects to be added.
 * @param start the index of first object to be added.
 * @param end the index past the last object to be added.
 * @return whether any objects were added.
 */
protected boolean doAddAllUnique(int index, Object[] objects, int start, int end) {
  return super.addAllUnique(index, objects, start, end);
}

/**
 * Adds the object at the end of the list and returns the potentially updated notification chain;
 * it does no {@link #inverseAdd inverse} updating.
 * This implementation generates notifications as {@link #isNotificationRequired required}.
 * @param object the object to be added.
 * @return the notification chain.
 * @see #isNotificationRequired
 * @see #hasInverse
 * @see #inverseAdd
 */
public NotificationChain basicAdd(E object, NotificationChain notifications) {
  if (isNotificationRequired()) {
    int index = size;
    boolean oldIsSet = isSet();
    doAddUnique(index, object);
    NotificationImpl notification = createNotification(Notification.ADD, null, object, index, oldIsSet);
    if (notifications == null) {
      notifications = notification;
    }
    else {
      notifications.add(notification);
    }
  }
  else {
    doAddUnique(size, object);
  }
  return notifications;
}

/**
 * Removes the object at the index from the list and returns it.
 * In addition to the normal effects, 
 * this override implementation generates notifications as {@link #isNotificationRequired required} 
 * and delegates to {@link #inverseRemove inverseRemove} as {@link #hasInverse required}.
 * @param index the position of the object to remove.
 * @return the removed object.
 * @exception IndexOutOfBoundsException if the index isn't within the size range.
 * @see #isNotificationRequired
 * @see #hasInverse
 * @see #inverseRemove
 */
@Override public E remove(int index) {
  if (isNotificationRequired()) {
    NotificationChain notifications = null;
    boolean oldIsSet = isSet();
    if (hasShadow()) {
      notifications = shadowRemove(basicGet(index), null);
    }
    E oldObject;
    NotificationImpl notification = createNotification(Notification.REMOVE, oldObject = doRemove(index), null, index, oldIsSet);
    if (hasInverse() && oldObject != null) {
      notifications = inverseRemove(oldObject, notifications);
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    else {
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    return oldObject;
  }
  else {
    E oldObject = doRemove(index);
    if (hasInverse() && oldObject != null) {
      NotificationChain notifications = inverseRemove(oldObject, null);
      if (notifications != null)
        notifications.dispatch();
    }
    return oldObject;
  }
}

/**
 * Removes the object at the index from the list and returns it;
 * it does no inverse updating, or notification.
 * @param index the position of the object to remove.
 * @return the removed object.
 * @exception IndexOutOfBoundsException if the index isn't within the size range.
 */
protected E doRemove(int index) {
  return super.remove(index);
}


Clone AbstractionParameter Count: 1Parameter Bindings

/**
   * Adds each object from start to end of the array at each successive index in the list 
   * and returns whether any objects were added;
   * it does no ranging checking, uniqueness checking, inverse updating, or notification.
   * @param index the index at which to add.
   * @param objects the objects to be added.
   * @param start the index of first object to be added.
   * @param end the index past the last object to be added.
   * @return whether any objects were added.
   */
protected boolean doAddAllUnique(int index, Object[] objects, int start, int end) {
  return super.addAllUnique(index, objects, start, end);
}

/**
   * Adds the object at the end of the list and returns the potentially updated notification chain;
   * it does no {@link #inverseAdd inverse} updating.
   * This implementation generates notifications as {@link #isNotificationRequired required}.
   * @param object the object to be added.
   * @return the notification chain.
   * @see #isNotificationRequired
   * @see #hasInverse
   * @see #inverseAdd
   */
public NotificationChain basicAdd(E object, NotificationChain notifications) {
  if (isNotificationRequired()) {
    int index = [[#variable146aabc0]];
    boolean oldIsSet = isSet();
    doAddUnique(index, object);
    NotificationImpl notification = createNotification(Notification.ADD, null, object, index, oldIsSet);
    if (notifications == null) {
      notifications = notification;
    }
    else {
      notifications.add(notification);
    }
  }
  else {
    doAddUnique( [[#variable146aabc0]], object);
  }
  return notifications;
}

/**
   * Removes the object at the index from the list and returns it.
   * In addition to the normal effects, 
   * this override implementation generates notifications as {@link #isNotificationRequired required} 
   * and delegates to {@link #inverseRemove inverseRemove} as {@link #hasInverse required}.
   * @param index the position of the object to remove.
   * @return the removed object.
   * @exception IndexOutOfBoundsException if the index isn't within the size range.
   * @see #isNotificationRequired
   * @see #hasInverse
   * @see #inverseRemove
   */
@Override public E remove(int index) {
  if (isNotificationRequired()) {
    NotificationChain notifications = null;
    boolean oldIsSet = isSet();
    if (hasShadow()) {
      notifications = shadowRemove(basicGet(index), null);
    }
    E oldObject;
    NotificationImpl notification = createNotification(Notification.REMOVE, oldObject = doRemove(index), null, index, oldIsSet);
    if (hasInverse() && oldObject != null) {
      notifications = inverseRemove(oldObject, notifications);
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    else {
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    return oldObject;
  }
  else {
    E oldObject = doRemove(index);
    if (hasInverse() && oldObject != null) {
      NotificationChain notifications = inverseRemove(oldObject, null);
      if (notifications != null)
        notifications.dispatch();
    }
    return oldObject;
  }
}

/**
   * Removes the object at the index from the list and returns it;
   * it does no inverse updating, or notification.
   * @param index the position of the object to remove.
   * @return the removed object.
   * @exception IndexOutOfBoundsException if the index isn't within the size range.
   */
protected E doRemove(int index) {
  return super.remove(index);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#146aabc0]]
size() 
12[[#146aabc0]]
size