Detailed information about defect clone:

19-C0.H1.M0.L0_S_S_10.war

 

Nickname of the defect

randomly-missing-button

Brief desctiption

A random button X is missing in the column Unenroll subject in My Subjects.

How to activate the defect

 

Visibility of the defect

Expected Actual

Parts

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

Source code with the injected defect

/** * DELIBERATE ERROR * * This error method triggers hiding 1 unenroll button * * @return Indication of hiding unenroll button */ @Override @ErrorMethod(errorMessage = "This error method triggers hiding 1 unenroll button.") public boolean hideUnenrollButton() { log.error(propertyLoader.getProperty("log.E10StudentService.hideUnenrollButton")); 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 all unenroll buttons * * @return Indication of hiding unenroll button */ @Override public boolean hideUnenrollButton() { return false; }

Logged information up to failure

2019-10-14 09:58:53.453 -- INFO LogHelper:31 - HHH000204: Processing PersistenceUnitInfo [name: cz.zcu.kiv.matyasj.dp] 2019-10-14 09:58:53.688 -- INFO Version:46 - HHH000412: Hibernate Core {5.4.1.Final} 2019-10-14 09:58:54.110 -- INFO Version:49 - HCANN000001: Hibernate Commons Annotations {5.1.0.Final} 2019-10-14 09:58:54.563 -- INFO C3P0ConnectionProvider:116 - HHH010002: C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/uis-web-db 2019-10-14 09:58:54.563 -- INFO C3P0ConnectionProvider:117 - HHH10001001: Connection properties: {password=****, useUnicode=true, handling_mode=DELAYED_ACQUISITION_AND_HOLD, characterEncoding=UTF-8, user=uis-web} 2019-10-14 09:58:54.563 -- INFO C3P0ConnectionProvider:120 - HHH10001003: Autocommit mode: false 2019-10-14 09:58:54.766 -- INFO C3P0ConnectionProvider:200 - HHH10001007: JDBC isolation level: <unknown> 2019-10-14 09:58:55.158 -- INFO Dialect:158 - HHH000400: Using dialect: org.hibernate.dialect.MySQL55Dialect 2019-10-14 09:58:56.955 -- INFO access:47 - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@129b75c] 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-14 09:58:58.720 -- INFO access:47 - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@6fc294ae] 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-14 09:59:09.862 -- INFO JtaPlatformInitiator:52 - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2019-10-14 09:59:10.128 -- INFO SecurityConfig:75 - SECURITY JDBC authentication process is running 2019-10-14 09:59:12.755 -- INFO SecurityConfig:93 - Authorization configuration process is running 2019-10-14 09:59:13.114 -- INFO BaseInitializer:97 - Initializing ... 2019-10-14 09:59:20.397 -- INFO BaseInitializer:463 - Initialized! 2019-10-14 09:59:20.522 -- INFO BaseInitializer:97 - Initializing ... 2019-10-14 09:59:26.964 -- INFO LoginController:30 - Request for login view 2019-10-14 09:59:31.809 -- INFO UserDaoCriteria:74 - User with username blue found. 2019-10-14 09:59:31.856 -- INFO SecurityConfig:121 - Success login - blue 2019-10-14 09:59:31.856 -- INFO SecurityConfig:125 - User login role: ROLE_STUDENT 2019-10-14 09:59:31.871 -- INFO UserDaoCriteria:74 - User with username blue found. 2019-10-14 09:59:31.887 -- INFO OverviewController:49 - Request for overview of student with id 17 for view. 2019-10-14 09:59:33.371 -- INFO RegisterSubjectListController:48 - Request for retrieving studied subjects view. 2019-10-14 09:59:33.371 -- INFO UserDaoCriteria:74 - User with username blue found. 2019-10-14 09:59:33.402 -- INFO BaseStudentService:82 - Getting list of studied subjects for student with id 17. 2019-10-14 09:59:33.402 -- INFO UserDaoCriteria:74 - User with username blue found. 2019-10-14 09:59:33.449 -- INFO BaseStudentService:101 - Getting list of absolved subjects for student with id 17. 2019-10-14 09:59:33.449 -- INFO UserDaoCriteria:74 - User with username blue found. 2019-10-14 09:59:33.465 -- INFO BaseStudentService:222 - Getting list of grades for student with id 17. 2019-10-14 09:59:33.481 -- INFO GradeDaoCriteria:102 - Returning list of 0 for student with id 17 2019-10-14 09:59:33.481 -- INFO UserDaoCriteria:74 - User with username blue found. 2019-10-14 09:59:33.512 -- INFO BaseStudentService:426 - Getting total number of credits for student with id 17. 2019-10-14 09:59:33.527 -- ERROR E10StudentService:51 - INJECTED_ERROR: E10StudentService_hideUnenrollButton_hides_random_unenroll_button

Overview of functional tests full log

Overview of acceptance tests full report