auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static <X, Y> Key<X, Y> create(ViewMetamodel metamodel, Class<X> sourceEntityViewClass, Class<Y> targetEntityViewClass, String constructorName, ConvertOption... convertOptions) { boolean ignoreMissingAttributes = false; boolean markNew = false; for (ConvertOption copyOption : convertOptions) { switch (copyOption) { case CREATE_NEW: markNew = true; break; case IGNORE_MISSING_ATTRIBUTES: <START> ignoreMissingAttributes = true; break; default: <END> break; } } return create(metamodel, sourceEntityViewClass, targetEntityViewClass, constructorName, ignoreMissingAttributes, markNew); }</code><technical_language>Please revert this change. prefer handle this in create method receives object</technical_language>

Target:
public static <X, Y> Key<X, Y> create(ViewMetamodel metamodel, Class<X> sourceEntityViewClass, Class<Y> targetEntityViewClass, String constructorName, ConvertOption... convertOptions) { return createWithConvertOptions(metamodel, sourceEntityViewClass, targetEntityViewClass, constructorName, false, convertOptions); }
Source:
<code>private void subscribeDataChange(String path, NotificationContext.Type callbackType) { if (callbackType == NotificationContext.Type.INIT || callbackType == NotificationContext.Type.CALLBACK) { if (logger.isDebugEnabled()) { logger.debug(_manager.getInstanceName() + " subscribe data-change. path: " + path + ", listener: " + _listener); } <START> _zkClient.subscribeDataChanges(path, this, callbackType != Type.INIT); <END> } else if (callbackType == NotificationContext.Type.FINALIZE) { logger.info(_manager.getInstanceName() + " unsubscribe data-change. path: " + path + ", listener: " + _listener); _zkClient.unsubscribeDataChanges(path, this); } }</code><technical_language>here, checking result</technical_language>

Target:
private void subscribeDataChange(String path, NotificationContext.Type callbackType) { if (callbackType == NotificationContext.Type.INIT || callbackType == NotificationContext.Type.CALLBACK) { if (logger.isDebugEnabled()) { logger.debug(_manager.getInstanceName() + " subscribe data-change. path: " + path + ", listener: " + _listener); } boolean subStatus = _zkClient.subscribeDataChanges(path, this, callbackType != Type.INIT); logger.debug("CallbackHandler subscribe data path result {}", this, path, subStatus); if (!subStatus) { logger.info("CallbackHandler subscribe data path failed!", this, path); } } else if (callbackType == NotificationContext.Type.FINALIZE) { logger.info(_manager.getInstanceName() + " unsubscribe data-change. path: " + path + ", listener: " + _listener); _zkClient.unsubscribeDataChanges(path, this); } }
Source:
<code>public String toString() { return "RestStoreConfiguration [connectionPool=" + connectionPool + ", key2StringMapper=" + key2StringMapper + ", metadataHelper=" + metadataHelper + ", host=" + host + ", port=" + port + ", path=" + path <START> + ", appendCacheNameToPath=" + appendCacheNameToPath + ", rawValues=" + rawValues + ", toString()=" <END> + super.toString() + "]"; }</code><technical_language>Do want toString()= in</technical_language>

Target:
public String toString() { return "RestStoreConfiguration [connectionPool=" + connectionPool + ", key2StringMapper=" + key2StringMapper + ", metadataHelper=" + metadataHelper + ", host=" + host + ", port=" + port + ", path=" + path + ", appendCacheNameToPath=" + appendCacheNameToPath + ", rawValues=" + rawValues + ", " + super.toString() + "]"; }
Source:
<code>private void onRemove() { if (getWindow() != null) { return; } <START> ConfirmationModel model = (ConfirmationModel) getWindow(); <END> if (model.getProgress() != null) { return; } model.startProgress(); AsyncDataProvider.getInstance().getDataCentersByStorageDomain(new AsyncQuery<>(storagePools -> { if (storagePools != null && !storagePools.isEmpty()) { StoragePool storagePool = storagePools.get(0); List<ActionParametersBase> vmTemplateImportExportParams = getSelectedItems() .stream() .map(item -> new VmTemplateImportExportParameters(item.getId(), getEntity().getId(), storagePool.getId())) .collect(Collectors.toList()); Frontend.getInstance().runMultipleAction( ActionType.RemoveUnregisteredVmTemplate, vmTemplateImportExportParams, result -> { ConfirmationModel localModel = (ConfirmationModel) result.getState(); localModel.stopProgress(); cancel(); }, model); } }), getEntity().getId()); }</code><technical_language>I understand work, missing something. this line getWindow() return NULL (otherwise "return" line 65 executed). code crash NPE line getProgress() invocation</technical_language>

Target:
private void onRemove() { ConfirmationModel model = (ConfirmationModel) getWindow(); if (model.getProgress() != null) { return; } model.startProgress(); AsyncDataProvider.getInstance().getDataCentersByStorageDomain(new AsyncQuery<>(storagePools -> { if (storagePools != null && !storagePools.isEmpty()) { StoragePool storagePool = storagePools.get(0); List<ActionParametersBase> vmTemplateImportExportParams = getSelectedItems() .stream() .map(item -> new VmTemplateImportExportParameters(item.getId(), getEntity().getId(), storagePool.getId())) .collect(Collectors.toList()); Frontend.getInstance().runMultipleAction( ActionType.RemoveUnregisteredVmTemplate, vmTemplateImportExportParams, result -> { ConfirmationModel localModel = (ConfirmationModel) result.getState(); localModel.stopProgress(); cancel(); }, model); } }), getEntity().getId()); }
Source:
<code>void launchServices(OperationContext context, String activeMQServerName, String acceptorName, ModelNode model) throws OperationFailedException { String httpConnectorName = HTTPAcceptorDefinition.HTTP_LISTENER.resolveModelAttribute(context, model).asString(); HTTPUpgradeService.installService(context, activeMQServerName, acceptorName, httpConnectorName); boolean upgradeLegacy = HTTPAcceptorDefinition.UPGRADE_LEGACY.resolveModelAttribute(context, model).asBoolean(); if (upgradeLegacy) { <START> HTTPUpgradeService.LegacyHttpUpgradeService.installService(context, <END> activeMQServerName, acceptorName, httpConnectorName); } }</code><technical_language>context.getServiceTarget() replaced context.getCapabilityServiceTarget()</technical_language>

Target:
void launchServices(OperationContext context, String activeMQServerName, String acceptorName, ModelNode model) throws OperationFailedException { String httpConnectorName = HTTPAcceptorDefinition.HTTP_LISTENER.resolveModelAttribute(context, model).asString(); HTTPUpgradeService.installService(context.getCapabilityServiceTarget(), activeMQServerName, acceptorName, httpConnectorName); boolean upgradeLegacy = HTTPAcceptorDefinition.UPGRADE_LEGACY.resolveModelAttribute(context, model).asBoolean(); if (upgradeLegacy) { HTTPUpgradeService.LegacyHttpUpgradeService.installService(context, activeMQServerName, acceptorName, httpConnectorName); } }
Source:
<code>public EquivalenceUpdater<Channel> channelUpdater() { <START> MultipleSourceChannelEquivalenceUpdater updaters = MultipleSourceChannelEquivalenceUpdater.create(); <END> register(Publisher.BT_TV_CHANNELS, updaters); register(Publisher.BT_TV_CHANNELS_TEST1, updaters); register(Publisher.BT_TV_CHANNELS_TEST2, updaters); register(Publisher.BT_TV_CHANNELS_REFERENCE, updaters); return updaters; }</code><technical_language>call this 'updaters' some places 'updater' ( register method ). consistent</technical_language>

Target:
public EquivalenceUpdater<Channel> channelUpdater() { MultipleSourceChannelEquivalenceUpdater updaters = MultipleSourceChannelEquivalenceUpdater.create(); registerPublisherUpdaters( updaters, Publisher.BT_TV_CHANNELS, Publisher.BT_TV_CHANNELS_TEST1, Publisher.BT_TV_CHANNELS_TEST2, Publisher.BT_TV_CHANNELS_REFERENCE ); return updaters; }
Source:
<code>private Response cloneVmFromSnapshot(VmStatic staticVm, VM vm, String snapshotId, HashMap<Guid, DiskImage> images) { Guid sourceSnapshotId = asGuid(snapshotId); AddVmFromSnapshotParameters params = new AddVmFromSnapshotParameters(staticVm, sourceSnapshotId); params.setDiskInfoDestinationMap(images); params.setMakeCreatorExplicitOwner(shouldMakeCreatorExplicitOwner()); if (vm.isSetConsoleDeviceEnabled()) { params.setConsoleEnabled(vm.isConsoleDeviceEnabled()); <START> } <END> return performCreate(VdcActionType.AddVmFromSnapshot, params, new QueryIdResolver<Guid>(VdcQueryType.GetVmByVmId, IdQueryParameters.class)); }</code><technical_language>'else', if set user, vmConfiguration mentioned in line 135 (i in vmstatic, figure vm.template i guess)</technical_language>

Target:
private Response cloneVmFromSnapshot(VmStatic staticVm, VM vm, String snapshotId, HashMap<Guid, DiskImage> images) { Guid sourceSnapshotId = asGuid(snapshotId); AddVmFromSnapshotParameters params = new AddVmFromSnapshotParameters(staticVm, sourceSnapshotId); params.setDiskInfoDestinationMap(images); params.setMakeCreatorExplicitOwner(shouldMakeCreatorExplicitOwner()); params.setConsoleEnabled(vm.isSetConsole() && vm.getConsole().isSetEnabled() ? vm.getConsole().isEnabled() : !getConsoleDevicesForEntity(staticVm.getId()).isEmpty()); return performCreate(VdcActionType.AddVmFromSnapshot, params, new QueryIdResolver<Guid>(VdcQueryType.GetVmByVmId, IdQueryParameters.class)); }
Source:
<code>public static void main(String[] args) { if(args.length!=4&&args.length!=5){ System.out.println("Usage1: ...ChunkerTrain traindata modeldir modelname round"); <START> System.out.println("Usage2: ...ChunkerTrain traindata modeldir modelname max_round dev_ratio"); <END> } ChunkerTrain trainer = new ChunkerTrain(Integer.parseInt(args[3])); if(args.length==4) { trainer.trainModels(args[0]); } else if(args.length==5){ trainer.trainModels(args[0], args[1],args[2],Double.parseDouble(args[4])); } trainer.writeModelsToDisk(args[1],args[2]); }</code><technical_language>add a System.exit(-1) usage output</technical_language>

Target:
public static void main(String[] args) { if(args.length!=4&&args.length!=5){ System.out.println("Usage1: ...ChunkerTrain traindata modeldir modelname round"); System.out.println("Usage2: ...ChunkerTrain traindata modeldir modelname max_round dev_ratio"); System.exit(-1); } ChunkerTrain trainer = new ChunkerTrain(Integer.parseInt(args[3])); if(args.length==4) { trainer.trainModels(args[0]); } else if(args.length==5){ trainer.trainModels(args[0], args[1],args[2],Double.parseDouble(args[4])); } trainer.writeModelsToDisk(args[1],args[2]); }
Source:
<code>public void retryTask(@PathVariable Long activityId) { <START> TaskActivity activity = activityService.getTaskActivityById(activityId); <END> taskTriggerHandler.handleTask(taskService.getTask(activity.getTask()), activity.getParameters()); }</code><technical_language>move this logic task trigger handler transaction there</technical_language>

Target:
public void retryTask(@PathVariable Long activityId) { Thread retryThread = new Thread(new Runnable() { @Override public void run() { taskTriggerHandler.retryTask(activityId); } }); retryThread.start(); }
Source:
<code>public void testPRGatherCancellation() throws Throwable { final VM server1 = VM.getVM(0); final VM server2 = VM.getVM(1); final VM client = VM.getVM(2); final int numObjects = 200; final VM controller = VM.getController(); try { final int[] port = AvailablePortHelper.getRandomAvailableTCPPorts(2); startCacheServer(server1, port[0], false, -1, true); startCacheServer(server2, port[1], true, -1, true); startClient(client, port[0]); populateData(server2); server1.invoke("create latch test Hook", () -> { DefaultQuery.testHook = getPauseHook(true, controller); }); AsyncInvocation queryExecution1 = executeQueryOnClient(client); Thread.sleep(1000); setHeapToCriticalAndReleaseLatch(server1); <START> assertThat(queryExecution1.get(60, SECONDS)).isEqualTo(0); <END> verifyDroppedObjectsAndSetHeapToNormal(server1); client.invoke("Executing query when system is 'Normal'", () -> { try { Query query = getCache().getQueryService().newQuery("Select * From /" + "portfolios"); SelectResults results = (SelectResults) query.execute(); assertThat(results.size()).isEqualTo(numObjects); } catch (QueryInvocationTargetException | FunctionDomainException | TypeMismatchException | NameResolutionException e) { fail(""); } }); setHeapToCriticalAndReleaseLatch(server1); AsyncInvocation queryExecution = executeQueryOnClient(client); assertThat(queryExecution.get(60, SECONDS)).isEqualTo(0); verifyDroppedObjectsAndSetHeapToNormal(server1); } finally { stopServer(server1); stopServer(server2); } }</code><technical_language>I recommend changing 60 seconds to: queryExecution1.get(GeodeAwaitility.getTimeout().getValueInMS(), MILLISECONDS)</technical_language>

