CloneSet20


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

/**
 * Clears the list of all objects;
 * it does no {@link #inverseRemove inverse} updating.
 */
protected void doClear() {
  super.clear();
}

/**
 * Sets the object at the index
 * and returns the old object at the index;
 * it does no ranging checking or uniqueness checking.
 * In addition to the normal effects, 
 * this override implementation generates notifications as {@link #isNotificationRequired required} 
 * and delegates to {@link #inverseAdd inverseAdd} and {@link #inverseRemove inverseRemove} as {@link #hasInverse required}.
 * @param index the position in question.
 * @param object the object to set.
 * @return the old object at the index.
 * @see #isNotificationRequired
 * @see #hasInverse
 * @see #inverseAdd
 * @see #inverseRemove
 */
@Override public E setUnique(int index, E object) {
  if (isNotificationRequired()) {
    NotificationChain notifications = null;
    boolean oldIsSet = isSet();
    E oldObject;
    Notification notification = createNotification(Notification.SET, oldObject = doSetUnique(index, object), object, index, oldIsSet);
    if (hasInverse() && !equalObjects(oldObject, object)) {
      if (oldObject != null) {
        notifications = inverseRemove(oldObject, notifications);
      }
      notifications = inverseAdd(object, notifications);
      if (hasShadow()) {
        notifications = shadowSet(oldObject, object, notifications);
      }
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    else {
      if (hasShadow()) {
        notifications = shadowSet(oldObject, object, notifications);
      }
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    return oldObject;
  }
  else {
    E oldObject = doSetUnique(index, object);
    if (hasInverse() && !equalObjects(oldObject, object)) {
      NotificationChain notifications = null;
      if (oldObject != null) {
        notifications = inverseRemove(oldObject, null);
      }
      notifications = inverseAdd(object, notifications);
      if (notifications != null)
        notifications.dispatch();
    }
    return oldObject;
  }
}

/**
 * Sets the object at the index
 * and returns the old object at the index;
 * it does no ranging checking, uniqueness checking, inverse updating or notification.
 * @param index the position in question.
 * @param object the object to set.
 * @return the old object at the index.
 */
protected E doSetUnique(int index, E object) {
  return super.setUnique(index, object);
}

/**
 * Sets the object at the index
 * and returns the potentially updated notification chain;
 * it does no {@link #hasInverse inverse} updating.
 * This implementation generates notifications as {@link #isNotificationRequired required}.
 * @param index the position in question.
 * @param object the object to set.
 * @return the notification chain.
 * @see #isNotificationRequired
 * @see #hasInverse
 * @see #inverseAdd
 * @see #inverseRemove
 */
public NotificationChain basicSet(int index, E object, NotificationChain notifications) {
  if (isNotificationRequired()) {
    boolean oldIsSet = isSet();
    NotificationImpl notification = createNotification(Notification.SET, doSetUnique(index, object), object, index, oldIsSet);
    if (notifications == null) {
      notifications = notification;
    }
    else {
      notifications.add(notification);
    }
  }
  else {
    doSetUnique(index, object);
  }
  return notifications;
}

/**
 * Moves the object at the source index of the list to the target index of the list
 * and returns the moved object.
 * In addition to the normal effects, 
 * this override implementation generates notifications as {@link #isNotificationRequired required}.
 * @param targetIndex the new position for the object in the list.
 * @param sourceIndex the old position of the object in the list.
 * @return the moved object.
 * @exception IndexOutOfBoundsException if either index isn't within the size range.
 * @see #isNotificationRequired
 */
@Override public E move(int targetIndex, int sourceIndex) {
  if (isNotificationRequired()) {
    boolean oldIsSet = isSet();
    E object = doMove(targetIndex, sourceIndex);
    dispatchNotification(createNotification(Notification.MOVE, sourceIndex, object, targetIndex, oldIsSet));
    return object;
  }
  else {
    return doMove(targetIndex, sourceIndex);
  }
}

/**
 * Moves the object at the source index of the list to the target index of the list
 * and returns the moved object;
 * it does no notification.
 * @param targetIndex the new position for the object in the list.
 * @param sourceIndex the old position of the object in the list.
 * @return the moved object.
 * @exception IndexOutOfBoundsException if either index isn't within the size range.
 */
protected E doMove(int targetIndex, int sourceIndex) {
  return super.move(targetIndex, sourceIndex);
}


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

/**
 * Clears the list of all objects;
 * it does no {@link #inverseRemove inverse} updating.
 */
protected void doClear() {
  super.clear();
}

/**
 * Sets the object at the index
 * and returns the old object at the index;
 * it does no ranging checking or uniqueness checking.
 * In addition to the normal effects, 
 * this override implementation generates notifications as {@link #isNotificationRequired required} 
 * and delegates to {@link #inverseAdd inverseAdd} and {@link #inverseRemove inverseRemove} as {@link #hasInverse required}.
 * @param index the position in question.
 * @param object the object to set.
 * @return the old object at the index.
 * @see #isNotificationRequired
 * @see #hasInverse
 * @see #inverseAdd
 * @see #inverseRemove
 */
@Override public E setUnique(int index, E object) {
  if (isNotificationRequired()) {
    NotificationChain notifications = null;
    boolean oldIsSet = isSet();
    E oldObject;
    Notification notification = createNotification(Notification.SET, oldObject = doSetUnique(index, object), object, index, oldIsSet);
    if (hasInverse() && !equalObjects(oldObject, object)) {
      if (oldObject != null) {
        notifications = inverseRemove(oldObject, notifications);
      }
      notifications = inverseAdd(object, notifications);
      if (hasShadow()) {
        notifications = shadowSet(oldObject, object, notifications);
      }
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    else {
      if (hasShadow()) {
        notifications = shadowSet(oldObject, object, notifications);
      }
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    return oldObject;
  }
  else {
    E oldObject = doSetUnique(index, object);
    if (hasInverse() && !equalObjects(oldObject, object)) {
      NotificationChain notifications = null;
      if (oldObject != null) {
        notifications = inverseRemove(oldObject, null);
      }
      notifications = inverseAdd(object, notifications);
      if (notifications != null)
        notifications.dispatch();
    }
    return oldObject;
  }
}

/**
 * Sets the object at the index
 * and returns the old object at the index;
 * it does no ranging checking, uniqueness checking, inverse updating or notification.
 * @param index the position in question.
 * @param object the object to set.
 * @return the old object at the index.
 */
protected E doSetUnique(int index, E object) {
  return super.setUnique(index, object);
}

/**
 * Sets the object at the index
 * and returns the potentially updated notification chain;
 * it does no {@link #hasInverse inverse} updating.
 * This implementation generates notifications as {@link #isNotificationRequired required}.
 * @param index the position in question.
 * @param object the object to set.
 * @return the notification chain.
 * @see #isNotificationRequired
 * @see #hasInverse
 * @see #inverseAdd
 * @see #inverseRemove
 */
public NotificationChain basicSet(int index, E object, NotificationChain notifications) {
  if (isNotificationRequired()) {
    boolean oldIsSet = isSet();
    NotificationImpl notification = createNotification(Notification.SET, doSetUnique(index, object), object, index, oldIsSet);
    if (notifications == null) {
      notifications = notification;
    }
    else {
      notifications.add(notification);
    }
  }
  else {
    doSetUnique(index, object);
  }
  return notifications;
}

/**
 * Moves the object at the source index of the list to the target index of the list
 * and returns the moved object.
 * In addition to the normal effects, 
 * this override implementation generates notifications as {@link #isNotificationRequired required}.
 * @param targetIndex the new position for the object in the list.
 * @param sourceIndex the old position of the object in the list.
 * @return the moved object.
 * @exception IndexOutOfBoundsException if either index isn't within the size range.
 * @see #isNotificationRequired
 */
@Override public E move(int targetIndex, int sourceIndex) {
  if (isNotificationRequired()) {
    boolean oldIsSet = isSet();
    E object = doMove(targetIndex, sourceIndex);
    dispatchNotification(createNotification(Notification.MOVE, sourceIndex, object, targetIndex, oldIsSet));
    return object;
  }
  else {
    return doMove(targetIndex, sourceIndex);
  }
}

/**
 * Moves the object at the source index of the list to the target index of the list
 * and returns the moved object;
 * it does no notification.
 * @param targetIndex the new position for the object in the list.
 * @param sourceIndex the old position of the object in the list.
 * @return the moved object.
 * @exception IndexOutOfBoundsException if either index isn't within the size range.
 */
protected E doMove(int targetIndex, int sourceIndex) {
  return super.move(targetIndex, sourceIndex);
}


Clone AbstractionParameter Count: 0Parameter Bindings

/**
   * Clears the list of all objects;
   * it does no {@link #inverseRemove inverse} updating.
   */
protected void doClear() {
  super.clear();
}

/**
   * Sets the object at the index
   * and returns the old object at the index;
   * it does no ranging checking or uniqueness checking.
   * In addition to the normal effects, 
   * this override implementation generates notifications as {@link #isNotificationRequired required} 
   * and delegates to {@link #inverseAdd inverseAdd} and {@link #inverseRemove inverseRemove} as {@link #hasInverse required}.
   * @param index the position in question.
   * @param object the object to set.
   * @return the old object at the index.
   * @see #isNotificationRequired
   * @see #hasInverse
   * @see #inverseAdd
   * @see #inverseRemove
   */
@Override public E setUnique(int index, E object) {
  if (isNotificationRequired()) {
    NotificationChain notifications = null;
    boolean oldIsSet = isSet();
    E oldObject;
    Notification notification = createNotification(Notification.SET, oldObject = doSetUnique(index, object), object, index, oldIsSet);
    if (hasInverse() && !equalObjects(oldObject, object)) {
      if (oldObject != null) {
        notifications = inverseRemove(oldObject, notifications);
      }
      notifications = inverseAdd(object, notifications);
      if (hasShadow()) {
        notifications = shadowSet(oldObject, object, notifications);
      }
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    else {
      if (hasShadow()) {
        notifications = shadowSet(oldObject, object, notifications);
      }
      if (notifications == null) {
        dispatchNotification(notification);
      }
      else {
        notifications.add(notification);
        notifications.dispatch();
      }
    }
    return oldObject;
  }
  else {
    E oldObject = doSetUnique(index, object);
    if (hasInverse() && !equalObjects(oldObject, object)) {
      NotificationChain notifications = null;
      if (oldObject != null) {
        notifications = inverseRemove(oldObject, null);
      }
      notifications = inverseAdd(object, notifications);
      if (notifications != null)
        notifications.dispatch();
    }
    return oldObject;
  }
}

/**
   * Sets the object at the index
   * and returns the old object at the index;
   * it does no ranging checking, uniqueness checking, inverse updating or notification.
   * @param index the position in question.
   * @param object the object to set.
   * @return the old object at the index.
   */
protected E doSetUnique(int index, E object) {
  return super.setUnique(index, object);
}

/**
   * Sets the object at the index
   * and returns the potentially updated notification chain;
   * it does no {@link #hasInverse inverse} updating.
   * This implementation generates notifications as {@link #isNotificationRequired required}.
   * @param index the position in question.
   * @param object the object to set.
   * @return the notification chain.
   * @see #isNotificationRequired
   * @see #hasInverse
   * @see #inverseAdd
   * @see #inverseRemove
   */
public NotificationChain basicSet(int index, E object, NotificationChain notifications) {
  if (isNotificationRequired()) {
    boolean oldIsSet = isSet();
    NotificationImpl notification = createNotification(Notification.SET, doSetUnique(index, object), object, index, oldIsSet);
    if (notifications == null) {
      notifications = notification;
    }
    else {
      notifications.add(notification);
    }
  }
  else {
    doSetUnique(index, object);
  }
  return notifications;
}

/**
   * Moves the object at the source index of the list to the target index of the list
   * and returns the moved object.
   * In addition to the normal effects, 
   * this override implementation generates notifications as {@link #isNotificationRequired required}.
   * @param targetIndex the new position for the object in the list.
   * @param sourceIndex the old position of the object in the list.
   * @return the moved object.
   * @exception IndexOutOfBoundsException if either index isn't within the size range.
   * @see #isNotificationRequired
   */
@Override public E move(int targetIndex, int sourceIndex) {
  if (isNotificationRequired()) {
    boolean oldIsSet = isSet();
    E object = doMove(targetIndex, sourceIndex);
    dispatchNotification(createNotification(Notification.MOVE, sourceIndex, object, targetIndex, oldIsSet));
    return object;
  }
  else {
    return doMove(targetIndex, sourceIndex);
  }
}

/**
   * Moves the object at the source index of the list to the target index of the list
   * and returns the moved object;
   * it does no notification.
   * @param targetIndex the new position for the object in the list.
   * @param sourceIndex the old position of the object in the list.
   * @return the moved object.
   * @exception IndexOutOfBoundsException if either index isn't within the size range.
   */
protected E doMove(int targetIndex, int sourceIndex) {
  return super.move(targetIndex, sourceIndex);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None