auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public EList<org.eclipse.sirius.diagram.description.filter.FilterDescription> getFilters() { <END> if (filters == null) { filters = new EObjectContainmentEList.Resolving<org.eclipse.sirius.diagram.description.filter.FilterDescription>(org.eclipse.sirius.diagram.description.filter.FilterDescription.class, this, DescriptionPackage.DIAGRAM_DESCRIPTION__FILTERS); } return filters; }</code><technical_language>import in import section</technical_language>

Target:
public EList<FilterDescription> getFilters() { if (filters == null) { filters = new EObjectContainmentEList.Resolving<FilterDescription>(FilterDescription.class, this, DescriptionPackage.DIAGRAM_DESCRIPTION__FILTERS); } return filters; }
Source:
<code>public List<ConsumerContentOverride> addContentOverrides( @PathParam("consumer_uuid") @Verify(Consumer.class) String consumerUuid, List<ConsumerContentOverride> entries) { Consumer consumer = verifyAndLookupConsumer(consumerUuid); Set<String> invalidOverrides = new HashSet<String>(); for (ConsumerContentOverride entry : entries) { if (overrideRules.canOverrideForConsumer(consumer, entry.getName())) { ConsumerContentOverride cco = consumerContentOverrideCurator.retrieve( consumer, entry.getContentLabel(), entry.getName()); if (cco != null) { cco.setValue(entry.getValue()); cco.setUpdated(null); consumerContentOverrideCurator.merge(cco); } else { entry.setConsumer(consumer); consumerContentOverrideCurator.create(entry); } } else { invalidOverrides.add(entry.getName()); } } <START> if (invalidOverrides.size() > 0) { <END> String error = i18n.tr("Not allowed to override values for: {0}", StringUtils.join(invalidOverrides, ", ")); throw new BadRequestException(error); } return consumerContentOverrideCurator.getList(consumer); }</code><technical_language>use: if (!invalidOverrides.isEmpty()) { point in counting handle this if clause. happy if item. checking for is empty better, errors.size() earlier</technical_language>

Target:
public List<ConsumerContentOverride> addContentOverrides( @PathParam("consumer_uuid") @Verify(Consumer.class) String consumerUuid, List<ConsumerContentOverride> entries) { Consumer consumer = verifyAndLookupConsumer(consumerUuid); Set<String> invalidOverrides = new HashSet<String>(); for (ConsumerContentOverride entry : entries) { if (overrideRules.canOverrideForConsumer(consumer, entry.getName())) { ConsumerContentOverride cco = consumerContentOverrideCurator.retrieve( consumer, entry.getContentLabel(), entry.getName()); if (cco != null) { cco.setValue(entry.getValue()); cco.setUpdated(null); consumerContentOverrideCurator.merge(cco); } else { entry.setConsumer(consumer); consumerContentOverrideCurator.create(entry); } } else { invalidOverrides.add(entry.getName()); } } if (!invalidOverrides.isEmpty()) { String error = i18n.tr("Not allowed to override values for: {0}", StringUtils.join(invalidOverrides, ", ")); throw new BadRequestException(error); } return consumerContentOverrideCurator.getList(consumer); }
Source:
<code>private void fireDeployDocEvent(final String target, final RenderedDocPreview docPreview, final RSConnectDeploymentRecord previous) { if (rmdInfoPending_) return; if (StringUtil.isNullOrEmpty(docPreview.getOutputFile())) { rmdInfoPending_ = true; rmdServer_.getRmdOutputInfo(target, new ServerRequestCallback<RmdOutputInfo>() { @Override public void onResponseReceived(RmdOutputInfo response) { RenderedDocPreview preview = new RenderedDocPreview( target, response.output_file_exists ? response.output_file : "", true); events_.fireEvent(RSConnectActionEvent.DeployDocEvent( preview, RSConnect.CONTENT_TYPE_DOCUMENT, previous)); rmdInfoPending_ = false; } @Override public void onError(ServerError error) { <START> Debug.logError(error); <END> rmdInfoPending_ = false; } }); } else { events_.fireEvent(RSConnectActionEvent.DeployDocEvent( docPreview, RSConnect.CONTENT_TYPE_DOCUMENT, previous)); } }</code><technical_language>show this error user? (seems is happening deploy)</technical_language>

Target:
private void fireDeployDocEvent(final String target, final RenderedDocPreview docPreview, final RSConnectDeploymentRecord previous) { if (rmdInfoPending_) return; if (StringUtil.isNullOrEmpty(docPreview.getOutputFile())) { rmdInfoPending_ = true; rmdServer_.getRmdOutputInfo(target, new ServerRequestCallback<RmdOutputInfo>() { @Override public void onResponseReceived(RmdOutputInfo response) { RenderedDocPreview preview = new RenderedDocPreview( target, response.output_file_exists ? response.output_file : "", true); events_.fireEvent(RSConnectActionEvent.DeployDocEvent( preview, RSConnect.CONTENT_TYPE_DOCUMENT, previous)); rmdInfoPending_ = false; } @Override public void onError(ServerError error) { Debug.logError(error); display_.showErrorMessage("Content Publish Failed", "Unable to determine file to be published. Click Knit or Preview " + "to render it again, then click the Publish button above the rendered document."); rmdInfoPending_ = false; } }); } else { events_.fireEvent(RSConnectActionEvent.DeployDocEvent( docPreview, RSConnect.CONTENT_TYPE_DOCUMENT, previous)); } }
Source:
<code>public <E> E attach(Class<E> extensionType, HandleSupplier handle) { ConfigRegistry instanceConfig = handle.getConfig().createCopy(); SqlObjectInitData data = sqlObjectCache.get(extensionType, handle.getConfig()); data.instanceConfigurer.apply(instanceConfig); <START> if (data.concrete) { <END> try { SqlObjectInitData.INIT_DATA.set(data); return extensionType.cast( Class.forName(extensionType.getPackage().getName() + "." + extensionType.getSimpleName() + "Impl") .getConstructor(HandleSupplier.class, ConfigRegistry.class) .newInstance(handle, instanceConfig)); } catch (ReflectiveOperationException | ExceptionInInitializerError e) { throw new UnableToCreateSqlObjectException(e); } finally { SqlObjectInitData.INIT_DATA.set(null); } } instanceConfig.get(Extensions.class).onCreateProxy(); Map<Method, Supplier<InContextInvoker>> handlers = new HashMap<>(); final Object proxy = Proxy.newProxyInstance( extensionType.getClassLoader(), new Class[] {extensionType}, (p, m, a) -> handlers.get(m).get().invoke(a)); data.methodHandlers.forEach((m, h) -> handlers.put(m, data.lazyInvoker(proxy, m, handle, instanceConfig))); return extensionType.cast(proxy); }</code><technical_language>please public field usage</technical_language>

Target:
public <E> E attach(Class<E> extensionType, HandleSupplier handle) { ConfigRegistry instanceConfig = handle.getConfig().createCopy(); SqlObjectInitData data = sqlObjectCache.get(extensionType, handle.getConfig()); data.configureInstance(instanceConfig); if (data.isConcrete()) { return data.instantiate(extensionType, handle, instanceConfig); } instanceConfig.get(Extensions.class).onCreateProxy(); Map<Method, Supplier<InContextInvoker>> handlers = new HashMap<>(); final Object proxy = Proxy.newProxyInstance( extensionType.getClassLoader(), new Class[] {extensionType}, (p, m, a) -> handlers.get(m).get().invoke(a)); data.forEachMethodHandler((m, h) -> handlers.put(m, data.lazyInvoker(proxy, m, handle, instanceConfig))); return extensionType.cast(proxy); }
Source:
<code>public void testAquireBackoff() throws InterruptedException { PessimisticLockFactory.BackoffParameters backoffConfig = new PessimisticLockFactory.BackoffParameters( 10, -1, 0 ); final PessimisticLockFactory lockFactory = new PessimisticLockFactory(backoffConfig); <START> final CountDownLatch randevous = new CountDownLatch(1); <END> final CountDownLatch lockObtained = new CountDownLatch(1); final AtomicReference<Exception> exceptionInThread = new AtomicReference<>(); final String id = "aggregateId"; new Thread(() -> { try { lockFactory.obtainLock(id); lockObtained.countDown(); randevous.await(); } catch (Exception e) { exceptionInThread.set(e); } }).start(); lockObtained.await(); try { lockFactory.obtainLock(id); } finally { randevous.countDown(); } }</code><technical_language>right spelling rendezvous? :thinking:</technical_language>

Target:
public void testAquireBackoff() throws InterruptedException { PessimisticLockFactory.BackoffParameters backoffConfig = new PessimisticLockFactory.BackoffParameters( 10, -1, 0 ); final PessimisticLockFactory lockFactory = new PessimisticLockFactory(backoffConfig); final CountDownLatch rendezvous = new CountDownLatch(1); try { final AtomicReference<Exception> exceptionInThread = new AtomicReference<>(); final String id = "aggregateId"; createThreadObtainLockAndWaitForState(lockFactory, Thread.State.WAITING, rendezvous, exceptionInThread, id); lockFactory.obtainLock(id); } finally { rendezvous.countDown(); } }
Source:
<code><START> public Collection<Exception> validateTestClass(TestClass testClass) { <END> Collection<Exception> validationErrors= new ArrayList<Exception>(); for (AnnotatableValidator validator : AnnotatableValidator.values()) { Collection<Exception> additionalErrors= validator .validateTestClass(testClass); validationErrors.addAll(additionalErrors); } return validationErrors; }</code><technical_language>caller of this method is adding values ordered list, List<Exception> a return type, @dsaff final decider this one</technical_language>

Target:
public List<Exception> validateTestClass(TestClass testClass) { List<Exception> validationErrors= new ArrayList<Exception>(); for (AnnotatableValidator<?> validator : VALIDATORS) { List<Exception> additionalErrors= validator .validateTestClass(testClass); validationErrors.addAll(additionalErrors); } return validationErrors; }
Source:
<code>public CheckpointResult saveMetaGroupCheckpoint(final Tuple<String, MetaGroupCheckpoint> tuple) { try { <START> checkpointFinishedMap.putIfAbsent(tuple.getKey(), new CountDownLatch(1)); <END> metaGroupCheckpointQueue.put(tuple); LOG.log(Level.INFO, "Checkpoint submitted for groupId: {0}", tuple.getKey()); } catch (final InterruptedException ie) { ie.printStackTrace(); return CheckpointResult.newBuilder() .setIsSuccess(false) .setMsg("Unsuccessful in checkpointing group " + tuple.getKey()) .setPathToCheckpoint("") .build(); } return CheckpointResult.newBuilder() .setIsSuccess(true) .setMsg("Successfully checkpointed group " + tuple.getKey()) .setPathToCheckpoint(tmpFolderPath + "/" + tuple.getKey() + ".groupcp") .build(); }</code><technical_language>In line 148, checkpoint false returns true, checkpointing is executed in a separate thread. This synchronous. Or, asynchronous a callback function a parameter, return Future</technical_language>

Target:
public CheckpointResult saveMetaGroupCheckpoint(final Tuple<String, MetaGroupCheckpoint> tuple) { try { final String groupId = tuple.getKey(); final MetaGroupCheckpoint gmc = tuple.getValue(); final File storedFile = getMetaGroupCheckpointFile(groupId); if (storedFile.exists()) { storedFile.delete(); LOG.log(Level.INFO, "Checkpoint deleted for groupId: {0}", groupId); } if (!storedFile.exists()) { storedFile.getParentFile().mkdirs(); final DataFileWriter<MetaGroupCheckpoint> dataFileWriter = new DataFileWriter<>(datumWriter); dataFileWriter.create(gmc.getSchema(), storedFile); dataFileWriter.append(gmc); dataFileWriter.close(); LOG.log(Level.INFO, "Checkpoint completed for groupId: {0}", groupId); } } catch (final Exception e) { e.printStackTrace(); return CheckpointResult.newBuilder() .setIsSuccess(false) .setMsg("Unsuccessful in checkpointing group " + tuple.getKey()) .setPathToCheckpoint("") .build(); } return CheckpointResult.newBuilder() .setIsSuccess(true) .setMsg("Successfully checkpointed group " + tuple.getKey()) .setPathToCheckpoint(tmpFolderPath + "/" + tuple.getKey() + ".groupcp") .build(); }
Source:
<code>private void addPhotoLink(Resource<UserPhotoDto> userPhotoResource) { userPhotoResource.add(UserPhotoController.getUserPhotoLinkBuilder(userPhotoResource.getContent().getId().get()) <START> .withRel("yona:userPhoto")); <END> }</code><technical_language>relationship "userPhoto". curie is added HAL serialization</technical_language>

Target:
private void addPhotoLink(Resource<UserPhotoDto> userPhotoResource) { userPhotoResource.add(UserPhotoController.getUserPhotoLinkBuilder(userPhotoResource.getContent().getId().get()) .withRel("userPhoto")); }
Source:
<code>private static boolean isSyntheticClass(ClassNode node) { <START> if ((node.access & Opcodes.ACC_SYNTHETIC) == Opcodes.ACC_SYNTHETIC) { return true; } return false; <END> }</code><technical_language>suggestion return (node.access & Opcodes.ACC_SYNTHETIC) == Opcodes.ACC_SYNTHETIC);</technical_language>

Target:
private static boolean isSyntheticClass(ClassNode node) { return ((node.access & Opcodes.ACC_SYNTHETIC) == Opcodes.ACC_SYNTHETIC); }
Source:
<code>public void testGson() throws Exception { Gson gson = new GsonBuilder() .registerTypeAdapterFactory(new PersonTypeAdapterFactory()) .create(); Person person = Person.builder() .name("Piasy") .gender(1) .age(23) .build(); String json = "{\"name\":\"Piasy\",\"age\":23,\"gender\":1}"; String toJson = gson.toJson(person, Person.class); <START> JSONAssert.assertEquals(json, toJson, false); <END> Person fromJson = gson.fromJson(json, Person.class); Assert.assertEquals("Piasy", fromJson.name()); Assert.assertEquals(23, fromJson.age()); Assert.assertEquals(1, fromJson.gender()); }</code><technical_language>this offer normal assertEquals doesn't</technical_language>

Target:
public void testGson() throws Exception { Gson gson = new GsonBuilder() .registerTypeAdapterFactory(new PersonTypeAdapterFactory()) .create(); Person person = Person.builder() .name("Piasy") .gender(1) .age(23) .build(); String json = "{\"name\":\"Piasy\",\"gender\":1,\"age\":23}"; String toJson = gson.toJson(person, Person.class); Assert.assertEquals(json, toJson); Person fromJson = gson.fromJson(json, Person.class); Assert.assertEquals("Piasy", fromJson.name()); Assert.assertEquals(23, fromJson.age()); Assert.assertEquals(1, fromJson.gender()); }
Source:
<code>public boolean canStart(String line, int lineOffset) { if (lineOffset == 0) { Matcher m = pattern.matcher(line); if (m.matches()) { <START> matcher = m; <END> return true; } } matcher = null; return false; }</code><technical_language>consider saving of group 1 group 2 matcher</technical_language>

