auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public CalculatorExpressionTokenizer(Context context) { mReplacementMap = new HashMap<>(); <START> NumberFormat nf = DecimalFormat.getInstance( <END> context.getResources().getConfiguration().locale); mReplacementMap.put(".", context.getString(R.string.dec_point)); for (int i = 0; i <= 9; ++i) { mReplacementMap.put(String.valueOf(i), nf.format(i)); } mReplacementMap.put("/", context.getString(R.string.op_div)); mReplacementMap.put("*", context.getString(R.string.op_mul)); mReplacementMap.put("-", context.getString(R.string.op_sub)); mReplacementMap.put("cos", context.getString(R.string.fun_cos)); mReplacementMap.put("ln", context.getString(R.string.fun_ln)); mReplacementMap.put("log", context.getString(R.string.fun_log)); mReplacementMap.put("sin", context.getString(R.string.fun_sin)); mReplacementMap.put("tan", context.getString(R.string.fun_tan)); mReplacementMap.put("Infinity", context.getString(R.string.inf)); }</code><technical_language>final</technical_language>

Target:
public CalculatorExpressionTokenizer(Context context) { mReplacementMap = new HashMap<>(); Locale locale = context.getResources().getConfiguration().locale; if (!"fa".equals(locale.getLanguage())) { locale = (new Locale.Builder()) .setLocale(locale) .setUnicodeLocaleKeyword("nu", "latn") .build(); } final NumberFormat nf = DecimalFormat.getInstance(locale); final DecimalFormatSymbols symbols = new DecimalFormatSymbols(locale); mReplacementMap.put(".", String.valueOf(symbols.getDecimalSeparator())); for (int i = 0; i <= 9; ++i) { mReplacementMap.put(String.valueOf(i), nf.format(i)); } mReplacementMap.put("/", context.getString(R.string.op_div)); mReplacementMap.put("*", context.getString(R.string.op_mul)); mReplacementMap.put("-", context.getString(R.string.op_sub)); mReplacementMap.put("cos", context.getString(R.string.fun_cos)); mReplacementMap.put("ln", context.getString(R.string.fun_ln)); mReplacementMap.put("log", context.getString(R.string.fun_log)); mReplacementMap.put("sin", context.getString(R.string.fun_sin)); mReplacementMap.put("tan", context.getString(R.string.fun_tan)); mReplacementMap.put("Infinity", context.getString(R.string.inf)); }
Source:
<code>public CallFilteringResult whenDone(CallFilteringResult result) { mFilter.result = result; for (CallFilter filter : mFilter.getFollowings()) { if (filter.decrementAndGetIndegree() == 0) { <START> mHandler.post(() -> scheduleFilter(filter)); <END> } } if (mFilter.equals(mDummyComplete)) { mHandlerThread.quitSafely(); mListener.onCallFilteringComplete(mCall, result); } return result; }</code><technical_language>call scheduleFilter putting handler</technical_language>

Target:
public void whenDone(CallFilteringResult result) { mFilter.result = result; for (CallFilter filter : mFilter.getFollowings()) { if (filter.decrementAndGetIndegree() == 0) { scheduleFilter(filter); } } if (mFilter.equals(mDummyComplete)) { mFinished = true; mListener.onCallFilteringComplete(mCall, result); mHandlerThread.quitSafely(); } }
Source:
<code>public void testVariantIds() { Set<String> emptySet = new HashSet<>(); String line = "1\t1000\trs123\tC\tT\t.\t.\t."; List<Variant> expResult = new LinkedList<>(); expResult.add(new Variant("1", 1000, 1000, "C", "T")); List<Variant> result = factory.create(FILE_ID, STUDY_ID, line); assertEquals(expResult, result); assertEquals(expResult.get(0).getIds(), emptySet); line = "1\t1000\trs123;rs456\tC\tT\t.\t.\t."; expResult = new LinkedList<>(); expResult.add(new Variant("1", 1000, 1000, "C", "T")); result = factory.create(FILE_ID, STUDY_ID, line); assertEquals(expResult, result); assertEquals(expResult.get(0).getIds(), emptySet); line = "1\t1000\t.\tC\tT\t.\t.\t."; expResult = new LinkedList<>(); expResult.add(new Variant("1", 1000, 1000, "C", "T")); result = factory.create(FILE_ID, STUDY_ID, line); assertEquals(expResult, result); <START> assertEquals(expResult.get(0).getIds().size(), emptySet.size()); <END> }</code><technical_language>size()? instead of set, in other assertions?</technical_language>

Target:
public void testVariantIds() { Set<String> emptySet = new HashSet<>(); String line = "1\t1000\trs123\tC\tT\t.\t.\t."; List<Variant> expResult = new LinkedList<>(); expResult.add(new Variant("1", 1000, 1000, "C", "T")); List<Variant> result = factory.create(FILE_ID, STUDY_ID, line); assertEquals(expResult, result); assertEquals(emptySet, result.get(0).getIds()); line = "1\t1000\trs123;rs456\tC\tT\t.\t.\t."; expResult = new LinkedList<>(); expResult.add(new Variant("1", 1000, 1000, "C", "T")); result = factory.create(FILE_ID, STUDY_ID, line); assertEquals(expResult, result); assertEquals(emptySet, result.get(0).getIds()); line = "1\t1000\t.\tC\tT\t.\t.\t."; expResult = new LinkedList<>(); expResult.add(new Variant("1", 1000, 1000, "C", "T")); result = factory.create(FILE_ID, STUDY_ID, line); assertEquals(expResult, result); assertEquals(emptySet, result.get(0).getIds()); }
Source:
<code>private String waitAndRetrieveContainerID(String deploymentName) throws IOException { try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { for (int i = 0; i < OPENSHIFT_WAIT_POD_TIMEOUT; i++) { try { Thread.sleep(OPENSHIFT_WAIT_POD_DELAY); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } List<Pod> pods = openShiftClient.pods() .inNamespace(this.openShiftCheProjectName) .withLabel(OPENSHIFT_DEPLOYMENT_LABEL, deploymentName) .list() .getItems(); if (pods.size() < 1) { throw new OpenShiftException(String.format("Pod with deployment name %s not found", deploymentName)); } else if (pods.size() > 1) { throw new OpenShiftException(String.format("Multiple pods with deployment name %s found", deploymentName)); } Pod pod = pods.get(0); String status = pod.getStatus().getPhase(); if (OPENSHIFT_POD_STATUS_RUNNING.equals(status)) { String containerID = pod.getStatus().getContainerStatuses().get(0).getContainerID(); String normalizedID = KubernetesStringUtils.normalizeContainerID(containerID); <START> pod.getSpec().setTerminationGracePeriodSeconds(OPENSHIFT_POD_TERMINATION_GRACE_PERIOD); <END> openShiftClient.pods() .inNamespace(openShiftCheProjectName) .withName(pod.getMetadata().getName()) .edit() .editMetadata() .addToLabels(CHE_CONTAINER_IDENTIFIER_LABEL_KEY, KubernetesStringUtils.getLabelFromContainerID(normalizedID)) .endMetadata() .done(); return normalizedID; } } return null; } }</code><technical_language>this update actual Pod spec. I need add this in createOpenShiftDeployment() PodSpec podSpec = new PodSpecBuilder() .withContainers(container) .withVolumes(getVolumesFrom(volumes, workspaceID)) .withTerminationGracePeriodSeconds(OPENSHIFT_POD_TERMINATION_GRACE_PERIOD) .build();</technical_language>

Target:
private String waitAndRetrieveContainerID(String deploymentName) throws IOException { try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { for (int i = 0; i < OPENSHIFT_WAIT_POD_TIMEOUT; i++) { try { Thread.sleep(OPENSHIFT_WAIT_POD_DELAY); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } List<Pod> pods = openShiftClient.pods() .inNamespace(this.openShiftCheProjectName) .withLabel(OPENSHIFT_DEPLOYMENT_LABEL, deploymentName) .list() .getItems(); if (pods.size() < 1) { throw new OpenShiftException(String.format("Pod with deployment name %s not found", deploymentName)); } else if (pods.size() > 1) { throw new OpenShiftException(String.format("Multiple pods with deployment name %s found", deploymentName)); } Pod pod = pods.get(0); String status = pod.getStatus().getPhase(); if (OPENSHIFT_POD_STATUS_RUNNING.equals(status)) { String containerID = pod.getStatus().getContainerStatuses().get(0).getContainerID(); String normalizedID = KubernetesStringUtils.normalizeContainerID(containerID); openShiftClient.pods() .inNamespace(openShiftCheProjectName) .withName(pod.getMetadata().getName()) .edit() .editMetadata() .addToLabels(CHE_CONTAINER_IDENTIFIER_LABEL_KEY, KubernetesStringUtils.getLabelFromContainerID(normalizedID)) .endMetadata() .done(); return normalizedID; } } return null; } }
Source:
<code>public void setRedisKeyNamespace(String namespace) { <START> this.keyPrefix = namespace + ":"; <END> }</code><technical_language>need validate provided namespace is null empty</technical_language>

Target:
public void setRedisKeyNamespace(String namespace) { Assert.hasText(namespace, "namespace cannot be null or empty"); this.keyPrefix = namespace.trim() + ":"; }
Source:
<code><START> protected <P extends Message, A extends AggregatePart<I, P, ?>> P getPartState( <END> Class<P> partStateClass) { final P partState = root.getPartState(partStateClass); return partState; }</code><technical_language>Do expect exceptions in case is a part class, i.e. Class<P>? I should</technical_language>

Target:
protected <P extends Message> P getPartState(Class<P> partStateClass) { final P partState = root.getPartState(partStateClass); return partState; }
Source:
<code>private void addSecondaryWhenPrimaryIsNonNull(final MongoDBServer secondary) { executor.submit(new Runnable() { @Override public void run() { Boolean isAvailable = secondary.getAttribute(MongoDBServer.SERVICE_UP); MongoDBServer primary = getPrimary(); <START> if (isAvailable && primary != null) { <END> primary.getClient().addMemberToReplicaSet(secondary, nextMemberId.incrementAndGet()); if (LOG.isInfoEnabled()) { LOG.info("{} added to replica set {}", secondary, getName()); } } else { if (LOG.isTraceEnabled()) { LOG.trace("Rescheduling addition of member to replica set {}: service_up={}, primary={}", new Object[]{secondary, getName(), isAvailable, primary}); } executor.schedule(this, 3, TimeUnit.SECONDS); } } }); }</code><technical_language>This risks NPE if isAvailable is null, coerced a boolean. Suggest instead do Boolean.TRUE.equals(isAvailable)</technical_language>

Target:
private void addSecondaryWhenPrimaryIsNonNull(final MongoDBServer secondary) { executor.submit(new Runnable() { @Override public void run() { Boolean isAvailable = secondary.getAttribute(MongoDBServer.SERVICE_UP); MongoDBServer primary = getPrimary(); if (Boolean.TRUE.equals(isAvailable) && primary != null) { primary.addMemberToReplicaSet(secondary, nextMemberId.incrementAndGet()); if (LOG.isInfoEnabled()) { LOG.info("{} added to replica set {}", secondary, getName()); } } else { if (LOG.isTraceEnabled()) { LOG.trace("Rescheduling addition of member to replica set {}: service_up={}, primary={}", new Object[]{secondary, getName(), isAvailable, primary}); } executor.schedule(this, 3, TimeUnit.SECONDS); } } }); }
Source:
<code>public static byte[] inflate(byte[] bytes, int expectedSize) throws DataFormatException { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(expectedSize); <START> InflaterOutputStream ios = new InflaterOutputStream(baos); <END> ios.write(bytes, 0, bytes.length); return baos.toByteArray(); } catch (Exception e) { throw new DataFormatException(); } }</code><technical_language>try-with-resources ensure this is closed Inflater released</technical_language>

Target:
public static byte[] inflate(byte[] bytes, int expectedSize) throws DataFormatException { try (ByteArrayOutputStream baos = new ByteArrayOutputStream(expectedSize); InflaterOutputStream ios = new InflaterOutputStream(baos)) { ios.write(bytes, 0, bytes.length); return baos.toByteArray(); } catch (IOException e) { throw new DataFormatException(); } }
Source:
<code>public InputStream locateResourceStream(String name) { try { <START> return new URL( name ).openStream(); <END> } catch (Exception ignore) { } try { final InputStream stream = aggregatedClassLoader.getResourceAsStream( name ); if ( stream != null ) { return stream; } } catch (Exception ignore) { } final String stripped = name.startsWith( "/" ) ? name.substring( 1 ) : null; if ( stripped != null ) { try { return new URL( stripped ).openStream(); } catch (Exception ignore) { } try { final InputStream stream = aggregatedClassLoader.getResourceAsStream( stripped ); if ( stream != null ) { return stream; } } catch (Exception ignore) { } } return null; }</code><technical_language>If decide this, wondering attempt URL loading. needed</technical_language>

