Revize 6767b4e4
Přidáno uživatelem stepanekp před asi 3 roky(ů)
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/BystanderApathyDetectorImpl.java | ||
---|---|---|
65 | 65 |
} |
66 | 66 |
|
67 | 67 |
/** |
68 |
* Detection procedure: |
|
69 |
* 1) find all work units in the project |
|
70 |
* 2) find number of contributors to each project |
|
71 |
* 3) if there is only one contributor (author) in the work unit, the work unit is without cooperation |
|
72 |
* 4) if there is certain percentage of work units without cooperation in all work unit number, the anti-pattern is detected |
|
68 | 73 |
* |
74 |
* @param project model class for analyzed project |
|
75 |
* @param databaseConnection database connection |
|
76 |
* @param thresholds current thresholds |
|
77 |
* @return detection result |
|
69 | 78 |
*/ |
70 | 79 |
@Override |
71 | 80 |
public QueryResultItem analyze(Project project, DatabaseConnection databaseConnection, Map<String, String> thresholds) { |
... | ... | |
81 | 90 |
|
82 | 91 |
List<String> parameters = new ArrayList<>(); |
83 | 92 |
parameters.add(result.get("id").toString()); |
84 |
parameters.add(result.get("authorId").toString()); |
|
93 |
//parameters.add(result.get("authorId").toString());
|
|
85 | 94 |
|
86 | 95 |
List<String> substringsInvalidContributors = getSearchSubstringsInvalidContributors(thresholds); |
87 | 96 |
for(String substring : substringsInvalidContributors) |
... | ... | |
94 | 103 |
} |
95 | 104 |
|
96 | 105 |
List<ResultDetail> resultDetails = new ArrayList<>(); |
106 |
resultDetails.add(new ResultDetail("Tasks total number", String.valueOf(workUnitsTotalCount))); |
|
97 | 107 |
resultDetails.add(new ResultDetail("Bystander tasks number", String.valueOf(bystanderAP))); |
98 | 108 |
|
99 | 109 |
float totalRatioOfBystanderTasks = (float) bystanderAP / workUnitsTotalCount; |
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/LongOrNonExistentFeedbackLoopsDetectorImpl.java | ||
---|---|---|
28 | 28 |
"select_average_iterations_length.sql", |
29 | 29 |
"select_number_of_iterations_with_substrings_in_activity.sql", |
30 | 30 |
"select_all_activities_with_substrings_and_last_modified_date_as_end_date.sql", |
31 |
"select_project_start_date.sql", |
|
32 |
"select_project_end_date.sql", |
|
31 |
"select_project_start_date_by_iteration.sql",
|
|
32 |
"select_project_end_date_by_iteration.sql",
|
|
33 | 33 |
"select_all_iterations_that_contains_wikipages_with_substrings.sql"); |
34 | 34 |
|
35 | 35 |
// sql queries loaded from sql file |
... | ... | |
112 | 112 |
switch (i) { |
113 | 113 |
case 0: |
114 | 114 |
totalNumberIterations = (long) rs.get(0).get("numberOfIterations"); |
115 |
if(totalNumberIterations == 0) { |
|
116 |
List<ResultDetail> resultDetails = Utils.createResultDetailsList( |
|
117 |
new ResultDetail("Number of iterations", Long.toString(totalNumberIterations)), |
|
118 |
new ResultDetail("Number of iterations with feedback loops", Integer.toString(numberOfIterationsWhichContainsAtLeastOneActivityForFeedback)), |
|
119 |
new ResultDetail("Conclusion", "No iterations in the project")); |
|
120 |
return new QueryResultItem(this.antiPattern, false, resultDetails); |
|
121 |
} |
|
115 | 122 |
break; |
116 | 123 |
case 1: |
117 | 124 |
averageIterationLength = ((BigDecimal) rs.get(0).get("averageIterationLength")).intValue(); |
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/UnknownPosterDetectorImpl.java | ||
---|---|---|
61 | 61 |
} |
62 | 62 |
|
63 | 63 |
/** |
64 |
* Detection procedure: |
|
65 |
* 1) find all persons involved in the project |
|
66 |
* 2) check if persons have full name filled in |
|
67 |
* 3) select identities for unidentified persons |
|
68 |
* 4) check if every person has filled in at least one of the information in one of used identities |
|
69 |
* (email, full name in description, valid nickname) |
|
70 |
* 5) if there is at least one unidentified person, the anti-pattern is detected |
|
64 | 71 |
* |
72 |
* @param project model class for analyzed project |
|
73 |
* @param databaseConnection database connection |
|
74 |
* @param thresholds current thresholds |
|
75 |
* @return detection result |
|
65 | 76 |
*/ |
66 | 77 |
@Override |
67 | 78 |
public QueryResultItem analyze(Project project, DatabaseConnection databaseConnection, Map<String, String> thresholds) { |
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/YetAnotherProgrammerDetectorImpl.java | ||
---|---|---|
9 | 9 |
import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils; |
10 | 10 |
import org.slf4j.Logger; |
11 | 11 |
import org.slf4j.LoggerFactory; |
12 |
import org.thymeleaf.spring5.processor.SpringTextareaFieldTagProcessor; |
|
12 | 13 |
|
13 | 14 |
import java.time.LocalDate; |
14 | 15 |
import java.time.LocalDateTime; |
... | ... | |
67 | 68 |
} |
68 | 69 |
|
69 | 70 |
/** |
71 |
* Detection procedure: |
|
72 |
* 1) select start and end date of the project |
|
73 |
* 2) select all persons involved in the project |
|
74 |
* 3) get first involvement date for each person in the project |
|
75 |
* 4) divide project into months |
|
76 |
* 5) for each month (except first X months) get number of persons with first involvement in this month |
|
77 |
* 6) if number of new persons in any month is more than Y, the anti-pattern is detected |
|
70 | 78 |
* |
79 |
* @param project model class for analyzed project |
|
80 |
* @param databaseConnection database connection |
|
81 |
* @param thresholds current thresholds |
|
82 |
* @return detection result |
|
71 | 83 |
*/ |
72 | 84 |
@Override |
73 | 85 |
public QueryResultItem analyze(Project project, DatabaseConnection databaseConnection, Map<String, String> thresholds) { |
src/main/resources/queries/select_project_end_date.sql | ||
---|---|---|
1 | 1 |
/* Get project end date */ |
2 |
select endDate as 'projectEndDate' from iteration where superProjectId = @projectId order by endDate desc limit 1;
|
|
2 |
select ifnull(endDate, date_format(now(), "%Y-%m-%d")) as "endDate" FROM project where id = @projectId;
|
src/main/resources/queries/select_project_end_date_by_iteration.sql | ||
---|---|---|
1 |
/* Get project end date */ |
|
2 |
select endDate as 'projectEndDate' from iteration where superProjectId = @projectId order by endDate desc limit 1; |
src/main/resources/queries/select_project_start_date.sql | ||
---|---|---|
1 | 1 |
/* Get project start date */ |
2 |
select startDate as 'projectStartDate' from iteration where superProjectId = @projectId order by startDate limit 1;
|
|
2 |
select startDate FROM project where id = @projectId;
|
src/main/resources/queries/select_project_start_date_by_iteration.sql | ||
---|---|---|
1 |
/* Get project start date */ |
|
2 |
select startDate as 'projectStartDate' from iteration where superProjectId = @projectId order by startDate limit 1; |
src/main/resources/queries/select_work_units_from_project.sql | ||
---|---|---|
1 | 1 |
/* Select ids of work units of a project */ |
2 |
select wuv.id, wuv.authorId from workUnitView wuv where wuv.projectId = @projectId; |
|
2 |
select wuv.id from work_unit wuv where wuv.projectId = @projectId; |
src/main/webapp/WEB-INF/templates/about.html | ||
---|---|---|
16 | 16 |
<!-- ./Navigation bar imported --> |
17 | 17 |
<div class="container"> |
18 | 18 |
<h1>About</h1> |
19 |
<p> |
|
20 |
<strong>App version:</strong> 1.1.0 |
|
21 |
<br> |
|
22 |
<strong>Author:</strong> Petr Štěpánek |
|
23 |
<br> |
|
24 |
<strong>E-mail:</strong> <a href="mailto:petrs1@students.zcu.cz">petrs1@students.zcu.cz</a> |
|
25 |
</p> |
|
26 |
<p> |
|
27 |
This application is used to detect presence of anti-patterns in project management tools data. Ten selected anti-patterns are implemented in this application. |
|
28 |
</p> |
|
29 |
<hr> |
|
19 | 30 |
<p> |
20 | 31 |
<strong>App version:</strong> 1.0.0 |
21 | 32 |
<br> |
Také k dispozici: Unified diff
Minor changes