auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Map<SystemStreamPartition, List<String>> readTaskPartitionAssignments() { try { Map<SystemStreamPartition, List<String>> sspToTaskNamesMap = new HashMap<>(); Map<String, byte[]> allMetadataEntries = metadataStore.all(); for (Map.Entry<String, byte[]> entry : allMetadataEntries.entrySet()) { LOG.info("Trying to deserialize the system stream partition: {}", entry.getKey()); <START> SystemStreamPartition systemStreamPartition = getSystemStreamPartition(entry.getKey()); <END> String taskNameAsJson = valueSerde.fromBytes(entry.getValue()); List<String> taskNames = taskNameMapper.readValue(taskNameAsJson, new TypeReference<List<String>>() { }); sspToTaskNamesMap.put(systemStreamPartition, taskNames); } return sspToTaskNamesMap; } catch (Exception e) { throw new SamzaException("Exception occurred when reading task partition assignments.", e); } }</code><technical_language>guaranteed this mapping is stored in metadatastore</technical_language>

Target:
public Map<SystemStreamPartition, List<String>> readTaskPartitionAssignments() { try { Map<SystemStreamPartition, List<String>> sspToTaskNamesMap = new HashMap<>(); Map<String, byte[]> allMetadataEntries = metadataStore.all(); for (Map.Entry<String, byte[]> entry : allMetadataEntries.entrySet()) { SystemStreamPartition systemStreamPartition = deserializeSSPFromJson(entry.getKey()); String taskNamesAsJson = valueSerde.fromBytes(entry.getValue()); List<String> taskNames = taskNamesMapper.readValue(taskNamesAsJson, new TypeReference<List<String>>() { }); sspToTaskNamesMap.put(systemStreamPartition, taskNames); } return sspToTaskNamesMap; } catch (Exception e) { throw new SamzaException("Exception occurred when reading task partition assignments.", e); } }
Source:
<code>public void postProcess(ServerResponse response) { HttpSession httpSession = getCurrentSession(false); if (!current.get(MetaData.class).hasKey("async") || (!(Boolean.TRUE.equals((Boolean) current.get(MetaData.class).get("async"))))) { <START> httpSession.setAttribute("async", false); <END> } sessionHelper.clean(); }</code><technical_language>constant please, ovirt_aaa_ prefix. also, please explain request/response</technical_language>

Target:
public void postProcess(ServerResponse response) { if (current.get(MetaData.class).hasKey("async") && Boolean.TRUE.equals((Boolean) current.get(MetaData.class).get("async"))) { SessionUtils.getCurrentHttpServletRequest().setAttribute("ovirt_aaa_async", true); } sessionHelper.clean(); }
Source:
<code>public void changeDictionary(Dictionary oldDictionary, Dictionary newDictionary, boolean externalize) { final List<Dictionary> dictionaries = _userPreferences.getUserDictionaries(); if (dictionaries.remove(oldDictionary)) { if (externalize) { _configurationWriter.removeDictionary(oldDictionary.getName()); _userPreferences.save(); } } addDictionaryHelper(newDictionary, externalize); for(ReferenceDataChangeListener<Dictionary> listener : _dictionaryV2Listeners){ listener.onChange(oldDictionary, newDictionary); <START> } <END> }</code><technical_language>this missing update (remove+add) of old-style listeners, is handled else? (this for string pattern well)</technical_language>

