auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>Interval findIntervalForKillTask(String dataSource, int limit) { List<Interval> unusedSegmentIntervals = segmentManager.getUnusedSegmentIntervals( dataSource, new Interval( 0, System.currentTimeMillis() - retainDuration ), limit ); <START> if (unusedSegmentIntervals != null && unusedSegmentIntervals.size() > 0) { <END> long start = -1; long end = -1; for (Interval interval : unusedSegmentIntervals) { if (start == -1 || start > interval.getStartMillis()) { start = interval.getStartMillis(); } if (end == -1 || end < interval.getEndMillis()) { end = interval.getEndMillis(); } } return new Interval(start, end); } else { return null; } }</code><technical_language>this replaced return JodaUtils.umbrellaInterval(usedSegmentIntervals)</technical_language>

Target:
Interval findIntervalForKillTask(String dataSource, int limit) { List<Interval> unusedSegmentIntervals = segmentManager.getUnusedSegmentIntervals( dataSource, new Interval( 0, System.currentTimeMillis() - retainDuration ), limit ); if (unusedSegmentIntervals != null && unusedSegmentIntervals.size() > 0) { return JodaUtils.umbrellaInterval(unusedSegmentIntervals); } else { return null; } }
Source:
<code>public abstract void doExecute() throws MojoExecutionException, MojoFailureException; public void initMojo() { if (projectBuildDirectory != null) { new ProjectDirectoryUpdater(project).updateBuildDirectory(projectBuildDirectory); } <START> if (!lightweightPackage) { <END> useLocalRepository = false; } }</code><technical_language>log if lightweightpackaging, useLocalRepository</technical_language>

Target:
public abstract void doExecute() throws MojoExecutionException, MojoFailureException; public void initMojo() { if (projectBuildDirectory != null) { new ProjectDirectoryUpdater(project).updateBuildDirectory(projectBuildDirectory); } if (!lightweightPackage && useLocalRepository) { getLog().info("'useLocalRepository' would be ignored, it could only be used when 'lightweightPackage' is enabled"); useLocalRepository = false; } }
Source:
<code>public WifiParsedResult parse(Result result) { String rawText = getMassagedText(result); if (!rawText.startsWith("WIFI:")) { return null; } <START> rawText = ";" + rawText.substring("WIFI:".length()); <END> String ssid = matchSinglePrefixedField(";S:", rawText, ';', false); if (ssid == null || ssid.isEmpty()) { return null; } String pass = matchSinglePrefixedField(";P:", rawText, ';', false); String type = matchSinglePrefixedField(";T:", rawText, ';', false); if (type == null) { type = "nopass"; } boolean hidden = Boolean.parseBoolean(matchSinglePrefixedField(";H:", rawText, ';', false)); String identity = matchSinglePrefixedField(";I:", rawText, ';', false); String anonymousIdentity = matchSinglePrefixedField(";AI:", rawText, ';', false); String eapMethod = matchSinglePrefixedField(";E:", rawText, ';', false); String phase2Method = matchSinglePrefixedField(";PH2:", rawText, ';', false); return new WifiParsedResult(type, ssid, pass, hidden, identity, anonymousIdentity, eapMethod, phase2Method); }</code><technical_language>semicolon in this lines</technical_language>

Target:
public WifiParsedResult parse(Result result) { String rawText = getMassagedText(result); if (!rawText.startsWith("WIFI:")) { return null; } rawText = rawText.substring("WIFI:".length()); String ssid = matchSinglePrefixedField("S:", rawText, ';', false); if (ssid == null || ssid.isEmpty()) { return null; } String pass = matchSinglePrefixedField("P:", rawText, ';', false); String type = matchSinglePrefixedField("T:", rawText, ';', false); if (type == null) { type = "nopass"; } boolean hidden = Boolean.parseBoolean(matchSinglePrefixedField("H:", rawText, ';', false)); String identity = matchSinglePrefixedField("I:", rawText, ';', false); String anonymousIdentity = matchSinglePrefixedField("A:", rawText, ';', false); String eapMethod = matchSinglePrefixedField("E:", rawText, ';', false); String phase2Method = matchSinglePrefixedField("H:", rawText, ';', false); return new WifiParsedResult(type, ssid, pass, hidden, identity, anonymousIdentity, eapMethod, phase2Method); }
Source:
<code>public static Password promptUser() throws IOException { if (System.console() == null) { <START> return null; <END> } ConsoleReader reader = new ConsoleReader(); String enteredPass = reader.readLine("Enter password: ", '*'); return new Password(enteredPass); }</code><technical_language>thinking throwing exception more clear. This method properly function caller expected, get a clear exception in this case (not a null return value)</technical_language>

Target:
public static Password promptUser() throws IOException { if (System.console() == null) { throw new IOException("Attempted to prompt user on the console when System.console = null"); } ConsoleReader reader = new ConsoleReader(); String enteredPass = reader.readLine("Enter password: ", '*'); return new Password(enteredPass); }
Source:
<code>public void toSchemaOrgTest() throws IOException, URISyntaxException { FullBeanImpl bean = MockFullBean.mock(); String output = SchemaOrgUtils.toSchemaOrg(bean); Assert.assertNotNull(output); InputStream stream = getClass().getResourceAsStream(FULL_BEAN_FILE); String expectedOutput = IOUtils.toString(stream, StandardCharsets.UTF_8); <START> System.out.println(output); <END> assertEquals(expectedOutput.length(), output.length()); }</code><technical_language>Please do System.out Close stream line 49 67 spaces instead of tabs in toSchemaOrgEdmOrganizationTest() writeToFile(). Indentation weird for in IntelliJ</technical_language>

Target:
public void toSchemaOrgTest() throws IOException, URISyntaxException { FullBeanImpl bean = MockFullBean.mock(); String output = SchemaOrgUtils.toSchemaOrg(bean); Assert.assertNotNull(output); try (InputStream stream = getClass().getResourceAsStream(FULL_BEAN_FILE)) { String expectedOutput = IOUtils.toString(stream, StandardCharsets.UTF_8); assertEquals(expectedOutput.length(), output.length()); } }
Source:
<code>public String clientAddress() { try { return session.getRemoteAddress().toString(); <START> } catch (NullPointerException ex) { <END> return null; } }</code><technical_language>Instead of catching NullPointerExceptions, check if session.getRemoteAddress() returns object (and call .toString() in case)</technical_language>

Target:
public String clientAddress() { Session session = getSession(); return session != null ? session.getRemoteAddress().toString() : null; }
Source:
<code>protected void drawWithoutTransforms(Context2D context, double alpha, BoundingBox bb) { final boolean isSelectionLayer = context.isSelection(); if (isSelectionLayer && (false == isListening())) { return; } alpha = alpha * getAttributes().getAlpha(); if (alpha <= 0) { return; } if (model.getColumns().isEmpty()) { return; } this.removeAll(); if (!isSelectionLayer) { this.renderingInformation = prepare(); if (renderingInformation == null) { destroyDOMElementResources(); return; } makeRenderingCommands(); } layerRenderGroups(); executeRenderQueueCommands(isSelectionLayer); if (!isSelectionLayer) { for (GridColumn<?> column : bodyColumns) { if (column instanceof HasMultipleDOMElementResources) { ((HasMultipleDOMElementResources) column).freeUnusedResources(); } } for (GridColumn<?> column : floatingColumns) { if (column instanceof HasMultipleDOMElementResources) { ((HasMultipleDOMElementResources) column).freeUnusedResources(); } <START> } <END> } super.drawWithoutTransforms(context, alpha, bb); }</code><technical_language>shorten this? java Stream.concat(bodyColumns.stream(), floatingColumns.stream()) .filter(column -> column instanceof HasMultipleDOMElementResources) .forEach(column -> ((HasMultipleDOMElementResources) column).freeUnusedResources());</technical_language>

Target:
protected void drawWithoutTransforms(Context2D context, double alpha, BoundingBox bb) { final boolean isSelectionLayer = context.isSelection(); if (isSelectionLayer && (false == isListening())) { return; } alpha = alpha * getAttributes().getAlpha(); if (alpha <= 0) { return; } if (model.getColumns().isEmpty()) { return; } this.removeAll(); if (!isSelectionLayer) { this.renderingInformation = prepare(); if (renderingInformation == null) { destroyDOMElementResources(); return; } makeRenderingCommands(); } layerRenderGroups(); executeRenderQueueCommands(isSelectionLayer); if (!isSelectionLayer) { Stream.concat(bodyColumns.stream(), floatingColumns.stream()) .filter(column -> column instanceof HasMultipleDOMElementResources) .map(column -> (HasMultipleDOMElementResources) column) .forEach(HasMultipleDOMElementResources::freeUnusedResources); } super.drawWithoutTransforms(context, alpha, bb); }
Source:
<code>public CompletableFuture<FileWrapper> getLatest(NetworkAccess network) { return network.synchronizer.getValue(owner(), writer()) <START> .thenCompose(finished -> getUpdated(finished, network)); <END> }</code><technical_language>current latest is a name finished</technical_language>

Target:
public CompletableFuture<FileWrapper> getLatest(NetworkAccess network) { return network.synchronizer.getValue(owner(), writer()) .thenCompose(latest -> getUpdated(latest, network)); }
Source:
<code>public Predicate<? super T> getConstraint() { <START> if (constraint != null) { <END> constraint = Predicates.alwaysTrue(); } return constraint; }</code><technical_language>@neykov this if (constraint == null)</technical_language>

Target:
public Predicate<? super T> getConstraint() { if (constraint != null) { return constraint; } else { return Predicates.alwaysTrue(); } }
Source:
<code>public EnvironmentCDI() { List<BeanManagerImpl> managers = new ArrayList<BeanManagerImpl>(getContainer().beanDeploymentArchives().values()); Collections.sort(managers, BeanManagers.ID_COMPARATOR); try { this.fallbackBeanManager = managers.get(0); <START> } catch (IndexOutOfBoundsException e) { <END> throw new IllegalStateException(e); } }</code><technical_language>Instead of throwing exception dumping it, I prevent checking list size invocation of get()</technical_language>

Target:
public EnvironmentCDI() { List<BeanManagerImpl> managers = new ArrayList<BeanManagerImpl>(getContainer().beanDeploymentArchives().values()); if (!managers.isEmpty()) { Collections.sort(managers, BeanManagers.ID_COMPARATOR); this.fallbackBeanManager = managers.get(0); } else { this.fallbackBeanManager = null; } }
Source:
<code>public void transformModifiers(@NotNull PsiModifierList modifierList, @NotNull final Set<String> modifiers) { <START> if (UtilityClassModifierProcessor.isModifierListSupported(modifierList) || modifiers.contains(PsiModifier.STATIC)) { <END> return; } final PsiClass searchableClass = PsiTreeUtil.getParentOfType(modifierList, PsiClass.class, true); if (searchableClass == null) { return; } @Nullable final PsiAnnotation fieldDefaultsAnnotation = PsiAnnotationSearchUtil.findAnnotation(searchableClass, lombok.experimental.FieldDefaults.class); final boolean isConfigDefaultFinal = isConfigDefaultFinal(searchableClass); final boolean isConfigDefaultPrivate = isConfigDefaultPrivate(searchableClass); final PsiField parentField = (PsiField) modifierList.getParent(); if (shouldMakeFinal(parentField, fieldDefaultsAnnotation, isConfigDefaultFinal)) { modifiers.add(PsiModifier.FINAL); } if (canChangeVisibility(parentField, modifierList)) { final AccessLevel defaultAccessLevel = detectDefaultAccessLevel(fieldDefaultsAnnotation, isConfigDefaultPrivate); switch (defaultAccessLevel) { case PRIVATE: modifiers.add(PsiModifier.PRIVATE); modifiers.remove(PsiModifier.PACKAGE_LOCAL); break; case PROTECTED: modifiers.add(PsiModifier.PROTECTED); modifiers.remove(PsiModifier.PACKAGE_LOCAL); break; case PUBLIC: modifiers.add(PsiModifier.PUBLIC); modifiers.remove(PsiModifier.PACKAGE_LOCAL); break; } } }</code><technical_language>I flip comparing order of this checks, if modifiers contains STATIC skip entire processing</technical_language>

Target:
public void transformModifiers(@NotNull PsiModifierList modifierList, @NotNull final Set<String> modifiers) { if (modifiers.contains(PsiModifier.STATIC) || UtilityClassModifierProcessor.isModifierListSupported(modifierList)) { return; } final PsiClass searchableClass = PsiTreeUtil.getParentOfType(modifierList, PsiClass.class, true); if (searchableClass == null) { return; } @Nullable final PsiAnnotation fieldDefaultsAnnotation = PsiAnnotationSearchUtil.findAnnotation(searchableClass, lombok.experimental.FieldDefaults.class); final boolean isConfigDefaultFinal = isConfigDefaultFinal(searchableClass); final boolean isConfigDefaultPrivate = isConfigDefaultPrivate(searchableClass); final PsiField parentField = (PsiField) modifierList.getParent(); if (shouldMakeFinal(parentField, fieldDefaultsAnnotation, isConfigDefaultFinal)) { modifiers.add(PsiModifier.FINAL); } if (canChangeVisibility(parentField, modifierList)) { final AccessLevel defaultAccessLevel = detectDefaultAccessLevel(fieldDefaultsAnnotation, isConfigDefaultPrivate); switch (defaultAccessLevel) { case PRIVATE: modifiers.add(PsiModifier.PRIVATE); modifiers.remove(PsiModifier.PACKAGE_LOCAL); break; case PROTECTED: modifiers.add(PsiModifier.PROTECTED); modifiers.remove(PsiModifier.PACKAGE_LOCAL); break; case PUBLIC: modifiers.add(PsiModifier.PUBLIC); modifiers.remove(PsiModifier.PACKAGE_LOCAL); break; } } }
Source:
<code>protected void verifyName() throws CoreException { if (fNameWidget.isVisible()) { ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager(); String currentName = fNameWidget.getText().trim(); if (currentName.length() < 1) { throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, LaunchConfigurationsMessages.LaunchConfigurationDialog_Name_required_for_launch_configuration_11, null)); } try { mgr.isValidLaunchConfigurationName(currentName); } catch(IllegalArgumentException iae) { throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, iae.getMessage(), null)); } if (fOriginal != null && !fOriginal.getName().equals(currentName)) { Set<String> reservednames = ((LaunchConfigurationsDialog) getLaunchConfigurationDialog()).getReservedNameSet(); if (mgr.isExistingLaunchConfigurationName(currentName) || (reservednames != null ? reservednames.contains(currentName) : false)) { ILaunchConfiguration config = ((LaunchManager)mgr).findLaunchConfiguration(currentName); String configTypeName = <START> (config != null) ? <END> config.getType().getName() : fOriginal.getType().getName(); throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12, configTypeName), null)); } } } }</code><technical_language>Brackets needed</technical_language>

Target:
protected void verifyName() throws CoreException { if (fNameWidget.isVisible()) { ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager(); String currentName = fNameWidget.getText().trim(); if (currentName.length() < 1) { throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, LaunchConfigurationsMessages.LaunchConfigurationDialog_Name_required_for_launch_configuration_11, null)); } try { mgr.isValidLaunchConfigurationName(currentName); } catch(IllegalArgumentException iae) { throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, iae.getMessage(), null)); } if (fOriginal != null && !fOriginal.getName().equals(currentName)) { Set<String> reservednames = ((LaunchConfigurationsDialog) getLaunchConfigurationDialog()).getReservedNameSet(); if (mgr.isExistingLaunchConfigurationName(currentName) || (reservednames != null ? reservednames.contains(currentName) : false)) { ILaunchConfiguration config = ((LaunchManager)mgr).findLaunchConfiguration(currentName); String configTypeName = config != null ? config.getType().getName() : fOriginal.getType().getName(); throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12, configTypeName), null)); } } } }
Source:
<code>private void readPipelinedResponse(Queue<String> pipelinedCommands) throws IOException, MessagingException { int noOfPipelinedResponse = pipelinedCommands.size(); String responseLine = null; List<String> results = new ArrayList<>(); while (noOfPipelinedResponse > 0) { results.clear(); responseLine = readCommandResponseLine(results); try { responseLineToCommandResponse(responseLine, results); } catch (NegativeSmtpReplyException exception) { Log.d(LOG_TAG, "SMTP <<< " + exception.getReplyCode() + exception.getReplyText()); } catch (MessagingException exception) { } noOfPipelinedResponse-- ; } try { <START> responseLineToCommandResponse(responseLine, results); <END> } catch (NegativeSmtpReplyException exception) { throw exception; } }</code><technical_language>this? java while (noOfPipelinedResponse > 0) { noOfPipelinedResponse -= 1; try { stuff; } catch (E e) { if (noOfPipelinedResponse == 0) { throw e; } } }</technical_language>

Target:
private void readPipelinedResponse(Queue<String> pipelinedCommands) throws IOException, MessagingException { String responseLine; List<String> results = new ArrayList<>(); NegativeSmtpReplyException negativeRecipient = null; for (String command : pipelinedCommands) { results.clear(); responseLine = readCommandResponseLine(results); try { responseLineToCommandResponse(responseLine, results); } catch (MessagingException exception) { if (command.equals("DATA")) { throw exception; } if (command.startsWith("RCPT")) { negativeRecipient = (NegativeSmtpReplyException) exception; } } } if (negativeRecipient != null) { try { executeCommand("."); throw negativeRecipient; } catch (NegativeSmtpReplyException e) { throw negativeRecipient; } } }
Source:
<code>private ReaderWithOffsets createOffsetReader(RecordReader<?, ?> sourceReader, TableDesc tableDesc) throws IOException { int headerCount = Utilities.getHeaderCount(tableDesc); int footerCount = Utilities.getFooterCount(tableDesc, jobConf); if (LlapIoImpl.LOG.isDebugEnabled()) { <START> LlapIoImpl.LOG.debug("Using to read data with HeaderSkip and FooterSkip {}", <END> sourceReader.getClass().getSimpleName(), headerCount, footerCount); } if (isLrrEnabled && sourceReader instanceof LineRecordReader) { return LineRrOffsetReader.create((LineRecordReader)sourceReader, jobConf, headerCount, footerCount); } return new PassThruOffsetReader(sourceReader, jobConf, headerCount, footerCount); }</code><technical_language>Log lines "HeaderSkip 2 FooterSkip 1" a bit hard understand for this part of code. more clear? "skipping lines for header, skipping lines for footer"</technical_language>

Target:
private ReaderWithOffsets createOffsetReader(RecordReader<?, ?> sourceReader, TableDesc tableDesc) throws IOException { int headerCount = Utilities.getHeaderCount(tableDesc); int footerCount = Utilities.getFooterCount(tableDesc, jobConf); if (LlapIoImpl.LOG.isDebugEnabled()) { LlapIoImpl.LOG.debug("Using to read data with skip.header.line.count and skip.footer.line.count {}", sourceReader.getClass().getSimpleName(), headerCount, footerCount); } if (isLrrEnabled && sourceReader instanceof LineRecordReader) { return LineRrOffsetReader.create((LineRecordReader)sourceReader, jobConf, headerCount, footerCount); } return new PassThruOffsetReader(sourceReader, jobConf, headerCount, footerCount); }
Source:
<code>public RevTag call() throws NoMessageException, <START> UnmergedPathException, ConcurrentRefUpdateException, <END> JGitInternalException, WrongRepositoryStateException { checkCallable(); RepositoryState state = repo.getRepositoryState(); processOptions(state); try { Tag newTag = new Tag(repo); newTag.setTag(name); newTag.setMessage(message); newTag.setObjId(id); ObjectInserter inserter = repo.newObjectInserter(); try { ObjectLoader object = repo.open(newTag.getObjId()); newTag.setType(Constants.typeString(object.getType())); ObjectId tagId = inserter.insert(Constants.OBJ_TAG, inserter.format(newTag)); newTag.setTagId(tagId); inserter.flush(); RevWalk revWalk = new RevWalk(repo); try { RevTag revTag = revWalk.parseTag(newTag.getTagId()); String refName = Constants.R_TAGS + newTag.getTag(); RefUpdate tagRef = repo.updateRef(refName); tagRef.setNewObjectId(newTag.getTagId()); tagRef.setForceUpdate(forceUpdate); Result updateResult = tagRef.update(); switch (updateResult) { case NEW: case FORCED: { return revTag; } default: throw new JGitInternalException(MessageFormat .format(JGitText.get().updatingRefFailed, Constants.HEAD, newTag.toString(), updateResult)); } } finally { revWalk.release(); } } finally { inserter.release(); } } catch (IOException e) { throw new JGitInternalException( JGitText.get().exceptionCaughtDuringExecutionOfTagCommand, e); } }</code><technical_language>Style-nit: Subsequent lines get indented another level IIRC. do throw UnmergedPathException? WrongRepositoryStateException</technical_language>

Target:
public RevTag call() throws JGitInternalException, NoHeadException { checkCallable(); RepositoryState state = repo.getRepositoryState(); processOptions(state); try { Tag newTag = new Tag(repo); newTag.setTag(name); newTag.setMessage(message); newTag.setAuthor(author); Ref head = repo.getRef(Constants.HEAD); if (head == null) throw new NoHeadException( JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported); if (id == null) { id = repo.resolve(Constants.HEAD + "^{commit}"); } newTag.setObjId(id); ObjectInserter inserter = repo.newObjectInserter(); try { ObjectLoader object = repo.open(newTag.getObjId()); newTag.setType(Constants.typeString(object.getType())); ObjectId tagId = inserter.insert(Constants.OBJ_TAG, inserter.format(newTag)); newTag.setTagId(tagId); inserter.flush(); RevWalk revWalk = new RevWalk(repo); try { RevTag revTag = revWalk.parseTag(newTag.getTagId()); String refName = Constants.R_TAGS + newTag.getTag(); RefUpdate tagRef = repo.updateRef(refName); tagRef.setNewObjectId(tagId); tagRef.setForceUpdate(forceUpdate); Result updateResult = tagRef.update(); switch (updateResult) { case NEW: case FORCED: return revTag; default: throw new JGitInternalException(MessageFormat .format(JGitText.get().updatingRefFailed, Constants.HEAD, newTag.toString(), updateResult)); } } finally { revWalk.release(); } } finally { inserter.release(); } } catch (IOException e) { throw new JGitInternalException( JGitText.get().exceptionCaughtDuringExecutionOfTagCommand, e); } }
Source:
<code>public ThingEventFactory() { super(Sets.newHashSet(ThingStatusInfoEvent.TYPE, ThingStatusInfoChangedEvent.TYPE, ThingAddedEvent.TYPE, <START> ThingRemovedEvent.TYPE, ThingUpdatedEvent.TYPE, ThingTriggerEvent.TYPE)); <END> }</code><technical_language>topic is called CHANNEL_TRIGGERED_EVENT, in line other events, class called ChannelTriggeredEvent, agree</technical_language>

Target:
public ThingEventFactory() { super(Sets.newHashSet(ThingStatusInfoEvent.TYPE, ThingStatusInfoChangedEvent.TYPE, ThingAddedEvent.TYPE, ThingRemovedEvent.TYPE, ThingUpdatedEvent.TYPE, ChannelTriggeredEvent.TYPE)); }
Source:
<code>public int hashCode() { int result = super.hashCode(); result = 31 * result + mName.hashCode(); result = 31 * result + <START> mFlavorDimension.hashCode(); <END> result = 31 * result + (mMinSdkVersion != null ? mMinSdkVersion.hashCode() : 0); result = 31 * result + (mTargetSdkVersion != null ? mTargetSdkVersion.hashCode() : 0); result = 31 * result + (mMaxSdkVersion != null ? mMaxSdkVersion.hashCode() : 0); result = 31 * result + (mRenderscriptTargetApi != null ? mRenderscriptTargetApi.hashCode() : 0); result = 31 * result + (mRenderscriptSupportModeEnabled != null ? mRenderscriptSupportModeEnabled .hashCode() : 0); result = 31 * result + (mRenderscriptNdkModeEnabled != null ? mRenderscriptNdkModeEnabled.hashCode() : 0); result = 31 * result + (mVersionCode != null ? mVersionCode.hashCode() : 0); result = 31 * result + (mVersionName != null ? mVersionName.hashCode() : 0); result = 31 * result + (mApplicationId != null ? mApplicationId.hashCode() : 0); result = 31 * result + (mTestApplicationId != null ? mTestApplicationId.hashCode() : 0); result = 31 * result + (mTestInstrumentationRunner != null ? mTestInstrumentationRunner .hashCode() : 0); result = 31 * result + (mTestHandleProfiling != null ? mTestHandleProfiling.hashCode() : 0); result = 31 * result + (mTestFunctionalTest != null ? mTestFunctionalTest.hashCode() : 0); result = 31 * result + (mSigningConfig != null ? mSigningConfig.hashCode() : 0); result = 31 * result + (mResourceConfiguration != null ? mResourceConfiguration.hashCode() : 0); return result; }</code><technical_language>check for null</technical_language>