Target:
public boolean canStart(String line, int lineOffset) { if (lineOffset == 0) { Matcher matcher = pattern.matcher(line); if (matcher.matches()) { key = matcher.group(1); value = matcher.group(2); return true; } } key = null; value = null; return false; }
Source:
<code>public IASTName[] getNames() { IASTName[] result = new IASTName[fQualifierPos + (fLastName == null ? 1 : 2)]; int idx = 0; for (ICPPASTNameSpecifier nameSpecifier : getQualifier()) { if (nameSpecifier instanceof IASTName) { result[idx++] = (IASTName) nameSpecifier; } else { throw new UnsupportedOperationException("Can't use getNames() on a " + "qualified name that includes a decltype-specifier. Use " + <START> "getQualifier() and getLastName() instead"); END> } } if (fLastName != null) result[fQualifierPos + 1] = fLastName; return result; }</code><technical_language>Add a period "instead"</technical_language>

Target:
public IASTName[] getNames() { IASTName[] result = new IASTName[fQualifierPos + (fLastName == null ? 1 : 2)]; int idx = 0; for (ICPPASTNameSpecifier nameSpecifier : getQualifier()) { if (nameSpecifier instanceof IASTName) { result[idx++] = (IASTName) nameSpecifier; } else { throw new UnsupportedOperationException("Can't use getNames() on a " + "qualified name that includes a decltype-specifier. Use " + "getQualifier() and getLastName() instead."); } } if (fLastName != null) result[fQualifierPos + 1] = fLastName; return result; }
Source:
<code><START> public Builder setAppGroupName(String appGroupName) { <END> result.appGroupName = appGroupName; if (result.appGroupName != null) { result.appGroupName = result.appGroupName.toUpperCase(); } return this; }</code><technical_language>appGroupName upper case invariant violated this issue appGroupName is volatile, hinting accessed multiple threads. A safer implement this function be, if (appGroupName == null) result.appGroupName = null; else result.appGroupName = appGroupName.toUpperCase(); appears existing methods corrected this</technical_language>

Target:
public Builder setAppGroupName(String appGroupName) { if (appGroupName != null) { result.appGroupName = appGroupName.toUpperCase(); } else { result.appGroupName = null; } return this; }
Source:
<code>protected void addSecurity(GlobalConfigurationBuilder globalBuilder) { globalBuilder.security().authorization().enable().principalRoleMapper(new IdentityRoleMapper()) .role("ADMIN").permission(AuthorizationPermission.ALL) <START> .role("USER").permission(AuthorizationPermission.ALL); <END> }</code><technical_language>above, USER need permissions ADMIN</technical_language>

Target:
protected void addSecurity(GlobalConfigurationBuilder globalBuilder) { globalBuilder.security().authorization().enable().principalRoleMapper(new IdentityRoleMapper()) .role("ADMIN").permission(AuthorizationPermission.ALL) .role("USER").permission(AuthorizationPermission.WRITE, AuthorizationPermission.READ, AuthorizationPermission.EXEC); }
Source:
<code>public Collection<ICallStackGroupDescriptor> getGroupDescriptors() { List<@Nullable <START> CallStackSeries> series =StreamUtils.getStream(getDependentAnalyses()) .map(m -> ((IFlameChartProvider) m).getCallStackSeries()) .collect(Collectors.toList()); List<ICallStackGroupDescriptor> descriptors = new ArrayList<>(); for (CallStackSeries serie : series) { if (serie != null) { descriptors.add(serie.getRootGroup()); } } <END> return descriptors; }</code><technical_language>do this in stream</technical_language>

Target:
public Collection<ICallStackGroupDescriptor> getGroupDescriptors() { List<ICallStackGroupDescriptor> descriptors = new ArrayList<>(); for (IAnalysisModule module : getDependentAnalyses()) { if (module instanceof IFlameChartProvider) { CallStackSeries serie = ((IFlameChartProvider) module).getCallStackSeries(); if (serie != null) { descriptors.add(serie.getRootGroup()); } } } return descriptors; }
Source:
<code>private boolean hasNoGenericChildren(Content content) { if (!(content instanceof Container)) { return true; } <START> DBObject dbQuery = where().fieldEquals("container", content.getCanonicalUri()).build(); <END> return childrenDb.find(dbQuery).count() < 1; }</code><technical_language>constant</technical_language>

