auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void generatePasswordAndAccountWhenExternalIdMissing() { ExternalIdentifier externalIdentifier = ExternalIdentifier.create(study.getStudyIdentifier(), EXTERNAL_ID); externalIdentifier.setHealthCode("someoneElsesHealthCode"); study.setExternalIdValidationEnabled(true); when(externalIdService.getExternalId(study.getStudyIdentifier(), EXTERNAL_ID)) <START> .thenThrow(new EntityNotFoundException(ExternalIdentifier.class)); <END> when(participantService.createParticipant(eq(study), participantCaptor.capture(), eq(false))) .thenThrow(new EntityAlreadyExistsException(Account.class, "id", "asdf")); try { service.generatePassword(study, EXTERNAL_ID, true); fail("Should have thrown an exception"); } catch(EntityNotFoundException e) { } verify(accountDao, never()).getAccount(any()); verify(participantService, never()).createParticipant(any(), any(), anyBoolean()); verify(accountDao, never()).changePassword(any(), any(), any()); }</code><technical_language>getExternalId() longer throws exceptions. this return Optional.empty() instead</technical_language>

Target:
public void generatePasswordAndAccountWhenExternalIdMissing() { ExternalIdentifier externalIdentifier = ExternalIdentifier.create(study.getStudyIdentifier(), EXTERNAL_ID); externalIdentifier.setHealthCode("someoneElsesHealthCode"); study.setExternalIdValidationEnabled(true); when(externalIdService.getExternalId(study.getStudyIdentifier(), EXTERNAL_ID)) .thenReturn(Optional.empty()); when(participantService.createParticipant(eq(study), participantCaptor.capture(), eq(false))) .thenThrow(new EntityAlreadyExistsException(Account.class, "id", "asdf")); try { service.generatePassword(study, EXTERNAL_ID, true); fail("Should have thrown an exception"); } catch(EntityNotFoundException e) { } verify(accountDao, never()).getAccount(any()); verify(participantService, never()).createParticipant(any(), any(), anyBoolean()); verify(accountDao, never()).changePassword(any(), any(), any()); }
Source:
<code><START> public OffheapBufferPool(final int computationBufferSize) <END> { super( new FileChannelAppendableBufferPool(computationBufferSize) ); }</code><technical_language>A separate implementation more sense here, depending requirements</technical_language>

Target:
public OffheapBufferPool(final int computationBufferSize) { super( new Supplier<ByteBuffer>() { final AtomicLong count = new AtomicLong(0); @Override public ByteBuffer get() { log.info( "Allocating new intermediate processing buffer[%,d] of size[%,d]", count.getAndIncrement(), computationBufferSize ); return ByteBuffer.allocateDirect(computationBufferSize); } } ); }
Source:
<code>public DateTimeZone deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { if(json.isJsonNull()) return null; String tz = json.getAsString(); if (tz.isEmpty()) <START> return DateTimeZone.getDefault(); <END> DateTimeZone timeZone; try { timeZone = DateTimeZone.forID(tz); } catch (IllegalArgumentException e) { throw new ContextualJsonSyntaxException(tz, "is not a valid time zone, must be one of " + DateTimeZone.getAvailableIDs()); } return timeZone; }</code><technical_language>UTC a default timezone in code tests</technical_language>

Target:
public DateTimeZone deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { if(json.isJsonNull()) return null; String tz = json.getAsString(); if (tz.isEmpty()) return DateTimeZone.UTC; DateTimeZone timeZone; try { timeZone = DateTimeZone.forID(tz); } catch (IllegalArgumentException e) { throw new ContextualJsonSyntaxException(tz, "is not a valid time zone, must be one of " + DateTimeZone.getAvailableIDs()); } return timeZone; }
Source:
<code>public static String insertIntoListColumnIndexTable(IdAndVersion tableIdAndVersion, ColumnModel columnInfo, boolean filterRows){ String columnName = getColumnNameForId(columnInfo.getId()); String unnestedColumnName = getUnnestedColumnNameForId(columnInfo.getId()); String rowIdRefColumnName = getRowIdRefColumnNameForId(columnInfo.getId()); String columnIndexTableName = getTableNameForMultiValueColumnIndex(tableIdAndVersion, columnInfo.getId()); String tableName = getTableNameForId(tableIdAndVersion, TableType.INDEX); MySqlColumnType mySqlColumnType = ColumnTypeInfo.getInfoForType(ColumnTypeListMappings.nonListType(columnInfo.getColumnType())).getMySqlType(); String columnExpandTypeSQl = mySqlColumnType.name() + (mySqlColumnType.hasSize() && columnInfo.getMaximumSize() != null ? "(" + columnInfo.getMaximumSize() + ")" : ""); String rowFilter = ""; if(filterRows) { rowFilter = " WHERE "+tableName+"."+ROW_ID+" IN (:"+ID_PARAMETER_NAME+")"; } return "INSERT INTO " + columnIndexTableName + " (" + rowIdRefColumnName + "," + INDEX_NUM + ","+ unnestedColumnName +") " + "SELECT " + ROW_ID + " , TEMP_JSON_TABLE.ORDINAL - 1 , TEMP_JSON_TABLE.COLUMN_EXPAND" + " FROM "+ tableName + ", JSON_TABLE(" + columnName + ", '$[*]'" + " COLUMNS (" + " ORDINAL FOR ORDINALITY, " + " COLUMN_EXPAND " + columnExpandTypeSQl + " PATH '$'" + " )" + ") TEMP_JSON_TABLE"+rowFilter+ <START> " ON DUPLICATE KEY UPDATE " + unnestedColumnName + "=" + "TEMP_JSON_TABLE.COLUMN_EXPAND"; <END> }</code><technical_language>delete add instead</technical_language>