Target:
public int hashCode() { int result = super.hashCode(); result = 31 * result + mName.hashCode(); result = 31 * result + (mFlavorDimension != null ? mFlavorDimension.hashCode() : 0); result = 31 * result + (mMinSdkVersion != null ? mMinSdkVersion.hashCode() : 0); result = 31 * result + (mTargetSdkVersion != null ? mTargetSdkVersion.hashCode() : 0); result = 31 * result + (mMaxSdkVersion != null ? mMaxSdkVersion.hashCode() : 0); result = 31 * result + (mRenderscriptTargetApi != null ? mRenderscriptTargetApi.hashCode() : 0); result = 31 * result + (mRenderscriptSupportModeEnabled != null ? mRenderscriptSupportModeEnabled .hashCode() : 0); result = 31 * result + (mRenderscriptNdkModeEnabled != null ? mRenderscriptNdkModeEnabled.hashCode() : 0); result = 31 * result + (mVersionCode != null ? mVersionCode.hashCode() : 0); result = 31 * result + (mVersionName != null ? mVersionName.hashCode() : 0); result = 31 * result + (mApplicationId != null ? mApplicationId.hashCode() : 0); result = 31 * result + (mTestApplicationId != null ? mTestApplicationId.hashCode() : 0); result = 31 * result + (mTestInstrumentationRunner != null ? mTestInstrumentationRunner .hashCode() : 0); result = 31 * result + (mTestHandleProfiling != null ? mTestHandleProfiling.hashCode() : 0); result = 31 * result + (mTestFunctionalTest != null ? mTestFunctionalTest.hashCode() : 0); result = 31 * result + (mSigningConfig != null ? mSigningConfig.hashCode() : 0); result = 31 * result + (mResourceConfiguration != null ? mResourceConfiguration.hashCode() : 0); return result; }
Source:
<code>public Object stringToAttributeValue(String value, String type) throws InternalErrorException { if (type.equals(ArrayList.class.getName()) || type.equals(LinkedHashMap.class.getName()) || <START> type.equals("java.util.LargeArrayList")) { <END> if (value != null && !value.isEmpty() && !value.endsWith(String.valueOf(AttributesManagerImpl.LIST_DELIMITER))) { value = value.concat(String.valueOf(AttributesManagerImpl.LIST_DELIMITER)); } } return BeansUtils.stringToAttributeValue(value, type); }</code><technical_language>I prefer constant there</technical_language>

Target:
public Object stringToAttributeValue(String value, String type) throws InternalErrorException { if (type.equals(ArrayList.class.getName()) || type.equals(LinkedHashMap.class.getName()) || type.equals(BeansUtils.largeArrayListClassName)) { if (value != null && !value.isEmpty() && !value.endsWith(String.valueOf(AttributesManagerImpl.LIST_DELIMITER))) { value = value.concat(String.valueOf(AttributesManagerImpl.LIST_DELIMITER)); } } return BeansUtils.stringToAttributeValue(value, type); }
Source:
<code><START> public ExtendedInMemoryUserDetailsManager myUserDetailsService() { <END> ExtendedInMemoryUserDetailsManager extendedInMemoryUserDetailsManager = new ExtendedInMemoryUserDetailsManager(); List<GrantedAuthority> userAuthorities = new ArrayList<>(); userAuthorities.add(new SimpleGrantedAuthority("ROLE_ACTIVITI_USER")); extendedInMemoryUserDetailsManager.createUser(new User("user", "password", userAuthorities)); List<GrantedAuthority> adminAuthorities = new ArrayList<>(); adminAuthorities.add(new SimpleGrantedAuthority("ROLE_ACTIVITI_ADMIN")); extendedInMemoryUserDetailsManager.createUser(new User("admin", "password", adminAuthorities)); return extendedInMemoryUserDetailsManager; }</code><technical_language>@pancudaniel7 keep: UserDetailsService return type</technical_language>

Target:
public UserDetails myUserDetailsService() { ExtendedInMemoryUserDetailsManager extendedInMemoryUserDetailsManager = new ExtendedInMemoryUserDetailsManager(); List<GrantedAuthority> userAuthorities = new ArrayList<>(); userAuthorities.add(new SimpleGrantedAuthority("ROLE_ACTIVITI_USER")); extendedInMemoryUserDetailsManager.createUser(new User("user", "password", userAuthorities)); List<GrantedAuthority> adminAuthorities = new ArrayList<>(); adminAuthorities.add(new SimpleGrantedAuthority("ROLE_ACTIVITI_ADMIN")); extendedInMemoryUserDetailsManager.createUser(new User("admin", "password", adminAuthorities)); return (UserDetails) extendedInMemoryUserDetailsManager; }
Source:
<code>protected String processStaleCheckBatchRow(StaleCheckBatchRow staleCheckRow) { LOG.info("processStaleCheckBatchRow: Starting processStaleCheckBatchRow for: " + staleCheckRow.getLogData()); CheckReconciliation checkReconciliation = checkReconciliationDao.findByCheckNumber(staleCheckRow.getCheckNumber()); String processingError = validateStaleCheckBatchRow(staleCheckRow, checkReconciliation); if (StringUtils.isNotBlank(processingError)) { return processingError; } checkReconciliation.setStatus(CRConstants.STALE); java.sql.Timestamp currentTimestamp = new java.sql.Timestamp(System.currentTimeMillis()); <START> checkReconciliation.setStatusChangeDate(java.sql.Date.valueOf(currentTimestamp.toLocalDateTime().toLocalDate())); <END> businessObjectService.save(checkReconciliation); return processingError; }</code><technical_language>This simplified Kuali's DateTimeServiceImpl</technical_language>

