private String readString(DataInputStream din)
throws IOException
{
int len = din.readInt();
if(len == 0)
return null;
char[] str = new char[len];
for(int i = 0; i < len; i++)
str[i] = din.readChar();
return new String(str);
private String[] readStringArray(DataInputStream din)
throws IOException
{
int len = din.readInt();
if(len == 0)
return null;
String[] str = new String[len];
for(int i = 0; i < len; i++)
{
str[i] = readString(din);
}
return str;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/PluginJAR.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/PluginJAR.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | private String readString(DataInputStream din)↵ | | 1 | private String[] readStringArray(DataInputStream din)↵
|
2 | throws IOException↵ | | 2 | throws IOException↵
|
3 | {↵ | | 3 | {↵
|
4 | int len = din.readInt();↵ | | 4 | int len = din.readInt();↵
|
5 | if(len == 0)↵ | | 5 | if(len == 0)↵
|
6 | return null;↵ | | 6 | return null;↵
|
7 | char[] str = new char[len];↵ | | 7 | String[] str = new String[len];↵
|
8 | for(int i = 0; i < len; i++)↵ | | 8 | for(int i = 0; i < len; i++)↵
|
9 | ↵ | | 9 | {↵
|
10 | str[i] = din.readChar();↵ | | 10 | str[i] = readString(din);↵
|
11 | ↵ | | 11 | }↵
|
12 | return new String(str);↵ | | 12 | return str;↵
|
13 | | | 13 |
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |