summaryrefslogtreecommitdiffstats
path: root/it/it-projects
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2015-11-13 17:41:30 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2015-11-16 08:44:16 +0100
commit2b676da5ab6265e66534b735e82fcdfc7f32bb10 (patch)
tree4704c3dde7c088b04826350120df055f62691741 /it/it-projects
parent1757a06de3e2196b15cf0656b3aa844ea729d6e3 (diff)
downloadsonarqube-2b676da5ab6265e66534b735e82fcdfc7f32bb10.tar.gz
sonarqube-2b676da5ab6265e66534b735e82fcdfc7f32bb10.zip
SONAR-6323 Replace java project by xoo project in DuplicationsTest
Diffstat (limited to 'it/it-projects')
-rw-r--r--it/it-projects/duplications/file-duplications/pom.xml8
-rw-r--r--it/it-projects/duplications/file-duplications/sonar-project.properties5
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_with_other_package1/DuplicatedLinesWithOtherPackage.java60
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_with_other_package2/DuplicatedLinesWithOtherPackage.java60
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo41
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo.measures1
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo41
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo.measures1
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory1.xoo (renamed from it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_within_package/DuplicatedLinesInSamePackage1.java)35
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory1.xoo.measures1
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory2.xoo (renamed from it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_within_package/DuplicatedLinesInSamePackage2.java)33
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory2.xoo.measures1
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo (renamed from it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_within_same_class/DuplicatedLinesInSameClass.java)31
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo.measures1
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File1.xoo (renamed from it/it-projects/duplications/file-duplications/src/main/java/duplicated_same_lines_within_3_classes/Class1.java)27
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File1.xoo.measures1
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File2.xoo (renamed from it/it-projects/duplications/file-duplications/src/main/java/duplicated_same_lines_within_3_classes/Class2.java)27
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File2.xoo.measures1
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File3.xoo (renamed from it/it-projects/duplications/file-duplications/src/main/java/duplicated_same_lines_within_3_classes/Class3.java)29
-rw-r--r--it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File3.xoo.measures1
20 files changed, 129 insertions, 276 deletions
diff --git a/it/it-projects/duplications/file-duplications/pom.xml b/it/it-projects/duplications/file-duplications/pom.xml
deleted file mode 100644
index dd73385ea96..00000000000
--- a/it/it-projects/duplications/file-duplications/pom.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>com.sonarsource.it.samples</groupId>
- <artifactId>duplications</artifactId>
- <version>1.0-SNAPSHOT</version>
-
-</project>
diff --git a/it/it-projects/duplications/file-duplications/sonar-project.properties b/it/it-projects/duplications/file-duplications/sonar-project.properties
new file mode 100644
index 00000000000..ae173196ce4
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/sonar-project.properties
@@ -0,0 +1,5 @@
+sonar.projectKey=file-duplications
+sonar.projectName=File duplications
+sonar.projectVersion=1.0-SNAPSHOT
+sonar.sources=src/main/xoo
+sonar.language=xoo
diff --git a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_with_other_package1/DuplicatedLinesWithOtherPackage.java b/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_with_other_package1/DuplicatedLinesWithOtherPackage.java
deleted file mode 100644
index cb27ed9455a..00000000000
--- a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_with_other_package1/DuplicatedLinesWithOtherPackage.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Sonar, entreprise quality control tool.
- * Copyright (C) 2007-2008 Hortis-GRC SA
- * mailto:be_agile HAT hortis DOT ch
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package duplicated_lines_with_other_package1;
-
-public class DuplicatedLinesWithOtherPackage {
-
- public DuplicatedLinesWithOtherPackage() {
- }
-
- public void duplicatedMethodWithOtherPackage() {
- char[] charList = new char[30];
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- }
-} \ No newline at end of file
diff --git a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_with_other_package2/DuplicatedLinesWithOtherPackage.java b/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_with_other_package2/DuplicatedLinesWithOtherPackage.java
deleted file mode 100644
index f49127f3a06..00000000000
--- a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_with_other_package2/DuplicatedLinesWithOtherPackage.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Sonar, entreprise quality control tool.
- * Copyright (C) 2007-2008 Hortis-GRC SA
- * mailto:be_agile HAT hortis DOT ch
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package duplicated_lines_with_other_package2;
-
-public class DuplicatedLinesWithOtherPackage {
-
- public DuplicatedLinesWithOtherPackage() {
- }
-
- public void duplicatedMethodWithOtherPackage() {
- char[] charList = new char[30];
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- for (int i = 0; i < 10; i++) {
- charList[i] = 'a';
- }
- }
-} \ No newline at end of file
diff --git a/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo
new file mode 100644
index 00000000000..88e610b4a74
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo
@@ -0,0 +1,41 @@
+package duplicated_lines_with_other_dir1;
+
+public class DuplicatedLinesWithOtherDirectory {
+
+ public DuplicatedLinesWithOtherDirectory() {
+ }
+
+ public void duplicatedMethodWithOtherDirectory() {
+ char[] charList = new char[30];
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ }
+}
diff --git a/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo.measures b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo.measures
new file mode 100644
index 00000000000..03005736cf7
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo.measures
@@ -0,0 +1 @@
+ncloc:42
diff --git a/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo
new file mode 100644
index 00000000000..bb3cc734be4
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo
@@ -0,0 +1,41 @@
+package duplicated_lines_with_other_dir2;
+
+public class DuplicatedLinesWithOtherDirectory {
+
+ public DuplicatedLinesWithOtherDirectory() {
+ }
+
+ public void duplicatedMethodWithOtherDirectory() {
+ char[] charList = new char[30];
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ for (int i = 0; i < 10; i++) {
+ charList[i] = 'a';
+ }
+ }
+}
diff --git a/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo.measures b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo.measures
new file mode 100644
index 00000000000..03005736cf7
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo.measures
@@ -0,0 +1 @@
+ncloc:42
diff --git a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_within_package/DuplicatedLinesInSamePackage1.java b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory1.xoo
index 7316bdebbcf..5f23377bed4 100644
--- a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_within_package/DuplicatedLinesInSamePackage1.java
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory1.xoo
@@ -1,33 +1,14 @@
-/*
- * Sonar, entreprise quality control tool.
- * Copyright (C) 2007-2008 Hortis-GRC SA
- * mailto:be_agile HAT hortis DOT ch
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package duplicated_lines_within_package;
+package duplicated_lines_within_dir;
-public class DuplicatedLinesInSamePackage1 {
+public class DuplicatedLinesInSameDirectory1 {
- public DuplicatedLinesInSamePackage1() {
+ public DuplicatedLinesInSameDirectory1() {
}
/*
* sddfgdfgfg
*/
- public void duplicatedMethodInSameClass1() {
+ public void duplicatedMethodInSameFile1() {
int intergerToBeIncremented = 0;
while (intergerToBeIncremented < 100) {
intergerToBeIncremented++;
@@ -60,7 +41,7 @@ public class DuplicatedLinesInSamePackage1 {
}
- public void duplicatedMethodInSameClass3() {
+ public void duplicatedMethodInSameFile3() {
int intergerToBeIncremented = 0;
while (intergerToBeIncremented < 100) {
intergerToBeIncremented++;
@@ -92,8 +73,8 @@ public class DuplicatedLinesInSamePackage1 {
intergerToBeIncremented70++;
}
}
-
- public void duplicated2MethodInSameClass3() {
+
+ public void duplicated2MethodInSameFile3() {
System.out.print("copy test start");
int intergerToBeIncremented1 = 0;
while (intergerToBeIncremented1 < 100) {
@@ -121,4 +102,4 @@ public class DuplicatedLinesInSamePackage1 {
}
System.out.print("copy test end");
}
-} \ No newline at end of file
+}
diff --git a/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory1.xoo.measures b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory1.xoo.measures
new file mode 100644
index 00000000000..c71c98ec52e
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory1.xoo.measures
@@ -0,0 +1 @@
+ncloc:106
diff --git a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_within_package/DuplicatedLinesInSamePackage2.java b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory2.xoo
index d338c25b369..b565bfd75a2 100644
--- a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_within_package/DuplicatedLinesInSamePackage2.java
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory2.xoo
@@ -1,30 +1,11 @@
-/*
- * Sonar, entreprise quality control tool.
- * Copyright (C) 2007-2008 Hortis-GRC SA
- * mailto:be_agile HAT hortis DOT ch
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package duplicated_lines_within_package;
+package duplicated_lines_within_dir;
-public class DuplicatedLinesInSamePackage2 {
+public class DuplicatedLinesInSameDirectory2 {
- public DuplicatedLinesInSamePackage2() {
+ public DuplicatedLinesInSameDirectory2() {
}
-
- public void duplicated2MethodInSameClass3() {
+
+ public void duplicated2MethodInSameFile3() {
System.out.print("copy test start");
int intergerToBeIncremented1 = 0;
while (intergerToBeIncremented1 < 100) {
@@ -53,7 +34,7 @@ public class DuplicatedLinesInSamePackage2 {
System.out.print("copy test end");
}
- public void duplicatedMethodInSameClass1() {
+ public void duplicatedMethodInSameFile1() {
int intergerToBeIncremented = 0;
while (intergerToBeIncremented < 100) {
intergerToBeIncremented++;
@@ -87,4 +68,4 @@ public class DuplicatedLinesInSamePackage2 {
}
}
-} \ No newline at end of file
+}
diff --git a/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory2.xoo.measures b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory2.xoo.measures
new file mode 100644
index 00000000000..f175998c7cc
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_dir/DuplicatedLinesInSameDirectory2.xoo.measures
@@ -0,0 +1 @@
+ncloc:72
diff --git a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_within_same_class/DuplicatedLinesInSameClass.java b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo
index 3bf33bbbaa2..6a0d3345eb7 100644
--- a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_lines_within_same_class/DuplicatedLinesInSameClass.java
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo
@@ -1,30 +1,11 @@
-/*
- * Sonar, entreprise quality control tool.
- * Copyright (C) 2007-2008 Hortis-GRC SA
- * mailto:be_agile HAT hortis DOT ch
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package duplicated_lines_within_same_class;
+package duplicated_lines_within_same_file;
-public class DuplicatedLinesInSameClass {
+public class DuplicatedLinesInSameFile {
- public DuplicatedLinesInSameClass() {
+ public DuplicatedLinesInSameFile() {
}
- public void duplicatedMethodInSameClass1() {
+ public void duplicatedMethodInSameFile1() {
String temp = "";
for (int i=0; i<10; i++){
temp += "say something"+i;
@@ -55,7 +36,7 @@ public class DuplicatedLinesInSameClass {
}
}
- public void duplicatedMethodInSameClass2() {
+ public void duplicatedMethodInSameFile2() {
String temp = "";
for (int i=0; i<10; i++){
temp += "say something"+i;
@@ -83,7 +64,7 @@ public class DuplicatedLinesInSameClass {
}
for (int i=0; i<90; i++){
temp += "bye"+i;
- }
+ }
}
}
diff --git a/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo.measures b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo.measures
new file mode 100644
index 00000000000..5e818e5e054
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo.measures
@@ -0,0 +1 @@
+ncloc:71
diff --git a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_same_lines_within_3_classes/Class1.java b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File1.xoo
index 250c3d6228d..8083fdec9d6 100644
--- a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_same_lines_within_3_classes/Class1.java
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File1.xoo
@@ -1,30 +1,11 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package duplicated_same_lines_within_3_classes;
+package duplicated_same_lines_within_3_files;
-public class Class1 {
+public class File1 {
public void someMethod() {
System.out.println("Test");
}
-
+
public void duplicatedMethod() {
int intergerToBeIncremented = 0;
while (intergerToBeIncremented < 100) {
@@ -56,5 +37,5 @@ public class Class1 {
intergerToBeIncremented7++;
}
}
-
+
}
diff --git a/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File1.xoo.measures b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File1.xoo.measures
new file mode 100644
index 00000000000..03005736cf7
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File1.xoo.measures
@@ -0,0 +1 @@
+ncloc:42
diff --git a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_same_lines_within_3_classes/Class2.java b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File2.xoo
index 494cbb9d43d..b76919dbd67 100644
--- a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_same_lines_within_3_classes/Class2.java
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File2.xoo
@@ -1,26 +1,7 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package duplicated_same_lines_within_3_classes;
+package duplicated_same_lines_within_3_files;
+
+public class File2 {
-public class Class2 {
-
public void duplicatedMethod() {
int intergerToBeIncremented = 0;
while (intergerToBeIncremented < 100) {
@@ -52,7 +33,7 @@ public class Class2 {
intergerToBeIncremented7++;
}
}
-
+
public void someOtherMethod() {
System.out.println("Test2");
}
diff --git a/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File2.xoo.measures b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File2.xoo.measures
new file mode 100644
index 00000000000..076450c97b0
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File2.xoo.measures
@@ -0,0 +1 @@
+ncloc:41
diff --git a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_same_lines_within_3_classes/Class3.java b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File3.xoo
index a785723c3bc..5db9d2fd221 100644
--- a/it/it-projects/duplications/file-duplications/src/main/java/duplicated_same_lines_within_3_classes/Class3.java
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File3.xoo
@@ -1,28 +1,9 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package duplicated_same_lines_within_3_classes;
+package duplicated_same_lines_within_3_files;
-public class Class3 {
+public class File3 {
private String test;
-
+
public void duplicatedMethod() {
int intergerToBeIncremented = 0;
while (intergerToBeIncremented < 100) {
@@ -54,9 +35,9 @@ public class Class3 {
intergerToBeIncremented7++;
}
}
-
+
public String getTest() {
return test;
}
-
+
}
diff --git a/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File3.xoo.measures b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File3.xoo.measures
new file mode 100644
index 00000000000..9fd62445ebd
--- /dev/null
+++ b/it/it-projects/duplications/file-duplications/src/main/xoo/duplicated_same_lines_within_3_files/File3.xoo.measures
@@ -0,0 +1 @@
+ncloc:44