Target:
private boolean hasNoGenericChildren(Content content) { if (!(content instanceof Container)) { return true; } DBObject dbQuery = where().fieldEquals(CONTAINER, content.getCanonicalUri()).build(); return childrenDb.find(dbQuery).count() < 1; }
Source:
<code>public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity) { if (Game.isClient(world)) return; if (!MiscTools.isKillableEntity(entity)) return; ChargeNetwork.ChargeNode node = ChargeManager.getNetwork(world).getNode(pos); if (node.getChargeGraph().getCharge() > 2000) { boolean shock = true; ItemStack overalls = getOveralls(entity); ItemStack boots = getRubberBoots(entity); if ((overalls != null) && (boots != null)) { shock = false; if (MiscTools.RANDOM.nextInt(300) == 0) entity.setItemStackToSlot(EntityEquipmentSlot.LEGS, InvTools.damageItem(overalls, 1)); if (MiscTools.RANDOM.nextInt(300) == 150) entity.setItemStackToSlot(EntityEquipmentSlot.FEET, InvTools.damageItem(boots, 1)); } if ((overalls != null)) { shock = false; if (MiscTools.RANDOM.nextInt(150) == 0) entity.setItemStackToSlot(EntityEquipmentSlot.LEGS, InvTools.damageItem(overalls, 1)); } if ((boots != null)) { shock = false; if (MiscTools.RANDOM.nextInt(150) == 0) entity.setItemStackToSlot(EntityEquipmentSlot.FEET, InvTools.damageItem(boots, 1)); <START> } <END> if (shock && entity.attackEntityFrom(RailcraftDamageSource.TRACK_ELECTRIC, 2)) { node.removeCharge(2000); EffectManager.instance.zapEffectDeath(world, entity); } } }</code><technical_language>add new features for another major version</technical_language>

Target:
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity) { if (Game.isClient(world)) return; if (!MiscTools.isKillableEntity(entity)) return; ChargeNetwork.ChargeNode node = ChargeManager.getNetwork(world).getNode(pos); if (node.getChargeGraph().getCharge() > 2000) { boolean shock = true; ItemStack overalls = getOveralls(entity); ItemStack boots = getRubberBoots(entity); if (!InvTools.isEmpty(overalls) && !InvTools.isEmpty(boots)) { shock = false; if (MiscTools.RANDOM.nextInt(300) == 0) entity.setItemStackToSlot(EntityEquipmentSlot.LEGS, InvTools.damageItem(overalls, 1)); else if (MiscTools.RANDOM.nextInt(300) == 150) entity.setItemStackToSlot(EntityEquipmentSlot.FEET, InvTools.damageItem(boots, 1)); } if (!InvTools.isEmpty(overalls)) { shock = false; if (MiscTools.RANDOM.nextInt(150) == 0) entity.setItemStackToSlot(EntityEquipmentSlot.LEGS, InvTools.damageItem(overalls, 1)); } if (!InvTools.isEmpty(boots)) { shock = false; if (MiscTools.RANDOM.nextInt(150) == 0) entity.setItemStackToSlot(EntityEquipmentSlot.FEET, InvTools.damageItem(boots, 1)); } if (shock && entity.attackEntityFrom(RailcraftDamageSource.TRACK_ELECTRIC, 2)) { node.removeCharge(2000); EffectManager.instance.zapEffectDeath(world, entity); } } }
Source:
<code>public ASTNode(HasLocation hasLocation) { this(hasLocation.getLocation()); <START> metadataSet = new HashSet<>(); <END> }</code><technical_language>Unnecessary; call this(...)</technical_language>

Target:
public ASTNode(HasLocation hasLocation) { this(hasLocation.getLocation()); }
Source:
<code>public Set<Ref> resolveTipSha1(ObjectId id) throws IOException { return getRefs().stream() .filter(r -> id.equals(r.getObjectId()) || id.equals(r.getPeeledObjectId())) <START> .collect(Collectors.toSet()); <END> }</code><technical_language>nit: import toSet static for consistency toList (see L46)</technical_language>

Target:
public Set<Ref> resolveTipSha1(ObjectId id) throws IOException { return getRefs().stream().filter(r -> id.equals(r.getObjectId()) || id.equals(r.getPeeledObjectId())).collect(toSet()); }
Source:
<code>public StoreQueryParams<T> withPartition(final Integer partition) { this.partition = partition; <START> return this; <END> }</code><technical_language>agree helper classes immutable -- hence, create a new object instead of returning this</technical_language>

Target:
public StoreQueryParams<T> withPartition(final Integer partition) { final StoreQueryParams<T> storeQueryParams = StoreQueryParams.fromNameAndType(this.storeName(), this.queryableStoreType()); storeQueryParams.partition = partition; storeQueryParams.staleStores = this.staleStores; return storeQueryParams; }
Source:
<code><START> public void analyze_appActivitySameAppWithinConflictIntervalContinuous_activityRecordMergedAndNoNewGoalConflictMessageCreated() <END> { ZonedDateTime now = now(); DayActivity existingDayActivity = mockExistingActivity(gamblingGoal, now.minusMinutes(10), now.minusMinutes(5), "Lotto App"); service.analyze(userAnonId, createSingleAppActivity("Lotto App", now.minusMinutes(5), now.minusMinutes(2))); verifyNoGoalConflictMessagesCreated(); List<Activity> activities = existingDayActivity.getActivities(); assertThat(activities.size(), equalTo(1)); assertThat(activities.get(0).getApp(), equalTo(Optional.of("Lotto App"))); assertThat(activities.get(0).getDurationMinutes(), equalTo(8)); }</code><technical_language>Please change Continuous Contiguous</technical_language>

