auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>void processFontTags(Document doc) { Elements font = doc.select("font"); for (Element e : font) { Attributes attrs = e.attributes().clone(); <START> String styleString = ""; <END> String theSizeString = ""; for (Attribute attribute : attrs) { String attributeName = attribute.getKey(); String attributeValue = attribute.getValue(); if (attributeName.equalsIgnoreCase("face")) { styleString = String.format("%s font-family: %s", styleString, attributeValue); } else if (attributeName.equalsIgnoreCase("size")) { String numericSize = attributeValue.trim(); int theSize = Integer.valueOf(numericSize); theSizeString = getFontSize(theSize, true); } else if (attributeName.equalsIgnoreCase("color")) { styleString = String.format("%s color: %s", styleString, attributeValue); } else if (attributeName.equalsIgnoreCase("style")) { int size = attributeValue.indexOf("font-size:"); if (size != -1) { size += "font-size:".length(); theSizeString = getFontSize(attributeValue.substring(size)); } } e.removeAttr(attributeName); } if (!Strings.isNullOrEmpty(theSizeString)) { styleString = String.format("%s font-size: %s", styleString, theSizeString); } e.tagName("span"); e.attr("style", styleString); } }</code><technical_language>This more efficient, time memory, a StringBuilder</technical_language>

Target:
void processFontTags(Document doc) { Elements font = doc.select("font"); for (Element e : font) { Attributes attrs = e.attributes().clone(); String styleString = ""; StringBuffer theSizeString = new StringBuffer(""); for (Attribute attribute : attrs) { String attributeName = attribute.getKey(); String attributeValue = attribute.getValue(); if (attributeName.equalsIgnoreCase("face")) { styleString = String.format("%s font-family: %s", styleString, attributeValue); } else if (attributeName.equalsIgnoreCase("size")) { int theSize = Integer.valueOf(attributeValue.trim()); if (theSize <= FONT_VALUES.length) { theSizeString.replace(0, theSizeString.length(), FONT_VALUES[theSize - 1]); } } else if (attributeName.equalsIgnoreCase("color")) { styleString = String.format("%s color: %s", styleString, attributeValue); } else if (attributeName.equalsIgnoreCase("style")) { int size = attributeValue.indexOf("font-size:"); if (size != -1) { size += "font-size:".length(); theSizeString.replace(0, theSizeString.length(), getFontSize(attributeValue.substring(size))); } } e.removeAttr(attributeName); } if (theSizeString.length() > 0) { styleString = String.format("%s font-size: %s", styleString, theSizeString); } e.tagName("span"); e.attr("style", styleString); } }
Source:
<code>public static String noQueryId(final String queryId) { <START> return "Fail: There is no " + queryId; <END> }</code><technical_language>String.format</technical_language>

Target:
public static String noQueryId(final String queryId) { return String.format("Fail: There is no %s.", queryId); }
Source:
<code>private void handleSelection(Menu menu, MenuItem shareItem) { if (WikipediaApp.getInstance().isFeatureSelectTextAndShareTutorialEnabled() && WikipediaApp.getInstance().getOnboardingStateMachine().isShareTutorialEnabled()) { showShareOnboarding(shareItem); WikipediaApp.getInstance().getOnboardingStateMachine().setShareTutorial(); } shareItem.setOnMenuItemClickListener(new RequestTextSelectOnMenuItemClickListener(PAYLOAD_PURPOSE_SHARE)); MenuItem copyItem = menu.findItem(R.id.menu_text_select_copy); copyItem.setOnMenuItemClickListener(new RequestTextSelectOnMenuItemClickListener(PAYLOAD_PURPOSE_COPY)); MenuItem defineItem = menu.findItem(R.id.menu_text_select_define); if (shouldEnableWiktionaryDialog()) { defineItem.setVisible(true); <START> defineItem.setEnabled(true); <END> defineItem.setOnMenuItemClickListener(new RequestTextSelectOnMenuItemClickListener(PAYLOAD_PURPOSE_DEFINE)); } createFunnel(); funnel.logHighlight(); }</code><technical_language>I calling setVisible is fine here. need toggle "enabled" if omit enabled flag in menu xml</technical_language>

Target:
private void handleSelection(Menu menu, MenuItem shareItem) { if (WikipediaApp.getInstance().isFeatureSelectTextAndShareTutorialEnabled() && WikipediaApp.getInstance().getOnboardingStateMachine().isShareTutorialEnabled()) { showShareOnboarding(shareItem); WikipediaApp.getInstance().getOnboardingStateMachine().setShareTutorial(); } shareItem.setOnMenuItemClickListener(new RequestTextSelectOnMenuItemClickListener(PAYLOAD_PURPOSE_SHARE)); MenuItem copyItem = menu.findItem(R.id.menu_text_select_copy); copyItem.setOnMenuItemClickListener(new RequestTextSelectOnMenuItemClickListener(PAYLOAD_PURPOSE_COPY)); MenuItem defineItem = menu.findItem(R.id.menu_text_select_define); if (shouldEnableWiktionaryDialog()) { defineItem.setVisible(true); defineItem.setOnMenuItemClickListener(new RequestTextSelectOnMenuItemClickListener(PAYLOAD_PURPOSE_DEFINE)); } createFunnel(); funnel.logHighlight(); }
Source:
<code>public void sendSerialDataAsync(XBee64BitAddress address, byte[] data) throws XBeeException { if (address == null) throw new NullPointerException("Address cannot be null"); if (data == null) throw new NullPointerException("Data cannot be null"); if (!connectionInterface.isOpen()) throw new InterfaceNotOpenException(); XBeePacket xbeePacket; logger.info(toString() + "Sending serial data asynchronously to >> {}.", address, HexUtils.prettyHexString(data)); switch (getXBeeProtocol()) { case RAW_802_15_4: xbeePacket = new TX64Packet(getNextFrameID(), address, XBeeTransmitOptions.NONE, data); <START> try { <END> sendXBeePacketAsync(xbeePacket); } catch (IOException e) { throw new XBeeException("Error writing in the communication interface.", e); } break; default: xbeePacket = new TransmitPacket(getNextFrameID(), address, XBee16BitAddress.UNKNOWN_ADDRESS, 0, XBeeTransmitOptions.NONE, data); try { sendXBeePacketAsync(xbeePacket); } catch (IOException e) { throw new XBeeException("Error writing in the communication interface.", e); } } }</code><technical_language>Duplicated code, move this switch switch generate packet: java try { sendXBeePacketAsync(xbeePacket); } catch (IOException e) { throw new XBeeException("Error writing in communication interface.", e); }</technical_language>

Target:
public void sendSerialDataAsync(XBee64BitAddress address, byte[] data) throws XBeeException { if (address == null) throw new NullPointerException("Address cannot be null"); if (data == null) throw new NullPointerException("Data cannot be null"); if (!connectionInterface.isOpen()) throw new InterfaceNotOpenException(); XBeePacket xbeePacket; logger.info(toString() + "Sending serial data asynchronously to >> {}.", address, HexUtils.prettyHexString(data)); switch (getXBeeProtocol()) { case RAW_802_15_4: xbeePacket = new TX64Packet(getNextFrameID(), address, XBeeTransmitOptions.NONE, data); break; default: xbeePacket = new TransmitPacket(getNextFrameID(), address, XBee16BitAddress.UNKNOWN_ADDRESS, 0, XBeeTransmitOptions.NONE, data); } sendAndCheckXBeePacket(xbeePacket, true); }
Source:
<code>public void eventReceived(Watcher.Action action, Pod pod) { if (action == Watcher.Action.DELETED) { String ns = pod.getMetadata().getNamespace(); String name = pod.getMetadata().getName(); Jenkins jenkins = Jenkins.getInstanceOrNull(); if (jenkins != null) { for (Node n : new ArrayList<>(jenkins.getNodes())) { if (!(n instanceof KubernetesSlave)) { continue; } KubernetesSlave ks = (KubernetesSlave) n; <START> if (StringUtils.equals(ks.getNamespace(), ns) && StringUtils.equals(ks.getPodName(), name)) { <END> LOGGER.info(() -> ns + "/" + name + " was just deleted, so removing corresponding Jenkins agent"); try { jenkins.removeNode(ks); return; } catch (Exception x) { LOGGER.log(Level.WARNING, "failed to reap " + ns + "/" + name, x); } } } } LOGGER.fine(() -> "received deletion notice for " + ns + "/" + name + " which does not seem to correspond to any Jenkins agent"); } }</code><technical_language>circumstances of null? java.util.Objects.equals BTW</technical_language>

Target:
public void eventReceived(Watcher.Action action, Pod pod) { if (action == Watcher.Action.DELETED) { String ns = pod.getMetadata().getNamespace(); String name = pod.getMetadata().getName(); Jenkins jenkins = Jenkins.getInstanceOrNull(); if (jenkins != null) { for (Node n : new ArrayList<>(jenkins.getNodes())) { if (!(n instanceof KubernetesSlave)) { continue; } KubernetesSlave ks = (KubernetesSlave) n; if (Objects.equals(ks.getNamespace(), ns) && Objects.equals(ks.getPodName(), name)) { LOGGER.info(() -> ns + "/" + name + " was just deleted, so removing corresponding Jenkins agent"); try { jenkins.removeNode(ks); return; } catch (Exception x) { LOGGER.log(Level.WARNING, "failed to reap " + ns + "/" + name, x); } } } } LOGGER.fine(() -> "received deletion notice for " + ns + "/" + name + " which does not seem to correspond to any Jenkins agent"); } }
Source:
<code>public CustomizedViewMonitor(String clusterName) { _clusterName = clusterName; <START> _sensorName = String.format("%s.%s", MonitorDomainNames.AggregatedView.name(), _clusterName); <END> _updateToAggregationLatencyGauge = new HistogramDynamicMetric(UPDATE_TO_AGGREGATION_LATENCY_GAUGE, new Histogram( new SlidingTimeWindowArrayReservoir(getResetIntervalInMs(), TimeUnit.MILLISECONDS))); }</code><technical_language>This match ObjectName</technical_language>

Target:
public CustomizedViewMonitor(String clusterName) { _clusterName = clusterName; _sensorName = String .format("%s:%s=%s,%s=%s", MonitorDomainNames.AggregatedView.name(), TYPE_KEY, CUSTOMIZED_VIEW, CLUSTER_KEY, _clusterName); _updateToAggregationLatencyGauge = new HistogramDynamicMetric(UPDATE_TO_AGGREGATION_LATENCY_GAUGE, new Histogram( new SlidingTimeWindowArrayReservoir(getResetIntervalInMs(), TimeUnit.MILLISECONDS))); }
Source:
<code>public int readBatch() { buffer.readerIndex(0).touch(); int result = 0; <START> for (int i = 0; i < 8; i++) { <END> result += buffer.readByte(); } return result; }</code><technical_language>I add a batchSize parameter defaulted 8 :)</technical_language>

Target:
public int readBatch() { buffer.readerIndex(0).touch(); int result = 0; for (int i = 0, size = batchSize; i < size; i++) { result += buffer.readByte(); } return result; }
Source:
<code>public void testGetAllByStoragePoolAndConnection() { List<StorageDomain> result = <START> dao.getAllByStoragePoolAndConnection(EXISTING_STORAGE_POOL_ID, "10.35.64.25:/export/share"); <END> assertGetAllForStoragePoolResult(result, EXISTING_STORAGE_POOL_ID); }</code><technical_language>this EXISTING_CONNECTION</technical_language>

Target:
public void testGetAllByStoragePoolAndConnection() { List<StorageDomain> result = dao.getAllByStoragePoolAndConnection(EXISTING_STORAGE_POOL_ID, EXISTING_CONNECTION); assertGetAllForStoragePoolResult(result, EXISTING_STORAGE_POOL_ID); }
Source:
<code>private Map<Long, LogData> FetchGarbageEntryBatch(Iterable<Long> addresses, RuntimeLayout runtimeLayout) { Map<String, List<Long>> serverToAddressMap = new HashMap<>(); for (Long address : addresses) { List<String> logServers = runtimeLayout.getLayout().getStripe(address).getLogServers(); <START> String logServer = logServers.get(0); <END> List<Long> addressList = serverToAddressMap.computeIfAbsent(logServer, s -> new ArrayList<>()); addressList.add(address); } List<CompletableFuture<ReadResponse>> futures = serverToAddressMap.entrySet().stream() .map(entry -> runtimeLayout.getLogUnitClient(entry.getKey()).readGarbageEntries(entry.getValue())) .collect(Collectors.toList()); return futures.stream() .map(future -> CFUtils.getUninterruptibly(future).getAddresses()) .reduce(new HashMap<>(), (map1, map2) -> { map1.putAll(map2); return map1; }); }</code><technical_language>This log unit server. Remember reverse chain replication</technical_language>

Target:
private Map<Long, LogData> FetchGarbageEntryBatch(Iterable<Long> addresses, RuntimeLayout runtimeLayout) { Map<String, List<Long>> serverToAddressMap = new HashMap<>(); for (Long address : addresses) { List<String> logServers = runtimeLayout.getLayout().getStripe(address).getLogServers(); String logServer = logServers.get(logServers.size() - 1); List<Long> addressList = serverToAddressMap.computeIfAbsent(logServer, s -> new ArrayList<>()); addressList.add(address); } List<CompletableFuture<ReadResponse>> futures = serverToAddressMap.entrySet().stream() .map(entry -> runtimeLayout.getLogUnitClient(entry.getKey()).readGarbageEntries(entry.getValue())) .collect(Collectors.toList()); return futures.stream() .map(future -> CFUtils.getUninterruptibly(future).getAddresses()) .reduce(new HashMap<>(), (map1, map2) -> { map1.putAll(map2); return map1; }); }
Source:
<code>public CloseFuture close(boolean immediately) { if (!immediately && (out != null)) { try { if (log.isDebugEnabled()) { log.debug("Closing ChannelOutputStream: {}", TcpipServerChannel.this); } out.close(); } catch (IOException ignored) { if (log.isErrorEnabled()) { log.error("Error closing ChannelOutputStream: {}", TcpipServerChannel.this, ignored); } } <START> } <END> CloseFuture closingFeature = super.close(immediately); ExecutorService service = getExecutorService(); ExecutorService executors = (service == null) ? ThreadUtils.newSingleThreadExecutor("TcpIpServerChannel-ConnectorCleanup[" + getSession() + "]") : service; boolean shutdown = (executors != service) || isShutdownOnExit(); return builder().when(closingFeature).run(toString(), () -> { executors.submit(() -> { try { if (log.isDebugEnabled()) { log.debug("disposing connector: for: {}", connector, TcpipServerChannel.this); } connector.close(immediately); } finally { if (shutdown && (!executors.isShutdown())) { Collection<Runnable> runners = executors.shutdownNow(); if (log.isDebugEnabled()) { log.debug("destroy({}) - shutdown executor service - runners count={}", TcpipServerChannel.this, runners.size()); } } } }); }).build().close(false); }</code><technical_language>1. ask if ERROR enabled - DEBUG TRACE 2. If this is exception log ERROR ? DEBUG TRACE more</technical_language>

Target:
public CloseFuture close(boolean immediately) { if ((!immediately) && (out != null)) { try { if (log.isDebugEnabled()) { log.debug("Closing ChannelOutputStream: {}", TcpipServerChannel.this); } out.close(); } catch (IOException ignored) { if (log.isDebugEnabled()) { log.debug("Error closing ChannelOutputStream: {}", TcpipServerChannel.this, ignored); } } } CloseFuture closingFeature = super.close(immediately); ExecutorService service = getExecutorService(); ExecutorService executors = (service == null) ? ThreadUtils.newSingleThreadExecutor("TcpIpServerChannel-ConnectorCleanup[" + getSession() + "]") : service; boolean shutdown = (executors != service) || isShutdownOnExit(); return builder().when(closingFeature).run(toString(), () -> { executors.submit(() -> { try { if (log.isDebugEnabled()) { log.debug("disposing connector: for: {}", connector, TcpipServerChannel.this); } connector.close(immediately); } finally { if (shutdown && (!executors.isShutdown())) { Collection<Runnable> runners = executors.shutdownNow(); if (log.isDebugEnabled()) { log.debug("destroy({}) - shutdown executor service - runners count={}", TcpipServerChannel.this, runners.size()); } } } }); }).build().close(false); }
Source:
<code>public void put(T block, byte[] data, byte[] header, boolean overwrite, boolean isOldBlock) throws IOException, KeyCollisionException { byte[] routingKey = block.getRoutingKey(); ByteArrayWrapper key = new ByteArrayWrapper(routingKey); Block<T> storeBlock = new Block<T>(); storeBlock.block = block; storeBlock.data = data; storeBlock.header = header; storeBlock.overwrite = overwrite; storeBlock.isOldBlock = isOldBlock; <START> boolean dontCacheIt = false; <END> configLock.writeLock().lock(); try { if(!shuttingDown) { Block<T> previousBlock = blocksByRoutingKey.get(key); if(!collisionPossible || overwrite) { blocksByRoutingKey.put(key, storeBlock); if(previousBlock == null) { size += data.length+header.length+block.getFullKey().length+routingKey.length; } } else { if(previousBlock != null) { throw new KeyCollisionException(); } if(backDatastore.probablyInStore(routingKey)) { dontCacheIt = true; } else { blocksByRoutingKey.put(key, storeBlock); size += data.length+header.length+block.getFullKey().length+routingKey.length; } } if(size > maxSize) { pushAll(); } else { if(!blocksByRoutingKey.isEmpty() && !startJob) { startJob = true; this.ticker.queueTimedJob(new Runnable() { @Override public void run() { configLock.writeLock().lock(); try { pushAll(); startJob = false; } finally { configLock.writeLock().unlock(); } } }, period); } } } else { dontCacheIt = true; } } finally { configLock.writeLock().unlock(); } if(dontCacheIt) { backDatastore.put(block, data, header, overwrite, isOldBlock); return; } }</code><technical_language>please avoid double-negatives... boolean cacheIt = true;</technical_language>

