RE indentNextLinesRE;
try
{
indentNextLinesRE = getRegexpProperty("indentNextLines",
RE.REG_ICASE,RESearchMatcher.RE_SYNTAX_JEDIT);
}
catch(REException re)
{
indentNextLinesRE = null;
Log.log(Log.ERROR,this,"Invalid indentNextLines regexp");
Log.log(Log.ERROR,this,re);
}
RE indentNextLineRE;
try
{
indentNextLineRE = getRegexpProperty("indentNextLine",
RE.REG_ICASE,RESearchMatcher.RE_SYNTAX_JEDIT);
}
catch(REException re)
{
indentNextLineRE = null;
Log.log(Log.ERROR,this,"Invalid indentNextLine regexp");
Log.log(Log.ERROR,this,re);
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/Buffer.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/Buffer.java
|
Method name: int getIdealIndentForLine(int)
|
|
Method name: int getIdealIndentForLine(int)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | RE indentNextLinesRE;↵ | | 1 | RE indentNextLineRE;↵
|
2 | try↵ | | 2 | try↵
|
3 | {↵ | | 3 | {↵
|
4 | indentNextLinesRE = getRegexpProperty("indentNextLines",↵ | | 4 | indentNextLineRE = getRegexpProperty("indentNextLine",↵
|
5 | RE.REG_ICASE,RESearchMatcher.RE_SYNTAX_JEDIT);↵ | | 5 | RE.REG_ICASE,RESearchMatcher.RE_SYNTAX_JEDIT);↵
|
6 | }↵ | | 6 | }↵
|
7 | catch(REException re)↵ | | 7 | catch(REException re)↵
|
8 | {↵ | | 8 | {↵
|
9 | indentNextLinesRE = null;↵ | | 9 | indentNextLineRE = null;↵
|
10 | Log.log(Log.ERROR,this,"Invalid indentNextLines regexp");↵ | | 10 | Log.log(Log.ERROR,this,"Invalid indentNextLine regexp");↵
|
11 | Log.log(Log.ERROR,this,re);↵ | | 11 | Log.log(Log.ERROR,this,re);↵
|
12 | } | | 12 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.8 |
Clones location | Clones are in the same method |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
14 | RE indentNextLinesRE; | | 11 | RE indentNextLineRE; |
15 | try | | 12 | try |
16 | indentNextLinesRE = getRegexpProperty("indentNextLines", RE.REG_ICASE, RESearchMatcher.RE_SYNTAX_JEDIT); | | 13 | indentNextLineRE = getRegexpProperty("indentNextLine", RE.REG_ICASE, RESearchMatcher.RE_SYNTAX_JEDIT); |
Precondition Violations (0)
Row |
Violation |