Target:
public void analyze_appActivitySameAppWithinConflictIntervalContinuous_activityRecordMergedAndNoNewGoalConflictMessageCreated() { ZonedDateTime now = now(); ZonedDateTime existingActivityEndTime = now.minusMinutes(5); DayActivity existingDayActivity = mockExistingActivity(gamblingGoal, now.minusMinutes(10), existingActivityEndTime, "Lotto App"); service.analyze(userAnonId, createSingleAppActivity("Lotto App", existingActivityEndTime, now.minusMinutes(2))); verifyNoGoalConflictMessagesCreated(); List<Activity> activities = existingDayActivity.getActivities(); assertThat(activities.size(), equalTo(1)); assertThat(activities.get(0).getApp(), equalTo(Optional.of("Lotto App"))); assertThat(activities.get(0).getDurationMinutes(), equalTo(8)); }
Source:
<code>public int isPreferred(Node node) { <START> if (node == null) { <END> return 0; } AbstractFile file = node.getLookup().lookup(AbstractFile.class); if (file == null) { return 0; } String mimeType = file.getMIMEType(); if (Strings.isNullOrEmpty(mimeType)) { LOGGER.log(Level.INFO, "Mimetype not known for file: {0}", file.getName()); try { FileTypeDetector fileTypeDetector = new FileTypeDetector(); mimeType = fileTypeDetector.detectFileType(file); } catch (FileTypeDetector.FileTypeDetectorInitException ex) { LOGGER.log(Level.SEVERE, "Failed to initialize FileTypeDetector.", ex); return 0; } catch (TskCoreException ex) { LOGGER.log(Level.SEVERE, String.format("Could not detect format using fileTypeDetector for file: %s", file), ex); return 0; } } if (mimeType.equalsIgnoreCase("application/octet-stream")) { return 0; } else { if (null != getSupportingViewer(mimeType)) { return CONFIDENCE_LEVEL; } } return 0; }</code><technical_language>isPreferred() is called if isSupported() returned true. So, checks dropped</technical_language>

Target:
public int isPreferred(Node node) { AbstractFile file = node.getLookup().lookup(AbstractFile.class); String mimeType = file.getMIMEType(); if (Strings.isNullOrEmpty(mimeType)) { LOGGER.log(Level.INFO, "Mimetype not known for file: {0}", file.getName()); try { FileTypeDetector fileTypeDetector = new FileTypeDetector(); mimeType = fileTypeDetector.detectMIMEType(file); }catch (FileTypeDetector.FileTypeDetectorInitException ex) { LOGGER.log(Level.SEVERE, "Failed to initialize FileTypeDetector.", ex); return 0; } } if (mimeType.equalsIgnoreCase("application/octet-stream")) { return 0; } else { if (null != getSupportingViewer(mimeType)) { return CONFIDENCE_LEVEL; } } return 0; }
Source:
<code>File getActiveFile() { IWorkbenchPage workbenchPage = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getService(IWorkbenchPage.class); IEditorPart activeEditor = workbenchPage.getActiveEditor(); <START> if (activeEditor == null) <END> return null; IEditorInput editorInput = activeEditor.getEditorInput(); return Adapters.adapt(editorInput, File.class); }</code><technical_language>missing braces</technical_language>

Target:
File getActiveFile() { IWorkbenchPage workbenchPage = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getService(IWorkbenchPage.class); IEditorPart activeEditor = workbenchPage.getActiveEditor(); if (activeEditor == null) { return null; } IEditorInput editorInput = activeEditor.getEditorInput(); return Adapters.adapt(editorInput, File.class); }
Source:
<code>public void testServiceException() throws Exception { ServiceException originalException = new ServiceException(ErrorType.FAILED_PRECONDITION, SafeArg.of("key", "value")); SerializableError error = SerializableError.forException(originalException); String json = OBJECT_MAPPER.writeValueAsString(error); <START> RemoteException exception = (RemoteException) decode(MediaType.APPLICATION_JSON, json, 400); <END> assertThat(exception.getCause()).isNull(); assertThat(exception.getStatus()).isEqualTo(400); assertThat(exception.getError().errorCode()).isEqualTo(ErrorType.FAILED_PRECONDITION.code().name()); assertThat(exception.getError().errorName()).isEqualTo(ErrorType.FAILED_PRECONDITION.code().name()); assertThat(exception.getMessage()) .isEqualTo("RemoteException: " + ErrorType.FAILED_PRECONDITION.code().name()); }</code><technical_language>encodeAndDecode()</technical_language>

Target:
public void testServiceException() throws Exception { ServiceException originalException = new ServiceException(ErrorType.FAILED_PRECONDITION, SafeArg.of("key", "value")); SerializableError error = SerializableError.forException(originalException); String json = SERVER_MAPPER.writeValueAsString(error); RemoteException exception = (RemoteException) decode(MediaType.APPLICATION_JSON, json, 400); assertThat(exception.getCause()).isNull(); assertThat(exception.getStatus()).isEqualTo(400); assertThat(exception.getError().errorCode()).isEqualTo(ErrorType.FAILED_PRECONDITION.code().name()); assertThat(exception.getError().errorName()).isEqualTo(ErrorType.FAILED_PRECONDITION.name()); assertThat(exception.getMessage()).isEqualTo("RemoteException: " + ErrorType.FAILED_PRECONDITION.code().name() + " (" + ErrorType.FAILED_PRECONDITION.name() + ")"); }
Source:
<code>public static void copyStreamAndClose(@Nonnull InputStream in, @Nonnull OutputStream out) throws IOException { try { copyStream(in,out); } finally { in.close(); <START> out.close(); <END> } }</code><technical_language>If code fails close in, try close out</technical_language>

Target:
public static void copyStreamAndClose(@Nonnull InputStream in, @Nonnull OutputStream out) throws IOException { try (InputStream _in = in; OutputStream _out = out) { copyStream(in,out); } }
Source:
<code>public RecordCursor getCursor(SqlExecutionContext executionContext) { final RecordCursor baseCursor = base.getCursor(executionContext); try { map.clear(); long maxInMemoryRows = executionContext.getCairoSecurityContext().getMaxInMemoryRows(); <START> if (maxInMemoryRows > baseCursor.size() || baseCursor.size() < 0) { <END> map.setMaxSize(maxInMemoryRows); int n = groupByFunctions.size(); final Record baseCursorRecord = baseCursor.getRecord(); while (baseCursor.hasNext()) { MapKey key = map.withKey(); mapSink.copy(baseCursorRecord, key); MapValue value = key.createValue(); if (value.isNew()) { value.putLong(0, Numbers.LONG_NaN); for (int i = 0; i < n; i++) { groupByFunctions.getQuick(i).setNull(value); } } } if (map.size() == 0) { baseCursor.close(); return EmptyTableRecordCursor.INSTANCE; } baseCursor.toTop(); boolean next = baseCursor.hasNext(); assert next; return initFunctionsAndCursor(executionContext, baseCursor); } else { throw LimitOverflowException.instance(maxInMemoryRows); } } catch (CairoException ex) { baseCursor.close(); throw ex; } }</code><technical_language>java || baseCursor.size() < 0 is necessary :)</technical_language>

