| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 25 | 2 | 5 | 0.959 | statement_sequence[9] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 25 | 749 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java |
| 2 | 25 | 786 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java |
| ||||
//files are located at Parser.class directory
InputStream stream = Parser.class .getResourceAsStream(filename);
if (stream == null) {
throw new java.io.IOException(Messages.bind(Messages.parser_missingFile, filename));
}
byte[] bytes = null;
try {
stream = new BufferedInputStream(stream);
bytes = Util.getInputStreamAsByteArray(stream, -1);
} finally {
try {
stream.close();
} catch (IOException e) {
// ignore
}
}
//minimal integrity check (even size expected)
int length = bytes.length;
if ((length& 1) != 0)
throw new java.io.IOException(Messages.bind(Messages.parser_corruptedFile, filename));
// convert bytes into chars
char[] chars = new char[length / 2];
int i = 0;
int charIndex = 0;
|
| ||||
//files are located at Parser.class directory
InputStream stream = Parser.class .getResourceAsStream(filename);
if (stream == null) {
throw new java.io.IOException(Messages.bind(Messages.parser_missingFile, filename));
}
byte[] bytes = null;
try {
stream = new BufferedInputStream(stream);
bytes = Util.getInputStreamAsByteArray(stream, -1);
} finally {
try {
stream.close();
} catch (IOException e) {
// ignore
}
}
//minimal integrity check (even size expected)
int length = bytes.length;
if (length % 8 != 0)
throw new java.io.IOException(Messages.bind(Messages.parser_corruptedFile, filename));
// convert bytes into longs
long[] longs = new long[length / 8];
int i = 0;
int longIndex = 0;
|
| |||
//files are located at Parser.class directory
InputStream stream = Parser.class .getResourceAsStream(filename);
if (stream == null) {
throw new java.io.IOException(Messages.bind(Messages.parser_missingFile, filename));
}
byte[] bytes = null;
try {
stream = new BufferedInputStream(stream);
bytes = Util.getInputStreamAsByteArray(stream, -1);
}
finally {
try {
stream.close();
}
catch (IOException e) {
// ignore
}
}
//minimal integrity check (even size expected)
int length = bytes.length;
if ( [[#variableb3185fe0]]!= 0)
throw new java.io.IOException(Messages.bind(Messages.parser_corruptedFile, filename));
[[#variableb9fadbc0]][] [[#variableb58f3280]]= new [[#variableb9fadbc0]][length / [[#variableb3184400]]];
int i = 0;
int [[#variableb3185fa0]]= 0;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b3185fe0]] | length % 8 |
| 1 | 2 | [[#b3185fe0]] | (length&1) |
| 2 | 1 | [[#b9fadbc0]] | // convert bytes into longs long |
| 2 | 2 | [[#b9fadbc0]] | // convert bytes into chars char |
| 3 | 1 | [[#b58f3280]] | longs |
| 3 | 2 | [[#b58f3280]] | chars |
| 4 | 1 | [[#b3184400]] | 8 |
| 4 | 2 | [[#b3184400]] | 2 |
| 5 | 1 | [[#b3185fa0]] | longIndex |
| 5 | 2 | [[#b3185fa0]] | charIndex |