auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void checkOffsetIsCorrect( final int offset, final boolean isVerticalOffset, final boolean isRtl) { final int spinnerId = R.id.spinner_dropdown_popup_small; final AppCompatSpinner spinner = mContainer.findViewById(spinnerId); mInstrumentation.runOnMainSync(new Runnable() { @Override public void run() { if (isVerticalOffset) { spinner.setDropDownVerticalOffset(offset); } else { spinner.setDropDownHorizontalOffset(offset); } } }); onView(withId(spinnerId)).perform(click()); <START> SystemClock.sleep(250); <END> waitUntilPopupIsShown(spinner); int computedOffset; if (isVerticalOffset) { int[] location = new int[2]; spinner.getLocationOnScreen(location); computedOffset = location[1] + offset; } else { if (isRtl) { int[] location = new int[2]; spinner.getLocationOnScreen(location); final AppCompatSpinner.SpinnerPopup spinnerPopup = spinner.getInternalPopup(); AppCompatSpinner.DropdownPopup dropdownPopup = (AppCompatSpinner.DropdownPopup) (spinnerPopup); final int popupWidth = dropdownPopup.getWidth(); final int spinnerWidth = spinner.getWidth(); computedOffset = location[0] + (spinnerWidth - popupWidth - offset); } else { computedOffset = offset; } } onView(withText(ONE)).check(matches( hasOffset( computedOffset, isVerticalOffset ? "has vertical offset" : "has horizontal offset", isVerticalOffset) )); }</code><technical_language>Is this needed wait check</technical_language>

Target:
private void checkOffsetIsCorrect( final int offset, final boolean isVerticalOffset, final boolean isRtl) { final int spinnerId = R.id.spinner_dropdown_popup_small; final AppCompatSpinner spinner = mContainer.findViewById(spinnerId); mInstrumentation.runOnMainSync(new Runnable() { @Override public void run() { if (isVerticalOffset) { spinner.setDropDownVerticalOffset(offset); } else { spinner.setDropDownHorizontalOffset(offset); } } }); onView(withId(spinnerId)).perform(click()); waitUntilPopupIsShown(spinner); int computedOffset; if (isVerticalOffset) { int[] location = new int[2]; spinner.getLocationOnScreen(location); computedOffset = location[1] + offset; } else { if (isRtl) { int[] location = new int[2]; spinner.getLocationOnScreen(location); final AppCompatSpinner.SpinnerPopup spinnerPopup = spinner.getInternalPopup(); AppCompatSpinner.DropdownPopup dropdownPopup = (AppCompatSpinner.DropdownPopup) (spinnerPopup); final int popupWidth = dropdownPopup.getWidth(); final int spinnerWidth = spinner.getWidth(); computedOffset = location[0] + (spinnerWidth - popupWidth - offset); } else { computedOffset = offset; } } onView(withText(ONE)).check(matches( hasOffset( computedOffset, isVerticalOffset ? "has vertical offset" : "has horizontal offset", isVerticalOffset) )); }
Source:
<code>public RegisterResponse register(Identity sender, RegisterRequest registerRequest, InetSocketAddress serverEndpoint) { if (sender == null) { <START> return RegisterResponse.badRequest(null); <END> } Registration.Builder builder = new Registration.Builder(RegistrationHandler.createRegistrationId(), registerRequest.getEndpointName(), sender.getPeerAddress().getAddress(), sender.getPeerAddress() .getPort(), serverEndpoint); builder.lwM2mVersion(registerRequest.getLwVersion()).lifeTimeInSec(registerRequest.getLifetime()) .bindingMode(registerRequest.getBindingMode()).objectLinks(registerRequest.getObjectLinks()) .smsNumber(registerRequest.getSmsNumber()).registrationDate(new Date()).lastUpdate(new Date()) .additionalRegistrationAttributes(registerRequest.getAdditionalAttributes()); Registration registration = builder.build(); if (!authorizer.isAuthorized(registerRequest, registration, sender)) { return RegisterResponse.forbidden(null); } if (registrationService.registerClient(registration)) { LOG.debug("New registered client: {}", registration); return RegisterResponse.success(registration.getId()); } else { return RegisterResponse.forbidden(null); } }</code><technical_language>internal error? if so, Validate.notNull(sender) ok</technical_language>

Target:
public RegisterResponse register(Identity sender, RegisterRequest registerRequest, InetSocketAddress serverEndpoint) { Registration.Builder builder = new Registration.Builder(RegistrationHandler.createRegistrationId(), registerRequest.getEndpointName(), sender.getPeerAddress().getAddress(), sender.getPeerAddress() .getPort(), serverEndpoint); builder.lwM2mVersion(registerRequest.getLwVersion()).lifeTimeInSec(registerRequest.getLifetime()) .bindingMode(registerRequest.getBindingMode()).objectLinks(registerRequest.getObjectLinks()) .smsNumber(registerRequest.getSmsNumber()).registrationDate(new Date()).lastUpdate(new Date()) .additionalRegistrationAttributes(registerRequest.getAdditionalAttributes()); Registration registration = builder.build(); if (!authorizer.isAuthorized(registerRequest, registration, sender)) { return RegisterResponse.forbidden(null); } if (registrationService.registerClient(registration)) { LOG.debug("New registered client: {}", registration); return RegisterResponse.success(registration.getId()); } else { return RegisterResponse.forbidden(null); } }
Source:
<code>public void processBindingConfiguration(final String context, final Item item, final String bindingConfig) throws BindingConfigParseException { <START> super.processBindingConfiguration(context, item, bindingConfig); <END> ISYBindingConfig config = parseConfig(item, bindingConfig); addBindingConfig(item, config); if (this.logger.isDebugEnabled()) { this.logger.debug("added item [{}]", item, config); } }</code><technical_language>move bottom of method bcpe thrown avoid holding invalid binding config strings</technical_language>

Target:
public void processBindingConfiguration(final String context, final Item item, final String bindingConfig) throws BindingConfigParseException { ISYBindingConfig config = parseConfig(item, bindingConfig); addBindingConfig(item, config); this.logger.debug("added item [{}]", item, config); super.processBindingConfiguration(context, item, bindingConfig); }
Source:
<code>private String getTestJavaCommandPath() { <START> return new File(testJDKHome, "bin/java").getAbsolutePath(); <END> }</code><technical_language>explode if parameter is null</technical_language>