Target:
public InputStream locateResourceStream(String name) { try { final InputStream stream = aggregatedClassLoader.getResourceAsStream( name ); if ( stream != null ) { return stream; } } catch (Exception ignore) { } final String stripped = name.startsWith( "/" ) ? name.substring( 1 ) : null; if ( stripped != null ) { try { return new URL( stripped ).openStream(); } catch (Exception ignore) { } try { final InputStream stream = aggregatedClassLoader.getResourceAsStream( stripped ); if ( stream != null ) { return stream; } } catch (Exception ignore) { } } return null; }
Source:
<code>public boolean onTouchEvent(MotionEvent event) { if (!isEnabled()) return false; float eventX = event.getX(); float eventY = event.getY(); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: getParent().requestDisallowInterceptTouchEvent(true); mPoints.clear(); if (mIsDoubleClick) { <START> if (firstClick != 0 && System.currentTimeMillis() - firstClick > 200) { <END> countClick = 0; } countClick ++; if (countClick == 1) { firstClick = System.currentTimeMillis(); } else if (countClick == 2) { long lastClick = System.currentTimeMillis(); if (lastClick - firstClick < 200) { this.clear(); break; } } } mPath.moveTo(eventX, eventY); mLastTouchX = eventX; mLastTouchY = eventY; addPoint(new TimedPoint(eventX, eventY)); if(mOnSignedListener != null) mOnSignedListener.onStartSigning(); case MotionEvent.ACTION_MOVE: resetDirtyRect(eventX, eventY); addPoint(new TimedPoint(eventX, eventY)); break; case MotionEvent.ACTION_UP: resetDirtyRect(eventX, eventY); addPoint(new TimedPoint(eventX, eventY)); getParent().requestDisallowInterceptTouchEvent(true); setIsEmpty(false); break; default: return false; } invalidate( (int) (mDirtyRect.left - mMaxWidth), (int) (mDirtyRect.top - mMaxWidth), (int) (mDirtyRect.right + mMaxWidth), (int) (mDirtyRect.bottom + mMaxWidth)); return true; }</code><technical_language>move this logic in a private function</technical_language>

Target:
public boolean onTouchEvent(MotionEvent event) { if (!isEnabled()) return false; float eventX = event.getX(); float eventY = event.getY(); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: getParent().requestDisallowInterceptTouchEvent(true); mPoints.clear(); if (onDoubleClick()) break; mPath.moveTo(eventX, eventY); mLastTouchX = eventX; mLastTouchY = eventY; addPoint(getNewPoint(eventX, eventY)); if(mOnSignedListener != null) mOnSignedListener.onStartSigning(); case MotionEvent.ACTION_MOVE: resetDirtyRect(eventX, eventY); addPoint(getNewPoint(eventX, eventY)); break; case MotionEvent.ACTION_UP: resetDirtyRect(eventX, eventY); addPoint(getNewPoint(eventX, eventY)); getParent().requestDisallowInterceptTouchEvent(true); setIsEmpty(false); break; default: return false; } invalidate( (int) (mDirtyRect.left - mMaxWidth), (int) (mDirtyRect.top - mMaxWidth), (int) (mDirtyRect.right + mMaxWidth), (int) (mDirtyRect.bottom + mMaxWidth)); return true; }
Source:
<code>private static void iterateNode(Node node, String fileName, String sectionName) { for (Node child : XmlUtil.getChildrenElements(node)) { if (NODES_TO_WRAP.contains(child.getNodeName())) { final String wrapperMessage = fileName + "/" + sectionName + ": Tag '" + child.getNodeName() + "' in '" + node.getNodeName() + "' needs a wrapping <span> or <div> with the class 'wrapper'."; Assert.assertTrue(wrapperMessage, "div".equals(node.getNodeName()) || "span".equals(node.getNodeName())); Assert.assertTrue(wrapperMessage, node.hasAttributes()); Assert.assertNotNull(wrapperMessage, node.getAttributes().getNamedItem("class")); Assert.assertTrue(wrapperMessage, node.getAttributes().getNamedItem("class").getNodeValue() .contains("wrapper")); <START> if ("table".equals(child.getNodeName())) { <END> iterateNode(child, fileName, sectionName); } if ("img".equals(child.getNodeName())) { final String dataImageInlineMessage = fileName + "/" + sectionName + ": img " + "needs an attribute data-image-inline which has the value 'true' if " + "the image should be displayed in the same line as the surrounding " + "text."; Assert.assertTrue(dataImageInlineMessage, node.getAttributes().getNamedItem("class").getNodeValue() .matches(".*(block|inline).*")); } } else { iterateNode(child, fileName, sectionName); } } }</code><technical_language>this is code. Do need iterate children of div/span/p do them</technical_language>

Target:
private static void iterateNode(Node node, String fileName, String sectionName) { for (Node child : XmlUtil.getChildrenElements(node)) { if (NODES_TO_WRAP.contains(child.getNodeName())) { final String wrapperMessage = fileName + "/" + sectionName + ": Tag '" + child.getNodeName() + "' in '" + node.getNodeName() + "' needs a wrapping <span> or <div> with the class 'wrapper'."; Assert.assertTrue(wrapperMessage, "div".equals(node.getNodeName()) || "span".equals(node.getNodeName())); Assert.assertTrue(wrapperMessage, node.hasAttributes()); Assert.assertNotNull(wrapperMessage, node.getAttributes().getNamedItem("class")); Assert.assertTrue(wrapperMessage, node.getAttributes().getNamedItem("class").getNodeValue() .contains("wrapper")); if ("table".equals(child.getNodeName())) { iterateNode(child, fileName, sectionName); } if ("img".equals(child.getNodeName())) { final String dataImageInlineMessage = fileName + "/" + sectionName + ": img " + "needs the additional class inline if it should be displayed inline " + "or block if scrolling in mobile view should be enabled."; Assert.assertTrue(dataImageInlineMessage, node.getAttributes().getNamedItem("class").getNodeValue() .matches(".*(block|inline).*")); } } else { iterateNode(child, fileName, sectionName); } } }
Source:
<code>public static <T extends WeldInjectionPointAttributes<?, ?>> Set<T> flattenInjectionPoints(List<? extends Set<T>> fieldInjectionPoints) { Set<T> injectionPoints = new HashSet<T>(); for (Set<T> i : fieldInjectionPoints) { injectionPoints.addAll(i); } <START> return injectionPoints; <END> }</code><technical_language>I sense builder return ImmutableSet..</technical_language>

Target:
public static <T extends WeldInjectionPointAttributes<?, ?>> Set<T> flattenInjectionPoints(List<? extends Set<T>> fieldInjectionPoints) { ImmutableSet.Builder<T> injectionPoints = ImmutableSet.builder(); for (Set<T> i : fieldInjectionPoints) { injectionPoints.addAll(i); } return injectionPoints.build(); }
Source:
<code>JedisPool createPool(String host, int port, SslConfiguration sslConfiguration) { if (sslConfiguration != null) { return new JedisPool( poolConfiguration, <START> URI.create(host + ":" + String.valueOf(port)), <END> sslConfiguration.getSslSocketFactory(), sslConfiguration.getSslContext().getSupportedSSLParameters(), null ); } else { return new JedisPool(poolConfiguration, host, port, false); } }</code><technical_language>is purpose of explicitly stringifying port</technical_language>

Target:
JedisPool createPool(String host, int port, SslConfiguration sslConfiguration) { if (sslConfiguration != null) { return new JedisPool( poolConfiguration, URI.create(host + ":" + port), sslConfiguration.getSslSocketFactory(), sslConfiguration.getSslContext().getSupportedSSLParameters(), null ); } else { return new JedisPool(poolConfiguration, host, port, false); } }
Source:
<code>protected Void doInBackground(Product... products) { Product product = products[0]; <START> List<HistoryProduct> historyProducts = Utils.getAppDaoSession(mActivity).getHistoryProductDao().queryBuilder().where(HistoryProductDao.Properties.Barcode.eq(product.getCode())).list(); <END> HistoryProduct hp; if(historyProducts.size() == 1) { hp = historyProducts.get(0); hp.setLastSeen(new Date()); } else { hp = new HistoryProduct(product.getProductName(), product.getBrands(), product.getImageFrontUrl(), product.getCode()); } Utils.getAppDaoSession(mActivity).getHistoryProductDao().insertOrReplace(hp); return null; }</code><technical_language>extract in a class field Utils.getAppDaoSession(mActivity).getHistoryProductDao() another time</technical_language>

Target:
protected Void doInBackground(Product... products) { Product product = products[0]; List<HistoryProduct> historyProducts = mHistoryProductDao.queryBuilder().where(HistoryProductDao.Properties.Barcode.eq(product.getCode())).list(); HistoryProduct hp; if(historyProducts.size() == 1) { hp = historyProducts.get(0); hp.setLastSeen(new Date()); } else { hp = new HistoryProduct(product.getProductName(), product.getBrands(), product.getImageFrontUrl(), product.getCode()); } mHistoryProductDao.insertOrReplace(hp); return null; }
Source:
<code>private static ServerConnector initConnector(Server server, String intf, int portReq) { int portLo = portReq, portHi = portReq; if (portReq == 0) { portLo = VoltDB.DEFAULT_STATUS_PORT; portHi = portLo + 99; } for (int port=portLo; port<=portHi; port++) { try { ServerConnector connector = new ServerConnector(server); connector.setHost(intf); connector.setPort(port); connector.setName("status-connector"); connector.setIdleTimeout(CONNTMO); connector.open(); return connector; } catch (IOException ex) { logDebug("Unable to open port %s: %s", port, ex); } } String fail; if (portLo == portHi) { fail = String.format("Unable to open port %s", portLo); } else { fail = String.format("Unable to open any port in range %s to %s", portLo, portHi); } <START> throw new RuntimeException(fail); <END> }</code><technical_language>This a checked exception a runtime exception</technical_language>

Target:
private static ServerConnector initConnector(Server server, String intf, int portReq) throws IOException { int portLo = portReq, portHi = portReq; if (portReq == 0) { portLo = VoltDB.DEFAULT_STATUS_PORT; portHi = portLo + 99; } for (int port=portLo; port<=portHi; port++) { try { ServerConnector connector = new ServerConnector(server); connector.setHost(intf); connector.setPort(port); connector.setName("status-connector"); connector.setIdleTimeout(CONNTMO); connector.open(); return connector; } catch (IOException ex) { logDebug("Unable to open port %s: %s", port, ex); } } String fail; if (portLo == portHi) { fail = String.format("Unable to open port %s", portLo); } else { fail = String.format("Unable to open any port in range %s to %s", portLo, portHi); } throw new IOException(fail); }
Source:
<code>public Set<String> getSupportedOptions() { AutoValueExtension.IncrementalExtensionType incrementalType = extensions.stream() .map(e -> e.incrementalType(processingEnv)) .min(Comparator.naturalOrder()) .orElse(AutoValueExtension.IncrementalExtensionType.ISOLATING); switch (incrementalType) { case ISOLATING: return ImmutableSet.of(OMIT_IDENTIFIERS_OPTION, IncrementalAnnotationProcessorType.ISOLATING.getProcessorOption()); case AGGREGATING: return ImmutableSet.of(OMIT_IDENTIFIERS_OPTION, IncrementalAnnotationProcessorType.AGGREGATING.getProcessorOption()); <START> case UNKNOWN: <END> default: return ImmutableSet.of(OMIT_IDENTIFIERS_OPTION); } }</code><technical_language>I delete this, delete default case follow switch throw new AssertionError(incrementalType)</technical_language>

Target:
public Set<String> getSupportedOptions() { AutoValueExtension.IncrementalExtensionType incrementalType = extensions.stream() .map(e -> e.incrementalType(processingEnv)) .min(Comparator.naturalOrder()) .orElse(AutoValueExtension.IncrementalExtensionType.ISOLATING); switch (incrementalType) { case ISOLATING: return ImmutableSet.of(OMIT_IDENTIFIERS_OPTION, IncrementalAnnotationProcessorType.ISOLATING.getProcessorOption()); case AGGREGATING: return ImmutableSet.of(OMIT_IDENTIFIERS_OPTION, IncrementalAnnotationProcessorType.AGGREGATING.getProcessorOption()); case UNKNOWN: return ImmutableSet.of(OMIT_IDENTIFIERS_OPTION); } throw new AssertionError(incrementalType); }
Source:
<code><START> private List<ColumnWriter> getLeafWriters(GroupColumnIO group) { <END> if (!groupToLeafWriter.containsKey(group)) { groupToLeafWriter.put(group, new ArrayList<ColumnWriter>()); } return groupToLeafWriter.get(group); }</code><technical_language>tiny bit more efficient: private List<ColumnWriter> getLeafWriters(GroupColumnIO group) { List<ColumnWriter>() writers = groupToLeafWriter.get(group); if (writers == null) { writers = new ArrayList<ColumnWriter>(); groupToLeafWriter.put(group, writers); } return writers; }</technical_language>

Target:
private List<ColumnWriter> getLeafWriters(GroupColumnIO group) { List<ColumnWriter> writers = groupToLeafWriter.get(group); if (writers == null) { writers = new ArrayList<ColumnWriter>(); groupToLeafWriter.put(group, writers); } return writers; }
Source:
<code>public PlanNode visitPlan(PlanNode node, Void context) { Optional<PlanNode> pushedDownPlan = tryCreatingNewScanNode(node); <START> if (pushedDownPlan.isPresent()) { <END> return pushedDownPlan.get(); } else { return replaceChildren(node, node.getSources().stream().map(c -> c.accept(this, null)).collect(toImmutableList())); } }</code><technical_language>Replace entire if/else java return pushedDownPlan.orElse(replaceChildren(node, node.getSources().stream().map(source -> source.accept(this, null)).collect(toImmutableList())));</technical_language>

Target:
public PlanNode visitPlan(PlanNode node, Void context) { Optional<PlanNode> pushedDownPlan = tryCreatingNewScanNode(node); return pushedDownPlan.orElseGet(() -> replaceChildren( node, node.getSources().stream().map(source -> source.accept(this, null)).collect(toImmutableList()))); }
Source:
<code>public void testPurging_Invocation() { setup("3"); for (int i = 0; i < 2; i++) { map.executeOnEntries(getSlowEntryProcessor(4)); } map.executeOnEntries(getSlowEntryProcessor(4)); map.executeOnEntries(getSlowEntryProcessor(4)); awaitSlowEntryProcessors(); shutdownOperationService(instance); Collection<SlowOperationLog> logs = getSlowOperationLogsAndAssertNumberOfSlowOperationLogs(instance, 1); SlowOperationLog firstLog = logs.iterator().next(); int totalInvocations = firstLog.totalInvocations.get(); assertTrue(String.format("Expected 3 or 4 total invocations, but was %s, logs: %s", totalInvocations, <START> firstLog.createDTO().toJson()), totalInvocations >= 3 && totalInvocations <= 4); <END> assertEntryProcessorOperation(firstLog); assertStackTraceContainsClassName(firstLog, "SlowEntryProcessor"); Collection<SlowOperationLog.Invocation> invocations = getInvocations(firstLog); int invocationCount = invocations.size(); assertTrue("Expected 1 or 2 invocations, but was " + invocationCount, invocationCount >= 1 && invocationCount <= 2); for (SlowOperationLog.Invocation invocation : invocations) { assertInvocationDurationBetween(invocation, 1000, 3500); } }</code><technical_language>I understand, this test is supposed verify purge captured invocations while SlowOperationLog instance itself, updating total invocation counter. I need verify if purged simply checking if totalInvocations > invocations.size(). Also, execute a "quicker" EPs, sleep for a longer time ensure purging takes place verify. problem is occasionally >2s stalls in PR builder :) WDYT</technical_language>

Target:
public void testPurging_Invocation() { setup("3"); for (int i = 0; i < 3; i++) { map.executeOnEntries(getSlowEntryProcessor(3)); } map.executeOnEntries(getSlowEntryProcessor(5)); awaitSlowEntryProcessors(); shutdownOperationService(instance); Collection<SlowOperationLog> logs = getSlowOperationLogsAndAssertNumberOfSlowOperationLogs(instance, 1); SlowOperationLog firstLog = logs.iterator().next(); assertEntryProcessorOperation(firstLog); assertStackTraceContainsClassName(firstLog, "SlowEntryProcessor"); Collection<SlowOperationLog.Invocation> invocations = getInvocations(firstLog); int invocationCount = invocations.size(); int totalInvocations = firstLog.totalInvocations.get(); assertTrue(String.format("Expected invocations must be less than total invocations, but was %s, total invocations: %s", invocationCount, totalInvocations), invocationCount < totalInvocations); for (SlowOperationLog.Invocation invocation : invocations) { assertInvocationDurationBetween(invocation, 1000, 4500); } }
Source:
<code>private Set<K> keySetWithPagingPredicate(Predicate predicate) { PagingPredicateImpl pagingPredicate = unwrapPagingPredicate(predicate); pagingPredicate.setIterationType(IterationType.KEY); ClientMessage request = MapKeySetWithPagingPredicateCodec.encodeRequest(name, toData(predicate)); ClientMessage response = invokeWithPredicate(request, predicate); List<Entry> resultList = new ArrayList<>(); MapKeySetWithPagingPredicateCodec.decodeResponse(response, data -> { K key = toObject(data); <START> resultList.add(new AbstractMap.SimpleEntry<K, V>(key, null)); <END> }); return (Set<K>) getSortedQueryResultSet(resultList, pagingPredicate, IterationType.KEY); }</code><technical_language>This SimpleImmutableEntry</technical_language>

