auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void restoreVersion(Node node, Node version) { Serializable versionableId = node.getId(); Serializable versionId = version.getId(); boolean excludeSpecialChildren = true; <START> List<SimpleFragment> children = getChildren(versionableId, null, excludeSpecialChildren); <END> for (SimpleFragment child : children.toArray(new SimpleFragment[children.size()])) { removePropertyNode(child); } session.flush(); Row overwriteRow = new Row(Model.HIER_TABLE_NAME, versionableId); SimpleFragment versionHier = version.getHierFragment(); for (String key : model.getFragmentKeysType(Model.HIER_TABLE_NAME).keySet()) { if (key.equals(Model.HIER_PARENT_KEY) || key.equals(Model.HIER_CHILD_NAME_KEY) || key.equals(Model.HIER_CHILD_POS_KEY) || key.equals(Model.HIER_CHILD_ISPROPERTY_KEY) || key.equals(Model.MAIN_PRIMARY_TYPE_KEY) || key.equals(Model.MAIN_CHECKED_IN_KEY) || key.equals(Model.MAIN_BASE_VERSION_KEY) || key.equals(Model.MAIN_IS_VERSION_KEY)) { continue; } overwriteRow.putNew(key, versionHier.get(key)); } overwriteRow.putNew(Model.MAIN_CHECKED_IN_KEY, Boolean.TRUE); overwriteRow.putNew(Model.MAIN_BASE_VERSION_KEY, versionId); overwriteRow.putNew(Model.MAIN_IS_VERSION_KEY, null); CopyResult res = mapper.copy(new IdWithTypes(version), node.getParentId(), null, overwriteRow, excludeSpecialChildren); markInvalidated(res.invalidations); }</code><technical_language>arg of getChildren is complexProp misleading pass arg called excludeSpecialChildren. this needs get changed honest</technical_language>

Target:
public void restoreVersion(Node node, Node version) { Serializable versionableId = node.getId(); Serializable versionId = version.getId(); List<SimpleFragment> children = getChildren(versionableId, null, true); for (SimpleFragment child : children.toArray(new SimpleFragment[children.size()])) { removePropertyNode(child); } session.flush(); Row overwriteRow = new Row(Model.HIER_TABLE_NAME, versionableId); SimpleFragment versionHier = version.getHierFragment(); for (String key : model.getFragmentKeysType(Model.HIER_TABLE_NAME).keySet()) { if (key.equals(Model.HIER_PARENT_KEY) || key.equals(Model.HIER_CHILD_NAME_KEY) || key.equals(Model.HIER_CHILD_POS_KEY) || key.equals(Model.HIER_CHILD_ISPROPERTY_KEY) || key.equals(Model.MAIN_PRIMARY_TYPE_KEY) || key.equals(Model.MAIN_CHECKED_IN_KEY) || key.equals(Model.MAIN_BASE_VERSION_KEY) || key.equals(Model.MAIN_IS_VERSION_KEY)) { continue; } overwriteRow.putNew(key, versionHier.get(key)); } overwriteRow.putNew(Model.MAIN_CHECKED_IN_KEY, Boolean.TRUE); overwriteRow.putNew(Model.MAIN_BASE_VERSION_KEY, versionId); overwriteRow.putNew(Model.MAIN_IS_VERSION_KEY, null); boolean excludeSpecialChildren = true; CopyResult res = mapper.copy(new IdWithTypes(version), node.getParentId(), null, overwriteRow, excludeSpecialChildren); markInvalidated(res.invalidations); }
Source:
<code>private List<Iterator<Entry<KeyType>>> parallelSortAndGetGroupersIterator() { final List<ListenableFuture<Iterator<Entry<KeyType>>>> futures = groupers .stream() .map(grouper -> grouperSorter.submit( <START> new AbstractPrioritizedCallable<Iterator<Entry<KeyType>>>(priority) <END> { @Override public Iterator<Entry<KeyType>> call() throws Exception { synchronized (grouper) { return grouper.iterator(true); } } } ) ).collect(Collectors.toList()); try { return Futures.allAsList(futures).get(); } catch (InterruptedException | ExecutionException e) { throw new RuntimeException(e); } }</code><technical_language>turn this non-abstract class accepts constructor parameters: priority lambda. simplify sites</technical_language>

Target:
private List<Iterator<Entry<KeyType>>> parallelSortAndGetGroupersIterator() { final ListenableFuture<List<Iterator<Entry<KeyType>>>> future = Futures.allAsList( groupers.stream() .map(grouper -> grouperSorter.submit( new AbstractPrioritizedCallable<Iterator<Entry<KeyType>>>(priority) { @Override public Iterator<Entry<KeyType>> call() throws Exception { return grouper.iterator(true); } } ) ) .collect(Collectors.toList()) ); try { final long timeout = queryTimeoutAt - System.currentTimeMillis(); return hasQueryTimeout ? future.get(timeout, TimeUnit.MILLISECONDS) : future.get(); } catch (InterruptedException | TimeoutException e) { future.cancel(true); throw new QueryInterruptedException(e); } catch (CancellationException e) { throw new QueryInterruptedException(e); } catch (ExecutionException e) { throw new RuntimeException(e.getCause()); } }
Source:
<code>protected void loadUrl() { if (getIntent() != null && getIntent().getExtras() != null) { Bundle bundle = getIntent().getExtras(); GutenbergWebViewAuthorizationData gutenbergWebViewAuthorizationData = bundle.getParcelable(ARG_GUTENBERG_WEB_VIEW_AUTH_DATA); String siteUrl = gutenbergWebViewAuthorizationData.getSiteUrl(); String urlToLoad = siteUrl + "/wp-admin/post-new.php"; <START> boolean isSitePrivate = !gutenbergWebViewAuthorizationData.isWPCom(); <END> String authenticationUrl = isSitePrivate ? siteUrl + "/wp-login.php" : WPCOM_LOGIN_URL; String userAgent = gutenbergWebViewAuthorizationData.getWordPressUserAgent(); mWebView.getSettings().setUserAgentString(userAgent); String username = gutenbergWebViewAuthorizationData.getWPComAccountUsername(); String password = gutenbergWebViewAuthorizationData.getWPComAccountPassword(); String token = gutenbergWebViewAuthorizationData.getWPComAccountToken(); mUserId = isSitePrivate ? gutenbergWebViewAuthorizationData.getSelfHostedSiteId() : gutenbergWebViewAuthorizationData.getWPComAccountUserId(); if (isSitePrivate && gutenbergWebViewAuthorizationData.isJetpackSsoEnabled()) { mIsJetpackSsoEnabled = true; mUrlToLoad = urlToLoad; mUserId = gutenbergWebViewAuthorizationData.getWPComAccountUserId(); loadAuthenticatedUrl(WPCOM_LOGIN_URL, "", username, password, token); return; } loadAuthenticatedUrl(authenticationUrl, urlToLoad, username, password, token); } }</code><technical_language>Is isSitePrivate accurate name for this variable? isSelfHosted !isWpCom more precise</technical_language>