Target:
protected String processStaleCheckBatchRow(StaleCheckBatchRow staleCheckRow) { LOG.info("processStaleCheckBatchRow: Starting processStaleCheckBatchRow for: " + staleCheckRow.getLogData()); CheckReconciliation checkReconciliation = checkReconciliationDao.findByCheckNumber(staleCheckRow.getCheckNumber()); String processingError = validateStaleCheckBatchRow(staleCheckRow, checkReconciliation); if (StringUtils.isNotBlank(processingError)) { return processingError; } checkReconciliation.setStatus(CRConstants.STALE); checkReconciliation.setStatusChangeDate(dateTimeService.getCurrentSqlDate()); businessObjectService.save(checkReconciliation); return processingError; }
Source:
<code>public void thePushSetupSmsShouldBeSetOnTheDevice(final Map<String, String> settings) throws Throwable { <START> final SetPushSetupSmsAsyncRequest asyncRequest = SetPushSetupSmsRequestFactory.fromScenarioContext(); <END> final SetPushSetupSmsResponse response = this.smartMeteringConfigurationClient .getSetPushSetupSmsResponse(asyncRequest); assertNotNull("SetPushSetupsSmsResponse was null", response); assertNotNull("SetPushSetupsSmsResponse result was null", response.getResult()); assertEquals("SetPushSetupsSmsResponse should be OK", OsgpResultType.OK, response.getResult()); final GetSpecificAttributeValueResponse specificAttributeValues = this.getSpecificAttributeValues(settings); assertNotNull("GetSpecificAttributeValuesResponse was null", specificAttributeValues); assertNotNull("GetSpecificAttributeValuesResponse result was null", response.getResult()); assertEquals("GetSpecificAttributeValuesResponse should be OK", OsgpResultType.OK, response.getResult()); final String hostAndPort = (String) ScenarioContext.current().get(PlatformSmartmeteringKeys.HOSTNAME) + ":" + ScenarioContext.current().get(PlatformSmartmeteringKeys.PORT); final byte[] expectedBytes = (hostAndPort.getBytes(StandardCharsets.US_ASCII)); final String expected = Arrays.toString(expectedBytes); final String actual = new String(specificAttributeValues.getAttributeValueData().toString()); assertTrue("PushSetupSms was not set on device", actual.toString().contains(expected)); }</code><technical_language>Prefere write meaningful names, setPushSetupSmsAsyncRequest</technical_language>

Target:
public void thePushSetupSmsShouldBeSetOnTheDevice(final Map<String, String> settings) throws Throwable { final SetPushSetupSmsAsyncRequest setPushSetupSmsAsyncRequest = SetPushSetupSmsRequestFactory .fromScenarioContext(); final SetPushSetupSmsResponse setPushSetupSmsResponse = this.smartMeteringConfigurationClient .getSetPushSetupSmsResponse(setPushSetupSmsAsyncRequest); assertNotNull("SetPushSetupSmsResponse was null", setPushSetupSmsResponse); assertNotNull("SetPushSetupSmsResponse result was null", setPushSetupSmsResponse.getResult()); assertEquals("SetPushSetupSmsResponse should be OK", OsgpResultType.OK, setPushSetupSmsResponse.getResult()); final GetSpecificAttributeValueResponse specificAttributeValues = this.getSpecificAttributeValues(settings); assertNotNull("GetSpecificAttributeValuesResponse was null", specificAttributeValues); assertNotNull("GetSpecificAttributeValuesResponse result was null", specificAttributeValues.getResult()); assertEquals("GetSpecificAttributeValuesResponse should be OK", OsgpResultType.OK, specificAttributeValues.getResult()); final String hostAndPort = (String) ScenarioContext.current().get(PlatformSmartmeteringKeys.HOSTNAME) + ":" + ScenarioContext.current().get(PlatformSmartmeteringKeys.PORT); final byte[] expectedBytes = (hostAndPort.getBytes(StandardCharsets.US_ASCII)); final String expected = Arrays.toString(expectedBytes); final String actual = new String(specificAttributeValues.getAttributeValueData().toString()); assertTrue("PushSetupSms was not set on device", actual.toString().contains(expected)); }
Source:
<code>public void onMovePageToList(long sourceReadingListId, @NonNull HistoryEntry entry) { bottomSheetPresenter.show(getChildFragmentManager(), <START> MoveToReadingListDialog.newInstance(sourceReadingListId, entry.getTitle(), MOST_READ_ACTIVITY)); <END> }</code><technical_language>Is MOST_READ_ACTIVITY correct constant here</technical_language>

Target:
public void onMovePageToList(long sourceReadingListId, @NonNull HistoryEntry entry) { bottomSheetPresenter.show(getChildFragmentManager(), MoveToReadingListDialog.newInstance(sourceReadingListId, entry.getTitle(), NEWS_ACTIVITY)); }
Source:
<code>private void display() throws Failure { final PrintWriter stdout = toPrintWriter(out); hooks.addChangeListener(listener, currentUser); try { while (!stdout.checkError()) { final Object output = queue.take(); <START> if (output != null) { <END> stdout.println(gson.toJson(output)); stdout.flush(); } if (dropped) { stdout.println(droppedOutputEvent); stdout.flush(); dropped = false; } } } catch (InterruptedException e) { } finally { hooks.removeChangeListener(listener); } }</code><technical_language>null, of offer calls added null</technical_language>

Target:
private void display() throws Failure { final PrintWriter stdout = toPrintWriter(out); hooks.addChangeListener(listener, currentUser); try { while (!stdout.checkError()) { stdout.println(gson.toJson(queue.take())); stdout.flush(); if (dropped) { stdout.println(droppedOutputEvent); stdout.flush(); dropped = false; } } } catch (InterruptedException e) { } finally { hooks.removeChangeListener(listener); } }
Source:
<code>public void purgeBatchedVersionPaths() { <START> String paths[]; <END> synchronized(purgeOldVersionPaths) { if (purgeOldVersionPaths.isEmpty()) { return; } paths = purgeOldVersionPaths.toArray(new String[purgeOldVersionPaths.size()]); purgeOldVersionPaths.clear(); } for (String path: paths) { try { purgeOldVersions(path); } catch (Exception e) { synchronized(purgeOldVersionPaths) { purgeOldVersionPaths.add(path); } log.warn("Failed to purge old versions of {}. Ignoring error.", value("path", path)); } } }</code><technical_language>Prefer type</technical_language>