Target:
public void changeDictionary(Dictionary oldDictionary, Dictionary newDictionary, boolean externalize) { final List<Dictionary> dictionaries = _userPreferences.getUserDictionaries(); if (dictionaries.remove(oldDictionary)) { if (externalize) { _configurationWriter.removeDictionary(oldDictionary.getName()); _userPreferences.save(); } } addDictionaryInternal(newDictionary, externalize); for(ReferenceDataChangeListener<Dictionary> listener : _dictionaryChangeListeners){ listener.onChange(oldDictionary, newDictionary); } for (DictionaryChangeListener listener : _dictionaryListeners) { listener.onRemove(oldDictionary); listener.onAdd(newDictionary); } }
Source:
<code><START> public String getContainer() { <END> return container; }</code><technical_language>![MAJOR](<LINK_0> 'Severity: MAJOR') Update this method implementation is identical "getParent2" line 144. [![rule](<LINK_1>](<LINK_2></technical_language>

Target:
public String getContainer() { return parent2; }
Source:
<code>public void entityReference(String entity) { <START> throw new UnsupportedOperationException("Builder does not currently support entity references."); END> }</code><technical_language>need for messages exceptions (detail stack trace, throw statements removed part of this review chain anyways)</technical_language>

Target:
public void entityReference(String entity) { throw new UnsupportedOperationException(); }
Source:
<code>public void setMaxBufferSize(final int size) { <START> ArgumentVerifier.assertNotNegative(size, "size"); <END> maxBufferSize = size; }</code><technical_language>this assertGreaterThanZero</technical_language>

Target:
public void setMaxBufferSize(final int size) { ArgumentVerifier.assertGreaterThanZero(size, "size"); maxBufferSize = size; }
Source:
<code>@Bean PaProgDataProcessor paProgrammeProcessor() { return new PaProgrammeProcessor(contentWriter, contentBuffer(), log, new PaTagMap(topicStore, <START> new MongoSequentialIdGenerator(mongo, "topics"))); <END> }</code><technical_language>"topics" a constant a magic string. TOPICS_STORE</technical_language>

Target:
@Bean PaProgDataProcessor paProgrammeProcessor() { return new PaProgrammeProcessor(contentWriter, contentBuffer(), log, paTagMap); }
Source:
<code>public void checkSourceType(CommandSource source) throws CommandException { checkNotNull(source, "source"); if (!testSourceType(source)) { <START> throw new CommandSourceTypeException(sourceType); <END> } }</code><technical_language>this.sourceType</technical_language>

Target:
public void checkSourceType(CommandSource source) throws CommandException { checkNotNull(source, "source"); if (!testSourceType(source)) { throw new CommandSourceTypeException(this.sourceType); } }
Source:
<code>private CompletableFuture<List<? extends ICodeMining>> provideCodeMinings(@NonNull IDocument document) { URI docURI = LSPEclipseUtils.toUri(document); if (docURI != null) { CodeLensParams param = new CodeLensParams(new TextDocumentIdentifier(docURI.toString())); return LanguageServiceAccessor .getLanguageServers(document, capabilities -> capabilities.getCodeLensProvider() != null) .thenComposeAsync(languageServers -> getCodeMiningsFromServers(languageServers, document, param)); <START> } else { <END> return null; } }</code><technical_language>This "else" removed</technical_language>

Target:
private CompletableFuture<List<? extends ICodeMining>> provideCodeMinings(@NonNull IDocument document) { URI docURI = LSPEclipseUtils.toUri(document); if (docURI != null) { CodeLensParams param = new CodeLensParams(new TextDocumentIdentifier(docURI.toString())); return LanguageServiceAccessor .getLanguageServers(document, capabilities -> capabilities.getCodeLensProvider() != null) .thenComposeAsync(languageServers -> getCodeMiningsFromServers(languageServers, document, param)); } return null; }
Source:
<code>public void setSizeCallback( CallbackDataProvider.CountCallback<T, ?> sizeCallback) { if (sizeCallback == null) { throw new IllegalArgumentException( <START> "Provided size callback cannot be null - for switching between defined and undefined size use setDefinedSize(boolean) method instead."); <END> } clearSizeCallbacksAndState(); this.sizeCallback = sizeCallback; definedSize = true; skipSizeCheckUntilReset = false; sizeReset = true; requestFlush(); }</code><technical_language>line break</technical_language>

Target:
public void setSizeCallback( CallbackDataProvider.CountCallback<T, ?> sizeCallback) { if (sizeCallback == null) { throw new IllegalArgumentException( "Provided size callback cannot be null - for switching " + "between defined and undefined size use " + "setDefinedSize(boolean) method instead."); } clearSizeCallbacksAndState(); this.sizeCallback = sizeCallback; definedSize = true; skipSizeCheckUntilReset = false; sizeReset = true; requestFlush(); }
Source:
<code>protected void zoomEntries(@NonNull Iterable<@NonNull TimeGraphEntry> entries, long zoomStartTime, long zoomEndTime, long resolution, @NonNull IProgressMonitor monitor) { if (resolution < 0) { return; } long start = Long.min(zoomStartTime, zoomEndTime); long end = Long.max(zoomStartTime, zoomEndTime); List<@NonNull Long> times = StateSystemUtils.getTimes(start, end, resolution); Sampling sampling = new Sampling(start, end, resolution); Multimap<ITimeGraphDataProvider<? extends TimeGraphEntryModel>, Long> providersToModelIds = filterGroupEntries(entries, zoomStartTime, zoomEndTime); SubMonitor subMonitor = SubMonitor.convert(monitor, getClass().getSimpleName() + "#zoomEntries", providersToModelIds.size()); for (Entry<ITimeGraphDataProvider<? extends TimeGraphEntryModel>, Collection<Long>> entry : providersToModelIds.asMap().entrySet()) { ITimeGraphDataProvider<? extends TimeGraphEntryModel> dataProvider = entry.getKey(); TimegraphStateQueryFilter filter = new TimegraphStateQueryFilter(times, entry.getValue(), getRegexes()); TmfModelResponse<List<ITimeGraphRowModel>> response = <START> dataProvider.fetchRowModel(filter, <END> monitor); List<ITimeGraphRowModel> model = response.getModel(); if (model != null) { zoomEntries(fEntries.row(dataProvider), model, response.getStatus() == ITmfResponse.Status.COMPLETED, sampling); } subMonitor.worked(1); } }</code><technical_language>bad is default implementation considers regex filters..</technical_language>

Target:
protected void zoomEntries(@NonNull Iterable<@NonNull TimeGraphEntry> entries, long zoomStartTime, long zoomEndTime, long resolution, @NonNull IProgressMonitor monitor) { if (resolution < 0) { return; } long start = Long.min(zoomStartTime, zoomEndTime); long end = Long.max(zoomStartTime, zoomEndTime); List<@NonNull Long> times = StateSystemUtils.getTimes(start, end, resolution); Sampling sampling = new Sampling(start, end, resolution); Multimap<ITimeGraphDataProvider<? extends TimeGraphEntryModel>, Long> providersToModelIds = filterGroupEntries(entries, zoomStartTime, zoomEndTime); SubMonitor subMonitor = SubMonitor.convert(monitor, getClass().getSimpleName() + "#zoomEntries", providersToModelIds.size()); for (Entry<ITimeGraphDataProvider<? extends TimeGraphEntryModel>, Collection<Long>> entry : providersToModelIds.asMap().entrySet()) { ITimeGraphDataProvider<? extends TimeGraphEntryModel> dataProvider = entry.getKey(); TimeGraphStateQueryFilter filter = new TimeGraphStateQueryFilter(times, entry.getValue(), getRegexes()); TmfModelResponse<List<ITimeGraphRowModel>> response = dataProvider.fetchRowModel(filter, monitor); List<ITimeGraphRowModel> model = response.getModel(); if (model != null) { zoomEntries(fEntries.row(dataProvider), model, response.getStatus() == ITmfResponse.Status.COMPLETED, sampling); } subMonitor.worked(1); } }
Source:
<code>public void execute(DsAPI digitalSTROM, String token) { DeviceSceneSpec sceneConfig = digitalSTROM.getDeviceSceneMode(token, device.getDSID(), null, sceneID); if (sceneConfig != null) { device.addSceneConfig(sceneID, sceneConfig); logger.debug("UPDATED scene configuration for dSID: {}, sceneID: {}, configuration: {}", <START> this.device.getDSID(), sceneID, sceneConfig.toString()); <END> } }</code><technical_language>remove toString()</technical_language>

Target:
public void execute(DsAPI digitalSTROM, String token) { DeviceSceneSpec sceneConfig = digitalSTROM.getDeviceSceneMode(token, device.getDSID(), null, sceneID); if (sceneConfig != null) { device.addSceneConfig(sceneID, sceneConfig); logger.debug("UPDATED scene configuration for dSID: {}, sceneID: {}, configuration: {}", this.device.getDSID(), sceneID, sceneConfig); } }
Source:
<code>public void testDataStalenessCheck() throws NetworkException, InterruptedException { <START> int i; <END> final int numberOfKeys = 3; doAnswer(invocation -> { final byte[] data = invocation.getArgumentAt(2, byte[].class); final AggregationMessage aggregationMessage = getTestAggregationMessage("worker", data); sspWorkerClockMessageHandler.onNext(aggregationMessage); return null; }).when(mockAggregationMaster).send(anyString(), anyString(), anyObject()); for (i = 0; i < (2 * numberOfKeys); i++) { parameterWorker.pull((i % numberOfKeys)); } assertEquals(initialGlobalMinimumClock, sspWorkerClock.getGlobalMinimumClock()); final byte[] data = codec.encode(ClockManager.getBroadcastMinClockMessage(initialGlobalMinimumClock + (2 * staleness))); mockAggregationMaster.send(ClockManager.AGGREGATION_CLIENT_NAME, "worker", data); assertEquals(initialGlobalMinimumClock + (2 * staleness), sspWorkerClock.getGlobalMinimumClock()); for (i = 0; i < numberOfKeys; i++) { parameterWorker.pull(i); } assertEquals(2 * numberOfKeys, numberOfPullRequests.get()); }</code><technical_language>embed in for</technical_language>

Target:
public void testDataStalenessCheck() throws NetworkException, InterruptedException { final int numberOfKeys = 3; doAnswer(invocation -> { final byte[] initClockMsgData = invocation.getArgumentAt(2, byte[].class); final AggregationMessage aggregationMessage = getTestAggregationMessage("worker", initClockMsgData); sspWorkerClockMessageHandler.onNext(aggregationMessage); return null; }).when(mockAggregationMaster).send(anyString(), anyString(), anyObject()); for (int i = 0; i < numberOfKeys; i++) { parameterWorker.pull(i); } verify(mockSender, times(numberOfKeys)).sendPullMsg(anyString(), anyObject()); for (int i = 0; i < numberOfKeys; i++) { parameterWorker.pull(i); } verify(mockSender, times(numberOfKeys)).sendPullMsg(anyString(), anyObject()); final int oldGlobalMinimumClock = workerClock.getGlobalMinimumClock(); final int deltaClock = STALENESS_BOUND + 1; final byte[] initClockMsgData = codec.encode(ClockManager.getBroadcastMinClockMessage(oldGlobalMinimumClock + deltaClock)); mockAggregationMaster.send(ClockManager.AGGREGATION_CLIENT_NAME, "worker", initClockMsgData); assertEquals(oldGlobalMinimumClock + deltaClock, workerClock.getGlobalMinimumClock()); for (int i = 0; i < numberOfKeys; i++) { parameterWorker.pull(i); } verify(mockSender, times(2 * numberOfKeys)).sendPullMsg(anyString(), anyObject()); }
Source:
<code>public void onClickMapIcon(final Address address) { <START> DefaultMap.startActivityCoords(this, new Geopoint(address.getLatitude(), address.getLongitude()), null, null); <END> finish(); }</code><technical_language>This method is tailored display arbitrary point a map, intention is. is currently method achieve want, need create a new (which includes creation of a new MapOptions contructor)</technical_language>

Target:
public void onClickMapIcon(final Address address) { DefaultMap.startActivityGeoCode(this, new Geopoint(address.getLatitude(), address.getLongitude())); finish(); }
Source:
<code>public OMElement serializeSpecificMediator(Mediator m) { if (!(m instanceof CallMediator)) { handleException("Unsupported mediator passed in for serialization : " + m.getType()); } CallMediator mediator = (CallMediator) m; OMElement call = fac.createOMElement("call", synNS); saveTracingState(call, mediator); Endpoint activeEndpoint = mediator.getEndpoint(); if (activeEndpoint != null) { call.addChild(EndpointSerializer.getElementFromEndpoint(activeEndpoint)); } <START> call.addAttribute(fac.createOMAttribute("blocking", nullNS, Boolean.toString(mediator.getBlocking()))); <END> return call; }</code><technical_language>need add attribute always. add attribute, if blocking is true</technical_language>

Target:
public OMElement serializeSpecificMediator(Mediator m) { if (!(m instanceof CallMediator)) { handleException("Unsupported mediator passed in for serialization : " + m.getType()); } CallMediator mediator = (CallMediator) m; OMElement call = fac.createOMElement("call", synNS); saveTracingState(call, mediator); Endpoint activeEndpoint = mediator.getEndpoint(); if (activeEndpoint != null) { call.addChild(EndpointSerializer.getElementFromEndpoint(activeEndpoint)); } if (mediator.getBlocking() == true) { call.addAttribute(fac.createOMAttribute("blocking", nullNS, Boolean.toString(mediator.getBlocking()))); } return call; }
Source:
<code>private List<MemberIdentity> getMembersFromGroup(String groupId) { Collection<MemberDescription> members = new ArrayList<>(); try { members = describeConsumerGroups(Collections.singleton(groupId)).describedGroups().get(groupId).get().members(); } catch (Throwable ex) { System.out.println("Encounter exception when trying to get members from group: " + groupId); <START> ex.printStackTrace(); <END> } List<MemberIdentity> memberToRemove = new ArrayList<>(); for (MemberDescription member: members) { if (member.groupInstanceId().isPresent()) { memberToRemove.add(new MemberIdentity().setGroupInstanceId(member.groupInstanceId().get()) ); } else { memberToRemove.add(new MemberIdentity().setMemberId(member.consumerId())); } } return memberToRemove; }</code><technical_language>Curious continuing in this case, member lookup fails</technical_language>

Target:
private List<MemberIdentity> getMembersFromGroup(String groupId) { Collection<MemberDescription> members; try { members = describeConsumerGroups(Collections.singleton(groupId)).describedGroups().get(groupId).get().members(); } catch (Exception ex) { throw new KafkaException("Encounter exception when trying to get members from group: " + groupId, ex); } List<MemberIdentity> membersToRemove = new ArrayList<>(); for (final MemberDescription member : members) { if (member.groupInstanceId().isPresent()) { membersToRemove.add(new MemberIdentity().setGroupInstanceId(member.groupInstanceId().get())); } else { membersToRemove.add(new MemberIdentity().setMemberId(member.consumerId())); } } return membersToRemove; }
Source:
<code>@Test public void queryParamMapsConvertedToNullShouldError() throws IOException, InterruptedException { class Example { @POST("/query") Call<String> queryPath(@QueryMap HashMap<String, String> a) { return null; } } Retrofit.Builder retrofitBuilder = new Retrofit.Builder() .baseUrl("<LINK_0>") .addConverterFactory(new NullObjectConverterFactory()); final HashMap<String, String> queryMap = new HashMap<String, String>() {{ put("Ignored", "Always Null"); }}; try { buildRequest(Example.class, retrofitBuilder, queryMap); fail(); } catch (IllegalArgumentException e) { <START> assertThat(e).hasMessageContaining("Query map contained null value for key"); <END> } }</code><technical_language>nit: hasMessage(...) full message</technical_language>

Target:
@Test public void queryParamMapsConvertedToNullShouldError() throws IOException, InterruptedException { class Example { @POST("/query") Call<String> queryPath(@QueryMap HashMap<String, String> a) { return null; } } Retrofit.Builder retrofitBuilder = new Retrofit.Builder() .baseUrl("<LINK_0>") .addConverterFactory(new NullObjectConverterFactory()); final Map<String, String> queryMap = new LinkedHashMap<String, String>() {{ put("Ignored", "Always Null"); }}; try { buildRequest(Example.class, retrofitBuilder, queryMap); fail(); } catch (IllegalArgumentException e) { assertThat(e).hasMessageContaining("Query map contained null value for key 'Ignored'"); } }
Source:
<code>public void verifyAllPinTypesIsUncheck() { waitForElementByElement(allPinTypes); if(allPinTypes.getAttribute("class").contains("enabled")) { <START> PageObjectLogging.log("verifyAllPointTypesIsUnCheck", "All pin types was checked", false); <END> }else { PageObjectLogging.log("verifyAllPointTypesIsUnCheck", "All pin types was unchecked", true); } }</code><technical_language>"were" "was". Correct this grammar in other messages</technical_language>

Target:
public void verifyAllPinTypesIsUncheck() { try { waitForElementByElement(allPinTypes); if (!allPinTypes.getAttribute("class").contains("enabled")) { PageObjectLogging.log("verifyAllPointTypesIsUnCheck", "All pin types were unchecked", true); } }catch (Exception e) { PageObjectLogging.log("verifyAllPointTypesIsUnCheck", "All pin types were checked", false); } }
Source:
<code>public void onFollowTapped(View view, String blogName, final long blogId) { mDispatcher.dispatch(AccountActionBuilder.newFetchSubscriptionsAction()); Snackbar.make(view, Html.fromHtml(getString(R.string.reader_followed_blog_notifications, <START> "<b>", blogName, "</b>")), Snackbar.LENGTH_LONG) <END> .setAction(getString(R.string.reader_followed_blog_notifications_action), new View.OnClickListener() { @Override public void onClick(View view) { AnalyticsUtils.trackWithSiteId(Stat.FOLLOWED_BLOG_NOTIFICATIONS_READER_ENABLED, blogId); AddOrDeleteSubscriptionPayload payload = new AddOrDeleteSubscriptionPayload( String.valueOf(blogId), SubscriptionAction.NEW); mDispatcher.dispatch(newUpdateSubscriptionNotificationPostAction(payload)); } }) .setActionTextColor(getResources().getColor(R.color.color_accent)) .show(); }</code><technical_language>settings a duration of actionable Snackbars, I suggest AccessibilityUtils.getSnackbarDuration. designed provide a longer delay for users accessibility services enabled</technical_language>

Target:
public void onFollowTapped(View view, String blogName, final long blogId) { mDispatcher.dispatch(AccountActionBuilder.newFetchSubscriptionsAction()); String blog = TextUtils.isEmpty(blogName) ? getString(R.string.reader_followed_blog_notifications_this) : blogName; Snackbar.make(view, Html.fromHtml(getString(R.string.reader_followed_blog_notifications, "<b>", blog, "</b>")), AccessibilityUtils.getSnackbarDuration(getActivity())) .setAction(getString(R.string.reader_followed_blog_notifications_action), new View.OnClickListener() { @Override public void onClick(View view) { AnalyticsUtils.trackWithSiteId(Stat.FOLLOWED_BLOG_NOTIFICATIONS_READER_ENABLED, blogId); AddOrDeleteSubscriptionPayload payload = new AddOrDeleteSubscriptionPayload( String.valueOf(blogId), SubscriptionAction.NEW); mDispatcher.dispatch(newUpdateSubscriptionNotificationPostAction(payload)); ReaderBlogTable.setNotificationsEnabledByBlogId(blogId, true); } }) .setActionTextColor(getResources().getColor(R.color.color_accent)) .show(); }
Source:
<code>private static void printDownstream(PrintStream buildLog, List<FailureCauseDisplayData> downstreamFailureCauses) { if (!downstreamFailureCauses.isEmpty()) { <START> for (FailureCauseDisplayData displayData : downstreamFailureCauses) { <END> FailureCauseDisplayData.Links links = displayData.getLinks(); if (!displayData.getFoundFailureCauses().isEmpty()) { buildLog.println("[BFA] See: " + Jenkins.getInstance().getRootUrl() + links.getBuildUrl()); for (FoundFailureCause foundCause : displayData.getFoundFailureCauses()) { String foundString = "[BFA] " + foundCause.getName(); if (foundCause.getCategories() != null) { foundString += " from category " + foundCause.getCategories().get(0); } buildLog.println(foundString); } } printDownstream(buildLog, displayData.getDownstreamFailureCauses()); } } }</code><technical_language>Tripple check downstreamFailureCauses.isEmpty()? :) check call method, check in method well, if is empty for loop skip</technical_language>

Target:
private static void printDownstream(PrintStream buildLog, List<FailureCauseDisplayData> downstreamFailureCauses) { for (FailureCauseDisplayData displayData : downstreamFailureCauses) { FailureCauseDisplayData.Links links = displayData.getLinks(); if (!displayData.getFoundFailureCauses().isEmpty()) { buildLog.println("[BFA] See: " + Jenkins.getInstance().getRootUrl() + links.getBuildUrl()); for (FoundFailureCause foundCause : displayData.getFoundFailureCauses()) { String foundString = "[BFA] " + foundCause.getName(); if (foundCause.getCategories() != null) { foundString += " from category " + foundCause.getCategories().get(0); } buildLog.println(foundString); } } printDownstream(buildLog, displayData.getDownstreamFailureCauses()); } }
Source:
<code>public void processBindingConfiguration(String context, Item item, String bindingConfig) throws BindingConfigParseException { super.processBindingConfiguration(context, item, bindingConfig); if (bindingConfig == null) { logger.debug("binding-configuration is currently not set for item: " + item.getName()); <START> } <END> String itemName = null; Matcher mItemName = Pattern.compile(REGEX_ITEM_NAME).matcher(bindingConfig); if (mItemName.find()) { itemName = mItemName.group(1); } String typeString = null; Matcher mType = Pattern.compile(REGEX_TYPE).matcher(bindingConfig); if (mType.find()) { typeString = mType.group(1); } CalDavType type = null; try { type = CalDavType.valueOf(typeString); } catch (IllegalArgumentException e) { throw new BindingConfigParseException("cannot read required parameter 'type' for item: " + item.getName()); } logger.debug("adding item: {}", item.getName()); this.addBindingConfig(item, new CalDavNextEventConfig(item.getName(), itemName, type)); }</code><technical_language>logging: Please slf4j parametrization instead of string concatenation</technical_language>

Target:
public void processBindingConfiguration(String context, Item item, String bindingConfig) throws BindingConfigParseException { super.processBindingConfiguration(context, item, bindingConfig); if (bindingConfig == null) { logger.debug("binding-configuration is currently not set for item: {}", item.getName()); } String itemName = null; Matcher mItemName = Pattern.compile(REGEX_ITEM_NAME).matcher(bindingConfig); if (mItemName.find()) { itemName = mItemName.group(1); } String typeString = null; Matcher mType = Pattern.compile(REGEX_TYPE).matcher(bindingConfig); if (mType.find()) { typeString = mType.group(1); } CalDavType type = null; try { type = CalDavType.valueOf(typeString); } catch (IllegalArgumentException e) { throw new BindingConfigParseException("cannot read required parameter 'type' for item: " + item.getName()); } logger.debug("adding item: {}", item.getName()); this.addBindingConfig(item, new CalDavNextEventConfig(item.getName(), itemName, type)); }
Source:
<code>private void checkoutCommit(RevCommit commit) throws IOException { try { monitor.beginTask( "Rewinding to commit " + commit.getShortMessage(), ProgressMonitor.UNKNOWN); RevCommit head = walk.parseCommit(repo.resolve(Constants.HEAD)); DirCacheCheckout dco = new DirCacheCheckout(repo, head.getTree() .getId(), repo.lockDirCache(), commit.getTree().getId()); dco.setFailOnConflict(true); dco.checkout(); walk.release(); RefUpdate refUpdate = repo.updateRef(Constants.HEAD, true); refUpdate.setNewObjectId(commit); <START> Result res = refUpdate.forceUpdate(); <END> switch (res) { case REJECTED: case IO_FAILURE: case LOCK_FAILURE: throw new IOException("Could not rewind to upstream commit"); default: break; } } finally { monitor.endTask(); } }</code><technical_language>read head line 391 parseCommit call. If HEAD update occurs, screwed, else updated HEAD backs. Add in: refUpdate.setExpectedOldObjectId(head); a RevWalk hand, pass forceUpdate() need allocate revision pool</technical_language>

Target:
private void checkoutCommit(RevCommit commit) throws IOException { try { monitor.beginTask( "Rewinding to commit " + commit.getShortMessage(), ProgressMonitor.UNKNOWN); RevCommit head = walk.parseCommit(repo.resolve(Constants.HEAD)); DirCacheCheckout dco = new DirCacheCheckout(repo, head.getTree() .getId(), repo.lockDirCache(), commit.getTree().getId()); dco.setFailOnConflict(true); dco.checkout(); walk.release(); RefUpdate refUpdate = repo.updateRef(Constants.HEAD, true); refUpdate.setExpectedOldObjectId(head); refUpdate.setNewObjectId(commit); Result res = refUpdate.forceUpdate(); switch (res) { case FAST_FORWARD: case NO_CHANGE: case FORCED: break; default: throw new IOException("Could not rewind to upstream commit"); } } finally { monitor.endTask(); } }
Source:
<code>public boolean isRunning() { <START> return true; <END> }</code><technical_language>no, this.running anyway. rely this.contextStopped variable..</technical_language>

Target:
public boolean isRunning() { return this.running; }
Source:
<code>public synchronized boolean addRevision(InternalCDORevision revision) { <START> if (revision.getBranch().getID() == 34 && revision.getVersion() == 2 && revision.getEClass().getName().equals("Concept")) { <END> System.err.println(); } int version = revision.getVersion(); for (ListIterator<InternalCDORevision> it = listIterator(); it.hasNext();) { InternalCDORevision revisionInList = it.next(); int v = revisionInList.getVersion(); if (v == version) { return false; } if (v < version) { it.previous(); it.add(revision); return true; } } addLast(revision); return true; }</code><technical_language>Diagnostic code snippet</technical_language>

Target:
public synchronized boolean addRevision(InternalCDORevision revision) { int version = revision.getVersion(); for (ListIterator<InternalCDORevision> it = listIterator(); it.hasNext();) { InternalCDORevision revisionInList = it.next(); int v = revisionInList.getVersion(); if (v == version) { return false; } if (v < version) { it.previous(); it.add(revision); return true; } } addLast(revision); return true; }
Source:
<code>private final String addPrimaryDomainIfNotExists(String userName) { <START> if ((userName.indexOf(UserCoreConstants.DOMAIN_SEPARATOR)) < 0 && StringUtils.isNotEmpty(userName)) { <END> StringBuilder builder = new StringBuilder(); builder.append(UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME).append(CarbonConstants.DOMAIN_SEPARATOR) .append(userName); userName = builder.toString(); } return userName; }</code><technical_language>null check first. ie, if (StringUtils.isNotEmpty(userName) && (userName.indexOf(UserCoreConstants.DOMAIN_SEPARATOR)) < 0) {</technical_language>

Target:
private final String addPrimaryDomainIfNotExists(String userName) { if (StringUtils.isNotEmpty(userName) && (!userName.contains(UserCoreConstants.DOMAIN_SEPARATOR))) { StringBuilder builder = new StringBuilder(); builder.append(UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME).append(CarbonConstants.DOMAIN_SEPARATOR) .append(userName); userName = builder.toString(); } return userName; }
Source:
<code>private void addVmRngDevice() { VmRngDevice rngDev = getParameters().getRngDevice(); if (rngDev != null) { RngDeviceParameters params = new RngDeviceParameters(rngDev, true); VdcReturnValueBase result = getBackend().runInternalAction(VdcActionType.AddRngDevice, params); if (!result.getSucceeded()) { <START> throw new <END> IllegalStateException("Couldn't add RNG device."); } } }</code><technical_language>IllegalArgumentException maybe? long constructor worth pass result cando this command result actual invoker wrong try? getCanDoActions().addAll(result.getCanDoActions())</technical_language>

Target:
private void addVmRngDevice() { VmRngDevice rngDev = getParameters().getRngDevice(); if (rngDev != null) { RngDeviceParameters params = new RngDeviceParameters(rngDev, true); VdcReturnValueBase result = getBackend().runInternalAction(VdcActionType.AddRngDevice, params); if (!result.getSucceeded()) { throw new IllegalArgumentException("Couldn't add RNG device."); } } }
Source:
<code>public void testMd5DigestSecretGeneration01() { Map<String, Object> conf = new HashMap<>(); conf.put(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD, "foobar:12345"); conf.put(Config.STORM_ZOOKEEPER_AUTH_SCHEME, "anything"); Map<String, Object> result = StormSubmitter.prepareZookeeperAuthentication(conf); Object actualPayload = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD); Object actualScheme = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_SCHEME); <START> assertThat(actualPayload, is("foobar:12345")); <END> assertThat(actualScheme, is("digest")); }</code><technical_language>assertEquals below</technical_language>

Target:
public void testMd5DigestSecretGeneration01() { Map<String, Object> conf = new HashMap<>(); conf.put(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD, "foobar:12345"); conf.put(Config.STORM_ZOOKEEPER_AUTH_SCHEME, "anything"); Map<String, Object> result = StormSubmitter.prepareZookeeperAuthentication(conf); Object actualPayload = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD); Object actualScheme = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_SCHEME); assertEquals("foobar:12345", actualPayload); assertEquals("digest", actualScheme); }
Source:
<code><START> private void doMoves(Enemy enemy, int x, int y) <END> { if (enemy.getRandom() < GameConstants.AI_RANDOMIZER) { if(enemy.getRandom() < (0.03f * GameConstants.AI_RANDOMIZER)) { enemy.jump(); addToLog("[AI]\tAn enemy just did the super rare JUMP SPAM!"); } else if(enemy.getRandom() < (0.50f * GameConstants.AI_RANDOMIZER)) { enemy.goLeft(); } else if(enemy.getRandom() < (1.00f * GameConstants.AI_RANDOMIZER)) { enemy.goRight(); } return; } if(y == 1) { if(enemy.getLastWall()) { enemy.goLeft(); } else { enemy.goRight(); } if(enemy.getLocation().getX() < 3.5) { enemy.setLastWall(false); } else if(enemy.getLocation().getX() > this.level.getCells().getWidth() - 3.5) { enemy.setLastWall(true); } return; } if(x == 1) { enemy.goRight(); } if(x == -1) { enemy.goLeft(); } if(y == -1) { enemy.jump(); } }</code><technical_language>change right now, nice seperate this method multiple tinier ones. < layout</technical_language>

Target:
private void doMoves(Enemy enemy, int x, int y) { if (enemy.getRandom() < GameConstants.AI_RANDOMIZER) { doRandomMove(enemy); return; } if(y == 1) { fallOffPlatform(enemy); return; } if(x == 1) { enemy.goRight(); } if(x == -1) { enemy.goLeft(); } if(y == -1) { enemy.jump(); } }
Source:
<code>private void assertFormalParameters(final InformationItem... parameters) { <START> final int parameterCount = parameters.length; <END> assertEquals(parameterCount, function.getFormalParameter().size()); for (int i = 0; i < parameterCount; i++) { assertEquals(parameters[i], function.getFormalParameter().get(i)); } }</code><technical_language>oneliner assertj java Assertions.assertThat(function.getFormalParameter()).containsExactly(parameters);</technical_language>

Target:
private void assertFormalParameters(final InformationItem... parameters) { assertThat(function.getFormalParameter()).containsExactly(parameters); }
Source:
<code>public TemplateStore getCodeTemplateStore() { if (fCodeTemplateStore == null) { Promise<TemplateStore> p = getPluginInitializer().getTemplateStore(); try { fCodeTemplateStore = p.getValue(); } catch (InvocationTargetException e) { <START> e.printStackTrace(); <END> log(e); } catch (InterruptedException e) { e.printStackTrace(); log(e); } } return fCodeTemplateStore; }</code><technical_language>Please remove</technical_language>

Target:
public TemplateStore getCodeTemplateStore() { if (fCodeTemplateStore == null) { Promise<TemplateStore> p = getTemplateStoreInitializer().getTemplateStore(); try { fCodeTemplateStore = p.getValue(); } catch (InvocationTargetException e) { log(e); } catch (InterruptedException e) { log(e); } } return fCodeTemplateStore; }
Source:
<code>public AccountServiceMetrics(MetricRegistry metricRegistry) { <START> startupTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "startupTimeInMs")); <END> updateAccountTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "updateAccountTimeInMs")); fetchRemoteAccountTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "fetchRemoteAccountTimeInMs")); unRecognizedMessageErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "unRecognizedMessageErrorCount")); notifyAccountDataChangeErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "notifyAccountDataChangeErrorCount")); updateAccountErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "updateAccountErrorCount")); fetchRemoteAccountErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "fetchRemoteAccountErrorCount")); remoteDataCorruptionErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "remoteDataCorruptionErrorCount")); }</code><technical_language>I metric registry names capitalized, "StartupTimeInMs"</technical_language>

Target:
public AccountServiceMetrics(MetricRegistry metricRegistry) { startupTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "StartupTimeInMs")); updateAccountTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "UpdateAccountTimeInMs")); fetchRemoteAccountTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "FetchRemoteAccountTimeInMs")); unRecognizedMessageErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "UnRecognizedMessageErrorCount")); notifyAccountDataChangeErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "NotifyAccountDataChangeErrorCount")); updateAccountErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "UpdateAccountErrorCount")); fetchRemoteAccountErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "FetchRemoteAccountErrorCount")); remoteDataCorruptionErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "RemoteDataCorruptionErrorCount")); }
Source:
<code>public void testConvertToTask() { UserTaskInstanceDesc userTaskWithSla = new UserTaskInstanceDesc(Long.valueOf(1), "Ready", new Date(), "Task1_name", "Task1_desc", 1, "Task1_Owner", "Task1_Creator", "deployment", "Process", 1L, new Date(), new Date(), 1L, new Date(), ProcessInstance.SLA_PENDING); <START> UserTaskInstanceDesc userTask = <END> new UserTaskInstanceDesc(Long.valueOf(1), "Ready", new Date(), "Task1_name", "Task1_desc", 1, "Task1_Owner", "Task1_Creator", "deployment", "Process", 1L, new Date(), new Date()); verifyTaskInstanceEqualsUserTaskInstance(userTask, ConvertUtils.convertToTask(userTask)); verifyTaskInstanceEqualsUserTaskInstance(userTaskWithSla, ConvertUtils.convertToTask(userTaskWithSla)); }</code><technical_language>a minimal chance, test run midnight, new Date() calls fall days, effectively leading failing test. transform dates based string representation? Date fields swapped, dates in string for field</technical_language>

