public static String createToolTip(GroupModelPartial item) { StringBuffer buf = new StringBuffer(); buf.append("<html><body> Name: " + item.getName()); if (item.getDescription() != null) { buf.append("<br> Description: " + item.getDescription()); } buf.append("</body></html>"); return buf.toString(); } private static String convert(String str) { if (str == null) { return ""; } StringBuffer result = new StringBuffer(); int pos = 0; char ch; while (pos < str.length()) { ch = str.charAt(pos); if (ch == '<') { result.append("<"); } else if (ch == '>') { result.append(">"); } else { result.append(ch); } pos++; } return result.toString()
public static String createToolTip(IGroupItem item) { StringBuffer buf = new StringBuffer(); buf.append("<html><body> Name: " + item.getName()); if (item.getDescription() != null) { buf.append("<br> Description: " + item.getDescription()); } buf.append("</body></html>"); return buf.toString(); } private static String convert(String str) { if (str == null) { return ""; } StringBuffer result = new StringBuffer(); int pos = 0; char ch; while (pos < str.length()) { ch = str.charAt(pos); if (ch == '<') { result.append("<"); } else if (ch == '>') { result.append(">"); } else { result.append(ch); } pos++; } return result.toString()
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/util/ToolTipFactory.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/contact/list/HeaderItemToolTipFactory.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public static String createToolTip(GroupModelPartial item) {
1
public static String createToolTip(IGroupItem item) {
2
		StringBuffer buf = new StringBuffer();
2
		StringBuffer buf = new StringBuffer();
3
		buf.append("<html><body> Name: " + item.getName());
3
		buf.append("<html><body> Name: " + item.getName());
4
		if (item.getDescription() != null) {
4
		if (item.getDescription() != null) {
5
			buf.append("<br> Description: " + item.getDescription());
5
			buf.append("<br> Description: " + item.getDescription());
6
		}
6
		}
7
		buf.append("</body></html>");
7
		buf.append("</body></html>");
8
		return buf.toString();
8
		return buf.toString();
9
	}
9
	}
10
	private static String convert(String str) {
10
	private static String convert(String str) {
11
		if (str == null) {
11
		if (str == null) {
12
			return "";
12
			return "";
13
		}
13
		}
14
		StringBuffer result = new StringBuffer();
14
		StringBuffer result = new StringBuffer();
15
		int pos = 0;
15
		int pos = 0;
16
		char ch;
16
		char ch;
17
		while (pos < str.length()) {
17
		while (pos < str.length()) {
18
			ch = str.charAt(pos);
18
			ch = str.charAt(pos);
19
			if (ch == '<') {
19
			if (ch == '<') {
20
				result.append("<");
20
				result.append("<");
21
			} else if (ch == '>') {
21
			} else if (ch == '>') {
22
				result.append(">");
22
				result.append(">");
23
			} else {
23
			} else {
24
				result.append(ch);
24
				result.append(ch);
25
			}
25
			}
26
			pos++;
26
			pos++;
27
		}
27
		}
28
		return result.toString()
28
		return result.toString()
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.0
Clones location
Number of node comparisons0