Detailed information about defect clone:
18-C0.H1.M0.L0_S_S_06.war
Nickname of the defect
missing-column-in-table
Brief desctiption
Missing column Teacher(s) in Other Subjects.
How to activate the defect
-
Click on Login in the header
-
Username
orange
, password pass
, click on Login button
-
Click on Other Subjects
Visibility of the defect
Expected |
Actual |
|
|
Parts
StudentService |
TeacherService |
DateUtility |
GradeDAO |
UserDAO |
E06StudentService
|
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/E06StudentService.java
Source code with the injected defect
/**
* DELIBERATE ERROR
*
* This error method hides teacher column
*
* @return Indication for showing teacher column
*/
@Override
@ErrorMethod(errorMessage = "This error method hides teachers column.")
public boolean hideTeacherColumn() {
log.error(propertyLoader.getProperty("log.E06StudentService.hideTeacherColumn"));
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 makes sure to show teacher column
*
* @return Indication for hiding teacher column
*/
@Override
public boolean hideTeacherColumn() {
return false;
}
Logged information up to failure
2019-10-12 12:37:49.568 -- INFO LogHelper:31 - HHH000204: Processing PersistenceUnitInfo [name: cz.zcu.kiv.matyasj.dp]
2019-10-12 12:37:49.802 -- INFO Version:46 - HHH000412: Hibernate Core {5.4.1.Final}
2019-10-12 12:37:50.224 -- INFO Version:49 - HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2019-10-12 12:37:50.646 -- INFO C3P0ConnectionProvider:116 - HHH010002: C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/uis-web-db
2019-10-12 12:37:50.646 -- INFO C3P0ConnectionProvider:117 - HHH10001001: Connection properties: {password=****, useUnicode=true, handling_mode=DELAYED_ACQUISITION_AND_HOLD, characterEncoding=UTF-8, user=uis-web}
2019-10-12 12:37:50.646 -- INFO C3P0ConnectionProvider:120 - HHH10001003: Autocommit mode: false
2019-10-12 12:37:50.849 -- INFO C3P0ConnectionProvider:200 - HHH10001007: JDBC isolation level:
2019-10-12 12:37:51.224 -- INFO Dialect:158 - HHH000400: Using dialect: org.hibernate.dialect.MySQL55Dialect
2019-10-12 12:37:52.944 -- INFO access:47 - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@619783ce] 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 12:37:55.335 -- INFO access:47 - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@6f49a165] 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 12:38:06.183 -- INFO JtaPlatformInitiator:52 - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2019-10-12 12:38:06.433 -- INFO SecurityConfig:75 - SECURITY JDBC authentication process is running
2019-10-12 12:38:08.779 -- INFO SecurityConfig:93 - Authorization configuration process is running
2019-10-12 12:38:09.076 -- INFO BaseInitializer:97 - Initializing ...
2019-10-12 12:38:15.483 -- INFO BaseInitializer:463 - Initialized!
2019-10-12 12:38:15.608 -- INFO BaseInitializer:97 - Initializing ...
2019-10-12 12:38:15.889 -- INFO LoginController:30 - Request for login view
2019-10-12 12:40:01.163 -- INFO UserDaoCriteria:74 - User with username orange found.
2019-10-12 12:40:01.194 -- INFO SecurityConfig:121 - Success login - orange
2019-10-12 12:40:01.194 -- INFO SecurityConfig:125 - User login role: ROLE_STUDENT
2019-10-12 12:40:01.226 -- INFO UserDaoCriteria:74 - User with username orange found.
2019-10-12 12:40:01.241 -- INFO OverviewController:49 - Request for overview of student with id 24 for view.
2019-10-12 12:40:06.569 -- INFO SubjectListController:44 - Request for retrieving other subject view.
2019-10-12 12:40:06.569 -- INFO UserDaoCriteria:74 - User with username orange found.
2019-10-12 12:40:06.600 -- INFO BaseStudentService:121 - Getting list of other subjects for student with id 24.
2019-10-12 12:40:06.647 -- INFO SubjectDaoCriteria:93 - Returning list of 7 subjects.
2019-10-12 12:40:06.647 -- ERROR E06StudentService:49 - INJECTED_ERROR: E06StudentService_hideTeacherColumn_causes_teacher_column_to_be_hidden
Overview of functional tests full log
Overview of acceptance tests full report