String formCreated() { return formError("201 Created", "Object was created"); } /** * Indicates the document was accepted. * * @return The header in a string; */ public static String formAccepted() { return formError("202 Accepted", "Object checked in"); } /** * Indicates only a partial responce was sent. * * @return The header in a string; */ public static String formPartial() { return formError("203 Partial", "Only partail document available"); } /** * Indicates a requested URL has moved to a new address or name. * * @return The header in a string; */ public static String formMoved() { // 300 codes tell client to do actions return formError("301 Moved", "File has moved"); } /** * Never seen this used. * * @return The header in a string; */ public static String formFound() { return formError("302 Found", "Object was found"); } /** * The requested method is not implemented by the server. * * @return The header in a string; */ public static String formMethod() { return formError("303 Method unseported", "Method unseported"); } /** * Indicates remote copy of the requested object is current. * * @return The header in a string; */ public static String formNotModified() { return formError("304 Not modified", "Use local copy"); } /** * Client not otherized for the request. * * @return The header in a string; */ public static String formUnautorized() { return formError("401 Unathorized", "Unathorized use of this service"); } /** * Payment is required for service. * * @return The header in a string; */ public static String formPaymentNeeded() { return formError("402 Payment required", "Payment is required"); } /** * Client if forbidden to get the request service. * * @return The header in a string; */ public static String formForbidden() { return formError("403 Forbidden", "You need permission for this service"); }
String formUnautorized() { return formError("401 Unathorized", "Unathorized use of this service"); } /** * Payment is required for service. * * @return The header in a string; */ public static String formPaymentNeeded() { return formError("402 Payment required", "Payment is required"); } /** * Client if forbidden to get the request service. * * @return The header in a string; */ public static String formForbidden() { return formError("403 Forbidden", "You need permission for this service"); } /** * The requested object was not found. * * @return The header in a string; */ public static String formNotFound() { return formError("404 Not_found", "Requested object was not found"); } /** * The server had a problem and could not fulfill the request. * * @return The header in a string; */ public static String formInternalError() { return formError("500 Internal server error", "Server broke"); } /** * Server does not do the requested feature. * * @return The header in a string; */ public static String formNotImplemented() { return formError("501 Method not implemented", "Service not implemented"); } /** * Server is overloaded, client should try again latter. * * @return The header in a string; */ public static String formOverloaded() { return formError("502 Server overloaded", "Try again latter"); } /** * Indicates the request took to long. * * @return The header in a string; */ public static String formTimeout() { return formError("503 Gateway timeout", "The connection timed out"); } /** * Indicates the client's proxies could not locate a server. * * @return The header in a string; */ public static String formServerNotFound() { return formError("503 Gateway timeout", "The requested server was not found"); } /** * Indicates the client is not allowed to access the object. * * @return The header in a string; */ public static String formNotAllowed() { return formError("403 Access Denied", "Access is not allowed"); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/HttpReplyHdr.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/HttpReplyHdr.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
String formCreated() {
1
String formUnautorized() {
2
		return formError("201 Created", "Object was created");
2
		return formError("401 
3
	}
4
	/**
5
	 * Indicates the document was accepted
3
Unathorized", "Unathorized use of this service");
4
	}
5
	/**
6
.
6
	 * Payment is required for service.
7
	 * 
7
	 * 
8
	 * @return The header in a string;
8
	 * @return The header in a string;
9
	 */
9
	 */
10
	public static String formAccepted() {
10
	public static String formPaymentNeeded() {
11
		return formError("202 Accepted", "Object checked in");
11
		return formError("402 
12
	}
13
	/**
14
	 * Indicates only a partial responce was sent
12
Payment required", "Payment is required");
13
	}
14
	/**
15
.
15
	 * Client if forbidden to get the request service.
16
	 * 
16
	 * 
17
	 * @return The header in a string;
17
	 * @return The header in a string;
18
	 */
18
	 */
19
	public static String formPartial() {
19
	public static String formForbidden() {
20
		return formError("203 Partial", "Only partail document available");
20
		return formError("403 Forbidden", "You need permission for this service");
21
	}
21
	}
22
	/**
22
	/**
23
	 * Indicates a requested URL has moved to a new address or name.
23
	 * The requested object was not found.
24
	 * 
24
	 * 
25
	 * @return The header in a string;
25
	 * @return The header in a string;
26
	 */
26
	 */
27
	public static String formMoved() {
27
	public static String formNotFound() {
28
		// 300 codes tell client to do actions
28
		
29
		return formError("301 Moved", "File has moved");
30
	}
31
	/**
32
	 * Never seen this used
29
return formError("404 Not_found", "Requested object was not found");
30
	}
31
	/**
33
.
32
	 * The server had a problem and could not fulfill the request.
34
	 * 
33
	 * 
35
	 * @return The header in a string;
34
	 * @return The header in a string;
36
	 */
35
	 */
37
	public static String formFound() {
36
	public static String formInternalError() {
38
		return formError("302 Found", "Object was found");
37
		return formError("
39
	}
40
	/**
41
	 * The requested method is not implemented by the server
38
500 Internal server error", "Server broke");
39
	}
40
	/**
42
.
41
	 * Server does not do the requested feature.
43
	 * 
42
	 * 
44
	 * @return The header in a string;
43
	 * @return The header in a string;
45
	 */
44
	 */
46
	public static String formMethod() {
45
	public static String formNotImplemented() {
47
		return formError("303 Method unseported", "Method unseported");
46
		return formError("501 Method 
48
	}
49
	/**
50
	 * Indicates remote copy of the requested object is current
47
not implemented", "Service not implemented");
48
	}
49
	/**
51
.
50
	 * Server is overloaded, client should try again latter.
52
	 * 
51
	 * 
53
	 * @return The header in a string;
52
	 * @return The header in a string;
54
	 */
53
	 */
55
	public static String formNotModified() {
54
	public static String formOverloaded() {
56
		return formError("304 Not modified", "Use local copy");
55
		return formError("
57
	}
58
	/**
59
	 * Client not otherized for the request
56
502 Server overloaded", "Try again latter");
57
	}
58
	/**
60
.
59
	 * Indicates the request took to long.
61
	 * 
60
	 * 
62
	 * @return The header in a string;
61
	 * @return The header in a string;
63
	 */
62
	 */
64
	public static String formUnautorized() {
63
	public static String formTimeout() {
65
		return formError("401 Unathorized", "Unathorized use of this service");
64
		return formError("
66
	}
67
	/**
68
	 * Payment is required for
65
503 Gateway timeout", "The connection timed out");
66
	}
67
	/**
69
 service.
68
	 * Indicates the client's proxies could not locate a server.
70
	 * 
69
	 * 
71
	 * @return The header in a string;
70
	 * @return The header in a string;
72
	 */
71
	 */
73
	public static String formPaymentNeeded() {
72
	public static String formServerNotFound() {
74
		return formError("402 Payment required", "Payment is required");
73
		return formError("503 Gateway timeout", "The requested server was not found");
75
	}
74
	}
76
	/**
75
	/**
77
	 * Client if forbidden to get the request service.
76
	 * Indicates the client is not allowed to access the object.
78
	 * 
77
	 * 
79
	 * @return The header in a string;
78
	 * @return The header in a string;
80
	 */
79
	 */
81
	public static String formForbidden() {
80
	public static String formNotAllowed() {
82
		return formError("403 Forbidden", "You need permission for this service");
81
		return formError("403 Access Denied", "Access is not allowed");
83
	}
82
	}
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