Target:
public RecordCursor getCursor(SqlExecutionContext executionContext) { final RecordCursor baseCursor = base.getCursor(executionContext); try { map.clear(); long maxInMemoryRows = executionContext.getCairoSecurityContext().getMaxInMemoryRows(); if (maxInMemoryRows > baseCursor.size()) { map.setMaxSize(maxInMemoryRows); int n = groupByFunctions.size(); final Record baseCursorRecord = baseCursor.getRecord(); while (baseCursor.hasNext()) { MapKey key = map.withKey(); mapSink.copy(baseCursorRecord, key); MapValue value = key.createValue(); if (value.isNew()) { value.putLong(0, Numbers.LONG_NaN); for (int i = 0; i < n; i++) { groupByFunctions.getQuick(i).setNull(value); } } } if (map.size() == 0) { baseCursor.close(); return EmptyTableRecordCursor.INSTANCE; } baseCursor.toTop(); boolean next = baseCursor.hasNext(); assert next; return initFunctionsAndCursor(executionContext, baseCursor); } throw LimitOverflowException.instance(maxInMemoryRows); } catch (CairoException ex) { baseCursor.close(); throw ex; } }
Source:
<code>public static String getName(OsmandApplication app, SearchResult searchResult) { switch (searchResult.objectType) { case STREET: if (searchResult.localeName.endsWith(")")) { int i = searchResult.localeName.indexOf('('); if (i > 0) { return searchResult.localeName.substring(0, i).trim(); } } break; case STREET_INTERSECTION: if (!Algorithms.isEmpty(searchResult.localeRelatedObjectName)) { return searchResult.localeName + " - " + searchResult.localeRelatedObjectName; } break; case RECENT_OBJ: HistoryEntry historyEntry = (HistoryEntry) searchResult.object; PointDescription pd = historyEntry.getName(); return pd.getSimpleName(app, false); case LOCATION: LatLon latLon = searchResult.location; return PointDescription.getLocationNamePlain(app, latLon.getLatitude(), latLon.getLongitude()); case POI: if (((Amenity)searchResult.object).isClosed()) { <START> return searchResult.localeName + " (Closed)"; <END> } } return searchResult.localeName; }</code><technical_language>bad, please translate string, R.string.shared_string_closed</technical_language>

Target:
public static String getName(OsmandApplication app, SearchResult searchResult) { switch (searchResult.objectType) { case STREET: if (searchResult.localeName.endsWith(")")) { int i = searchResult.localeName.indexOf('('); if (i > 0) { return searchResult.localeName.substring(0, i).trim(); } } break; case STREET_INTERSECTION: if (!Algorithms.isEmpty(searchResult.localeRelatedObjectName)) { return searchResult.localeName + " - " + searchResult.localeRelatedObjectName; } break; case RECENT_OBJ: HistoryEntry historyEntry = (HistoryEntry) searchResult.object; PointDescription pd = historyEntry.getName(); return pd.getSimpleName(app, false); case LOCATION: LatLon latLon = searchResult.location; return PointDescription.getLocationNamePlain(app, latLon.getLatitude(), latLon.getLongitude()); } return searchResult.localeName; }
Source:
<code>public void createContext() { stateDirectory = TestUtils.tempDirectory(); final StreamsMetricsImpl streamsMetrics = niceMock(StreamsMetricsImpl.class); replay(streamsMetrics); context = new InternalMockProcessorContext( stateDirectory, Serdes.String(), Serdes.Long(), new NoOpRecordCollector(), <START> new ThreadCache(new LogContext("testCache "), 0, streamsMetrics) <END> ); segments = new TimestampedSegments(storeName, METRICS_SCOPE, RETENTION_PERIOD, SEGMENT_INTERVAL); }</code><technical_language>nit: Please fix code style</technical_language>

Target:
public void createContext() { stateDirectory = TestUtils.tempDirectory(); context = new InternalMockProcessorContext( stateDirectory, Serdes.String(), Serdes.Long(), new NoOpRecordCollector(), new ThreadCache( new LogContext("testCache "), 0, new StreamsMetricsImpl(new Metrics(), "test", StreamsConfig.METRICS_LATEST)) ); segments = new TimestampedSegments(storeName, METRICS_SCOPE, RETENTION_PERIOD, SEGMENT_INTERVAL); }
Source:
<code>public boolean shouldSuspend(ContractsGrantsInvoiceDocument contractsGrantsInvoiceDocument) { if (shouldValidateOnBudgetTotal()) { LOG.debug("shouldSuspend, validating based on award budget total"); CuAward cuAward = (CuAward) contractsGrantsInvoiceDocument.getInvoiceGeneralDetail().getAward(); AwardExtendedAttribute awardExtension = (AwardExtendedAttribute) cuAward.getExtension(); return contractsGrantsInvoiceDocument.getInvoiceGeneralDetail().getTotalAmountBilledToDate().isGreaterThan(awardExtension.getBudgetTotalAmount()); } else { <START> LOG.debug("shouldSuspend, validating based on ward total"); <END> return super.shouldSuspend(contractsGrantsInvoiceDocument); } }</code><technical_language>this "award" instead of "ward"</technical_language>

Target:
public boolean shouldSuspend(ContractsGrantsInvoiceDocument contractsGrantsInvoiceDocument) { if (shouldValidateOnBudgetTotal()) { LOG.debug("shouldSuspend, validating based on award budget total"); CuAward cuAward = (CuAward) contractsGrantsInvoiceDocument.getInvoiceGeneralDetail().getAward(); AwardExtendedAttribute awardExtension = (AwardExtendedAttribute) cuAward.getExtension(); return contractsGrantsInvoiceDocument.getInvoiceGeneralDetail().getTotalAmountBilledToDate().isGreaterThan(awardExtension.getBudgetTotalAmount()); } else { LOG.debug("shouldSuspend, validating based on award total"); return super.shouldSuspend(contractsGrantsInvoiceDocument); } }
Source:
<code>private void removeWorkspaceQuietly(String workspaceId) { try { workspaceDao.remove(workspaceId); } catch (ServerException x) { <START> LOG.error("Unable to remove temporary workspace '{}'", workspaceId); <END> } }</code><technical_language>author of this code still, useful add exception message logger</technical_language>

Target:
private void removeWorkspaceQuietly(String workspaceId) { try { workspaceDao.remove(workspaceId); } catch (ServerException x) { LOG.error( "Unable to remove temporary workspace '{}'. Error message was: {}", workspaceId, x.getMessage()); } }
Source:
<code>private boolean resolveConflictsOnMerge(Configuration config, CacheMode cacheMode) { if (config == null || cacheMode.isScattered() || cacheMode.isInvalidation()) return false; ClusteringConfiguration cc = config.clustering(); <START> return cc.partitionHandling().resolveConflictsOnMerge() && cc.hash().numOwners() > 1; <END> }</code><technical_language>checks work in PartitionHandlingConfigurationBuilder.validate(), logging warnings if merge policy is ignored. numOwners > 1 check is needed..</technical_language>

