Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
8 | 10 | 5 | 0.958 | class_body_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 8 | 156 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java |
2 | 7 | 166 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java |
3 | 7 | 174 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java |
4 | 7 | 212 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java |
5 | 7 | 220 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java |
6 | 7 | 232 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java |
7 | 7 | 240 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java |
8 | 7 | 252 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java |
9 | 8 | 260 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java |
10 | 8 | 290 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java |
| ||||
/** * Preview snippets. */ private final static PreviewSnippet FOR_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "for (int i= 0, j= array.length; i < array.length; i++, j--) {}\nfor (String s : names) {}" //$NON-NLS-1$ ); private final static PreviewSnippet WHILE_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "while (condition) {}; do {} while (condition);" //$NON-NLS-1$ ); |
| ||||
private final static PreviewSnippet CATCH_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "try { number= Integer.parseInt(value); } catch (NumberFormatException e) {}"); //$NON-NLS-1$ private final static PreviewSnippet IF_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "if (condition) { return foo; } else {return bar;}" ); //$NON-NLS-1$ |
| ||||
private final static PreviewSnippet SYNCHRONIZED_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "synchronized (list) { list.add(element); }" ); //$NON-NLS-1$ private final static PreviewSnippet SWITCH_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "switch (number) { case RED: return GREEN; case GREEN: return BLUE; case BLUE: return RED; default: return BLACK;}"); //$NON-NLS-1$ |
| ||||
// private final static PreviewSnippet CONSTR_CALL_PREVIEW= new PreviewSnippet( // CodeFormatter.K_STATEMENTS, // "this();\n\n" + //$NON-NLS-1$ // "this(x, y);\n"); //$NON-NLS-1$ private final static PreviewSnippet ALLOC_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "String str= new String(); Point point= new Point(x, y);" ); //$NON-NLS-1$ private final static PreviewSnippet LABEL_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "label: for (int i= 0; i<list.length; i++) {for (int j= 0; j < list[i].length; j++) continue label;}"); //$NON-NLS-1$ |
| ||||
private final static PreviewSnippet SEMICOLON_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "int a= 4; foo(); bar(x, y);" ); //$NON-NLS-1$ private final static PreviewSnippet CONDITIONAL_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "String value= condition ? TRUE : FALSE;" ); //$NON-NLS-1$ |
| ||||
private final static PreviewSnippet ANON_CLASS_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "AnonClass= new AnonClass() {void foo(Some s) { }};" ); //$NON-NLS-1$ private final static PreviewSnippet OPERATOR_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "List list= new ArrayList(); int a= -4 + -9; b= a++ / --number; c += 4; boolean value= true && false;"); //$NON-NLS-1$ |
| ||||
private final static PreviewSnippet CAST_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "String s= ((String)object);" ); //$NON-NLS-1$ private final static PreviewSnippet MULT_LOCAL_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "int a= 0, b= 1, c= 2, d= 3;" ); //$NON-NLS-1$ |
| ||||
private final static PreviewSnippet BLOCK_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "if (true) { return 1; } else { return 2; }" ); //$NON-NLS-1$ private final static PreviewSnippet PAREN_EXPR_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "result= (a *( b + c + d) * (e + f));" ); //$NON-NLS-1$ |
| ||||
private final static PreviewSnippet ASSERT_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "assert condition : reportError();" //$NON-NLS-1$ ); private final static PreviewSnippet RETURN_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "return (o);" //$NON-NLS-1$ ); |
| ||||
private final static PreviewSnippet TYPE_ARGUMENTS_PREVIEW = new PreviewSnippet( CodeFormatter.K_STATEMENTS, "x.<String, Element>foo();" //$NON-NLS-1$ ); private final static PreviewSnippet TYPE_PARAMETER_PREVIEW = new PreviewSnippet( CodeFormatter.K_CLASS_BODY_DECLARATIONS, "class MyGenericType<S, T extends Element & List> { }" //$NON-NLS-1$ ); |
| |||
/** * Preview snippets. */ // private final static PreviewSnippet CONSTR_CALL_PREVIEW= new PreviewSnippet( // CodeFormatter.K_STATEMENTS, // "this();\n\n" + //$NON-NLS-1$ // "this(x, y);\n"); //$NON-NLS-1$ private final static PreviewSnippet [[#variable5663a9c0]]= new PreviewSnippet(CodeFormatter.K_STATEMENTS, [[#variable5663aa40]]); //$NON-NLS-1$ private final static PreviewSnippet [[#variable5b8cd3e0]]= new PreviewSnippet(CodeFormatter. [[#variable5663a9a0]], [[#variable5663aa60]]); //$NON-NLS-1$ |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#5663a9c0]] | FOR_PREVIEW |
1 | 2 | [[#5663a9c0]] | CATCH_PREVIEW |
1 | 3 | [[#5663a9c0]] | SYNCHRONIZED_PREVIEW |
1 | 4 | [[#5663a9c0]] | ALLOC_PREVIEW |
1 | 5 | [[#5663a9c0]] | SEMICOLON_PREVIEW |
1 | 6 | [[#5663a9c0]] | ANON_CLASS_PREVIEW |
1 | 7 | [[#5663a9c0]] | CAST_PREVIEW |
1 | 8 | [[#5663a9c0]] | BLOCK_PREVIEW |
1 | 9 | [[#5663a9c0]] | ASSERT_PREVIEW |
1 | 10 | [[#5663a9c0]] | TYPE_ARGUMENTS_PREVIEW |
2 | 1 | [[#5663aa40]] | "for (int i= 0, j= array.length; i < array.length; i++, j--) {}\nfor (String s : names) {}" //$NON-NLS-1$ |
2 | 2 | [[#5663aa40]] | "try { number= Integer.parseInt(value); } catch (NumberFormatException e) {}" |
2 | 3 | [[#5663aa40]] | "synchronized (list) { list.add(element); }" |
2 | 4 | [[#5663aa40]] | "String str= new String(); Point point= new Point(x, y);" |
2 | 5 | [[#5663aa40]] | "int a= 4; foo(); bar(x, y);" |
2 | 6 | [[#5663aa40]] | "AnonClass= new AnonClass() {void foo(Some s) { }};" |
2 | 7 | [[#5663aa40]] | "String s= ((String)object);" |
2 | 8 | [[#5663aa40]] | "if (true) { return 1; } else { return 2; }" |
2 | 9 | [[#5663aa40]] | "assert condition : reportError();" //$NON-NLS-1$ |
2 | 10 | [[#5663aa40]] | "x.<String, Element>foo();" //$NON-NLS-1$ |
3 | 1 | [[#5b8cd3e0]] | WHILE_PREVIEW |
3 | 2 | [[#5b8cd3e0]] | IF_PREVIEW |
3 | 3 | [[#5b8cd3e0]] | SWITCH_PREVIEW |
3 | 4 | [[#5b8cd3e0]] | LABEL_PREVIEW |
3 | 5 | [[#5b8cd3e0]] | CONDITIONAL_PREVIEW |
3 | 6 | [[#5b8cd3e0]] | OPERATOR_PREVIEW |
3 | 7 | [[#5b8cd3e0]] | MULT_LOCAL_PREVIEW |
3 | 8 | [[#5b8cd3e0]] | PAREN_EXPR_PREVIEW |
3 | 9 | [[#5b8cd3e0]] | RETURN_PREVIEW |
3 | 10 | [[#5b8cd3e0]] | TYPE_PARAMETER_PREVIEW |
4 | 1 | [[#5663a9a0]] | K_STATEMENTS |
4 | 2 | [[#5663a9a0]] | K_STATEMENTS |
4 | 3 | [[#5663a9a0]] | K_STATEMENTS |
4 | 4 | [[#5663a9a0]] | K_STATEMENTS |
4 | 5 | [[#5663a9a0]] | K_STATEMENTS |
4 | 6 | [[#5663a9a0]] | K_STATEMENTS |
4 | 7 | [[#5663a9a0]] | K_STATEMENTS |
4 | 8 | [[#5663a9a0]] | K_STATEMENTS |
4 | 9 | [[#5663a9a0]] | K_STATEMENTS |
4 | 10 | [[#5663a9a0]] | K_CLASS_BODY_DECLARATIONS |
5 | 1 | [[#5663aa60]] | "while (condition) {}; do {} while (condition);" //$NON-NLS-1$ |
5 | 2 | [[#5663aa60]] | "if (condition) { return foo; } else {return bar;}" |
5 | 3 | [[#5663aa60]] | "switch (number) { case RED: return GREEN; case GREEN: return BLUE; case BLUE: return RED; default: return BLACK;}" |
5 | 4 | [[#5663aa60]] | "label: for (int i= 0; i<list.length; i++) {for (int j= 0; j < list[i].length; j++) continue label;}" |
5 | 5 | [[#5663aa60]] | "String value= condition ? TRUE : FALSE;" |
5 | 6 | [[#5663aa60]] | "List list= new ArrayList(); int a= -4 + -9; b= a++ / --number; c += 4; boolean value= true && false;" |
5 | 7 | [[#5663aa60]] | "int a= 0, b= 1, c= 2, d= 3;" |
5 | 8 | [[#5663aa60]] | "result= (a *( b + c + d) * (e + f));" |
5 | 9 | [[#5663aa60]] | "return (o);" //$NON-NLS-1$ |
5 | 10 | [[#5663aa60]] | "class MyGenericType<S, T extends Element & List> { }" //$NON-NLS-1$ |