diff --git a/README_ASSIGNMENT.pdf b/README_ASSIGNMENT.pdf
new file mode 100644
index 000000000..cf841c323
Binary files /dev/null and b/README_ASSIGNMENT.pdf differ
diff --git a/alitheia/core/src/main/java/eu/sqooss/service/db/Developer.java b/alitheia/core/src/main/java/eu/sqooss/service/db/Developer.java
index 26f99af02..e07581972 100644
--- a/alitheia/core/src/main/java/eu/sqooss/service/db/Developer.java
+++ b/alitheia/core/src/main/java/eu/sqooss/service/db/Developer.java
@@ -33,11 +33,8 @@
package eu.sqooss.service.db;
-import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
-import java.util.Map;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@@ -53,9 +50,6 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.commons.codec.digest.DigestUtils;
-
-import eu.sqooss.core.AlitheiaCore;
import eu.sqooss.service.db.DAObject;
/**
@@ -198,239 +192,6 @@ public void addAlias(String email) {
getAliases().add(da);
}
- /**
- * Return the entry in the Developer table that corresponds to the provided
- * email. If the entry does not exist, it will be created and saved. If the
- * email username (the part before @) exists in the database, then this
- * record is updated with the provided email and returned.
- *
- * @param email
- * The Developer's email
- * @param sp The StoredProject this Developer belongs to
- * @return A Developer record for the specified Developer or null when:
- *
- * - The passed StoredProject does not exist
- * - The passed email is invalid syntactically
- *
- */
- public static Developer getDeveloperByEmail(String email,
- StoredProject sp) {
- return getDeveloperByEmail(email, sp, true);
- }
-
- /**
- * Return the entry in the Developer table that corresponds to the provided
- * email. If the entry does not exist, then the parameter create
- * controls whether it will be created and saved. If the email username (the
- * part before @) exists in the database, then this record is updated with
- * the provided email and returned.
- *
- * @param email The Developer's email
- * @param sp The StoredProject this Developer belongs to
- * @return A Developer record for the specified Developer or null when:
- *
- * - The passed StoredProject does not exist
- * - The passed email is invalid syntactically
- *
- */
- public static synchronized Developer getDeveloperByEmail(String email,
- StoredProject sp, boolean create){
- DBService dbs = AlitheiaCore.getInstance().getDBService();
-
- String paramProject = "project";
- String paramEmail = "email";
-
- StringBuffer q = new StringBuffer("select d ");
- q.append(" from Developer d, DeveloperAlias da ");
- q.append(" where da.developer = d ");
- q.append(" and d.storedProject = :").append(paramProject);
- q.append(" and da.email = :").append(paramEmail);
-
- Map parameterMap = new HashMap();
- parameterMap.put(paramEmail, email);
- parameterMap.put(paramProject, sp);
-
- List devs = (List) dbs.doHQL(q.toString(), parameterMap);
-
- /* Developer in the DB, return it */
- if ( !devs.isEmpty() )
- return devs.get(0);
-
- parameterMap.clear();
-
- /* if (!email.contains("@"))
- return null;
-
- String unameFromEmail = email.substring(0, email.indexOf('@'));
-
- if (unameFromEmail == "" || unameFromEmail == email)
- return null;
-
- parameterMap.put("username", unameFromEmail);
- parameterMap.put("storedProject", sp);
-
- devs = dbs.findObjectsByProperties(Developer.class,
- parameterMap);
-
- /* Developer's uname in table, update with email and return it *
- if (!devs.isEmpty()) {
- Developer d = devs.get(0);
- d.addAlias(email);
- return d;
- }*/
-
- /* Try Ohloh */
- String hash = DigestUtils.shaHex(email);
- OhlohDeveloper od = OhlohDeveloper.getByEmailHash(hash);
-
- if (od != null) {
- Developer d = getDeveloperByUsername(od.getUname(), sp, false);
-
- if (d != null) {
- d.addAlias(email);
- return d;
- }
- }
-
- if (!create)
- return null;
-
- /* Developer email not in table, create it new developer*/
- Developer d = new Developer();
- d.setStoredProject(sp);
-
- /*Failure here probably indicates non-existing StoredProject*/
- if ( !dbs.addRecord(d) )
- return null;
-
- d.addAlias(email);
-
- return d;
- }
-
- /**
- * Return the entry in the Developer table that corresponds to the provided
- * username. If the entry does not exist, it will be created and saved. If
- * the username matches the email of an existing developer in the database,
- * then this record is updated with the provided username and returned.
- *
- * @param username The Developer's username
- * @param sp The StoredProject this Developer belongs to
- * @return A Developer record for the specified Developer or null on failure
- */
- public static Developer getDeveloperByUsername(String username,
- StoredProject sp) {
- return getDeveloperByUsername(username, sp, true);
- }
-
- /**
- * Return the entry in the Developer table that corresponds to the provided
- * username. If the entry does not exist, then the parameter create
- * controls whether it will be created and saved. If the username matches
- * the email of an existing developer in the database, then this record is
- * updated with the provided username and returned.
- *
- * @param username The Developer's username
- * @param sp The StoredProject this Developer belongs to
- * @param create Create the developer entry if not found?
- *
- * @return A Developer record for the specified Developer or null on failure
- * to retrieve or create an entry.
- *
- */
- @SuppressWarnings("unchecked")
- public static synchronized Developer getDeveloperByUsername(String username,
- StoredProject sp, boolean create) {
-
- DBService dbs = AlitheiaCore.getInstance().getDBService();
-
- Map parameterMap = new HashMap();
- parameterMap.put("username", username);
- parameterMap.put("storedProject", sp);
-
- List devs = dbs.findObjectsByProperties(Developer.class,
- parameterMap);
-
- /*
- * Developer in the DB, return it Username + storedproject is unique, so
- * only one record can be returned by the query
- */
- if (!devs.isEmpty())
- return devs.get(0);
-
- /*
- * Try to find a Developer whose email starts with username
- *
- * TODO: "like" is NOT a Hibernate keyword. The following query might
- * only work with certain databases (tested with mysql, postgres and
- * derby).
- */
- /*devs = (List) dbs.doHQL("from Developer as foo where email like " +
- "'%" +username+ "%' and storedProject.id=" + sp.getId() );
-
- for (Developer d : devs) {
- Set aliases = d.getAliases();
- for (DeveloperAlias da : aliases) {
- /* Ok got one, update the username *
- if (da.getEmail().startsWith(username)) {
- d.setUsername(username);
- return d;
- }
- }
- }*/
-
- if (!create)
- return null;
-
- /* Developer not in table, create new developer */
- Developer d = new Developer();
-
- d.setUsername(username);
- d.setStoredProject(sp);
-
- /*Failure here probably indicates non-existing StoredProject*/
- if (!dbs.addRecord(d))
- return null;
-
- return d;
- }
-
- /**
- * Get a developer entry by developer name. If the entry does not exist,
- * then the parameter create controls whether it will be created
- * and saved.
- *
- * @param name
- * @param sp
- * @param create
- * @return
- */
- public static synchronized Developer getDeveloperByName(String name,
- StoredProject sp, boolean create) {
-
- DBService dbs = AlitheiaCore.getInstance().getDBService();
-
- Map params = new HashMap();
- params.put("name", name);
- params.put("storedProject", sp);
-
- List devs = dbs.findObjectsByProperties(Developer.class,params);
-
- /* This code assumes that each name is unique in a project*/
- if (devs.size() > 0)
- return devs.get(0);
-
- if (!create)
- return null;
-
- Developer d = new Developer();
- d.setName(name);
- if (!dbs.addRecord(d))
- return null;
-
- return d;
- }
-
public String toString() {
StringBuffer dev = new StringBuffer();
dev.append(name).append(", aka:").append(username).append(" (");
diff --git a/alitheia/core/src/main/java/eu/sqooss/service/db/DeveloperDB.java b/alitheia/core/src/main/java/eu/sqooss/service/db/DeveloperDB.java
new file mode 100644
index 000000000..ef61e2550
--- /dev/null
+++ b/alitheia/core/src/main/java/eu/sqooss/service/db/DeveloperDB.java
@@ -0,0 +1,246 @@
+package eu.sqooss.service.db;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.codec.digest.DigestUtils;
+
+import eu.sqooss.core.AlitheiaCore;
+
+public class DeveloperDB {
+
+ /**
+ * Return the entry in the Developer table that corresponds to the provided
+ * email. If the entry does not exist, it will be created and saved. If the
+ * email username (the part before @) exists in the database, then this
+ * record is updated with the provided email and returned.
+ *
+ * @param email
+ * The Developer's email
+ * @param sp The StoredProject this Developer belongs to
+ * @return A Developer record for the specified Developer or null when:
+ *
+ * - The passed StoredProject does not exist
+ * - The passed email is invalid syntactically
+ *
+ */
+ public static Developer getDeveloperByEmail(String email,
+ StoredProject sp) {
+ return DeveloperDB.getDeveloperByEmail(email, sp, true);
+ }
+
+ /**
+ * Return the entry in the Developer table that corresponds to the provided
+ * email. If the entry does not exist, then the parameter create
+ * controls whether it will be created and saved. If the email username (the
+ * part before @) exists in the database, then this record is updated with
+ * the provided email and returned.
+ *
+ * @param email The Developer's email
+ * @param sp The StoredProject this Developer belongs to
+ * @return A Developer record for the specified Developer or null when:
+ *
+ * - The passed StoredProject does not exist
+ * - The passed email is invalid syntactically
+ *
+ */
+ public static synchronized Developer getDeveloperByEmail(String email,
+ StoredProject sp, boolean create){
+ DBService dbs = AlitheiaCore.getInstance().getDBService();
+
+ String paramProject = "project";
+ String paramEmail = "email";
+
+ StringBuffer q = new StringBuffer("select d ");
+ q.append(" from Developer d, DeveloperAlias da ");
+ q.append(" where da.developer = d ");
+ q.append(" and d.storedProject = :").append(paramProject);
+ q.append(" and da.email = :").append(paramEmail);
+
+ Map parameterMap = new HashMap();
+ parameterMap.put(paramEmail, email);
+ parameterMap.put(paramProject, sp);
+
+ List devs = (List) dbs.doHQL(q.toString(), parameterMap);
+
+ /* Developer in the DB, return it */
+ if ( !devs.isEmpty() )
+ return devs.get(0);
+
+ parameterMap.clear();
+
+ /* if (!email.contains("@"))
+ return null;
+
+ String unameFromEmail = email.substring(0, email.indexOf('@'));
+
+ if (unameFromEmail == "" || unameFromEmail == email)
+ return null;
+
+ parameterMap.put("username", unameFromEmail);
+ parameterMap.put("storedProject", sp);
+
+ devs = dbs.findObjectsByProperties(Developer.class,
+ parameterMap);
+
+ /* Developer's uname in table, update with email and return it *
+ if (!devs.isEmpty()) {
+ Developer d = devs.get(0);
+ d.addAlias(email);
+ return d;
+ }*/
+
+ /* Try Ohloh */
+ String hash = DigestUtils.shaHex(email);
+ OhlohDeveloper od = OhlohDeveloper.getByEmailHash(hash);
+
+ if (od != null) {
+ Developer d = DeveloperDB.getDeveloperByUsername(od.getUname(), sp, false);
+
+ if (d != null) {
+ d.addAlias(email);
+ return d;
+ }
+ }
+
+ if (!create)
+ return null;
+
+ /* Developer email not in table, create it new developer*/
+ Developer d = new Developer();
+ d.setStoredProject(sp);
+
+ /*Failure here probably indicates non-existing StoredProject*/
+ if ( !dbs.addRecord(d) )
+ return null;
+
+ d.addAlias(email);
+
+ return d;
+ }
+
+ /**
+ * Return the entry in the Developer table that corresponds to the provided
+ * username. If the entry does not exist, it will be created and saved. If
+ * the username matches the email of an existing developer in the database,
+ * then this record is updated with the provided username and returned.
+ *
+ * @param username The Developer's username
+ * @param sp The StoredProject this Developer belongs to
+ * @return A Developer record for the specified Developer or null on failure
+ */
+ public static Developer getDeveloperByUsername(String username,
+ StoredProject sp) {
+ return DeveloperDB.getDeveloperByUsername(username, sp, true);
+ }
+
+ /**
+ * Return the entry in the Developer table that corresponds to the provided
+ * username. If the entry does not exist, then the parameter create
+ * controls whether it will be created and saved. If the username matches
+ * the email of an existing developer in the database, then this record is
+ * updated with the provided username and returned.
+ *
+ * @param username The Developer's username
+ * @param sp The StoredProject this Developer belongs to
+ * @param create Create the developer entry if not found?
+ *
+ * @return A Developer record for the specified Developer or null on failure
+ * to retrieve or create an entry.
+ *
+ */
+ @SuppressWarnings("unchecked")
+ public static synchronized Developer getDeveloperByUsername(String username,
+ StoredProject sp, boolean create) {
+
+ DBService dbs = AlitheiaCore.getInstance().getDBService();
+
+ Map parameterMap = new HashMap();
+ parameterMap.put("username", username);
+ parameterMap.put("storedProject", sp);
+
+ List devs = dbs.findObjectsByProperties(Developer.class,
+ parameterMap);
+
+ /*
+ * Developer in the DB, return it Username + storedproject is unique, so
+ * only one record can be returned by the query
+ */
+ if (!devs.isEmpty())
+ return devs.get(0);
+
+ /*
+ * Try to find a Developer whose email starts with username
+ *
+ * TODO: "like" is NOT a Hibernate keyword. The following query might
+ * only work with certain databases (tested with mysql, postgres and
+ * derby).
+ */
+ /*devs = (List) dbs.doHQL("from Developer as foo where email like " +
+ "'%" +username+ "%' and storedProject.id=" + sp.getId() );
+
+ for (Developer d : devs) {
+ Set aliases = d.getAliases();
+ for (DeveloperAlias da : aliases) {
+ /* Ok got one, update the username *
+ if (da.getEmail().startsWith(username)) {
+ d.setUsername(username);
+ return d;
+ }
+ }
+ }*/
+
+ if (!create)
+ return null;
+
+ /* Developer not in table, create new developer */
+ Developer d = new Developer();
+
+ d.setUsername(username);
+ d.setStoredProject(sp);
+
+ /*Failure here probably indicates non-existing StoredProject*/
+ if (!dbs.addRecord(d))
+ return null;
+
+ return d;
+ }
+
+ /**
+ * Get a developer entry by developer name. If the entry does not exist,
+ * then the parameter create controls whether it will be created
+ * and saved.
+ *
+ * @param name
+ * @param sp
+ * @param create
+ * @return
+ */
+ public static synchronized Developer getDeveloperByName(String name,
+ StoredProject sp, boolean create) {
+
+ DBService dbs = AlitheiaCore.getInstance().getDBService();
+
+ Map params = new HashMap();
+ params.put("name", name);
+ params.put("storedProject", sp);
+
+ List devs = dbs.findObjectsByProperties(Developer.class,params);
+
+ /* This code assumes that each name is unique in a project*/
+ if (devs.size() > 0)
+ return devs.get(0);
+
+ if (!create)
+ return null;
+
+ Developer d = new Developer();
+ d.setName(name);
+ if (!dbs.addRecord(d))
+ return null;
+
+ return d;
+ }
+
+}
diff --git a/alitheia/core/src/main/java/eu/sqooss/service/db/MailMessage.java b/alitheia/core/src/main/java/eu/sqooss/service/db/MailMessage.java
index dfffa7edc..fce98dabd 100644
--- a/alitheia/core/src/main/java/eu/sqooss/service/db/MailMessage.java
+++ b/alitheia/core/src/main/java/eu/sqooss/service/db/MailMessage.java
@@ -75,12 +75,12 @@ public class MailMessage extends DAObject {
@JoinColumn(name="SENDER_ID")
private Developer sender;
- /**
- * The list to which the email was originally sent
- */
- @ManyToOne(fetch=FetchType.LAZY)
- @JoinColumn(name="MLIST_ID")
- private MailingList list;
+// /**
+// * The list to which the email was originally sent
+// */
+// @ManyToOne(fetch=FetchType.LAZY)
+// @JoinColumn(name="MLIST_ID")
+// private MailingList list;
/**
* Unique ID for this message in the database
@@ -172,11 +172,13 @@ public void setSender( Developer value ) {
}
public MailingList getList() {
- return list;
+ return this.getThread().getList();
+ //return list;
}
public void setList( MailingList value ) {
- list = value;
+ this.getThread().setList(value);
+ //list = value;
}
public String getMessageId() {
diff --git a/alitheia/core/src/main/java/eu/sqooss/service/db/MailingList.java b/alitheia/core/src/main/java/eu/sqooss/service/db/MailingList.java
index 1b92720cc..adf9cd40a 100644
--- a/alitheia/core/src/main/java/eu/sqooss/service/db/MailingList.java
+++ b/alitheia/core/src/main/java/eu/sqooss/service/db/MailingList.java
@@ -39,6 +39,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.TreeSet;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@@ -84,11 +85,11 @@ public class MailingList extends DAObject {
@JoinColumn(name="PROJECT_ID")
private StoredProject storedProject;
- /**
- * The set of available messages in this list
- */
- @OneToMany(mappedBy="list", orphanRemoval=true, cascade = CascadeType.ALL)
- private Set messages;
+// /**
+// * The set of available messages in this list
+// */
+// @OneToMany(mappedBy="list", orphanRemoval=true, cascade = CascadeType.ALL)
+// private Set messages;
/**
* The set of threaded discussions in this list
@@ -123,12 +124,16 @@ public void setStoredProject(StoredProject sp) {
}
public Set getMessages() {
- return messages;
+ Set listMessages = new TreeSet();
+ for (MailingListThread thread: this.getThreads()){
+ listMessages.addAll(thread.getMessages());
+ }
+ return listMessages;
}
- public void setMessages(Set messages) {
- this.messages = messages;
- }
+// public void setMessages(Set messages) {
+// this.messages = messages;
+// }
public Set getThreads() {
return threads;
@@ -151,11 +156,18 @@ public List getMessagesNewerThan(Date d) {
String paramDate = "paramDate";
String paramMailingList = "paramML";
- String query = " select mm " +
- " from MailMessage mm, MailingList ml " +
- " where mm.list = ml " +
- " and mm.list = :" + paramMailingList +
- " and mm.sendDate > :" + paramDate;
+ String query = "select mm" +
+ " from MailingList ml, MailingListThread mlt, MailMessage mm " +
+ " where ml = mlt.list" +
+ " and mlt = mm.thread" +
+ " and mlt.list = :" + paramMailingList +
+ " and mm.sendDate > :" + paramDate;
+//
+// String query = " select mm " +
+// " from MailMessage mm, MailingList ml " +
+// " where mm.list = ml " +
+// " and mm.list = :" + paramMailingList +
+// " and mm.sendDate > :" + paramDate;
Map params = new HashMap();
params.put(paramDate, d);
@@ -177,12 +189,19 @@ public MailMessage getLatestEmail() {
String paramMailingList = "paramML";
- String query = " select mm " +
- " from MailMessage mm, MailingList ml " +
- " where mm.list = ml " +
- " and mm.list = :" + paramMailingList +
- " order by mm.sendDate desc";
+ String query = "select mm" +
+ " from MailingList ml, MailingListThread mlt, MailMessage mm " +
+ " where ml = mlt.list" +
+ " and mlt = mm.thread" +
+ " and mlt.list = :" + paramMailingList +
+ " order by mm.sendDate desc";
+// String query = " select mm " +
+// " from MailMessage mm, MailingList ml " +
+// " where mm.list = ml " +
+// " and mm.list = :" + paramMailingList +
+// " order by mm.sendDate desc";
+//
Map params = new HashMap();
params.put(paramMailingList, this);
@@ -206,7 +225,7 @@ public MailingListThread getLatestThread() {
String query = " select mt " +
" from MailThread mt, MailingList ml " +
" where mt.list = ml " +
- " and mm.list = :" + paramMailingList +
+ " and mt.list = :" + paramMailingList +
" order by mt.lastUpdated desc";
Map params = new HashMap();
diff --git a/alitheia/core/src/main/java/sqooss-core.png b/alitheia/core/src/main/java/sqooss-core.png
new file mode 100644
index 000000000..ec55bd14c
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-core.png differ
diff --git a/alitheia/core/src/main/java/sqooss-core.ucls b/alitheia/core/src/main/java/sqooss-core.ucls
new file mode 100644
index 000000000..ce3a02f85
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-core.ucls
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-rest-api.png b/alitheia/core/src/main/java/sqooss-rest-api.png
new file mode 100644
index 000000000..1b4aa198c
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-rest-api.png differ
diff --git a/alitheia/core/src/main/java/sqooss-rest-api.ucls b/alitheia/core/src/main/java/sqooss-rest-api.ucls
new file mode 100644
index 000000000..afd1578bb
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-rest-api.ucls
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-admin.png b/alitheia/core/src/main/java/sqooss-service-admin.png
new file mode 100644
index 000000000..b92173d18
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-admin.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-admin.ucls b/alitheia/core/src/main/java/sqooss-service-admin.ucls
new file mode 100644
index 000000000..0f1a0d2df
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-admin.ucls
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-cluster.png b/alitheia/core/src/main/java/sqooss-service-cluster.png
new file mode 100644
index 000000000..0f815c45c
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-cluster.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-cluster.ucls b/alitheia/core/src/main/java/sqooss-service-cluster.ucls
new file mode 100644
index 000000000..5fdf843c0
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-cluster.ucls
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-db.png b/alitheia/core/src/main/java/sqooss-service-db.png
new file mode 100644
index 000000000..03dbdc7e6
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-db.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-db.ucls b/alitheia/core/src/main/java/sqooss-service-db.ucls
new file mode 100644
index 000000000..1f5c020b1
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-db.ucls
@@ -0,0 +1,1546 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-fds.png b/alitheia/core/src/main/java/sqooss-service-fds.png
new file mode 100644
index 000000000..ddc86372b
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-fds.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-fds.ucls b/alitheia/core/src/main/java/sqooss-service-fds.ucls
new file mode 100644
index 000000000..60f392db1
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-fds.ucls
@@ -0,0 +1,290 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-logging.png b/alitheia/core/src/main/java/sqooss-service-logging.png
new file mode 100644
index 000000000..3d7b95f4a
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-logging.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-logging.ucls b/alitheia/core/src/main/java/sqooss-service-logging.ucls
new file mode 100644
index 000000000..e9d933490
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-logging.ucls
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-metric.png b/alitheia/core/src/main/java/sqooss-service-metric.png
new file mode 100644
index 000000000..d501b65d9
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-metric.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-metric.ucls b/alitheia/core/src/main/java/sqooss-service-metric.ucls
new file mode 100644
index 000000000..c14d69567
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-metric.ucls
@@ -0,0 +1,241 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-pa.png b/alitheia/core/src/main/java/sqooss-service-pa.png
new file mode 100644
index 000000000..47438c6ba
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-pa.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-pa.ucls b/alitheia/core/src/main/java/sqooss-service-pa.ucls
new file mode 100644
index 000000000..e8edd45d9
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-pa.ucls
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-rest.png b/alitheia/core/src/main/java/sqooss-service-rest.png
new file mode 100644
index 000000000..3fa5e0597
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-rest.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-rest.ucls b/alitheia/core/src/main/java/sqooss-service-rest.ucls
new file mode 100644
index 000000000..f50414211
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-rest.ucls
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-scheduler.png b/alitheia/core/src/main/java/sqooss-service-scheduler.png
new file mode 100644
index 000000000..e35d0ec1e
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-scheduler.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-scheduler.ucls b/alitheia/core/src/main/java/sqooss-service-scheduler.ucls
new file mode 100644
index 000000000..8ea5232f1
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-scheduler.ucls
@@ -0,0 +1,266 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-tds.png b/alitheia/core/src/main/java/sqooss-service-tds.png
new file mode 100644
index 000000000..f7578da39
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-tds.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-tds.ucls b/alitheia/core/src/main/java/sqooss-service-tds.ucls
new file mode 100644
index 000000000..de0882b74
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-tds.ucls
@@ -0,0 +1,564 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-updater.png b/alitheia/core/src/main/java/sqooss-service-updater.png
new file mode 100644
index 000000000..5ea160e9a
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-updater.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-updater.ucls b/alitheia/core/src/main/java/sqooss-service-updater.ucls
new file mode 100644
index 000000000..ba3f5b212
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-updater.ucls
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-util.png b/alitheia/core/src/main/java/sqooss-service-util.png
new file mode 100644
index 000000000..2a7266498
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-util.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-util.ucls b/alitheia/core/src/main/java/sqooss-service-util.ucls
new file mode 100644
index 000000000..e4f1f7220
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-util.ucls
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/main/java/sqooss-service-webadmin.png b/alitheia/core/src/main/java/sqooss-service-webadmin.png
new file mode 100644
index 000000000..d5bb972f1
Binary files /dev/null and b/alitheia/core/src/main/java/sqooss-service-webadmin.png differ
diff --git a/alitheia/core/src/main/java/sqooss-service-webadmin.ucls b/alitheia/core/src/main/java/sqooss-service-webadmin.ucls
new file mode 100644
index 000000000..811149f88
--- /dev/null
+++ b/alitheia/core/src/main/java/sqooss-service-webadmin.ucls
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/alitheia/core/src/test/java/eu/sqooss/developer/test/DeveloperDBTest.java b/alitheia/core/src/test/java/eu/sqooss/developer/test/DeveloperDBTest.java
new file mode 100644
index 000000000..ba0ac692a
--- /dev/null
+++ b/alitheia/core/src/test/java/eu/sqooss/developer/test/DeveloperDBTest.java
@@ -0,0 +1,163 @@
+package eu.sqooss.developer.test;
+
+import static org.junit.Assert.*;
+
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.TreeSet;
+
+import javassist.expr.NewExpr;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import eu.sqooss.impl.service.admin.AdminServiceImpl;
+import eu.sqooss.impl.service.db.DBServiceImpl;
+import eu.sqooss.service.admin.actions.RunTimeInfo;
+import eu.sqooss.service.db.Developer;
+import eu.sqooss.service.db.DeveloperAlias;
+import eu.sqooss.service.db.DeveloperDB;
+import eu.sqooss.service.db.StoredProject;
+
+public class DeveloperDBTest {
+
+ static DBServiceImpl impl;
+ static long failid;
+ static long successid;
+
+ @BeforeClass
+ public static void setUp() {
+ impl = new DBServiceImpl();
+ }
+
+
+ @Test
+ public void testGetDeveloperByEmailStringStoredProject() {
+ String email = "boooom";
+
+ Developer developer= new Developer();
+ DeveloperAlias alias = new DeveloperAlias();
+ alias.setEmail(email);
+
+ StoredProject storedProject = new StoredProject();
+ storedProject.setDevelopers(new HashSet());
+ storedProject.getDevelopers().add(developer);
+
+ developer.setAliases(new HashSet());
+ developer.getAliases().add(alias);
+
+ impl.addRecord(developer);
+
+ DeveloperDB dbd = new DeveloperDB();
+
+ Developer retrievedDeveloper = dbd.getDeveloperByEmail(email, storedProject);
+
+ assertNotNull(retrievedDeveloper);
+
+ }
+
+ @Test
+ public void testGetDeveloperByEmailStringStoredProjectBoolean() {
+ String email = "boooom";
+
+ Developer developer= new Developer();
+ DeveloperAlias alias = new DeveloperAlias();
+ alias.setEmail(email);
+
+ StoredProject storedProject = new StoredProject();
+ storedProject.setDevelopers(new HashSet());
+ storedProject.getDevelopers().add(developer);
+
+ developer.setAliases(new HashSet());
+ developer.getAliases().add(alias);
+
+ impl.addRecord(developer);
+
+ DeveloperDB dbd = new DeveloperDB();
+
+ Developer retrievedDeveloper;
+ retrievedDeveloper = dbd.getDeveloperByEmail(email, storedProject, false);
+
+ assertNull(retrievedDeveloper);
+
+ retrievedDeveloper = dbd.getDeveloperByEmail(email, storedProject, true);
+
+ assertNotNull(retrievedDeveloper);
+ }
+
+ @Test
+ public void testGetDeveloperByUsernameStringStoredProject() {
+ String username = "name";
+
+ Developer developer= new Developer();
+
+ developer.setUsername(username);
+
+ StoredProject storedProject = new StoredProject();
+ storedProject.setDevelopers(new HashSet());
+ storedProject.getDevelopers().add(developer);
+
+ impl.addRecord(developer);
+
+ DeveloperDB dbd = new DeveloperDB();
+
+ Developer retrievedDeveloper = dbd.getDeveloperByUsername(username, storedProject);
+
+ assertNull(retrievedDeveloper);
+
+
+ }
+
+ @Test
+ public void testGetDeveloperByUsernameStringStoredProjectBoolean() {
+ String username = "name";
+
+ Developer developer= new Developer();
+
+ developer.setUsername(username);
+
+ StoredProject storedProject = new StoredProject();
+ storedProject.setDevelopers(new HashSet());
+ storedProject.getDevelopers().add(developer);
+
+ impl.addRecord(developer);
+
+ DeveloperDB dbd = new DeveloperDB();
+
+ Developer retrievedDeveloper;
+ retrievedDeveloper = dbd.getDeveloperByUsername(username, storedProject, false);
+
+ assertNull(retrievedDeveloper);
+
+ retrievedDeveloper = dbd.getDeveloperByUsername(username, storedProject, true);
+
+ assertNotNull(retrievedDeveloper);
+ }
+
+ @Test
+ public void testGetDeveloperByName() {
+ String name = "name";
+
+ Developer developer= new Developer();
+
+ developer.setName(name);
+
+ StoredProject storedProject = new StoredProject();
+ storedProject.setDevelopers(new HashSet());
+ storedProject.getDevelopers().add(developer);
+
+ impl.addRecord(developer);
+
+ DeveloperDB dbd = new DeveloperDB();
+
+ Developer retrievedDeveloper;
+ retrievedDeveloper = dbd.getDeveloperByUsername(name, storedProject, false);
+
+ assertNull(retrievedDeveloper);
+
+ retrievedDeveloper = dbd.getDeveloperByUsername(name, storedProject, true);
+
+ assertNotNull(retrievedDeveloper);
+ }
+
+}
diff --git a/alitheia/core/src/test/java/eu/sqooss/mail/test/MailingListTest.java b/alitheia/core/src/test/java/eu/sqooss/mail/test/MailingListTest.java
new file mode 100644
index 000000000..800474102
--- /dev/null
+++ b/alitheia/core/src/test/java/eu/sqooss/mail/test/MailingListTest.java
@@ -0,0 +1,114 @@
+package eu.sqooss.mail.test;
+
+import static org.junit.Assert.*;
+
+
+import java.util.HashSet;
+
+
+import java.util.Set;
+import org.junit.Test;
+
+import eu.sqooss.service.db.MailMessage;
+import eu.sqooss.service.db.MailingList;
+import eu.sqooss.service.db.MailingListThread;
+
+public class MailingListTest {
+
+ @Test
+ public void testGetMessages() {
+ MailingList ml = new MailingList();
+
+ ml.setThreads(new HashSet());
+
+ MailingListThread mlthread1 = new MailingListThread();
+ HashSet mlthread1set = new HashSet();
+ mlthread1set.add(new MailMessage());
+ mlthread1set.add(new MailMessage());
+ mlthread1set.add(new MailMessage());
+ mlthread1set.add(new MailMessage());
+ mlthread1set.add(new MailMessage());
+ ml.getThreads().add(mlthread1);
+
+ MailingListThread mlthread2 = new MailingListThread();
+ HashSet mlthread2set = new HashSet();
+ mlthread2set.add(new MailMessage());
+ mlthread2set.add(new MailMessage());
+ mlthread2set.add(new MailMessage());
+ mlthread2set.add(new MailMessage());
+ mlthread2set.add(new MailMessage());
+ ml.getThreads().add(mlthread2);
+
+
+ MailingListThread mlthread3 = new MailingListThread();
+ HashSet mlthread3set = new HashSet();
+ mlthread3set.add(new MailMessage());
+ mlthread3set.add(new MailMessage());
+ mlthread3set.add(new MailMessage());
+ mlthread3set.add(new MailMessage());
+ mlthread3set.add(new MailMessage());
+ ml.getThreads().add(mlthread3);
+
+ MailingListThread mlthread4 = new MailingListThread();
+ HashSet mlthread4set = new HashSet();
+ mlthread4set.add(new MailMessage());
+ mlthread4set.add(new MailMessage());
+ mlthread4set.add(new MailMessage());
+ mlthread4set.add(new MailMessage());
+ mlthread4set.add(new MailMessage());
+ ml.getThreads().add(mlthread4);
+
+ Set messages = ml.getMessages();
+
+ assertEquals(20, messages.size());
+ }
+
+ @Test
+ public void testGetThreads() {
+ MailingList ml = new MailingList();
+
+ ml.setThreads(new HashSet());
+
+ MailingListThread mlthread1 = new MailingListThread();
+ HashSet mlthread1set = new HashSet();
+ mlthread1set.add(new MailMessage());
+ mlthread1set.add(new MailMessage());
+ mlthread1set.add(new MailMessage());
+ mlthread1set.add(new MailMessage());
+ mlthread1set.add(new MailMessage());
+ ml.getThreads().add(mlthread1);
+
+ MailingListThread mlthread2 = new MailingListThread();
+ HashSet mlthread2set = new HashSet();
+ mlthread2set.add(new MailMessage());
+ mlthread2set.add(new MailMessage());
+ mlthread2set.add(new MailMessage());
+ mlthread2set.add(new MailMessage());
+ mlthread2set.add(new MailMessage());
+ ml.getThreads().add(mlthread2);
+
+
+ MailingListThread mlthread3 = new MailingListThread();
+ HashSet mlthread3set = new HashSet();
+ mlthread3set.add(new MailMessage());
+ mlthread3set.add(new MailMessage());
+ mlthread3set.add(new MailMessage());
+ mlthread3set.add(new MailMessage());
+ mlthread3set.add(new MailMessage());
+ ml.getThreads().add(mlthread3);
+
+ MailingListThread mlthread4 = new MailingListThread();
+ HashSet mlthread4set = new HashSet();
+ mlthread4set.add(new MailMessage());
+ mlthread4set.add(new MailMessage());
+ mlthread4set.add(new MailMessage());
+ mlthread4set.add(new MailMessage());
+ mlthread4set.add(new MailMessage());
+ ml.getThreads().add(mlthread4);
+
+ Set threads = ml.getThreads();
+
+ assertEquals(4, threads.size());
+ }
+
+}
diff --git a/metrics/contrib/maven-eclipse.xml b/metrics/contrib/maven-eclipse.xml
new file mode 100644
index 000000000..9ff04ecea
--- /dev/null
+++ b/metrics/contrib/maven-eclipse.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/plug-ins/bugzilla/src/main/java/eu/sqooss/plugins/bugzilla/BugzillaXMLJob.java b/plug-ins/bugzilla/src/main/java/eu/sqooss/plugins/bugzilla/BugzillaXMLJob.java
index 56eecbd2f..e419f79b9 100644
--- a/plug-ins/bugzilla/src/main/java/eu/sqooss/plugins/bugzilla/BugzillaXMLJob.java
+++ b/plug-ins/bugzilla/src/main/java/eu/sqooss/plugins/bugzilla/BugzillaXMLJob.java
@@ -46,6 +46,7 @@
import eu.sqooss.service.db.BugStatus;
import eu.sqooss.service.db.DBService;
import eu.sqooss.service.db.Developer;
+import eu.sqooss.service.db.DeveloperDB;
import eu.sqooss.service.db.StoredProject;
import eu.sqooss.service.db.BugPriority.Priority;
import eu.sqooss.service.db.BugResolution.Resolution;
@@ -188,9 +189,9 @@ private Bug BTSEntryToBug (BTSEntry b) {
private Developer getDeveloper(String name) {
Developer d = null;
if (name.contains("@")) {
- d = Developer.getDeveloperByEmail(name, project);
+ d = DeveloperDB.getDeveloperByEmail(name, project);
} else {
- d = Developer.getDeveloperByUsername(name, project);
+ d = DeveloperDB.getDeveloperByUsername(name, project);
}
return d;
}
diff --git a/plug-ins/git/src/main/java/eu/sqooss/plugins/updater/git/GitUpdater.java b/plug-ins/git/src/main/java/eu/sqooss/plugins/updater/git/GitUpdater.java
index 00ad047e2..e71c81056 100644
--- a/plug-ins/git/src/main/java/eu/sqooss/plugins/updater/git/GitUpdater.java
+++ b/plug-ins/git/src/main/java/eu/sqooss/plugins/updater/git/GitUpdater.java
@@ -45,6 +45,7 @@
import eu.sqooss.service.db.Branch;
import eu.sqooss.service.db.DBService;
import eu.sqooss.service.db.Developer;
+import eu.sqooss.service.db.DeveloperDB;
import eu.sqooss.service.db.Directory;
import eu.sqooss.service.db.ProjectFile;
import eu.sqooss.service.db.ProjectFileState;
@@ -324,7 +325,7 @@ public Developer getAuthor(StoredProject sp, String entryAuthor) {
Developer d = null;
if (email != null) {
- d = Developer.getDeveloperByEmail(email, sp, true);
+ d = DeveloperDB.getDeveloperByEmail(email, sp, true);
if (name != null) {
if (name.contains(" ")) {
@@ -335,9 +336,9 @@ public Developer getAuthor(StoredProject sp, String entryAuthor) {
}
} else {
if (name.contains(" ")) {
- d = Developer.getDeveloperByName(name, sp, true);
+ d = DeveloperDB.getDeveloperByName(name, sp, true);
} else {
- d = Developer.getDeveloperByUsername(name, sp, true);
+ d = DeveloperDB.getDeveloperByUsername(name, sp, true);
}
}
return d;
diff --git a/plug-ins/git/src/test/java/eu/sqooss/plugins/git/test/TestGitUpdater.java b/plug-ins/git/src/test/java/eu/sqooss/plugins/git/test/TestGitUpdater.java
index c156b2c65..6c3e2a9db 100644
--- a/plug-ins/git/src/test/java/eu/sqooss/plugins/git/test/TestGitUpdater.java
+++ b/plug-ins/git/src/test/java/eu/sqooss/plugins/git/test/TestGitUpdater.java
@@ -31,6 +31,7 @@
import eu.sqooss.service.db.DBService;
import eu.sqooss.service.db.Developer;
import eu.sqooss.service.db.DeveloperAlias;
+import eu.sqooss.service.db.DeveloperDB;
import eu.sqooss.service.db.ProjectFile;
import eu.sqooss.service.db.ProjectFileState;
import eu.sqooss.service.db.ProjectVersion;
@@ -126,7 +127,7 @@ public void testGetAuthor() {
assertTrue(d.getAliases().contains(new DeveloperAlias("pm@smurfvillage.com", d)));
//A bit of Developer DAO testing
- assertNotNull(Developer.getDeveloperByEmail("pm@smurfvillage.com", sp));
+ assertNotNull(DeveloperDB.getDeveloperByEmail("pm@smurfvillage.com", sp));
d.addAlias("pm@smurfvillage.com");
assertEquals(1, d.getAliases().size());
diff --git a/plug-ins/maildir/src/main/java/eu/sqooss/plugins/maildir/MailMessageJob.java b/plug-ins/maildir/src/main/java/eu/sqooss/plugins/maildir/MailMessageJob.java
index 11af8e2fc..9349fb7c8 100644
--- a/plug-ins/maildir/src/main/java/eu/sqooss/plugins/maildir/MailMessageJob.java
+++ b/plug-ins/maildir/src/main/java/eu/sqooss/plugins/maildir/MailMessageJob.java
@@ -43,6 +43,7 @@
import eu.sqooss.core.AlitheiaCore;
import eu.sqooss.service.db.DBService;
import eu.sqooss.service.db.Developer;
+import eu.sqooss.service.db.DeveloperDB;
import eu.sqooss.service.db.MailMessage;
import eu.sqooss.service.db.MailingList;
import eu.sqooss.service.db.StoredProject;
@@ -127,7 +128,7 @@ protected void run() throws Exception {
// Try to find developer from name first
if (devName != null) {
- sender = Developer.getDeveloperByName(devName,
+ sender = DeveloperDB.getDeveloperByName(devName,
ml.getStoredProject(), false);
}
@@ -140,7 +141,7 @@ protected void run() throws Exception {
return;
}
- sender = Developer.getDeveloperByEmail(senderEmail,
+ sender = DeveloperDB.getDeveloperByEmail(senderEmail,
ml.getStoredProject(), true);
// Found dev by email, but not by name
diff --git a/plug-ins/svn/src/main/java/eu/sqooss/plugins/updater/svn/SVNUpdaterImpl.java b/plug-ins/svn/src/main/java/eu/sqooss/plugins/updater/svn/SVNUpdaterImpl.java
index 32e1a05a5..65c3237f9 100644
--- a/plug-ins/svn/src/main/java/eu/sqooss/plugins/updater/svn/SVNUpdaterImpl.java
+++ b/plug-ins/svn/src/main/java/eu/sqooss/plugins/updater/svn/SVNUpdaterImpl.java
@@ -45,6 +45,7 @@
import eu.sqooss.service.db.Branch;
import eu.sqooss.service.db.DBService;
import eu.sqooss.service.db.Developer;
+import eu.sqooss.service.db.DeveloperDB;
import eu.sqooss.service.db.Directory;
import eu.sqooss.service.db.ProjectFile;
import eu.sqooss.service.db.ProjectFileState;
@@ -201,7 +202,7 @@ public void update() throws Exception {
} else {
//Add revision 0 and / (root) file entry
ProjectVersion zero = new ProjectVersion(project);
- zero.setCommitter(Developer.getDeveloperByUsername("sqo-oss", project));
+ zero.setCommitter(DeveloperDB.getDeveloperByUsername("sqo-oss", project));
zero.setTimestamp(scm.getFirstRevision().getDate().getTime());
zero.setCommitMsg("Artificial revision to include / directory");
zero.setRevisionId("0");
@@ -376,7 +377,7 @@ private ProjectVersion processCommit(SCMAccessor scm, Revision entry) {
curVersion.setRevisionId(entry.getUniqueId());
curVersion.setTimestamp(entry.getDate().getTime());
- Developer d = Developer.getDeveloperByUsername(entry.getAuthor(), project);
+ Developer d = DeveloperDB.getDeveloperByUsername(entry.getAuthor(), project);
curVersion.setCommitter(d);
diff --git a/pom.xml b/pom.xml
index 12683f1ee..54061c107 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,24 +49,25 @@
8443
-
MySQL
localhost
alitheia
alitheia
alitheia
c3p0
- -->
+
true
branches
-
+
slow