Target:
private Set<K> keySetWithPagingPredicate(Predicate predicate) { PagingPredicateImpl pagingPredicate = unwrapPagingPredicate(predicate); pagingPredicate.setIterationType(IterationType.KEY); ClientMessage request = MapKeySetWithPagingPredicateCodec.encodeRequest(name, toData(predicate)); ClientMessage response = invokeWithPredicate(request, predicate); List<Entry> resultList = new ArrayList<>(); MapKeySetWithPagingPredicateCodec.decodeResponse(response, data -> { K key = toObject(data); resultList.add(new AbstractMap.SimpleImmutableEntry<K, V>(key, null)); }); return (Set<K>) getSortedQueryResultSet(resultList, pagingPredicate, IterationType.KEY); }
Source:
<code>public void init(final FilterConfig config) throws ServletException { this.config = config; try { <START> this.delayBeforeReinit = Long.parseLong(StringUtils.defaultString(config.getInitParameter(DELAY_BEFORE_REINIT), "60000")); <END> log.info("delayBeforeReinit param set to: ms", this.delayBeforeReinit); } catch (NumberFormatException e) { log.warn("Incorrect value for '{}' init parameter, number of ms expected (integer)", DELAY_BEFORE_REINIT); } this.enabled = (Boolean) getBackendParameter(ConfigurationValues.CORSSupport); this.enabledDefaultOrigins = (Boolean) getBackendParameter(ConfigurationValues.CORSAllowDefaultOrigins); String sufficesFromConf = StringUtils.defaultString((String) getBackendParameter(ConfigurationValues.CORSDefaultOriginSuffixes), ""); this.defaultOriginsSuffixes = new HashSet<>(Arrays.asList(sufficesFromConf.split(","))); }</code><technical_language>Line exceeds 120 chars, please reformat</technical_language>

Target:
public void init(final FilterConfig config) throws ServletException { this.config = config; this.enabled = (Boolean) getBackendParameter(ConfigurationValues.CORSSupport); this.enabledDefaultOrigins = (Boolean) getBackendParameter(ConfigurationValues.CORSAllowDefaultOrigins); String sufficesFromConf = StringUtils.defaultString( (String) getBackendParameter(ConfigurationValues.CORSDefaultOriginSuffixes), ""); this.defaultOriginsSuffixes = new HashSet<>(Arrays.asList(sufficesFromConf.split(","))); }
Source:
<code>HardDeleteRecoveryMetadata(byte[] hardDeleteRecoveryMetadataBytes, StoreKeyFactory factory) throws IOException { DataInputStream stream = new DataInputStream(new ByteArrayInputStream(hardDeleteRecoveryMetadataBytes)); headerVersion = stream.readShort(); userMetadataVersion = stream.readShort(); userMetadataSize = stream.readInt(); blobRecordVersion = stream.readShort(); <START> blobType = (int) stream.readShort(); <END> blobStreamSize = stream.readLong(); if (!MessageFormatRecord.isValidHeaderVersion(headerVersion) || !MessageFormatRecord.isValidUserMetadataVersion(userMetadataVersion) || !MessageFormatRecord.isValidBlobRecordVersion(blobRecordVersion)) { throw new IOException( "Unknown version during hard delete, headerVersion: " + headerVersion + " userMetadataVersion: " + userMetadataVersion + " blobRecordVersion: " + blobRecordVersion + " blobType " + blobType); } storeKey = factory.getStoreKey(stream); }</code><technical_language>I cast BlobType data type</technical_language>

Target:
HardDeleteRecoveryMetadata(byte[] hardDeleteRecoveryMetadataBytes, StoreKeyFactory factory) throws IOException { DataInputStream stream = new DataInputStream(new ByteArrayInputStream(hardDeleteRecoveryMetadataBytes)); headerVersion = stream.readShort(); userMetadataVersion = stream.readShort(); userMetadataSize = stream.readInt(); blobRecordVersion = stream.readShort(); if (blobRecordVersion == MessageFormatRecord.Blob_Version_V2) { blobType = BlobType.values()[stream.readShort()]; } else { blobType = BlobType.DataBlob; } blobStreamSize = stream.readLong(); if (!MessageFormatRecord.isValidHeaderVersion(headerVersion) || !MessageFormatRecord.isValidUserMetadataVersion(userMetadataVersion) || !MessageFormatRecord.isValidBlobRecordVersion(blobRecordVersion)) { throw new IOException( "Unknown version during hard delete, headerVersion: " + headerVersion + " userMetadataVersion: " + userMetadataVersion + " blobRecordVersion: " + blobRecordVersion + " blobType " + blobType); } storeKey = factory.getStoreKey(stream); }
Source:
<code>public IntegrationFlow fromChannel() { IntegrationFlowBuilder flowBuilder = IntegrationFlows.from(processor.input()) <START> .bridge() <END> .channel(processor.output()); return flowBuilder.get(); }</code><technical_language>need bridge() channels in flow: DSL for hood</technical_language>

Target:
public IntegrationFlow fromChannel() { return IntegrationFlows.from(processor.input()) .channel(processor.output()).get(); }
Source:
<code>public List<CategoryDTO> fetchInstallableApplications() { ApplicationsSource lastApplicationSource = new NullApplicationSource(); for (ApplicationsSource applicationSource : applicationSources) { <START> lastApplicationSource = new TeeApplicationsSource(lastApplicationSource, applicationSource); <END> } return lastApplicationSource.fetchInstallableApplications(); }</code><technical_language>lastApplicationsSource created time this is called. create lastApplicationsSource in constructor</technical_language>

Target:
public List<CategoryDTO> fetchInstallableApplications() { return applicationsSource.fetchInstallableApplications(); }
Source:
<code>private VmStatsRefresher getRefresherForVds(VdsManager vdsManager) { Version version = vdsManager.getCompatibilityVersion(); VDS vds = vdsManager.getCopyVds(); if (FeatureSupported.jsonProtocol(version) && VdsProtocol.STOMP == vds.getProtocol() && FeatureSupported.vmStatsEvents(version)) { return new EventVmStatsRefresher(vdsManager); <START> } <END> if (FeatureSupported.jsonProtocol(version) && VdsProtocol.STOMP == vds.getProtocol() && FeatureSupported.events(version)) { return new EventVmStatsRefresher(vdsManager); } return new PollListAndAllVmStatsRefresher(vdsManager); }</code><technical_language>this doesnt solve issue, if events disabled in config eventsRefresher created pass 'if' statement (above) adding check for events line above</technical_language>