Target:
public static String insertIntoListColumnIndexTable(IdAndVersion tableIdAndVersion, ColumnModel columnInfo, boolean filterRows){ String columnName = getColumnNameForId(columnInfo.getId()); String unnestedColumnName = getUnnestedColumnNameForId(columnInfo.getId()); String rowIdRefColumnName = getRowIdRefColumnNameForId(columnInfo.getId()); String columnIndexTableName = getTableNameForMultiValueColumnIndex(tableIdAndVersion, columnInfo.getId()); String tableName = getTableNameForId(tableIdAndVersion, TableType.INDEX); MySqlColumnType mySqlColumnType = ColumnTypeInfo.getInfoForType(ColumnTypeListMappings.nonListType(columnInfo.getColumnType())).getMySqlType(); String columnExpandTypeSQl = mySqlColumnType.name() + (mySqlColumnType.hasSize() && columnInfo.getMaximumSize() != null ? "(" + columnInfo.getMaximumSize() + ")" : ""); String rowFilter = ""; if(filterRows) { rowFilter = " WHERE "+tableName+"."+ROW_ID+" IN (:"+ID_PARAMETER_NAME+")"; } return "INSERT INTO " + columnIndexTableName + " (" + rowIdRefColumnName + "," + INDEX_NUM + ","+ unnestedColumnName +") " + "SELECT " + ROW_ID + " , TEMP_JSON_TABLE.ORDINAL - 1 , TEMP_JSON_TABLE.COLUMN_EXPAND" + " FROM "+ tableName + ", JSON_TABLE(" + columnName + ", '$[*]'" + " COLUMNS (" + " ORDINAL FOR ORDINALITY, " + " COLUMN_EXPAND " + columnExpandTypeSQl + " PATH '$'" + " )" + ") TEMP_JSON_TABLE"+rowFilter; }
Source:
<code>public void setInstallLocation(File installLocation) { if (installLocation != null && <START> !installLocation.equals(fInstallLocation)) { <END> fInstallLocation= installLocation; } }</code><technical_language>is equals needed here</technical_language>

Target:
public void setInstallLocation(File installLocation) { fInstallLocation = installLocation; }
Source:
<code><START> public void handleGetFirmwareVersionDeviceResponse(final DeviceResponse deviceResponse, <END> final ResponseMessageSender responseMessageSender, final String domain, final String domainVersion, final String messageType, final int retryCount) { ResponseMessageResultType result = ResponseMessageResultType.OK; String firmwareVersion = ""; OsgpException osgpException = null; try { final GetFirmwareVersionDeviceResponse response = (GetFirmwareVersionDeviceResponse) deviceResponse; firmwareVersion = response.getFirmwareVersion(); } catch (final Exception e) { LOGGER.error("Device Response Exception", e); result = ResponseMessageResultType.NOT_OK; osgpException = new TechnicalException(ComponentType.UNKNOWN, "Unexpected exception while retrieving response message", e); } final ProtocolResponseMessage responseMessage = new ProtocolResponseMessage(domain, domainVersion, messageType, deviceResponse.getCorrelationUid(), deviceResponse.getOrganisationIdentification(), deviceResponse.getDeviceIdentification(), result, osgpException, firmwareVersion, retryCount); responseMessageSender.send(responseMessage); }</code><technical_language>Is necessary this method public</technical_language>

Target:
private void handleGetFirmwareVersionDeviceResponse(final DeviceResponse deviceResponse, final ResponseMessageSender responseMessageSender, final String domain, final String domainVersion, final String messageType, final int retryCount) { ResponseMessageResultType result = ResponseMessageResultType.OK; String firmwareVersion = ""; OsgpException osgpException = null; try { final GetFirmwareVersionDeviceResponse response = (GetFirmwareVersionDeviceResponse) deviceResponse; firmwareVersion = response.getFirmwareVersion(); } catch (final Exception e) { LOGGER.error("Device Response Exception", e); result = ResponseMessageResultType.NOT_OK; osgpException = new TechnicalException(ComponentType.UNKNOWN, "Unexpected exception while retrieving response message", e); } final ProtocolResponseMessage responseMessage = new ProtocolResponseMessage(domain, domainVersion, messageType, deviceResponse.getCorrelationUid(), deviceResponse.getOrganisationIdentification(), deviceResponse.getDeviceIdentification(), result, osgpException, firmwareVersion, retryCount); responseMessageSender.send(responseMessage); }
Source:
<code>public boolean valueEquals( C t ) { if ( t.length == length ) { final Iterator< T > a = iterator(); <START> final Iterator< T > b = iterator(); <END> while ( a.hasNext() ) if ( !a.next().valueEquals( b.next() ) ) return false; return true; } else return false; }</code><technical_language>of t.iterator()</technical_language>

Target:
public boolean valueEquals( C t ) { if ( t.length == length ) { final Iterator< T > a = iterator(); final Iterator< T > b = t.iterator(); while ( a.hasNext() ) if ( !a.next().valueEquals( b.next() ) ) return false; return true; } else return false; }
Source:
<code>private void presentNewPageNoticeIfNeeded() { if (mIsPreview || !mIsPage || !mModalLayoutPickerFeatureConfig.isEnabled() <START> || !mEditPostRepository.isLocalDraft()) { <END> return; } String message = mEditPostRepository.getContent().isEmpty() ? getString(R.string.mlp_notice_blank_page_created) : getString(R.string.mlp_notice_page_created); mEditorFragment.showNotice(message); }</code><technical_language>please double check want !mEditPostRepository.isLocalDraft() here? Local draft means post is a draft synced server yet. I reproduce issue this condition I I successful: 1. Click Create a Page 2. Select a layout 3. Click "Create Page" 4. Notice "Page Created" message (this is expected) 5. Turn airplane mode 6. Leave editor 7. "Page list" 8. Open page step 3 9. Notice" Page created" message (this is imo expect) mIsNewPost field in EditPostActivity work for us. Wdyt</technical_language>

Target:
private void presentNewPageNoticeIfNeeded() { if (mIsPreview || !mIsPage || !mIsNewPost || !mModalLayoutPickerFeatureConfig.isEnabled()) { return; } String message = mEditPostRepository.getContent().isEmpty() ? getString(R.string.mlp_notice_blank_page_created) : getString(R.string.mlp_notice_page_created); mEditorFragment.showNotice(message); }
Source:
<code>private static boolean downloadMinecraft(Path base, boolean autoDownload) throws IOException, NoSuchAlgorithmException { Path path = base.resolve(MINECRAFT_SERVER_LOCAL); if (Files.notExists(path)) { if (!autoDownload) { return false; } System.out.println("Downloading the versions manifest..."); JsonValue versions = downloadJson(MINECRAFT_MANIFEST_REMOTE); String versionManifestRemote = null; for (JsonValue versionInfo : versions.asObject().get("versions").asArray()) { JsonObject obj = versionInfo.asObject(); String versionId = obj.get("id").asString(); if (versionId.equals(MINECRAFT_SERVER_VERSION)) { versionManifestRemote = obj.get("url").asString(); break; } } if (versionManifestRemote == null) { throw new RuntimeException("Could not find " + MINECRAFT_SERVER_VERSION + "'s manifest URL"); } JsonValue versionManifest = downloadJson(versionManifestRemote); JsonObject serverObj = versionManifest.asObject() .get("downloads").asObject() .get("server").asObject(); String serverRemote = serverObj.get("url").asString(); String sha1 = serverObj.get("sha1").asString(); downloadAndVerify(serverRemote, path, sha1); } path = base.resolve(LAUNCHWRAPPER_LOCAL); if (!Files.exists(path)) { if (!autoDownload) { return false; } <START> download(LAUNCHWRAPPER_REMOTE, path); <END> } return true; }</code><technical_language>hardcode SHA1 of Launchwrapper 111e7bea9c968cdb3d06ef4632bf7ff0824d0f36 in a LAUNCHWRAPPER_SHA1 constant verified download here</technical_language>

Target:
private static boolean downloadMinecraft(Path base, boolean autoDownload) throws IOException, NoSuchAlgorithmException { Path path = base.resolve(MINECRAFT_SERVER_LOCAL); if (Files.notExists(path)) { if (!autoDownload) { return false; } System.out.println("Downloading the versions manifest..."); JsonValue versions = downloadJson(MINECRAFT_MANIFEST_REMOTE); String versionManifestRemote = null; for (JsonValue versionInfo : versions.asObject().get("versions").asArray()) { JsonObject obj = versionInfo.asObject(); String versionId = obj.get("id").asString(); if (versionId.equals(MINECRAFT_SERVER_VERSION)) { versionManifestRemote = obj.get("url").asString(); break; } } if (versionManifestRemote == null) { throw new NoSuchElementException("Could not find " + MINECRAFT_SERVER_VERSION + "'s manifest URL"); } JsonValue versionManifest = downloadJson(versionManifestRemote); JsonObject serverObj = versionManifest.asObject() .get("downloads").asObject() .get("server").asObject(); String serverRemote = serverObj.get("url").asString(); String sha1 = serverObj.get("sha1").asString(); downloadAndVerify(serverRemote, path, sha1); } path = base.resolve(LAUNCHWRAPPER_LOCAL); if (!Files.exists(path)) { if (!autoDownload) { return false; } downloadAndVerify(LAUNCHWRAPPER_REMOTE, path, LAUNCHWRAPPER_SHA1); } return true; }
Source:
<code>private void init(Jdbi db) { <START> db.registerArrayType(SqlArrayTypeFactory.of(UserId.class, "int", UserId::getId)); <END> db.registerColumnMapper(new UserIdColumnMapper()); }</code><technical_language>unroll this new Configurable method instead</technical_language>

Target:
private void init(Jdbi db) { db.registerArrayType(UserId.class, "int", UserId::getId); db.registerColumnMapper(new UserIdColumnMapper()); }
Source:
<code>public WorkflowVersion.WorkflowVersionPathInfo getWorkflowVersionPathInfoByAlias(@ApiParam(hidden = true) @Auth Optional<User> user, @ApiParam(value = "Alias", required = true) @PathParam("alias") String alias) { final WorkflowVersion workflowVersion = this.workflowVersionDAO.findByAlias(alias); if (workflowVersion == null) { LOG.error("Could not find workflow version using the alias: " + alias); throw new CustomWebApplicationException("Workflow version not found when searching with alias: " + alias, HttpStatus.SC_BAD_REQUEST); } long workflowVersionId = workflowVersion.getId(); long workflowId = AliasHelper.getWorkflowId(workflowDAO, workflowVersionId); Workflow workflow = workflowDAO.findById(workflowId); <START> workflowResource.checkEntry(workflow); <END> workflowResource.optionalUserCheckEntry(user, workflow); return new WorkflowVersion.WorkflowVersionPathInfo(workflow.getWorkflowPath(), workflowVersion.getName()); }</code><technical_language>This is redundant. AliasHelper.getWorkflowId throws exception if id is null</technical_language>

