this.structureHighlightColor = structureHighlightColor; StructureMatcher.Match match = textArea.getStructureMatch(); if(match != null) { textArea.invalidateLineRange( match.startLine,match.endLine ); }
this.structureHighlight = structureHighlight; StructureMatcher.Match match = textArea.getStructureMatch(); if(match != null) { textArea.invalidateLineRange( match.startLine, match.endLine ); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/TextAreaPainter.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/TextAreaPainter.java
Method name: void setStructureHighlightColor(Color) Method name: void setStructureHighlightEnabled(boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
this.structureHighlightColor = structureHighlightColor;
1
this.structureHighlight = structureHighlight;
2
		StructureMatcher.Match match = textArea.getStructureMatch();
2
		StructureMatcher.Match match = textArea.getStructureMatch();
3
		if(match != null)
3
		if(match != null)
4
		{
4
		{
5
			textArea.invalidateLineRange(
5
			textArea.invalidateLineRange(
6
				match.startLine,
6
				match.startLine,
7
match.endLine
7
				match.endLine
8
			);
8
			);
9
		}
9
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                
    1
    this.structureHighlight = structureHighlight;
    1
    this.structureHighlightColor = structureHighlightColor;
                                                                                                                    
    2
    StructureMatcher.Match match = textArea.getStructureMatch();
    2
    StructureMatcher.Match match = textArea.getStructureMatch();
    3
    if (match != null)
    3
    if (match != null)
    4
    textArea.invalidateLineRange(match.startLine, match.endLine);
    4
    textArea.invalidateLineRange(match.startLine, match.endLine);
    Precondition Violations (0)
    Row Violation