class AttachmentImageIconLoader { /** * Utility constructor. */ private AttachmentImageIconLoader() { } /** * Returns the image icon for the content type. * * @param contentType * content type * @param contentSubtype * content sub type * @return an Image Icon for the content type. */ public ImageIcon getImageIcon(String contentType, String contentSubtype) { StringBuffer buf = new StringBuffer(); buf.append("gnome-"); buf.append(contentType); buf.append("-"); buf.append(contentSubtype); buf.append(".png"); ImageIcon icon = ImageLoader.getMimetypeIcon(buf.toString()); if (icon == null) { icon = ImageLoader.getMimetypeIcon("gnome-" + contentType + ".png"); } if (icon == null) { icon = ImageLoader.getMimetypeIcon("gnome-text.png"); } return icon;
class AttachmentImageIconLoader { /** * Utility constructor. */ private AttachmentImageIconLoader() { } /** * Returns the image icon for the content type. * * @param contentType * content type * @param contentSubtype * content sub type * @return an Image Icon for the content type. */ public ImageIcon getImageIcon(String contentType, String contentSubtype) { StringBuffer buf = new StringBuffer(); buf.append("gnome-"); buf.append(contentType); buf.append("-"); buf.append(contentSubtype); buf.append(".png"); ImageIcon icon = ImageLoader.getMimetypeIcon(buf.toString()); if (icon == null) { icon = ImageLoader.getMimetypeIcon("gnome-" + contentType + ".png"); } if (icon == null) { icon = ImageLoader.getMimetypeIcon("gnome-text.png"); } return icon;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/AttachmentsViewer.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/HeaderViewer.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
class AttachmentImageIconLoader {
1
class AttachmentImageIconLoader {
2
		/**
2
		/**
3
		 * Utility constructor.
3
		 * Utility constructor.
4
		 */
4
		 */
5
		private AttachmentImageIconLoader() {
5
		private AttachmentImageIconLoader() {
6
		}
6
		}
7
		/**
7
		/**
8
		 * Returns the image icon for the content type.
8
		 * Returns the image icon for the content type.
9
		 * 
9
		 * 
10
		 * @param contentType
10
		 * @param contentType
11
		 *            content type
11
		 *            content type
12
		 * @param contentSubtype
12
		 * @param contentSubtype
13
		 *            content sub type
13
		 *            content sub type
14
		 * @return an Image Icon for the content type.
14
		 * @return an Image Icon for the content type.
15
		 */
15
		 */
16
		public ImageIcon getImageIcon(String contentType, String contentSubtype) {
16
		public ImageIcon getImageIcon(String contentType, String contentSubtype) {
17
			StringBuffer buf = new StringBuffer();
17
			StringBuffer buf = new StringBuffer();
18
			buf.append("gnome-");
18
			buf.append("gnome-");
19
			buf.append(contentType);
19
			buf.append(contentType);
20
			buf.append("-");
20
			buf.append("-");
21
			buf.append(contentSubtype);
21
			buf.append(contentSubtype);
22
			buf.append(".png");
22
			buf.append(".png");
23
			ImageIcon icon = ImageLoader.getMimetypeIcon(buf.toString());
23
			ImageIcon icon = ImageLoader.getMimetypeIcon(buf.toString());
24
			if (icon == null) {
24
			if (icon == null) {
25
				icon = ImageLoader.getMimetypeIcon("gnome-" + contentType
25
				icon = ImageLoader.getMimetypeIcon("gnome-" + contentType
26
						+ ".png");
26
						+ ".png");
27
			}
27
			}
28
			if (icon == null) {
28
			if (icon == null) {
29
				icon = ImageLoader.getMimetypeIcon("gnome-text.png");
29
				icon = ImageLoader.getMimetypeIcon("gnome-text.png");
30
			}
30
			}
31
			return icon;
31
			return icon;
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