Target:
public WorkflowVersion.WorkflowVersionPathInfo getWorkflowVersionPathInfoByAlias(@ApiParam(hidden = true) @Auth Optional<User> user, @ApiParam(value = "Alias", required = true) @PathParam("alias") String alias) { final WorkflowVersion workflowVersion = this.workflowVersionDAO.findByAlias(alias); if (workflowVersion == null) { LOG.error("Could not find workflow version using the alias: " + alias); throw new CustomWebApplicationException("Workflow version not found when searching with alias: " + alias, HttpStatus.SC_BAD_REQUEST); } long workflowVersionId = workflowVersion.getId(); Workflow workflow = AliasHelper.getWorkflow(workflowDAO, workflowVersionId); workflowResource.optionalUserCheckEntry(user, workflow); return new WorkflowVersion.WorkflowVersionPathInfo(workflow.getWorkflowPath(), workflowVersion.getName()); }
Source:
<code>private CoreEvent removeOriginalError(CoreEvent event, Optional<Error> originalError) { <START> if (!event.getError().isPresent()) { <END> return event; } if (!isOriginalError(event.getError().get(), originalError)) { return event; } return CoreEvent.builder(event).error(null).build(); }</code><technical_language>optional, luke! ![image](<LINK_0></technical_language>

Target:
private CoreEvent removeOriginalError(CoreEvent event, Optional<Error> originalError) { return event.getError().map(err -> isOriginalError(err, originalError) ? CoreEvent.builder(event).error(null).build() : event) .orElse(event); }
Source:
<code>private void init(AphroditeConfig config) throws AphroditeException { this.config = config; executorService = config.getExecutorService(); AphroditeConfig mutableConfig = new AphroditeConfig(config); for (IssueTrackerService is : ServiceLoader.load(IssueTrackerService.class)) { boolean initialised = is.init(mutableConfig); if (initialised) issueTrackers.add(is); } for (RepositoryService rs : ServiceLoader.load(RepositoryService.class)) { boolean initialised = rs.init(mutableConfig); if (initialised) repositories.add(rs); } for (StreamService ss : ServiceLoader.load(StreamService.class)) { boolean initialised = ss.init(mutableConfig); if (initialised) { ss.loadData(this); streams.add(ss); } <START> } <END> if (issueTrackers.isEmpty() && repositories.isEmpty() && streams.isEmpty()) throw new AphroditeException("Unable to initiatilise Aphrodite, as a valid " + IssueTrackerService.class.getName() + " or " + RepositoryService.class.getName() + "or" + StreamService.class.getName() + " does not exist."); }</code><technical_language>This initialisation needs check if repositories issueTrackers is empty. try initiate a StreamService if RepositoryServices exist</technical_language>

Target:
private void init(AphroditeConfig config) throws AphroditeException, NotFoundException { this.config = config; executorService = config.getExecutorService(); AphroditeConfig mutableConfig = new AphroditeConfig(config); for (IssueTrackerService is : ServiceLoader.load(IssueTrackerService.class)) { boolean initialised = is.init(mutableConfig); if (initialised) issueTrackers.add(is); } for (RepositoryService rs : ServiceLoader.load(RepositoryService.class)) { boolean initialised = rs.init(mutableConfig); if (initialised) repositories.add(rs); } for (StreamService ss : ServiceLoader.load(StreamService.class)) { Objects.requireNonNull(repositories, "repository must not be null when initial stream service!"); boolean initialised = ss.init(this,mutableConfig); if (initialised) { streams.add(ss); } } if (issueTrackers.isEmpty() && repositories.isEmpty()) throw new AphroditeException("Unable to initiatilise Aphrodite, as a valid " + IssueTrackerService.class.getName() + " or " + RepositoryService.class.getName() + " does not exist."); }
Source:
<code>protected boolean canDoAction() { boolean returnValue = true; synchronized (_lockObject) { if (Guid.Empty.equals(getVmToAttach(getParameters().getVmPoolId()))) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NO_AVAILABLE_POOL_VMS); returnValue = false; } } if (returnValue) { List<VM> vmsForUser = getVmDAO().getAllForUser(getAdUserId()); int vmCount = 0; for (VM vm : vmsForUser) { if (vm.getVmPoolId() != null && getVmPoolId().equals(vm.getVmPoolId())) { vmCount++; } } int limit = getVmPool().getMaxAssignedVmsPerUser(); if (vmCount >= limit) { addCanDoActionMessage(VdcBllMessages.VM_POOL_CANNOT_ATTACH_TO_MORE_VMS_FROM_POOL); returnValue = false; } } if (!returnValue) { <START> addCanDoActionMessage(VdcBllMessages.VAR__ACTION__ALLOCATE_AND_RUN); <END> addCanDoActionMessage(VdcBllMessages.VAR__TYPE__VM_FROM_VM_POOL); } return returnValue; }</code><technical_language>Please replace 2 lines a call new method</technical_language>

Target:
protected boolean canDoAction() { boolean returnValue = true; synchronized (_lockObject) { if (Guid.Empty.equals(getVmToAttach(getParameters().getVmPoolId()))) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NO_AVAILABLE_POOL_VMS); returnValue = false; } } if (returnValue) { List<VM> vmsForUser = getVmDAO().getAllForUser(getAdUserId()); int vmCount = 0; for (VM vm : vmsForUser) { if (vm.getVmPoolId() != null && getVmPoolId().equals(vm.getVmPoolId())) { vmCount++; } } int limit = getVmPool().getMaxAssignedVmsPerUser(); if (vmCount >= limit) { addCanDoActionMessage(VdcBllMessages.VM_POOL_CANNOT_ATTACH_TO_MORE_VMS_FROM_POOL); returnValue = false; } } if (!returnValue) { setActionMessageParameters(); } return returnValue; }
Source:
<code>public boolean equals(final Object obj) { if (!(obj instanceof BulkObject)) { return false; } final BulkObject bulkObject = (BulkObject) obj; return nullableEquals(this.getId(), bulkObject.getId()) && nullableEquals(this.getInCache(), bulkObject.getInCache()) && this.getLatest() == bulkObject.getLatest() && this.getLength() == bulkObject.getLength() && nullableEquals(this.getName(), bulkObject.getName()) && this.getOffset() == bulkObject.getOffset() && this.getPhysicalPlacement() == bulkObject.getPhysicalPlacement() <START> && this.getVersionId() == bulkObject.getVersionId(); <END> }</code><technical_language>This updated object equals versionId is a UUID instead of a long</technical_language>

Target:
public boolean equals(final Object obj) { if (!(obj instanceof BulkObject)) { return false; } final BulkObject bulkObject = (BulkObject) obj; return nullableEquals(this.getId(), bulkObject.getId()) && nullableEquals(this.getInCache(), bulkObject.getInCache()) && this.getLatest() == bulkObject.getLatest() && this.getLength() == bulkObject.getLength() && nullableEquals(this.getName(), bulkObject.getName()) && this.getOffset() == bulkObject.getOffset() && this.getPhysicalPlacement() == bulkObject.getPhysicalPlacement() && nullableEquals(this.getVersionId(), bulkObject.getVersionId()); }
Source:
<code>public String toString() { return new ToStringBuilder(this) <START> .append("balancerDecisionRecords", balancerDecision) <END> .toString(); }</code><technical_language>"balancerDecisions"</technical_language>

Target:
public String toString() { return new ToStringBuilder(this) .append("balancerDecision", balancerDecision) .toString(); }
Source:
<code>public UpdateProjection(Symbol uidSymbol, String[] assignmentsColumns, Symbol[] assignments, Version version, Symbol[] outputs, @Nullable Symbol[] returnValues, @Nullable Long requiredVersion) { this.uidSymbol = uidSymbol; this.assignmentsColumns = assignmentsColumns; this.assignments = assignments; <START> this.allOn4_1 = version.onOrAfter(Version.V_4_1_0); <END> this.returnValues = returnValues; assert Arrays.stream(outputs).noneMatch(s -> SymbolVisitors.any(Symbols.IS_COLUMN.or(x -> x instanceof SelectSymbol), s)) : "Cannot operate on Reference, Field or SelectSymbol symbols: " + outputs; this.outputs = outputs; this.requiredVersion = requiredVersion; }</code><technical_language>need update BWC related stuff version 4.2.0 merging this master</technical_language>