Target:
protected void loadUrl() { if (getIntent() != null && getIntent().getExtras() != null) { Bundle bundle = getIntent().getExtras(); GutenbergWebViewAuthorizationData gutenbergWebViewAuthorizationData = bundle.getParcelable(ARG_GUTENBERG_WEB_VIEW_AUTH_DATA); String siteUrl = gutenbergWebViewAuthorizationData.getSiteUrl(); String urlToLoad = siteUrl + "/wp-admin/post-new.php"; boolean isSelfHosted = !gutenbergWebViewAuthorizationData.isWPCom(); String authenticationUrl = isSelfHosted ? siteUrl + "/wp-login.php" : WPCOM_LOGIN_URL; String userAgent = gutenbergWebViewAuthorizationData.getWordPressUserAgent(); mWebView.getSettings().setUserAgentString(userAgent); String username = gutenbergWebViewAuthorizationData.getWPComAccountUsername(); String password = gutenbergWebViewAuthorizationData.getWPComAccountPassword(); String token = gutenbergWebViewAuthorizationData.getWPComAccountToken(); mUserId = isSelfHosted ? gutenbergWebViewAuthorizationData.getSelfHostedSiteId() : gutenbergWebViewAuthorizationData.getWPComAccountUserId(); if (isSelfHosted && gutenbergWebViewAuthorizationData.isJetpackSsoEnabled()) { mIsJetpackSsoEnabled = true; mUrlToLoad = urlToLoad; mUserId = gutenbergWebViewAuthorizationData.getWPComAccountUserId(); loadAuthenticatedUrl(WPCOM_LOGIN_URL, "", username, password, token); return; } loadAuthenticatedUrl(authenticationUrl, urlToLoad, username, password, token); } }
Source:
<code>public long downloadFile(File outFile, DropZone dropZone, String fileName) { if (outFile == null) { <START> log.error("File download failed. File is required."); <END> return -1; } if (fileName == null) { log.error("File download failed. No filename provided."); return -1; } long bytesTransferred = -1; try { FileOutputStream outputStream = new FileOutputStream(outFile); bytesTransferred = downloadFile(outputStream.getChannel(),dropZone,fileName); outputStream.close(); } catch (Exception e) { log.error("File download failed with error message: " + e.getMessage()); } return bytesTransferred; }</code><technical_language>minor error message change suggestion: "File download failed. Valid output File object is required."</technical_language>

Target:
public long downloadFile(File outFile, DropZone dropZone, String fileName) { if (outFile == null) { log.error("File download failed. Valid output File object is required."); return -1; } if (fileName == null) { log.error("File download failed. No filename provided."); return -1; } long bytesTransferred = -1; try { FileOutputStream outputStream = new FileOutputStream(outFile); bytesTransferred = downloadFile(outputStream.getChannel(), dropZone, fileName); outputStream.close(); } catch (Exception e) { log.error("File download failed with error message: " + e.getMessage()); } return bytesTransferred; }
Source:
<code>private void updatePolicyAwareAttributes() { sourcePolicyAwareAttributes = registeredPolicyInstanceProviders.stream() .map(pip -> pip.getApplicationPolicyInstance().getPointcut()) .flatMap(pointcut -> (pointcut instanceof AttributeAwarePointcut) ? ((AttributeAwarePointcut) pointcut).sourcePolicyAwareAttributes().stream() <START> : Stream.empty()) <END> .collect(toSet()); }</code><technical_language>nice :)</technical_language>

Target:
private synchronized void updatePolicyAwareAttributes() { sourcePolicyAwareAttributes = registeredPolicyInstanceProviders.stream() .map(pip -> pip.getApplicationPolicyInstance().getPointcut()) .flatMap(pointcut -> (pointcut instanceof AttributeAwarePointcut) ? ((AttributeAwarePointcut) pointcut).sourcePolicyAwareAttributes().stream() : empty()) .collect(toSet()); }
Source:
<code>public void cleanupBuffers() { testServerMap.values().forEach(x -> { x.getLogUnitServer().shutdown(); x.getManagementServer().shutdown(); <START> x.getLayoutServer().shutdown(); <END> x.getSequencerServer().shutdown(); x.getBaseServer().shutdown(); }); while (runtime.getObjectsView().TXActive()) { runtime.getObjectsView().TXAbort(); } runtimeRouterMap.keySet().forEach(CorfuRuntime::shutdown); runtimeRouterMap.clear(); testServerMap.clear(); }</code><technical_language>please rename x server P.S. letter variable, hard read</technical_language>

Target:
public void cleanupBuffers() { testServerMap.values().forEach(server -> { server.getLogUnitServer().shutdown(); server.getManagementServer().shutdown(); server.getLayoutServer().shutdown(); server.getSequencerServer().shutdown(); server.getBaseServer().shutdown(); }); while (runtime.getObjectsView().TXActive()) { runtime.getObjectsView().TXAbort(); } runtimeRouterMap.keySet().forEach(CorfuRuntime::shutdown); runtimeRouterMap.clear(); testServerMap.clear(); }
Source:
<code>public static void startJMXServer() { try { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); JMXServiceURL url = new JMXServiceURL("rmi", null, 0); JMXConnectorServer cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs); cs.start(); <START> System.out.println("JMX url: " + cs.getAddress().toString()); <END> } catch (Exception e) { System.out.println("Failed to start JMX server: " + e.getMessage()); } }</code><technical_language>a logger println</technical_language>

Target:
public static void startJMXServer() { try { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); JMXServiceURL url = new JMXServiceURL("rmi", null, 0); JMXConnectorServer cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs); cs.start(); LOG.info("JMX url: " + cs.getAddress().toString()); } catch (Exception e) { LOG.error("Failed to start JMX server: " + e.getMessage()); } }
Source:
<code>public void add(double value, double weight, long count) <START> { <END> int bucketIndex = getIndexForValue(bucketCount, min, max, value); add(bucketIndex, weight, count); }</code><technical_language>I need a estimateMemorySize method</technical_language>

Target:
public void add(double value, double weight, long count) { int logicalBucketIndex = getIndexForValue(bucketCount, min, max, value); add(logicalBucketIndex, weight, count); }
Source:
<code>private static void setHashtagConnectionPool(HostSupplier hostSupplier, ConnectionPoolConfigurationImpl config) { List<Host> hosts = (List<Host>) hostSupplier.getHosts(); Collections.sort(hosts); TokenMapSupplier tokenMapSupplier = config.getTokenSupplier(); List<HostToken> hostTokens; if (tokenMapSupplier != null) { Set<Host> hostSet = new HashSet<Host>(hosts); hostTokens = tokenMapSupplier.getTokens(hostSet); if (hostTokens.isEmpty()) { throw new DynoConnectException("No hosts in the TokenMapSupplier"); } } else { throw new DynoConnectException("TokenMapSupplier not provided"); } String hashtag = hostTokens.get(0).getHost().getHashtag(); <START> short numHosts = 0; <END> for (HostToken hToken : hostTokens) { String hashtagNew = hToken.getHost().getHashtag(); if (hashtag != null && !hashtag.equals(hashtagNew)) { logger.error("Hashtag mismatch across hosts"); throw new RuntimeException("Hashtags are different across hosts"); } else if (numHosts > 0 && hashtag == null && hashtagNew != null) { logger.error("Hashtag mismatch across hosts"); throw new RuntimeException("Hashtags are different across hosts"); } hashtag = hashtagNew; numHosts++; } if (hashtag != null) { config.withHashtag(hashtag); } }</code><technical_language>Slightly confused code here. If configured correctly, hostTokens is created, hashtags for host match. in case, changing code a lot more concise. if (hashtag == null) { logger.error("Hashtag set more hosts"); throw new RuntimeException("Hashtag set more hosts"); } for (HostToken hToken : hostTokens) { if (!hashtag.equals(hashtagNew)) { logger.error("Hashtag mismatch hosts"); throw new RuntimeException("Hashtags hosts"); } } get rid of 'numHosts' check for entire topology; get rid of hashtag = hashtagNew L160, since, match</technical_language>

Target:
private static void setHashtagConnectionPool(HostSupplier hostSupplier, ConnectionPoolConfigurationImpl config) { List<Host> hosts = (List<Host>) hostSupplier.getHosts(); Collections.sort(hosts); TokenMapSupplier tokenMapSupplier = config.getTokenSupplier(); List<HostToken> hostTokens; if (tokenMapSupplier != null) { Set<Host> hostSet = new HashSet<Host>(hosts); hostTokens = tokenMapSupplier.getTokens(hostSet); if (hostTokens.isEmpty()) { throw new DynoConnectException("No hosts in the TokenMapSupplier"); } } else { throw new DynoConnectException("TokenMapSupplier not provided"); } String hashtag = hostTokens.get(0).getHost().getHashtag(); Stream<String> htStream = hostTokens.stream().map(hostToken -> hostToken.getHost().getHashtag()); if (hashtag == null) { htStream.filter(ht -> ht != null).findAny().ifPresent(ignore -> { logger.error("Hashtag mismatch across hosts"); throw new RuntimeException("Hashtags are different across hosts"); }); } else { htStream.filter(ht -> !hashtag.equals(ht)).findAny().ifPresent(ignore -> { logger.error("Hashtag mismatch across hosts"); throw new RuntimeException("Hashtags are different across hosts"); }); } if (hashtag != null) { config.withHashtag(hashtag); } }
Source:
<code>public static String decodeURIComponent(String s, boolean plus) { if (s == null) { return null; } final int size = s.length(); boolean modified = false; int i; for (i = 0; i < size; i++) { final char c = s.charAt(i); if (c == '%' || (plus && c == '+')) { modified = true; break; } } if (!modified) { return s; } final byte[] buf = s.getBytes(); int pos = i; for (; i < size; i++) { char c = s.charAt(i); if (c == '%') { if (i == size - 1) { throw new IllegalArgumentException("unterminated escape" + " sequence at end of string: " + s); } c = s.charAt(++i); if (c == '%') { buf[pos++] = '%'; break; } if (i == size - 1) { throw new IllegalArgumentException("partial escape" + " sequence at end of string: " + s); } c = decodeHexNibble(c); final char c2 = decodeHexNibble(s.charAt(++i)); if (c == Character.MAX_VALUE || c2 == Character.MAX_VALUE) { throw new IllegalArgumentException( "invalid escape sequence `%" + s.charAt(i - 1) + s.charAt(i) + "' at index " + (i - 2) + " of: " + s); } c = (char) (c * 16 + c2); buf[pos++] = (byte) c; } else { buf[pos++] = (byte) (plus && c == '+' ? ' ' : c); } } <START> return new String(buf, 0, pos, CharsetUtil.UTF_8); <END> }</code><technical_language>java.nio.charset.StandardCharsets instead of CharsetUtil</technical_language>

Target:
public static String decodeURIComponent(String s, boolean plus) { if (s == null) { return null; } final int size = s.length(); boolean modified = false; int i; for (i = 0; i < size; i++) { final char c = s.charAt(i); if (c == '%' || (plus && c == '+')) { modified = true; break; } } if (!modified) { return s; } final byte[] buf = s.getBytes(StandardCharsets.UTF_8); int pos = i; for (; i < size; i++) { char c = s.charAt(i); if (c == '%') { if (i == size - 1) { throw new IllegalArgumentException("unterminated escape" + " sequence at end of string: " + s); } c = s.charAt(++i); if (c == '%') { buf[pos++] = '%'; break; } if (i >= size - 1) { throw new IllegalArgumentException("partial escape" + " sequence at end of string: " + s); } c = decodeHexNibble(c); final char c2 = decodeHexNibble(s.charAt(++i)); if (c == Character.MAX_VALUE || c2 == Character.MAX_VALUE) { throw new IllegalArgumentException( "invalid escape sequence `%" + s.charAt(i - 1) + s.charAt(i) + "' at index " + (i - 2) + " of: " + s); } c = (char) (c * 16 + c2); buf[pos++] = (byte) c; } else { buf[pos++] = (byte) (plus && c == '+' ? ' ' : c); } } return new String(buf, 0, pos, StandardCharsets.UTF_8); }
Source:
<code>protected List<EAccessLevel> resolveList(List<?> list) { List<EAccessLevel> ret = new ArrayList<>(); for (Object elem : (Collection<?>) list) { <START> ret.add(EAccessLevel.getAccessLevel(elem.toString()).get()); <END> } return Collections.unmodifiableList(ret); }</code><technical_language>This a NPE, instead resolve Optionals checking present()</technical_language>

Target:
protected List<EAccessLevel> resolveList(List<?> list) { List<EAccessLevel> ret = new ArrayList<>(); Optional<EAccessLevel> eAccessLevel; for (Object elem : (Collection<?>) list) { eAccessLevel = EAccessLevel.getAccessLevel(elem.toString()); if (eAccessLevel.isPresent()) { ret.add(eAccessLevel.get()); } } return Collections.unmodifiableList(ret); }
Source:
<code>private void setTTLAllPartitionsAndWaitForCompletion(List<Data>[] keysPerPartition, Data expiryPolicy) { List<Future> futures = new ArrayList<Future>(keysPerPartition.length); for (int partitionId = 0; partitionId < keysPerPartition.length; partitionId++) { List<Data> keys = keysPerPartition[partitionId]; if (keys != null) { Operation operation = operationProvider.createSetExpiryPolicyOperation(keys, expiryPolicy); futures.add(invoke(operation, partitionId, true)); } } Throwable error = null; for (Future future: futures) { try { future.get(); } catch (Throwable t) { <START> logger.finest("Error occured while batch operation!", t); <END> if (error == null) { error = t; } } } if (error != null) { throw rethrow(error); } }</code><technical_language>write part lines 352-365, enhance FutureUtil#waitForever</technical_language>

Target:
private void setTTLAllPartitionsAndWaitForCompletion(List<Data>[] keysPerPartition, Data expiryPolicy) { List<Future> futures = new ArrayList<Future>(keysPerPartition.length); for (int partitionId = 0; partitionId < keysPerPartition.length; partitionId++) { List<Data> keys = keysPerPartition[partitionId]; if (keys != null) { Operation operation = operationProvider.createSetExpiryPolicyOperation(keys, expiryPolicy); futures.add(invoke(operation, partitionId, true)); } } List<Throwable> throwables = FutureUtil.waitUntilAllResponded(futures); if (throwables.size() > 0) { throw rethrow(throwables.get(0)); } }
Source:
<code>@Override public void load(Request request, int networkPolicy, Callback callback) { if (assetManager == null) { synchronized (lock) { if (assetManager == null) { assetManager = context.getAssets(); } } } try { Source source = Okio.source(assetManager.open(getFilePath(request))); callback.onSuccess(new Result(source, DISK)); } catch (Exception e) { <START> callback.onError(e); <END> } }</code><technical_language>callback called twice. catch IOExceptions line 55</technical_language>

Target:
@Override public void load(Request request, int networkPolicy, Callback callback) { if (assetManager == null) { synchronized (lock) { if (assetManager == null) { assetManager = context.getAssets(); } } } boolean signaledCallback = false; try { Source source = Okio.source(assetManager.open(getFilePath(request))); signaledCallback = true; callback.onSuccess(new Result(source, DISK)); } catch (Exception e) { if (!signaledCallback) { callback.onError(e); } } }
Source:
<code>public static void writeDSFID(DataSerializableFixedID o, DataOutput out) throws IOException { int dsfid = o.getDSFID(); try { if (dsfid != DataSerializableFixedID.NO_FIXED_ID) { dsfidSerializer.write(o, out); return; } out.writeByte(DSCODE.DS_NO_FIXED_ID.toByte()); DataSerializer.writeClass(o.getClass(), out); invokeToData(o, out); } catch (IOException | CancelException | ToDataException | GemFireRethrowable io) { throw io; } catch (VirtualMachineError err) { SystemFailure.initiateFailure(err); throw err; } catch (Throwable t) { SystemFailure.checkFailure(); <START> t.printStackTrace(); <END> throw new ToDataException("toData failed on dsfid=" + dsfid + " msg:" + t.getMessage(), t); } }</code><technical_language>Remove this printStackTrace call. "t" is ToDataException enough. If do need logger I advise leave handler of ToDataException display cause</technical_language>

Target:
public static void writeDSFID(DataSerializableFixedID o, DataOutput out) throws IOException { int dsfid = o.getDSFID(); try { if (dsfid != DataSerializableFixedID.NO_FIXED_ID) { dsfidSerializer.write(o, out); return; } out.writeByte(DSCODE.DS_NO_FIXED_ID.toByte()); DataSerializer.writeClass(o.getClass(), out); invokeToData(o, out); } catch (IOException | CancelException | ToDataException | GemFireRethrowable io) { throw io; } catch (VirtualMachineError err) { SystemFailure.initiateFailure(err); throw err; } catch (Throwable t) { SystemFailure.checkFailure(); throw new ToDataException("toData failed on dsfid=" + dsfid + " msg:" + t.getMessage(), t); } }
Source:
<code>public void open(final ProjectDiagram diagram) { final Graph<?, Node<org.kie.workbench.common.stunner.core.graph.content.view.View, ?>> graph = diagram.getGraph(); this.layoutHelper.applyLayout(diagram.getGraph()); <START> final Optional<Node<org.kie.workbench.common.stunner.core.graph.content.view.View, ?>> dd = StreamSupport.stream(graph.nodes().spliterator(), <END> false) .filter(n -> n.getContent().getDefinition() instanceof DMNDiagram) .findFirst(); if (dd.isPresent()) { dd.get().getContent().setBounds(BoundsImpl.build(0, 0, 0, 0)); } super.open(diagram); }</code><technical_language>I putting this in LayoutHelper.applyLayout(..) (and avoid need copy paste). issue limited DMN (as error specifically do DMN) affect _any_ diagram invokes "auto layout code" (so BPMN equally affected). code simplified: graph.nodes().spliterator(), false) .filter(n -> n.getContent().getDefinition() instanceof DMNDiagram) .findFirst() .ifPresent(diagram -> diagram.getContent().setBounds(BoundsImpl.build(0, 0, 0, 0)));</technical_language>

Target:
public void open(final ProjectDiagram diagram) { this.layoutHelper.applyLayout(diagram); super.open(diagram); }
Source:
<code>public String toString() { <START> String sb = String.valueOf(providerId) <END> + " providerName:" + ((person != null) ? person.getNames() : ""); return "[Provider: providerId:" + sb + " ]"; }</code><technical_language>variable name remain sb</technical_language>

Target:
public String toString() { String provider = String.valueOf(providerId) + " providerName:" + ((person != null) ? person.getNames() : ""); return "[Provider: providerId:" + provider + " ]"; }
Source:
<code>public Image getImage(Object element) { if (element instanceof IConnectionProvider) { ConnectionProviderUI ui = UIExtensionManager .getConnectionProviderUI(((IConnectionProvider) element).getId()); if (ui != null) { <START> if (images.containsKey(ui.getId())) <END> return images.get(ui.getId()); images.put(ui.getId(), ui.getImageDescriptor().createImage()); return images.get(ui.getId()); } } return null; }</code><technical_language>ui.getId() is called 4 times, do extract a local variable</technical_language>

Target:
public Image getImage(Object element) { if (element instanceof IConnectionProvider) { ConnectionProviderUI ui = UIExtensionManager .getConnectionProviderUI(((IConnectionProvider) element).getId()); if (ui != null) { String id = ui.getId(); if (images.containsKey(id)) return images.get(id); images.put(id, ui.getImageDescriptor().createImage()); return images.get(id); } } return null; }
Source:
<code><START> protected void setActionMessageParameters() { <END> addCanDoActionMessage(VdcBllMessages.VAR__ACTION__RESUME); }</code><technical_language>super.setActionMessageParameters();</technical_language>

Target:
protected void setActionMessageParameters() { super.setActionMessageParameters(); addCanDoActionMessage(VdcBllMessages.VAR__ACTION__RESUME); }
Source:
<code>public Response add(Step step) { validateParameters(step, "type", "status.state" , "description"); String id; if (step.isSetParentStep()) { validateParameters(step, "parentStep.id"); id = step.getParentStep().getId(); } else { id = jobId.toString(); } Response response = performCreate(VdcActionType.AddExternalStep, new AddExternalStepParameters(asGuid(id), step.getDescription(),StepMapper.map(StepEnum.fromValue(step.getType())), JobMapper.map(step.getStatus(), null)), new QueryIdResolver<Guid>(VdcQueryType.GetStepByStepId, IdQueryParameters.class)); Step createdStep = (Step)response.getEntity(); <START> injectParent(createdStep); <END> return response; }</code><technical_language>right fix this is: 1. leave this code is 2. override map() 3. in map() call supper.map() injectParent(); (does this is relevant for update well?)</technical_language>

Target:
public Response add(Step step) { validateParameters(step, "type", "status.state" , "description"); String id; if (step.isSetParentStep()) { validateParameters(step, "parentStep.id"); id = step.getParentStep().getId(); } else { id = jobId.toString(); } return performCreate(VdcActionType.AddExternalStep, new AddExternalStepParameters(asGuid(id), step.getDescription(),StepMapper.map(StepEnum.fromValue(step.getType())), JobMapper.map(step.getStatus(), null)), new QueryIdResolver<Guid>(VdcQueryType.GetStepByStepId, IdQueryParameters.class)); }
Source:
<code>private boolean containsJavaSource(MavenProject proj) { <START> File javaSourceDir = new File(proj.getBasedir(), "src/main/java"); <END> if (javaSourceDir.exists() && javaSourceDir.isDirectory() && javaSourceDir.listFiles().length > 0) { return true; } else { return false; } }</code><technical_language>this configured else? get project descriptor</technical_language>

Target:
private boolean containsJavaSource(MavenProject proj) { @SuppressWarnings("unchecked") List<String> srcDirs = proj.getCompileSourceRoots(); for (String dir : srcDirs) { File javaSourceDir = new File(dir); if (javaSourceDir.exists() && javaSourceDir.isDirectory() && containsJavaSource(javaSourceDir)) { return true; } } return false; }
Source:
<code>public void removeProcessTest() throws Exception { if (SystemUtils.IS_OS_LINUX) { File scriptCreateDirMeta = new File(ConfigCore.getParameter("script_createDirMeta")); File scriptCreateDirUserHome = new File(ConfigCore.getParameter("script_createDirUserHome")); ExecutionPermission.setExecutePermission(scriptCreateDirMeta); ExecutionPermission.setExecutePermission(scriptCreateDirUserHome); } int numberOfProcessesDisplayed = Pages.getProcessesPage().countListedProcesses(); <START> Assert.assertTrue("Process list is empty", numberOfProcessesDisplayed > 0); <END> Pages.getProcessesPage().deleteFirstProcess(); Assert.assertTrue("Removal of first process was not successful!", Pages.getProcessesPage().countListedProcesses() < numberOfProcessesDisplayed); if (SystemUtils.IS_OS_LINUX) { File scriptCreateDirMeta = new File(ConfigCore.getParameter("script_createDirMeta")); File scriptCreateDirUserHome = new File(ConfigCore.getParameter("script_createDirUserHome")); ExecutionPermission.setNoExecutePermission(scriptCreateDirMeta); ExecutionPermission.setNoExecutePermission(scriptCreateDirUserHome); } }</code><technical_language>This fail, if processes, row in table is indicating processes. numberOfProcessesDisplayed 1</technical_language>