Target:
public void testConvertToTask() { Date testDate = new Date(); UserTaskInstanceDesc userTaskWithSla = new UserTaskInstanceDesc(Long.valueOf(1), "Ready", testDate, "Task1_name", "Task1_desc", 1, "Task1_Owner", "Task1_Creator", "deployment", "Process", 1L, testDate, testDate, 1L, testDate, ProcessInstance.SLA_PENDING); UserTaskInstanceDesc userTask = new UserTaskInstanceDesc(Long.valueOf(1), "Ready", testDate, "Task1_name", "Task1_desc", 1, "Task1_Owner", "Task1_Creator", "deployment", "Process", 1L, testDate, testDate); verifyTaskInstanceEqualsUserTaskInstance(userTask, ConvertUtils.convertToTask(userTask)); verifyTaskInstanceEqualsUserTaskInstance(userTaskWithSla, ConvertUtils.convertToTask(userTaskWithSla)); }
Source:
<code>public CRC32CDigestManager(long ledgerId, boolean useV2Protocol, ByteBufAllocator allocator) { super(ledgerId, useV2Protocol, allocator); if (!Sse42Crc32C.isSupported()) { <START> log.error("Sse42Crc32C is not supported, will use slower CRC32C implementation."); <END> } }</code><technical_language>If correcting grammar, include indefinite article ;) if this suggestion works... suggestion log.error("Sse42Crc32C is supported, a slower CRC32C implementation.");</technical_language>

