CloneSet4607


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
21230.980executable_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
121972
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java
2101063
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java
Clone Instance
1
Line Count
21
Source Line
972
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java

                                                                                                  {
                                // regular element addition
                                if (isPrimaryWorkingCopy(element, elementType))  {
                                        // filter out changes to primary compilation unit in working copy mode
                                        // just report a change to the resource (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=59500)
                                        currentDelta().changed(element, IJavaElementDelta.F_PRIMARY_RESOURCE);
                                }
                                else   {
                                        addToParentInfo(element);

                                        // Force the element to be closed as it might have been opened 
                                        // before the resource modification came in and it might have a new child
                                        // For example, in an IWorkspaceRunnable:
                                        // 1. create a package fragment p using a java model operation
                                        // 2. open package p
                                        // 3. add file X.java in folder p
                                        // When the resource delta comes in, only the addition of p is notified, 
                                        // but the package p is already opened, thus its children are not recomputed
                                        // and it appears empty.
                                        close(element);

                                        currentDelta().added(element);
                                }
                                                                                                  }


Clone Instance
2
Line Count
10
Source Line
1063
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java

                                                                                        {
                        // regular element removal
                        if (isPrimaryWorkingCopy(element, elementType))  {
                                // filter out changes to primary compilation unit in working copy mode
                                // just report a change to the resource (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=59500)
                                currentDelta().changed(element, IJavaElementDelta.F_PRIMARY_RESOURCE);
                        }
                        else   {
                                close(element);
                                removeFromParentInfo(element);
                                currentDelta().removed(element);
                        }
                                                                                        }


Clone AbstractionParameter Count: 3Parameter Bindings

{
  // regular element addition
  // regular element removal
  if (isPrimaryWorkingCopy(element, elementType)) {
    // filter out changes to primary compilation unit in working copy mode
    // just report a change to the resource (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=59500)
    currentDelta().changed(element, IJavaElementDelta.F_PRIMARY_RESOURCE);
  }
  else {
     [[#variable5ebb2c00]](element);
     [[#variable5ebb2ba0]](element);
    currentDelta(). [[#variable5ebb2b40]](element);
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5ebb2c00]]
addToParentInfo 
12[[#5ebb2c00]]
close 
21[[#5ebb2ba0]]
// Force the element to be closed as it might have been opened 
// before the resource modification came in and it might have a new child
// For example, in an IWorkspaceRunnable:
// 1. create a package fragment p using a java model operation
// 2. open package p
// 3. add file X.java in folder p
// When the resource delta comes in, only the addition of p is notified, 
// but the package p is already opened, thus its children are not recomputed
// and it appears empty.
close 
22[[#5ebb2ba0]]
removeFromParentInfo 
31[[#5ebb2b40]]
added 
32[[#5ebb2b40]]
removed