Target:
private boolean resolveConflictsOnMerge(Configuration config, CacheMode cacheMode) { if (config == null || cacheMode.isScattered() || cacheMode.isInvalidation()) return false; return config.clustering().partitionHandling().resolveConflictsOnMerge(); }
Source:
<code>public void receive(Event event) { if (ruleEngineCallback != null) { logger.trace("Received Event: Source: Topic: Type: Payload: {}", event.getSource(), event.getTopic(), event.getType(), event.getPayload()); if (!event.getTopic().contains(source)) { return; } if (eventOnChannel != null && !eventOnChannel.equals("")) { <START> if (event instanceof ChannelTriggeredEvent) { <END> if (!this.eventOnChannel.equals(((ChannelTriggeredEvent) event).getEvent())) { return; } } } Map<String, Object> values = Maps.newHashMap(); values.put("event", event); ruleEngineCallback.triggered(this.module, values); } }</code><technical_language>line 96 98 reduced if (StringUtils.isNotBlank(eventOnChannel) && event instanceof ChannelTriggeredEvent && !eventOnChannel.equals(((ChannelTriggeredEvent) event).getEvent())) { This a private method private boolean eventMatchesChannelConfiguration(event) if clause early return</technical_language>

Target:
public void receive(Event event) { if (ruleEngineCallback != null) { logger.trace("Received Event: Source: Topic: Type: Payload: {}", event.getSource(), event.getTopic(), event.getType(), event.getPayload()); if (!event.getTopic().contains(source)) { return; } Map<String, Object> values = Maps.newHashMap(); values.put("event", event); ruleEngineCallback.triggered(this.module, values); } }
Source:
<code>public Object evaluate(Object feature) { Object arg0; Object arg1; try { arg0 = (Object) getExpression(0).evaluate(feature); } catch (Exception e) { throw new IllegalArgumentException( <START> "Filter Function problem for function equalTo argument #0 - expected type Object"); <END> } try { arg1 = (Object) getExpression(1).evaluate(feature); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function equalTo argument #1 - expected type Object"); } return MBFunctionUtil.argsEqual(arg0, arg1); }</code><technical_language>mbEqualTo in exceptions</technical_language>

Target:
public Object evaluate(Object feature) { Object arg0; Object arg1; try { arg0 = (Object) getExpression(0).evaluate(feature); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function \"mbEqualTo\" argument #0 - expected type Object"); } try { arg1 = (Object) getExpression(1).evaluate(feature); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function \"mbEqualTo\" argument #1 - expected type Object"); } return MBFunctionUtil.argsEqual(arg0, arg1); }
Source:
<code>private void parseTabbarURI(String tabbarURI) throws URISyntaxException { if (tabbarId != null) { throw new URISyntaxException(string, MessageFormat.format(Messages.LocationURI_ParsePb_OnlyOneLocationURIPerScheme, TABBAR_SCHEME)); } if <START> (tabbarURI.substring(TABBAR_SCHEME.length()).startsWith(SEPARATOR)) <END> { String id = tabbarURI.substring(TABBAR_SCHEME.length() + SEPARATOR.length()).trim(); if (id.length() == 0) { throw new URISyntaxException(string, MessageFormat.format(Messages.LocationURI_ParsePb_NoId, TABBAR_SCHEME + SEPARATOR)); } tabbarId = id; } else { throw new URISyntaxException(string, MessageFormat.format(Messages.LocationURI_ParsePb_WrongFormat, TABBAR_SCHEME + SEPARATOR + "tabbarId", tabbarURI)); } }</code><technical_language>trim()</technical_language>

Target:
private void parseTabbarURI(String tabbarURI) throws URISyntaxException { if (tabbarId != null) { throw new URISyntaxException(string, MessageFormat.format(Messages.LocationURI_ParsePb_OnlyOneLocationURIPerScheme, TABBAR_SCHEME)); } if (tabbarURI.substring(TABBAR_SCHEME.length()).trim().startsWith(SEPARATOR)) { String id = tabbarURI.substring(TABBAR_SCHEME.length()).trim().substring(SEPARATOR.length()).trim(); if (id.length() == 0) { throw new URISyntaxException(string, MessageFormat.format(Messages.LocationURI_ParsePb_NoId, TABBAR_SCHEME + SEPARATOR)); } tabbarId = id; } else { throw new URISyntaxException(string, MessageFormat.format(Messages.LocationURI_ParsePb_WrongFormat, TABBAR_SCHEME + SEPARATOR + "tabbarId", tabbarURI)); } }
Source:
<code><START> private static final XWikiContext getContext() { <END> return getModelContext().getXWikiContext(); }</code><technical_language>needs this method static</technical_language>

Target:
private final XWikiContext getContext() { return getModelContext().getXWikiContext(); }
Source:
<code>public String getScript(String inMoovServiceName) { <START> return String.format((Locale)null,"%s.moveEyelids(%.2f,%.2f)\n", inMoovServiceName, eyelidleft.getPos(), eyelidright.getPos()); <END> }</code><technical_language>I this string format line is wrong.. string formatting , arguments fill string. casting a null locale.. this code is correct</technical_language>

Target:
public String getScript(String inMoovServiceName) { return String.format(Locale.ENGLISH,"%s.moveEyelids(%.2f,%.2f)\n", inMoovServiceName, eyelidleft.getPos(), eyelidright.getPos()); }
Source:
<code>public SnomedConceptDocument getComponent(final IBranchPath branchPath, final String id) { try { return SnomedRequests.prepareGetConcept(id) .setExpand("referenceSet()") .build(SnomedDatastoreActivator.REPOSITORY_UUID, branchPath.getPath()) .execute(ApplicationContext.getServiceForClass(IEventBus.class)) <START> .then(concept -> { <END> final SnomedDescription pt = concept.getPt(); final String preferredTerm = pt == null ? concept.getId() : pt.getTerm(); return SnomedConceptDocument.builder(concept) .label(preferredTerm) .build(); }) .getSync(); } catch (NotFoundException e) { return null; } }</code><technical_language>previous version throw a NotFoundException if identifier concept exists, referenceSet information is set it? If so, want replicate behavior here</technical_language>

Target:
public SnomedConceptDocument getComponent(final IBranchPath branchPath, final String id) { try { return SnomedRequests.prepareGetConcept(id) .setExpand("referenceSet()") .build(SnomedDatastoreActivator.REPOSITORY_UUID, branchPath.getPath()) .execute(ApplicationContext.getServiceForClass(IEventBus.class)) .then(concept -> { if (concept.getReferenceSet() == null) { return null; } final SnomedDescription pt = concept.getPt(); final String preferredTerm = pt == null ? concept.getId() : pt.getTerm(); return SnomedConceptDocument.builder(concept) .label(preferredTerm) .build(); }) .getSync(); } catch (NotFoundException e) { return null; } }
Source:
<code>public Request(String value) { <START> super(); <END> this.value = value; }</code><technical_language>need for super()</technical_language>

Target:
public Request(String value) { this.value = value; }
Source:
<code>public DistributedLoadCommand(FileSystemContext fsContext) { super(fsContext); mSubmittedJobAttempts = Lists.newArrayList(); InstancedConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults()); final ClientContext clientContext = ClientContext.create(conf); <START> mClient = JobMasterClient.Factory.create( <END> JobMasterClientContext.newBuilder(clientContext).build()); }</code><technical_language>override Command#close() close this client there</technical_language>