Target:
public void removeProcessTest() throws Exception { if (SystemUtils.IS_OS_LINUX) { File scriptCreateDirMeta = new File(ConfigCore.getParameter("script_createDirMeta")); File scriptCreateDirUserHome = new File(ConfigCore.getParameter("script_createDirUserHome")); ExecutionPermission.setExecutePermission(scriptCreateDirMeta); ExecutionPermission.setExecutePermission(scriptCreateDirUserHome); } ProcessesPage processesPage = Pages.getProcessesPage(); int numberOfProcessesDisplayed = processesPage.countListedProcesses(); Assert.assertTrue("Process list is empty", processesPage.isResultSetNotEmpty(processesPage.getListOfProcessTitles())); Pages.getProcessesPage().deleteFirstProcess(); Assert.assertTrue("Removal of first process was not successful!", processesPage.countListedProcesses() < numberOfProcessesDisplayed); if (SystemUtils.IS_OS_LINUX) { File scriptCreateDirMeta = new File(ConfigCore.getParameter("script_createDirMeta")); File scriptCreateDirUserHome = new File(ConfigCore.getParameter("script_createDirUserHome")); ExecutionPermission.setNoExecutePermission(scriptCreateDirMeta); ExecutionPermission.setNoExecutePermission(scriptCreateDirUserHome); } }
Source:
<code>public void payloadExpressionEvaluatedAgainstApplicationEvent() { QueueChannel channel = new QueueChannel(); ApplicationEventListeningMessageProducer adapter = new ApplicationEventListeningMessageProducer(); adapter.setPayloadExpression("'received: ' + source"); adapter.setOutputChannel(channel); GenericApplicationContext ctx = TestUtils.createTestApplicationContext(); ConfigurableListableBeanFactory beanFactory = ctx.getBeanFactory(); beanFactory.registerSingleton(AbstractApplicationContext.APPLICATION_EVENT_MULTICASTER_BEAN_NAME, new SimpleApplicationEventMulticaster(beanFactory)); <START> adapter.setBeanFactory(beanFactory); <END> beanFactory.registerSingleton("testListenerMessageProducer", adapter); adapter.afterPropertiesSet(); ctx.refresh(); Message<?> message1 = channel.receive(0); assertNotNull(message1); assertTrue(message1.getPayload().toString() .contains("org.springframework.integration.test.util.TestUtils$TestApplicationContext")); adapter.onApplicationEvent(new TestApplicationEvent1()); adapter.onApplicationEvent(new TestApplicationEvent2()); Message<?> message2 = channel.receive(20); assertNotNull(message2); Message<?> message3 = channel.receive(20); assertNotNull(message3); assertEquals("received: event2", message3.getPayload()); }</code><technical_language>assert for message2's payload need removed</technical_language>

Target:
public void payloadExpressionEvaluatedAgainstApplicationEvent() { QueueChannel channel = new QueueChannel(); ApplicationEventListeningMessageProducer adapter = new ApplicationEventListeningMessageProducer(); adapter.setPayloadExpression("'received: ' + source"); adapter.setOutputChannel(channel); GenericApplicationContext ctx = TestUtils.createTestApplicationContext(); ConfigurableListableBeanFactory beanFactory = ctx.getBeanFactory(); beanFactory.registerSingleton(AbstractApplicationContext.APPLICATION_EVENT_MULTICASTER_BEAN_NAME, new SimpleApplicationEventMulticaster(beanFactory)); adapter.setBeanFactory(beanFactory); beanFactory.registerSingleton("testListenerMessageProducer", adapter); adapter.afterPropertiesSet(); ctx.refresh(); Message<?> message1 = channel.receive(0); assertNotNull(message1); assertTrue(message1.getPayload().toString() .contains("org.springframework.integration.test.util.TestUtils$TestApplicationContext")); adapter.onApplicationEvent(new TestApplicationEvent1()); adapter.onApplicationEvent(new TestApplicationEvent2()); Message<?> message2 = channel.receive(20); assertNotNull(message2); assertEquals("received: event1", message2.getPayload()); Message<?> message3 = channel.receive(20); assertNotNull(message3); assertEquals("received: event2", message3.getPayload()); }
Source:
<code>public void cancel_shouldRemovePendingIntentForBroadcast() { Intent intent = new Intent(); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 99, intent, 100); <START> assertNotNull(pendingIntent); <END> pendingIntent.cancel(); assertThat(PendingIntent.getBroadcast(context, 99, intent, FLAG_NO_CREATE)).isNull(); }</code><technical_language>assertThat().isNotNull() for consistency? Apply throughout</technical_language>

Target:
public void cancel_shouldRemovePendingIntentForBroadcast() { Intent intent = new Intent(); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 99, intent, 100); assertThat(pendingIntent).isNotNull(); pendingIntent.cancel(); assertThat(PendingIntent.getBroadcast(context, 99, intent, FLAG_NO_CREATE)).isNull(); }
Source:
<code>public CoordinationUtils getCoordinationService(String groupId, String participantId, Config config) { ZkConfig zkConfig = new ZkConfig(config); <START> <END> ZkClient zkClient = createZkClient(zkConfig.getZkConnect(), zkConfig.getZkSessionTimeoutMs(), zkConfig.getZkConnectionTimeoutMs()); ZkJobCoordinatorMetrics zkJobCoordinatorMetrics = getJobCoordinatorMetrics(config, participantId); ZkUtils zkUtils = new ZkUtils(new ZkKeyBuilder(groupId), zkClient, zkConfig.getZkConnectionTimeoutMs(), zkJobCoordinatorMetrics); return new ZkCoordinationUtils(participantId, zkConfig, zkUtils); }</code><technical_language>metrics expecting report CoordinationService? application runner. If case, need metrics support pass in a null metrics</technical_language>

Target:
public CoordinationUtils getCoordinationService(String groupId, String participantId, Config config) { ZkConfig zkConfig = new ZkConfig(config); ZkClient zkClient = createZkClient(zkConfig.getZkConnect(), zkConfig.getZkSessionTimeoutMs(), zkConfig.getZkConnectionTimeoutMs()); ZkUtils zkUtils = new ZkUtils(new ZkKeyBuilder(groupId), zkClient, zkConfig.getZkConnectionTimeoutMs(), new NoOpMetricsRegistry()); return new ZkCoordinationUtils(participantId, zkConfig, zkUtils); }
Source:
<code>private void deleteDirOnExit(FileSystem fs, String target) throws Exception { <START> Path path = new Path(target.replaceAll(".*://.*?(?=/)", "")); <END> fs.deleteOnExit(path); info(path + " is scheduled to be deleted on exit."); }</code><technical_language>duplicate regex above, reuse it</technical_language>

Target:
private void deleteDirOnExit(FileSystem fs, String target) throws Exception { Path path = new Path(extractPathFromUrl(target)); fs.deleteOnExit(path); info(path + " is scheduled to be deleted on exit."); }
Source:
<code>public void process(CarbonHttpRequest request, CarbonHttpResponse response, ConfigurationContext configurationContext) throws AxisFault { API api = getAPIFromSynapseConfig(request); if (api == null) { handleException(request.getRequestURI()); } else { String responseString; try { responseString = retrieveFromRegistry(api, request); if (responseString == null) { if (log.isDebugEnabled()) { log.debug("Generating swagger definition for: " + api.getName()); } JSONObject jsonDefinition = new JSONObject(new GenericApiObjectDefinition(api).getDefinitionMap()); responseString = jsonDefinition.toString(); } } catch (RegistryException e) { <START> String errMsg = "Error occurred while retrieving swagger definition from registry"; <END> log.error(errMsg, e); throw new AxisFault(errMsg, e); } updateResponse(response, responseString, SwaggerConstants.CONTENT_TYPE_JSON); } }</code><technical_language>Is required log throw exception</technical_language>