Target:
public void put(T block, byte[] data, byte[] header, boolean overwrite, boolean isOldBlock) throws IOException, KeyCollisionException { byte[] routingKey = block.getRoutingKey(); ByteArrayWrapper key = new ByteArrayWrapper(routingKey); Block<T> storeBlock = new Block<T>(); storeBlock.block = block; storeBlock.data = data; storeBlock.header = header; storeBlock.overwrite = overwrite; storeBlock.isOldBlock = isOldBlock; long sizeBlock = data.length+header.length+block.getFullKey().length+routingKey.length; boolean cacheIt = true; configLock.writeLock().lock(); try { if(!shuttingDown) { Block<T> previousBlock = blocksByRoutingKey.get(key); if(!collisionPossible || overwrite) { blocksByRoutingKey.put(key, storeBlock); if(previousBlock == null) { size += sizeBlock; } } else { if(previousBlock != null) { throw new KeyCollisionException(); } if(backDatastore.probablyInStore(routingKey)) { cacheIt = false; } else { blocksByRoutingKey.put(key, storeBlock); size += sizeBlock; } } if(size > maxSize) { pushAll(); } else { if(!blocksByRoutingKey.isEmpty() && !startJob) { startJob = true; this.ticker.queueTimedJob(new Runnable() { @Override public void run() { configLock.writeLock().lock(); try { pushAll(); startJob = false; } finally { configLock.writeLock().unlock(); } } }, period); } } } else { cacheIt = false; } } finally { configLock.writeLock().unlock(); } if(!cacheIt) { backDatastore.put(block, data, header, overwrite, isOldBlock); return; } }
Source:
<code><START> protected ServerOAuth2AuthorizedClientExchangeFilterFunction(ServerOAuth2AuthorizedClientRepository authorizedClientRepository, OAuth2AuthorizedClientResolver authorizedClientResolver) { <END> this.authorizedClientRepository = authorizedClientRepository; this.authorizedClientResolver = authorizedClientResolver; }</code><technical_language>remove protected package-private instead</technical_language>

Target:
ServerOAuth2AuthorizedClientExchangeFilterFunction(ServerOAuth2AuthorizedClientRepository authorizedClientRepository, OAuth2AuthorizedClientResolver authorizedClientResolver) { this.authorizedClientRepository = authorizedClientRepository; this.authorizedClientResolver = authorizedClientResolver; }
Source:
<code>public void testOneDimensionalEncoding() throws Exception { String path = "wfs?request=GetFeature&typename=gsmlbh:Borehole&outputFormat=json"; JSON json = getAsJSON(path); print(json); JSONObject properties = getFeaturePropertiesById(json, "borehole.GA.17322"); assertThat(properties, is(notNullValue())); JSONObject samplingLocation = getNestedObject( properties, "relatedSamplingFeature", "relatedSamplingFeature", "geometry"); JSONArray coordinates = samplingLocation.getJSONArray("coordinates"); assertThat(coordinates.size(), is(2)); JSONArray c1 = coordinates.getJSONArray(0); assertThat(c1.size(), is(1)); assertEquals(57.9, c1.getDouble(0), 0.1); <START> JSONArray c2 = coordinates.getJSONArray(1); <END> assertThat(c2.size(), is(1)); assertEquals(66.5, c2.getDouble(0), 0.1); }</code><technical_language>Thx</technical_language>

Target:
public void testOneDimensionalEncoding() throws Exception { String path = "wfs?request=GetFeature&typename=gsmlbh:Borehole&outputFormat=json"; JSON json = getAsJSON(path); JSONObject properties = getFeaturePropertiesById(json, "borehole.GA.17322"); assertThat(properties, is(notNullValue())); JSONObject samplingLocation = getNestedObject( properties, "relatedSamplingFeature", "relatedSamplingFeature", "geometry"); JSONArray coordinates = samplingLocation.getJSONArray("coordinates"); assertThat(coordinates.size(), is(2)); JSONArray c1 = coordinates.getJSONArray(0); assertThat(c1.size(), is(1)); assertEquals(57.9, c1.getDouble(0), 0.1); JSONArray c2 = coordinates.getJSONArray(1); assertThat(c2.size(), is(1)); assertEquals(66.5, c2.getDouble(0), 0.1); }
Source:
<code>public void apply(OnlineCommandContext ctx) throws Exception { if (usernameLoad != null) { <START> ctx.client.serverVersion().assertAtLeast(ManagementVersion.VERSION_2_0_0, <END> "Option username-load is available since WildFly 8"); } Operations ops = new Operations(ctx.client); Address securityRealmLdapAuthnAddress = securityRealmAddress.and("authentication", "ldap"); if (replaceExisting) { try { ops.removeIfExists(securityRealmLdapAuthnAddress); new Administration(ctx.client).reloadIfRequired(); } catch (OperationException e) { throw new IOException("Failed to remove ldap authentication from security realm.", e); } } ops.add(securityRealmLdapAuthnAddress, Values.empty() .andOptional("username-attribute", usernameAttribute) .andOptional("advanced-filter", advancedFilter) .andOptional("connection", connection) .andOptional("base-dn", baseDn) .andOptional("user-dn", userDn) .andOptional("username-load", usernameLoad) .andOptional("allow-empty-passwords", allowEmptyPasswords) .andOptional("recursive", recursive)); if (cache != null) { String cacheType = null; if (cache.getByAccessTime()) { cacheType = "by-access-time"; } if (cache.getBySearchTime()) { cacheType = "by-search-time"; } ops.add(securityRealmLdapAuthnAddress.and("cache", cacheType), Values.empty() .andOptional("cache-failures", cache.getCacheFailures()) .andOptional("eviction-time", cache.getEvictionTime()) .andOptional("max-cache-size", cache.getMaxCacheSize())); } }</code><technical_language>version is OnlineCommandContext: ctx.serverVersion</technical_language>

Target:
public void apply(OnlineCommandContext ctx) throws Exception { if (usernameLoad != null) { ctx.version.assertAtLeast(ServerVersion.VERSION_2_0_0, "Option username-load is available since WildFly 8"); } Operations ops = new Operations(ctx.client); Address securityRealmLdapAuthnAddress = securityRealmAddress.and("authentication", "ldap"); if (replaceExisting) { ops.removeIfExists(securityRealmLdapAuthnAddress); new Administration(ctx.client).reloadIfRequired(); } ops.add(securityRealmLdapAuthnAddress, Values.empty() .andOptional("username-attribute", usernameAttribute) .andOptional("advanced-filter", advancedFilter) .andOptional("connection", connection) .andOptional("base-dn", baseDn) .andOptional("user-dn", userDn) .andOptional("username-load", usernameLoad) .andOptional("allow-empty-passwords", allowEmptyPasswords) .andOptional("recursive", recursive)); if (cache != null) { String cacheType = null; if (cache.getByAccessTime()) { cacheType = "by-access-time"; } if (cache.getBySearchTime()) { cacheType = "by-search-time"; } ops.add(securityRealmLdapAuthnAddress.and("cache", cacheType), Values.empty() .andOptional("cache-failures", cache.getCacheFailures()) .andOptional("eviction-time", cache.getEvictionTime()) .andOptional("max-cache-size", cache.getMaxCacheSize())); } }
Source:
<code>public void testPersistWriter() throws Exception { HbasePersistWriter testPersistWriter = new HbasePersistWriter(testConfiguration); testPersistWriter.prepare(testConfiguration); InputStream testActivityFolderStream = HbasePersistWriterIT.class.getClassLoader() .getResourceAsStream("activities"); <START> List<String> files = IOUtils.readLines(testActivityFolderStream, Charsets.UTF_8); <END> for( String file : files) { LOGGER.info("File: " + file ); InputStream testActivityFileStream = HbasePersistWriterIT.class.getClassLoader() .getResourceAsStream("activities/" + file); Activity activity = MAPPER.readValue(testActivityFileStream, Activity.class); StreamsDatum datum = new StreamsDatum(activity, activity.getVerb()); testPersistWriter.write( datum ); LOGGER.info("Wrote: " + activity.getVerb() ); } testPersistWriter.cleanUp(); }</code><technical_language>IIRc Charsets is deprecated, replace java.nio.*.StandardCharSets</technical_language>