Target:
public DistributedLoadCommand(FileSystemContext fsContext) { super(fsContext); mSubmittedJobAttempts = Lists.newArrayList(); final ClientContext clientContext = mFsContext.getClientContext(); mClient = JobMasterClient.Factory.create( JobMasterClientContext.newBuilder(clientContext).build()); }
Source:
<code>private TProtocol getProtocol(ThriftField field, ColumnIO columnIO, Events returnClause) { TProtocol p; final ThriftType type = field.getType(); switch (type.getType()) { case STOP: case VOID: default: throw new UnsupportedOperationException("can't convert type of " + field); case BOOL: case BYTE: case DOUBLE: case I16: case I32: case I64: case STRING: p = new PrimitiveWriteProtocol((PrimitiveColumnIO)columnIO, returnClause); break; case STRUCT: p = new StructWriteProtocol((GroupColumnIO)columnIO, (StructType)type, returnClause); break; case MAP: p = new MapWriteProtocol((GroupColumnIO)columnIO, (MapType)type, returnClause); break; case SET: <START> if (writeThreeLevelList) { <END> p = new ThreeLevelListWriteProtocol( (GroupColumnIO) columnIO, ((SetType) type).getValues(), returnClause); } else { p = new TwoLevelListWriteProtocol( (GroupColumnIO) columnIO, ((SetType) type).getValues(), returnClause); } break; case LIST: if (writeThreeLevelList) { p = new ThreeLevelListWriteProtocol( (GroupColumnIO) columnIO, ((ListType) type).getValues(), returnClause); } else { p = new TwoLevelListWriteProtocol( (GroupColumnIO) columnIO, ((ListType) type).getValues(), returnClause); } break; case ENUM: p = new EnumWriteProtocol((PrimitiveColumnIO)columnIO, (EnumType)type, returnClause); break; } return p; }</code><technical_language>refactor this out a method createListWriteProtocol(writeLevel3, columnIO, type, returnClause) this largely identical repeated block</technical_language>

Target:
private TProtocol getProtocol(ThriftField field, ColumnIO columnIO, Events returnClause) { TProtocol p; final ThriftType type = field.getType(); switch (type.getType()) { case STOP: case VOID: default: throw new UnsupportedOperationException("can't convert type of " + field); case BOOL: case BYTE: case DOUBLE: case I16: case I32: case I64: case STRING: p = new PrimitiveWriteProtocol((PrimitiveColumnIO)columnIO, returnClause); break; case STRUCT: p = new StructWriteProtocol((GroupColumnIO)columnIO, (StructType)type, returnClause); break; case MAP: p = new MapWriteProtocol((GroupColumnIO)columnIO, (MapType)type, returnClause); break; case SET: p = getListWriteProtocol((GroupColumnIO) columnIO, ((SetType) type).getValues(), returnClause); break; case LIST: p = getListWriteProtocol((GroupColumnIO) columnIO, ((ListType) type).getValues(), returnClause); break; case ENUM: p = new EnumWriteProtocol((PrimitiveColumnIO)columnIO, (EnumType)type, returnClause); break; } return p; }
Source:
<code>public <L, I extends IntegerType<I>> ImgLabeling<L, I> merge( final ImgLabeling<L, I> in1, final ImgLabeling<L, I> in2) { @SuppressWarnings("unchecked") final ImgLabeling<L, I> result = (ImgLabeling<L, I>) ops().run( <START> net.imagej.ops.labeling.MergeLabeling.class, in1, in2); <END> return result; }</code><technical_language>This ops().run(Ops.Labeling.Merge.class, in1, in2);. op implements Ops.Labeling.Merge interface matched, opposed net.imagej.ops.labeling.MergeLabeling. This changed in other merge(...) namespace methods</technical_language>

Target:
public <L, I extends IntegerType<I>> ImgLabeling<L, I> merge( final ImgLabeling<L, I> in1, final ImgLabeling<L, I> in2) { @SuppressWarnings("unchecked") final ImgLabeling<L, I> result = (ImgLabeling<L, I>) ops().run( net.imagej.ops.Ops.Labeling.Merge.class, in1, in2); return result; }
Source:
<code><START> protected IncomingMessageEnvelope handleNewRecord(ConsumerRecord<K, V> consumerRecord, <END> SystemStreamPartition systemStreamPartition) { return new IncomingMessageEnvelope(systemStreamPartition, String.valueOf(consumerRecord.offset()), consumerRecord.key(), consumerRecord.value(), KafkaUtilJava.getRecordSize(consumerRecord), consumerRecord.timestamp(), Instant.now().toEpochMilli()); }</code><technical_language>Maybe: 'toIME'</technical_language>

Target:
protected IncomingMessageEnvelope handleNewRecord(ConsumerRecord<K, V> consumerRecord, SystemStreamPartition systemStreamPartition) { return new IncomingMessageEnvelope(systemStreamPartition, String.valueOf(consumerRecord.offset()), consumerRecord.key(), consumerRecord.value(), getRecordSize(consumerRecord), consumerRecord.timestamp(), Instant.now().toEpochMilli()); }
Source:
<code>boolean timeToResize() { <START> return numberOfEntries == resizeLimit; <END> }</code><technical_language>I some spider-sense tingles here. If a user of this table claims checking timeToResize, resize. Putting in a >= some assert provide safety for future devs</technical_language>

Target:
boolean timeToResize() { return numberOfEntries >= resizeLimit; }