Detailed information about defect clone:

01-C0.H0.M0.L1_S_S_07.war

 

Nickname of the defect

diferent-button-color

Brief desctiption

Red color of the button Participants in My Exam Dates.

How to activate the defect

 

Visibility of the defect

Expected Actual

Parts

StudentService TeacherService DateUtility GradeDAO UserDAO
E07StudentService 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/E07StudentService.java

Source code with the injected defect

/** * DELIBERATE ERROR * * This error method changes color of Participants button * * @return Indication whether to change color of button */ @Override @ErrorMethod(errorMessage = "This error method changes color of participants button.") public boolean changeParticipantsButtonColor() { log.error(propertyLoader.getProperty("log.E07StudentService.changeParticipantsButtonColor")); 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 leaves basic color of participants button * * @return Indication whether to change color */ @Override public boolean changeParticipantsButtonColor() { return false; }

Logged information up to failure

2019-10-12 12:58:19.443 -- INFO LogHelper:31 - HHH000204: Processing PersistenceUnitInfo [name: cz.zcu.kiv.matyasj.dp] 2019-10-12 12:58:19.662 -- INFO Version:46 - HHH000412: Hibernate Core {5.4.1.Final} 2019-10-12 12:58:20.084 -- INFO Version:49 - HCANN000001: Hibernate Commons Annotations {5.1.0.Final} 2019-10-12 12:58:20.490 -- INFO C3P0ConnectionProvider:116 - HHH010002: C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/uis-web-db 2019-10-12 12:58:20.490 -- 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:58:20.490 -- INFO C3P0ConnectionProvider:120 - HHH10001003: Autocommit mode: false 2019-10-12 12:58:20.693 -- INFO C3P0ConnectionProvider:200 - HHH10001007: JDBC isolation level: <unknown> 2019-10-12 12:58:21.084 -- INFO Dialect:158 - HHH000400: Using dialect: org.hibernate.dialect.MySQL55Dialect 2019-10-12 12:58:22.835 -- INFO access:47 - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@1775ff4a] 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:58:25.096 -- INFO access:47 - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@74d41fcf] 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:58:37.247 -- INFO JtaPlatformInitiator:52 - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2019-10-12 12:58:37.497 -- INFO SecurityConfig:75 - SECURITY JDBC authentication process is running 2019-10-12 12:58:39.694 -- INFO SecurityConfig:93 - Authorization configuration process is running 2019-10-12 12:58:39.991 -- INFO BaseInitializer:97 - Initializing ... 2019-10-12 12:58:46.994 -- INFO BaseInitializer:463 - Initialized! 2019-10-12 12:58:47.088 -- INFO BaseInitializer:97 - Initializing ... 2019-10-12 13:00:33.558 -- INFO LoginController:30 - Request for login view 2019-10-12 13:00:40.561 -- INFO UserDaoCriteria:74 - User with username brown found. 2019-10-12 13:00:40.577 -- INFO SecurityConfig:121 - Success login - brown 2019-10-12 13:00:40.577 -- INFO SecurityConfig:125 - User login role: ROLE_STUDENT 2019-10-12 13:00:40.593 -- INFO UserDaoCriteria:74 - User with username brown found. 2019-10-12 13:00:40.624 -- INFO OverviewController:49 - Request for overview of student with id 15 for view. 2019-10-12 13:00:45.217 -- INFO RegisterExamDatesController:44 - Request for retrieving reqistered exam dates view. 2019-10-12 13:00:45.217 -- INFO UserDaoCriteria:74 - User with username brown found. 2019-10-12 13:00:45.249 -- INFO BaseStudentService:197 - Getting list of examination dates for student with id 15. 2019-10-12 13:00:45.264 -- INFO GradeDaoCriteria:102 - Returning list of 0 for student with id 15 2019-10-12 13:00:45.311 -- INFO ExaminationDateDaoCriteria:70 - Returning list of 1 examination dates for student with id 15. 2019-10-12 13:00:45.311 -- ERROR E07StudentService:49 - INJECTED_ERROR: E07StudentService_changeParticipantsButtonColor_changes_participants_button_to_red

Overview of functional tests full log

Overview of acceptance tests full report