for (int i = 0; i < attrs.getLength(); i++) {
String aName = attrs.getLocalName(i); // Attr name
if (aName.equals("")) {
aName = attrs.getQName(i);
}
currentElement.addAttribute(aName, attrs.getValue(i));
}
for (int i = 0; i < attachments.size(); i++) {
String name = ((StreamableMimePart) attachments.get(i)).getHeader()
.getFileName();
if (name != null) {
keyList.add(MailResourceLoader.getString("header", "attachment"));
valueList.add(name);
}
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/xml/XmlIO.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/command/SaveMessageBodyAsCommand.java
|
Method name: void startElement(String, String, String, Attributes)
|
|
Method name: String[][] getHeadersToSave(boolean)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | for (int i = 0; i < attrs.getLength(); i++) {↵ | | 1 | for (int i = 0; i < att↵
|
2 | ↵ | | 2 | achments.size(); i++) {↵
|
3 | String aName = attrs.getLocalName(i); // Attr name↵ | | 3 | String name = ↵
|
|
4 | if (aName.equals("")) {↵ | | |
|
5 | aName = attrs.getQ↵ | | 4 | ((StreamableMimePart) attachments.get(i)).getHeader()↵
|
6 | Name(i);↵ | | 5 | .getFileName();↵
|
7 | }↵ | | |
|
|
8 | currentElement.addAttribute(aName↵ | | |
|
| | | 6 | if (name != null) {↵
|
9 | , attrs.getValue(i));↵ | | 7 | keyList.add(MailResourceLoader.getString("header", "att↵
|
10 | ↵ | | 8 | achment"));↵
|
| | | 9 | valueList.add(name);↵
|
| | | 10 | }↵
|
11 | } | | 11 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |