int nextPhysicalLine = getNextVisibleLine( physicalLine); if(nextPhysicalLine == -1) break; else if(nextPhysicalLine > physicalLine + amount) break; else { scrollLine += getScreenLineCount(physicalLine); amount -= (nextPhysicalLine - physicalLine); physicalLine = nextPhysicalLine; }
int prevPhysicalLine = getPrevVisibleLine( physicalLine); if(prevPhysicalLine == -1) break; else if(prevPhysicalLine < physicalLine - amount) break; else { amount -= (physicalLine - prevPhysicalLine); physicalLine = prevPhysicalLine; scrollLine -= getScreenLineCount( prevPhysicalLine); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/DisplayManager.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/DisplayManager.java
Method name: void physDown(int, int) Method name: void physUp(int, int)
Number of AST nodes: 8 Number of AST nodes: 8
1
int nextPhysicalLine = getNextVisibleLine(
1
int prevPhysicalLine = getPrevVisibleLine(
2
					physicalLine);
2
					physicalLine);
3
				if(nextPhysicalLine == -1)
3
				if(prevPhysicalLine == -1)
4
					break;
4
					break;
5
				else if(nextPhysicalLine &gt; physicalLine + amount)
5
				else if(prevPhysicalLine &lt; physicalLine - amount)
6
					break;
6
					break;
7
				else
7
				else
8
				{
8
				{
9
					scrollLine += getScreenLineCount(physicalLine);
9
					amount -= (physicalLine - prevPhysicalLine);
10
					amount -= (nextPhysicalLine - physicalLine);
10
					physicalLine = prevPhysicalLine;
11
					physicalLine = next
11
					scrollLine -= getScreenLineCount(
12
PhysicalLine;
12
						prevPhysicalLine);
13
				}
13
				}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are declared in the same class
Number of node comparisons4