CloneSet346


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
38201.000statement_sequence[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1381274
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
2381359
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
Clone Instance
1
Line Count
38
Source Line
1274
Source File
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java

                        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(
                                                "messageArguments", //$NON-NLS-1$
                                                 this.preferences.alignment_for_arguments_in_method_invocation, 
                                                Alignment.R_OUTERMOST, 
                                                argumentLength, 
                                                this.scribe.scanner.currentPosition       );
                                this.scribe.enterAlignment(argumentsAlignment);
                                boolean okForArguments = false;
                                do {
                                        try {
                                                for (int j = 0; j < argumentLength; j++) {
                                                        if (j > 0) {
                                                                this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_method_invocation_arguments);
                                                                this.scribe.printTrailingComment();
                                                        }
                                                        this.scribe.alignFragment(argumentsAlignment, j);
                                                        if (j > 0 && this.preferences.insert_space_after_comma_in_method_invocation_arguments) {
                                                                this.scribe.space();
                                                        }
                                                        arguments[j].traverse(this, scope);
                                                }
                                                okForArguments = true;
                                        } catch (AlignmentException e) {
                                                this.scribe.redoAlignment(e);
                                          }
                                }
                                while (  !okForArguments);
                                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);
                        }
                        if (numberOfParens > 0) {
                                manageClosingParenthesizedExpression(currentMessageSend, numberOfParens);
                        }


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

                                        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(
                                                                "messageArguments", //$NON-NLS-1$
                                                                 this.preferences.alignment_for_arguments_in_method_invocation, 
                                                                Alignment.R_OUTERMOST, 
                                                                argumentLength, 
                                                                this.scribe.scanner.currentPosition       );
                                                this.scribe.enterAlignment(argumentsAlignment);
                                                boolean okForArguments = false;
                                                do {
                                                        try {
                                                                for (int j = 0; j < argumentLength; j++) {
                                                                        if (j > 0) {
                                                                                this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_method_invocation_arguments);
                                                                                this.scribe.printTrailingComment();
                                                                        }
                                                                        this.scribe.alignFragment(argumentsAlignment, j);
                                                                        if (j > 0 && this.preferences.insert_space_after_comma_in_method_invocation_arguments) {
                                                                                this.scribe.space();
                                                                        }
                                                                        arguments[j].traverse(this, scope);
                                                                }
                                                                okForArguments = true;
                                                        } catch (AlignmentException e) {
                                                                this.scribe.redoAlignment(e);
                                                          }
                                                }
                                                while (  !okForArguments);
                                                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);
                                        }
                                        if (numberOfParens > 0) {
                                                manageClosingParenthesizedExpression(currentMessageSend, numberOfParens);
                                        }


Clone AbstractionParameter Count: 0Parameter Bindings

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("messageArguments", //$NON-NLS-1$
                                                              this.preferences.alignment_for_arguments_in_method_invocation, Alignment.R_OUTERMOST, argumentLength, this.scribe.scanner.currentPosition);
  this.scribe.enterAlignment(argumentsAlignment);
  boolean okForArguments = false;
  do {
    try {
      for (int j = 0; j < argumentLength; j++) {
        if (j > 0) {
          this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_method_invocation_arguments);
          this.scribe.printTrailingComment();
        }
        this.scribe.alignFragment(argumentsAlignment, j);
        if (j > 0 && this.preferences.insert_space_after_comma_in_method_invocation_arguments) {
          this.scribe.space();
        }
        arguments[j].traverse(this, scope);
      }
      okForArguments = true;
    }
    catch (AlignmentException e) {
      this.scribe.redoAlignment(e);
    }
  }
  while ( !okForArguments);
  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);
}
if (numberOfParens > 0) {
  manageClosingParenthesizedExpression(currentMessageSend, numberOfParens);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None