CloneSet91


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
27220.973statement_sequence[16]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
130125
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/control/TestHTTPMirrorThread.java
227213
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/control/TestHTTPMirrorThread.java
Next
Last
Clone Instance
1
Line Count
30
Source Line
125
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/control/TestHTTPMirrorThread.java

outputStream.write(bos.toByteArray());
// Read the response
ByteArrayOutputStream response = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int length = 0;
while ((length = inputStream.read(buffer)) != -1) {
  response.write(buffer, 0, length);
}
response.close();
byte[] mirroredResponse = getMirroredResponse(response.toByteArray());
// Check that the request and response matches
checkArraysHaveSameContent(bos.toByteArray(), mirroredResponse);
// Close the connection
clientSocket.close();
// Connect to the http server, and do a simple http get, with
// a pause in the middle of transmitting the header
clientSocket = new Socket("localhost", HTTP_SERVER_PORT);
outputStream = clientSocket.getOutputStream();
inputStream = clientSocket.getInputStream();
// Write to the socket
bos = new ByteArrayOutputStream();
// Headers
bos.write("GET / HTTP 1.1".getBytes(ISO_8859_1));
bos.write(CRLF);
// Write the start of the headers, and then sleep, so that the mirror
// thread will have to block to wait for more data to appear
bos.close();


First
Previous
Clone Instance
2
Line Count
27
Source Line
213
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/control/TestHTTPMirrorThread.java

// Write the headers and body
outputStream.write(bos.toByteArray());
// Read the response
ByteArrayOutputStream response = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int length = 0;
while ((length = inputStream.read(buffer)) != -1) {
  response.write(buffer, 0, length);
}
response.close();
byte[] mirroredResponse = getMirroredResponse(response.toByteArray());
// Check that the request and response matches
checkArraysHaveSameContent(bos.toByteArray(), mirroredResponse);
// Close the connection
clientSocket.close();
// Connect to the http server, and do a simple http post, with
// a pause after transmitting the headers
clientSocket = new Socket("localhost", HTTP_SERVER_PORT);
outputStream = clientSocket.getOutputStream();
inputStream = clientSocket.getInputStream();
// Write to the socket
bos = new ByteArrayOutputStream();
// Headers
bos.write("GET / HTTP 1.1".getBytes(ISO_8859_1));
bos.write(CRLF);
bos.write("Host: localhost".getBytes(ISO_8859_1));


Clone AbstractionParameter Count: 2Parameter Bindings

// Write the headers and body
outputStream.write(bos.toByteArray());
// Read the response
ByteArrayOutputStream response = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int length = 0;
while ((length = inputStream.read(buffer)) != -1) {
  response.write(buffer, 0, length);
}
response.close();
byte[] mirroredResponse = getMirroredResponse(response.toByteArray());
// Check that the request and response matches
checkArraysHaveSameContent(bos.toByteArray(), mirroredResponse);
// Close the connection
clientSocket.close();
// Connect to the http server, and do a simple http post, with
// a pause after transmitting the headers
// Connect to the http server, and do a simple http get, with
// a pause in the middle of transmitting the header
clientSocket = new Socket("localhost", HTTP_SERVER_PORT);
outputStream = clientSocket.getOutputStream();
inputStream = clientSocket.getInputStream();
// Write to the socket
bos = new ByteArrayOutputStream();
// Headers
bos.write("GET / HTTP 1.1".getBytes(ISO_8859_1));
bos.write(CRLF);
// Write the start of the headers, and then sleep, so that the mirror
// thread will have to block to wait for more data to appear
bos. [[#variablee0687e0]] [[#variablee06af60]];
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#e0687e0]]
close 
12[[#e0687e0]]
write 
21[[#e06af60]]
() 
22[[#e06af60]]
("Host: localhost".getBytes(ISO_8859_1))