Target:
public void testPersistWriter() throws Exception { HbasePersistWriter testPersistWriter = new HbasePersistWriter(testConfiguration); testPersistWriter.prepare(testConfiguration); InputStream testActivityFolderStream = HbasePersistWriterIT.class.getClassLoader() .getResourceAsStream("activities"); List<String> files = IOUtils.readLines(testActivityFolderStream, StandardCharsets.UTF_8); for( String file : files) { LOGGER.info("File: " + file ); InputStream testActivityFileStream = HbasePersistWriterIT.class.getClassLoader() .getResourceAsStream("activities/" + file); Activity activity = MAPPER.readValue(testActivityFileStream, Activity.class); StreamsDatum datum = new StreamsDatum(activity, activity.getVerb()); testPersistWriter.write( datum ); LOGGER.info("Wrote: " + activity.getVerb() ); } testPersistWriter.cleanUp(); }
Source:
<code>private Request addRateLimitIdTag(Request request) { return request.newBuilder() <START> .tag(ConcurrencyLimiterListener.class, <END> ConcurrencyLimiterListener.of(concurrencyLimiters.acquireLimiter(request).acquire())) .build(); }</code><technical_language>In case, put a SettableFuture initialize in enqueue discussed offline</technical_language>

Target:
private Request addRateLimitIdTag(Request request) { return request.newBuilder() .tag(ConcurrencyLimiterListener.class, ConcurrencyLimiterListener.of(SettableFuture.create())) .build(); }
Source:
<code>public void start() { LOGGER.info("Load plugins"); for (File file : listJarFiles(fs.getInstalledPluginsDir())) { PluginInfo info = PluginInfo.create(file); pluginInfosByKeys.put(info.getKey(), info); <START> LOGGER.info("Loaded plugin [{}]", info.getName(), info.getKey()); <END> } pluginInstancesByKeys.putAll(loader.load(pluginInfosByKeys)); started.set(true); }</code><technical_language>also, this point in code, plugin is loaded, PluginInfo is read jar metadata (correct if wrong). loading occurs line 74. log misleading</technical_language>

Target:
public void start() { LOGGER.info("Load plugins"); for (File file : listJarFiles(fs.getInstalledPluginsDir())) { PluginInfo info = PluginInfo.create(file); pluginInfosByKeys.put(info.getKey(), info); } pluginInstancesByKeys.putAll(loader.load(pluginInfosByKeys)); pluginInfosByKeys.values().forEach(p -> LOGGER.info("Loaded plugin [{}]", p.getName(), p.getKey())); started.set(true); }
Source:
<code>public WorkerAllocatedResource allocateQueryMaster(QueryInProgress queryInProgress) { WorkerResourceAllocationRequest qmResourceRequest = createQMResourceRequest(queryInProgress.getQueryId()); SimpleExchange<WorkerResourceAllocationResponse> callFuture = new SimpleExchange<WorkerResourceAllocationResponse>() { @Override protected void cancel(WorkerResourceAllocationResponse canceled) { if (canceled != null && !canceled.getWorkerAllocatedResourceList().isEmpty()) { LOG.info("Canceling resources allocated"); WorkerAllocatedResource resource = canceled.getWorkerAllocatedResource(0); releaseWorkerResource(resource.getContainerId()); } } }; allocateWorkerResources(qmResourceRequest, callFuture); WorkerResourceAllocationResponse response = null; try { response = callFuture.get(3, TimeUnit.SECONDS); } catch (Throwable t) { response = callFuture.cancel(); if (response == null) { LOG.warn("Got exception " + t); <START> LOG.error(t, t); <END> return null; } } if (response == null || response.getWorkerAllocatedResourceList().size() == 0) { return null; } WorkerAllocatedResource resource = response.getWorkerAllocatedResource(0); registerQueryMaster(queryInProgress.getQueryId(), resource.getContainerId()); return resource; }</code><technical_language>I this line is necessary if change in immediately preceding line. LOG.warn("Got exception while allocating QueryMaster: " + t, t);</technical_language>

Target:
public WorkerAllocatedResource allocateQueryMaster(QueryInProgress queryInProgress) { long timeout = masterContext.getConf().getTimeVar( TajoConf.ConfVars.TAJO_QUERYMASTER_ALLOCATION_TIMEOUT, TimeUnit.MILLISECONDS); WorkerResourceAllocationRequest qmResourceRequest = createQMResourceRequest(queryInProgress.getQueryId()); final CancelableRpcCallback<WorkerResourceAllocationResponse> callFuture = new CancelableRpcCallback<WorkerResourceAllocationResponse>() { @Override protected void cancel(WorkerResourceAllocationResponse canceled) { if (canceled != null && !canceled.getWorkerAllocatedResourceList().isEmpty()) { LOG.info("Canceling resources allocated"); WorkerAllocatedResource resource = canceled.getWorkerAllocatedResource(0); releaseWorkerResource(resource.getContainerId()); } } }; allocateWorkerResources(qmResourceRequest, callFuture); WorkerResourceAllocationResponse response = null; try { response = callFuture.get(timeout, TimeUnit.MILLISECONDS); } catch (Throwable t) { response = callFuture.cancel(); if (response == null) { LOG.warn("Got exception waiting resources for query master " + queryInProgress.getQueryId(), t); return null; } } if (response == null || response.getWorkerAllocatedResourceList().size() == 0) { return null; } WorkerAllocatedResource resource = response.getWorkerAllocatedResource(0); registerQueryMaster(queryInProgress.getQueryId(), resource.getContainerId()); return resource; }
Source:
<code>void should_create_error_message() { <START> String message = shouldBeValidBase64("string").create(new TestDescription("TEST"), STANDARD_REPRESENTATION); <END> then(message).isEqualTo(format("[TEST] %nExpecting <\"string\"> to be a valid Base64 encoded string")); }</code><technical_language>add a % this break a String.format (this fine of those)</technical_language>