Target:
public void testPRGatherCancellation() throws Throwable { final VM server1 = VM.getVM(0); final VM server2 = VM.getVM(1); final VM client = VM.getVM(2); final int numObjects = 200; final VM controller = VM.getController(); try { final int[] port = AvailablePortHelper.getRandomAvailableTCPPorts(2); startCacheServer(server1, port[0], false, -1, true); startCacheServer(server2, port[1], true, -1, true); startClient(client, port[0]); populateData(server2); server1.invoke("create latch test Hook", () -> { DefaultQuery.testHook = getPauseHook(true, controller); }); AsyncInvocation queryExecution1 = executeQueryOnClient(client); Thread.sleep(1000); setHeapToCriticalAndReleaseLatch(server1); await().untilAsserted(() -> assertThat(queryExecution1.get()).isEqualTo(0)); verifyDroppedObjectsAndSetHeapToNormal(server1); client.invoke("Executing query when system is 'Normal'", () -> { Query query = getCache().getQueryService().newQuery("Select * From /" + "portfolios"); SelectResults results = (SelectResults) query.execute(); assertThat(results.size()).isEqualTo(numObjects); }); setHeapToCriticalAndReleaseLatch(server1); AsyncInvocation queryExecution = executeQueryOnClient(client); await().untilAsserted(() -> assertThat(queryExecution.get()).isEqualTo(0)); verifyDroppedObjectsAndSetHeapToNormal(server1); } finally { stopServer(server1); stopServer(server2); } }
Source:
<code>private boolean sleep() { try { long sleepTime; if (retry == 1 && lastException != null && lastException instanceof ResourceNotFoundException) { sleepTime = WAIT_ON_FIRST_RESOURCE_NOT_FOUND_MILLIS; } else { sleepTime = WAIT_MILLIS_IN_RETRIES[retry]; } Thread.sleep(sleepTime); return true; } catch (InterruptedException e) { <START> logger.error("Interrupted while writing data!"); <END> return false; } }</code><technical_language>argue this DEBUG instead of ERROR</technical_language>

Target:
private boolean sleep() { try { long sleepTime; if (retry == 1 && lastException != null && lastException instanceof ResourceNotFoundException) { sleepTime = WAIT_ON_FIRST_RESOURCE_NOT_FOUND_MILLIS; } else { sleepTime = WAIT_MILLIS_IN_RETRIES[retry]; } Thread.sleep(sleepTime); return true; } catch (InterruptedException e) { logger.debug("Interrupted while writing data!"); return false; } }
Source:
<code>public void execute() { String feedbackSessionName = getNonNullRequestParamValue(ParamsNames.SUBMISSION_FEEDBACK); String courseId = getNonNullRequestParamValue(ParamsNames.SUBMISSION_COURSE); String[] usersToRemind = getNonNullRequestParamValues(ParamsNames.SUBMISSION_REMIND_USERLIST); <START> String[] googleIdOfInstructorToNotify = getNonNullRequestParamValues(ParamsNames.USER_ID); <END> try { FeedbackSessionAttributes session = logic.getFeedbackSession(feedbackSessionName, courseId); List<StudentAttributes> studentsToRemindList = new ArrayList<>(); List<InstructorAttributes> instructorsToRemindList = new ArrayList<>(); InstructorAttributes instructorToNotify = logic.getInstructorForGoogleId(courseId, googleIdOfInstructorToNotify[0]); for (String userEmail : usersToRemind) { StudentAttributes student = logic.getStudentForEmail(courseId, userEmail); if (student != null) { studentsToRemindList.add(student); } InstructorAttributes instructor = logic.getInstructorForEmail(courseId, userEmail); if (instructor != null) { instructorsToRemindList.add(instructor); } } List<EmailWrapper> emails = new EmailGenerator().generateFeedbackSessionReminderEmails( session, studentsToRemindList, instructorsToRemindList, instructorToNotify); taskQueuer.scheduleEmailsForSending(emails); } catch (Exception e) { log.severe("Unexpected error while sending emails: " + TeammatesException.toStringWithStackTrace(e)); } }</code><technical_language>this need a String[] (i.e. array)</technical_language>

Target:
public void execute() { String feedbackSessionName = getNonNullRequestParamValue(ParamsNames.SUBMISSION_FEEDBACK); String courseId = getNonNullRequestParamValue(ParamsNames.SUBMISSION_COURSE); String[] usersToRemind = getNonNullRequestParamValues(ParamsNames.SUBMISSION_REMIND_USERLIST); String googleIdOfInstructorToNotify = getNonNullRequestParamValue(ParamsNames.USER_ID); try { FeedbackSessionAttributes session = logic.getFeedbackSession(feedbackSessionName, courseId); List<StudentAttributes> studentsToRemindList = new ArrayList<>(); List<InstructorAttributes> instructorsToRemindList = new ArrayList<>(); InstructorAttributes instructorToNotify = logic.getInstructorForGoogleId(courseId, googleIdOfInstructorToNotify); for (String userEmail : usersToRemind) { StudentAttributes student = logic.getStudentForEmail(courseId, userEmail); if (student != null) { studentsToRemindList.add(student); } InstructorAttributes instructor = logic.getInstructorForEmail(courseId, userEmail); if (instructor != null) { instructorsToRemindList.add(instructor); } } List<EmailWrapper> emails = new EmailGenerator().generateFeedbackSessionReminderEmails( session, studentsToRemindList, instructorsToRemindList, instructorToNotify); taskQueuer.scheduleEmailsForSending(emails); } catch (Exception e) { log.severe("Unexpected error while sending emails: " + TeammatesException.toStringWithStackTrace(e)); } }
Source:
<code>public void createTable(TableReference tableRef, byte[] tableMetadata) { maybeLog(() -> delegate.createTable(tableRef, tableMetadata), <START> (logger, stopwatch) -> logTimeAndTable(logger, "createTable", tableRef, stopwatch)); <END> }</code><technical_language>push this helper methods return function build in of methods, increase readability</technical_language>

Target:
public void createTable(TableReference tableRef, byte[] tableMetadata) { maybeLog(() -> delegate.createTable(tableRef, tableMetadata), logTimeAndTable("createTable", tableRef)); }
Source:
<code>public Date getCreated() { <START> return created != null ? new Date(created.getTime()) : null; <END> }</code><technical_language>I return created property wihtout extra logic</technical_language>

Target:
public Date getCreated() { return created; }
Source:
<code>public void onAvailabilityChecked(OnAvailabilityChecked event) { if (mRequestedEmail == null || !mRequestedEmail.equalsIgnoreCase(event.value)) { return; } if (isInProgress()) { endProgress(); } if (event.isError()) { AppLog.e(T.API, "OnAvailabilityChecked has error: " + event.error.type + " - " + event.error.message); ActivityUtils.hideKeyboardForced(mEmailInput); <START> showEmailError(R.string.error_generic_network); <END> return; } switch (event.type) { case EMAIL: if (event.isAvailable) { ActivityUtils.hideKeyboardForced(mEmailInput); showEmailError(R.string.email_not_registered_wpcom); } else if (mLoginListener != null) { ActivityUtils.hideKeyboardForced(mEmailInput); mLoginListener.gotWpcomEmail(event.value); } break; default: AppLog.e(T.API, "OnAvailabilityChecked unhandled event type: " + event.error.type); break; } }</code><technical_language>showErrorDialog for this case? Showing message WPLoginInputRow showEmailError confusing for a network error</technical_language>

Target:
public void onAvailabilityChecked(OnAvailabilityChecked event) { if (mRequestedEmail == null || !mRequestedEmail.equalsIgnoreCase(event.value)) { return; } if (isInProgress()) { endProgress(); } if (event.isError()) { AppLog.e(T.API, "OnAvailabilityChecked has error: " + event.error.type + " - " + event.error.message); ActivityUtils.hideKeyboardForced(mEmailInput); if (event.error.type == AccountStore.IsAvailableErrorType.INVALID) { showEmailError(R.string.email_invalid); } else { showErrorDialog(getString(R.string.error_generic_network)); } return; } switch (event.type) { case EMAIL: if (event.isAvailable) { ActivityUtils.hideKeyboardForced(mEmailInput); showEmailError(R.string.email_not_registered_wpcom); } else if (mLoginListener != null) { ActivityUtils.hideKeyboardForced(mEmailInput); mLoginListener.gotWpcomEmail(event.value); } break; default: AppLog.e(T.API, "OnAvailabilityChecked unhandled event type: " + event.error.type); break; } }
Source:
<code>public void release(Object lockOwner) { Objects.requireNonNull(lockOwner, "Lock Owner should be non-null"); if (trace) { log.tracef("Release lock for %s.", lockOwner); } <START> LockPlaceHolder wantToRelease = lockOwners.get(lockOwner); <END> if (wantToRelease == null) { if (trace) { log.tracef("%s not found!", lockOwner); } return; } final boolean released = wantToRelease.setReleased(); if (trace) { log.tracef("Release lock for %s? %s", wantToRelease, released); } LockPlaceHolder currentLocked = current; if (currentLocked == wantToRelease) { if (!casRelease(currentLocked)) { if (trace) { log.tracef("Releasing lock for %s. It is the current lock owner but another thread changed it.", lockOwner); } } else { tryAcquire(); } } }</code><technical_language>I check lockOwner param current.lockOwner ignore release/throw exception if match. Also, a bid odd InfinispanLock is semi-reentrant: acquire a lock multiple times for owner, release once. I if eliminate reentrancy completely, remove lockOwners map altogether</technical_language>

Target:
public void release(Object lockOwner) { Objects.requireNonNull(lockOwner, "Lock Owner should be non-null"); if (trace) { log.tracef("Release lock for %s.", lockOwner); } LockPlaceHolder wantToRelease = lockOwners.get(lockOwner); if (wantToRelease == null) { if (trace) { log.tracef("%s not found!", lockOwner); } return; } final boolean released = wantToRelease.setReleased(); if (trace) { log.tracef("Release lock for %s? %s", wantToRelease, released); } LockPlaceHolder currentLocked = current; if (currentLocked == wantToRelease) { tryAcquire(wantToRelease); } }
Source:
<code>public static Set<org.drools.workbench.models.datamodel.oracle.Annotation> getClassAnnotations( Class<?> clazz ) { if ( clazz == null ) { <START> return null; <END> } return getAnnotations( clazz.getAnnotations(), false ); }</code><technical_language>want return empty set, inserting a null [here](<LINK_0></technical_language>

Target:
public static Set<org.drools.workbench.models.datamodel.oracle.Annotation> getClassAnnotations( Class<?> clazz ) { if ( clazz == null ) { return Collections.EMPTY_SET; } return getAnnotations( clazz.getAnnotations(), false ); }
Source:
<code>public void setUp() throws Exception { <START> streamNames.addAll(Arrays.asList("T1", "T2")); <END> }</code><technical_language>streams created T1 T3, added T1 T2. is right</technical_language>

Target:
public void setUp() throws Exception { streamNames.addAll(Arrays.asList("T1", "T3")); }
Source:
<code>private Response doGetAgent(String artifact, String version) throws IOException { if (!artifact.endsWith("org.eclipse.che.ws-agent")) { return Response.status(Response.Status.NOT_FOUND).build(); } String content = format("{ \"name\" : \"%s\", \"version\" : \"%s\"}", artifact, version); <START> java.nio.file.Path file = Paths.get(System.getProperty("java.io.tmpdir"), "config.tmp"); <END> copy(new ByteArrayInputStream(content.getBytes()), file, StandardCopyOption.REPLACE_EXISTING); return Response.ok(file.toFile(), MediaType.APPLICATION_OCTET_STREAM) .header("Content-Length", String.valueOf(Files.size(file))) .header("Content-Disposition", "attachment; filename=" + file.getFileName().toString()) .build(); }</code><technical_language>remove</technical_language>

Target:
private Response doGetAgent(String artifact, String version) throws IOException { if (!artifact.endsWith("org.eclipse.che.ws-agent")) { return Response.status(Response.Status.NOT_FOUND).build(); } String content = format("{ \"name\" : \"%s\", \"version\" : \"%s\"}", artifact, version); java.nio.file.Path file = Paths.get(System.getProperty("java.io.tmpdir"), "config.tmp"); file.toFile().deleteOnExit(); copy(new ByteArrayInputStream(content.getBytes()), file, StandardCopyOption.REPLACE_EXISTING); return Response.ok(file.toFile(), MediaType.APPLICATION_OCTET_STREAM) .header("Content-Length", String.valueOf(Files.size(file))) .header("Content-Disposition", "attachment; filename=" + file.getFileName().toString()) .build(); }
Source:
<code>protected boolean mergeImpl() throws IOException { DirCache dc = getRepository().lockDirCache(); try { builder = dc.builder(); DirCacheBuildIterator buildIt = new DirCacheBuildIterator(builder); tw = new NameConflictTreeWalk(db); tw.reset(); tw.addTree(mergeBase()); tw.addTree(sourceTrees[0]); tw.addTree(sourceTrees[1]); tw.addTree(buildIt); <START> tw.addTree(new FileTreeIterator(getRepository().getWorkTree(), <END> getRepository().getFS())); while (tw.next()) { if (!processEntry( tw.getTree(T_BASE, CanonicalTreeParser.class), tw.getTree(T_OURS, CanonicalTreeParser.class), tw.getTree(T_THEIRS, CanonicalTreeParser.class), tw.getTree(T_INDEX, DirCacheBuildIterator.class), tw.getTree(T_FILE, WorkingTreeIterator.class))) { cleanUp(); return false; } if (tw.isSubtree() && enterSubtree) tw.enterSubtree(); } if (!builder.commit()) { cleanUp(); throw new IndexWriteException(); } builder = null; checkout(); if (getUnmergedPathes().isEmpty()) { resultTree = dc.writeTree(oi); return true; } else { resultTree = null; return false; } } finally { dc.unlock(); } }</code><technical_language>This customizable caller. more interestingly, love this in Gerrit Code Review, implement recursive variant for multiple merge bases. require *do not* a working tree merge, lockDirCache() instead create a new in-core DirCache</technical_language>

Target:
protected boolean mergeImpl() throws IOException { boolean implicitDirCache = false; if (dircache == null) { dircache = getRepository().lockDirCache(); implicitDirCache = true; } try { builder = dircache.builder(); DirCacheBuildIterator buildIt = new DirCacheBuildIterator(builder); tw = new NameConflictTreeWalk(db); tw.reset(); tw.addTree(mergeBase()); tw.addTree(sourceTrees[0]); tw.addTree(sourceTrees[1]); tw.addTree(buildIt); if (workingTreeIt != null) tw.addTree(workingTreeIt); while (tw.next()) { if (!processEntry( tw.getTree(T_BASE, CanonicalTreeParser.class), tw.getTree(T_OURS, CanonicalTreeParser.class), tw.getTree(T_THEIRS, CanonicalTreeParser.class), tw.getTree(T_INDEX, DirCacheBuildIterator.class), (workingTreeIt == null) ? null : tw.getTree(T_FILE, WorkingTreeIterator.class))) { cleanUp(); return false; } if (tw.isSubtree() && enterSubtree) tw.enterSubtree(); } if (!builder.commit()) { cleanUp(); throw new IndexWriteException(); } builder = null; checkout(); if (getUnmergedPathes().isEmpty()) { resultTree = dircache.writeTree(oi); return true; } else { resultTree = null; return false; } } finally { if (implicitDirCache) dircache.unlock(); } }
Source:
<code>public String update(Request request, Response response) { String fromCookie = request.cookie(COOKIE_NAME); final Long userId = currentUserId(request); if (!Objects.equals(pipelineSelectionsService.load(fromCookie, userId).etag(), getIfMatch(request))) { response.status(PRECONDITION_FAILED); <START> return "Update failed because client filter data is out-of-date"; <END> } Filters filters; try { filters = Filters.fromJson(request.body()); } catch (FilterValidationException | JsonParseException e) { response.status(BAD_REQUEST); return e.getMessage(); } Long recordId = pipelineSelectionsService.save(fromCookie, userId, filters); if (!apiAuthenticationHelper.securityEnabled()) { response.cookie("/go", COOKIE_NAME, String.valueOf(recordId), ONE_YEAR, systemEnvironment.isSessionCookieSecure(), true); } response.status(OK); return format("{ \"contentHash\": \"%s\" }", pipelineSelectionsService.load(fromCookie, userId).etag()); }</code><technical_language>HaltApiResponses.haltBecauseEtagDoesNotMatch</technical_language>

Target:
public String update(Request request, Response response) { String fromCookie = request.cookie(COOKIE_NAME); final Long userId = currentUserId(request); if (!Objects.equals(pipelineSelectionsService.load(fromCookie, userId).etag(), getIfMatch(request))) { throw HaltApiResponses.haltBecauseEtagDoesNotMatch(DATA_IS_OUT_OF_DATE); } Filters filters; try { filters = Filters.fromJson(request.body()); } catch (FilterValidationException | JsonParseException e) { throw HaltApiResponses.haltBecauseOfReason(e.getMessage()); } Long recordId = pipelineSelectionsService.save(fromCookie, userId, filters); if (!apiAuthenticationHelper.securityEnabled()) { response.cookie("/go", COOKIE_NAME, String.valueOf(recordId), ONE_YEAR, systemEnvironment.isSessionCookieSecure(), true); } response.status(OK); return format("{ \"contentHash\": \"%s\" }", pipelineSelectionsService.load(fromCookie, userId).etag()); }
Source:
<code><START> public static boolean containsKey(String key) { <END> return props.containsKey(key); }</code><technical_language>Do need static</technical_language>

Target:
public boolean containsKey(String key) { return props.containsKey(key); }
Source:
<code>private void lsRefsV2() throws IOException { LsRefsV2Request.Builder builder = LsRefsV2Request.builder(); List<String> prefixes = new ArrayList<>(); String line = pckIn.readString(); END if not. if (line == PacketLineIn.DELIM) { while ((line = pckIn.readString()) != PacketLineIn.END) { if (line.equals("peel")) { builder.setPeel(true); } else if (line.equals("symrefs")) { builder.setSymrefs(true); } else if (line.startsWith("ref-prefix ")) { prefixes.add(line.substring("ref-prefix ".length())); } else { throw new PackProtocolException(MessageFormat .format(JGitText.get().unexpectedPacketLine, line)); } } } else if (line != PacketLineIn.END) { throw new PackProtocolException(MessageFormat .format(JGitText.get().unexpectedPacketLine, line)); } LsRefsV2Request req = builder.setRefPrefixes(prefixes).build(); protocolV2Hook.onLsRefs(req); rawOut.stopBuffering(); PacketLineOutRefAdvertiser adv = new PacketLineOutRefAdvertiser(pckOut); adv.setUseProtocolV2(true); if (req.getPeel()) { adv.setDerefTags(true); } <START> try { <END> advertiseRefsHook.advertiseRefs(this); } catch (ServiceMayNotContinueException fail) { if (fail.getMessage() != null) { adv.writeOne("ERR " + fail.getMessage()); fail.setOutput(); } throw fail; } Map<String, Ref> refsToSend; if (req.getRefPrefixes().isEmpty()) { refsToSend = getAdvertisedOrDefaultRefs(); } else { refsToSend = new HashMap<>(); for (String refPrefix : req.getRefPrefixes()) { for (Ref ref : db.getRefDatabase().getRefsByPrefix(refPrefix)) { refsToSend.put(ref.getName(), ref); } } } if (req.getSymrefs()) { findSymrefs(adv, refsToSend); } adv.send(refsToSend); adv.end(); }</code><technical_language>Accidental squash</technical_language>

Target:
private void lsRefsV2() throws IOException { LsRefsV2Request.Builder builder = LsRefsV2Request.builder(); List<String> prefixes = new ArrayList<>(); String line = pckIn.readString(); END if not. if (line == PacketLineIn.DELIM) { while ((line = pckIn.readString()) != PacketLineIn.END) { if (line.equals("peel")) { builder.setPeel(true); } else if (line.equals("symrefs")) { builder.setSymrefs(true); } else if (line.startsWith("ref-prefix ")) { prefixes.add(line.substring("ref-prefix ".length())); } else { throw new PackProtocolException(MessageFormat .format(JGitText.get().unexpectedPacketLine, line)); } } } else if (line != PacketLineIn.END) { throw new PackProtocolException(MessageFormat .format(JGitText.get().unexpectedPacketLine, line)); } LsRefsV2Request req = builder.setRefPrefixes(prefixes).build(); protocolV2Hook.onLsRefs(req); rawOut.stopBuffering(); PacketLineOutRefAdvertiser adv = new PacketLineOutRefAdvertiser(pckOut); adv.setUseProtocolV2(true); if (req.getPeel()) { adv.setDerefTags(true); } Map<String, Ref> refsToSend; if (req.getRefPrefixes().isEmpty()) { refsToSend = getAdvertisedOrDefaultRefs(); } else { refsToSend = new HashMap<>(); for (String refPrefix : req.getRefPrefixes()) { for (Ref ref : db.getRefDatabase().getRefsByPrefix(refPrefix)) { refsToSend.put(ref.getName(), ref); } } } if (req.getSymrefs()) { findSymrefs(adv, refsToSend); } adv.send(refsToSend); adv.end(); }
Source:
<code><START> public static <T extends EventUiBinder> T get(final EventType eventType) { <END> return (T) uiBinderMap.get(eventType); }</code><technical_language>of reflexion BaseLoadingListFragment.java</technical_language>

Target:
public static <T extends EventLayout> T get(final EventType eventType) { return (T) uiBinderMap.get(eventType); }
Source:
<code>public static boolean setExternalUserId(final CallbackContext callback, JSONArray data) { try { String authHashToken = null; <START> if (data.length() > 0) { <END> authHashToken = data.getString(1); } OneSignal.setExternalUserId(data.getString(0), authHashToken, new OneSignal.OSExternalUserIdUpdateCompletionHandler() { @Override public void onComplete(JSONObject results) { CallbackHelper.callbackSuccess(callback, results); } }); return true; } catch (JSONException e) { e.printStackTrace(); } return false; }</code><technical_language>data.length() > 1, 2nd param</technical_language>

Target:
public static boolean setExternalUserId(final CallbackContext callback, JSONArray data) { try { String authHashToken = null; if (data.length() > 1) authHashToken = data.getString(1); OneSignal.setExternalUserId(data.getString(0), authHashToken, new OneSignal.OSExternalUserIdUpdateCompletionHandler() { @Override public void onComplete(JSONObject results) { CallbackHelper.callbackSuccess(callback, results); } }); return true; } catch (JSONException e) { e.printStackTrace(); } return false; }
Source:
<code>public static String readLine(final InputStream is) throws IOException { <START> return readLine(is,100); <END> }</code><technical_language>space ,</technical_language>

Target:
public static String readLine(final InputStream is) throws IOException { return readLine(is, DEFAULT_BUFFER_SIZE); }
Source:
<code>public AuthorizationStrategy newInstance(StaplerRequest req, JSONObject formData) throws FormException { GlobalMatrixAuthorizationStrategy gmas = create(); Map<String,Object> data = formData.getJSONObject("data"); for(Map.Entry<String,Object> r : data.entrySet()) { String sid = r.getKey(); if (!(r.getValue() instanceof JSONObject)) { throw new FormException("not an object: " + formData, "data"); } Map<String,Object> value = (JSONObject) r.getValue(); for (Map.Entry<String,Object> e : value.entrySet()) { if (!(e.getValue() instanceof Boolean)) { throw new FormException("not an boolean: " + formData, "data"); } if ((Boolean) e.getValue()) { Permission p = Permission.fromId(e.getKey()); if (p == null) { throw new IllegalArgumentException("Unknown permission:\"" + e.getKey() + "\" set to \"" + e.getValue() +"\" for sid \"" + sid + "\""); <START> } <END> gmas.add(p,sid); } } } return gmas; }</code><technical_language>This is wrong. simply skip nonexistent permission; is a normal condition, for example disable a plugin previously using. condition logged FINE</technical_language>

Target:
public AuthorizationStrategy newInstance(StaplerRequest req, JSONObject formData) throws FormException { GlobalMatrixAuthorizationStrategy gmas = create(); Map<String,Object> data = formData.getJSONObject("data"); for(Map.Entry<String,Object> r : data.entrySet()) { String sid = r.getKey(); if (!(r.getValue() instanceof JSONObject)) { throw new FormException("not an object: " + formData, "data"); } Map<String,Object> value = (JSONObject) r.getValue(); for (Map.Entry<String,Object> e : value.entrySet()) { if (!(e.getValue() instanceof Boolean)) { throw new FormException("not an boolean: " + formData, "data"); } if ((Boolean) e.getValue()) { Permission p = Permission.fromId(e.getKey()); if (p == null) { LOGGER.log(Level.FINE, "Silently skip unknown permission \"{0}\" for sid:\"{1}\"", new Object[]{e.getKey(), sid}); } else { gmas.add(p, sid); } } } } return gmas; }
Source:
<code>public static int setBytes(byte[] bytes, int index, byte[] values, int offset, int length) { requireNonNull(bytes, "bytes is null"); requireNonNull(values, "values is null"); checkPositionIndex(index, length, bytes.length); <START> checkPositionIndex(offset, length, values.length); <END> unsafe.copyMemory(values, (long) offset + ARRAY_BYTE_BASE_OFFSET, bytes, (long) index + ARRAY_BYTE_BASE_OFFSET, length); return index + length; }</code><technical_language>nit: name parameters byte[] destination, int destOffset, byte[] source, int sourceOffest, int length name source destination is inspired arraycopy in Java memcpy in C</technical_language>

Target:
public static int setBytes(byte[] bytes, int index, byte[] values, int offset, int length) { requireNonNull(bytes, "bytes is null"); requireNonNull(values, "values is null"); checkValidRange(index, length, bytes.length); checkValidRange(offset, length, values.length); unsafe.copyMemory(values, (long) offset + ARRAY_BYTE_BASE_OFFSET, bytes, (long) index + ARRAY_BYTE_BASE_OFFSET, length); return index + length; }
Source:
<code>public void handle(ChannelHandlerContext ctx, FullHttpRequest request) { Tracker.getInstance().track(request); if ( !mediaTypeChecker.isAcceptValid(request.headers()) ) { DefaultHandler.sendResponse(ctx, request, String.format("Unsupported media type for Content-Type: %s", request.headers().get(HttpHeaders.Names.CONTENT_TYPE)), HttpResponseStatus.UNSUPPORTED_MEDIA_TYPE ); <START> return; <END> } final Timer.Context httpMetricNameTokensHandlerTimerContext = HttpMetricNameTokensHandlerTimer.time(); final String tenantId = request.headers().get("tenantId"); HttpRequestWithDecodedQueryParams requestWithParams = (HttpRequestWithDecodedQueryParams) request; List<String> query = requestWithParams.getQueryParams().get("query"); if (query == null || query.size() != 1) { sendResponse(ctx, request, "Invalid Query String", HttpResponseStatus.BAD_REQUEST); return; } if (discoveryHandle == null) { sendResponse(ctx, request, null, HttpResponseStatus.NOT_FOUND); return; } try { List<MetricToken> metricTokens = discoveryHandle.getMetricTokens(tenantId, query.get(0)); sendResponse(ctx, request, getSerializedJSON(metricTokens), HttpResponseStatus.OK); } catch (Exception e) { log.error(String.format("Exception occurred while trying to get metrics index for %s", tenantId), e); sendResponse(ctx, request, "Error getting metrics index", HttpResponseStatus.INTERNAL_SERVER_ERROR); } finally { httpMetricNameTokensHandlerTimerContext.stop(); } }</code><technical_language>call httpMetricNameTokensHandlerTimerContext.stop() line 78 get executed. Additionally, other, existing returns in method problem</technical_language>

Target:
public void handle(ChannelHandlerContext ctx, FullHttpRequest request) { Tracker.getInstance().track(request); final Timer.Context httpMetricNameTokensHandlerTimerContext = HttpMetricNameTokensHandlerTimer.time(); final String tenantId = request.headers().get("tenantId"); HttpRequestWithDecodedQueryParams requestWithParams = (HttpRequestWithDecodedQueryParams) request; List<String> query = requestWithParams.getQueryParams().get("query"); if (query == null || query.size() != 1) { sendResponse(ctx, request, "Invalid Query String", HttpResponseStatus.BAD_REQUEST); return; } if (discoveryHandle == null) { sendResponse(ctx, request, null, HttpResponseStatus.NOT_FOUND); return; } try { List<MetricToken> metricTokens = discoveryHandle.getMetricTokens(tenantId, query.get(0)); sendResponse(ctx, request, getSerializedJSON(metricTokens), HttpResponseStatus.OK); } catch (Exception e) { log.error(String.format("Exception occurred while trying to get metrics index for %s", tenantId), e); sendResponse(ctx, request, "Error getting metrics index", HttpResponseStatus.INTERNAL_SERVER_ERROR); } finally { httpMetricNameTokensHandlerTimerContext.stop(); } }
Source:
<code>public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SearchSuggestion that = (SearchSuggestion) o; <START> return com.google.common.base.Objects.equal(context, that.context) && <END> com.google.common.base.Objects.equal(label, that.label) && com.google.common.base.Objects.equal(provider, that.provider); }</code><technical_language>is need google guava here, java 8 Objects.equals()</technical_language>

Target:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SearchSuggestion that = (SearchSuggestion) o; return Objects.equals(context, that.context) && Objects.equals(label, that.label) && Objects.equals(provider, that.provider); }
Source:
<code>public static List<String> getStringAsSentences(String text) { <START> Pattern splitTextPattern = Pattern.compile("(?<=[\\.!;\\?])(?<![Mm][Rr]\\.|[Mm][Rr][Ss]\\.|[Dd][Rr]\\.|[Mm][Ss]\\.|[Ss][Tt]\\.|[Jj][Rr]\\.|[Cc][Oo]\\.|[Ii][Nn][Cc]\\.|[Ll][Tt][Dd]\\.)\\s+"); <END> return Arrays.asList(splitTextPattern.split(text)); }</code><technical_language>Please group mr, ms,</technical_language>

Target:
public static List<String> getStringAsSentences(String text) { Pattern splitTextPattern = Pattern.compile("(?<=[\\.!;\\?])(?<![Mm](([Rr]|[Rr][Ss])|[Ss])\\.|[Dd][Rr]\\.|[Ss][Tt]\\.|[Jj][Rr]\\.|[Cc][Oo]\\.|[Ii][Nn][Cc]\\.|[Ll][Tt][Dd]\\.)\\s+"); return Arrays.asList(splitTextPattern.split(text)); }
Source:
<code>public String getName() { return <START> fName.get(0); <END> }</code><technical_language>exception</technical_language>

Target:
public String getName() { return fName.isEmpty() ? "" : fName.get(0); }
Source:
<code>private static BugzillaFixture getDefaultFixture(List<BugzillaFixture> fixtureList) { if (fixtureList != null && fixtureList.size() > 0) { for (BugzillaFixture fixture : fixtureList) { <START> Map<String, String> property = fixture.getProperties(); <END> if (property != null) { if (property.containsKey("default")) { if ("1".equals(property.get("default"))) { return fixture; } } } } } return BUGS_4_2; }</code><technical_language>invoke getProperty() instead of duplicating code</technical_language>

Target:
private static BugzillaFixture getDefaultFixture(List<BugzillaFixture> fixtureList) { if (fixtureList != null && fixtureList.size() > 0) { for (BugzillaFixture fixture : fixtureList) { Map<String, String> property = fixture.getProperties(); if (property != null) { String defaultProperty = property.get("default"); if (defaultProperty != null && "1".equals(defaultProperty)) { return fixture; } } } } return BUGS_4_2; }
Source:
<code>public static BoundedContext systemOf(BoundedContext context) { <START> DefaultSystemGateway gateway = (DefaultSystemGateway) context.getSystemGateway(); <END> return gateway.target(); }</code><technical_language>This type cast suspicious. explain it</technical_language>

Target:
public static BoundedContext systemOf(BoundedContext context) { SystemGateway systemGateway = context.getSystemGateway(); assertThat(systemGateway, instanceOf(DefaultSystemGateway.class)); DefaultSystemGateway gateway = (DefaultSystemGateway) systemGateway; return gateway.target(); }
Source:
<code>public void testWriteSkew() { Cache<String, Integer> c1 = cache(0); Cache<String, Integer> c2 = cache(1); c1.put(COUNTER_KEY, 0); assert c1.get(COUNTER_KEY) == 0 : "Initial value is different from zero in cache 1" ; assert c2.get(COUNTER_KEY) == 0 : "Initial value is different from zero in cache 2" ; ConcurrentSkipListSet<Integer> uniqueValuesIncremented = new ConcurrentSkipListSet<Integer>(); IncrementCounterThread ict1 = new IncrementCounterThread("thread-node-1", c1, uniqueValuesIncremented); IncrementCounterThread ict2 = new IncrementCounterThread("thread-node-2", c2, uniqueValuesIncremented); try { ict1.start(); ict2.start(); ict1.join(); ict2.join(); } catch (InterruptedException e) { assert false : "Interrupted exception while running the test" ; } assert c1.get(COUNTER_KEY) >= COUNTER_MAX_VALUE : "Final value is less than " + COUNTER_MAX_VALUE + " in cache 1" ; assert c2.get(COUNTER_KEY) >= COUNTER_MAX_VALUE : "Final value is less than " + COUNTER_MAX_VALUE + <START> " in cache 1" ; <END> assert ict1.result : ict1.getName() + " has putted a duplicated value"; assert ict2.result : ict2.getName() + " has putted a duplicated value"; }</code><technical_language>" ... in cache 2"</technical_language>

Target:
public void testWriteSkew() { Cache<String, Integer> c1 = cache(0); Cache<String, Integer> c2 = cache(1); c1.put(COUNTER_KEY, 0); assert c1.get(COUNTER_KEY) == 0 : "Initial value is different from zero in cache 1" ; assert c2.get(COUNTER_KEY) == 0 : "Initial value is different from zero in cache 2" ; ConcurrentSkipListSet<Integer> uniqueValuesIncremented = new ConcurrentSkipListSet<Integer>(); IncrementCounterThread ict1 = new IncrementCounterThread("thread-node-1", c1, uniqueValuesIncremented); IncrementCounterThread ict2 = new IncrementCounterThread("thread-node-2", c2, uniqueValuesIncremented); try { ict1.start(); ict2.start(); ict1.join(); ict2.join(); } catch (InterruptedException e) { assert false : "Interrupted exception while running the test" ; } assert c1.get(COUNTER_KEY) >= COUNTER_MAX_VALUE : "Final value is less than " + COUNTER_MAX_VALUE + " in cache 1" ; assert c2.get(COUNTER_KEY) >= COUNTER_MAX_VALUE : "Final value is less than " + COUNTER_MAX_VALUE + " in cache 2" ; assert ict1.result : ict1.getName() + " has put a duplicated value"; assert ict2.result : ict2.getName() + " has put a duplicated value"; }
Source:
<code>public void position(long newPosition) throws CTFReaderException { <START> if ((this.buf != null) && (newPosition / 8) > this.buf.capacity()) { <END> throw new CTFReaderException("Out of bounds exception on a position move, attempting to access position: " + newPosition); } this.pos = newPosition; }</code><technical_language>need "this." here, code heavier</technical_language>

Target:
public void position(long newPosition) throws CTFReaderException { if ((fBuffer != null) && (newPosition / 8) > fBuffer.capacity()) { throw new CTFReaderException("Out of bounds exception on a position move, attempting to access position: " + newPosition); } fPosition = newPosition; }
Source:
<code>public long getNativePtr() { <START> return 0; <END> }</code><technical_language>return native pointer get nativeCreateWatchStream method: suggestion return this.nativePtr;</technical_language>

Target:
public long getNativePtr() { return this.nativePtr; }
Source:
<code>public abstract void tupleActionFn(int taskId, TupleImpl tuple) throws Exception; @Override public void accept(Object event) { if (this.needToRefreshCreds) { LOG.info("The credentials are being updated {}.", executorId); Credentials creds = this.workerData.getCredentials(); idToTask.stream().map(Task::getTaskObject).filter(taskObject -> taskObject instanceof ICredentialsListener) .forEach(taskObject -> { ((ICredentialsListener) taskObject).setCredentials(creds == null ? null : creds.get_creds()); }); <START> this.needToRefreshCreds = false; <END> } AddressedTuple addressedTuple = (AddressedTuple) event; int taskId = addressedTuple.getDest(); TupleImpl tuple = (TupleImpl) addressedTuple.getTuple(); if (isDebug) { LOG.info("Processing received message FOR TUPLE: {}", taskId, tuple); } try { if (taskId != AddressedTuple.BROADCAST_DEST) { tupleActionFn(taskId, tuple); } else { for (Integer t : taskIds) { tupleActionFn(t, tuple); } } } catch (Exception e) { throw new RuntimeException(e); } }</code><technical_language>I set this.needToRefreshCreds false update creds. Imagine uploaded credentials in a row this loaded creds thread paused. clear update flag miss credentials upload</technical_language>

Target:
public abstract void tupleActionFn(int taskId, TupleImpl tuple) throws Exception; @Override public void accept(Object event) { AddressedTuple addressedTuple = (AddressedTuple) event; int taskId = addressedTuple.getDest(); TupleImpl tuple = (TupleImpl) addressedTuple.getTuple(); if (isDebug) { LOG.info("Processing received TUPLE: for TASK: ", tuple, taskId); } try { if (taskId != AddressedTuple.BROADCAST_DEST) { tupleActionFn(taskId, tuple); } else { for (Integer t : taskIds) { tupleActionFn(t, tuple); } } } catch (Exception e) { throw new RuntimeException(e); } }
Source:
<code><START> protected DeadMessageTap<EventEnvelope> getDeadMessageHandler() { <END> return deadMessageHandler; }</code><technical_language>a more general type returned? Please note question handler tap names field</technical_language>

Target:
protected DeadMessageHandler<EventEnvelope> getDeadMessageHandler() { return deadMessageHandler; }