Target:
private VmStatsRefresher getRefresherForVds(VdsManager vdsManager) { Version version = vdsManager.getCompatibilityVersion(); VDS vds = vdsManager.getCopyVds(); if ((FeatureSupported.jsonProtocol(version) && VdsProtocol.STOMP == vds.getProtocol() && FeatureSupported.vmStatsEvents(version)) || (FeatureSupported.jsonProtocol(version) && VdsProtocol.STOMP == vds.getProtocol() && FeatureSupported.events(version))) { return new EventVmStatsRefresher(vdsManager); } return new PollListAndAllVmStatsRefresher(vdsManager); }
Source:
<code>static void runAgent(String agentArgs, Instrumentation instrumentation, boolean injected) throws Exception { IdeaPatcherOptionsHolder optionsHolder = IdeaPatcherOptionsHolder.getInstance(); optionsHolder.addAll(agentArgs); List<IdeaPatcherTransformer> knownTransformers = new ArrayList<IdeaPatcherTransformer>(); knownTransformers.add(new ModifierVisibilityClassFileTransformer()); for (IdeaPatcherTransformer transformer: KNOWN_TRANSFORMERS) { if (transformer.supported()) { instrumentation.addTransformer(transformer, transformer.canRetransform()); } } <START> instrumentation.addTransformer(new ModifierVisibilityClassFileTransformer(), true); <END> }</code><technical_language>a miss. I noticed removed in local. update soon</technical_language>

Target:
static void runAgent(String agentArgs, Instrumentation instrumentation, boolean injected) throws Exception { IdeaPatcherOptionsHolder optionsHolder = IdeaPatcherOptionsHolder.getInstance(); optionsHolder.addAll(agentArgs); for (IdeaPatcherTransformer transformer : KNOWN_TRANSFORMERS) { if (transformer.supported()) { instrumentation.addTransformer(transformer, transformer.canRetransform()); } } }
Source:
<code>private void handleTimeSeriesResponseException( HttpResponseException rex, String msg, List<TimeSeries> nextN) { TimeSeries ts = findProblematicTimeSeriesElement(rex.getMessage(), nextN); if (ts != null) { <START> log.error("{}\nTime Series element: {}", <END> rex.getMessage(), ts.toString()); } else { log.error("Caught HttpResponseException {}", msg, rex); } }</code><technical_language>Generally I dislike line feeds in log statements more difficult reliably grep log files</technical_language>

Target:
private void handleTimeSeriesResponseException( HttpResponseException rex, String msg, List<TimeSeries> nextN) { TimeSeries ts = findProblematicTimeSeriesElement(rex.getMessage(), nextN); if (ts != null) { log.error("{}: time series element: {}", rex.getMessage(), ts.toString()); } else { log.error("Caught HttpResponseException {}", msg, rex); } }
Source:
<code>private void startVolumeProfiling() { if(getSelectedItems() == null) { return; } <START> GlusterVolumeParameters parameter = new GlusterVolumeParameters(((GlusterVolumeEntity) getSelectedItem()).getId()); <END> Frontend.getInstance().runAction(VdcActionType.StartGlusterVolumeProfile, parameter); }</code><technical_language>if user selected multiple volumes</technical_language>

Target:
private void startVolumeProfiling() { if (getSelectedItems() == null) { return; } List<GlusterVolumeEntity> selectedVolumesList = Linq.<GlusterVolumeEntity> cast(getSelectedItems()); ArrayList<VdcActionParametersBase> parameters = new ArrayList<VdcActionParametersBase>(); for (GlusterVolumeEntity currentSelectedVolume : selectedVolumesList) { GlusterVolumeParameters parameter = new GlusterVolumeParameters(currentSelectedVolume.getId()); parameters.add(parameter); } Frontend.getInstance().runMultipleAction(VdcActionType.StartGlusterVolumeProfile, parameters); }
Source:
<code>public String[] getRegistrationIDs(AuthConfigProvider provider) { List<String> al = new ArrayList<String>(); synchronized (this.keyToAuthConfigProviderMap) { <START> AuthConfigProvider acp = null; <END> for (Map.Entry<String, AuthConfigProvider> entry : this.keyToAuthConfigProviderMap.entrySet()) { acp = entry.getValue(); if ((acp != null && acp.equals(provider)) || (acp == null && provider == null)) al.add(entry.getKey()); } } String[] sarr = new String[al.size()]; al.toArray(sarr); return sarr; }</code><technical_language>I code retained. provider is null method return keys. change if() bellow if ((acp != null && acp.equals(provider)) || provider == null) that, ID is inserted if provider is null if acp matches provider. This enough retain compliance spec IDs returned provider is null</technical_language>

Target:
public String[] getRegistrationIDs(AuthConfigProvider provider) { List<String> al = new ArrayList<String>(); synchronized (this.keyToAuthConfigProviderMap) { AuthConfigProvider acp = null; for (Map.Entry<String, AuthConfigProvider> entry : this.keyToAuthConfigProviderMap.entrySet()) { acp = entry.getValue(); if ((acp != null && acp.equals(provider)) || provider == null) al.add(entry.getKey()); } } String[] sarr = new String[al.size()]; al.toArray(sarr); return sarr; }
Source:
<code>public String toString() { StringBuilder out = new StringBuilder(); if (this.expr.isPresent()) { out.append("\\"); for (FunctionArgument argument : this.arguments) { out.append(" ").append(argument.toString()); } out.append(" = "); out.append(this.expr.get().toString()); } <START> return out.toString(); <END> }</code><technical_language>A bit of duplicated code seems. call toHaskell(), fine. more exciting :)</technical_language>

Target:
public String toString() { StringBuilder out = new StringBuilder(); if (!this.arguments.isEmpty()) { out.append("λ"); for (FunctionArgument argument : this.arguments) { out.append(" ").append(argument.toHaskell()); } out.append(" -> "); } out.append(this.expr.toHaskell()); return out.toString(); }
Source:
<code>private void warnIfNotAllDisksPermitSnapshots() { <START> if (getParameters().getRunAsStateless()) { <END> for (Disk disk : getVm().getDiskMap().values()) { if (!disk.isAllowSnapshot()) { AuditLogDirector.log(this, AuditLogType.USER_RUN_VM_AS_STATELESS_WITH_DISKS_NOT_ALLOWING_SNAPSHOT); break; } } } }</code><technical_language>checking runAsStateless is needed called statelessTreatment method</technical_language>

Target:
private void warnIfNotAllDisksPermitSnapshots() { for (Disk disk : getVm().getDiskMap().values()) { if (!disk.isAllowSnapshot()) { AuditLogDirector.log(this, AuditLogType.USER_RUN_VM_AS_STATELESS_WITH_DISKS_NOT_ALLOWING_SNAPSHOT); break; } } }
Source:
<code>default Class<? extends IRetryAnalyzer> getRetryAnalyzerClass() { <START> return null; <END> }</code><technical_language>Here, return getRetryAnalyzer().getClass()</technical_language>

