| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 59 | 2 | 6 | 0.979 | compilation_unit |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 59 | 11 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/RuntimeInvisibleParameterAnnotationsAttribute.java |
| 2 | 59 | 11 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/RuntimeVisibleParameterAnnotationsAttribute.java |
| ||||
/*******************************************************************************
* Copyright (c) 2004, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.core.util;
import org.eclipse.jdt.core.util.ClassFormatException;
import org.eclipse.jdt.core.util.IConstantPool;
import org.eclipse.jdt.core.util.IParameterAnnotation;
import org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotationsAttribute;
/**
* Default implementation of IRuntimeInvisibleParameterAnnotations
*/
public class RuntimeInvisibleParameterAnnotationsAttribute extends
ClassFileAttribute implements
IRuntimeInvisibleParameterAnnotationsAttribute {
private static final IParameterAnnotation[] NO_ENTRIES = new IParameterAnnotation[0];
private IParameterAnnotation[] parameterAnnotations;
private int parametersNumber;
/**
* Constructor for RuntimeVisibleParameterAnnotations.
* @param classFileBytes
* @param constantPool
* @param offset
* @throws ClassFormatException
*/
public RuntimeInvisibleParameterAnnotationsAttribute(
byte[] classFileBytes,
IConstantPool constantPool,
int offset ) throws
ClassFormatException {
super(classFileBytes, constantPool, offset);
final int length = u1At(classFileBytes, 6, offset);
this.parametersNumber = length;
if (length != 0) {
int readOffset = 7;
this.parameterAnnotations = new IParameterAnnotation[length];
for (int i = 0; i < length; i++) {
ParameterAnnotation parameterAnnotation = new ParameterAnnotation(classFileBytes, constantPool, offset + readOffset);
this.parameterAnnotations[i] = parameterAnnotation;
readOffset += parameterAnnotation.sizeInBytes();
}
}
else {
this.parameterAnnotations = NO_ENTRIES;
}
}
/* (non-Javadoc)
* @see org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotations#getAnnotations()
*/
public IParameterAnnotation[] getParameterAnnotations() {
return this.parameterAnnotations;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotations#getParametersNumber()
*/
public int getParametersNumber() {
return this.parametersNumber;
}
}
|
| ||||
/*******************************************************************************
* Copyright (c) 2004, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.core.util;
import org.eclipse.jdt.core.util.ClassFormatException;
import org.eclipse.jdt.core.util.IConstantPool;
import org.eclipse.jdt.core.util.IParameterAnnotation;
import org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotationsAttribute;
/**
* Default implementation of IRuntimeVisibleAnnotations
*/
public class RuntimeVisibleParameterAnnotationsAttribute extends
ClassFileAttribute implements
IRuntimeVisibleParameterAnnotationsAttribute {
private static final IParameterAnnotation[] NO_ENTRIES = new IParameterAnnotation[0];
private int parametersNumber;
private IParameterAnnotation[] parameterAnnotations;
/**
* Constructor for RuntimeVisibleParameterAnnotations.
* @param classFileBytes
* @param constantPool
* @param offset
* @throws ClassFormatException
*/
public RuntimeVisibleParameterAnnotationsAttribute(
byte[] classFileBytes,
IConstantPool constantPool,
int offset ) throws
ClassFormatException {
super(classFileBytes, constantPool, offset);
final int length = u1At(classFileBytes, 6, offset);
this.parametersNumber = length;
if (length != 0) {
int readOffset = 7;
this.parameterAnnotations = new IParameterAnnotation[length];
for (int i = 0; i < length; i++) {
ParameterAnnotation parameterAnnotation = new ParameterAnnotation(classFileBytes, constantPool, offset + readOffset);
this.parameterAnnotations[i] = parameterAnnotation;
readOffset += parameterAnnotation.sizeInBytes();
}
}
else {
this.parameterAnnotations = NO_ENTRIES;
}
}
/* (non-Javadoc)
* @see org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotations#getAnnotations()
*/
public IParameterAnnotation[] getParameterAnnotations() {
return this.parameterAnnotations;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotations#getParametersNumber()
*/
public int getParametersNumber() {
return this.parametersNumber;
}
}
|
| |||
/*******************************************************************************
* Copyright (c) 2004, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.core.util;
import org.eclipse.jdt.core.util.ClassFormatException;
import org.eclipse.jdt.core.util.IConstantPool;
import org.eclipse.jdt.core.util.IParameterAnnotation;
import org.eclipse.jdt.core.util. [[#variable91bab9c0]];
/**
* Default implementation of IRuntimeInvisibleParameterAnnotations
*/
/**
* Default implementation of IRuntimeVisibleAnnotations
*/
public class [[#variable91bab940]]extends ClassFileAttribute implements [[#variable91bab9c0]]{
private static final IParameterAnnotation[] NO_ENTRIES = new IParameterAnnotation[0];
private [[#variable91bab880]] [[#variable91bab7e0]];
private [[#variable91bab740]] [[#variable91bab6c0]];
/**
* Constructor for RuntimeVisibleParameterAnnotations.
* @param classFileBytes
* @param constantPool
* @param offset
* @throws ClassFormatException
*/
public [[#variable91bab940]](byte[] classFileBytes, IConstantPool constantPool, int offset) throws ClassFormatException {
super(classFileBytes, constantPool, offset);
final int length = u1At(classFileBytes, 6, offset);
this.parametersNumber = length;
if (length != 0) {
int readOffset = 7;
this.parameterAnnotations = new IParameterAnnotation[length];
for (int i = 0; i < length; i++) {
ParameterAnnotation parameterAnnotation = new ParameterAnnotation(classFileBytes, constantPool, offset + readOffset);
this.parameterAnnotations[i] = parameterAnnotation;
readOffset += parameterAnnotation.sizeInBytes();
}
}
else {
this.parameterAnnotations = NO_ENTRIES;
}
}
/* (non-Javadoc)
* @see org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotations#getAnnotations()
*/
/* (non-Javadoc)
* @see org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotations#getAnnotations()
*/
public IParameterAnnotation[] getParameterAnnotations() {
return this.parameterAnnotations;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotations#getParametersNumber()
*/
/* (non-Javadoc)
* @see org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotations#getParametersNumber()
*/
public int getParametersNumber() {
return this.parametersNumber;
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#91bab9c0]] | IRuntimeInvisibleParameterAnnotationsAttribute |
| 1 | 2 | [[#91bab9c0]] | IRuntimeVisibleParameterAnnotationsAttribute |
| 2 | 1 | [[#91bab940]] | RuntimeInvisibleParameterAnnotationsAttribute |
| 2 | 2 | [[#91bab940]] | RuntimeVisibleParameterAnnotationsAttribute |
| 3 | 1 | [[#91bab880]] | IParameterAnnotation[] |
| 3 | 2 | [[#91bab880]] | int |
| 4 | 1 | [[#91bab7e0]] | parameterAnnotations |
| 4 | 2 | [[#91bab7e0]] | parametersNumber |
| 5 | 1 | [[#91bab740]] | int |
| 5 | 2 | [[#91bab740]] | IParameterAnnotation[] |
| 6 | 1 | [[#91bab6c0]] | parametersNumber |
| 6 | 2 | [[#91bab6c0]] | parameterAnnotations |