diff --git a/complexity copy.java b/complexity copy.java new file mode 100644 index 0000000..3ef7c57 --- /dev/null +++ b/complexity copy.java @@ -0,0 +1,130 @@ +public class CyclomaticComplexity { + + public void complex() { + for (int i = 0; i < 1000; i++) { + if (i < 100) { + for (int x = 0; x < 1000; x++) { + if (x < 100) { + if (x == 50) { + x = 51; + } else { + int y = 12312313; + gettingComplex(); + for (int f = 0; f < 1000; f++) { + if (f < 100) { + for (int z = 0; z < 1000; z++) { + if (z < 100) { + if (z == 50) { + z = 51; + } else { + for (i = 0; i < 1000; i++) { + if (i < 100) { + for (x = 0; x < 1000; x++) { + if (x < 100) { + if (x == 50) { + x = 51; + } else { + y = 12312313; + } + + } else { + int j = 10100; + for (i = 0; i < 1000; i++) { + if (i < 100) { + for (x = 0; x < 1000; x++) { + if (x < 100) { + if (x == 50) { + x = 51; + } else { + y = 12312313; + } + + } else { + j = 10100; + } + } + } + } + } + } + } + } + } + + } else { + int l = 10100; + } + } + } + } + } + + } else { + int j = 10100; + gettingComplex(); + } + } + } + } + } + + public void gettingComplex() { + for (int i = 0; i < 1000; i++) { + if (i < 100) { + for (int x = 0; x < 1000; x++) { + if (x < 100) { + if (x == 50) { + x = 51; + } else { + int y = 12312313; + } + + } else { + int j = 10100; + } + } + } + } + } + + public void gettingEvenMoreComplex() { + for (int i = 0; i < 1000; i++) { + if (i < 100) { + for (int x = 0; x < 1000; x++) { + if (x < 100) { + if (x == 50) { + x = 51; + } else { + int y = 12312313; + } + + } else { + int j = 10100; + } + } + } + } + } + + + public void gettingNoItsEqualyComplex() { + for (int i = 0; i < 1000; i++) { + if (i < 100) { + for (int x = 0; x < 1000; x++) { + if (x < 100) { + if (x == 50) { + x = 51; + } else { + int y = 12312313; + } + + } else { + int j = 10100; + } + } + } + } + } + //Second commit + //Thirth commit +} \ No newline at end of file