if(lastStart == null) { error("empty-tag","EOL_SPAN_REGEXP"); return; } try { rules.addRule(ParserRule.createRegexpEOLSpanRule( lastHashChar,lastStartPosMatch,lastStart, lastDelegateSet,lastTokenID, lastExcludeMatch,lastIgnoreCase)); } catch(REException re) { error("regexp",re); } reset();
if(lastStart == null) { error("empty-tag","SEQ_REGEXP"); return; } try { rules.addRule(ParserRule.createRegexpSequenceRule( lastHashChar,lastStartPosMatch, lastStart,lastDelegateSet,lastTokenID, lastIgnoreCase)); } catch(REException re) { error("regexp",re); } reset();
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/syntax/XModeHandler.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/syntax/XModeHandler.java
Method name: void endElement(String) Method name: void endElement(String)
Number of AST nodes: 6 Number of AST nodes: 6
1
if(lastStart == null)
1
if(lastStart == null)
2
				{
2
				{
3
					error("empty-tag","EOL_SPAN_REGEXP");
3
					error("empty-tag","SEQ_REGEXP");
4
					return;
4
					return;
5
				}
5
				}
6
				try
6
				try
7
				{
7
				{
8
					rules.addRule(ParserRule.createRegexpEOLSpanRule(
8
					rules.addRule(ParserRule.createRegexpSequenceRule(
9
						lastHashChar,lastStartPosMatch,
9
						lastHashChar,lastStartPosMatch,
10
lastStart,
10
						lastStart,
11
						lastDelegateSet,lastTokenID,
11
lastDelegateSet,lastTokenID,
12
						lastExcludeMatch,lastIgnoreCase));
12
						lastIgnoreCase));
13
				}
13
				}
14
				catch(REException re)
14
				catch(REException re)
15
				{
15
				{
16
					error("regexp",re);
16
					error("regexp",re);
17
				}
17
				}
18
				reset();
18
				reset();
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)1.1
Clones locationClones are in the same method
Number of node comparisons22
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)15.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    68
    if (lastStart == null)
    36
    if (lastStart == null)
    69
    error("empty-tag", "EOL_SPAN_REGEXP");
    69
    error("empty-tag", "EOL_SPAN_REGEXP");
    37
    error("empty-tag", "SEQ_REGEXP");
    Differences
    Expression1Expression2Difference
    "EOL_SPAN_REGEXP""SEQ_REGEXP"LITERAL_VALUE_MISMATCH
    37
    error("empty-tag", "SEQ_REGEXP");
    70
    return;
    70
    return;
    38
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    38
    return;
    71
    try
    39
    try
    72
    rules.addRule(ParserRule.createRegexpEOLSpanRule(lastHashChar, lastStartPosMatch, lastStart, lastDelegateSet, lastTokenID, lastExcludeMatch, lastIgnoreCase));
    72
    rules.addRule(ParserRule.createRegexpEOLSpanRule(lastHashChar, lastStartPosMatch, lastStart, lastDelegateSet, lastTokenID, lastExcludeMatch, lastIgnoreCase));
    40
    rules.addRule(ParserRule.createRegexpSequenceRule(lastHashChar, lastStartPosMatch, lastStart, lastDelegateSet, lastTokenID, lastIgnoreCase));
    Differences
    Expression1Expression2Difference
    createRegexpEOLSpanRulecreateRegexpSequenceRuleMETHOD_INVOCATION_NAME_MISMATCH
    ParserRule.createRegexpEOLSpanRule(lastHashChar,lastStartPosMatch,lastStart,lastDelegateSet,lastTokenID,lastExcludeMatch,lastIgnoreCase)ParserRule.createRegexpSequenceRule(lastHashChar,lastStartPosMatch,lastStart,lastDelegateSet,lastTokenID,lastIgnoreCase)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression ParserRule.createRegexpEOLSpanRule(lastHashChar,lastStartPosMatch,lastStart,lastDelegateSet,lastTokenID,lastExcludeMatch,lastIgnoreCase) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression ParserRule.createRegexpSequenceRule(lastHashChar,lastStartPosMatch,lastStart,lastDelegateSet,lastTokenID,lastIgnoreCase) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression ParserRule.createRegexpEOLSpanRule(lastHashChar,lastStartPosMatch,lastStart,lastDelegateSet,lastTokenID,lastExcludeMatch,lastIgnoreCase) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression ParserRule.createRegexpSequenceRule(lastHashChar,lastStartPosMatch,lastStart,lastDelegateSet,lastTokenID,lastIgnoreCase) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    40
    rules.addRule(ParserRule.createRegexpSequenceRule(lastHashChar, lastStartPosMatch, lastStart, lastDelegateSet, lastTokenID, lastIgnoreCase));
    73
    reset();
    41
    reset();
    Precondition Violations (6)
    Row Violation
    1Conditional return;
    2Conditional return;
    3Expression ParserRule.createRegexpEOLSpanRule(lastHashChar,lastStartPosMatch,lastStart,lastDelegateSet,lastTokenID,lastExcludeMatch,lastIgnoreCase) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    4Expression ParserRule.createRegexpSequenceRule(lastHashChar,lastStartPosMatch,lastStart,lastDelegateSet,lastTokenID,lastIgnoreCase) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    5Expression ParserRule.createRegexpEOLSpanRule(lastHashChar,lastStartPosMatch,lastStart,lastDelegateSet,lastTokenID,lastExcludeMatch,lastIgnoreCase) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    6Expression ParserRule.createRegexpSequenceRule(lastHashChar,lastStartPosMatch,lastStart,lastDelegateSet,lastTokenID,lastIgnoreCase) is a method call throwing exception(s) that should be caught by a try block that will be extracted