Target:
public UpdateProjection(Symbol uidSymbol, String[] assignmentsColumns, Symbol[] assignments, Version version, Symbol[] outputs, @Nullable Symbol[] returnValues, @Nullable Long requiredVersion) { this.uidSymbol = uidSymbol; this.assignmentsColumns = assignmentsColumns; this.assignments = assignments; this.allOn4_2 = version.onOrAfter(Version.V_4_2_0); this.returnValues = returnValues; assert Arrays.stream(outputs).noneMatch(s -> SymbolVisitors.any(Symbols.IS_COLUMN.or(x -> x instanceof SelectSymbol), s)) : "Cannot operate on Reference, Field or SelectSymbol symbols: " + outputs; this.outputs = outputs; this.requiredVersion = requiredVersion; }
Source:
<code>public void ShouldReturnAllIdentifierType() throws Exception { when(Context.isAuthenticated()).thenReturn(true); when(Context.hasPrivilege("Get Identifier Types")).thenReturn(true); final IdentifierSource identifierSource = new IdentifierSource("source-uuid", "some name", "SOM"); <START> final IdentifierType bahmniIdentifierType = new IdentifierType("uuid", "bahmni", "description", ".*", true, true, Arrays.asList(identifierSource)); <END> when(serviceWrapper.getPrimaryAndExtraIdentifierTypes()).thenReturn(Arrays.asList(bahmniIdentifierType)); ResponseEntity<String> allIdentifierType = controller.getPrimaryAndExtraIdentifierTypes(); List<IdentifierType> identifierTypes = new ObjectMapper().readValue(allIdentifierType.getBody(), new TypeReference<List<IdentifierType>>() {}); assertEquals(1, identifierTypes.size()); assertEquals(bahmniIdentifierType.getUuid(), identifierTypes.get(0).getUuid()); assertEquals(bahmniIdentifierType.getFormat(), identifierTypes.get(0).getFormat()); assertEquals(bahmniIdentifierType.getName(), identifierTypes.get(0).getName()); assertEquals(bahmniIdentifierType.getIdentifierSources().size(), identifierTypes.get(0).getIdentifierSources().size()); }</code><technical_language>here, replace bahmni openmrs</technical_language>

Target:
public void ShouldReturnAllIdentifierType() throws Exception { when(Context.isAuthenticated()).thenReturn(true); when(Context.hasPrivilege("Get Identifier Types")).thenReturn(true); final IdentifierSource identifierSource = new IdentifierSource("source-uuid", "some name", "SOM"); final IdentifierType openmrsIdentifierType = new IdentifierType("uuid", "openmrs", "description", ".*", true, true, Arrays.asList(identifierSource)); when(serviceWrapper.getPrimaryAndExtraIdentifierTypes()).thenReturn(Arrays.asList(openmrsIdentifierType)); ResponseEntity<String> allIdentifierType = controller.getPrimaryAndExtraIdentifierTypes(); List<IdentifierType> identifierTypes = new ObjectMapper().readValue(allIdentifierType.getBody(), new TypeReference<List<IdentifierType>>() {}); assertEquals(1, identifierTypes.size()); assertEquals(openmrsIdentifierType.getUuid(), identifierTypes.get(0).getUuid()); assertEquals(openmrsIdentifierType.getFormat(), identifierTypes.get(0).getFormat()); assertEquals(openmrsIdentifierType.getName(), identifierTypes.get(0).getName()); assertEquals(openmrsIdentifierType.getIdentifierSources().size(), identifierTypes.get(0).getIdentifierSources().size()); }
Source:
<code><START> public void ldapAuthenticationProviderCustom() { <END> this.spring.register(CustomLdapAuthenticationProviderConfig.class).autowire(); LdapAuthenticationProvider provider = findAuthenticationProvider(LdapAuthenticationProvider.class); LdapAuthoritiesPopulator authoritiesPopulator = getAuthoritiesPopulator(provider); assertThat(authoritiesPopulator).hasFieldOrPropertyWithValue("groupRoleAttribute", "cn"); assertThat(authoritiesPopulator).hasFieldOrPropertyWithValue("groupSearchBase", "ou=groups"); assertThat(authoritiesPopulator).hasFieldOrPropertyWithValue("groupSearchFilter", "(member={0})"); assertThat(getAuthoritiesMapper(provider)).hasFieldOrPropertyWithValue("prefix", "PREFIX_"); LdapAuthenticator authenticator = getAuthenticator(provider); assertThat(callGetUserDns(authenticator, "user")).isEqualTo(Collections.singletonList("uid=user,ou=people")); assertThat(authenticator).hasFieldOrPropertyWithValue("userSearch.searchBase", "ou=users"); assertThat(authenticator).hasFieldOrPropertyWithValue("userSearch.searchFilter", "(uid={0})"); }</code><technical_language>This test needs reflection equivalent groovy test migrated, modified test intent code, direct consequence. In other words, consider verifying "groupSearchBase" "ou=groups". Setting groupRoleAttribute, groupSearchBase, groupSearchFilter is allows get user authorities. If omit of authorities list empty authentication null. Therefore, this test instead check correct authorities populated. this.mockMvc.perform(formLogin().user("bob").password("bobspassword")) .andExpect(authenticated().withAuthorities(Collections.singleton(new SimpleGrantedAuthority("PREFIX_DEVELOPERS"))));</technical_language>

Target:
public void ldapAuthenticationProviderCustom() throws Exception { this.spring.register(CustomLdapAuthenticationProviderConfig.class).autowire(); this.mockMvc.perform(formLogin().user("bob").password("bobspassword")) .andExpect(authenticated().withAuthorities(Collections.singleton(new SimpleGrantedAuthority("PREFIX_DEVELOPERS")))); }
Source:
<code>private void collapseDeclarationOfNameAndDescendants(Name n, String alias) { boolean canCollapseChildNames = n.canCollapseUnannotatedChildNames(); if (n.canCollapse()) { <START> <END> if (n.docInfo != null && n.docInfo.isNoCollapse() && n.parent != null && n.parent.type == Name.Type.OBJECTLIT && n.parent.docInfo != null && n.parent.docInfo.hasEnumParameterType()) { compiler.report( JSError.make(n.docInfo.getAssociatedNode(), INVALID_NOCOLLAPSE)); } updateObjLitOrFunctionDeclaration(n, alias, canCollapseChildNames); } if (n.props != null) { for (Name p : n.props) { collapseDeclarationOfNameAndDescendants( p, appendPropForAlias(alias, p.getBaseName())); if (!p.inExterns && canCollapseChildNames && p.getDeclaration() != null && p.canCollapse() && p.getDeclaration().node != null && p.getDeclaration().node.getParent() != null && p.getDeclaration().node.getParent().isAssign()) { updateSimpleDeclaration( appendPropForAlias(alias, p.getBaseName()), p, p.getDeclaration()); } } } }</code><technical_language>remove blank line</technical_language>

