Detailed information about defect clone:
04-C0.H0.M0.L1_S_S_04.war
Nickname of the defect
wrong-page-opened-after-activity
Brief desctiption
When student unenrolls from a subject in My Subjects the menu is changed to Overview.
How to activate the defect
-
Click on Login in the header
-
Username
maroon
, password pass
, click on Login button
-
Click on My Subjects
-
Click on X in the column Unenroll subject in the row Computation Structures
-
Click on Unenroll subject in the modal window
Visibility of the defect
Parts
StudentService |
TeacherService |
DateUtility |
GradeDAO |
UserDAO |
E04StudentService
|
BaseTeacherService
|
BaseDateUtility
|
GradeTypeDaoCriteria
|
UserDaoCriteria
|
URL to the defect source code
https://gitlab.kiv.zcu.cz/herout/TbUIS-UIS/blob/master/src/main/java/cz/zcu/kiv/matyasj/dp/service/users/error/E04StudentService.java
Source code with the injected defect
/**
* DELIBERATE ERROR
*
* This error method changes view
* that is shown after removal of subject
*
* @return Indication for showing overview after removal of subject
*/
@Override
@ErrorMethod(errorMessage = "This error method shows overview view after removal of subject.")
public boolean afterRemoveShowOverview() {
log.error(propertyLoader.getProperty("log.E04StudentService.afterRemoveShowOverview"));
return true;
}
URL to the correct source code
https://gitlab.kiv.zcu.cz/herout/TbUIS-UIS/blob/master/src/main/java/cz/zcu/kiv/matyasj/dp/service/users/correct/BaseStudentService.java
Correct source code
/**
* This method indicates whether to change view
* that is shown after removal of subject
*
* @return Indication for showing overview after removal of subject
*/
@Override
public boolean afterRemoveShowOverview() {
return false;
}
Logged information up to failure
2019-10-12 11:54:38.467 -- INFO LogHelper:31 - HHH000204: Processing PersistenceUnitInfo [name: cz.zcu.kiv.matyasj.dp]
2019-10-12 11:54:38.686 -- INFO Version:46 - HHH000412: Hibernate Core {5.4.1.Final}
2019-10-12 11:54:39.108 -- INFO Version:49 - HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2019-10-12 11:54:39.545 -- INFO C3P0ConnectionProvider:116 - HHH010002: C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/uis-web-db
2019-10-12 11:54:39.545 -- INFO C3P0ConnectionProvider:117 - HHH10001001: Connection properties: {password=****, useUnicode=true, handling_mode=DELAYED_ACQUISITION_AND_HOLD, characterEncoding=UTF-8, user=uis-web}
2019-10-12 11:54:39.545 -- INFO C3P0ConnectionProvider:120 - HHH10001003: Autocommit mode: false
2019-10-12 11:54:39.748 -- INFO C3P0ConnectionProvider:200 - HHH10001007: JDBC isolation level:
2019-10-12 11:54:40.131 -- INFO Dialect:158 - HHH000400: Using dialect: org.hibernate.dialect.MySQL55Dialect
2019-10-12 11:54:41.921 -- INFO access:47 - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@463b865b] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
2019-10-12 11:54:44.038 -- INFO access:47 - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@3dbe3bc4] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
2019-10-12 11:54:55.899 -- INFO JtaPlatformInitiator:52 - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2019-10-12 11:54:56.134 -- INFO SecurityConfig:75 - SECURITY JDBC authentication process is running
2019-10-12 11:54:58.399 -- INFO SecurityConfig:93 - Authorization configuration process is running
2019-10-12 11:54:58.711 -- INFO BaseInitializer:97 - Initializing ...
2019-10-12 11:55:06.807 -- INFO BaseInitializer:463 - Initialized!
2019-10-12 11:55:06.916 -- INFO BaseInitializer:97 - Initializing ...
2019-10-12 12:00:30.387 -- INFO LoginController:30 - Request for login view
2019-10-12 12:00:44.564 -- INFO LoginController:30 - Request for login view
2019-10-12 12:00:52.035 -- INFO UserDaoCriteria:74 - User with username maroon found.
2019-10-12 12:00:52.068 -- INFO SecurityConfig:121 - Success login - maroon
2019-10-12 12:00:52.068 -- INFO SecurityConfig:125 - User login role: ROLE_STUDENT
2019-10-12 12:00:52.068 -- INFO UserDaoCriteria:74 - User with username maroon found.
2019-10-12 12:00:52.100 -- INFO OverviewController:49 - Request for overview of student with id 16 for view.
2019-10-12 12:00:56.537 -- INFO RegisterSubjectListController:48 - Request for retrieving studied subjects view.
2019-10-12 12:00:56.537 -- INFO UserDaoCriteria:74 - User with username maroon found.
2019-10-12 12:00:56.568 -- INFO BaseStudentService:82 - Getting list of studied subjects for student with id 16.
2019-10-12 12:00:56.584 -- INFO UserDaoCriteria:74 - User with username maroon found.
2019-10-12 12:00:56.615 -- INFO BaseStudentService:101 - Getting list of absolved subjects for student with id 16.
2019-10-12 12:00:56.615 -- INFO UserDaoCriteria:74 - User with username maroon found.
2019-10-12 12:00:56.630 -- INFO BaseStudentService:222 - Getting list of grades for student with id 16.
2019-10-12 12:00:56.646 -- INFO GradeDaoCriteria:102 - Returning list of 0 for student with id 16
2019-10-12 12:00:56.646 -- INFO UserDaoCriteria:74 - User with username maroon found.
2019-10-12 12:00:56.693 -- INFO BaseStudentService:426 - Getting total number of credits for student with id 16.
2019-10-12 12:01:49.082 -- INFO UserDaoCriteria:74 - User with username maroon found.
2019-10-12 12:01:49.098 -- INFO RegisterSubjectListController:82 - Request from user with id 16 for removing subject with id 2 from studied.
2019-10-12 12:01:49.114 -- INFO BaseStudentService:327 - Unsetting studied subject with id 2 from student with id 16.
2019-10-12 12:01:49.147 -- INFO BaseStudentService:197 - Getting list of examination dates for student with id 16.
2019-10-12 12:01:49.147 -- INFO GradeDaoCriteria:102 - Returning list of 0 for student with id 16
2019-10-12 12:01:49.225 -- INFO ExaminationDateDaoCriteria:70 - Returning list of 2 examination dates for student with id 16.
2019-10-12 12:01:49.240 -- INFO BaseStudentService:403 - Unsetting examination date with id 34 from student with id 16.
2019-10-12 12:01:49.256 -- INFO ExaminationDateDaoCriteria:228 - Student with id 16 unregistered from term with id 34.
2019-10-12 12:01:49.412 -- INFO RegisterSubjectListController:86 - Request for removing subject with id 2 was successful.
2019-10-12 12:01:49.412 -- ERROR E04StudentService:50 - INJECTED_ERROR: E04StudentService_afterRemoveShowOverview_causes_showing_overview_view_after_removal_of_subject
2019-10-12 12:01:49.412 -- INFO UserDaoCriteria:74 - User with username maroon found.
2019-10-12 12:01:49.428 -- INFO RegisterSubjectListController:108 - Request for overview of student with id 16 for view.
Overview of functional tests full log
Overview of acceptance tests full report