CloneSet329


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
47220.983class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14782
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NaiveASTFlattener.java
24771
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java
Clone Instance
1
Line Count
47
Source Line
82
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NaiveASTFlattener.java

        /**
         * Appends the text representation of the given modifier flags, followed by a single space.
         * Used for 3.0 modifiers and annotations.
         * 
         * @param ext the list of modifier and annotation nodes
         * (element type: <code>IExtendedModifiers</code>)
         */
        void printModifiers(List ext) {
                for (Iterator it = ext.iterator(); it.hasNext();)  {
                        ASTNode p = (ASTNode) it.next();
                        p.accept(this );
                        this.buffer.append(" "); //$NON-NLS-1$
                }
        }

        /**
         * Appends the text representation of the given modifier flags, followed by a single space.
         * Used for JLS2 modifiers.
         * 
         * @param modifiers the modifier flags
         */
        void printModifiers(int modifiers) {
                if (Modifier.isPublic(modifiers)) {
                        this.buffer.append("public "); //$NON-NLS-1$
                }
                if (Modifier.isProtected(modifiers)) {
                        this.buffer.append("protected "); //$NON-NLS-1$
                }
                if (Modifier.isPrivate(modifiers)) {
                        this.buffer.append("private "); //$NON-NLS-1$
                }
                if (Modifier.isStatic(modifiers)) {
                        this.buffer.append("static "); //$NON-NLS-1$
                }
                if (Modifier.isAbstract(modifiers)) {
                        this.buffer.append("abstract "); //$NON-NLS-1$
                }
                if (Modifier.isFinal(modifiers)) {
                        this.buffer.append("final "); //$NON-NLS-1$
                }
                if (Modifier.isSynchronized(modifiers)) {
                        this.buffer.append("synchronized "); //$NON-NLS-1$
                }
                if (Modifier.isVolatile(modifiers)) {
                        this.buffer.append("volatile "); //$NON-NLS-1$
                }
                if (Modifier.isNative(modifiers)) {
                        this.buffer.append("native "); //$NON-NLS-1$
                }
                if (Modifier.isStrictfp(modifiers)) {
                        this.buffer.append("strictfp "); //$NON-NLS-1$
                }
                if (Modifier.isTransient(modifiers)) {
                        this.buffer.append("transient "); //$NON-NLS-1$
                }
        }


Clone Instance
2
Line Count
47
Source Line
71
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java

        /**
         * Appends the text representation of the given modifier flags, followed by a single space.
         * Used for 3.0 modifiers and annotations.
         * 
         * @param ext the list of modifier and annotation nodes
         * (element type: <code>IExtendedModifiers</code>)
         */
        private void printModifiers(List ext) {
                for (Iterator it = ext.iterator(); it.hasNext();) {
                        ASTNode p = (ASTNode) it.next();
                        p.accept(this );
                        this.fBuffer.append(" "); //$NON-NLS-1$
                }
        }

        /**
         * Appends the text representation of the given modifier flags, followed by a single space.
         * Used for JLS2 modifiers.
         * 
         * @param modifiers the modifier flags
         */
        private void printModifiers(int modifiers) {
                if (Modifier.isPublic(modifiers)) {
                        this.fBuffer.append("public "); //$NON-NLS-1$
                }
                if (Modifier.isProtected(modifiers)) {
                        this.fBuffer.append("protected "); //$NON-NLS-1$
                }
                if (Modifier.isPrivate(modifiers)) {
                        this.fBuffer.append("private "); //$NON-NLS-1$
                }
                if (Modifier.isStatic(modifiers)) {
                        this.fBuffer.append("static "); //$NON-NLS-1$
                }
                if (Modifier.isAbstract(modifiers)) {
                        this.fBuffer.append("abstract "); //$NON-NLS-1$
                }
                if (Modifier.isFinal(modifiers)) {
                        this.fBuffer.append("final "); //$NON-NLS-1$
                }
                if (Modifier.isSynchronized(modifiers)) {
                        this.fBuffer.append("synchronized "); //$NON-NLS-1$
                }
                if (Modifier.isVolatile(modifiers)) {
                        this.fBuffer.append("volatile "); //$NON-NLS-1$
                }
                if (Modifier.isNative(modifiers)) {
                        this.fBuffer.append("native "); //$NON-NLS-1$
                }
                if (Modifier.isStrictfp(modifiers)) {
                        this.fBuffer.append("strictfp "); //$NON-NLS-1$
                }
                if (Modifier.isTransient(modifiers)) {
                        this.fBuffer.append("transient "); //$NON-NLS-1$
                }
        }


Clone AbstractionParameter Count: 2Parameter Bindings

 [[#variable5aca09e0]]
/**
         * Appends the text representation of the given modifier flags, followed by a single space.
         * Used for 3.0 modifiers and annotations.
         * 
         * @param ext the list of modifier and annotation nodes
         * (element type: <code>IExtendedModifiers</code>)
         */
void printModifiers(List ext) {
  for (Iterator it = ext.iterator(); it.hasNext();) {
    ASTNode p = (ASTNode) it.next();
    p.accept(this );
    this. [[#variable5aca0940]].append(" "); //$NON-NLS-1$
  }
}

 [[#variable5aca09e0]]
/**
         * Appends the text representation of the given modifier flags, followed by a single space.
         * Used for JLS2 modifiers.
         * 
         * @param modifiers the modifier flags
         */
void printModifiers(int modifiers) {
  if (Modifier.isPublic(modifiers)) {
    this. [[#variable5aca0940]].append("public "); //$NON-NLS-1$
  }
  if (Modifier.isProtected(modifiers)) {
    this. [[#variable5aca0940]].append("protected "); //$NON-NLS-1$
  }
  if (Modifier.isPrivate(modifiers)) {
    this. [[#variable5aca0940]].append("private "); //$NON-NLS-1$
  }
  if (Modifier.isStatic(modifiers)) {
    this. [[#variable5aca0940]].append("static "); //$NON-NLS-1$
  }
  if (Modifier.isAbstract(modifiers)) {
    this. [[#variable5aca0940]].append("abstract "); //$NON-NLS-1$
  }
  if (Modifier.isFinal(modifiers)) {
    this. [[#variable5aca0940]].append("final "); //$NON-NLS-1$
  }
  if (Modifier.isSynchronized(modifiers)) {
    this. [[#variable5aca0940]].append("synchronized "); //$NON-NLS-1$
  }
  if (Modifier.isVolatile(modifiers)) {
    this. [[#variable5aca0940]].append("volatile "); //$NON-NLS-1$
  }
  if (Modifier.isNative(modifiers)) {
    this. [[#variable5aca0940]].append("native "); //$NON-NLS-1$
  }
  if (Modifier.isStrictfp(modifiers)) {
    this. [[#variable5aca0940]].append("strictfp "); //$NON-NLS-1$
  }
  if (Modifier.isTransient(modifiers)) {
    this. [[#variable5aca0940]].append("transient "); //$NON-NLS-1$
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5aca09e0]]
12[[#5aca09e0]]
/**
 * Appends the text representation of the given modifier flags, followed by a single space.
 * Used for 3.0 modifiers and annotations.
 * 
 * @param ext the list of modifier and annotation nodes
 * (element type: <code>IExtendedModifiers</code>)
 */
private 
21[[#5aca0940]]
buffer 
22[[#5aca0940]]
fBuffer