Target:
public void process(CarbonHttpRequest request, CarbonHttpResponse response, ConfigurationContext configurationContext) throws AxisFault { API api = getAPIFromSynapseConfig(request); if (api == null) { handleException(request.getRequestURI()); } else { String responseString; try { responseString = retrieveFromRegistry(api, request); if (responseString == null) { if (log.isDebugEnabled()) { log.debug("Generating swagger definition for: " + api.getName()); } JSONObject jsonDefinition = new JSONObject(new GenericApiObjectDefinition(api).getDefinitionMap()); responseString = jsonDefinition.toString(); } } catch (RegistryException e) { throw new AxisFault("Error occurred while retrieving swagger definition from registry", e); } updateResponse(response, responseString, SwaggerConstants.CONTENT_TYPE_JSON); } }
Source:
<code>public void inject(final T instance, final CreationalContext<T> ctx, final BeanManagerImpl manager, final SlimAnnotatedType<T> type, final InjectionTarget<T> injectionTarget) { Beans.injectEEFields(resourceInjectionsHierarchy, instance, ctx); <START> ResourceInjector.super.inject(instance, ctx, manager, type, injectionTarget); <END> }</code><technical_language>This Beans.injectEEFields() called of InjectionContext.proceed(). Weld perform injections InjectionContext.proceed()</technical_language>

Target:
public void inject(final T instance, final CreationalContext<T> ctx, final BeanManagerImpl manager, final SlimAnnotatedType<T> type, final InjectionTarget<T> injectionTarget) { new InjectionContextImpl<T>(manager, injectionTarget, type, instance) { @Override public void proceed() { Beans.injectEEFields(resourceInjectionsHierarchy, instance, ctx); Beans.injectFieldsAndInitializers(instance, ctx, manager, getInjectableFields(), getInitializerMethods()); } }.run(); }
Source:
<code>public String getHostNum() { <START> return mHostNum; <END> }</code><technical_language>SharedPreferences is a cache if I understand correctly</technical_language>

Target:
public Integer getHostNum() { return getHostNum(this.mPreferences); }
Source:
<code>public static void inspectWithCustomRegex( String projectId, String textToInspect, String customRegexPattern) { try (DlpServiceClient dlp = DlpServiceClient.create()) { ProjectName project = ProjectName.of(projectId); ByteContentItem byteItem = ByteContentItem.newBuilder() .setType(BytesType.TEXT_UTF8) .setData(ByteString.copyFromUtf8(textToInspect)) .build(); ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); Regex regex = Regex.newBuilder().setPattern(customRegexPattern).build(); InfoType infoType = InfoType.newBuilder().setName("C_MRN").build(); CustomInfoType customInfoType = CustomInfoType.newBuilder().setInfoType(infoType).setRegex(regex).build(); InspectConfig config = InspectConfig.newBuilder() .addCustomInfoTypes(customInfoType) .setIncludeQuote(true) .setMinLikelihood(Likelihood.POSSIBLE) .build(); InspectContentRequest request = InspectContentRequest.newBuilder() .setParent(project.toString()) .setItem(item) .setInspectConfig(config) .build(); InspectContentResponse response = dlp.inspectContent(request); System.out.println("Findings: " + response.getResult().getFindingsCount()); for (Finding f : response.getResult().getFindingsList()) { System.out.println("\tQuote: " + f.getQuote()); System.out.println("\tInfo type: " + f.getInfoType().getName()); System.out.println("\tLikelihood: " + f.getLikelihood()); } <START> } catch (Exception e) { System.out.println("Error during inspectString: \n" + e.toString()); } <END> }</code><technical_language><LINK_0> explain happen, catch it</technical_language>

Target:
public static void inspectWithCustomRegex( String projectId, String textToInspect, String customRegexPattern) throws IOException { try (DlpServiceClient dlp = DlpServiceClient.create()) { ProjectName project = ProjectName.of(projectId); ByteContentItem byteItem = ByteContentItem.newBuilder() .setType(BytesType.TEXT_UTF8) .setData(ByteString.copyFromUtf8(textToInspect)) .build(); ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); Regex regex = Regex.newBuilder().setPattern(customRegexPattern).build(); InfoType infoType = InfoType.newBuilder().setName("C_MRN").build(); CustomInfoType customInfoType = CustomInfoType.newBuilder().setInfoType(infoType).setRegex(regex).build(); InspectConfig config = InspectConfig.newBuilder() .addCustomInfoTypes(customInfoType) .setIncludeQuote(true) .setMinLikelihood(Likelihood.POSSIBLE) .build(); InspectContentRequest request = InspectContentRequest.newBuilder() .setParent(project.toString()) .setItem(item) .setInspectConfig(config) .build(); InspectContentResponse response = dlp.inspectContent(request); System.out.println("Findings: " + response.getResult().getFindingsCount()); for (Finding f : response.getResult().getFindingsList()) { System.out.println("\tQuote: " + f.getQuote()); System.out.println("\tInfo type: " + f.getInfoType().getName()); System.out.println("\tLikelihood: " + f.getLikelihood()); } } }
Source:
<code>protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); Button manageButton = createButton(parent, IDialogConstants.CLIENT_ID + 1, Messages.TraceControl_ManageButtonText, true); manageButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(parent.getShell(), ControlRemoteProfilesPreferencePage.ID, new String[] { ControlRemoteProfilesPreferencePage.ID }, null); dialog.open(); if (fLocalComposite != null) { <START> fFolderViewer.refresh(); <END> } } }); Button button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); button.setEnabled(false); }</code><technical_language>change anything. model (input) changed</technical_language>

Target:
protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); Button manageButton = createButton(parent, IDialogConstants.CLIENT_ID + 1, Messages.TraceControl_ManageButtonText, false); manageButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(parent.getShell(), ControlRemoteProfilesPreferencePage.ID, new String[] { ControlRemoteProfilesPreferencePage.ID }, null); dialog.open(); if (fLocalComposite != null) { fFolderViewer.setInput(LTTngProfileViewer.getViewerInput()); } } }); Button button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); button.setEnabled(false); }
Source:
<code>public void incrementRecordCount() { int count = this.getRecordCount(); count++; <START> this.setRecordCount(count); <END> }</code><technical_language>recordCount++; work</technical_language>

