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);
}
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);
}
boolean doubleBracketIndent = getBooleanProperty("doubleBracketIndent");
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 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
3 | indentNextLineRE = getRegexpProperty("indentNextLine",↵ | | 3 | indentNextLinesRE = getRegexpProperty("indentNextLines",↵
|
4 | RE.REG_ICASE,RESearchMatcher.RE_SYNTAX_JEDIT);↵ | | 4 | RE.REG_ICASE,RESearchMatcher.RE_SYNTAX_JEDIT);↵
|
5 | }↵ | | 5 | }↵
|
6 | catch(REException re)↵ | | 6 | catch(REException re)↵
|
7 | {↵ | | 7 | {↵
|
8 | indentNextLineRE = null;↵ | | 8 | indentNextLinesRE = null;↵
|
9 | Log.log(Log.ERROR,this,"Invalid indentNextLine regexp");↵ | | 9 | Log.log(Log.ERROR,this,"Invalid indentNextLines regexp");↵
|
10 | Log.log(Log.ERROR,this,re);↵ | | 10 | Log.log(Log.ERROR,this,re);↵
|
11 | }↵ | | 11 | }↵
|
|
12 | RE indentNextLinesRE; | | 12 | boolean doubleBracketIndent = getBooleanProperty("doubleBracketIndent");
|
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.6 |
Clones location | Clones are in the same method |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
12 | try | | 15 | try |
13 | indentNextLineRE = getRegexpProperty("indentNextLine", RE.REG_ICASE, RESearchMatcher.RE_SYNTAX_JEDIT); | | 16 | indentNextLinesRE = getRegexpProperty("indentNextLines", RE.REG_ICASE, RESearchMatcher.RE_SYNTAX_JEDIT); |
14 | RE indentNextLinesRE; | | | |
| | | 17 | boolean doubleBracketIndent = getBooleanProperty("doubleBracketIndent"); |
Precondition Violations (0)
Row |
Violation |