Target:
default Class<? extends IRetryAnalyzer> getRetryAnalyzerClass() { return getRetryAnalyzer().getClass(); }
Source:
<code>public boolean isTemplateQuestionPanelExpanded(int qnNumber) { waitForPageToLoad(); return browser.driver.findElement(By.id("addTemplateQuestion-" + qnNumber)) <START> .findElement(By.className("in")).isDisplayed(); <END> }</code><technical_language>modal instead of in</technical_language>

Target:
public boolean isTemplateQuestionPanelExpanded(int qnNumber) { By expandedPanelSelector = By.cssSelector("#addTemplateQuestion-" + qnNumber + " .in"); waitForElementPresence(expandedPanelSelector); return browser.driver.findElement(expandedPanelSelector).isDisplayed(); }
Source:
<code>public void run() throws Exception { final Ds3SpecParser parser = new Ds3SpecParserImpl(); System.out.println("Generating " + args.getType().toString() + " ds3 sdk code for the spec " + args.getInputSpec() ); final Ds3ApiSpec spec = parser.getSpec(Files.newInputStream(Paths.get(args.getInputSpec()))); CodeGenerator generator; switch (args.getType()) { case C: generator = new CCodeGenerator(); break; case JAVA: generator = new JavaCodeGenerator(); break; case NET: generator = new NetCodeGenerator(); break; case PYTHON: generator = new PythonCodeGenerator(); break; default: throw new IllegalArgumentException("Unknown generator type " + args.getType().toString()); } <START> FileUtils fileUtils = new FileUtilsImpl(); <END> generator.generate(spec, fileUtils, Paths.get(args.getTargetDir())); }</code><technical_language>Missing final</technical_language>

Target:
public void run() throws Exception { final Ds3SpecParser parser = new Ds3SpecParserImpl(); System.out.println("Generating " + args.getType().toString() + " ds3 sdk code for the spec " + args.getInputSpec() ); final Ds3ApiSpec spec = parser.getSpec(Files.newInputStream(Paths.get(args.getInputSpec()))); final CodeGenerator generator; switch (args.getType()) { case C: generator = new CCodeGenerator(); break; case JAVA: generator = new JavaCodeGenerator(); break; case NET: generator = new NetCodeGenerator(); break; case PYTHON: generator = new PythonCodeGenerator(); break; default: throw new IllegalArgumentException("Unknown generator type " + args.getType().toString()); } final FileUtils fileUtils = new FileUtilsImpl(); generator.generate(spec, fileUtils, Paths.get(args.getTargetDir())); }
Source:
<code>public Set<String> getGrantedPermissions() { <START> final Set<String> permissions = this.permissions.entrySet().stream().filter(Entry::getValue).map(Entry::getKey).collect(Collectors.toSet()); <END> return permissions; }</code><technical_language>inline permissions remove redundant this</technical_language>

Target:
public Set<String> getGrantedPermissions() { return permissions.entrySet().stream().filter(Entry::getValue).map(Entry::getKey).collect(Collectors.toSet()); }
Source:
<code>public void loadFromDataStore() throws Exception { Datastore dsNoCredentials = null; try { <START> dsNoCredentials = new Datastore("<LINK_0>"); <END> System.out.println(file); File f = dsNoCredentials.getFile("edu.cogcomp", file, 1.3); InputStream is = new FileInputStream(f); loadFromInputStream(is); } catch (InvalidPortException | InvalidEndpointException e) { e.printStackTrace(); System.out.println("The BrownCluster did not load. This is probably because out datastore server is off. Try again later or ping us. "); } }</code><technical_language>agreed. add in this PR</technical_language>

Target:
public void loadFromDataStore() throws Exception { Datastore dsNoCredentials = new Datastore(new ResourceConfigurator().getDefaultConfig()); File f = dsNoCredentials.getFile("org.cogcomp.brown-clusters", file, 1.3); InputStream is = new FileInputStream(f); loadFromInputStream(is); }
Source:
<code>public void purge(Set<Integer> parts, IgniteCallable<Boolean> shouldStop) throws IgniteCheckedException { <START> assert !F.isEmpty(parts) : "empty parts"; <END> assert shouldStop != null : "shouldStop is null"; TreeRowClosure<H2Row, H2Row> rowClo = (tree, io, pageAddr, idx) -> { long link = ((H2RowLinkIO)io).getLink(pageAddr,idx); int partId = PageIdUtils.partId(link); return parts.contains(partId); }; InlineIndexHelper.setCurrentInlineIndexes(inlineIdxs); try { if (shouldStop.call()) return; GridCursor<Void> cur = purge(rowClo); while (cur.next()) { if (shouldStop.call()) return; cctx.shared().database().checkpointReadLock(); try { cur.get(); } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { cctx.shared().database().checkpointReadUnlock(); } } } catch (IgniteCheckedException e) { throw e; } catch (Exception e) { if (e.getCause() instanceof NodeStoppingException) throw (NodeStoppingException)e.getCause(); throw U.cast(e); } finally { InlineIndexHelper.clearCurrentInlineIndexes(); } }</code><technical_language>Sentences start capital letter</technical_language>

Target:
public void purge(Set<Integer> parts, IgniteCallable<Boolean> shouldStop) throws IgniteCheckedException { assert !F.isEmpty(parts) : "Empty parts"; assert shouldStop != null; TreeRowClosure<H2Row, H2Row> rowClo = (tree, io, pageAddr, idx) -> { long link = ((H2RowLinkIO)io).getLink(pageAddr,idx); int partId = PageIdUtils.partId(link); return parts.contains(partId); }; InlineIndexHelper.setCurrentInlineIndexes(inlineIdxs); try { if (shouldStop.call()) return; visitLeaves(rowClo, new PurgePageHandler(rowClo) { @Override public void onBefore() { cctx.shared().database().checkpointReadLock(); } @Override public void onAfter() throws IgniteCheckedException { try { super.onAfter(); } finally { cctx.shared().database().checkpointReadUnlock(); } } }); } catch (IgniteCheckedException e) { throw e; } catch (Exception e) { if (e.getCause() instanceof NodeStoppingException) throw (NodeStoppingException)e.getCause(); throw U.cast(e); } finally { InlineIndexHelper.clearCurrentInlineIndexes(); } }