Target:
public void incrementRecordCount() { recordCount++; }
Source:
<code>public static String toMemorableString(long num) { StringBuilder memorable = new StringBuilder(); <START> num=Math.abs(num); <END> for (; ; ) { int chunk = (int) (num & 0xf); memorable.append(CONSONANTS[chunk]); num >>= 4; if (num == 0) { break; } chunk = (int) (num & 7); memorable.append(VOWELS[chunk]); num >>= 3; if (num == 0) { break; } } return memorable.toString(); }</code><technical_language>formatting num = Math.abs(num);. more, point of view change of method input parameter rewrite line in cycle int chunk = (int) (Math.abs(num) & 0xf); WDYT</technical_language>

Target:
public static String toMemorableString(long num) { StringBuilder memorable = new StringBuilder(); long hashNum = Math.abs(num); for (; ; ) { int chunk = (int) (hashNum & 0xf); memorable.append(CONSONANTS[chunk]); hashNum >>= 4; if (hashNum == 0) { break; } chunk = (int) (hashNum & 7); memorable.append(VOWELS[chunk]); hashNum >>= 3; if (hashNum == 0) { break; } } return memorable.toString(); }
Source:
<code>public void getOffset() throws Exception { mOptions.setRootDir(mTemp.getRoot().getAbsolutePath()); int len = 32; int offset = 3; try (PageStore store = PageStore.create(mOptions)) { PageId id = new PageId(0, 0); store.put(id, BufferUtils.getIncreasingByteArray(len)); ByteBuffer buf = ByteBuffer.allocate(1024); try (ReadableByteChannel channel = store.get(id, offset)) { channel.read(buf); } buf.flip(); <START> assertTrue(BufferUtils.equalIncreasingByteBuffer(3, len - offset, buf)); <END> } }</code><technical_language>3 -> offset</technical_language>

Target:
public void getOffset() throws Exception { mOptions.setRootDir(mTemp.getRoot().getAbsolutePath()); int len = 32; int offset = 3; try (PageStore store = PageStore.create(mOptions)) { PageId id = new PageId(0, 0); store.put(id, BufferUtils.getIncreasingByteArray(len)); ByteBuffer buf = ByteBuffer.allocate(1024); try (ReadableByteChannel channel = store.get(id, offset)) { channel.read(buf); } buf.flip(); assertTrue(BufferUtils.equalIncreasingByteBuffer(offset, len - offset, buf)); } }
Source:
<code><START> protected ImmutableList<Variable> toClassVariableArguments(final Ds3Request ds3Request) { <END> final ImmutableList.Builder<Variable> builder = ImmutableList.builder(); for (final Arguments arg : toConstructorArgumentsList(ds3Request)) { builder.add(new Variable(arg.getName(), arg.getType(), true)); } for (final Arguments arg : toOptionalArgumentsList(ds3Request.getOptionalQueryParams())) { builder.add(new Variable(arg.getName(), arg.getType(), false)); } return builder.build(); }</code><technical_language>This static</technical_language>

Target:
public ImmutableList<Variable> toClassVariableArguments(final Ds3Request ds3Request) { final ImmutableList.Builder<Variable> builder = ImmutableList.builder(); for (final Arguments arg : toConstructorArgumentsList(ds3Request)) { builder.add(new Variable(arg.getName(), arg.getType(), true)); } for (final Arguments arg : toOptionalArgumentsList(ds3Request.getOptionalQueryParams())) { builder.add(new Variable(arg.getName(), arg.getType(), false)); } return builder.build(); }
Source:
<code>public void breaksSingleLine() throws Exception { MatcherAssert.assertThat( new MarkdownTxtmark().html( Joiner.on(MarkdownTxtmarkTest.EOL) .join("line1", "line2", "", "line3").trim() ), Matchers.equalTo( Joiner.on(MarkdownTxtmarkTest.EOL).join( <START> "<p>line1<br />", "line2<br /></p>", <END> "<p>line3</p>", "" ) ) ); }</code><technical_language>@dmzaytsev is strange, want br spaces inside? if out of context</technical_language>

Target:
public void breaksSingleLine() throws Exception { MatcherAssert.assertThat( new MarkdownTxtmark().html( Joiner.on(MarkdownTxtmarkTest.EOL) .join("line1 line", "line2", "", "line3").trim() ), Matchers.equalTo( Joiner.on(MarkdownTxtmarkTest.EOL).join( "<p>line1 line<br />", "line2<br /></p>", "<p>line3</p>", "" ) ) ); }
Source:
<code><START> public TaskParameter(String key, String value) { <END> this.key = key; this.value = value; }</code><technical_language>Class constructor package-private internally</technical_language>

Target:
TaskParameter(String key, String value) { this.key = key; this.value = value; }
Source:
<code><START> public static DimensionHandler getHandlerFromCapabilities( <END> String dimensionName, ColumnCapabilities capabilities, MultiValueHandling multiValueHandling ) { DimensionHandler handler = null; if (capabilities.getType() == ValueType.STRING) { if (!capabilities.isDictionaryEncoded() || !capabilities.hasBitmapIndexes()) { throw new IAE("String column must have dictionary encoding and bitmap index."); } handler = new StringDimensionHandler(dimensionName, multiValueHandling); } if (handler == null) { throw new IAE("Could not create handler from invalid column type: " + capabilities.getType()); } return handler; }</code><technical_language>This method called often, I signature (the 3-arg signature) call sites explicit multiValueHandling. IMO this bugs likely</technical_language>

Target:
public static DimensionHandler getHandlerFromCapabilities( String dimensionName, ColumnCapabilities capabilities, MultiValueHandling multiValueHandling ) { DimensionHandler handler = null; if (capabilities.getType() == ValueType.STRING) { if (!capabilities.isDictionaryEncoded() || !capabilities.hasBitmapIndexes()) { throw new IAE("String column must have dictionary encoding and bitmap index."); } multiValueHandling = multiValueHandling == null ? MultiValueHandling.ofDefault() : multiValueHandling; handler = new StringDimensionHandler(dimensionName, multiValueHandling); } if (handler == null) { throw new IAE("Could not create handler from invalid column type: " + capabilities.getType()); } return handler; }