-
Notifications
You must be signed in to change notification settings - Fork 0
Files
/
Copy pathImplementationSmells.csv
31 lines (31 loc) · 8.73 KB
/
ImplementationSmells.csv
1 | Project Name | Package Name | Type Name | Method Name | Implementation Smell | Cause of the Smell | Method start line no | Status | Justification | |
---|---|---|---|---|---|---|---|---|---|---|
2 | . | com.project.apidbtester | PutApiServiceTest | testFetchTestResult_AllTestPassed | Long Statement | The length of the statement "when(modelMapper.map(eq(Arrays.asList(testColumnValue))`eq(ColumnResult[].class))).thenReturn(new ColumnResult[]{new ColumnResult("first_name"`"shubham"`"shubham"`true)});" is 171. | 65 | Unresolved | Needed for mocking | |
3 | . | com.project.apidbtester | PutApiServiceTest | testFetchTestResult_SomeTestsFailed | Long Statement | The length of the statement "when(modelMapper.map(eq(Arrays.asList(testColumnValue))`eq(ColumnResult[].class))).thenReturn(new ColumnResult[]{new ColumnResult("first_name"`"shubham"`"saif"`false)});" is 169. | 92 | Unresolved | Needed for mocking | |
4 | . | com.project.apidbtester | GlobalExceptionHandlerTest | testHandleClientDBCredentialsNotFoundException | Long Statement | The length of the statement "ResponseEntity<ErrorResponse> response=globalExceptionHandler.handleExceptions(new ClientDBInfoService.ClientDBCredentialsNotFoundException());" is 143. | 43 | Unresolved | Occurred because of long exception name | |
5 | . | com.project.apidbtester | GlobalExceptionHandlerTest | handleClientDBConnectionExceptionTest | Long Statement | The length of the statement "ResponseEntity<ErrorResponse> response=globalExceptionHandler.handleExceptions(new ClientDBInfoService.ClientDBConnectionException());" is 134. | 51 | Resolved | ||
6 | . | com.project.apidbtester | GlobalExceptionHandlerTest | testHandleTestCaseNotFoundException | Long Statement | The length of the statement "ResponseEntity<ErrorResponse> response=globalExceptionHandler.handleExceptions(new TestCasesService.TestCaseNotFoundException());" is 129. | 59 | Resolved | ||
7 | . | com.project.apidbtester | GlobalExceptionHandlerTest | testHandleTestCasesNotFoundException | Long Statement | The length of the statement "ResponseEntity<ErrorResponse> response=globalExceptionHandler.handleExceptions(new TestCasesService.TestCasesNotFoundException());" is 130. | 67 | Resolved | ||
8 | . | com.project.apidbtester | GlobalExceptionHandlerTest | testHandleInvalidRequestTypeException | Long Statement | The length of the statement "ResponseEntity<ErrorResponse> response=globalExceptionHandler.handleExceptions(new TestApiController.InvalidRequestTypeException());" is 132. | 75 | Unresolved | Occurred because of long exception name | |
9 | . | com.project.apidbtester | PostApiServiceTest | testFetchTestResult_AllTestPassed | Long Statement | The length of the statement "when(modelMapper.map(eq(Arrays.asList(testColumnValue))`eq(ColumnResult[].class))).thenReturn(new ColumnResult[]{new ColumnResult("first_name"`"shubham"`"shubham"`true)});" is 171. | 64 | Unresolved | Needed for mocking | |
10 | . | com.project.apidbtester | PostApiServiceTest | testFetchTestResult_SomeTestsFailed | Long Statement | The length of the statement "when(modelMapper.map(eq(Arrays.asList(testColumnValue))`eq(ColumnResult[].class))).thenReturn(new ColumnResult[]{new ColumnResult("first_name"`"shubham"`"saif"`false)});" is 169. | 94 | Unresolved | Needed for mocking | |
11 | . | com.project.apidbtester | QueryTest | testGenerateSelectQueryWithWhereClause | Long Statement | The length of the statement "TestCaseDetails testCaseDetails=new TestCaseDetails(1`"type"`"url"`"payload"`"tableName"`"primaryKeyName"`"primaryKeyValue"`200`""`false);" is 138. | 23 | Unresolved | Needed for constuctor call | |
12 | . | com.project.apidbtester | QueryTest | testGenerateSelectQueryWithWhereClause | Long Statement | The length of the statement "List<TestColumnValue> testColumnValues=Arrays.asList(new TestColumnValue(1`"column1"`"Hello1"`"Hello1"`false`testCaseDetails)`new TestColumnValue(2`"column2"`"Hello2"`"Hello2"`false`testCaseDetails)`new TestColumnValue(3`"column3"`"Hello3"`"Hello3"`false`testCaseDetails));" is 273. | 23 | Unresolved | Needed for constuctor call | |
13 | . | com.project.apidbtester | QueryTest | testGenerateSelectQueryWithWhereClause | Magic Number | The method contains a magic number: 200 | 23 | Resolved | ||
14 | . | com.project.apidbtester | QueryTest | testGenerateSelectQueryWithWhereClause | Magic Number | The method contains a magic number: 2 | 23 | Unresolved | Needed for testing | |
15 | . | com.project.apidbtester | QueryTest | testGenerateSelectQueryWithWhereClause | Magic Number | The method contains a magic number: 3 | 23 | Unresolved | Needed for testing | |
16 | . | com.project.apidbtester | QueryTest | testGenerateCountQueryWithWhereClause | Long Statement | The length of the statement "TestCaseDetails testCaseDetails=new TestCaseDetails(1`"type"`"url"`"payload"`"tableName"`"primaryKeyName"`"primaryKeyValue"`200`""`false);" is 138. | 39 | Unresolved | Needed for constuctor call | |
17 | . | com.project.apidbtester | QueryTest | testGenerateCountQueryWithWhereClause | Magic Number | The method contains a magic number: 200 | 39 | Resolved | ||
18 | . | com.project.apidbtester | GetApiServiceTest | testFetchTestResult_AllTestPassed | Long Statement | The length of the statement "when(modelMapper.map(eq(Arrays.asList(testColumnValue))`eq(ColumnResult[].class))).thenReturn(new ColumnResult[]{new ColumnResult("first_name"`"shubham"`"shubham"`true)});" is 171. | 58 | Unresolved | Needed for mocking | |
19 | . | com.project.apidbtester | GetApiServiceTest | testFetchTestResult_SomeTestsFailed | Long Statement | The length of the statement "when(modelMapper.map(eq(Arrays.asList(testColumnValue))`eq(ColumnResult[].class))).thenReturn(new ColumnResult[]{new ColumnResult("first_name"`"shubham"`"saif"`false)});" is 169. | 83 | Unresolved | Needed for mocking | |
20 | . | com.project.apidbtester | ClientDbInfoControllerTest | testClientDBConnection_basic | Long Statement | The length of the statement "ResponseEntity<TestClientConnectionResponse> responseEntity=clientDbInfoController.testClientDBConnection(clientDBCredentialsEntity);" is 133. | 31 | Unresolved | Occurred because of long variable names | |
21 | . | com.project.apidbtester | TestCasesServiceTest | testFetchAllTestCases | Magic Number | The method contains a magic number: 3 | 30 | Unresolved | Needed for testing | |
22 | . | com.project.apidbtester.utils | Query | generateSelectQueryWithWhereClause | Long Statement | The length of the statement "query.append(" from ").append(testCaseDetails.getTableName()).append(" where ").append(testCaseDetails.getPrimaryKeyName()).append(" = ").append(testCaseDetails.getPrimaryKeyValue()).append(";");" is 195. | 14 | Unresolved | Not long statement as spread across multiple lines | |
23 | . | com.project.apidbtester.utils | Query | generateCountQueryWithWhereClause | Long Statement | The length of the statement "query.append(" from ").append(testCaseDetails.getTableName()).append(" where ").append(testCaseDetails.getPrimaryKeyName()).append(" = ").append(testCaseDetails.getPrimaryKeyValue()).append(";");" is 195. | 33 | Unresolved | Not long statement as spread across multiple lines | |
24 | . | com.project.apidbtester.exceptions | GlobalExceptionHandler | handleExceptions | Long Statement | The length of the statement "else if (e instanceof TestCasesService.TestCaseNotFoundException || e instanceof TestCasesService.TestCasesNotFoundException) {" is 127. | 15 | Resolved | ||
25 | . | com.project.apidbtester.clientdb | ClientDBInfoService | testClientDBConnection | Long Statement | The length of the statement "DriverManager.getConnection(clientDBCredentialsEntity.getDatabaseUrl()`clientDBCredentialsEntity.getUserName()`clientDBCredentialsEntity.getPassword());" is 152. | 18 | Resolved | ||
26 | . | com.project.apidbtester.clientdb | ClientDBInfoService | getClientDBCredentials | Long Statement | The length of the statement "return clientDBInfoRepository.findById(GlobalConstants.DB_CREDENTIALS_ID).orElseThrow(() -> new ClientDBCredentialsNotFoundException());" is 136. | 30 | Unresolved | ||
27 | . | com.project.apidbtester.clientdb | ClientDBInfoService | getClientDBCConnection | Long Statement | The length of the statement "ClientDBCredentialsEntity clientDBCredentials=clientDBInfoRepository.findById(GlobalConstants.DB_CREDENTIALS_ID).orElseThrow(() -> new ClientDBCredentialsNotFoundException());" is 175. | 84 | Unresolved | Needed for exception handling | |
28 | . | com.project.apidbtester.clientdb | ClientDBInfoService | getClientDBCConnection | Long Statement | The length of the statement "return DriverManager.getConnection(clientDBCredentials.getDatabaseUrl()`clientDBCredentials.getUserName()`clientDBCredentials.getPassword());" is 141. | 84 | Unresolved | Needed for constuctor call | |
29 | . | com.project.apidbtester.clientdb | ClientDbInfoController | testClientDBConnection | Long Statement | The length of the statement "TestClientConnectionResponse testClientConnectionResponse=TestClientConnectionResponse.builder().message(connectionMessage).build();" is 132. | 20 | Resolved | ||
30 | . | com.project.apidbtester.testapis.services | PostApiService | fetchTestResult | Complex Method | Cyclomatic complexity of the method is 10 | 52 | Resolved | ||
31 | . | com.project.apidbtester.testapis.services | PutApiService | fetchTestResult | Complex Method | Cyclomatic complexity of the method is 10 | 44 | Resolved |