Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
66 | 3 | 0 | 1.000 | class_body_declarations[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 67 | 391 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java |
2 | 66 | 288 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationExpression.java |
3 | 66 | 291 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationStatement.java |
| ||||
/** * Returns the live ordered list of modifiers and annotations * of this declaration (added in JLS3 API). * <p> * Note that the final modifier is the only meaningful modifier for local * variable and formal parameter declarations. * </p> * * @return the live list of modifiers and annotations * (element type: <code>IExtendedModifier</code>) * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ public List modifiers() { // more efficient than just calling unsupportedIn2() to check if (this.modifiers == null) { unsupportedIn2(); } return this.modifiers; } /** * Returns the modifiers explicitly specified on this declaration. * <p> * In the JLS3 API, this method is a convenience method that * computes these flags from <code>modifiers()</code>. * </p> * * @return the bit-wise or of <code>Modifier</code> constants * @see Modifier */ public int getModifiers() { // more efficient than checking getAST().API_LEVEL if (this.modifiers == null) { // JLS2 behavior - bona fide property return this.modifierFlags; } else { // JLS3 behavior - convenient method // performance could be improved by caching computed flags // but this would require tracking changes to this.modifiers int computedModifierFlags = Modifier.NONE; for (Iterator it = modifiers().iterator(); it.hasNext();) { Object x = it.next(); if (x instanceof Modifier) { computedModifierFlags |= ((Modifier) x).getKeyword().toFlagValue(); } } return computedModifierFlags; } } /** * Sets the modifiers explicitly specified on this declaration (JLS2 API only). * <p> * The following modifiers are meaningful for fields: public, private, protected, * static, final, volatile, and transient. For local variable and formal * parameter declarations, the only meaningful modifier is final. * </p> * * @param modifiers the given modifiers (bit-wise or of <code>Modifier</code> constants) * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @see Modifier * @deprecated In the JLS3 API, this method is replaced by * {@link #modifiers()} which contains a list of a <code>Modifier</code> nodes. */ public void setModifiers(int modifiers) { internalSetModifiers(modifiers); } /** * Internal synonym for deprecated method. Used to avoid * deprecation warnings. * @since 3.1 */ /*package*/ final void internalSetModifiers(int pmodifiers) { supportedOnlyIn2(); preValueChange(MODIFIERS_PROPERTY); this.modifierFlags = pmodifiers; postValueChange(MODIFIERS_PROPERTY); } |
| ||||
/** * Returns the live ordered list of modifiers and annotations * of this declaration (added in JLS3 API). * <p> * Note that the final modifier is the only meaningful modifier for local * variable declarations. * </p> * * @return the live list of modifiers and annotations * (element type: <code>IExtendedModifier</code>) * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ public List modifiers() { // more efficient than just calling unsupportedIn2() to check if (this.modifiers == null) { unsupportedIn2(); } return this.modifiers; } /** * Returns the modifiers explicitly specified on this declaration. * <p> * In the JLS3 API, this method is a convenience method that * computes these flags from <code>modifiers()</code>. * </p> * * @return the bit-wise or of <code>Modifier</code> constants * @see Modifier */ public int getModifiers() { // more efficient than checking getAST().API_LEVEL if (this.modifiers == null) { // JLS2 behavior - bona fide property return this.modifierFlags; } else { // JLS3 behavior - convenient method // performance could be improved by caching computed flags // but this would require tracking changes to this.modifiers int computedModifierFlags = Modifier.NONE; for (Iterator it = modifiers().iterator(); it.hasNext();) { Object x = it.next(); if (x instanceof Modifier) { computedModifierFlags |= ((Modifier) x).getKeyword().toFlagValue(); } } return computedModifierFlags; } } /** * Sets the modifiers explicitly specified on this declaration (JLS2 API only). * <p> * Note that the final modifier is the only meaningful modifier for local * variable declarations. * </p> * * @param modifiers the given modifiers (bit-wise or of <code>Modifier</code> constants) * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @see Modifier * @deprecated In the JLS3 API, this method is replaced by * {@link #modifiers()} which contains a list of a <code>Modifier</code> nodes. */ public void setModifiers(int modifiers) { internalSetModifiers(modifiers); } /** * Internal synonym for deprecated method. Used to avoid * deprecation warnings. * @since 3.1 */ /*package*/ final void internalSetModifiers(int pmodifiers) { supportedOnlyIn2(); preValueChange(MODIFIERS_PROPERTY); this.modifierFlags = pmodifiers; postValueChange(MODIFIERS_PROPERTY); } |
| ||||
/** * Returns the live ordered list of modifiers and annotations * of this declaration (added in JLS3 API). * <p> * Note that the final modifier is the only meaningful modifier for local * variable declarations. * </p> * * @return the live list of modifiers and annotations * (element type: <code>IExtendedModifier</code>) * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ public List modifiers() { // more efficient than just calling unsupportedIn2() to check if (this.modifiers == null) { unsupportedIn2(); } return this.modifiers; } /** * Returns the modifiers explicitly specified on this declaration. * <p> * In the JLS3 API, this method is a convenience method that * computes these flags from <code>modifiers()</code>. * </p> * * @return the bit-wise or of <code>Modifier</code> constants * @see Modifier */ public int getModifiers() { // more efficient than checking getAST().API_LEVEL if (this.modifiers == null) { // JLS2 behavior - bona fide property return this.modifierFlags; } else { // JLS3 behavior - convenience method // performance could be improved by caching computed flags // but this would require tracking changes to this.modifiers int computedModifierFlags = Modifier.NONE; for (Iterator it = modifiers().iterator(); it.hasNext();) { Object x = it.next(); if (x instanceof Modifier) { computedModifierFlags |= ((Modifier) x).getKeyword().toFlagValue(); } } return computedModifierFlags; } } /** * Sets the modifiers explicitly specified on this declaration (JLS2 API only). * <p> * Note that the final modifier is the only meaningful modifier for local * variable declarations. * </p> * * @param modifiers the given modifiers (bit-wise or of <code>Modifier</code> constants) * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @see Modifier * @deprecated In the JLS3 API, this method is replaced by * {@link #modifiers()} which contains a list of a <code>Modifier</code> nodes. */ public void setModifiers(int modifiers) { internalSetModifiers(modifiers); } /** * Internal synonym for deprecated method. Used to avoid * deprecation warnings. * @since 3.1 */ /*package*/ final void internalSetModifiers(int pmodifiers) { supportedOnlyIn2(); preValueChange(MODIFIERS_PROPERTY); this.modifierFlags = pmodifiers; postValueChange(MODIFIERS_PROPERTY); } |
| |||
/** * Returns the live ordered list of modifiers and annotations * of this declaration (added in JLS3 API). * <p> * Note that the final modifier is the only meaningful modifier for local * variable declarations. * </p> * * @return the live list of modifiers and annotations * (element type: <code>IExtendedModifier</code>) * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ /** * Returns the live ordered list of modifiers and annotations * of this declaration (added in JLS3 API). * <p> * Note that the final modifier is the only meaningful modifier for local * variable and formal parameter declarations. * </p> * * @return the live list of modifiers and annotations * (element type: <code>IExtendedModifier</code>) * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ public List modifiers() { // more efficient than just calling unsupportedIn2() to check if (this.modifiers == null) { unsupportedIn2(); } return this.modifiers; } /** * Returns the modifiers explicitly specified on this declaration. * <p> * In the JLS3 API, this method is a convenience method that * computes these flags from <code>modifiers()</code>. * </p> * * @return the bit-wise or of <code>Modifier</code> constants * @see Modifier */ public int getModifiers() { // more efficient than checking getAST().API_LEVEL if (this.modifiers == null) { // JLS2 behavior - bona fide property return this.modifierFlags; } else { // JLS3 behavior - convenience method // JLS3 behavior - convenient method // performance could be improved by caching computed flags // but this would require tracking changes to this.modifiers int computedModifierFlags = Modifier.NONE; for (Iterator it = modifiers().iterator(); it.hasNext();) { Object x = it.next(); if (x instanceof Modifier) { computedModifierFlags |= ((Modifier) x).getKeyword().toFlagValue(); } } return computedModifierFlags; } } /** * Sets the modifiers explicitly specified on this declaration (JLS2 API only). * <p> * Note that the final modifier is the only meaningful modifier for local * variable declarations. * </p> * * @param modifiers the given modifiers (bit-wise or of <code>Modifier</code> constants) * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @see Modifier * @deprecated In the JLS3 API, this method is replaced by * {@link #modifiers()} which contains a list of a <code>Modifier</code> nodes. */ /** * Sets the modifiers explicitly specified on this declaration (JLS2 API only). * <p> * The following modifiers are meaningful for fields: public, private, protected, * static, final, volatile, and transient. For local variable and formal * parameter declarations, the only meaningful modifier is final. * </p> * * @param modifiers the given modifiers (bit-wise or of <code>Modifier</code> constants) * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @see Modifier * @deprecated In the JLS3 API, this method is replaced by * {@link #modifiers()} which contains a list of a <code>Modifier</code> nodes. */ public void setModifiers(int modifiers) { internalSetModifiers(modifiers); } /** * Internal synonym for deprecated method. Used to avoid * deprecation warnings. * @since 3.1 */ /*package*/ final void internalSetModifiers(int pmodifiers) { supportedOnlyIn2(); preValueChange(MODIFIERS_PROPERTY); this.modifierFlags = pmodifiers; postValueChange(MODIFIERS_PROPERTY); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |