auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private AuditLogType attemptToAttachDisksToImportedVm(Collection<Disk> disks) { List<String> failedDisks = new LinkedList<>(); for (Disk disk : disks) { DiskVmElement dve = disk.getDiskVmElements().iterator().next(); AttachDetachVmDiskParameters params = new AttachDetachVmDiskParameters( dve, <START> disk.getPlugged()); <END> ActionReturnValue returnVal = runInternalAction(ActionType.AttachDiskToVm, params, cloneContextAndDetachFromParent()); if (!returnVal.getSucceeded()) { failedDisks.add(disk.getDiskAlias()); } } if (!failedDisks.isEmpty()) { this.addCustomValue("DiskAliases", StringUtils.join(failedDisks, ",")); return AuditLogType.VM_IMPORT_FROM_CONFIGURATION_ATTACH_DISKS_FAILED; } return AuditLogType.VM_IMPORT_FROM_CONFIGURATION_EXECUTED_SUCCESSFULLY; }</code><technical_language>I plugged referenced device disk</technical_language>

Target:
private AuditLogType attemptToAttachDisksToImportedVm(Collection<Disk> disks) { List<String> failedDisks = new LinkedList<>(); for (Disk disk : disks) { DiskVmElement dve = disk.getDiskVmElements().iterator().next(); AttachDetachVmDiskParameters params = new AttachDetachVmDiskParameters( dve, dve.isPlugged()); ActionReturnValue returnVal = runInternalAction(ActionType.AttachDiskToVm, params, cloneContextAndDetachFromParent()); if (!returnVal.getSucceeded()) { failedDisks.add(disk.getDiskAlias()); } } if (!failedDisks.isEmpty()) { this.addCustomValue("DiskAliases", StringUtils.join(failedDisks, ",")); return AuditLogType.VM_IMPORT_FROM_CONFIGURATION_ATTACH_DISKS_FAILED; } return AuditLogType.VM_IMPORT_FROM_CONFIGURATION_EXECUTED_SUCCESSFULLY; }
Source:
<code><START> protected void beforeCommit() { <END> name = HunspellSpellChecker.DICTIONARY_BASE_NAME + "_" + getLocale().toString(); words = new HashSet<>(getWords()).stream().sorted().collect(Collectors.toList()); if (!StringUtils.isBlank(oldName) && !oldName.equals(name)) { HunspellSpellChecker.inValidateDictionary(oldName); } HunspellSpellChecker.inValidateDictionary(name); }</code><technical_language>invalidate means need track of oldName</technical_language>

Target:
protected void beforeCommit() { words = new TreeSet<>(getWords()); }
Source:
<code>public BuildOptions patch(BuildOptionsView options, EventHandler eventHandler) { <START> if (executionPlatform == null || options.get(CoreOptions.class).isExec) { <END> return options.underlying(); } return cache.applyTransition( options, executionPlatform, () -> { BuildOptionsView execOptions = new BuildOptionsView( options.underlying().createHostOptions(), requiresOptionFragments()); CoreOptions coreOptions = Preconditions.checkNotNull(execOptions.get(CoreOptions.class)); coreOptions.isHost = false; coreOptions.isExec = true; coreOptions.outputDirectoryName = null; coreOptions.platformSuffix = String.format("-exec-%X", executionPlatform.getCanonicalForm().hashCode()); if (execOptions.get(PlatformOptions.class) != null) { execOptions.get(PlatformOptions.class).platforms = ImmutableList.of(executionPlatform); } BuildOptions result = execOptions.underlying(); ImmutableList<Label> featureFlags = execOptions.underlying().getStarlarkOptions().entrySet().stream() .filter(entry -> entry.getValue() instanceof FeatureFlagValue) .map(Map.Entry::getKey) .collect(toImmutableList()); if (!featureFlags.isEmpty()) { BuildOptions.Builder resultBuilder = result.toBuilder(); featureFlags.stream().forEach(flag -> resultBuilder.removeStarlarkOption(flag)); result = resultBuilder.build(); } return result; }); }</code><technical_language>This safe: need build tools in order build other tools. this lead error action_env</technical_language>

Target:
public BuildOptions patch(BuildOptionsView options, EventHandler eventHandler) { if (executionPlatform == null) { return options.underlying(); } return cache.applyTransition( options, executionPlatform, () -> { BuildOptionsView execOptions = new BuildOptionsView( options.underlying().createHostOptions(), requiresOptionFragments()); CoreOptions coreOptions = Preconditions.checkNotNull(execOptions.get(CoreOptions.class)); coreOptions.isHost = false; coreOptions.isExec = true; coreOptions.outputDirectoryName = null; coreOptions.platformSuffix = String.format("-exec-%X", executionPlatform.getCanonicalForm().hashCode()); if (execOptions.get(PlatformOptions.class) != null) { execOptions.get(PlatformOptions.class).platforms = ImmutableList.of(executionPlatform); } BuildOptions result = execOptions.underlying(); ImmutableList<Label> featureFlags = execOptions.underlying().getStarlarkOptions().entrySet().stream() .filter(entry -> entry.getValue() instanceof FeatureFlagValue) .map(Map.Entry::getKey) .collect(toImmutableList()); if (!featureFlags.isEmpty()) { BuildOptions.Builder resultBuilder = result.toBuilder(); featureFlags.stream().forEach(flag -> resultBuilder.removeStarlarkOption(flag)); result = resultBuilder.build(); } return result; }); }
Source:
<code>public static void updateTickBlock(IMixinWorldServer mixinWorld, Block block, BlockPos pos, IBlockState state, Random random) { final WorldServer world = WorldUtil.asNative(mixinWorld); final World apiWorld = WorldUtil.fromNative(world); if (ShouldFire.TICK_BLOCK_EVENT) { BlockSnapshot snapshot = mixinWorld.createSpongeBlockSnapshot(state, state, pos, BlockChangeFlags.NONE); final TickBlockEvent event = SpongeEventFactory.createTickBlockEventScheduled(Sponge.getCauseStackManager().getCurrentCause(), snapshot); SpongeImpl.postEvent(event); if (event.isCancelled()) { return; } } final LocatableBlock locatable = LocatableBlock.builder() <START> .state((BlockState) state) <END> .position(pos.getX(), pos.getY(), pos.getZ()) .world(apiWorld) .build(); final BlockTickContext phaseContext = TickPhase.Tick.BLOCK.createPhaseContext().source(locatable); final PhaseTracker phaseTracker = PhaseTracker.getInstance(); final PhaseData current = phaseTracker.getCurrentPhaseData(); final IPhaseState<?> currentState = current.state; ((IPhaseState) currentState).appendNotifierPreBlockTick(mixinWorld, pos, current.context, phaseContext); try (final PhaseContext<?> context = phaseContext; final Timing timing = BlockUtil.toMixin(state).getTimingsHandler()) { timing.startTiming(); context.buildAndSwitch(); block.updateTick(world, pos, state, random); } catch (Exception | NoClassDefFoundError e) { phaseTracker.printExceptionFromPhase(e, phaseContext); } }</code><technical_language>difference</technical_language>

Target:
public static void updateTickBlock(IMixinWorldServer mixinWorld, Block block, BlockPos pos, IBlockState state, Random random) { final WorldServer world = WorldUtil.asNative(mixinWorld); final World apiWorld = WorldUtil.fromNative(world); if (ShouldFire.TICK_BLOCK_EVENT) { BlockSnapshot snapshot = mixinWorld.createSpongeBlockSnapshot(state, state, pos, BlockChangeFlags.NONE); final TickBlockEvent event = SpongeEventFactory.createTickBlockEventScheduled(Sponge.getCauseStackManager().getCurrentCause(), snapshot); SpongeImpl.postEvent(event); if (event.isCancelled()) { return; } } final LocatableBlock locatable = new SpongeLocatableBlockBuilder().world(apiWorld).position(pos.getX(), pos.getY(), pos.getZ()).state((BlockState)state).build(); final BlockTickContext phaseContext = TickPhase.Tick.BLOCK.createPhaseContext().source(locatable); final PhaseTracker phaseTracker = PhaseTracker.getInstance(); final PhaseData current = phaseTracker.getCurrentPhaseData(); final IPhaseState<?> currentState = current.state; ((IPhaseState) currentState).appendNotifierPreBlockTick(mixinWorld, pos, current.context, phaseContext); try (final PhaseContext<?> context = phaseContext; final Timing timing = BlockUtil.toMixin(state).getTimingsHandler()) { timing.startTiming(); context.buildAndSwitch(); block.updateTick(world, pos, state, random); } catch (Exception | NoClassDefFoundError e) { phaseTracker.printExceptionFromPhase(e, phaseContext); } }
Source:
<code><START> public Image getColumnImage(Object element, int columnIndex) { <END> TaskReview reviewContainer = (TaskReview) element; switch (columnIndex) { case 0: return getIncomingChangesImage(reviewContainer); case 1: return getReviewStateImage(reviewContainer.getCodeReviewScore()); case 2: return getVerifiedStateImage(reviewContainer.getVerifiedScore()); } return null; }</code><technical_language>Is a reason this is public? exposing more need especially takes argument of Object unchecked cast</technical_language>

Target:
public Image getColumnImage(Object element, int columnIndex) { TaskReview reviewContainer = (TaskReview) element; switch (columnIndex) { case DESCRIPTION_COLUMN: return getIncomingChangesImage(reviewContainer); case CODE_REVIEW_COLUMN: return getReviewStateImage(reviewContainer.getCodeReviewScore()); case VERIFIED_COLUMN: return getVerifiedStateImage(reviewContainer.getVerifiedScore()); } return null; }
Source:
<code>public void shouldRetrieveLatestModificationWhenColoringIsSetToAlways() throws Exception { setColoring(); Modification mod = git.latestModification().get(0); assertThat(mod.getUserName(), is("Chris Turner <cturner@thoughtworks.com>")); assertThat(mod.getComment(), is("Added 'run-till-file-exists' ant target")); assertThat(mod.getModifiedTime(), is(parseRFC822("Fri, 12 Feb 2010 16:12:04 -0800"))); assertThat(mod.getRevision(), is("5def073a425dfe239aabd4bf8039ffe3b0e8856b")); List<ModifiedFile> files = mod.getModifiedFiles(); assertThat(files.size(), is(1)); assertThat(files.get(0).getFileName(), is("build.xml")); assertThat(files.get(0).getAction(), Matchers.is(ModifiedAction.modified)); <START> unsetColoring(); <END> }</code><technical_language>If test fails, unsetColoring called. affect other tests</technical_language>

Target:
public void shouldRetrieveLatestModificationWhenColoringIsSetToAlways() throws Exception { setColoring(); Modification mod = git.latestModification().get(0); assertThat(mod.getUserName(), is("Chris Turner <cturner@thoughtworks.com>")); assertThat(mod.getComment(), is("Added 'run-till-file-exists' ant target")); assertThat(mod.getModifiedTime(), is(parseRFC822("Fri, 12 Feb 2010 16:12:04 -0800"))); assertThat(mod.getRevision(), is("5def073a425dfe239aabd4bf8039ffe3b0e8856b")); List<ModifiedFile> files = mod.getModifiedFiles(); assertThat(files.size(), is(1)); assertThat(files.get(0).getFileName(), is("build.xml")); assertThat(files.get(0).getAction(), Matchers.is(ModifiedAction.modified)); }
Source:
<code><START> public Map<String, String> buyCard(@RequestParam(value = "token", required = false) String token, <END> @RequestParam("gameId") String gameId) throws AuthenticationException, GameException, PlayException { UserBean user = authenticationService.authenticateUserByToken(token); return playService.processAction(GameUserActionCode.BUY_CARD, user, gameId); }</code><technical_language>I controller returns Map instead of DTO, create separate Java class for controller's response</technical_language>

Target:
public BoughtCardDetails buyCard(@RequestParam(value = "token", required = false) String token, @RequestParam("gameId") String gameId) throws AuthenticationException, GameException, PlayException { UserBean user = authenticationService.authenticateUserByToken(token); Map<String, String> returnedParams = playService.processAction(GameUserActionCode.BUY_CARD, user, gameId); String developmentCardCode = returnedParams.get("card"); return new BoughtCardDetails(developmentCardCode); }
Source:
<code>void errorSourceOnReceiveMessage() { <START> final String lockToken1 = UUID.randomUUID().toString(); <END> final OffsetDateTime expiration = OffsetDateTime.now().plus(Duration.ofMinutes(5)); final MessageWithLockToken message = mock(MessageWithLockToken.class); when(messageSerializer.deserialize(message, ServiceBusReceivedMessage.class)).thenReturn(receivedMessage); when(receivedMessage.getLockToken()).thenReturn(lockToken1); when(receivedMessage.getLockedUntil()).thenReturn(expiration); when(connection.createReceiveLink(anyString(), anyString(), any(ReceiveMode.class), any(), any(MessagingEntityType.class))).thenReturn(Mono.error(new AmqpException(false, "some receive link Error.", null))); StepVerifier.create(receiver.receiveMessages().take(1)) .verifyErrorMatches(throwable -> { Assertions.assertTrue(throwable instanceof ServiceBusAmqpException); final ServiceBusErrorSource actual = ((ServiceBusAmqpException) throwable).getErrorSource(); Assertions.assertEquals(ServiceBusErrorSource.RECEIVE, actual); return true; }); verify(amqpReceiveLink, never()).updateDisposition(eq(lockToken1), any(DeliveryState.class)); }</code><technical_language>suggestion final String lockToken = UUID.randomUUID().toString();</technical_language>

Target:
void errorSourceOnReceiveMessage() { final String lockToken = UUID.randomUUID().toString(); final OffsetDateTime expiration = OffsetDateTime.now().plus(Duration.ofMinutes(5)); final MessageWithLockToken message = mock(MessageWithLockToken.class); when(messageSerializer.deserialize(message, ServiceBusReceivedMessage.class)).thenReturn(receivedMessage); when(receivedMessage.getLockToken()).thenReturn(lockToken); when(receivedMessage.getLockedUntil()).thenReturn(expiration); when(connection.createReceiveLink(anyString(), anyString(), any(ReceiveMode.class), any(), any(MessagingEntityType.class))).thenReturn(Mono.error(new AmqpException(false, "some receive link Error.", null))); StepVerifier.create(receiver.receiveMessages().take(1)) .verifyErrorSatisfies(throwable -> { Assertions.assertTrue(throwable instanceof ServiceBusAmqpException); final ServiceBusErrorSource actual = ((ServiceBusAmqpException) throwable).getErrorSource(); Assertions.assertEquals(ServiceBusErrorSource.RECEIVE, actual); }); verify(amqpReceiveLink, never()).updateDisposition(eq(lockToken), any(DeliveryState.class)); }
Source:
<code>public void setAttributes(Node node, String tagName, final Map<String, String> attributes) { if (node instanceof Image) { node.accept(new AbstractVisitor() { @Override public void visit(CustomNode node) { if (node instanceof ImageAttributes) { ImageAttributes imageAttributes = (ImageAttributes) node; <START> Map<String, String> attributesMap = imageAttributes.getAttributes(); for (String key : attributesMap.keySet()) { attributes.put(key, attributesMap.get(key)); } <END> imageAttributes.unlink(); } } }); } }</code><technical_language>change this to: suggestion for (Map.Entry<String, String> entry : imageAttributes.getAttributes().entrySet()) { attributes.put(entry.getKey(), entry.getValue()); }</technical_language>

Target:
public void setAttributes(Node node, String tagName, final Map<String, String> attributes) { if (node instanceof Image) { node.accept(new AbstractVisitor() { @Override public void visit(CustomNode node) { if (node instanceof ImageAttributes) { ImageAttributes imageAttributes = (ImageAttributes) node; for (Map.Entry<String, String> entry : imageAttributes.getAttributes().entrySet()) { attributes.put(entry.getKey(), entry.getValue()); } imageAttributes.unlink(); } } }); } }
Source:
<code>void submitCallback(final int rc) { if (LOG.isDebugEnabled()) { LOG.debug("Submit callback (lid:{}, eid: {}). rc:{}", lh.getId(), entryId, rc); } long latencyNanos = MathUtils.elapsedNanos(requestTimeNanos); if (rc != BKException.Code.OK) { addOpLogger.registerFailedEvent(latencyNanos, TimeUnit.NANOSECONDS); LOG.error("Write of ledger entry to quorum failed: L{} E{}", lh.getId(), entryId); } else { addOpLogger.registerSuccessfulEvent(latencyNanos, TimeUnit.NANOSECONDS); } <START> if (lh instanceof LedgerHandleAdv) { <END> cb.addCompleteAdv(rc, lh, entryId, qwcLatency, ctx); } else { cb.addComplete(rc, lh, entryId, ctx); } callbackTriggered = true; maybeRecycle(); }</code><technical_language>This instanceof is unnecessary. addCompleteAdv calls addComplete default anyhow</technical_language>

Target:
void submitCallback(final int rc) { if (LOG.isDebugEnabled()) { LOG.debug("Submit callback (lid:{}, eid: {}). rc:{}", lh.getId(), entryId, rc); } long latencyNanos = MathUtils.elapsedNanos(requestTimeNanos); if (rc != BKException.Code.OK) { addOpLogger.registerFailedEvent(latencyNanos, TimeUnit.NANOSECONDS); LOG.error("Write of ledger entry to quorum failed: L{} E{}", lh.getId(), entryId); } else { addOpLogger.registerSuccessfulEvent(latencyNanos, TimeUnit.NANOSECONDS); } cb.addCompleteWithLatency(rc, lh, entryId, qwcLatency, ctx); callbackTriggered = true; maybeRecycle(); }
Source:
<code>default <U> Seq<U> scanLeft(U zero, BiFunction<? super U, ? super Tuple2<K, V>, ? extends U> operation) { Objects.requireNonNull(operation, "operation is null"); <START> return Collections.scanLeft(this, zero, operation, Stream.empty(), Stream::append, Function.identity()); <END> }</code><technical_language>Collections.scanLeft method is lazy. In case pre-calculates Stream. Please this instead: java return iterator().scanLeft(zero, operation).toStream();</technical_language>

Target:
default <U> Seq<U> scanLeft(U zero, BiFunction<? super U, ? super Tuple2<K, V>, ? extends U> operation) { Objects.requireNonNull(operation, "operation is null"); return iterator().scanLeft(zero, operation).toStream(); }
Source:
<code>protected void onActivityResult(int requestCode,int resultCode,Intent capturedData){ <START> if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) { <END> new CheckAvailableSpaceTask(getCapturedImageFile().getAbsolutePath()).execute(); } else if (requestCode == REQUEST_DOCUMENT_SCAN && resultCode == RESULT_OK) { Intent cropScannedDocumentIntent = new Intent(getApplicationContext(), CropActivity.class); cropScannedDocumentIntent.putExtra(SCANNED_DOCUMENT_IMAGE, getCapturedImageFile().getAbsolutePath()); startActivityForResult(cropScannedDocumentIntent, REQUEST_SCANNED_DOCUMENT_CROP); } else if (requestCode == REQUEST_SCANNED_DOCUMENT_CROP && resultCode == RESULT_OK) { Bundle croppedDocumentData = capturedData.getExtras(); String croppedDocumentImagePath = (String) croppedDocumentData.get(CROPPED_SCANNED_DOCUMENT_IMAGE_PATH); new CheckAvailableSpaceTask(croppedDocumentImagePath).execute(); } else if((requestCode == REQUEST_IMAGE_CAPTURE || requestCode == REQUEST_DOCUMENT_SCAN) && resultCode == RESULT_CANCELED){ if(image != null){ image.delete(); Log_OC.d(TAG,"File deleted"); } setResult(RESULT_CANCELED); finish(); } else if (resultCode == RESULT_CANCELED) { setResult(RESULT_CANCELED); finish(); } }</code><technical_language>This is properly indented, please move tab left</technical_language>

Target:
protected void onActivityResult(int requestCode,int resultCode,Intent capturedData){ if(resultCode != RESULT_CANCELED) { mFilesUploadHelper.onActivityResult(this); } else { setResult(RESULT_CANCELED); } }
Source:
<code>public void shouldReturn422ForInvalidPaymentOutcomeStatusAndCode() { HashMap<String, Object> postBody = new HashMap<>(); postBody.put("amount", 12000); postBody.put("reference", "MRPC12345"); postBody.put("description", "New passport application"); postBody.put("created_date", "2018-02-21T16:04:25Z"); postBody.put("authorised_date", "2018-02-21T16:05:33Z"); postBody.put("processor_id", "183f2j8923j8"); postBody.put("provider_id", "17498-8412u9-1273891239"); postBody.put("auth_code", "666"); postBody.put("payment_outcome", Map.of( "status", "success", "code", "P0010" ) ); postBody.put("card_type", "visa"); postBody.put("name_on_card", "Jane Doe"); postBody.put("email_address", "jane_doe@example.com"); postBody.put("card_expiry", "02/19"); postBody.put("last_four_digits", "1234"); postBody.put("first_six_digits", "123456"); postBody.put("telephone_number", "+447700900796"); String payload = toJson(postBody); connectorRestApiClient .postCreateTelephoneCharge(payload) .statusCode(422) <START> .body("message[0]", is("Must include a valid status and error code")); <END> }</code><technical_language>message actual field name applies of fields validation. hard problem original request</technical_language>

Target:
public void shouldReturn422ForInvalidPaymentOutcomeStatusAndCode() { postBody.replace("payment_outcome", Map.of( "status", "success", "code", "P0010" ) ); connectorRestApiClient .postCreateTelephoneCharge(toJson(postBody)) .statusCode(422) .body("message[0]", is("Field [payment_outcome] must include a valid status and error code")); }
Source:
<code>public void updateBlobProperty(DocumentModel doc, MimetypeRegistry mimetypeService, Property dirtyProperty) { String fieldPath = dirtyProperty.getXPath(); if (!fieldPath.contains(":")) { fieldPath = dirtyProperty.getSchema().getName() + ":" + fieldPath; } Blob blob = dirtyProperty.getValue(Blob.class); <START> if (blob != null) { <END> if (blob.getMimeType() == null || blob.getMimeType().equals(DEFAULT_MIMETYPE)) { blob = mimetypeService.updateMimetype(blob); doc.setPropertyValue(fieldPath, (Serializable) blob); } else if (!mimetypeService.isMimeTypeNormalized(blob.getMimeType())) { mimetypeService.getNormalizedMimeType(blob.getMimeType()).ifPresent(blob::setMimeType); } } }</code><technical_language>early exit gain indentation: if (blob == null) { return; }</technical_language>

Target:
public void updateBlobProperty(DocumentModel doc, MimetypeRegistry mimetypeService, Property dirtyProperty) { String fieldPath = dirtyProperty.getXPath(); if (!fieldPath.contains(":")) { fieldPath = dirtyProperty.getSchema().getName() + ":" + fieldPath; } Blob blob = dirtyProperty.getValue(Blob.class); if (blob == null) { return; } if (blob.getMimeType() == null || blob.getMimeType().equals(DEFAULT_MIMETYPE)) { blob = mimetypeService.updateMimetype(blob); doc.setPropertyValue(fieldPath, (Serializable) blob); } else if (!mimetypeService.isMimeTypeNormalized(blob.getMimeType())) { mimetypeService.getNormalizedMimeType(blob.getMimeType()).ifPresent(blob::setMimeType); } }
Source:
<code>public void sendOffsetsToTransaction(Map<TopicPartition, OffsetAndMetadata> offsets, String consumerGroupId) throws ProducerFencedException { <START> if (!cachedGroupMetadata.groupId().equals(consumerGroupId)) { <END> log.warn("Cached consumer groupId changed from to {}. If the old group id is not empty, this indicates an abuse of this API", cachedGroupMetadata.groupId(), consumerGroupId); cachedGroupMetadata = new ConsumerGroupMetadata(consumerGroupId, JoinGroupRequest.UNKNOWN_GENERATION_ID, JoinGroupRequest.UNKNOWN_MEMBER_ID, Optional.empty()); } sendOffsetsToTransactionInternal(offsets, cachedGroupMetadata, false); }</code><technical_language>Hmm, this feels premature optimization. offsets map is more a problem. Also, restrict usage. is today send offsets for multiple groups. Is a good reason restrict this if sense in streams</technical_language>

Target:
public void sendOffsetsToTransaction(Map<TopicPartition, OffsetAndMetadata> offsets, String consumerGroupId) throws ProducerFencedException { sendOffsetsToTransaction(offsets, new ConsumerGroupMetadata(consumerGroupId)); }
Source:
<code>public String toString() { <START> return getClass() + "{evenType='" + getType() + "', serviceName='" + serviceName + "'}"; <END> }</code><technical_language>change getClass() getClass().getSimpleName</technical_language>

Target:
public String toString() { return getClass().getSimpleName() + "{eventType='" + getType() + "', serviceName=" + serviceName + "'}"; }
Source:
<code>public void start() { <START> Frontend.getInstance().runAction(ActionType.TransferDiskImage, <END> null, result -> { if (result.getReturnValue().getSucceeded()) { Frontend.getInstance().runQuery(QueryType.GetImageTransferById, new IdQueryParameters(this.diskImageId), new AsyncQuery<QueryReturnValue>(returnValue -> { ImageTransfer imageTransfer = returnValue.getReturnValue(); initiateDownload(imageTransfer); })); } }, this); }</code><technical_language>this call removed. simply remove line 51-54 62-63</technical_language>

Target:
public void start() { Frontend.getInstance().runQuery(QueryType.GetImageTransferById, new IdQueryParameters(transferId), new AsyncQuery<QueryReturnValue>(returnValue -> { ImageTransfer imageTransfer = returnValue.getReturnValue(); initiateDownload(imageTransfer); })); }
Source:
<code>private void callExportService(DataTransferExportModel dataTransferExportModel) { try { dataTransferServices.call((RemoteCallback<String>) path -> { <START> view.exportOK(); <END> view.download(path); }, (ErrorCallback<Exception>) (message, throwable) -> { view.exportError(throwable); return false; }).doExport(dataTransferExportModel); } catch (Exception e) { view.exportError(e); } }</code><technical_language>this call noticeable time? If so, consider BusyIndicator well</technical_language>

Target:
private void callExportService(DataTransferExportModel dataTransferExportModel) { busyIndicatorView.showBusyIndicator(i18n.preparingExportDownload()); try { dataTransferServices.call((RemoteCallback<String>) path -> { busyIndicatorView.hideBusyIndicator(); view.exportOK(); view.download(path); }, (ErrorCallback<Exception>) (message, throwable) -> { busyIndicatorView.hideBusyIndicator(); view.exportError(throwable); return false; }).doExport(dataTransferExportModel); } catch (Exception e) { view.exportError(e); } }
Source:
<code>public MoveOrCopyImageGroupParameters(Guid containerId, Guid imageGroupId, Guid imageId, Guid destImageGroupId, Guid destImageId, Guid storageDomainId, ImageOperation operation) { <START> this(containerId, imageGroupId, imageId, storageDomainId, operation); <END> setEntityId(destImageId); setDestImageGroupId(destImageGroupId); setDestinationImageId(destImageId); }</code><technical_language>I suppose intention overwrite entityId, set imageId constructor? Code illogical</technical_language>

Target:
public MoveOrCopyImageGroupParameters(Guid containerId, Guid imageGroupId, Guid imageId, Guid destImageGroupId, Guid destImageId, Guid storageDomainId, ImageOperation operation) { this(containerId, imageGroupId, imageId, storageDomainId, operation); setDestImageGroupId(destImageGroupId); setDestinationImageId(destImageId); }
Source:
<code>public void testWriteHeaderTwice() { final File fakeVCFFile = VariantBaseTest.createTempFile("testBasicWriteAndRead.", ".vcf"); final SAMSequenceDictionary sequenceDict = createArtificialSequenceDictionary(); final VCFHeader header = createFakeHeader(metaData, additionalColumns, sequenceDict); final VariantContextWriter writer1 = new VariantContextWriterBuilder() .setOutputFile(fakeVCFFile) .setReferenceDictionary(sequenceDict) .build(); writer1.writeHeader(header); writer1.writeHeader(header); <START> writer1.close(); <END> }</code><technical_language>try block</technical_language>

Target:
public void testWriteHeaderTwice() { final File fakeVCFFile = VariantBaseTest.createTempFile("testBasicWriteAndRead.", ".vcf"); fakeVCFFile.deleteOnExit(); final SAMSequenceDictionary sequenceDict = createArtificialSequenceDictionary(); final VCFHeader header = createFakeHeader(metaData, additionalColumns, sequenceDict); try (final VariantContextWriter writer1 = new VariantContextWriterBuilder() .setOutputFile(fakeVCFFile) .setReferenceDictionary(sequenceDict) .build()) { writer1.writeHeader(header); writer1.writeHeader(header); } }
Source:
<code>public boolean extractQuestionDetails( Map<String, String[]> requestParameters, FeedbackQuestionType questionType) { String numOfRubricChoicesString = HttpRequestHelper.getValueFromParamMap(requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_NUM_COLS); String numOfRubricSubQuestionsString = HttpRequestHelper.getValueFromParamMap(requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_NUM_ROWS); <START> String hasAssignedWeightsString = HttpRequestHelper.getValueFromParamMap(requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_WEIGHTS_ASSIGNED); <END> if (numOfRubricChoicesString == null || numOfRubricSubQuestionsString == null) { return false; } boolean hasAssignedWeights = "on".equals(hasAssignedWeightsString); int numOfRubricChoices = Integer.parseInt(numOfRubricChoicesString); int numOfRubricSubQuestions = Integer.parseInt(numOfRubricSubQuestionsString); List<Double> rubricWeights = getRubricWeights(requestParameters, numOfRubricChoices, hasAssignedWeights); List<String> rubricChoices = getRubricChoices(requestParameters, numOfRubricChoices); List<String> rubricSubQuestions = getSubQuestions(requestParameters, numOfRubricSubQuestions); List<List<String>> rubricDescriptions = getRubricQuestionDescriptions(requestParameters, numOfRubricChoices, numOfRubricSubQuestions); setRubricQuestionDetails(hasAssignedWeights, rubricWeights, rubricChoices, rubricSubQuestions, rubricDescriptions); if (!this.isValidDescriptionSize()) { this.initializeRubricDescriptions(); } return true; }</code><technical_language>This line, a other lines long. wrap</technical_language>

Target:
public boolean extractQuestionDetails( Map<String, String[]> requestParameters, FeedbackQuestionType questionType) { String numOfRubricChoicesString = HttpRequestHelper.getValueFromParamMap(requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_NUM_COLS); String numOfRubricSubQuestionsString = HttpRequestHelper.getValueFromParamMap(requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_NUM_ROWS); if (numOfRubricChoicesString == null || numOfRubricSubQuestionsString == null) { return false; } String hasAssignedWeightsString = HttpRequestHelper.getValueFromParamMap(requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_WEIGHTS_ASSIGNED); boolean hasAssignedWeights = "on".equals(hasAssignedWeightsString); int numOfRubricChoices = Integer.parseInt(numOfRubricChoicesString); int numOfRubricSubQuestions = Integer.parseInt(numOfRubricSubQuestionsString); List<Double> rubricWeights = getRubricWeights(requestParameters, numOfRubricChoices, hasAssignedWeights); List<String> rubricChoices = getRubricChoices(requestParameters, numOfRubricChoices); List<String> rubricSubQuestions = getSubQuestions(requestParameters, numOfRubricSubQuestions); List<List<String>> rubricDescriptions = getRubricQuestionDescriptions(requestParameters, numOfRubricChoices, numOfRubricSubQuestions); setRubricQuestionDetails(hasAssignedWeights, rubricWeights, rubricChoices, rubricSubQuestions, rubricDescriptions); if (!this.isValidDescriptionSize()) { this.initializeRubricDescriptions(); } return true; }
Source:
<code>public void testTableSinkWithMissingValueField() { Schema inputSchema = Schema.recordOf( "purchase", Schema.Field.of("rowKey", Schema.of(Schema.Type.STRING)), Schema.Field.of("userid", Schema.of(Schema.Type.STRING)) ); KVTableSink.KVTableConfig kvTableConfig = new KVTableSink.KVTableConfig("purchases", "rowKey", "user"); KVTableSink kvTableSink = new KVTableSink(kvTableConfig); MockPipelineConfigurer mockPipelineConfigurer = new MockPipelineConfigurer(inputSchema, <START> ImmutableMap.<String, Object>of( <END> CoreValidator.ID, new CoreValidator())); kvTableSink.configurePipeline(mockPipelineConfigurer); }</code><technical_language>I imagine KVTable tests require a validator. remove if needed</technical_language>

Target:
public void testTableSinkWithMissingValueField() { Schema inputSchema = Schema.recordOf( "purchase", Schema.Field.of("rowKey", Schema.of(Schema.Type.STRING)), Schema.Field.of("userid", Schema.of(Schema.Type.STRING)) ); KVTableSink.KVTableConfig kvTableConfig = new KVTableSink.KVTableConfig("purchases", "rowKey", "user"); KVTableSink kvTableSink = new KVTableSink(kvTableConfig); MockPipelineConfigurer mockPipelineConfigurer = new MockPipelineConfigurer(inputSchema); kvTableSink.configurePipeline(mockPipelineConfigurer); }
Source:
<code>protected void performSelection() { super.performSelection(); EditPart sourceEditPart = getSourceEditPart(); <START> if (sourceEditPart instanceof SiriusNoteEditPart) { <END> SiriusNoteEditPart siriusNoteEditPart = (SiriusNoteEditPart) sourceEditPart; EditPartViewer viewer = siriusNoteEditPart.getViewer(); Iterable<DescriptionCompartmentEditPart> descriptionCompartmentEditPartsfilter = Iterables.filter(sourceEditPart.getChildren(), DescriptionCompartmentEditPart.class); if (Iterables.size(descriptionCompartmentEditPartsfilter) == 1) { DescriptionCompartmentEditPart descriptionCompartmentEditPart = Iterables.getOnlyElement(descriptionCompartmentEditPartsfilter); if (getCurrentInput().isModKeyDown(SWT.MOD1) && viewer.getSelectedEditParts().contains(descriptionCompartmentEditPart)) { viewer.deselect(descriptionCompartmentEditPart); } else if (descriptionCompartmentEditPart.isSelectable()) { viewer.appendSelection(descriptionCompartmentEditPart); } } } }</code><technical_language>I in code SnapToAllDragEditPartsTracker is SiriusTextEditPart. check if direct-edit bug present for them, if fixed a slightly more genral version of this code</technical_language>

Target:
protected void performSelection() { super.performSelection(); EditPart sourceEditPart = getSourceEditPart(); if (sourceEditPart instanceof SiriusNoteEditPart || sourceEditPart instanceof SiriusTextEditPart) { AbstractEditPart siriusNoteEditPart = (AbstractEditPart) sourceEditPart; EditPartViewer viewer = siriusNoteEditPart.getViewer(); Iterable<DescriptionCompartmentEditPart> descriptionCompartmentEditPartsfilter = Iterables.filter(sourceEditPart.getChildren(), DescriptionCompartmentEditPart.class); if (Iterables.size(descriptionCompartmentEditPartsfilter) == 1) { DescriptionCompartmentEditPart descriptionCompartmentEditPart = Iterables.getOnlyElement(descriptionCompartmentEditPartsfilter); if (getCurrentInput().isModKeyDown(SWT.MOD1) && viewer.getSelectedEditParts().contains(descriptionCompartmentEditPart)) { viewer.deselect(descriptionCompartmentEditPart); } else if (descriptionCompartmentEditPart.isSelectable()) { viewer.appendSelection(descriptionCompartmentEditPart); } } } }
Source:
<code>public Observable<Void> shutdown(Throwable cause) { <START> return delegateRegistry.shutdown(cause); <END> }</code><technical_language>shutdown for batchingRegistryAlso</technical_language>

Target:
public Observable<Void> shutdown(Throwable cause) { remoteBatchingRegistry.shutdown(); return delegateRegistry.shutdown(cause); }
Source:
<code>public TimeWindowOperator(final String queryId, final String operatorId, final int windowSize, final int emitPeriod) { super(queryId, operatorId); this.windowSize = windowSize; this.emitPeriod = emitPeriod; this.windowQueue = new LinkedBlockingQueue<>(); firstTimestamp = Long.MIN_VALUE; windowCreationTime = 0L; if (emitPeriod <= windowSize) { windowEmissionTime = emitPeriod; } else { <START> windowEmissionTime = windowSize; <END> } }</code><technical_language>windowEmissionTime = emitPeriod</technical_language>

Target:
public TimeWindowOperator(final String queryId, final String operatorId, final int windowSize, final int emitPeriod) { super(queryId, operatorId); this.windowSize = windowSize; this.emitPeriod = emitPeriod; this.windowQueue = new LinkedList<>(); this.firstTimestamp = Long.MIN_VALUE; this.windowCreationTime = Long.MIN_VALUE; }
Source:
<code>public Response add(Disk disk) { validateEnums(Disk.class, disk); if (disk.isSetId()) { return attachDiskToVm(disk); }else { validateParameters(disk, "format", "interface"); <START> if (!disk.isSetLunStorage()) { END> validateParameters(disk, "provisionedSize|size"); } return performCreation(addAction, getAddParameters(map(disk), disk), getEntityIdResolver(disk.getName())); } }</code><technical_language>this check in BackendDisksResource.add()</technical_language>

Target:
public Response add(Disk disk) { validateEnums(Disk.class, disk); if (disk.isSetId()) { return attachDiskToVm(disk); }else { validateParameters(disk, "format", "interface"); if (!disk.isSetLunStorage() || disk.getLunStorage().getLogicalUnits().isEmpty()) { validateParameters(disk, "provisionedSize|size"); } return performCreation(addAction, getAddParameters(map(disk), disk), getEntityIdResolver(disk.getName())); } }
Source:
<code>public void queryIntentActivities_DisabledComponentExplicitIntent() throws Exception { Intent i = new Intent(); i.setClassName(RuntimeEnvironment.application, "org.robolectric.shadows.TestActivity"); ComponentName componentToDisable = new ComponentName(RuntimeEnvironment.application, "org.robolectric.shadows.TestActivity"); packageManager.setComponentEnabledSetting(componentToDisable, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); List<ResolveInfo> resolveInfos = packageManager.queryIntentActivities(i, 0); assertThat(resolveInfos).isNotNull(); <START> assertThat(resolveInfos).hasSize(0); <END> }</code><technical_language>isEmpty() - covers null case too</technical_language>

Target:
public void queryIntentActivities_DisabledComponentExplicitIntent() throws Exception { Intent i = new Intent(); i.setClassName(RuntimeEnvironment.application, "org.robolectric.shadows.TestActivity"); ComponentName componentToDisable = new ComponentName(RuntimeEnvironment.application, "org.robolectric.shadows.TestActivity"); packageManager.setComponentEnabledSetting( componentToDisable, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); List<ResolveInfo> resolveInfos = packageManager.queryIntentActivities(i, 0); assertThat(resolveInfos).isEmpty(); }
Source:
<code><START> public void onSucceeded(Guid cmdId, List<Guid> childCmdIds) { <END> super.onSucceeded(cmdId, childCmdIds); }</code><technical_language>override this method if adding functionality is empty default? I recommend call CommandCoordinatorUtil.removeAllCommandsInHierarchy(cmdId) prevent CoCo futher polling</technical_language>

Target:
public void onSucceeded(Guid cmdId, List<Guid> childCmdIds) { super.onSucceeded(cmdId, childCmdIds); CommandCoordinatorUtil.removeAllCommandsInHierarchy(cmdId); }
Source:
<code>public DocumentModelList run(DocumentModelList docs) { return docs.stream().map(doc -> { <START> return run(doc); <END> }).collect(Collectors.toCollection(DocumentModelListImpl::new)); }</code><technical_language>map(doc -> run(doc))</technical_language>

Target:
public DocumentModelList run(DocumentModelList docs) { return docs.stream().map(doc -> run(doc)).collect(Collectors.toCollection(DocumentModelListImpl::new)); }
Source:
<code>private void replicateFragmentInternal(final LedgerHandle lh, final LedgerFragment lf, final AsyncCallback.VoidCallback ledgerFragmentMcb, final Set<BookieSocketAddress> newBookies) throws InterruptedException { if (!lf.isClosed()) { LOG.error("Trying to replicate an unclosed fragment;" + " This is not safe {}", lf); ledgerFragmentMcb.processResult(BKException.Code.UnclosedFragmentException, null, null); return; } Long startEntryId = lf.getFirstStoredEntryId(); Long endEntryId = lf.getLastStoredEntryId(); if (endEntryId == null) { LOG.warn("Dead bookie (" + lf.getAddresses() + ") is still part of the current" + " active ensemble for ledgerId: " + lh.getId()); ledgerFragmentMcb.processResult(BKException.Code.OK, null, null); return; } <START> if (startEntryId > endEntryId || endEntryId <= -1L) { <END> ledgerFragmentMcb.processResult(BKException.Code.OK, null, null); return; } List<Long> entriesToReplicate = new LinkedList<Long>(); long lastStoredEntryId = lf.getLastStoredEntryId(); for (long i = lf.getFirstStoredEntryId(); i <= lastStoredEntryId; i++) { entriesToReplicate.add(i); } MultiCallback ledgerFragmentEntryMcb = new MultiCallback( entriesToReplicate.size(), ledgerFragmentMcb, null, BKException.Code.OK, BKException.Code.LedgerRecoveryException); for (final Long entryId : entriesToReplicate) { recoverLedgerFragmentEntry(entryId, lh, ledgerFragmentEntryMcb, newBookies); } }</code><technical_language>INVALID_ENTRY_ID -1</technical_language>

Target:
private void replicateFragmentInternal(final LedgerHandle lh, final LedgerFragment lf, final AsyncCallback.VoidCallback ledgerFragmentMcb, final Set<BookieSocketAddress> newBookies) throws InterruptedException { if (!lf.isClosed()) { LOG.error("Trying to replicate an unclosed fragment;" + " This is not safe {}", lf); ledgerFragmentMcb.processResult(BKException.Code.UnclosedFragmentException, null, null); return; } Long startEntryId = lf.getFirstStoredEntryId(); Long endEntryId = lf.getLastStoredEntryId(); if (endEntryId == null) { LOG.warn("Dead bookie (" + lf.getAddresses() + ") is still part of the current" + " active ensemble for ledgerId: " + lh.getId()); ledgerFragmentMcb.processResult(BKException.Code.OK, null, null); return; } if (startEntryId > endEntryId || endEntryId <= INVALID_ENTRY_ID) { ledgerFragmentMcb.processResult(BKException.Code.OK, null, null); return; } List<Long> entriesToReplicate = new LinkedList<Long>(); long lastStoredEntryId = lf.getLastStoredEntryId(); for (long i = lf.getFirstStoredEntryId(); i <= lastStoredEntryId; i++) { entriesToReplicate.add(i); } MultiCallback ledgerFragmentEntryMcb = new MultiCallback( entriesToReplicate.size(), ledgerFragmentMcb, null, BKException.Code.OK, BKException.Code.LedgerRecoveryException); for (final Long entryId : entriesToReplicate) { recoverLedgerFragmentEntry(entryId, lh, ledgerFragmentEntryMcb, newBookies); } }
Source:
<code>public void onBackPressed() { if (depth != 0) { webView.goBack(); <START> depth--; <END> } else { super.onBackPressed(); } }</code><technical_language>Android 8 (emulated), this work. pressing contributors, press twice. press, webview load main page (does nothing). If actual url ("file:///android_asset/" + webViewData.toString()) instead of about:blank history parameter of loadDataWithBaseURL, remove depth variable (I is elegant solution)</technical_language>

Target:
public void onBackPressed() { if (webView.canGoBack()) { webView.goBack(); } else { super.onBackPressed(); } }
Source:
<code>protected Boolean executeDistCp(String serviceName, Map<String, FileStatus> fileListingMap, Path targetPath) throws Exception { Configuration conf = currentCluster.getHadoopConf(); conf.set(ConduitConstants.AUDIT_ENABLED_KEY, System.getProperty(ConduitConstants.AUDIT_ENABLED_KEY)); conf.set("mapred.job.name", serviceName); conf.set("tmpjars", auditUtilJarDestPath.toString()); DistCpOptions options = new DistCpOptions(new Path("/tmp"), targetPath); options.setOutPutDirectory(tmpCounterOutputPath); DistCp distCp = new ConduitDistCp(conf, options, fileListingMap); try { <START> long jobStartTime = System.nanoTime(); <END> distCp.execute(); long jobExecutionTimeInSecs = (System.nanoTime() - jobStartTime)/(NANO_SECONDS_IN_SECOND); updateJobTimeCounter(jobExecutionTimeInSecs); } catch (Exception e) { LOG.error("Exception encountered ", e); throw e; } return true; }</code><technical_language>put counters in execute method point job is submitted</technical_language>

Target:
protected Boolean executeDistCp(String serviceName, Map<String, FileStatus> fileListingMap, Path targetPath) throws Exception { Configuration conf = currentCluster.getHadoopConf(); conf.set(ConduitConstants.AUDIT_ENABLED_KEY, System.getProperty(ConduitConstants.AUDIT_ENABLED_KEY)); conf.set("mapred.job.name", serviceName); conf.set("tmpjars", auditUtilJarDestPath.toString()); DistCpOptions options = new DistCpOptions(new Path("/tmp"), targetPath); options.setOutPutDirectory(tmpCounterOutputPath); DistCp distCp = new ConduitDistCp(conf, options, fileListingMap); try { distCp.execute(); long jobExecutionTimeInSecs = (distCp.getJobTimeInNanos())/(NANO_SECONDS_IN_SECOND); updateJobTimeCounter(jobExecutionTimeInSecs); } catch (Exception e) { LOG.error("Exception encountered ", e); throw e; } return true; }
Source:
<code>public void resourceFound(SpiderResourceFound resourceFound) { if (resourceFound == null <START> || resourceFound.getUri() == null <END> || resourceFound.getMethod() == null) { return; } log.debug("New " + resourceFound.getMethod() + "resource found: " + resourceFound.getUri()); URI uriV = createURI(resourceFound.getUri()); if (uriV == null) { return; } String resourceIdentifier = ""; try { resourceIdentifier = buildCanonicalResourceIdentifier(uriV, resourceFound); } catch (URIException e) { return; } synchronized (visitedResources) { if (visitedResources.contains(resourceIdentifier)) { return; } else { visitedResources.add(resourceIdentifier); } } for (FetchFilter f : fetchFilters) { FetchStatus s = f.checkFilter(uriV); if (s != FetchStatus.VALID) { log.debug("URI: " + uriV + " was filtered by a filter with reason: " + s); spider.notifyListenersFoundURI( resourceFound.getUri(), resourceFound.getMethod(), s); return; } } if (resourceFound.isShouldIgnore()) { log.debug( "URI: " + uriV + " is valid, but will not be fetched, by parser recommendation."); spider.notifyListenersFoundURI( resourceFound.getUri(), resourceFound.getMethod(), FetchStatus.VALID); return; } spider.notifyListenersFoundURI( resourceFound.getUri(), resourceFound.getMethod(), FetchStatus.VALID); SpiderTask task = new SpiderTask(spider, resourceFound, uriV); spider.submitTask(task); }</code><technical_language>do validations resource is created, used</technical_language>

Target:
public void resourceFound(SpiderResourceFound resourceFound) { log.debug("New resource found: {}", resourceFound.getMethod(), resourceFound.getUri()); URI uriV = createURI(resourceFound.getUri()); if (uriV == null) { return; } String resourceIdentifier = ""; try { resourceIdentifier = buildCanonicalResourceIdentifier(uriV, resourceFound); } catch (URIException e) { return; } synchronized (visitedResources) { if (visitedResources.contains(resourceIdentifier)) { log.debug("Resource already visited: {}", resourceIdentifier.trim()); return; } else { visitedResources.add(resourceIdentifier); } } for (FetchFilter f : fetchFilters) { FetchStatus s = f.checkFilter(uriV); if (s != FetchStatus.VALID) { log.debug("URI: " + uriV + " was filtered by a filter with reason: " + s); spider.notifyListenersFoundURI( resourceFound.getUri(), resourceFound.getMethod(), s); return; } } if (resourceFound.isShouldIgnore()) { log.debug( "URI: " + uriV + " is valid, but will not be fetched, by parser recommendation."); spider.notifyListenersFoundURI( resourceFound.getUri(), resourceFound.getMethod(), FetchStatus.VALID); return; } spider.notifyListenersFoundURI( resourceFound.getUri(), resourceFound.getMethod(), FetchStatus.VALID); SpiderTask task = new SpiderTask(spider, resourceFound, uriV); spider.submitTask(task); }
Source:
<code>public static JobDetail bindByPoolAndQuantities(Consumer consumer, PoolIdAndQuantity... poolQuantities) { JobDataMap map = new JobDataMap(); map.put(JobStatus.OWNER_ID, consumer.getOwner().getKey()); <START> map.put("pool_and_quanities", poolQuantities); <END> map.put(JobStatus.TARGET_TYPE, JobStatus.TargetType.CONSUMER); map.put(JobStatus.TARGET_ID, consumer.getUuid()); JobDetail detail = newJob(EntitlerJob.class) .withIdentity("bind_by_pool_" + Util.generateUUID()) .requestRecovery(false) .storeDurably() .usingJobData(map) .build(); return detail; }</code><technical_language>quantities is misspelled</technical_language>

Target:
public static JobDetail bindByPoolAndQuantities(Consumer consumer, PoolIdAndQuantity... poolQuantities) { JobDataMap map = new JobDataMap(); map.put(JobStatus.OWNER_ID, consumer.getOwner().getKey()); map.put("pool_and_quantities", poolQuantities); map.put(JobStatus.TARGET_TYPE, JobStatus.TargetType.CONSUMER); map.put(JobStatus.TARGET_ID, consumer.getUuid()); JobDetail detail = newJob(EntitlerJob.class) .withIdentity("bind_by_pool_" + Util.generateUUID()) .requestRecovery(false) .storeDurably() .usingJobData(map) .build(); return detail; }