Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
2 | 2 | 2 | 0.958 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 2 | 465 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java |
2 | 2 | 730 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java |
| ||||
/** * Adds a new import to the rewriter's record and returns a type reference that can be used * in the code. The type binding can be an array binding, type variable or wildcard. * If the binding is a generic type, the type parameters are ignored. For parameterized types, also the type * arguments are processed and imports added if necessary. Anonymous types inside type arguments are normalized to their base type, wildcard * of wildcards are ignored. * <p> * No imports are added for types that are already known. If a import for a type is recorded to be removed, this record is discarded instead. * </p> * <p> * The content of the compilation unit itself is actually not modified * in any way by this method; rather, the rewriter just records that a new import has been added. * </p> * @param binding the signature of the type to be added. * @return returns a type to which the type binding can be assigned to. The returned type contains is unqualified * when an import could be added or was already known. It is fully qualified, if an import conflict prevented the import. */ public String addImport(ITypeBinding binding) { return addImport(binding, this.defaultContext); } |
| ||||
/** * Adds a new import to the rewriter's record and returns a type reference that can be used * in the code. The type binding can only be an array or non-generic type. * <p> * No imports are added for types that are already known. If a import for a type is recorded to be removed, this record is discarded instead. * </p> * <p> * The content of the compilation unit itself is actually not modified * in any way by this method; rather, the rewriter just records that a new import has been added. * </p> * @param qualifiedTypeName the qualified type name of the type to be added * @return returns a type to which the type binding can be assigned to. The returned type contains is unqualified * when an import could be added or was already known. It is fully qualified, if an import conflict prevented the import. */ public String addImport(String qualifiedTypeName) { return addImport(qualifiedTypeName, this.defaultContext); } |
| |||
/** * Adds a new import to the rewriter's record and returns a type reference that can be used * in the code. The type binding can be an array binding, type variable or wildcard. * If the binding is a generic type, the type parameters are ignored. For parameterized types, also the type * arguments are processed and imports added if necessary. Anonymous types inside type arguments are normalized to their base type, wildcard * of wildcards are ignored. * <p> * No imports are added for types that are already known. If a import for a type is recorded to be removed, this record is discarded instead. * </p> * <p> * The content of the compilation unit itself is actually not modified * in any way by this method; rather, the rewriter just records that a new import has been added. * </p> * @param binding the signature of the type to be added. * @return returns a type to which the type binding can be assigned to. The returned type contains is unqualified * when an import could be added or was already known. It is fully qualified, if an import conflict prevented the import. */ /** * Adds a new import to the rewriter's record and returns a type reference that can be used * in the code. The type binding can only be an array or non-generic type. * <p> * No imports are added for types that are already known. If a import for a type is recorded to be removed, this record is discarded instead. * </p> * <p> * The content of the compilation unit itself is actually not modified * in any way by this method; rather, the rewriter just records that a new import has been added. * </p> * @param qualifiedTypeName the qualified type name of the type to be added * @return returns a type to which the type binding can be assigned to. The returned type contains is unqualified * when an import could be added or was already known. It is fully qualified, if an import conflict prevented the import. */ public String addImport( [[#variableb4787c60]] [[#variableb4787c00]]) { return addImport( [[#variableb4787c00]], this.defaultContext); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b4787c60]] | ITypeBinding |
1 | 2 | [[#b4787c60]] | String |
2 | 1 | [[#b4787c00]] | binding |
2 | 2 | [[#b4787c00]] | qualifiedTypeName |