File path: /jEdit-4.2/src/bsh/StringUtil.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/DisplayManager.java | |||
Method name: String[] split(String, String)
|
Method name: int getScreenLineCount(int)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 3 | |||
1 | Vector v = new Vector();↵ | |||
2 | StringTokenizer st = new StringTokenizer(s, delim↵ | 1 | int newCount = textArea.chunkCache↵ | |
3 | );↵ | 2 | .getLineSubregionCount(line);↵ | |
4 | while ( st.hasMoreTokens() )↵ | 3 | ↵ | |
5 | v.addElement( st.nextToken() );↵ | |||
6 | String [] sa = new String [ v.size() ];↵ | |||
7 | v.copyInto( sa );↵ | 4 | setScreenLineCount(line,newCount);↵ | |
8 | return sa; | 5 | return newCount; | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 15 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 6 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Vector v = new Vector(); | | ||||||||||||||||||||||
2 | StringTokenizer st = new StringTokenizer(s, delim); | | ||||||||||||||||||||||
| 3 | int newCount = textArea.chunkCache.getLineSubregionCount(line); | ||||||||||||||||||||||
3 | while (st.hasMoreTokens()) | | ||||||||||||||||||||||
4 | v.addElement(st.nextToken()); | | ||||||||||||||||||||||
|
| 5 | return newCount; | |||||||||||||||||||||
5 | String[] sa = new String[v.size()]; | | ||||||||||||||||||||||
6 | v.copyInto(sa); |
| 4 | setScreenLineCount(line, newCount); | ||||||||||||||||||||
7 | return sa; |
| |
Row | Violation |
---|---|
1 | Unmatched return newCount; |
2 | Expression v.copyInto(sa) is a void method call, and thus it cannot be parameterized |
3 | Expression setScreenLineCount(line,newCount) is a void method call, and thus it cannot be parameterized |
4 | Expression v.copyInto(sa) is a void method call, and thus it cannot be parameterized |
5 | Expression setScreenLineCount(line,newCount) is a void method call, and thus it cannot be parameterized |
6 | Unmatched return sa; |