Target:
void should_create_error_message() { String message = shouldBeValidBase64("string %s").create(new TestDescription("TEST"), STANDARD_REPRESENTATION); then(message).isEqualTo(format("[TEST] %nExpecting <\"string %%s\"> to be a valid Base64 encoded string")); }
Source:
<code>public Intent getIntentForBrokerActivity(final AuthenticationRequest request) { Intent intent = null; <START> AccountManagerFuture<Bundle> result; <END> try { Bundle addAccountOptions = getBrokerOptions(request); result = mAcctManager.addAccount(AuthenticationConstants.Broker.BROKER_ACCOUNT_TYPE, AuthenticationConstants.Broker.AUTHTOKEN_TYPE, null, addAccountOptions, null, null, mHandler); Bundle bundleResult = result.getResult(); intent = bundleResult.getParcelable(AccountManager.KEY_INTENT); if (intent != null) { intent.putExtra(AuthenticationConstants.Broker.BROKER_REQUEST, AuthenticationConstants.Broker.BROKER_REQUEST); if (!isBrokerWithPRTSupport(intent) && PromptBehavior.FORCE_PROMPT == request.getPrompt()) { Logger.v(TAG, "FORCE_PROMPT is set for broker auth via old version of broker app, reset to ALWAYS."); intent.putExtra(AuthenticationConstants.Broker.ACCOUNT_PROMPT, PromptBehavior.Always.name()); } } } catch (OperationCanceledException e) { Logger.e(TAG, "Authenticator cancels the request", "", ADALError.AUTH_FAILED_CANCELLED, e); } catch (AuthenticatorException e) { Logger.e(TAG, "Authenticator cancels the request", "", ADALError.BROKER_AUTHENTICATOR_NOT_RESPONDING, e); } catch (IOException e) { Logger.e(TAG, "Authenticator cancels the request", "", ADALError.BROKER_AUTHENTICATOR_IO_EXCEPTION, e); } return intent; }</code><technical_language>try block</technical_language>

Target:
public Intent getIntentForBrokerActivity(final AuthenticationRequest request) { Intent intent = null; try { Bundle addAccountOptions = getBrokerOptions(request); final AccountManagerFuture<Bundle> result = mAcctManager.addAccount( AuthenticationConstants.Broker.BROKER_ACCOUNT_TYPE, AuthenticationConstants.Broker.AUTHTOKEN_TYPE, null, addAccountOptions, null, null, mHandler); Bundle bundleResult = result.getResult(); intent = bundleResult.getParcelable(AccountManager.KEY_INTENT); if (intent != null) { intent.putExtra(AuthenticationConstants.Broker.BROKER_REQUEST, AuthenticationConstants.Broker.BROKER_REQUEST); if (!isBrokerWithPRTSupport(intent) && PromptBehavior.FORCE_PROMPT == request.getPrompt()) { Logger.v(TAG, "FORCE_PROMPT is set for broker auth via old version of broker app, reset to ALWAYS."); intent.putExtra(AuthenticationConstants.Broker.ACCOUNT_PROMPT, PromptBehavior.Always.name()); } } } catch (OperationCanceledException e) { Logger.e(TAG, "Authenticator cancels the request", "", ADALError.AUTH_FAILED_CANCELLED, e); } catch (AuthenticatorException e) { Logger.e(TAG, "Authenticator cancels the request", "", ADALError.BROKER_AUTHENTICATOR_NOT_RESPONDING, e); } catch (IOException e) { Logger.e(TAG, "Authenticator cancels the request", "", ADALError.BROKER_AUTHENTICATOR_IO_EXCEPTION, e); } return intent; }
Source:
<code>public void updateTimelime(final Timeline timeline) { try { jdbcTemplate.update( "UPDATE zn_data.timeline SET " + " et_name=?, " + " tl_order=?, " + " st_id=?, " + " tl_topic=?, " + " tl_created_at=?, " + " tl_switched_at=?, " + " tl_cleanup_at=?, " + " tl_latest_position=?::jsonb " + " WHERE tl_id=?", timeline.getEventType(), timeline.getOrder(), timeline.getStorage().getId(), timeline.getTopic(), timeline.getCreatedAt(), timeline.getSwitchedAt(), timeline.getCleanupAt(), timeline.getLatestPosition() == null ? null : jsonMapper.writer().writeValueAsString(timeline.getLatestPosition()), <START> timeline.getId()); <END> } catch (final JsonProcessingException ex) { throw new IllegalArgumentException("Can not serialize latest position to json", ex); } }</code><technical_language>happen if id is null</technical_language>

Target:
public void updateTimelime(final Timeline timeline) { if (null == timeline.getId()) { throw new IllegalArgumentException("Timeline id can not be null on update (" + timeline + ")"); } try { jdbcTemplate.update( "UPDATE zn_data.timeline SET " + " et_name=?, " + " tl_order=?, " + " st_id=?, " + " tl_topic=?, " + " tl_created_at=?, " + " tl_switched_at=?, " + " tl_cleanup_at=?, " + " tl_latest_position=?::jsonb " + " WHERE tl_id=?", timeline.getEventType(), timeline.getOrder(), timeline.getStorage().getId(), timeline.getTopic(), timeline.getCreatedAt(), timeline.getSwitchedAt(), timeline.getCleanupAt(), timeline.getLatestPosition() == null ? null : jsonMapper.writer().writeValueAsString(timeline.getLatestPosition()), timeline.getId()); } catch (final JsonProcessingException ex) { throw new IllegalArgumentException("Can not serialize latest position to json", ex); } }
Source:
<code>public void clickOnHightlightThreadButton(boolean highlight) { waitForElementByElement(hightlightThreadButton); waitForElementClickableByElement(hightlightThreadButton); scrollAndClick(hightlightThreadButton); if (highlight) { <START> waitForElementByCss(".removed"); <END> } else { waitForElementNotVisibleByBy(By.cssSelector(".removed")); } PageObjectLogging.log("clickOnHightlightThreadButton", "click on '" + (highlight ? "highlight": "unhighlight") + " thread' button on a message", true); }</code><technical_language>this pushed WebElement, waitForElementByElement</technical_language>

