aboutsummaryrefslogtreecommitdiffstats
path: root/it/it-projects
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2015-11-13 17:40:58 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2015-11-16 08:44:06 +0100
commit1757a06de3e2196b15cf0656b3aa844ea729d6e3 (patch)
tree132b5ff1315675639d1981265552caef68755af0 /it/it-projects
parent0feeea6c806bb1e3834cb14241df7b21de4a657f (diff)
downloadsonarqube-1757a06de3e2196b15cf0656b3aa844ea729d6e3.tar.gz
sonarqube-1757a06de3e2196b15cf0656b3aa844ea729d6e3.zip
SONAR-6323 Add some ITs in CrossProjectDuplicationsTest
Diffstat (limited to 'it/it-projects')
-rw-r--r--it/it-projects/duplications/cross-project/a/pom.xml9
-rw-r--r--it/it-projects/duplications/cross-project/a/src/main/java/MyClass.java14
-rw-r--r--it/it-projects/duplications/cross-project/b/pom.xml9
-rw-r--r--it/it-projects/duplications/cross-project/b/src/main/java/MyClass2.java14
-rw-r--r--it/it-projects/duplications/cross-project/duplicate/sonar-project.properties5
-rw-r--r--it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File1.xoo35
-rw-r--r--it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File1.xoo.measures1
-rw-r--r--it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File2.xoo23
-rw-r--r--it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File2.xoo.measures1
-rw-r--r--it/it-projects/duplications/cross-project/origin/sonar-project.properties5
-rw-r--r--it/it-projects/duplications/cross-project/origin/src/main/xoo/sample/File1.xoo35
-rw-r--r--it/it-projects/duplications/cross-project/origin/src/main/xoo/sample/File1.xoo.measures1
12 files changed, 106 insertions, 46 deletions
diff --git a/it/it-projects/duplications/cross-project/a/pom.xml b/it/it-projects/duplications/cross-project/a/pom.xml
deleted file mode 100644
index fc279f29aaa..00000000000
--- a/it/it-projects/duplications/cross-project/a/pom.xml
+++ /dev/null
@@ -1,9 +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.duplications</groupId>
- <artifactId>a</artifactId>
- <version>1.0-SNAPSHOT</version>
-
-</project>
diff --git a/it/it-projects/duplications/cross-project/a/src/main/java/MyClass.java b/it/it-projects/duplications/cross-project/a/src/main/java/MyClass.java
deleted file mode 100644
index 2dca0f23534..00000000000
--- a/it/it-projects/duplications/cross-project/a/src/main/java/MyClass.java
+++ /dev/null
@@ -1,14 +0,0 @@
-public class MyClass {
- public void sayHello() {
- int d1;
- int d2;
- int d3;
- int d4;
- int d5;
- int d6;
- int d7;
- int d8;
- int d9;
- int d10;
- }
-}
diff --git a/it/it-projects/duplications/cross-project/b/pom.xml b/it/it-projects/duplications/cross-project/b/pom.xml
deleted file mode 100644
index e3db8fc52a2..00000000000
--- a/it/it-projects/duplications/cross-project/b/pom.xml
+++ /dev/null
@@ -1,9 +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.duplications</groupId>
- <artifactId>b</artifactId>
- <version>1.0-SNAPSHOT</version>
-
-</project>
diff --git a/it/it-projects/duplications/cross-project/b/src/main/java/MyClass2.java b/it/it-projects/duplications/cross-project/b/src/main/java/MyClass2.java
deleted file mode 100644
index b8a203b884b..00000000000
--- a/it/it-projects/duplications/cross-project/b/src/main/java/MyClass2.java
+++ /dev/null
@@ -1,14 +0,0 @@
-public class MyClass2 {
- public void sayHello2() {
- int d1;
- int d2;
- int d3;
- int d4;
- int d5;
- int d6;
- int d7;
- int d8;
- int d9;
- int d10;
- }
-}
diff --git a/it/it-projects/duplications/cross-project/duplicate/sonar-project.properties b/it/it-projects/duplications/cross-project/duplicate/sonar-project.properties
new file mode 100644
index 00000000000..cc020389cbd
--- /dev/null
+++ b/it/it-projects/duplications/cross-project/duplicate/sonar-project.properties
@@ -0,0 +1,5 @@
+sonar.projectKey=cross-project
+sonar.projectName=Cross project
+sonar.projectVersion=1.0-SNAPSHOT
+sonar.sources=src/main/xoo
+sonar.language=xoo
diff --git a/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File1.xoo b/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File1.xoo
new file mode 100644
index 00000000000..5e494b196ab
--- /dev/null
+++ b/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File1.xoo
@@ -0,0 +1,35 @@
+package sample;
+
+public class File1 {
+
+ public File1() {
+ }
+
+ public void test() {
+ 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';
+ }
+ int intergerToBeIncremented = 0;
+ while (intergerToBeIncremented < 100) {
+ intergerToBeIncremented++;
+ }
+ int intergerToBeIncremented2 = 0;
+ while (intergerToBeIncremented2 < 100) {
+ intergerToBeIncremented2++;
+ }
+ String temp = "";
+ for (int i=0; i<10; i++){
+ temp += "say something"+i;
+ }
+ for (int i=0; i<20; i++){
+ temp += "say nothing"+i;
+ }
+ for (int i=0; i<30; i++){
+ temp += "always say nothing"+i;
+ }
+ }
+}
diff --git a/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File1.xoo.measures b/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File1.xoo.measures
new file mode 100644
index 00000000000..5a79b0b5dbb
--- /dev/null
+++ b/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File1.xoo.measures
@@ -0,0 +1 @@
+ncloc:36
diff --git a/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File2.xoo b/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File2.xoo
new file mode 100644
index 00000000000..00b502d423a
--- /dev/null
+++ b/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File2.xoo
@@ -0,0 +1,23 @@
+package sample;
+
+public class File1 {
+
+ public File1() {
+ }
+
+ public void otherMethod() {
+ String temp = "";
+ for (int i=0; i<10; i++){
+ temp += "say something"+i;
+ int nothing = 0;
+ }
+ for (int i=0; i<20; i++){
+ temp += "say nothing"+i;
+ int nothing = 1;
+ }
+ for (int i=0; i<30; i++){
+ temp += "always say nothing"+i;
+ int nothing = 2;
+ }
+ }
+}
diff --git a/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File2.xoo.measures b/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File2.xoo.measures
new file mode 100644
index 00000000000..d90983a3e9f
--- /dev/null
+++ b/it/it-projects/duplications/cross-project/duplicate/src/main/xoo/sample/File2.xoo.measures
@@ -0,0 +1 @@
+ncloc:24
diff --git a/it/it-projects/duplications/cross-project/origin/sonar-project.properties b/it/it-projects/duplications/cross-project/origin/sonar-project.properties
new file mode 100644
index 00000000000..cc020389cbd
--- /dev/null
+++ b/it/it-projects/duplications/cross-project/origin/sonar-project.properties
@@ -0,0 +1,5 @@
+sonar.projectKey=cross-project
+sonar.projectName=Cross project
+sonar.projectVersion=1.0-SNAPSHOT
+sonar.sources=src/main/xoo
+sonar.language=xoo
diff --git a/it/it-projects/duplications/cross-project/origin/src/main/xoo/sample/File1.xoo b/it/it-projects/duplications/cross-project/origin/src/main/xoo/sample/File1.xoo
new file mode 100644
index 00000000000..cc0b6612812
--- /dev/null
+++ b/it/it-projects/duplications/cross-project/origin/src/main/xoo/sample/File1.xoo
@@ -0,0 +1,35 @@
+package sample;
+
+public class File1 {
+
+ public File1() {
+ }
+
+ public void test2() {
+ 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';
+ }
+ int intergerToBeIncremented = 0;
+ while (intergerToBeIncremented < 100) {
+ intergerToBeIncremented++;
+ }
+ int intergerToBeIncremented2 = 0;
+ while (intergerToBeIncremented2 < 100) {
+ intergerToBeIncremented2++;
+ }
+ String temp = "";
+ for (int i=0; i<10; i++){
+ temp += "say something"+i;
+ }
+ for (int i=0; i<20; i++){
+ temp += "say nothing"+i;
+ }
+ for (int i=0; i<30; i++){
+ temp += "always say nothing"+i;
+ }
+ }
+}
diff --git a/it/it-projects/duplications/cross-project/origin/src/main/xoo/sample/File1.xoo.measures b/it/it-projects/duplications/cross-project/origin/src/main/xoo/sample/File1.xoo.measures
new file mode 100644
index 00000000000..5a79b0b5dbb
--- /dev/null
+++ b/it/it-projects/duplications/cross-project/origin/src/main/xoo/sample/File1.xoo.measures
@@ -0,0 +1 @@
+ncloc:36