Target:
private void collapseDeclarationOfNameAndDescendants(Name n, String alias) { boolean canCollapseChildNames = n.canCollapseUnannotatedChildNames(); if (n.canCollapse()) { if (n.docInfo != null && n.docInfo.isNoCollapse() && n.isDescendantOfEnum()) { compiler.report( JSError.make(n.docInfo.getAssociatedNode(), INVALID_NOCOLLAPSE)); } updateObjLitOrFunctionDeclaration(n, alias, canCollapseChildNames); } if (n.props != null) { for (Name p : n.props) { collapseDeclarationOfNameAndDescendants( p, appendPropForAlias(alias, p.getBaseName())); if (!p.inExterns && canCollapseChildNames && p.getDeclaration() != null && p.canCollapse() && p.getDeclaration().node != null && p.getDeclaration().node.getParent() != null && p.getDeclaration().node.getParent().isAssign()) { updateSimpleDeclaration( appendPropForAlias(alias, p.getBaseName()), p, p.getDeclaration()); } } } }
Source:
<code>public void setup() throws Exception { super.setup(); srcDir = absolutepath("source"); dstDir = absolutepath("target"); srcFile = new Path(srcDir, "source.txt"); dstFile = new Path(dstDir, "dst.txt"); zeroByteFile = new Path(srcDir, "zero.txt"); byte[] block = dataset(TEST_FILE_LEN, 0, 255); createFile(getFileSystem(), srcFile, true, block); touch(getFileSystem(), zeroByteFile); fs = getFileSystem(); <START> skipIfUnsupported(SUPPORTS_NATIVE_COPY); <END> }</code><technical_language>do this creating files</technical_language>

Target:
public void setup() throws Exception { super.setup(); skipIfUnsupported(SUPPORTS_NATIVE_COPY); srcDir = absolutepath("source"); dstDir = absolutepath("target"); srcFile = new Path(srcDir, "source.txt"); dstFile = new Path(dstDir, "dst.txt"); zeroByteFile = new Path(srcDir, "zero.txt"); srcData = dataset(TEST_FILE_LEN, 0, 255); createFile(getFileSystem(), srcFile, true, srcData); touch(getFileSystem(), zeroByteFile); fs = getFileSystem(); }
Source:
<code>public boolean hasTaskChanged(TaskRepository taskRepository, ITask task, TaskData taskData) { String lastKnownLocalModValue = task .getAttribute(BugzillaRestTaskSchema.getDefault().DATE_MODIFICATION.getKey()); TaskAttribute latestRemoteModAttribute = taskData.getRoot().getMappedAttribute(TaskAttribute.DATE_MODIFICATION); String latestRemoteModValue = latestRemoteModAttribute != null ? latestRemoteModAttribute.getValue() : null; <START> if (latestRemoteModValue == null && lastKnownLocalModValue == null) { <END> return false; } if (latestRemoteModValue != null && lastKnownLocalModValue != null) { return !latestRemoteModValue.equals(lastKnownLocalModValue); } return true; }</code><technical_language>Objects.equal</technical_language>