Target:
private void clickOnHightlightThreadButton(boolean highlight) { waitForElementByElement(hightlightThreadButton); waitForElementClickableByElement(hightlightThreadButton); scrollAndClick(hightlightThreadButton); if (highlight) { waitForElementByElement(highlightLabel); } else { waitForElementNotVisibleByElement(highlightLabel); } PageObjectLogging.log("clickOnHightlightThreadButton", "click on '" + (highlight ? "highlight": "unhighlight") + " thread' button on a message", true); }
Source:
<code>protected void writeInfo() { _writer.writeStartElement("Info"); <START> _writer.writeRaw(String.format("%1$s CPU, %2$s Memeory", vmBase.getNumOfCpus(), vmBase.getMemSizeMb())); <END> _writer.writeEndElement(); }</code><technical_language>good fix typo ("Memeory")</technical_language>

Target:
protected void writeInfo() { _writer.writeStartElement("Info"); _writer.writeRaw(String.format("%1$s CPU, %2$s Memory", vmBase.getNumOfCpus(), vmBase.getMemSizeMb())); _writer.writeEndElement(); }
Source:
<code><START> public GroupedPropertyList getPropertyList() throws Exception { <END> if (propertyList == null) { propertyList = new GroupedPropertyList(individual, vreq, editing); } return propertyList; }</code><technical_language>a good idea add a generic exception here. limited throwing exceptions occur in method, consider handled method changing signature</technical_language>

Target:
public GroupedPropertyList getPropertyList() { if (propertyList == null) { propertyList = new GroupedPropertyList(individual, vreq, editing); } return propertyList; }
Source:
<code>public BlobChangefeedAsyncClient buildAsyncClient() { <START> BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); <END> return new BlobChangefeedAsyncClient(pipeline, accountUrl, serviceVersion); }</code><technical_language>version null? If is null is issue default set elsewhere</technical_language>

Target:
public BlobChangefeedAsyncClient buildAsyncClient() { BlobContainerAsyncClient client = new BlobContainerClientBuilder() .endpoint(accountUrl) .containerName(CHANGEFEED_CONTAINER_NAME) .pipeline(pipeline) .serviceVersion(version) .buildAsyncClient(); AvroReaderFactory avroReaderFactory = new AvroReaderFactory(); BlobChunkedDownloaderFactory blobChunkedDownloaderFactory = new BlobChunkedDownloaderFactory(client); ChunkFactory chunkFactory = new ChunkFactory(avroReaderFactory, blobChunkedDownloaderFactory); ShardFactory shardFactory = new ShardFactory(chunkFactory, client); SegmentFactory segmentFactory = new SegmentFactory(shardFactory, client); ChangefeedFactory changefeedFactory = new ChangefeedFactory(segmentFactory, client); return new BlobChangefeedAsyncClient(changefeedFactory); }
Source:
<code>private Organisation stubOrgObject() { Organisation organisation = new Organisation(); organisation.setName("testname"); organisation.setLocation("testlocation"); <START> organisation.setLocation("testlink"); <END> organisation.setEmail("test@email.com"); organisation.setDescription("This is the test description."); return organisation; }</code><technical_language>duplicate purpose</technical_language>

Target:
private Organisation stubOrgObject() { String markdownDescription = "An h1 header ============ Paragraphs are separated by a blank line. 2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists look like: * this one * that one * the other one Note that --- not considering the asterisk --- the actual text content starts at 4-columns in. > Block quotes are > written like so. > > They can span multiple paragraphs, > if you like. Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., \"it's all in chapters 12--14\"). Three dots ... will be converted to an ellipsis. Unicode is supported. ☺ "; Organisation organisation = new Organisation(); organisation.setName("testname"); organisation.setLocation("testlocation"); organisation.setLink("testlink"); organisation.setEmail("test@email.com"); organisation.setDescription(markdownDescription); return organisation; }
Source:
<code>public byte[] toBytesFull(boolean withHeader) { int size = getFullStorageSize(numBuckets); <START> if (withHeader) { <END> size += Byte.BYTES + Byte.BYTES; } ByteBuffer buf = ByteBuffer.allocate(size); toBytesFullHelper(buf, withHeader); return buf.array(); }</code><technical_language>is this optional? set true in callers of toBytesFull withHeader eliminated. If is a reason for it, is a reason toBytesSparse writes a header</technical_language>

Target:
public byte[] toBytesFull(boolean withHeader) { int size = getFullStorageSize(numBuckets); if (withHeader) { size += SERDE_HEADER_SIZE; } ByteBuffer buf = ByteBuffer.allocate(size); writeByteBufferFull(buf, withHeader); return buf.array(); }
Source:
<code>public void testNotStats() { assertExpression("NOT(x < 0e0)") .outputRowsCount(625) .symbolStats(new Symbol("x"), symbolAssert -> symbolAssert.averageRowSize(4.0) .lowValue(-10.0) .highValue(10.0) .distinctValuesCount(40.0) <START> .nullsFraction(0.4)) END> .symbolStats(new Symbol("y"), symbolAssert -> symbolAssert.distinctValuesCount(20.0)); assertExpression("NOT(json_array_contains(JSON '[]', x))") .outputRowsCount(900) .symbolStats(new Symbol("x"), symbolAssert -> symbolAssert.averageRowSize(4.0) .lowValue(-10.0) .highValue(10.0) .distinctValuesCount(40.0) .nullsFraction(0.25)); assertExpression("NOT(x IS NULL)") .outputRowsCount(750) .symbolStats(new Symbol("x"), symbolAssert -> symbolAssert.averageRowSize(4.0) .lowValue(-10.0) .highValue(10.0) .distinctValuesCount(40.0) .nullsFraction(0)); }</code><technical_language>remove */</technical_language>

