CloneSet160


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
37350.994statement_sequence[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1372234
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
2373448
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
3374527
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
Clone Instance
1
Line Count
37
Source Line
2234
Source File
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java

                this.scribe.printNextToken(TerminalTokens.TokenNameLPAREN, this.preferences.insert_space_before_opening_paren_in_method_invocation);

                final Expression[] arguments = allocationExpression.arguments;
                if (arguments != null) {
                        if (this.preferences.insert_space_after_opening_paren_in_method_invocation) {
                                this.scribe.space();
                        }
                        int argumentLength = arguments.length;
                        Alignment argumentsAlignment = this.scribe.createAlignment(
                                         "allocation", //$NON-NLS-1$
                                          this.preferences.alignment_for_arguments_in_allocation_expression, 
                                         argumentLength, 
                                         this.scribe.scanner.currentPosition      );
                        this.scribe.enterAlignment(argumentsAlignment);
                        boolean ok = false;
                        do {
                                try {
                                        for (int i = 0; i < argumentLength; i++) {
                                                if (i > 0) {
                                                        this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_allocation_expression);
                                                        this.scribe.printTrailingComment();
                                                }
                                                this.scribe.alignFragment(argumentsAlignment, i);
                                                if (i > 0 && this.preferences.insert_space_after_comma_in_allocation_expression) {
                                                        this.scribe.space();
                                                }
                                                arguments[i].traverse(this, scope);
                                        }
                                        ok = true;
                                } catch (AlignmentException e) {
                                        this.scribe.redoAlignment(e);
                                  }
                        }
                        while (  !ok);
                        this.scribe.exitAlignment(argumentsAlignment, true);
                        this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_before_closing_paren_in_method_invocation);
                }
                else   {
                        this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_between_empty_parens_in_method_invocation);
                }


Clone Instance
2
Line Count
37
Source Line
3448
Source File
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java

                this.scribe.printNextToken(TerminalTokens.TokenNameLPAREN, this.preferences.insert_space_before_opening_paren_in_method_invocation);

                final Expression[] arguments = explicitConstructor.arguments;
                if (arguments != null) {
                        if (this.preferences.insert_space_after_opening_paren_in_method_invocation) {
                                this.scribe.space();
                        }
                        int argumentLength = arguments.length;
                        Alignment argumentsAlignment = this.scribe.createAlignment(
                                         "explicit_constructor_call", //$NON-NLS-1$
                                          this.preferences.alignment_for_arguments_in_explicit_constructor_call, 
                                         argumentLength, 
                                         this.scribe.scanner.currentPosition      );
                        this.scribe.enterAlignment(argumentsAlignment);
                        boolean ok = false;
                        do {
                                try {
                                        for (int i = 0; i < argumentLength; i++) {
                                                if (i > 0) {
                                                        this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_explicit_constructor_call_arguments);
                                                        this.scribe.printTrailingComment();
                                                }
                                                this.scribe.alignFragment(argumentsAlignment, i);
                                                if (i > 0 && this.preferences.insert_space_after_comma_in_explicit_constructor_call_arguments) {
                                                        this.scribe.space();
                                                }
                                                arguments[i].traverse(this, scope);
                                        }
                                        ok = true;
                                } catch (AlignmentException e) {
                                        this.scribe.redoAlignment(e);
                                  }
                        }
                        while (  !ok);
                        this.scribe.exitAlignment(argumentsAlignment, true);
                        this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_before_closing_paren_in_method_invocation);
                }
                else   {
                        this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_between_empty_parens_in_method_invocation);
                }