Target:
public boolean hasTaskChanged(TaskRepository taskRepository, ITask task, TaskData taskData) { String lastKnownLocalModValue = task .getAttribute(BugzillaRestTaskSchema.getDefault().DATE_MODIFICATION.getKey()); TaskAttribute latestRemoteModAttribute = taskData.getRoot().getMappedAttribute(TaskAttribute.DATE_MODIFICATION); String latestRemoteModValue = latestRemoteModAttribute != null ? latestRemoteModAttribute.getValue() : null; if (latestRemoteModValue == null && lastKnownLocalModValue == null) { return false; } return !Objects.equal(latestRemoteModValue, lastKnownLocalModValue); }
Source:
<code>private String buildExceptionMessage(EventMessage failedEvent) { String eventDescription = format("An event with identifier [%s] could not be persisted", failedEvent.getIdentifier()); if (isFirstDomainEvent(failedEvent)) { DomainEventMessage failedDomainEvent = (DomainEventMessage) failedEvent; <START> eventDescription = format("An aggregate of type [%s] with id [%s] was already created.", <END> failedDomainEvent.getType(), failedDomainEvent.getAggregateIdentifier()); } else if (failedEvent instanceof DomainEventMessage<?>) { DomainEventMessage failedDomainEvent = (DomainEventMessage) failedEvent; eventDescription = format("An event for aggregate [%s] at sequence [%d] was already inserted", failedDomainEvent.getAggregateIdentifier(), failedDomainEvent.getSequenceNumber()); } return eventDescription; }</code><technical_language>suggestion eventDescription = format("Cannot reuse aggregate identifier [%s] create aggregate [%s] identifiers need unique.", This means parameters format() method switched way</technical_language>

Target:
private String buildExceptionMessage(EventMessage failedEvent) { String eventDescription = format("An event with identifier [%s] could not be persisted", failedEvent.getIdentifier()); if (isFirstDomainEvent(failedEvent)) { DomainEventMessage failedDomainEvent = (DomainEventMessage) failedEvent; eventDescription = format( "Cannot reuse aggregate identifier [%s] to create aggregate [%s] since identifiers need to be unique.", failedDomainEvent.getAggregateIdentifier(), failedDomainEvent.getType()); } else if (failedEvent instanceof DomainEventMessage<?>) { DomainEventMessage failedDomainEvent = (DomainEventMessage) failedEvent; eventDescription = format("An event for aggregate [%s] at sequence [%d] was already inserted", failedDomainEvent.getAggregateIdentifier(), failedDomainEvent.getSequenceNumber()); } return eventDescription; }
Source:
<code>public static void recvMsg(ZMQ.Socket socket, int flags, Consumer<ZMsg> handler, Consumer<ZMQException> exceptionHandler) { ZMsg msg = null; try { <START> msg = ZMsg.recvMsg(socket, flags); <END> } catch (ZMQException e) { exceptionHandler.accept(e); } handler.accept(msg); }</code><technical_language>version, if exception occurs, handler.accept() called, a null argument. Putting accept try-catch block remove behavior. try { handler.accept(ZMsg.recvMsg(socket, flags)); } ..</technical_language>

Target:
public static void recvMsg(ZMQ.Socket socket, int flags, Consumer<ZMsg> handler, Consumer<ZMQException> exceptionHandler) { try { handler.accept(ZMsg.recvMsg(socket, flags)); } catch (ZMQException e) { exceptionHandler.accept(e); } }
Source:
<code>public ArrayList<OCShare> getPrivateSharesForAFile(String filePath, String accountName){ String where = ProviderTableMeta.OCSHARES_PATH + "=?" + " AND " + ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?"+ "AND" + " (" + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? OR " + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? OR " + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? ) "; String whereArgs = new String[]{ filePath, accountName , Integer.toString(ShareType.USER.getValue()), Integer.toString(ShareType.GROUP.getValue()), Integer.toString(ShareType.FEDERATED.getValue())}; Cursor c = null; if (getContentResolver() != null) { c = getContentResolver().query( ProviderTableMeta.CONTENT_URI_SHARE, null, where, whereArgs, null); } else { try { c = getContentProviderClient().query( ProviderTableMeta.CONTENT_URI_SHARE, null, where, whereArgs, null); } catch (RemoteException e) { Log_OC.e(TAG, "Could not get list of shares with: " + e.getMessage()); c = null; } } <START> ArrayList<OCShare> shares = new ArrayList<>(); <END> OCShare share = null; if (c != null) { if (c.moveToFirst()) { do { share = createShareInstance(c); shares.add(share); } while (c.moveToNext()); } c.close(); } return shares; }</code><technical_language>I rename this variable privateShares in order database</technical_language>

Target:
public ArrayList<OCShare> getPrivateSharesForAFile(String filePath, String accountName){ String where = ProviderTableMeta.OCSHARES_PATH + "=?" + " AND " + ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?"+ "AND" + " (" + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? OR " + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? OR " + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? ) "; String whereArgs = new String[]{ filePath, accountName , Integer.toString(ShareType.USER.getValue()), Integer.toString(ShareType.GROUP.getValue()), Integer.toString(ShareType.FEDERATED.getValue())}; Cursor c; if (getContentResolver() != null) { c = getContentResolver().query( ProviderTableMeta.CONTENT_URI_SHARE, null, where, whereArgs, null); } else { try { c = getContentProviderClient().query( ProviderTableMeta.CONTENT_URI_SHARE, null, where, whereArgs, null); } catch (RemoteException e) { Log_OC.e(TAG, "Could not get list of shares with: " + e.getMessage()); c = null; } } ArrayList<OCShare> privateShares = new ArrayList<>(); OCShare privateShare; if (c != null) { if (c.moveToFirst()) { do { privateShare = createShareInstance(c); privateShares.add(privateShare); } while (c.moveToNext()); } c.close(); } return privateShares; }
Source:
<code>private void writeParameters(JarOutputStream target, String parameters) { <START> try (InputStream in = new ByteArrayInputStream(parameters.getBytes(Charset.forName("UTF-8")))) { <END> JarEntry entry = new JarEntry("config/composedjob.properties"); target.putNextEntry(entry); StreamUtils.copy(in, target); target.closeEntry(); } catch(IOException ioe){ throw new IllegalStateException(ioe.getMessage(), ioe); } }</code><technical_language>I 'StandardCharsets.UTF_8 instead of a string literal here</technical_language>

Target:
private void writeParameters(JarOutputStream target, String parameters) { try (InputStream in = new ByteArrayInputStream(parameters.getBytes(Charset.forName(StandardCharsets.UTF_8.name())))) { JarEntry entry = new JarEntry("config/composedjob.properties"); target.putNextEntry(entry); StreamUtils.copy(in, target); target.closeEntry(); } catch(IOException ioe){ throw new IllegalStateException(ioe.getMessage(), ioe); } }
Source:
<code><START> int getNumberOfProjects(final OrganizationalUnit organizationalUnit) { <END> for (final OrganizationalUnit unit : numberOfProjectsByOrganizationalUnit.keySet()) { if (unit.getName().equals(organizationalUnit.getName())) { return numberOfProjectsByOrganizationalUnit.get(unit); } } return 0; }</code><technical_language>this implement below, I missing something: java final Integer count = numberOfProjectsByOrganizationalUnit.get(organizationalUnit); return count != null ? count.intValue() : 0;</technical_language>

Target:
int getNumberOfProjects(final OrganizationalUnit organizationalUnit) { final Integer count = numberOfProjectsByOrganizationalUnit.get(organizationalUnit); return count != null ? count.intValue() : 0; }
Source:
<code>public HttpResponse execute(HttpRequest req) throws UncheckedIOException { Optional<Map<String, List<String>>> params = FormEncodedData.getData(req); String cmd = getValue("cmd", params, req); SessionId sessionId = null; if (getValue("sessionId", params, req) != null) { sessionId = new SessionId(getValue("sessionId", params, req)); } String[] args = deserializeArgs(params, req); if (cmd == null) { return sendError(HTTP_NOT_FOUND, "Unable to find cmd query parameter"); } StringBuilder printableArgs = new StringBuilder("["); Joiner.on(", ").appendTo(printableArgs, args); printableArgs.append("]"); <START> LOG.finest(String.format("Command request: %s%s on session %s", cmd, printableArgs, sessionId)); <END> if ("getNewBrowserSession".equals(cmd)) { return startNewSession(args[0], args[1], args.length == 4 ? args[3] : ""); } else if ("testComplete".equals(cmd)) { CommandProcessor commandProcessor = PROCESSORS.get(sessionId); sessions.invalidate(sessionId); if (commandProcessor == null) { return sendError(HTTP_NOT_FOUND, "Unable to find command processor for " + sessionId); } return sendResponse(null); } CommandProcessor commandProcessor = PROCESSORS.get(sessionId); if (commandProcessor == null) { return sendError(HTTP_NOT_FOUND, "Unable to find command processor for " + sessionId); } try { String result = commandProcessor.doCommand(cmd, args); return sendResponse(result); } catch (SeleniumException e) { return sendError(HTTP_OK, e.getMessage()); } }</code><technical_language>info chosen deliberately mirror behaviour users expected</technical_language>

Target:
public HttpResponse execute(HttpRequest req) throws UncheckedIOException { Optional<Map<String, List<String>>> params = FormEncodedData.getData(req); String cmd = getValue("cmd", params, req); SessionId sessionId = null; if (getValue("sessionId", params, req) != null) { sessionId = new SessionId(getValue("sessionId", params, req)); } String[] args = deserializeArgs(params, req); if (cmd == null) { return sendError(HTTP_NOT_FOUND, "Unable to find cmd query parameter"); } StringBuilder printableArgs = new StringBuilder("["); Joiner.on(", ").appendTo(printableArgs, args); printableArgs.append("]"); LOG.info(String.format("Command request: %s%s on session %s", cmd, printableArgs, sessionId)); if ("getNewBrowserSession".equals(cmd)) { return startNewSession(args[0], args[1], args.length == 4 ? args[3] : ""); } else if ("testComplete".equals(cmd)) { CommandProcessor commandProcessor = PROCESSORS.get(sessionId); sessions.invalidate(sessionId); if (commandProcessor == null) { return sendError(HTTP_NOT_FOUND, "Unable to find command processor for " + sessionId); } return sendResponse(null); } CommandProcessor commandProcessor = PROCESSORS.get(sessionId); if (commandProcessor == null) { return sendError(HTTP_NOT_FOUND, "Unable to find command processor for " + sessionId); } try { String result = commandProcessor.doCommand(cmd, args); return sendResponse(result); } catch (SeleniumException e) { return sendError(HTTP_OK, e.getMessage()); } }
Source:
<code>FeatureAttributeEntry(String attributeName, String featureName, String templateText) { this.attributeName = attributeName; this.featureName = featureName; this.templateText = templateText; this.toStringValue = new ToStringBuilder(this) .append(attributeName) .append(featureName) .append(templateText) .toString(); Handlebars handleBars = new Handlebars(); handleBars.registerHelpers(StringHelpers.class); try { this.template = handleBars.compileInline(templateText); } catch (IOException e) { <START> LOGGER.error("Could not compile handlebars template: '" + templateText + "'. ", e); <END> } }</code><technical_language>this parameterized</technical_language>

Target:
FeatureAttributeEntry(String attributeName, String featureName, String templateText) { this.attributeName = attributeName; this.featureName = featureName; this.templateText = templateText; this.toStringValue = new ToStringBuilder(this) .append(attributeName) .append(featureName) .append(templateText) .toString(); Handlebars handleBars = new Handlebars(); handleBars.registerHelpers(StringHelpers.class); try { this.template = handleBars.compileInline(templateText); } catch (IOException e) { LOGGER.error("Could not compile handlebars template: {}. ", templateText, e); } }
Source:
<code><START> LazyIfNumber(List<LazyNumber> lazyParams) { <END> this.lazyParams = lazyParams; }</code><technical_language>Sorry, I missed this completely review. a public class a package-private constructor is slightly problematic API point of view. allows class, it. suggest public class package-private...but need do some more thinking one, public</technical_language>

Target:
public LazyIfNumber(List<LazyNumber> lazyParams) { this.lazyParams = lazyParams; }
Source:
<code>public static int getAppVersion() { <START> return CommCareApplication.instance().getCurrentApp().getAppRecord().getVersionNumber(); <END> }</code><technical_language>I crash if app successfully seated yet. good wrap reporting helpers in a try/catch guarantee get report</technical_language>

Target:
public static int getAppVersion() { try { return CommCareApplication.instance().getCurrentApp().getAppRecord().getVersionNumber(); } catch (Exception e) { return -1; } }
Source:
<code>public void testExecutionBuilder() { Assert.assertNotNull(builder); Path input = Paths.get("../../test-files/src_example"); Path output = getDefaultPath(); ExecutionResults results = builder.begin(Paths.get(".")) .setInput(input) .setOutput(output) .includePackage("org.windup.examples.ejb.messagedriven") .ignore("\\.class$") .execute(); <START> Assert.assertNotNull(results.getClassifications()); <END> Assert.assertNotNull(results.getHints()); }</code><technical_language>worth asserting empty</technical_language>

Target:
public void testExecutionBuilder() { Assert.assertNotNull(builder); Assert.assertNotNull(testProvider); Path input = Paths.get("../../test-files/src_example"); Path output = getDefaultPath(); ExecutionResults results = builder.begin(Paths.get(".")) .setInput(input) .setOutput(output) .includePackage("org.windup.examples.ejb.messagedriven") .ignore("\\.class$") .execute(); Assert.assertNotNull(results.getClassifications()); Assert.assertNotNull(results.getHints()); Assert.assertTrue(results.getHints().iterator().hasNext()); Assert.assertTrue(results.getClassifications().iterator().hasNext()); }
Source:
<code>private Durability getMincEventDurability(KeyExtent extent) { TableConfiguration conf; <START> if (extent.isMeta() || extent.isRootTablet()) { <END> conf = confFactory.getTableConfiguration(RootTable.ID); } else { conf = confFactory.getTableConfiguration(MetadataTable.ID); } Durability durability = DurabilityImpl.fromString(conf.get(Property.TABLE_DURABILITY)); return durability; }</code><technical_language>This check is a bit confusing. reads "If extent is for metadata table root tablet, root tablet's configuration. Otherwise, metadata configuration." Is some other setting for user tables more appropriate? KeyExtent#isMeta returns for metadata table root tablet, || extent.isRootTablet() is redundant. However, I refactoring KeyExtent#isMeta is more more clear is checking</technical_language>

Target:
private Durability getMincEventDurability(KeyExtent extent) { TableConfiguration conf; if (extent.isMeta()) { conf = confFactory.getTableConfiguration(RootTable.ID); } else { conf = confFactory.getTableConfiguration(MetadataTable.ID); } Durability durability = DurabilityImpl.fromString(conf.get(Property.TABLE_DURABILITY)); return durability; }