Target:
public void testNotStats() { assertExpression("NOT(x < 0e0)") .outputRowsCount(625) .symbolStats(new Symbol("x"), symbolAssert -> symbolAssert.averageRowSize(4.0) .lowValue(0.0) .highValue(10.0) .distinctValuesCount(20.0) .nullsFraction(0.4)) .symbolStats(new Symbol("y"), symbolAssert -> symbolAssert.isEqualTo(yStats)); assertExpression("NOT(json_array_contains(JSON '[]', x))") .outputRowsCount(900) .symbolStats(new Symbol("x"), symbolAssert -> symbolAssert.averageRowSize(4.0) .lowValue(-10.0) .highValue(10.0) .distinctValuesCount(40.0) .nullsFraction(0.25)) .symbolStats(new Symbol("y"), symbolAssert -> symbolAssert.isEqualTo(yStats)); assertExpression("NOT(x IS NULL)") .outputRowsCount(750) .symbolStats(new Symbol("x"), symbolAssert -> symbolAssert.averageRowSize(4.0) .lowValue(-10.0) .highValue(10.0) .distinctValuesCount(40.0) .nullsFraction(0)) .symbolStats(new Symbol("y"), symbolAssert -> symbolAssert.isEqualTo(yStats)); }
Source:
<code>public void updated(Dictionary<String, ?> config) throws ConfigurationException { setProperlyConfigured(false); if (config != null) { String refreshIntervalString = (String) config.get("refresh"); if (StringUtils.isNotBlank(refreshIntervalString)) { refreshInterval = Long.parseLong(refreshIntervalString); } String ip = (String) config.get("ip"); if (StringUtils.isBlank(ip)) { <START> return; <END> } this.ip = ip; String username = (String) config.get("username"); if (StringUtils.isBlank(username)) { return; } this.username = username; String password = (String) config.get("password"); if (StringUtils.isBlank(password)) { return; } this.password = password; setProperlyConfigured(true); } }</code><technical_language>throw ConfigurationException instead</technical_language>

Target:
public void updated(Dictionary<String, ?> config) throws ConfigurationException { setProperlyConfigured(false); if (config != null) { String refreshIntervalString = (String) config.get("refresh"); if (StringUtils.isNotBlank(refreshIntervalString)) { refreshInterval = Long.parseLong(refreshIntervalString); } String ip = (String) config.get("ip"); if (StringUtils.isBlank(ip)) { throw new ConfigurationException("ip", "The ip address must not be empty."); } this.ip = ip; String username = (String) config.get("username"); if (StringUtils.isBlank(username)) { throw new ConfigurationException("username", "The username must not be empty."); } this.username = username; String password = (String) config.get("password"); if (StringUtils.isBlank(password)) { throw new ConfigurationException("password", "The password must not be empty."); } this.password = password; setProperlyConfigured(true); } }
Source:
<code>public void shouldGenerateTwoDifferentSuccessiveDates(){ <START> final LocalDateTime end = LocalDateTime.now().minusDays(2); <END> final LocalDateTime start = LocalDateTime.now().minusDays(3); final Arbitrary<LocalDateTime> dates = Arbitrary.localDateTime(); final LocalDateTime firstDate = dates.apply(100).apply(RANDOM); final LocalDateTime secondDate = dates.apply(100).apply(RANDOM); assertThat(firstDate).isNotEqualTo(secondDate); }</code><technical_language>this line removed (variable end used)</technical_language>

Target:
public void shouldGenerateTwoDifferentSuccessiveDates(){ final Arbitrary<LocalDateTime> dates = Arbitrary.localDateTime(); final LocalDateTime firstDate = dates.apply(100).apply(RANDOM); final LocalDateTime secondDate = dates.apply(100).apply(RANDOM); assertThat(firstDate).isNotEqualTo(secondDate); }
Source:
<code>public void define(WebService.NewController context) { WebService.NewAction action = context.createAction(ACTION_REMOVE) .setDescription("Remove a notification for the authenticated user.<br>" + "Requires one of the following permissions:" + "<ul>" + " <li>Authentication if no login is provided</li>" + " <li>System administration if a login is provided</li>" + "</ul>") .setSince("6.3") .setPost(true) .setHandler(this); action.createParam(PARAM_PROJECT) .setDescription("Project key") .setExampleValue(KeyExamples.KEY_PROJECT_EXAMPLE_001); List<NotificationChannel> channels = notificationCenter.getChannels(); action.createParam(PARAM_CHANNEL) .setDescription("Channel through which the notification is sent. For example, notifications can be sent by email.") .setPossibleValues(channels) .setDefaultValue(EmailNotificationChannel.class.getSimpleName()); action.createParam(PARAM_TYPE) .setDescription("Notification type. Possible values are for:" + "<ul>" + " <li>Global notifications: %s</li>" + " <li>Per project notifications: %s</li>" + "</ul>", <START> dispatchers.getSortedGlobalDispatchers().stream().sorted().collect(Collectors.joining(", ")), <END> dispatchers.getSortedProjectDispatchers().stream().sorted().collect(Collectors.joining(", "))) .setRequired(true) .setExampleValue(MyNewIssuesNotificationDispatcher.KEY); action.createParam(PARAM_LOGIN) .setDescription("User login") .setSince("6.4"); }</code><technical_language>minor: rename getGlobalDispatchers()</technical_language>

Target:
public void define(WebService.NewController context) { WebService.NewAction action = context.createAction(ACTION_REMOVE) .setDescription("Remove a notification for the authenticated user.<br>" + "Requires one of the following permissions:" + "<ul>" + " <li>Authentication if no login is provided</li>" + " <li>System administration if a login is provided</li>" + "</ul>") .setSince("6.3") .setPost(true) .setHandler(this); action.createParam(PARAM_PROJECT) .setDescription("Project key") .setExampleValue(KeyExamples.KEY_PROJECT_EXAMPLE_001); List<NotificationChannel> channels = notificationCenter.getChannels(); action.createParam(PARAM_CHANNEL) .setDescription("Channel through which the notification is sent. For example, notifications can be sent by email.") .setPossibleValues(channels) .setDefaultValue(EmailNotificationChannel.class.getSimpleName()); action.createParam(PARAM_TYPE) .setDescription("Notification type. Possible values are for:" + "<ul>" + " <li>Global notifications: %s</li>" + " <li>Per project notifications: %s</li>" + "</ul>", dispatchers.getGlobalDispatchers().stream().sorted().collect(Collectors.joining(", ")), dispatchers.getProjectDispatchers().stream().sorted().collect(Collectors.joining(", "))) .setRequired(true) .setExampleValue(MyNewIssuesNotificationDispatcher.KEY); action.createParam(PARAM_LOGIN) .setDescription("User login") .setSince("6.4"); }