Clone Instance
3
Line Count
37
Source Line
4527
Source File
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java

                this.scribe.printNextToken(TerminalTokens.TokenNameLPAREN, this.preferences.insert_space_before_opening_paren_in_method_invocation);

                final Expression[] arguments = qualifiedAllocationExpression.arguments;
                if (arguments != null) {
                        if (this.preferences.insert_space_after_opening_paren_in_method_invocation) {
                                this.scribe.space();
                        }
                        int argumentLength = arguments.length;
                        Alignment argumentsAlignment = this.scribe.createAlignment(
                                         "allocation", //$NON-NLS-1$
                                          this.preferences.alignment_for_arguments_in_qualified_allocation_expression, 
                                         argumentLength, 
                                         this.scribe.scanner.currentPosition      );
                        this.scribe.enterAlignment(argumentsAlignment);
                        boolean ok = false;
                        do {
                                try {
                                        for (int i = 0; i < argumentLength; i++) {
                                                if (i > 0) {
                                                        this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_allocation_expression);
                                                        this.scribe.printTrailingComment();
                                                }
                                                this.scribe.alignFragment(argumentsAlignment, i);
                                                if (i > 0 && this.preferences.insert_space_after_comma_in_allocation_expression) {
                                                        this.scribe.space();
                                                }
                                                arguments[i].traverse(this, scope);
                                        }
                                        ok = true;
                                } catch (AlignmentException e) {
                                        this.scribe.redoAlignment(e);
                                  }
                        }
                        while (  !ok);
                        this.scribe.exitAlignment(argumentsAlignment, true);
                        this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_before_closing_paren_in_method_invocation);
                }
                else   {
                        this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_between_empty_parens_in_method_invocation);
                }


Clone AbstractionParameter Count: 5Parameter Bindings

this.scribe.printNextToken(TerminalTokens.TokenNameLPAREN, this.preferences.insert_space_before_opening_paren_in_method_invocation);
final Expression[] arguments = [[#variableb441ef40]].arguments;
if (arguments != null) {
  if (this.preferences.insert_space_after_opening_paren_in_method_invocation) {
    this.scribe.space();
  }
  int argumentLength = arguments.length;
  Alignment argumentsAlignment = this.scribe.createAlignment( [[#variableb441ef20]], //$NON-NLS-1$
                                                              this.preferences. [[#variable7c3cabe0]], argumentLength, this.scribe.scanner.currentPosition);
  this.scribe.enterAlignment(argumentsAlignment);
  boolean ok = false;
  do {
    try {
      for (int i = 0; i < argumentLength; i++) {
        if (i > 0) {
          this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences. [[#variableb441ee80]]);
          this.scribe.printTrailingComment();
        }
        this.scribe.alignFragment(argumentsAlignment, i);
        if (i > 0 && this.preferences. [[#variablea196e900]]) {
          this.scribe.space();
        }
        arguments[i].traverse(this, scope);
      }
      ok = true;
    }
    catch (AlignmentException e) {
      this.scribe.redoAlignment(e);
    }
  }
  while ( !ok);
  this.scribe.exitAlignment(argumentsAlignment, true);
  this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_before_closing_paren_in_method_invocation);
}
else {
  this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_between_empty_parens_in_method_invocation);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b441ef40]]
qualifiedAllocationExpression 
12[[#b441ef40]]
explicitConstructor 
13[[#b441ef40]]
allocationExpression 
21[[#b441ef20]]
"allocation" 
22[[#b441ef20]]
"explicit_constructor_call" 
23[[#b441ef20]]
"allocation" 
31[[#7c3cabe0]]
alignment_for_arguments_in_qualified_allocation_expression 
32[[#7c3cabe0]]
alignment_for_arguments_in_explicit_constructor_call 
33[[#7c3cabe0]]
alignment_for_arguments_in_allocation_expression 
41[[#b441ee80]]
insert_space_before_comma_in_allocation_expression 
42[[#b441ee80]]
insert_space_before_comma_in_explicit_constructor_call_arguments 
43[[#b441ee80]]
insert_space_before_comma_in_allocation_expression 
51[[#a196e900]]
insert_space_after_comma_in_allocation_expression 
52[[#a196e900]]
insert_space_after_comma_in_explicit_constructor_call_arguments 
53[[#a196e900]]
insert_space_after_comma_in_allocation_expression