Target:
public void purgeBatchedVersionPaths() { String[] paths; synchronized(purgeOldVersionPaths) { if (purgeOldVersionPaths.isEmpty()) { return; } paths = purgeOldVersionPaths.toArray(new String[purgeOldVersionPaths.size()]); purgeOldVersionPaths.clear(); } for (String path: paths) { try { purgeOldVersions(path); } catch (Exception e) { synchronized(purgeOldVersionPaths) { purgeOldVersionPaths.add(path); } log.warn("Failed to purge old versions of {}. Ignoring error.", value("path", path)); } } }
Source:
<code>private Patient updatePatientIdentifiers(Config config, Patient patient) { Validate.notNull(patient, "Patient cannot be null"); <START> Validate.notEmpty(patient.getUuid(), "Patient Id may not be empty"); <END> List<Identifier> identifiersList = patientResource.getPatientIdentifierList(config, patient.getUuid()); Patient updatedPatient; try { updatePatientIdentifiers(config, patient, identifiersList); updatedPatient = getPatientByUuid(config, patient.getUuid()); eventRelay.sendEventMessage(new MotechEvent(EventKeys.UPDATED_PATIENT_SUBJECT, EventHelper.patientParameters(updatedPatient))); } catch (HttpClientErrorException e) { throw new OpenMRSException("Failed to update OpenMRS patient with id: " + patient.getUuid(), e); } return updatedPatient; }</code><technical_language>empty</technical_language>

Target:
private Patient updatePatientIdentifiers(Config config, Patient patient) { Validate.notNull(patient, "Patient cannot be null"); Validate.notEmpty(patient.getUuid(), "Patient Id cannot be empty"); List<Identifier> identifiersList = patientResource.getPatientIdentifierList(config, patient.getUuid()); Patient updatedPatient; try { updatePatientIdentifiers(config, patient, identifiersList); updatedPatient = getPatientByUuid(config, patient.getUuid()); eventRelay.sendEventMessage(new MotechEvent(EventKeys.UPDATED_PATIENT_IDENTIFIERS_SUBJECT, EventHelper.patientParameters(updatedPatient))); } catch (HttpClientErrorException e) { throw new OpenMRSException("Failed to update OpenMRS patient's identifiers for patient with id: " + patient.getUuid(), e); } return updatedPatient; }
Source:
<code>private void triggerMatchingPipelines(T event) { try { List<Pipeline> allPipelines = pipelineCache.getPipelinesSync(); List<Pipeline> matchingPipelines = eventHandler.getMatchingPipelines(event, allPipelines); matchingPipelines.forEach(p -> { recordMatchingPipeline(p); pipelineInitiator.startPipeline(p); }); <START> } catch (TimeoutException e) { <END> log.error("Failed to get pipeline configs", e); } }</code><technical_language>wondering if logging continuing is right fallback here? Ideally want leave event unprocessed ignore it, echo a queuing mechanism, I suppose failing is option</technical_language>

Target:
private void triggerMatchingPipelines(T event) { try { List<Pipeline> allPipelines = pipelineCache.getPipelinesSync(); List<Pipeline> matchingPipelines = eventHandler.getMatchingPipelines(event, allPipelines); matchingPipelines.stream() .map(pipelinePostProcessorHandler::process) .forEach(p -> { recordMatchingPipeline(p); pipelineInitiator.startPipeline(p); }); } catch (TimeoutException e) { log.error("Failed to get pipeline configs", e); } }
Source:
<code><START> public void eject(final String name) throws IOException { <END> assert Paths.get(this.friends.getAbsolutePath(), name).toFile() .delete(); }</code><technical_language>@pinaf throws IOException removed</technical_language>

Target:
public void eject(final String name) { assert Paths.get(this.friends.getAbsolutePath(), name).toFile() .delete(); }
Source:
<code>public static void registerSerde(String type, ComplexMetricSerde serde) { if (complexSerializers.containsKey(type)) { <START> if (!complexSerializers.get(type).getClass().getCanonicalName().equals(serde.getClass().getCanonicalName())) { <END> throw new ISE( "Incompatible serializer for type[%s] already exists. Expected [%s], found [%s].", type, serde.getClass().getName(), complexSerializers.get(type).getClass().getName() ); } } else { complexSerializers.put(type, serde); } }</code><technical_language>suggestion if (!complexSerializers.get(type).getClass().getName().equals(serde.getClass().getName())) {</technical_language>

Target:
public static void registerSerde(String type, ComplexMetricSerde serde) { if (complexSerializers.containsKey(type)) { if (!complexSerializers.get(type).getClass().getName().equals(serde.getClass().getName())) { throw new ISE( "Incompatible serializer for type[%s] already exists. Expected [%s], found [%s].", type, serde.getClass().getName(), complexSerializers.get(type).getClass().getName() ); } } else { complexSerializers.put(type, serde); } }
Source:
<code>protected void selectExternalProvider() { Network network = getNetwork(); if (network.isExternal()) { <START> for (Provider provider : (Iterable<Provider>) getExternalProviders().getItems()) { <END> if (provider.getId().equals(network.getProvidedBy().getProviderId())) { getExternalProviders().setSelectedItem(provider); return; } } } }</code><technical_language>'Linq.firstOrDefault' instead (i.e. ProviderPredicate)</technical_language>

Target:
protected void selectExternalProvider() { final Network network = getNetwork(); if (network.isExternal()) { getExternalProviders().setSelectedItem(Linq.firstOrDefault((Iterable<Provider>) getExternalProviders().getItems(), new Linq.IPredicate<Provider>() { @Override public boolean match(Provider provider) { return provider.getId().equals(network.getProvidedBy().getProviderId()); } })); } }
Source:
<code>public static <START> Map<EClass, Integer> getEClassRootElements(EPackage <END> ePackage) { List<EClass> concreteClasses = getConcreteClasses(ePackage); if (ePackage != null) { String nsURI = ePackage.getNsURI(); EPackageMetaData metaData = DslCommonPlugin.INSTANCE.getEPackageMetaData(nsURI); List<EClass> roots = new ArrayList<>(); if (metaData != null && !metaData.getSuggestedRoots().isEmpty()) { roots = concreteClasses.stream().filter(c -> metaData.getSuggestedRoots().contains(c.getName())).collect(Collectors.toList()); } if (!roots.isEmpty()) { Integer defaultScore = 0; return roots.stream().collect(Collectors.toMap(eClass -> eClass, eClass -> defaultScore)); } } Map<EClass, Integer> inferRootElementsCandidates = inferRootElementsCandidates(ePackage, concreteClasses); return inferRootElementsCandidates; }</code><technical_language>client code need actual scores? glance a sorted list enough easier consume</technical_language>

Target:
public static List<EClass> getEClassRootElements(EPackage ePackage) { List<EClass> concreteClasses = getConcreteClasses(ePackage); if (ePackage != null) { String nsURI = ePackage.getNsURI(); EPackageMetaData metaData = DslCommonPlugin.INSTANCE.getEPackageMetaData(nsURI); List<EClass> roots = new ArrayList<>(); if (metaData != null && !metaData.getSuggestedRoots().isEmpty()) { roots = concreteClasses.stream().filter(c -> metaData.getSuggestedRoots().contains(c.getName())).collect(Collectors.toList()); } if (!roots.isEmpty()) { return roots; } } Map<EClass, Integer> inferredRootElementsCandidates = inferRootElementsCandidates(ePackage, concreteClasses); List<EClass> sortedResults = new ArrayList<EClass>(); sortedResults.addAll(inferredRootElementsCandidates.keySet()); Collections.sort(sortedResults, new Comparator<EClass>() { @Override public int compare(EClass eClass1, EClass eClass2) { return inferredRootElementsCandidates.get(eClass2).compareTo(inferredRootElementsCandidates.get(eClass1)); } }); return sortedResults; }
Source:
<code>private void setUpMediaWikiBaseUri(final EditTextPreference pref) { pref.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, final Object newValue) { SiteInfoClient siteInfoClient = new SiteInfoClient((String) newValue, <START> getActivity()); <END> siteInfoClient.request(new SiteInfoClient.Callback() { public void onSuccess(SiteInfo info) { pref.setText(info.general().server()); } }); return true; } }); }</code><technical_language>Preference changes occur due stimulus, bail if getActivity() is null here</technical_language>