Target:
private String getTestJavaCommandPath() { if(testJDKHome==null) { return null; } return new File(testJDKHome, "bin/java").getAbsolutePath(); }
Source:
<code>public static void onUpdate(SQLiteDatabase db, int from, int to) { if (from == to) { return; } <START> if (from < 4) { <END> from++; onUpdate(db, from, to); return; } if (from == 4) { onCreate(db); from++; onUpdate(db, from, to); return; } if (from == 5) { from++; onUpdate(db, from, to); return; } }</code><technical_language>cases needed? of this copied categories</technical_language>

Target:
public static void onUpdate(SQLiteDatabase db, int from, int to) { if (from == to) { return; } }
Source:
<code>SshFetchConnection() throws TransportException { super(TransportGitSsh.this); try { process = getSession().exec(commandFor(getOptionUploadPack()), getTimeout()); final MessageWriter msg = new MessageWriter(); setMessageWriter(msg); final InputStream upErr = process.getErrorStream(); errorThread = new StreamCopyThread(upErr, msg.getRawStream()); errorThread.start(); init(process.getInputStream(), process.getOutputStream()); } catch (TransportException err) { close(); throw err; } catch (IOException err) { close(); throw new TransportException(uri, JGitText.get().remoteHungUpUnexpectedly, err); <START> } catch (Throwable err) { close(); throw new TransportException(uri, JGitText.get().remoteHungUpUnexpectedly, err); } <END> try { readAdvertisedRefs(); } catch (NoRemoteRepositoryException notFound) { final String msgs = getMessages(); checkExecFailure(process.exitValue(), getOptionUploadPack(), msgs); throw cleanNotFound(notFound, msgs); } }</code><technical_language>This is handling in block L288-291, added instead, i.e. } catch (IOException | Throwable err) { .... Also, this specifically catch OutOfMemoryError Throwable</technical_language>

Target:
SshFetchConnection() throws TransportException { super(TransportGitSsh.this); try { process = getSession().exec(commandFor(getOptionUploadPack()), getTimeout()); final MessageWriter msg = new MessageWriter(); setMessageWriter(msg); final InputStream upErr = process.getErrorStream(); errorThread = new StreamCopyThread(upErr, msg.getRawStream()); errorThread.start(); init(process.getInputStream(), process.getOutputStream()); } catch (TransportException err) { close(); throw err; } catch (Throwable err) { close(); throw new TransportException(uri, JGitText.get().remoteHungUpUnexpectedly, err); } try { readAdvertisedRefs(); } catch (NoRemoteRepositoryException notFound) { final String msgs = getMessages(); checkExecFailure(process.exitValue(), getOptionUploadPack(), msgs); throw cleanNotFound(notFound, msgs); } }
Source:
<code>private CurrencyManager() { this.currencies = new ArrayList<>(); this.currencyCodeToNameMap = new HashMap<>(); this.currencyCodeToSymbolMap = new HashMap<>(); this.backupCurrency = new Currency( "CSB", -1, 0, <START> "ComStart bill", <END> "C-Bill", 2835, 999999, true, true); this.createFormatters(); }</code><technical_language>ComStar</technical_language>

Target:
private CurrencyManager() { this.currencies = new ArrayList<>(); this.currencyCodeToNameMap = new HashMap<>(); this.currencyCodeToSymbolMap = new HashMap<>(); this.backupCurrency = new Currency( "CSB", -1, 0, "ComStar bill", "C-Bill", 2835, 999999, true, true); this.createFormatters(); }
Source:
<code>protected boolean set(TileEntityFurnace tileEntity, Map<Key<?>, Object> keyValues) { final int passedBurnTime = (Integer) keyValues.get(Keys.PASSED_BURN_TIME); final int maxBurnTime = (Integer) keyValues.get(Keys.MAX_BURN_TIME); final int passedCookTime = (Integer) keyValues.get(Keys.PASSED_COOK_TIME); final int maxCookTime = (Integer) keyValues.get(Keys.MAX_COOK_TIME); final boolean needsUpdate = !tileEntity.isBurning() && maxBurnTime > 0; <START> <END> if(needsUpdate){ World world = (World) tileEntity.getWorld(); world.setBlockType(tileEntity.getPos().getX(), tileEntity.getPos().getY(), tileEntity.getPos().getZ(), BlockTypes.LIT_FURNACE); tileEntity = (TileEntityFurnace) tileEntity.getWorld().getTileEntity(tileEntity.getPos()); } tileEntity.setField(0, maxBurnTime - passedBurnTime); tileEntity.setField(1, maxBurnTime); tileEntity.setField(2, passedCookTime); tileEntity.setField(3, maxCookTime); return true; }</code><technical_language>need validate passedBurnTime passedCookTime greater respective maximums (maxBurnTime maxCookTime)</technical_language>

Target:
protected boolean set(TileEntityFurnace tileEntity, Map<Key<?>, Object> keyValues) { final int passedBurnTime = (Integer) keyValues.get(Keys.PASSED_BURN_TIME); final int maxBurnTime = (Integer) keyValues.get(Keys.MAX_BURN_TIME); final int passedCookTime = (Integer) keyValues.get(Keys.PASSED_COOK_TIME); final int maxCookTime = (Integer) keyValues.get(Keys.MAX_COOK_TIME); if (passedBurnTime > maxBurnTime || passedCookTime > maxCookTime) { return false; } final boolean needsUpdate = !tileEntity.isBurning() && maxBurnTime > 0 || tileEntity.isBurning() && maxBurnTime == 0; if (needsUpdate) { final World world = (World) tileEntity.getWorld(); world.setBlockType(tileEntity.getPos().getX(), tileEntity.getPos().getY(), tileEntity.getPos().getZ(), maxBurnTime > 0 ? BlockTypes.LIT_FURNACE : BlockTypes.FURNACE); tileEntity = (TileEntityFurnace) tileEntity.getWorld().getTileEntity(tileEntity.getPos()); } tileEntity.setField(0, maxBurnTime - passedBurnTime); tileEntity.setField(1, maxBurnTime); tileEntity.setField(2, passedCookTime); tileEntity.setField(3, maxCookTime); return true; }
Source:
<code>public boolean isIntersectionType() { <START> return typeList.size() == 1; <END> }</code><technical_language>I this typeList.size() != 1, it</technical_language>

Target:
public boolean isIntersectionType() { return typeList.size() != 1; }
Source:
<code>private String[] splitLayerName (String layerName) { String[] splitArray = new String[2]; if(layerName.contains(":") ) { <START> splitArray[0] = layerName.split(":", 2)[0]; <END> splitArray[1] = layerName.split(":", 2)[1]; } else { splitArray = new String[] {null,layerName}; } return splitArray; }</code><technical_language>split returns array, necessary manually assign elements? assign array length 2 here? java splitArray = layerName.split(":", 2);</technical_language>

Target:
private String[] splitLayerName (String layerName) { String[] splitArray = new String[2]; if(layerName.contains(":") ) { splitArray = layerName.split(":", 2); } else { splitArray = new String[] {null,layerName}; } return splitArray; }
Source:
<code>public int getNumAgents() { if (numAgents > 0) { return numAgents; } else { <START> ClusterConfig clusterConfig = readClusterConfigFromMinimesosFile(); <END> if ((clusterConfig != null) && (clusterConfig.getAgents() != null) && (clusterConfig.getAgents().size() > 0)) { return clusterConfig.getAgents().size(); } else { return 1; } } }</code><technical_language>single return statement is in middle of method. restructure code, statement</technical_language>

Target:
public int getNumAgents() { int numAgents; if (this.numAgents > 0) { numAgents = this.numAgents; } else { ClusterConfig clusterConfig = readClusterConfigFromMinimesosFile(); if ((clusterConfig != null) && (clusterConfig.getAgents() != null) && (clusterConfig.getAgents().size() > 0)) { numAgents = clusterConfig.getAgents().size(); } else { numAgents = 1; } } return numAgents; }
Source:
<code>public BaselineTarget(Parameters p, String modelPath, String lexiconPath) { super(p); <START> try { <END> lcFilePath = new java.net.URL("file:" + modelPath); lexFilePath = new java.net.URL("file:" + lexiconPath); } catch (Exception e) { logger.error("ERROR: Can't create model or lexicon URL: " + e); e.printStackTrace(); System.exit(1); } if (new java.io.File(modelPath).exists()) { readModel(lcFilePath); readLexiconOnDemand(lexFilePath); } else if (IOUtilities.existsInClasspath(BaselineTarget.class, modelPath)) { readModel(IOUtilities.loadFromClasspath(BaselineTarget.class, modelPath)); readLexiconOnDemand(IOUtilities.loadFromClasspath(BaselineTarget.class, lexiconPath)); } containingPackage = "edu.illinois.cs.cogcomp.pos.lbjava"; name = "BaselineTarget"; setLabeler(new POSLabel()); setExtractor(new WordForm()); }</code><technical_language>STDERR exit()</technical_language>

Target:
public BaselineTarget(Parameters p, String modelPath, String lexiconPath) { super(p); try { lcFilePath = new java.net.URL("file:" + modelPath); lexFilePath = new java.net.URL("file:" + lexiconPath); } catch (Exception e) { System.err.println("ERROR: Can't create model or lexicon URL: " + e); e.printStackTrace(); System.exit(1); } if (new java.io.File(modelPath).exists()) { readModel(lcFilePath); readLexiconOnDemand(lexFilePath); } else if (IOUtilities.existsInClasspath(BaselineTarget.class, modelPath)) { readModel(IOUtilities.loadFromClasspath(BaselineTarget.class, modelPath)); readLexiconOnDemand(IOUtilities.loadFromClasspath(BaselineTarget.class, lexiconPath)); } containingPackage = "edu.illinois.cs.cogcomp.pos.lbjava"; name = "BaselineTarget"; setLabeler(new POSLabel()); setExtractor(new WordForm()); }
Source:
<code>public void snapshotReadBeforeCompactionMark() { final int entryNum = RECORDS_PER_SEGMENT; t(1, () -> put("k" , "v0")); t(1, () -> put("k" , "v1")); t(1, () -> put("k" , "v2")); <START> t(2, () -> get("k")); END> t(2, this::TXBegin); final int timestamp = 3; for (int i = timestamp; i <= entryNum; ++i) { AtomicInteger version = new AtomicInteger(i); t(1, () -> put("k" , "v" + version.get())); } t(1, () -> getRuntime().getGarbageInformer().gcUnsafe()); t(1, () -> getLogUnit(SERVERS.PORT_0).runCompaction()); getRuntime().getAddressSpaceView().resetCaches(); getRuntime().getAddressSpaceView().invalidateServerCaches(); t(2, () -> get("k")) .assertResult().isEqualTo("v" + entryNum); t(2, this::TXEnd); }</code><technical_language>snapshot is determined do actual access object, is this exercising a snapshot compaction mark</technical_language>

Target:
public void snapshotReadBeforeCompactionMark() { final int entryNum = RECORDS_PER_SEGMENT; t(1, () -> put("k" , "v0")); t(1, () -> put("k" , "v1")); t(1, () -> put("k" , "v2")); t(2, this::TXBegin); t(2, () -> get("k")); final int timestamp = 3; for (int i = timestamp; i <= entryNum; ++i) { AtomicInteger version = new AtomicInteger(i); t(1, () -> put("k" , "v" + version.get())); } t(1, () -> getRuntime().getGarbageInformer().gcUnsafe()); t(1, () -> getLogUnit(SERVERS.PORT_0).runCompaction()); getRuntime().getAddressSpaceView().resetCaches(); getRuntime().getAddressSpaceView().invalidateServerCaches(); t(2, () -> get("k")) .assertThrows().hasCauseInstanceOf(TrimmedException.class); t(2, this::TXEnd); }
Source:
<code>private Pair<Vector[], Vector> convertDataInFeatureOrder(final List<LassoData> instances) { final Vector[] vecXArray = new Vector[numFeatures]; for (int i = 0; i < numFeatures; i++) { vecXArray[i] = vectorFactory.createDenseZeros(instances.size()); } final Vector vecY = vectorFactory.createDenseZeros(instances.size()); for (int i = 0; i < instances.size(); i++) { final Vector feature = instances.get(i).getFeature(); final double value = instances.get(i).getValue(); for (int j = 0; j < numFeatures; j++) { vecXArray[j].set(i, feature.get(j)); } vecY.set(i, value); } <START> return new Pair<Vector[], Vector>(vecXArray, vecY); <END> }</code><technical_language>types here: return new Pair<>(...) work</technical_language>

Target:
private Pair<Vector[], Vector> convertDataInFeatureOrder(final List<LassoData> instances) { final Vector[] vecXArray = new Vector[numFeatures]; for (int i = 0; i < numFeatures; i++) { vecXArray[i] = vectorFactory.createDenseZeros(instances.size()); } final Vector vecY = vectorFactory.createDenseZeros(instances.size()); for (int i = 0; i < instances.size(); i++) { final Vector feature = instances.get(i).getFeature(); final double value = instances.get(i).getValue(); for (int j = 0; j < numFeatures; j++) { vecXArray[j].set(i, feature.get(j)); } vecY.set(i, value); } return new Pair<>(vecXArray, vecY); }
Source:
<code>protected Object computeValue(PermanentProperty prop, Object value, Object last, Flag flag) { if (prop == Value.TIME) { if (isRunning() && isSyncTime()) { if (flag == Flag.CHANGE) { value = (Long)last + ((((Long)value - (Long)last) / 1000L) * 1000L); } else if (flag != Flag.INTERNAL) { value = (((Long)value / 1000L) * 1000L) + (Long)last % 1000L; } } <START> if ((flag == Flag.RESET && isCountDirectionDown()) || (Long)value > getMaximumTime() + 500 && !isCountDirectionDown()) { <END> return getMaximumTime(); } if ((flag == Flag.RESET && !isCountDirectionDown()) || (Long)value < getMinimumTime() - 500) { return getMinimumTime(); } } if (prop == Value.INVERTED_TIME) { return getMaximumTime() - getTime(); } if (prop == Value.MAXIMUM_TIME && (Long)value < getMinimumTime()) { return getMinimumTime(); } if ((prop == Value.MAXIMUM_NUMBER || prop == Value.NUMBER) && (Integer)value < getMinimumNumber()) { return getMinimumNumber(); } if (prop == Value.NUMBER && (Integer)value > getMaximumNumber()) { return getMaximumNumber(); } return value; }</code><technical_language>This allow user set a time max for countdown clocks. (!isCountDirectionDown() || flag != Flag.RECALCULATE) work. (Recalculate is triggered min max changed. Changing min trigger this condition, changing max is supposed excluded.)</technical_language>

Target:
protected Object computeValue(PermanentProperty prop, Object value, Object last, Flag flag) { if (prop == Value.TIME) { if (isRunning() && isSyncTime()) { if (flag == Flag.CHANGE) { value = (Long)last + ((((Long)value - (Long)last) / 1000L) * 1000L); } else if (flag != Flag.INTERNAL) { value = (((Long)value / 1000L) * 1000L) + (Long)last % 1000L; } } if ((flag == Flag.RESET && isCountDirectionDown()) || (Long)value > getMaximumTime() + 500 && (!isCountDirectionDown() || flag != Flag.RECALCULATE)) { return getMaximumTime(); } if ((flag == Flag.RESET && !isCountDirectionDown()) || (Long)value < getMinimumTime() - 500) { return getMinimumTime(); } } if (prop == Value.INVERTED_TIME) { return getMaximumTime() - getTime(); } if (prop == Value.MAXIMUM_TIME && (Long)value < getMinimumTime()) { return getMinimumTime(); } if ((prop == Value.MAXIMUM_NUMBER || prop == Value.NUMBER) && (Integer)value < getMinimumNumber()) { return getMinimumNumber(); } if (prop == Value.NUMBER && (Integer)value > getMaximumNumber()) { return getMaximumNumber(); } return value; }
Source:
<code>public void testConcurrentUnsubscribe3000Iterations() throws InterruptedException, BrokenBarrierException, ExecutionException{ for (int i = 0; i < 3000; i++) { <START> testUnsubscribeConcurrently(); <END> } }</code><technical_language>inlined this loop other method this create 3000 threads</technical_language>

Target:
public void testConcurrentUnsubscribe3000Iterations() throws InterruptedException, BrokenBarrierException, ExecutionException{ ExecutorService exec = null; try { exec = Executors.newSingleThreadExecutor(); for (int i = 0; i < 3000; i++) { final AtomicInteger wip = new AtomicInteger(); Func0<AtomicInteger> func0 = new Func0<AtomicInteger>() { @Override public AtomicInteger call() { return wip; } }; Func2<AtomicInteger, Observer<? super Integer>, AtomicInteger> func2 = new Func2<AtomicInteger, Observer<? super Integer>, AtomicInteger>() { @Override public AtomicInteger call(AtomicInteger s, Observer<? super Integer> o) { o.onNext(1); return s; } }; Action1<? super AtomicInteger> action1 = new Action1<AtomicInteger>() { @Override public void call(AtomicInteger s) { s.getAndIncrement(); } }; Observable<Integer> source = Observable.create( SyncOnSubscribe.createStateful( func0, func2, action1 )); final TestSubscriber<Integer> ts = TestSubscriber.create(0); source.subscribe(ts); final CyclicBarrier cb = new CyclicBarrier(2); Future<?> f = exec.submit(new Callable<Object>() { @Override public Object call() throws Exception { cb.await(); ts.requestMore(1); return null; } }); cb.await(); ts.unsubscribe(); f.get(); assertEquals("Unsubscribe supposed to be called once", 1, wip.get()); } } finally { if (exec != null) exec.shutdownNow(); } }
Source:
<code>public MetadataRestore getOSSpecificMetadataRestore(final Metadata metadata, final String filePath) { final String localOS = MetaDataUtil.getOS(); <START> if (localOS.contains("Windows")) { <END> return new WindowsMetadataRestore(metadata, filePath, localOS); } else if (localOS.contains("Mac")) { return new MACMetadataRestore(metadata, filePath, localOS); } else { return new PosixMetadataRestore(metadata, filePath, localOS); } }</code><technical_language>move 'Windows' string a constant</technical_language>

Target:
public MetadataRestore getOSSpecificMetadataRestore(final Metadata metadata, final String filePath) { final String localOS = MetaDataUtil.getOS(); if (Platform.isWindows()) { return new WindowsMetadataRestore(metadata, filePath, localOS); } else if (Platform.isMac()) { return new MACMetadataRestore(metadata, filePath, localOS); } else { return new PosixMetadataRestore(metadata, filePath, localOS); } }
Source:
<code>public static void loadAdapterType(final AdapterTypePaletteEntry entry) { if (entry.getType() == null && ADAPTER_TYPE_FILE_ENDING.equalsIgnoreCase(entry.getFile().getFileExtension())) { try { entry.setType(new ADPImporter(entry.getFile()).importType()); } catch (XMLStreamException | TypeImportException | CoreException e) { Activator.getDefault().logError("Could not load <START> adapter: " <END> + entry.getLabel(), e); } } }</code><technical_language>this Uppercase Adapter</technical_language>

Target:
public static void loadAdapterType(final AdapterTypePaletteEntry entry) { if (entry.getType() == null && ADAPTER_TYPE_FILE_ENDING.equalsIgnoreCase(entry.getFile().getFileExtension())) { try { entry.setType(new ADPImporter(entry.getFile()).importType()); } catch (XMLStreamException | TypeImportException | CoreException e) { Activator.getDefault().logError("Could not load Adapter: " + entry.getLabel(), e); } } }
Source:
<code>public static Set<String> getNamedCaptureGroupsFromPattern(String pattern) { <START> final Set<String> namedGroups = Sets.newHashSet(); <END> final Matcher m = NAMED_CAPTURE_GROUPS_REGEX.matcher(pattern); while (m.find()) { namedGroups.add(m.group(1)); } return namedGroups; }</code><technical_language>a LinkedHashSet preserve ordering</technical_language>

Target:
public static Set<String> getNamedCaptureGroupsFromPattern(String pattern) { final Set<String> namedGroups = Sets.newLinkedHashSet(); final Matcher m = NAMED_CAPTURE_GROUPS_REGEX.matcher(pattern); while (m.find()) { namedGroups.add(m.group(1)); } return namedGroups; }
Source:
<code>public void handleAction(ActionParameters params) throws ActionException { final HttpServletRequest request = params.getRequest(); try { final int groupId = params.getHttpParam(PARAM_ID, -1); final DataProvider group = new DataProvider(); group.setId(groupId); handleLocalizations(group, PARAM_NAME_PREFIX, request); if (group.getLocale() == null) { throw new ActionParamsException("Missing names for group!"); } if (groupId != -1) { <START> if (!dataProviderService.hasPermissionToUpdate(params.getUser(), groupId)) { <END> throw new ActionDeniedException("Unauthorized user tried to update layer group - id=" + groupId); } dataProviderService.update(group); ResponseHelper.writeResponse(params, group.getAsJSON()); } else if (params.getUser().isAdmin()) { final int id = dataProviderService.insert(group); group.setId(id); ResponseHelper.writeResponse(params, group.getAsJSON()); } else { throw new ActionDeniedException("Unauthorized user tried to update layer group - id=" + groupId); } } catch (Exception e) { throw new ActionException("Couldn't update/insert map layer group", e); } }</code><technical_language>exception mentions layer groups</technical_language>

Target:
public void handleAction(ActionParameters params) throws ActionException { final HttpServletRequest request = params.getRequest(); try { final int dataProviderId = params.getHttpParam(PARAM_ID, -1); final DataProvider dataProvider = new DataProvider(); dataProvider.setId(dataProviderId); handleLocalizations(dataProvider, PARAM_NAME_PREFIX, request); if (dataProvider.getLocale() == null) { throw new ActionParamsException("Missing names for layer dataprovider group!"); } if (dataProviderId != -1) { if (!dataProviderService.hasPermissionToUpdate(params.getUser(), dataProviderId)) { throw new ActionDeniedException("Unauthorized user tried to update layer dataprovider group - id=" + dataProviderId); } dataProviderService.update(dataProvider); ResponseHelper.writeResponse(params, dataProvider.getAsJSON()); } else if (params.getUser().isAdmin()) { final int id = dataProviderService.insert(dataProvider); dataProvider.setId(id); ResponseHelper.writeResponse(params, dataProvider.getAsJSON()); } else { throw new ActionDeniedException("Unauthorized user tried to update layer dataprovider group - id=" + dataProviderId); } } catch (Exception e) { throw new ActionException("Couldn't update/insert map layer dataprovider group", e); } }
Source:
<code>public static Object coerceEvalToSelectorObject(ExprEval eval) { <START> if (eval.isArray()) { <END> return Arrays.stream(eval.asStringArray()) .map(NullHandling::emptyToNullIfNeeded) .collect(Collectors.toList()); } return eval.value(); }</code><technical_language>Is fair cast arrays lists of strings? Do get behavior want if cast lists of are? (I'm thinking this more future-proof situations support numeric arrays storage layer.)</technical_language>

Target:
public static Object coerceEvalToSelectorObject(ExprEval eval) { switch (eval.type()) { case STRING_ARRAY: return Arrays.stream(eval.asStringArray()).collect(Collectors.toList()); case DOUBLE_ARRAY: return Arrays.stream(eval.asDoubleArray()).collect(Collectors.toList()); case LONG_ARRAY: return Arrays.stream(eval.asLongArray()).collect(Collectors.toList()); default: return eval.value(); } }
Source:
<code>public List<DataNode> getIndependentDataNodes(int dataNodeCountPerDc) { List<DataNode> dataNodesToReturn = new ArrayList<DataNode>(); for (Datacenter datacenter : hardwareLayout.getDatacenters()) { List<DataNode> dataNodesInThisDc = new ArrayList<>(); dataNodesInThisDc.addAll(datacenter.getDataNodes()); <START> if (dataNodesInThisDc.size() < dataNodeCountPerDc || dataNodeCountPerDc < 0) { <END> throw new IndexOutOfBoundsException("dataNodeCount out of bounds:" + dataNodeCountPerDc); } Collections.shuffle(dataNodesInThisDc); dataNodesToReturn.addAll(dataNodesInThisDc.subList(0, dataNodeCountPerDc)); } return dataNodesToReturn; }</code><technical_language>if(dataNodeCountPerDc < 0 || dataNodesInThisDc.size() < dataNodeCountPerDc )</technical_language>

Target:
List<DataNode> getIndependentDataNodes(int dataNodeCountPerDc) { List<DataNode> dataNodesToReturn = new ArrayList<DataNode>(); for (Datacenter datacenter : hardwareLayout.getDatacenters()) { List<DataNode> dataNodesInThisDc = new ArrayList<>(); dataNodesInThisDc.addAll(datacenter.getDataNodes()); if (dataNodeCountPerDc < 0 || dataNodeCountPerDc > dataNodesInThisDc.size()) { throw new IndexOutOfBoundsException("dataNodeCount out of bounds:" + dataNodeCountPerDc); } Collections.shuffle(dataNodesInThisDc); dataNodesToReturn.addAll(dataNodesInThisDc.subList(0, dataNodeCountPerDc)); } return dataNodesToReturn; }
Source:
<code>public static void refreshIfNeeded() { for (IWorkbenchWindow window : PlatformUI.getWorkbench() .getWorkbenchWindows()) for (IWorkbenchPage page : window.getPages()) <START> for (IViewReference vr : page.getViewReferences()) { <END> if (vr.getId().equals(VIEW_ID)) { IViewPart vp = vr.getView(false); if (vp != null) { RepositoriesView rv = (RepositoriesView) vp; rv.scheduleRefresh(); } } } }</code><technical_language>platform API for this. call 'page.findViewReference(VIEW_ID)' instead</technical_language>

Target:
public static void refreshIfNeeded() { for (IWorkbenchWindow window : PlatformUI.getWorkbench() .getWorkbenchWindows()) for (IWorkbenchPage page : window.getPages()) { IViewReference ref = page.findViewReference(VIEW_ID); if (ref != null) { IViewPart vp = ref.getView(false); if (vp != null) { RepositoriesView rv = (RepositoriesView) vp; rv.scheduleRefresh(); } } } }
Source:
<code>public static Integer findWeeksPregnant(IRepository<IPatientEncounterVital> patientEncounterVitalRepository, int encounterId){ Integer weeks_pregnant = null; Query<PatientEncounterVital> query2 = QueryProvider.getPatientEncounterVitalQuery() .fetch("vital") .where() .eq("patient_encounter_id", encounterId) <START> .eq("vital.name", "weeks_pregnant") <END> .order().desc("date_taken"); List<? extends IPatientEncounterVital> patientEncounterVitals = patientEncounterVitalRepository.find(query2); if (patientEncounterVitals.size() > 0) { weeks_pregnant = Math.round(patientEncounterVitals.get(0).getVitalValue()); } return weeks_pregnant; }</code><technical_language>Ken - This change ".eq("vital.name", "weeksPregnant")" reason immediately apparent is findWeeksPregnant(...) method is called retrieving a PatientItem throw error. problem if create a new pregnant patient try weeks pregnant medical page - PatientItem display a null for weekspregnant. problem show viewing encounter history page a VitalMultiMap get instead of a PatientItem. -Kevin</technical_language>

Target:
public static Integer findWeeksPregnant(IRepository<IPatientEncounterVital> patientEncounterVitalRepository, int encounterId){ Integer weeks_pregnant = null; Query<PatientEncounterVital> query2 = QueryProvider.getPatientEncounterVitalQuery() .fetch("vital") .where() .eq("patient_encounter_id", encounterId) .eq("vital.name", "weeksPregnant") .order().desc("date_taken"); List<? extends IPatientEncounterVital> patientEncounterVitals = patientEncounterVitalRepository.find(query2); if (patientEncounterVitals.size() > 0) { weeks_pregnant = Math.round(patientEncounterVitals.get(0).getVitalValue()); } return weeks_pregnant; }
Source:
<code>public GroovyScriptNamesDto getGroovyScriptsName() { GroovyScriptNamesDto groovyScriptNames = new GroovyScriptNamesDto(); Set<JobKey> jobKeySet; try { jobKeySet = scheduler.getJobKeys(GroupMatcher.anyJobGroup()); } catch (SchedulerException e) { return groovyScriptNames; } for (JobKey jobKey : jobKeySet) { JobDetail jobDetail; try { jobDetail = scheduler.getJobDetail(jobKey); } catch (SchedulerException e) { continue; } JobDataMap jobDataMap = jobDetail.getJobDataMap(); CronTaskConfigurationDto configuration = (CronTaskConfigurationDto) jobDataMap.get("config"); <START> if (!GroovyCronJob.class.equals(configuration.getJobClass())) <END> { continue; } String groovyScriptName = configuration.getProperties().get("fileName"); groovyScriptNames.addName(groovyScriptName); } return groovyScriptNames; }</code><technical_language>Class objects equivalence</technical_language>

Target:
public GroovyScriptNamesDto getGroovyScriptsName() { GroovyScriptNamesDto groovyScriptNames = new GroovyScriptNamesDto(); Set<JobKey> jobKeySet; try { jobKeySet = scheduler.getJobKeys(GroupMatcher.anyJobGroup()); } catch (SchedulerException e) { return groovyScriptNames; } for (JobKey jobKey : jobKeySet) { JobDetail jobDetail; try { jobDetail = scheduler.getJobDetail(jobKey); } catch (SchedulerException e) { continue; } JobDataMap jobDataMap = jobDetail.getJobDataMap(); CronTaskConfigurationDto configuration = (CronTaskConfigurationDto) jobDataMap.get("config"); if (!GroovyCronJob.class.getName().equals(configuration.getJobClass())) { continue; } String groovyScriptName = configuration.getProperties().get("fileName"); groovyScriptNames.addName(groovyScriptName); } return groovyScriptNames; }
Source:
<code>public static String getJarPluginName(File srcFile) throws IOException { <START> JarFile jarFile = new JarFile(srcFile); <END> try { return jarFile.getManifest().getMainAttributes() .getValue("Gerrit-PluginName"); } finally { jarFile.close(); } }</code><technical_language>try (JarFile jarFile = new JarFile(srcFile)) {...}</technical_language>

Target:
public static String getJarPluginName(File srcFile) throws IOException { try (JarFile jarFile = new JarFile(srcFile)) { return jarFile.getManifest().getMainAttributes() .getValue("Gerrit-PluginName"); } }
Source:
<code>public double parRate(SwapProduct product, RatesProvider provider) { ExpandedSwap swap = product.expand(); ExpandedSwapLeg fixedLeg = fixedLeg(swap); Currency ccyFixedLeg = fixedLeg.getCurrency(); double otherLegsConvertedPv = 0.0; for (ExpandedSwapLeg leg : swap.getLegs()) { if (leg != fixedLeg) { <START> if (leg.getType().equals(SwapLegType.INFLATION)) { END> double fvInf = legPricer.futureValuePeriodsInternal(leg.expand(), provider); RatePaymentPeriod payment = (RatePaymentPeriod) fixedLeg.getPaymentPeriods().get(0); double notional = payment.getNotional(); double years = payment.getAccrualPeriods().size(); return Math.pow(-fvInf / notional + 1.0d, 1.0d / years) - 1.0d; } double pvLocal = legPricer.presentValueInternal(leg, provider); otherLegsConvertedPv += (pvLocal * provider.fxRate(leg.getCurrency(), ccyFixedLeg)); } } double fixedLegEventsPv = legPricer.presentValueEventsInternal(fixedLeg, provider); double pvbpFixedLeg = legPricer.pvbp(fixedLeg, provider); return -(otherLegsConvertedPv + fixedLegEventsPv) / pvbpFixedLeg; }</code><technical_language>split fixed compounded periodic payments fixed leg, other legs</technical_language>

Target:
public double parRate(SwapProduct product, RatesProvider provider) { ExpandedSwap swap = product.expand(); ExpandedSwapLeg fixedLeg = fixedLeg(swap); Currency ccyFixedLeg = fixedLeg.getCurrency(); double otherLegsConvertedPv = 0.0; for (ExpandedSwapLeg leg : swap.getLegs()) { if (leg != fixedLeg) { double pvLocal = legPricer.presentValueInternal(leg, provider); otherLegsConvertedPv += (pvLocal * provider.fxRate(leg.getCurrency(), ccyFixedLeg)); } } double fixedLegEventsPv = legPricer.presentValueEventsInternal(fixedLeg, provider); if (fixedLeg.getPaymentPeriods().size() > 1) { double pvbpFixedLeg = legPricer.pvbp(fixedLeg, provider); return -(otherLegsConvertedPv + fixedLegEventsPv) / pvbpFixedLeg; } else { RatePaymentPeriod payment = (RatePaymentPeriod) fixedLeg.getPaymentPeriods().get(0); if (payment.getAccrualPeriods().size() == 1) { double pvbpFixedLeg = legPricer.pvbp(fixedLeg, provider); return -(otherLegsConvertedPv + fixedLegEventsPv) / pvbpFixedLeg; } ImmutableList<RateAccrualPeriod> ap = payment.getAccrualPeriods(); ArgChecker.isFalse(payment.getCompoundingMethod().equals(CompoundingMethod.NONE), "should be compounding"); for (RateAccrualPeriod p : ap) { ArgChecker.isTrue(p.getYearFraction() == 1.0, "accrual factor should be 1"); ArgChecker.isTrue(p.getSpread() == 0.0, "no spread"); } double nbAp = ap.size(); double notional = payment.getNotional(); double df = provider.discountFactor(ccyFixedLeg, payment.getPaymentDate()); return Math.pow(-(otherLegsConvertedPv + fixedLegEventsPv) / notional / df + 1.0d, 1 / nbAp) - 1.0d; } }
Source:
<code>public synchronized void deleteRule(int ruleid) { Iterator<FirewallRule> iter = this.rules.iterator(); while (iter.hasNext()) { FirewallRule r = iter.next(); if (r.ruleid == ruleid) { iter.remove(); break; } } storageSource.deleteRow(TABLE_NAME, Integer.toString(ruleid)); Masked<U64> delDescriptor = Masked.of( AppCookie.makeCookie(APP_ID, ruleid), AppCookie.getAppFieldMask().or(AppCookie.getUserFieldMask())); List<Masked<U64>> changes = new ArrayList<Masked<U64>>(); changes.add(delDescriptor); <START> routingService.handleRoutingDecisionChange(changes); <END> }</code><technical_language>for ImmutableSet</technical_language>

Target:
public synchronized void deleteRule(int ruleid) { Iterator<FirewallRule> iter = this.rules.iterator(); while (iter.hasNext()) { FirewallRule r = iter.next(); if (r.ruleid == ruleid) { iter.remove(); break; } } storageSource.deleteRow(TABLE_NAME, Integer.toString(ruleid)); Masked<U64> delDescriptor = Masked.of( AppCookie.makeCookie(APP_ID, ruleid), AppCookie.getAppFieldMask().or(AppCookie.getUserFieldMask())); List<Masked<U64>> changes = ImmutableList.of(delDescriptor); routingService.handleRoutingDecisionChange(changes); }
Source:
<code>public void processAllAttributesRemoved(String msg, MessageBeans beans) { Perun perun = ldapcManager.getPerunBl(); <START> if (beans.getUser() == null) { <END> return; } try { log.debug("Getting resources assigned to facility {}", beans.getFacility().getId()); List<Resource> resources = perun.getFacilitiesManager().getAssignedResources(ldapcManager.getPerunSession(), beans.getFacility()); for (Resource resource : resources) { log.debug("Removing all attributes from resource {}", resource); perunResource.removeAllAttributes(resource); } } catch (NamingException | FacilityNotExistsException | InternalErrorException | PrivilegeException e) { log.error("Error removing attributes:", e); } }</code><technical_language>This is original copy/paste bug. check if Facility is present beans User, delete Facility attributes here</technical_language>

Target:
public void processAllAttributesRemoved(String msg, MessageBeans beans) { PerunBl perun = (PerunBl) ldapcManager.getPerunBl(); if (beans.getFacility() == null) { return; } try { log.debug("Removing all attributes from facility {}", beans.getFacility()); perunFacility.removeAllAttributes(beans.getFacility()); log.debug("Getting resources assigned to facility {}", beans.getFacility().getId()); List<Resource> resources = perun.getFacilitiesManagerBl().getAssignedResources(ldapcManager.getPerunSession(), beans.getFacility()); for (Resource resource : resources) { log.debug("Removing all attributes from resource {}", resource); perunResource.removeAllAttributes(resource); } } catch (NamingException | InternalErrorException e) { log.error("Error removing attributes:", e); } }
Source:
<code>public Boolean areColumnsUnique(Aggregate rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) { if (Aggregate.isSimple(rel) || ignoreNulls) { columns = decorateWithConstantColumnsFromPredicates(columns, rel, mq); ImmutableBitSet groupKey = ImmutableBitSet.range(rel.getGroupCount()); return columns.contains(groupKey); } <START> return false; <END> }</code><technical_language>return false null</technical_language>

Target:
public Boolean areColumnsUnique(Aggregate rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) { if (Aggregate.isSimple(rel) || ignoreNulls) { columns = decorateWithConstantColumnsFromPredicates(columns, rel, mq); ImmutableBitSet groupKey = ImmutableBitSet.range(rel.getGroupCount()); return columns.contains(groupKey); } return null; }
Source:
<code>private String getJoinClause() { <START> return getClause(joinConditions, "", " "); <END> }</code><technical_language>This implementation support self-joins table appears multiple times. In case need able rename tables selecting from. Similarly want able rename columns select (at add support for group by)</technical_language>

Target:
private String getJoinClause() { return getClauseFromQueryConditions(joinConditions, "", " "); }
Source:
<code>public Collection<MessageId> getRelatedMessageIds(AttachmentId attachmentId) throws MailboxException { Preconditions.checkArgument(attachmentId != null); JPAAttachment attachment = getEntityManager().find(JPAAttachment.class, attachmentId.getId()); <START> if(attachment!=null && attachment.getMessageIds() != null) { <END> return ImmutableList.<MessageId>builder() .addAll( attachment.getMessageIds().stream(). map(messageId -> new JPAMessageId.Factory().fromString(messageId)).collect(Collectors.toList()) ).build(); } else { return new ArrayList<>(); } }</code><technical_language>Optional avoid null checks</technical_language>

Target:
public Collection<MessageId> getRelatedMessageIds(AttachmentId attachmentId) throws MailboxException { Preconditions.checkArgument(attachmentId != null, "AttachmentId can't be null when trying to get related message Ids!"); JPAAttachment attachment = getEntityManager().find(JPAAttachment.class, attachmentId.getId()); if(attachment != null && attachment.getMessageIds() != null) { return attachment.getMessageIds() .stream() .map(messageId -> new JPAMessageId.Factory().fromString(messageId)) .collect(Guavate.toImmutableList()); } else { return new ArrayList<>(); } }
Source:
<code>public void loadVersion(IHTMLLibraryVersion version){ group.setSelectedVersion(version); List list = new ArrayList(getChildren()); <START> for (Object o : list) remove((PaletteEntry)o); <END> IPaletteVersionGroup versionGroup = group.getSelectedVersionGroup(); for(IPaletteCategory category : versionGroup.getCategories()){ for(IPaletteItem item : category.getItems()){ PaletteTool tool = new PaletteTool(item); add(tool); } add(new PaletteSeparator()); } }</code><technical_language>I call setChildren(new ArrayList()); instead of removing children one, event fired instead of event for child</technical_language>

Target:
public void loadVersion(IHTMLLibraryVersion version){ group.setSelectedVersion(version); setChildren(new ArrayList()); IPaletteVersionGroup versionGroup = group.getSelectedVersionGroup(); for(IPaletteCategory category : versionGroup.getCategories()){ for(IPaletteItem item : category.getItems()){ PaletteTool tool = new PaletteTool(item); add(tool); } add(new PaletteSeparator()); } }
Source:
<code>public void whenLossTolerant_andOwnerCrashes_thenContinue() { final ReliableMessageListenerMock listener = new ReliableMessageListenerMock(); listener.isLossTolerant = true; topic.addMessageListener(listener); topic.publish("item1"); topic.publish("item2"); assertTrueEventually(() -> { assertContains(listener.objects, "item1"); assertContains(listener.objects, "item2"); }); TestUtil.terminateInstance(topicOwnerInstance); assertTrueEventually(() -> { String item = "newItem " + UUID.randomUUID(); topic.publish(item); assertTrueEventually(() -> { assertContains(listener.objects, item); <START> assertFalse(topic.runnersMap.isEmpty()); <END> }, 5); }); }</code><technical_language>I assert this bit - internal detail</technical_language>

Target:
public void whenLossTolerant_andOwnerCrashes_thenContinue() { final ReliableMessageListenerMock listener = new ReliableMessageListenerMock(); listener.isLossTolerant = true; topic.addMessageListener(listener); topic.publish("item1"); topic.publish("item2"); assertTrueEventually(() -> { assertContains(listener.objects, "item1"); assertContains(listener.objects, "item2"); }); TestUtil.terminateInstance(topicOwnerInstance); assertTrueEventually(() -> { String item = "newItem " + UUID.randomUUID(); topic.publish(item); assertTrueEventually(() -> assertContains(listener.objects, item), 5); }); }
Source:
<code>private String parse() throws AssertionError { Options opts = new Options(!withExterns); List<SourceFile> sourceFiles = new ArrayList<>(); if (getSubject().roots.isEmpty() || !getSubject().roots.get(0).getName().equals("base.js")) { sourceFiles.add(CLUTZ_GOOG_BASE); } for (File nonroot : getSubject().nonroots) { sourceFiles.add(SourceFile.fromFile(nonroot, UTF_8)); } List<String> roots = new ArrayList<>(); for (File root : getSubject().roots) { sourceFiles.add(SourceFile.fromFile(root, UTF_8)); roots.add(root.getPath()); } if (getSubject().sourceText != null) { sourceFiles.add(SourceFile.fromCode("main.js", getSubject().sourceText)); roots.add("main.js"); } <START> List<SourceFile> externs = withExterns ? DeclarationGenerator.getDefaultExterns(opts) : NO_EXTERNS; <END> if (withExterns) externs.addAll(THIRD_PARTY_EXTERNS); String actual = new DeclarationGenerator(opts) .generateDeclarations(sourceFiles, externs, new Depgraph(roots)); return actual; }</code><technical_language>nit: ternary condition is odd, fold ternary conditional</technical_language>

Target:
private String parse() throws AssertionError { Options opts = new Options(!withExterns); List<SourceFile> sourceFiles = new ArrayList<>(); if (getSubject().roots.isEmpty() || !getSubject().roots.get(0).getName().equals("base.js")) { sourceFiles.add(CLUTZ_GOOG_BASE); } for (File nonroot : getSubject().nonroots) { sourceFiles.add(SourceFile.fromFile(nonroot, UTF_8)); } List<String> roots = new ArrayList<>(); for (File root : getSubject().roots) { sourceFiles.add(SourceFile.fromFile(root, UTF_8)); roots.add(root.getPath()); } if (getSubject().sourceText != null) { sourceFiles.add(SourceFile.fromCode("main.js", getSubject().sourceText)); roots.add("main.js"); } List<SourceFile> externs = NO_EXTERNS; if (withExterns) { externs = DeclarationGenerator.getDefaultExterns(opts); externs.addAll(THIRD_PARTY_EXTERNS); } String actual = new DeclarationGenerator(opts) .generateDeclarations(sourceFiles, externs, new Depgraph(roots)); return actual; }
Source:
<code>private static String getColumnRangesMetadataSqlQuery(RaptorTableHandle raptorTableHandle, List<TableColumn> raptorColumns) { String shardIndexTableName = shardIndexTable(raptorTableHandle.getTableId()); <START> List<String> aggregatedColumns = raptorColumns.stream() <END> .flatMap(column -> Stream.of( format("min(%s)", minColumn(column.getColumnId())), format("max(%s)", maxColumn(column.getColumnId())))) .collect(toImmutableList()); return format("SELECT %s FROM %s", Joiner.on(", ").join(aggregatedColumns), shardIndexTableName); }</code><technical_language>rename simpler variable name (columns)</technical_language>

Target:
private static String getColumnRangesMetadataSqlQuery(RaptorTableHandle raptorTableHandle, List<TableColumn> raptorColumns) { String columns = raptorColumns.stream() .flatMap(column -> Stream.of( format("min(%s)", minColumn(column.getColumnId())), format("max(%s)", maxColumn(column.getColumnId())))) .collect(joining(", ")); return format("SELECT %s FROM %s", columns, shardIndexTable(raptorTableHandle.getTableId())); }