Target:
public CRC32CDigestManager(long ledgerId, boolean useV2Protocol, ByteBufAllocator allocator) { super(ledgerId, useV2Protocol, allocator); if (!Sse42Crc32C.isSupported()) { log.error("Sse42Crc32C is not supported, will use a slower CRC32C implementation."); } }
Source:
<code>public static Step map(org.ovirt.engine.core.common.job.Step entity, Step step) { Step model = step != null ? step : new Step(); model.setId(entity.getId().toString()); if (entity.getParentStepId() != null) { Step parentStep = new Step(); parentStep.setId(entity.getParentStepId().toString()); model.setParentStep(parentStep); } Job job = new Job(); job.setId(entity.getJobId().toString()); model.setJob(job); StepEnum type = map(entity.getStepType()); model.setType(type == null ? null : type.value()); model.setDescription(entity.getDescription()); model.setNumber(entity.getStepNumber()); model.setStatus(JobMapper.map(entity.getStatus(), null)); model.setStartTime(DateMapper.map(entity.getStartTime(), null)); if (entity.getEndTime() != null) { model.setEndTime(TypeConversionHelper.toXMLGregorianCalendar(entity.getEndTime(), null)); } model.setExternal(entity.isExternal()); if (entity.getExternalSystem() != null && entity.getExternalSystem().getType() != null) { model.setExternalType(entity.getExternalSystem().getType().name()); <START> } <END> return model; }</code><technical_language>dealing enum values, ExternalSystemType enum in API map values engine explicitly, do other enums</technical_language>

Target:
public static Step map(org.ovirt.engine.core.common.job.Step entity, Step step) { Step model = step != null ? step : new Step(); model.setId(entity.getId().toString()); if (entity.getParentStepId() != null) { Step parentStep = new Step(); parentStep.setId(entity.getParentStepId().toString()); model.setParentStep(parentStep); } Job job = new Job(); job.setId(entity.getJobId().toString()); model.setJob(job); StepEnum type = map(entity.getStepType()); model.setType(type == null ? null : type.value()); model.setDescription(entity.getDescription()); model.setNumber(entity.getStepNumber()); model.setStatus(JobMapper.map(entity.getStatus(), null)); model.setStartTime(DateMapper.map(entity.getStartTime(), null)); if (entity.getEndTime() != null) { model.setEndTime(TypeConversionHelper.toXMLGregorianCalendar(entity.getEndTime(), null)); } model.setExternal(entity.isExternal()); if (entity.getExternalSystem() != null && entity.getExternalSystem().getType() != null) { model.setExternalType(map(entity.getExternalSystem().getType())); } return model; }
Source:
<code>public AbstractRibbonCommandFactory(Set<ZuulFallbackProvider> fallbackProviders){ this.fallbackProviders = fallbackProviders; this.fallbackProviderCache = new HashMap<String, ZuulFallbackProvider>(); <START> } <END></code><technical_language>eagerly create cache here</technical_language>