Target:
private void setUpMediaWikiBaseUri(final EditTextPreference pref) { pref.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, final Object newValue) { if (getActivity() == null) { return true; } final ProgressDialog dialog = ProgressDialog.show(getActivity(), "", getActivity().getString(R.string.dialog_loading_siteinfo_wait), true); SiteInfoClient siteInfoClient = new SiteInfoClient((String) newValue); siteInfoClient.request(new SiteInfoClient.Callback() { public void onSuccess(SiteInfo info) { String server = info.general().server(); if (server.startsWith(" server = "https:" + server; } pref.setText(server); resetMediaWikiSettings(); dialog.hide(); } public void onFailure(Throwable t) { dialog.hide(); if (getActivity() == null) { return; } String message = t.getMessage(); if (t instanceof HttpStatusException && message == null) { message = Integer.toString(((HttpStatusException) t).code()); } showAlert(getActivity().getString(R.string.dialog_loading_siteinfo_failed, message), t); } }); return true; } }); }
Source:
<code>public static void premain(String agentArgument, Instrumentation instrumentation) throws Exception { String[] args = agentArgument.split(":"); if (args.length < 2 || args.length > 3) { System.err.println("Usage: -javaagent:/path/to/JavaAgent.jar=[host:]<port>:<yaml configuration file>"); System.exit(1); } String host; int port; String file; if (args.length == 3) { port = Integer.parseInt(args[1]); host = args[0]; file = args[2]; } else { port = Integer.parseInt(args[0]); <START> host = "localhost"; <END> file = args[1]; } new JmxCollector(new File(file)).register(); DefaultExports.initialize(); QueuedThreadPool pool = new QueuedThreadPool(); pool.setDaemon(true); pool.setMaxThreads(10); pool.setName("jmx_exporter"); server = new Server(pool); ServerConnector connector = new ServerConnector(server); connector.setReuseAddress(true); connector.setHost(host); connector.setPort(port); server.setConnectors(new Connector[]{connector}); ServletContextHandler context = new ServletContextHandler(); context.setContextPath("/"); context.addFilter(GzipFilter.class, "/*", null); server.setHandler(context); context.addServlet(new ServletHolder(new MetricsServlet()), "/metrics"); server.setStopAtShutdown(true); server.start(); }</code><technical_language>This empty, bind localhost</technical_language>

Target:
public static void premain(String agentArgument, Instrumentation instrumentation) throws Exception { String[] args = agentArgument.split(":"); if (args.length < 2 || args.length > 3) { System.err.println("Usage: -javaagent:/path/to/JavaAgent.jar=[host:]<port>:<yaml configuration file>"); System.exit(1); } String host; int port; String file; if (args.length == 3) { port = Integer.parseInt(args[1]); host = args[0]; file = args[2]; } else { port = Integer.parseInt(args[0]); host = "0.0.0.0"; file = args[1]; } new JmxCollector(new File(file)).register(); DefaultExports.initialize(); QueuedThreadPool pool = new QueuedThreadPool(); pool.setDaemon(true); pool.setMaxThreads(10); pool.setName("jmx_exporter"); server = new Server(pool); ServerConnector connector = new ServerConnector(server); connector.setReuseAddress(true); connector.setHost(host); connector.setPort(port); server.setConnectors(new Connector[]{connector}); ServletContextHandler context = new ServletContextHandler(); context.setContextPath("/"); context.addFilter(GzipFilter.class, "/*", null); server.setHandler(context); context.addServlet(new ServletHolder(new MetricsServlet()), "/metrics"); server.start(); }
Source:
<code>private List<Long> findPipelineIds(String pipelineName, FeedModifier modifier, long cursor, int pageSize) { <START> List<Long> ids; <END> Map<String, Object> params = arguments("pipelineName", pipelineName) .and("cursor", cursor) .and("limit", pageSize).asMap(); ids = getSqlMapClientTemplate().queryForList("getPipelineIds" + modifier.suffix(), params); return ids; }</code><technical_language>This simplified => return getSqlMapClientTemplate().queryForList("getPipelineIds" + modifier.suffix(), params)</technical_language>

Target:
private List<Long> findPipelineIds(String pipelineName, FeedModifier modifier, long cursor, int pageSize) { Map<String, Object> params = arguments("pipelineName", pipelineName) .and("cursor", cursor) .and("limit", pageSize).asMap(); return (List<Long>) getSqlMapClientTemplate().queryForList("getPipelineIds" + modifier.suffix(), params); }
Source:
<code>public KeyClientBuilder retryPolicy(RetryPolicy retryPolicy) { <START> this.retryPolicy = retryPolicy; <END> return this; }</code><technical_language>a null check in retryPolicy setters</technical_language>

Target:
public KeyClientBuilder retryPolicy(RetryPolicy retryPolicy) { Objects.requireNonNull(retryPolicy, "The retry policy cannot be bull"); this.retryPolicy = retryPolicy; return this; }