| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 21 | 2 | 3 | 0.979 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 21 | 42 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ExcludingDecoratingLabelProvider.java |
| 2 | 21 | 68 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ExcludingDecoratingLabelProvider.java |
| ||||
/*
* @see ILabelProvider#getImage
*/
public Image getImage(Object element) {
IDecoratorManager decoratorMgr = PlatformUI.getWorkbench().getDecoratorManager();
boolean isDecoratorEnabled = decoratorMgr.getEnabled(fExcludedDecoratorId);
if (isDecoratorEnabled)
try {
decoratorMgr.setEnabled(fExcludedDecoratorId, false);
} catch (CoreException e) {
// continue
}
Image image = super.getImage(element);
if (isDecoratorEnabled)
try {
decoratorMgr.setEnabled(fExcludedDecoratorId, true);
} catch (CoreException e) {
// continue
}
return image;
}
|
| ||||
/*
* @see ILabelProvider#getText
*/
public String getText(Object element) {
IDecoratorManager decoratorMgr = PlatformUI.getWorkbench().getDecoratorManager();
boolean isDecoratorEnabled = decoratorMgr.getEnabled(fExcludedDecoratorId);
if (isDecoratorEnabled)
try {
decoratorMgr.setEnabled(fExcludedDecoratorId, false);
} catch (CoreException e) {
// continue
}
String text = super.getText(element);
if (isDecoratorEnabled)
try {
decoratorMgr.setEnabled(fExcludedDecoratorId, true);
} catch (CoreException e) {
// continue
}
return text;
}
|
| |||
/*
* @see ILabelProvider#getImage
*/
/*
* @see ILabelProvider#getText
*/
public [[#variableb443e820]] [[#variableb443e7a0]](Object element) {
IDecoratorManager decoratorMgr = PlatformUI.getWorkbench().getDecoratorManager();
boolean isDecoratorEnabled = decoratorMgr.getEnabled(fExcludedDecoratorId);
if (isDecoratorEnabled)
try {
decoratorMgr.setEnabled(fExcludedDecoratorId, false);
}
catch (CoreException e) {
// continue
}
[[#variableb443e820]] [[#variableb443e740]]= super. [[#variableb443e7a0]](element);
if (isDecoratorEnabled)
try {
decoratorMgr.setEnabled(fExcludedDecoratorId, true);
}
catch (CoreException e) {
// continue
}
return [[#variableb443e740]];
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b443e820]] | Image |
| 1 | 2 | [[#b443e820]] | String |
| 2 | 1 | [[#b443e7a0]] | getImage |
| 2 | 2 | [[#b443e7a0]] | getText |
| 3 | 1 | [[#b443e740]] | image |
| 3 | 2 | [[#b443e740]] | text |