Target:
public AbstractRibbonCommandFactory(Set<ZuulFallbackProvider> fallbackProviders){ this.fallbackProviderCache = new HashMap<String, ZuulFallbackProvider>(); for(ZuulFallbackProvider provider : fallbackProviders) { fallbackProviderCache.put(provider.getRoute(), provider); } }
Source:
<code>private ByteBuffer readBlob(ReadableStreamChannel postContent) throws InterruptedException { ByteBuffer blobData = ByteBuffer.allocate((int) postContent.getSize()); ByteBufferSWC channel = new ByteBufferSWC(); postContent.readInto(channel, new CloseWriteChannelCallback(channel)); ByteBuffer chunk = channel.getNextChunk(); BufferOverflowException exception = null; while (chunk != null) { if (chunk.remaining() > blobData.remaining()) { <START> exception = new BufferOverflowException(); <END> } else { blobData.put(chunk); } channel.resolveChunk(chunk, exception); if (exception != null) { channel.close(); throw exception; } else { chunk = channel.getNextChunk(); } } blobData.flip(); return blobData; }</code><technical_language>this is a BufferOverflowException, more IllegalStateException</technical_language>

Target:
private ByteBuffer readBlob(ReadableStreamChannel postContent) throws InterruptedException { ByteBuffer blobData = ByteBuffer.allocate((int) postContent.getSize()); ByteBufferAWC channel = new ByteBufferAWC(); postContent.readInto(channel, new CloseWriteChannelCallback(channel)); ByteBuffer chunk = channel.getNextChunk(); IllegalStateException exception = null; while (chunk != null) { if (chunk.remaining() > blobData.remaining()) { exception = new IllegalStateException("Data size advertized does not match actual size of data"); } else { blobData.put(chunk); } channel.resolveChunk(chunk, exception); if (exception != null) { channel.close(); throw exception; } else { chunk = channel.getNextChunk(); } } blobData.flip(); return blobData; }
Source:
<code>public final <A, B> Effect1<B> comap(Effect1<A> e1, final F<B, A> f) { return b -> { <START> e1.f(f.f(b)); <END> }; }</code><technical_language>Is of curly brackets necessary returning a void value</technical_language>

Target:
public final <A, B> Effect1<B> comap(Effect1<A> e1, final F<B, A> f) { return b -> e1.f(f.f(b)); }
Source:
<code>private static void checkSequenceName(final String name) { ValidationUtils.nonNull(name ,"Sequence name should not be null"); <START> ValidationUtils.nonEmpty(name,"Sequence name should not be empty"); <END> for (int i = 0; i < name.length(); i++) { final char ch = name.charAt(i); if (Character.isWhitespace(ch)) { throw new IllegalArgumentException("the input name contains blank characters: '" + name + "'"); } else if (Character.isISOControl(ch)) { throw new IllegalArgumentException("the input name contains control characters: '" + name + "'"); } } }</code><technical_language>missing space ,</technical_language>

Target:
private static void checkSequenceName(final String name) { ValidationUtils.nonEmpty(name, "Sequence name"); for (int i = 0; i < name.length(); i++) { final char ch = name.charAt(i); if (Character.isWhitespace(ch)) { throw new IllegalArgumentException("the input name contains blank characters: '" + name + "'"); } else if (Character.isISOControl(ch)) { throw new IllegalArgumentException("the input name contains control characters: '" + name + "'"); } } }
Source:
<code>public void testDelete() throws InterruptedException { server.enqueue( new MockResponse().setBody("") <START> ); <END> snapshotApi().deleteSnapshot("some-id"); assertEquals(server.getRequestCount(), 1); assertSent(server, "DELETE", "/snapshots/some-id"); }</code><technical_language>Instead of empty body, configure a response 204 status code</technical_language>

Target:
public void testDelete() throws InterruptedException { server.enqueue(response204()); snapshotApi().delete("some-id"); assertEquals(server.getRequestCount(), 1); assertSent(server, "DELETE", "/snapshots/some-id"); }
Source:
<code>void syncConfig() { for(Options configOption:Options.values()) <START> { <END> configOption.value=configuration.getInt(configOption.name(), Configuration.CATEGORY_GENERAL, configOption.defaultValue, configOption.minValue, configOption.maxValue, configOption.description); } if (configuration.hasChanged()) { configuration.save(); } }</code><technical_language>Formatting..</technical_language>

Target:
void syncConfig() { for (Options configOption : Options.values()) { configOption.value = configuration.getInt(configOption.getNicelyFormattedName(), Configuration.CATEGORY_GENERAL, configOption.defaultValue, configOption.minValue, configOption.maxValue, configOption.description); } if (configuration.hasChanged()) { configuration.save(); } }
Source:
<code>public Observable<GitHubRepository> getRepository() { <START> return repository; <END> }</code><technical_language>hide()</technical_language>

Target:
public Observable<GitHubRepository> getRepository() { return repository.hide(); }
Source:
<code><START> public static void processEntitySpawnsFromEvent(PhaseContext<?> context, SpawnEntityEvent destruct) { <END> for (org.spongepowered.api.entity.Entity entity : destruct.getEntities()) { final Entity minecraftEntity = toNative(entity); if (minecraftEntity instanceof EntityItem) { final ItemStack item = ((EntityItem) minecraftEntity).getItem(); if (!item.isEmpty()) { final Optional<Entity> customEntityItem = ((IMixinItem) item.getItem()).getCustomEntityItem(minecraftEntity.getEntityWorld(), minecraftEntity, item); if (customEntityItem.isPresent()) { context.getCapturedEntities().add(fromNative(customEntityItem.get())); continue; } } } getMixinWorld(entity).forceSpawnEntity(entity); } }</code><technical_language>call this parameter destruct</technical_language>

Target:
public static boolean processEntitySpawnsFromEvent(PhaseContext<?> context, SpawnEntityEvent destruct) { final User creator = context.getNotifier().orElse(context.getOwner().orElse(null)); return processEntitySpawnsFromEvent(destruct, ENTITY_CREATOR_FUNCTION.apply(context)); }
Source:
<code>private static int covnertIpToInt(String ipAdd) { String[] subAdd = ipAdd.split("\\."); int output = 0; int temp; <START> for (int index = 3; index > -1; index--) { <END> temp = Integer.parseInt(subAdd[3 - index]); temp <<= (index * 8); output |= temp; } return output; }</code><technical_language>1. OutOfBoundaries prone. 2. do start significant part</technical_language>

Target:
private static long covnertIpToInt(String ipAdd) { String[] subAdd = ipAdd.split("\\."); long output = 0; long temp; for (int index = 3; index > -1; index--) { temp = Integer.parseInt(subAdd[3 - index]); temp <<= (index * 8); output |= temp; } return output; }