01: package method;
02:
03: public class ExtractMethodTestTwo {
04: private double start;
05: private String text;
06:
07: public ExtractMethodTestTwo() {
08: start = 5.0;
09: text = "string";
10: }
11:
12: public double methodTwo(double offset) {
13: double init = 1.0;
14:
15: for (int ndx = 0; ndx < 10; ndx++) {
16: double temp = start;
17: temp = init * init;
18: init += temp + offset;
19: }
20:
21: if (init > 400)
22: return init;
23: else
24: return 400;
25: }
26:
27: public String methodOne(String input) {
28: StringBuffer buf = new StringBuffer();
29: while (buf.length() < 50) {
30: String msg = null;
31: msg = text + " " + buf.length() + input;
32: buf.append(msg);
33: }
34:
35: return buf.toString();
36: }
37:
38: private void testMethod(Document original, Document result)
39: throws IOException {
40: StringBuffer originalSB = getDocAsStringBuffer(original);
41: if (originalSB.length() != 50) {
42: }
43: }
44: }
|