auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private static Symbol copySymbol(String symbolName, Symbol symbol, Map<String, Symbol> globalSymbolsByFQN) { if (symbol.kind() == Symbol.Kind.FUNCTION) { return new FunctionSymbolImpl(symbolName, (FunctionSymbol) symbol); } else if (symbol.kind() == Symbol.Kind.CLASS) { ClassSymbolImpl classSymbol = new ClassSymbolImpl(symbolName, symbol.fullyQualifiedName()); for (Symbol originalSymbol : ((ClassSymbol) symbol).superClasses()) { Symbol globalSymbol = globalSymbolsByFQN.get(originalSymbol.fullyQualifiedName()); if (globalSymbol != null && globalSymbol.kind() == Symbol.Kind.CLASS) { <START> classSymbol.addSuperClass(globalSymbol); <END> } else { classSymbol.addSuperClass(originalSymbol); } } classSymbol.setHasUnresolvedTypeHierarchy(classSymbol.superClasses().stream().anyMatch( s -> s.kind() != Symbol.Kind.CLASS && !BuiltinSymbols.all().contains(s.fullyQualifiedName()))); return classSymbol; } return new SymbolImpl(symbolName, symbol.fullyQualifiedName()); }</code><technical_language>super classes of globalSymbol</technical_language>

Target:
private static Symbol copySymbol(String symbolName, Symbol symbol, Map<String, Symbol> globalSymbolsByFQN) { if (symbol.kind() == Symbol.Kind.FUNCTION) { return new FunctionSymbolImpl(symbolName, (FunctionSymbol) symbol); } else if (symbol.kind() == Symbol.Kind.CLASS) { ClassSymbolImpl classSymbol = new ClassSymbolImpl(symbolName, symbol.fullyQualifiedName()); for (Symbol originalSymbol : ((ClassSymbol) symbol).superClasses()) { Symbol globalSymbol = globalSymbolsByFQN.get(originalSymbol.fullyQualifiedName()); if (globalSymbol != null && globalSymbol.kind() == Symbol.Kind.CLASS) { classSymbol.addSuperClass(copySymbol(globalSymbol.name(), globalSymbol, globalSymbolsByFQN)); } else { classSymbol.addSuperClass(originalSymbol); } } classSymbol.setHasUnresolvedTypeHierarchy(classSymbol.superClasses().stream().anyMatch(s -> s.kind() != Symbol.Kind.CLASS)); return classSymbol; } return new SymbolImpl(symbolName, symbol.fullyQualifiedName()); }
Source:
<code>public void dispose() { <START> getTableViewer().getTable().dispose(); <END> super.dispose(); }</code><technical_language>controls get disposed platform. need call super.dispose() viewer is a TmfComponent</technical_language>

Target:
public void dispose() { super.dispose(); }
Source:
<code>public static DiscoveryStrategy create(ResourceLoader resourceLoader, Bootstrap bootstrap, Set<Class<? extends Annotation>> initialBeanDefiningAnnotations) { if (Reflections.isClassLoadable(resourceLoader, JANDEX_INDEX_CLASS_NAME)) { CommonLogger.LOG.usingJandex(); try { <START> return Reflections.cast(SecurityActions.getConstructor(Reflections.classForName(resourceLoader, JANDEX_DISCOVERY_STRATEGY_CLASS_NAME), <END> ResourceLoader.class, Bootstrap.class, Set.class).newInstance(resourceLoader, bootstrap, initialBeanDefiningAnnotations)); } catch (Exception e) { throw CommonLogger.LOG.unableToInstantiate(JANDEX_DISCOVERY_STRATEGY_CLASS_NAME, Arrays.toString(new Object[] { resourceLoader, bootstrap, initialBeanDefiningAnnotations }), e); } } return new ReflectionDiscoveryStrategy(resourceLoader, bootstrap, initialBeanDefiningAnnotations); }</code><technical_language>need SecurityActions obtaining a public constructor of a public class</technical_language>

Target:
public static DiscoveryStrategy create(ResourceLoader resourceLoader, Bootstrap bootstrap, Set<Class<? extends Annotation>> initialBeanDefiningAnnotations) { if (Reflections.isClassLoadable(resourceLoader, JANDEX_INDEX_CLASS_NAME)) { CommonLogger.LOG.usingJandex(); try { return cast(classForName(resourceLoader, JANDEX_DISCOVERY_STRATEGY_CLASS_NAME).getConstructor(ResourceLoader.class, Bootstrap.class, Set.class) .newInstance(resourceLoader, bootstrap, initialBeanDefiningAnnotations)); } catch (Exception e) { throw CommonLogger.LOG.unableToInstantiate(JANDEX_DISCOVERY_STRATEGY_CLASS_NAME, Arrays.toString(new Object[] { resourceLoader, bootstrap, initialBeanDefiningAnnotations }), e); } } return new ReflectionDiscoveryStrategy(resourceLoader, bootstrap, initialBeanDefiningAnnotations); }
Source:
<code>public void handleMessage(Message msg) { Dispatcher outerThis = dispatcherRef.get(); if (outerThis == null) { return; } switch (msg.what) { <START> case REQUEST_SUBMIT : { <END> Action action = (Action) msg.obj; outerThis.performSubmit(action); break; } case REQUEST_CANCEL : { Action action = (Action) msg.obj; outerThis.performCancel(action); break; } case HUNTER_COMPLETE : { BitmapHunter hunter = (BitmapHunter) msg.obj; outerThis.performComplete(hunter); break; } case HUNTER_RETRY : { BitmapHunter hunter = (BitmapHunter) msg.obj; outerThis.performRetry(hunter); break; } case HUNTER_DECODE_FAILED : { BitmapHunter hunter = (BitmapHunter) msg.obj; outerThis.performError(hunter); break; } case HUNTER_DELAY_NEXT_BATCH : { outerThis.performBatchComplete(); break; } case NETWORK_STATE_CHANGE : { NetworkInfo info = (NetworkInfo) msg.obj; outerThis.performNetworkStateChange(info); break; } case AIRPLANE_MODE_CHANGE : { outerThis.performAirplaneModeChange(msg.arg1 == AIRPLANE_MODE_ON); break; } default : throw new AssertionError("Unknown handler message received: " + msg.what); } }</code><technical_language>extra space</technical_language>

Target:
public void handleMessage(Message msg) { Dispatcher dispatcher = dispatcherRef.get(); if (dispatcher == null) { return; } switch (msg.what) { case REQUEST_SUBMIT: { Action action = (Action) msg.obj; dispatcher.performSubmit(action); break; } case REQUEST_CANCEL: { Action action = (Action) msg.obj; dispatcher.performCancel(action); break; } case HUNTER_COMPLETE: { BitmapHunter hunter = (BitmapHunter) msg.obj; dispatcher.performComplete(hunter); break; } case HUNTER_RETRY: { BitmapHunter hunter = (BitmapHunter) msg.obj; dispatcher.performRetry(hunter); break; } case HUNTER_DECODE_FAILED: { BitmapHunter hunter = (BitmapHunter) msg.obj; dispatcher.performError(hunter); break; } case HUNTER_DELAY_NEXT_BATCH: { dispatcher.performBatchComplete(); break; } case NETWORK_STATE_CHANGE: { NetworkInfo info = (NetworkInfo) msg.obj; dispatcher.performNetworkStateChange(info); break; } case AIRPLANE_MODE_CHANGE: { dispatcher.performAirplaneModeChange(msg.arg1 == AIRPLANE_MODE_ON); break; } default: throw new AssertionError("Unknown handler message received: " + msg.what); } }
Source:
<code>public void dropToSelection(Object data) { String filePath = ""; if (data instanceof String[]) { filePath = ((String[]) data)[0]; } if (filePath != null) { parseFile(filePath, <START> "-1"); <END> } else { showMessage(viewer.getControl().getShell(), SWT.ERROR, "Error", "Not an Excel or Word file."); } viewer.refresh(); }</code><technical_language>class level constant</technical_language>

Target:
public void dropToSelection(Object data) { String filePath = ""; if (data instanceof String[]) { filePath = ((String[]) data)[0]; } if (filePath != null) { parseFile(filePath, OBJECT_ID_NOT_SPECIFIED); } else { showMessage(viewer.getControl().getShell(), SWT.ERROR, "Error", "Not an Excel or Word file."); } viewer.refresh(); }
Source:
<code><START> private void setupFilters() { <END> addFilter(ContextClasssLoaderFilter.class); addFilter(DiagnosticThreadNameFilter.class); addFilter(CharacterEncodingFilter.class); addFilter(CompressionFilter.class); addFilter(HudsonFilter.class); addFilter(CrumbFilter.class); addFilter(PluginServletFilter.class); }</code><technical_language>"set up" a verb is words, this setUpFilters</technical_language>

Target:
private void setupFilters() { addFilter(ContextClassLoaderFilter.class); addFilter(DiagnosticThreadNameFilter.class); addFilter(CharacterEncodingFilter.class); addFilter(CompressionFilter.class); addFilter(HudsonFilter.class); addFilter(CrumbFilter.class); addFilter(PluginServletFilter.class); }
Source:
<code>public void whenTryToLockShouldWork() throws DotSecurityException, DotDataException { final Role role = new RoleDataGen().nextPersisted(); final User user = new UserDataGen().roles(role).nextPersisted(); final ContentType contentType = new ContentTypeDataGen().nextPersisted(); final Contentlet contentlet = new ContentletDataGen(contentType.id()).next(); final ESContentletAPIImpl esContentletAPI = new ESContentletAPIImpl(); final Contentlet contentletSaved = esContentletAPI.checkin(contentlet, APILocator.systemUser(), false); addPermission(role, contentType, PermissionLevel.WRITE); addPermission(role, contentletSaved, PermissionLevel.WRITE); <START> esContentletAPI.lock(contentletSaved, user, false); <END> }</code><technical_language>add assert checking content is locked</technical_language>

Target:
public void whenTryToLockShouldWork() throws DotSecurityException, DotDataException { final Role role = new RoleDataGen().nextPersisted(); final User user = new UserDataGen().roles(role).nextPersisted(); final ContentType contentType = new ContentTypeDataGen().nextPersisted(); final Contentlet contentlet = new ContentletDataGen(contentType.id()).next(); final ESContentletAPIImpl esContentletAPI = new ESContentletAPIImpl(); final Contentlet contentletSaved = esContentletAPI.checkin(contentlet, APILocator.systemUser(), false); addPermission(role, contentType, PermissionLevel.WRITE); addPermission(role, contentletSaved, PermissionLevel.WRITE); esContentletAPI.lock(contentletSaved, user, false); checkLock(user, contentletSaved); }
Source:
<code><START> public List<CaptureConfig> onRepeating() { <END> return new ArrayList<>(); }</code><technical_language>Is a reason this is a list instead of a CaptureConfig? a usage perspective, sense issue a single config</technical_language>

Target:
public CaptureConfig onRepeating() { return null; }
Source:
<code>public void execute(SensorContext context) { Optional<RuleKey> parsingErrorKey = getParsingErrorKey(); for (InputFile inputFile : fileSystem.inputFiles(mainFilesPredicate)) { XmlFile xmlFile = new XmlFile(inputFile, fileSystem); try { NewXmlFile newXmlFile = NewXmlFile.create(inputFile); LineCounter.analyse(context, fileLinesContextFactory, newXmlFile); <START> runChecks(context, xmlFile); <END> } catch (ParseException e) { processParseException(e, context, inputFile, parsingErrorKey); } catch (Exception e) { processException(e, context, inputFile); } } }</code><technical_language>provide newXmlFile well, recompute line 100</technical_language>

Target:
public void execute(SensorContext context) { Optional<RuleKey> parsingErrorKey = getParsingErrorKey(); for (InputFile inputFile : fileSystem.inputFiles(mainFilesPredicate)) { XmlFile xmlFile = new XmlFile(inputFile, fileSystem); try { NewXmlFile newXmlFile = NewXmlFile.create(inputFile); LineCounter.analyse(context, fileLinesContextFactory, newXmlFile); runChecks(context, xmlFile, newXmlFile); } catch (ParseException e) { processParseException(e, context, inputFile, parsingErrorKey); } catch (Exception e) { processException(e, context, inputFile); } } }
Source:
<code>public void saveValuesText(String answer) { ValueDB valueDB = getValueBySession(); <START> if (valueDB != null) { <END> valueDB.setValue(answer); } SurveyDB surveyDB = (SurveyFragmentStrategy.getSessionSurveyByQuestion(this)); SurveyFragmentStrategy.saveValuesText(valueDB, answer, this, surveyDB); }</code><technical_language>explain a bit more this piece of code? .setValue() call. I guess do issue #1695 solved here? If case, please remove this piece of code this PR create a separate PR for #1695, anyway...please answer question. Thanks</technical_language>

Target:
public void saveValuesText(String answer) { ValueDB valueDB = getValueBySession(); SurveyDB surveyDB = (SurveyFragmentStrategy.getSessionSurveyByQuestion(this)); SurveyFragmentStrategy.saveValuesText(valueDB, answer, this, surveyDB); }
Source:
<code>public void addEditCentralRepoComment() { CentralRepoCommentDialog centralRepoCommentDialog = new CentralRepoCommentDialog(correlationAttribute); <START> centralRepoCommentDialog.display(); <END> if (centralRepoCommentDialog.isCommentUpdated()) { EamDb dbManager; try { dbManager = EamDb.getInstance(); if (addToDatabase) { dbManager.addArtifact(correlationAttribute); } else { dbManager.updateAttributeInstanceComment(correlationAttribute); } } catch (EamDbException ex) { logger.log(Level.SEVERE, "Error connecting to Central Repository database.", ex); } } }</code><technical_language>I dialog nicer a title. logo nice, too, if work</technical_language>

Target:
public void addEditCentralRepoComment() { CentralRepoCommentDialog centralRepoCommentDialog = new CentralRepoCommentDialog(correlationAttribute, title); centralRepoCommentDialog.display(); if (centralRepoCommentDialog.isCommentUpdated()) { EamDb dbManager; try { dbManager = EamDb.getInstance(); if (addToDatabase) { dbManager.addArtifact(correlationAttribute); } else { dbManager.updateAttributeInstanceComment(correlationAttribute); } } catch (EamDbException ex) { logger.log(Level.SEVERE, "Error connecting to Central Repository database.", ex); } } }
Source:
<code>private ReaderPostAdapter getPostAdapter() { if (mPostAdapter == null) { AppLog.d(T.READER, "reader post list > creating post adapter"); Context context = WPActivityUtils.getThemedContext(getActivity()); mPostAdapter = new ReaderPostAdapter( context, getPostListType(), mImageManager, mIsTopLevel, <START> this ); mPostAdapter.setOnFollowListener(this); <END> mPostAdapter.setOnPostSelectedListener(this); mPostAdapter.setOnPostPopupListener(this); mPostAdapter.setOnDataLoadedListener(mDataLoadedListener); mPostAdapter.setOnDataRequestedListener(mDataRequestedListener); mPostAdapter.setOnPostBookmarkedListener(mOnPostBookmarkedListener); mPostAdapter.setOnNewsCardListener(mNewsCardListener); if (getActivity() instanceof ReaderSiteHeaderView.OnBlogInfoLoadedListener) { mPostAdapter.setOnBlogInfoLoadedListener((ReaderSiteHeaderView.OnBlogInfoLoadedListener) getActivity()); } mViewModel.getNewsDataSource().removeObserver(mNewsItemObserver); if (getPostListType().isTagType()) { mPostAdapter.setCurrentTag(getCurrentTag()); mViewModel.getNewsDataSource().observe((FragmentActivity) getActivity(), mNewsItemObserver); } else if (getPostListType() == ReaderPostListType.BLOG_PREVIEW) { mPostAdapter.setCurrentBlogAndFeed(mCurrentBlogId, mCurrentFeedId); } else if (getPostListType() == ReaderPostListType.SEARCH_RESULTS) { ReaderTag searchTag = ReaderUtils.getTagForSearchQuery(mCurrentSearchQuery); mPostAdapter.setCurrentTag(searchTag); } } return mPostAdapter; }</code><technical_language>For ReblogActionListener I consider setter logic for consistency (like for setOnFollowListener)</technical_language>

Target:
private ReaderPostAdapter getPostAdapter() { if (mPostAdapter == null) { AppLog.d(T.READER, "reader post list > creating post adapter"); Context context = WPActivityUtils.getThemedContext(getActivity()); mPostAdapter = new ReaderPostAdapter( context, getPostListType(), mImageManager, mIsTopLevel ); mPostAdapter.setOnFollowListener(this); mPostAdapter.setReblogActionListener(this); mPostAdapter.setOnPostSelectedListener(this); mPostAdapter.setOnPostPopupListener(this); mPostAdapter.setOnDataLoadedListener(mDataLoadedListener); mPostAdapter.setOnDataRequestedListener(mDataRequestedListener); mPostAdapter.setOnPostBookmarkedListener(mOnPostBookmarkedListener); mPostAdapter.setOnNewsCardListener(mNewsCardListener); if (getActivity() instanceof ReaderSiteHeaderView.OnBlogInfoLoadedListener) { mPostAdapter.setOnBlogInfoLoadedListener((ReaderSiteHeaderView.OnBlogInfoLoadedListener) getActivity()); } mViewModel.getNewsDataSource().removeObserver(mNewsItemObserver); if (getPostListType().isTagType()) { mPostAdapter.setCurrentTag(getCurrentTag()); mViewModel.getNewsDataSource().observe((FragmentActivity) getActivity(), mNewsItemObserver); } else if (getPostListType() == ReaderPostListType.BLOG_PREVIEW) { mPostAdapter.setCurrentBlogAndFeed(mCurrentBlogId, mCurrentFeedId); } else if (getPostListType() == ReaderPostListType.SEARCH_RESULTS) { ReaderTag searchTag = ReaderUtils.getTagForSearchQuery(mCurrentSearchQuery); mPostAdapter.setCurrentTag(searchTag); } } return mPostAdapter; }
Source:
<code>public void withTmpFsTest(){ <START> try(GenericContainer container = new GenericContainer().withCommand("top") <END> .withTmpFs(singletonMap("/testtmpfs", "rw"))) { assertFalse("Container is not started and not running", container.isRunning()); container.start(); assertTrue("Container is started and running", container.isRunning()); String path = "/testtmpfs/test.file"; Container.ExecResult execResult = container.execInContainer("ls", path); assertEquals("tmpfs inside container works fine", execResult.getStderr(), "ls: /testtmpfs/test.file: No such file or directory\n"); container.execInContainer("touch", path); execResult = container.execInContainer("ls", path); assertEquals("tmpfs inside container works fine", execResult.getStdout(), path + "\n"); } catch (InterruptedException | IOException ignored) { assertNull("Exception shouldn't be at all.", ignored); } }</code><technical_language>please other tests format it, like: java try ( GenericContainer container = new GenericContainer() .withCommand("top") .withTmpFs(singletonMap("/testtmpfs", "rw")) ) {</technical_language>

Target:
public void withTmpFsTest() throws Exception { try ( GenericContainer container = new GenericContainer() .withCommand("top") .withTmpFs(singletonMap("/testtmpfs", "rw")) ) { container.start(); String path = "/testtmpfs/test.file"; Container.ExecResult execResult = container.execInContainer("ls", path); assertEquals("tmpfs inside container works fine", execResult.getStderr(), "ls: /testtmpfs/test.file: No such file or directory\n"); container.execInContainer("touch", path); execResult = container.execInContainer("ls", path); assertEquals("tmpfs inside container works fine", execResult.getStdout(), path + "\n"); } }
Source:
<code>private void reportToElasticsearch(Metric2Registry metricRegistry, int reportingInterval, final MeasurementSession measurementSession) { if (isReportToElasticsearch()) { elasticsearchClient.sendClassPathRessourceBulkAsync("KibanaConfig.bulk"); logger.info("Sending metrics to Elasticsearch ({}) every {}s", getElasticsearchUrls(), reportingInterval); final String mappingJson = ElasticsearchClient.modifyIndexTemplate( metricsIndexTemplate.getValue(), moveToColdNodesAfterDays.getValue(), getNumberOfReplicas(), getNumberOfShards()); elasticsearchClient.sendMappingTemplateAsync(mappingJson, "stagemonitor-metrics"); final ElasticsearchReporter reporter = ElasticsearchReporter.forRegistry(metricRegistry, this) .globalTags(measurementSession.asMap()) .build(); reporter.start(reportingInterval, TimeUnit.SECONDS); reporters.add(reporter); elasticsearchClient.scheduleIndexManagement(ElasticsearchReporter.STAGEMONITOR_METRICS_INDEX_PREFIX, moveToColdNodesAfterDays.getValue(), deleteElasticsearchMetricsAfterDays.getValue()); <START> } else if (isOnlyLogElasticsearchMetricReports()) { <END> final ElasticsearchReporter reporter = ElasticsearchReporter.forRegistry(metricRegistry, this) .globalTags(measurementSession.asMap()) .build(); reporter.start(reportingInterval, TimeUnit.SECONDS); reporters.add(reporter); } else { logger.info("Not sending metrics to Elasticsearch (url={}, interval={}s)", getElasticsearchUrls(), reportingInterval); } }</code><technical_language>duplicated code for creating starting reporter. a amount of duplicated code is small nice</technical_language>

Target:
private void reportToElasticsearch(Metric2Registry metricRegistry, int reportingInterval, final MeasurementSession measurementSession) { if (isReportToElasticsearch()) { elasticsearchClient.sendClassPathRessourceBulkAsync("KibanaConfig.bulk"); logger.info("Sending metrics to Elasticsearch ({}) every {}s", getElasticsearchUrls(), reportingInterval); final String mappingJson = ElasticsearchClient.modifyIndexTemplate( metricsIndexTemplate.getValue(), moveToColdNodesAfterDays.getValue(), getNumberOfReplicas(), getNumberOfShards()); elasticsearchClient.sendMappingTemplateAsync(mappingJson, "stagemonitor-metrics"); elasticsearchClient.scheduleIndexManagement(ElasticsearchReporter.STAGEMONITOR_METRICS_INDEX_PREFIX, moveToColdNodesAfterDays.getValue(), deleteElasticsearchMetricsAfterDays.getValue()); } if (isReportToElasticsearch() || isOnlyLogElasticsearchMetricReports()) { final ElasticsearchReporter reporter = ElasticsearchReporter.forRegistry(metricRegistry, this) .globalTags(measurementSession.asMap()) .build(); reporter.start(reportingInterval, TimeUnit.SECONDS); reporters.add(reporter); } else { logger.info("Not sending metrics to Elasticsearch (url={}, interval={}s)", getElasticsearchUrls(), reportingInterval); } }
Source:
<code>public void advance(long lastSeqNo, long commitSeqNo, long commitSpHandle, long startTime) { m_es.execute(new Runnable() { @Override public void run() { if (exportLog.isTraceEnabled()) { <START> exportLog.trace("AckingContainer.discard with sequence number: " + lastSeqNo); <END> } assert(startTime != 0); long elapsedMS = System.currentTimeMillis() - startTime; m_blocksSentSinceClear += 1; m_totalLatencySinceClearInMS += elapsedMS; m_averageLatency = m_totalLatencySinceClearInMS / m_blocksSentSinceClear; if (m_averageLatency > m_maxLatency) { m_maxLatency = m_averageLatency; } try { if (!m_es.isShutdown()) { setCommittedSeqNo(commitSeqNo); ackImpl(lastSeqNo); } forwardAckToOtherReplicas(); if (m_migrateRowsDeleter != null && m_mastershipAccepted.get()) { m_migrateRowsDeleter.delete(commitSpHandle); } } catch (Exception e) { exportLog.error("Error acking export buffer", e); } catch (Error e) { VoltDB.crashLocalVoltDB("Error acking export buffer", true, e); } } }); }</code><technical_language>Change message "Advance sequence number "</technical_language>

Target:
public void advance(long lastSeqNo, long commitSeqNo, long commitSpHandle, long startTime) { m_es.execute(new Runnable() { @Override public void run() { if (exportLog.isTraceEnabled()) { exportLog.trace("Advance sequence number to: " + commitSeqNo); } assert(startTime != 0); long elapsedMS = System.currentTimeMillis() - startTime; m_blocksSentSinceClear += 1; m_totalLatencySinceClearInMS += elapsedMS; m_averageLatency = m_totalLatencySinceClearInMS / m_blocksSentSinceClear; if (m_averageLatency > m_maxLatency) { m_maxLatency = m_averageLatency; } try { if (!m_es.isShutdown()) { setLastCommittedSeqNo(commitSeqNo); ackImpl(commitSeqNo); } forwardAckToOtherReplicas(); if (m_migrateRowsDeleter != null && m_mastershipAccepted.get()) { m_migrateRowsDeleter.delete(commitSpHandle); } } catch (Exception e) { exportLog.error("Error acking export buffer", e); } catch (Error e) { VoltDB.crashLocalVoltDB("Error acking export buffer", true, e); } } }); }
Source:
<code>private double updateMinFramePeriod(double tsDelta) { tsDeltaHist[tsDeltaHistIdx] = tsDelta; <START> tsDeltaHistIdx = (tsDeltaHistIdx + 1) % tsDeltaHist.length; <END> double min = tsDelta; for (double d : tsDeltaHist) { if (d < min) min = d; } return min; }</code><technical_language>Is (much) faster following? curious if answer (i.e. I want research change source code). java int nextTsDeltaHistIdx = tsDeltaHistIdx + 1; tsDeltaHistIdx = (nextTsDeltaHistIdx < tsDeltaHist.length) ? nextTsDeltaHistIdx : 0;</technical_language>

Target:
private double updateMinFramePeriod(double tsDelta) { tsDeltaHist[tsDeltaHistInsIdx] = tsDelta; tsDeltaHistInsIdx = (tsDeltaHistInsIdx + 1) % tsDeltaHist.length; double min = tsDelta; for (double d : tsDeltaHist) { if (d < min) min = d; } return min; }
Source:
<code>public void verifyTemplateImage(String selectedTemplateName) { waitForElementByElement(templateImagePreview); <START> Assert.assertTrue(templateImagePreview.getAttribute("src").endsWith(selectedTemplateName)); <END> }</code><technical_language>Please assertion class</technical_language>

Target:
public void verifyTemplateImage(String selectedTemplateName) { waitForElementByElement(templateImagePreview); Assertion.assertTrue(templateImagePreview.getAttribute("src").endsWith(selectedTemplateName)); }
Source:
<code>private void updateCrashReportProps() { if (!ReleaseUtil.isPreBetaRelease()) { putCrashReportProperty("locale", Locale.getDefault().toString()); if (appLanguageState != null) { putCrashReportProperty("app_primary_language", appLanguageState.getAppLanguageCode()); putCrashReportProperty("app_languages", appLanguageState.getAppLanguageCodes().toString()); <START> putCrashReportProperty("app_install_id", getAppInstallID()); <END> } } }</code><technical_language>This is a pretty good idea; eventlogging in tables this ID pops up</technical_language>

Target:
private void updateCrashReportProps() { if (!ReleaseUtil.isPreBetaRelease()) { putCrashReportProperty("locale", Locale.getDefault().toString()); if (appLanguageState != null) { putCrashReportProperty("app_primary_language", appLanguageState.getAppLanguageCode()); putCrashReportProperty("app_languages", appLanguageState.getAppLanguageCodes().toString()); putCrashReportProperty("app_install_id", getAppInstallID()); putCrashReportProperty("app_local_class_name", Prefs.getLocalClassName()); } } }
Source:
<code>private void createNameForm(Composite composite) { Group group = createGroup(composite, Messages.SelectDiagramKindPage_diagram_name_group); nameText = new Text(group, SWT.BORDER); nameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); <START> nameText.setText(""); <END> ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() > 0) { IStructuredSelection sSelection = (IStructuredSelection) selection; Object selectedObject = sSelection.getFirstElement(); if (selectedObject instanceof IFile) { IFile selectedIFile = (IFile) selectedObject; ResourceSet resourceSet = new ResourceSetImpl(); Resource resource = resourceSet.getResource(URI.createURI(selectedIFile.getLocationURI().toString()), true); EObject sEObject = resource.getContents().get(0); if (sEObject != null && sEObject instanceof Profile) { Profile sProfile = (Profile) sEObject; nameText.setText(sProfile.getName()); } } } nameText.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { validatePage(); } }); }</code><technical_language>default name; avoid empty names</technical_language>

Target:
private void createNameForm(Composite composite) { Group group = createGroup(composite, Messages.SelectDiagramKindPage_diagram_name_group); nameText = new Text(group, SWT.BORDER); nameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); nameText.setText(Messages.SelectDiagramKindPage_default_diagram_name); ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() > 0) { IStructuredSelection sSelection = (IStructuredSelection) selection; Object selectedObject = sSelection.getFirstElement(); if (selectedObject instanceof IAdaptable) { IFile selectedIFile = ((IAdaptable) selectedObject).getAdapter(IFile.class); if (selectedIFile != null) { try { ResourceSet resourceSet = new ResourceSetImpl(); Resource resource = resourceSet.getResource(URI.createURI(selectedIFile.getLocationURI().toString()), true); EObject sEObject = resource.getContents().get(0); if (sEObject != null && sEObject instanceof org.eclipse.uml2.uml.Package) { org.eclipse.uml2.uml.Package sPackage = (org.eclipse.uml2.uml.Package) sEObject; nameText.setText(sPackage.getName()); } } catch (Exception e) { Activator.log.error(e); } } } } nameText.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { validatePage(); } }); }
Source:
<code>protected File createUniqueTestGitDir(boolean bare) throws IOException { String gitdirName = createUniqueTestFolderPrexif(); <START> if (!bare) { <END> gitdirName += "/"; } gitdirName += Constants.DOT_GIT; File gitdir = new File(trash, gitdirName); return gitdir.getCanonicalFile(); }</code><technical_language>style nit: braces single line blocks</technical_language>

Target:
protected File createUniqueTestGitDir(boolean bare) throws IOException { String gitdirName = createUniqueTestFolderPrefix(); if (!bare) gitdirName += "/"; gitdirName += Constants.DOT_GIT; File gitdir = new File(trash, gitdirName); return gitdir.getCanonicalFile(); }
Source:
<code>public void restartDevMode(final ThreadPoolExecutor executor) { executor.shutdown(); stopServer(); log.info("Restarting liberty:dev mode"); ProcessBuilder processBuilder = new ProcessBuilder(); <START> String processCommand = "mvn liberty:dev"; <END> String os = System.getProperty("os.name"); if (os != null && os.toLowerCase().startsWith("windows")) { processBuilder.command("CMD", "/C", processCommand); } else { processBuilder.command("bash", "-c", processCommand); } try { processBuilder.redirectOutput(Redirect.INHERIT); processBuilder.redirectError(Redirect.INHERIT); processBuilder.start(); } catch (IOException e) { log.error("Could not restart liberty:dev mode", e); } }</code><technical_language>find a pass of @Parameter variables current mojo, default if user command line pom</technical_language>

Target:
public void restartDevMode(final ThreadPoolExecutor executor) { executor.shutdown(); cleanUpJVMOptions(); stopServer(); log.info("Restarting liberty:dev mode"); ProcessBuilder processBuilder = new ProcessBuilder(); String processCommand = "mvn liberty:dev"; Properties props = System.getProperties(); Set<Object> keys = props.keySet(); for(Object key: keys){ processCommand += " -D" + key + "=\"" + props.get(key) + "\""; } String os = System.getProperty("os.name"); if (os != null && os.toLowerCase().startsWith("windows")) { processBuilder.command("CMD", "/C", processCommand); } else { processBuilder.command("bash", "-c", processCommand); } try { processBuilder.redirectOutput(Redirect.INHERIT); processBuilder.redirectError(Redirect.INHERIT); processBuilder.start(); } catch (IOException e) { log.error("Could not restart liberty:dev mode", e); } }
Source:
<code>public void accept(final Dist dist) { if (visualization != null) return; final boolean ismac = System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("mac"); <START> visualization = new ClientVisualization(ismac); <END> visualization.start(); }</code><technical_language>This needs disable flag, is some edgecases macs in this case issues. needs a work it. entire point of this thread is block vanilla loading... GL context created in main thread side effects Minecraft crating GL context in thread</technical_language>

Target:
public Runnable accept(final Dist dist) { visualization = dist.isClient() && Boolean.parseBoolean(System.getProperty("fml.earlyprogresswindow", "true")) ? new ClientVisualization() : new NoVisualization(); return visualization.start(); }
Source:
<code>public StillLeadingStatus toStillLeadingStatus() { switch (this) { case QUORUM_AGREED: return StillLeadingStatus.LEADING; case SOME_DISAGREED: return StillLeadingStatus.NOT_LEADING; case NO_QUORUM: return StillLeadingStatus.NO_QUORUM; } <START> throw new IllegalStateException("unknown status: " + this); <END> }</code><technical_language>nit: I write this a default case. - is a convention for this</technical_language>

Target:
public StillLeadingStatus toStillLeadingStatus() { switch (this) { case QUORUM_AGREED: return StillLeadingStatus.LEADING; case SOME_DISAGREED: return StillLeadingStatus.NOT_LEADING; case NO_QUORUM: return StillLeadingStatus.NO_QUORUM; default: throw new IllegalStateException("unknown status: " + this); } }
Source:
<code>private BookieStatus readFromFile(File file) throws IOException, IllegalArgumentException { if (!file.exists()) { return null; } <START> BufferedReader reader = new BufferedReader( <END> new InputStreamReader(new FileInputStream(file), UTF_8)); try { return parse(reader); } finally { reader.close(); } }</code><technical_language>try(BufferedReader...) {}</technical_language>

Target:
private BookieStatus readFromFile(File file) throws IOException, IllegalArgumentException { if (!file.exists()) { return null; } try (BufferedReader reader = new BufferedReader( new InputStreamReader(new FileInputStream(file), UTF_8))) { return parse(reader); } }
Source:
<code>public ReceivePack create(HttpServletRequest req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { final ProjectControl pc = getProjectControl(req); if (pc.getCurrentUser() instanceof IdentifiedUser) { final IdentifiedUser user = (IdentifiedUser) pc.getCurrentUser(); <START> if (!pc.canPerformPackAction(receiveGroup)) { <END> throw new ServiceNotAuthorizedException(); } final ReceiveCommits rc = factory.create(pc, db); final ReceiveCommits.Capable s = rc.canUpload(); if (s != ReceiveCommits.Capable.OK) { final String who = user.getUserName(); final String why = s.getMessage(); log.warn("Rejected push from " + who + ": " + why); throw new ServiceNotEnabledException(); } rc.getReceivePack().setRefLogIdent(user.newRefLogIdent()); return rc.getReceivePack(); } else { throw new ServiceNotAuthorizedException(); } }</code><technical_language>receiveGroup reference of ProjectControl, servlet</technical_language>

Target:
public ReceivePack create(HttpServletRequest req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { final ProjectControl pc = getProjectControl(req); if (!pc.canRunReceivePack()) { throw new ServiceNotAuthorizedException(); } if (pc.getCurrentUser() instanceof IdentifiedUser) { final IdentifiedUser user = (IdentifiedUser) pc.getCurrentUser(); final ReceiveCommits rc = factory.create(pc, db); final ReceiveCommits.Capable s = rc.canUpload(); if (s != ReceiveCommits.Capable.OK) { final String who = user.getUserName(); final String why = s.getMessage(); log.warn("Rejected push from " + who + ": " + why); throw new ServiceNotEnabledException(); } rc.getReceivePack().setRefLogIdent(user.newRefLogIdent()); return rc.getReceivePack(); } else { throw new ServiceNotAuthorizedException(); } }
Source:
<code><START> public final String buildFreeTextConditionSql(String tableName, <END> String relations, String value, boolean caseSensitive) { StringBuilder sb = new StringBuilder(" ( "); boolean firstTime = true; if (!StringHelper.isNullOrEmpty(value) && !"''".equals(value)) { value = StringFormat.format(getI18NPrefix() + "'%%%1$s%%'", StringHelper.trim(value, '\'')); } if ("=".equals(relations)) { relations = getLikeSyntax(caseSensitive); } else if ("!=".equals(relations)) { relations = "NOT " + getLikeSyntax(caseSensitive); } for (String field : mColumnNameDict.keySet()) { if (mTypeDict.get(field) == String.class && !mNotFreeTextSearchableFieldsList.contains(field)) { if (firstTime) { firstTime = false; } else { sb.append(" OR "); } sb.append(StringFormat.format(" %1$s.%2$s %3$s %4$s", tableName, mColumnNameDict.get(field), relations, value)); } } sb.append(" ) "); return sb.toString(); }</code><technical_language>For future, please send formatting changes in a preceding commit interfere spotting actual changes.</technical_language>

Target:
public final String buildFreeTextConditionSql(String tableName, String relations, String value, boolean caseSensitive) { StringBuilder sb = new StringBuilder(" ( "); boolean firstTime = true; if (!StringHelper.isNullOrEmpty(value) && !"''".equals(value)) { value = StringFormat.format(getI18NPrefix() + "'%%%1$s%%'", StringHelper.trim(value, '\'')); } if ("=".equals(relations)) { relations = getLikeSyntax(caseSensitive); } else if ("!=".equals(relations)) { relations = "NOT " + getLikeSyntax(caseSensitive); } for (String field : columnNameDict.keySet()) { if (typeDict.get(field) == String.class && !notFreeTextSearchableFieldsList.contains(field)) { if (firstTime) { firstTime = false; } else { sb.append(" OR "); } sb.append(StringFormat.format(" %1$s.%2$s %3$s %4$s", tableName, columnNameDict.get(field), relations, value)); } } sb.append(" ) "); return sb.toString(); }
Source:
<code>public List<Service> getServicesBlockedOnDestination(PerunSession sess, int destinationId) throws PrivilegeException, DestinationNotExistsException, FacilityNotExistsException { Destination destination = getDestinationById(sess, destinationId); <START> List<Facility> destinationFacilities = perunBl.getFacilitiesManager().getFacilitiesByDestination(sess, destination.getDestination()); <END> boolean isFacilityAdminAtLeastOnce = false; for (Facility facility : destinationFacilities) { if (AuthzResolver.isAuthorized(sess, Role.FACILITYADMIN, facility)) { isFacilityAdminAtLeastOnce = true; } } if (!isFacilityAdminAtLeastOnce && !AuthzResolver.isAuthorized(sess, Role.PERUNOBSERVER)) { throw new PrivilegeException(sess, "getServicesBlockedOnDestination"); } return getServicesManagerBl().getServicesBlockedOnDestination(sess, destinationId); }</code><technical_language>Please BL layer get destination facilities</technical_language>

Target:
public List<Service> getServicesBlockedOnDestination(PerunSession sess, int destinationId) throws PrivilegeException, DestinationNotExistsException, FacilityNotExistsException { Destination destination = getServicesManagerBl().getDestinationById(sess, destinationId); List<Facility> destinationFacilities = perunBl.getFacilitiesManagerBl().getFacilitiesByDestination(sess, destination.getDestination()); boolean isFacilityAdminAtLeastOnce = false; for (Facility facility : destinationFacilities) { if (AuthzResolver.isAuthorized(sess, Role.FACILITYADMIN, facility)) { isFacilityAdminAtLeastOnce = true; } } if (!isFacilityAdminAtLeastOnce && !AuthzResolver.isAuthorized(sess, Role.PERUNOBSERVER)) { throw new PrivilegeException(sess, "getServicesBlockedOnDestination"); } return getServicesManagerBl().getServicesBlockedOnDestination(sess, destinationId); }
Source:
<code>public PathsPromoteResult checkAnd( StoreKeyPaths k, Function<StoreKeyPaths, PathsPromoteResult> function, Function<StoreKeyPaths, PathsPromoteResult> conflictedFunction ) { Set<StoreKeyPaths> conflicts = null; boolean conflicted = false; try { logger.debug( "Check paths conflict for {}", k ); synchronized ( conflictsMap ) { conflicts = conflictsMap.get( k.getTarget() ); if ( conflicts == null ) { conflicts = new HashSet<>(); conflicts.add( k ); conflictsMap.put( k.getTarget(), conflicts ); } else { conflicted = hasConflict( k.getPaths(), conflicts ); if ( !conflicted ) { conflicts.add( k ); } } } logger.debug( "Check done, conflicted: {}", conflicted ); if ( conflicted ) { return conflictedFunction.apply( k ); } else { return function.apply( k ); } } finally { synchronized ( conflictsMap ) { <START> conflicts.remove( k ); <END> } } }</code><technical_language>NPE check for conflicts</technical_language>

Target:
public PathsPromoteResult checkAnd( StoreKeyPaths k, Function<StoreKeyPaths, PathsPromoteResult> function, Function<StoreKeyPaths, PathsPromoteResult> conflictedFunction ) { Set<StoreKeyPaths> inUse = null; boolean conflicted = false; try { logger.debug( "Check paths conflict for {}", k ); synchronized ( inUseMap ) { inUse = inUseMap.get( k.getTarget() ); if ( inUse == null ) { inUse = new HashSet<>(); inUse.add( k ); inUseMap.put( k.getTarget(), inUse ); } else { conflicted = hasConflict( k.getPaths(), inUse ); if ( !conflicted ) { inUse.add( k ); } } } logger.debug( "Check done, conflicted: {}", conflicted ); if ( conflicted ) { return conflictedFunction.apply( k ); } else { return function.apply( k ); } } finally { synchronized ( inUseMap ) { inUse.remove( k ); if ( inUse.isEmpty() ) { inUseMap.remove( k.getTarget() ); } } } }
Source:
<code>private boolean internalValidateAndSetQuota() { if (isInternalExecution()) { return true; } List<QuotaConsumptionParameter> consumptionParameters = new ArrayList<QuotaConsumptionParameter>(); try { switch (this.getActionType().getQuotaDependency()) { case NONE: return true; case STORAGE: addInternalStorageParameters(consumptionParameters); break; case VDS: addInternalVdsParameters(consumptionParameters); break; case BOTH: addInternalStorageParameters(consumptionParameters); addInternalVdsParameters(consumptionParameters); break; } <START> } catch (ClassCastException e) { <END> log.error("Command: " + this.getClass().getName() + ". Quota handling was expected - class does not implement the expected interface"); } QuotaConsumptionParametersWrapper quotaConsumptionParametersWrapper; if (getStoragePool() != null) { quotaConsumptionParametersWrapper = new QuotaConsumptionParametersWrapper( this.getStoragePool(), this.getReturnValue().getCanDoActionMessages(), this); quotaConsumptionParametersWrapper.setParameters(consumptionParameters); } else { quotaConsumptionParametersWrapper = new QuotaConsumptionParametersWrapper( null,this.getReturnValue().getCanDoActionMessages(), this); quotaConsumptionParametersWrapper.setParameters(consumptionParameters); log.error("Command: " + this.getClass().getName() + ". Storage pool is not available for quota calculation. "); } if (!consumptionParameters.isEmpty()) { return true; } else { return true; } }</code><technical_language>I agree, is a bug, catch exception is points bug, fixed</technical_language>

Target:
private boolean internalValidateAndSetQuota() { if (isInternalExecution()) { return true; } List<QuotaConsumptionParameter> consumptionParameters = new ArrayList<QuotaConsumptionParameter>(); switch (this.getActionType().getQuotaDependency()) { case NONE: return true; case STORAGE: consumptionParameters.addAll(((QuotaStorageDependent) this).getQuotaStorageConsumptionParameters()); break; case VDS: consumptionParameters.addAll(((QuotaVdsDependent) this).getQuotaVdsConsumptionParameters()); break; case BOTH: consumptionParameters.addAll(((QuotaStorageDependent) this).getQuotaStorageConsumptionParameters()); consumptionParameters.addAll(((QuotaVdsDependent) this).getQuotaVdsConsumptionParameters()); break; } QuotaConsumptionParametersWrapper quotaConsumptionParametersWrapper; if (getStoragePool() != null) { quotaConsumptionParametersWrapper = new QuotaConsumptionParametersWrapper( this.getStoragePool(), this.getReturnValue().getCanDoActionMessages(), this); quotaConsumptionParametersWrapper.setParameters(consumptionParameters); } else { quotaConsumptionParametersWrapper = new QuotaConsumptionParametersWrapper( null,this.getReturnValue().getCanDoActionMessages(), this); quotaConsumptionParametersWrapper.setParameters(consumptionParameters); log.error("Command: " + this.getClass().getName() + ". Storage pool is not available for quota calculation. "); } return consumptionParameters.isEmpty() ? true: true; }
Source:
<code>public void configure() { control("domain").set(ActiveDirectoryEnv.get().getDomain()); control("advanced-button").click(); if(ActiveDirectoryEnv.get().getController() != null) { control("server").set(ActiveDirectoryEnv.get().getController()); } if(ActiveDirectoryEnv.get().getSite() != null) { control("site").set(ActiveDirectoryEnv.get().getSite()); } control("bindPassword").set(ActiveDirectoryEnv.get().getPassword()); String bindDN = ActiveDirectoryEnv.get().getBindDN(); if(bindDN == null) { bindDN = ActiveDirectoryEnv.get().getUser()+"@"+ActiveDirectoryEnv.get().getDomain(); } control("bindName").set(bindDN); String groupLookupStrategy = ActiveDirectoryEnv.get().getGroupLookupStrategy(); if (groupLookupStrategy != null) { <START> control("groupLookupStrategy").select(ActiveDirectoryEnv.get().getGroupLookupStrategy()); <END> } }</code><technical_language>reuse groupLookupStrategy variable calling .get(..) ;)</technical_language>

Target:
public void configure() { control("domain").set(ActiveDirectoryEnv.get().getDomain()); control("advanced-button").click(); if(ActiveDirectoryEnv.get().getController() != null) { control("server").set(ActiveDirectoryEnv.get().getController()); } if(ActiveDirectoryEnv.get().getSite() != null) { control("site").set(ActiveDirectoryEnv.get().getSite()); } control("bindPassword").set(ActiveDirectoryEnv.get().getPassword()); String bindDN = ActiveDirectoryEnv.get().getBindDN(); if(bindDN == null) { bindDN = ActiveDirectoryEnv.get().getUser()+"@"+ActiveDirectoryEnv.get().getDomain(); } control("bindName").set(bindDN); String groupLookupStrategy = ActiveDirectoryEnv.get().getGroupLookupStrategy(); if (groupLookupStrategy != null) { control("groupLookupStrategy").select(groupLookupStrategy); } }
Source:
<code>public void setContextTest() { final List<Package> packages = new ArrayList<>(); packages.add(createPackage("com")); packages.add(createPackage("com.myteam")); packages.add(createPackage("com.myteam.mymodule")); packages.add(createPackage("com.myteam.mymodule.mypackage")); final Command packagesLoadedCommand = mock(Command.class); doReturn(new HashSet<>(packages)).when(moduleService).resolvePackages(any(Module.class)); doReturn(packages.get(2)).when(moduleService).resolveDefaultWorkspacePackage(any()); packageListBox.setUp(true, packagesLoadedCommand); verify(view).setUp(eq("com.myteam.mymodule"), mapArgumentCaptor.capture()); final Map map = mapArgumentCaptor.getValue(); assertEquals(4, map.size()); assertTrue(map.keySet().contains("com")); assertTrue(map.keySet().contains("com.myteam")); <START> assertTrue(map.keySet().contains("com.myteam.mymodule")); <END> assertTrue(map.keySet().contains("com.myteam.mymodule.mypackage")); verify(packagesLoadedCommand).execute(); }</code><technical_language>nice tests for boolean includeDefaultPackage functionality. 1. true server return default package in list 2. true server return default package in list 3. false server return default package in list 4. false server return default package in list</technical_language>

Target:
public void setContextTest() { setupPackageList(); final Command packagesLoadedCommand = mock(Command.class); packageListBox.setUp(true, packagesLoadedCommand); verify(view).setUp(eq("com.myteam.mymodule"), mapArgumentCaptor.capture()); final Map map = mapArgumentCaptor.getValue(); assertEquals(5, map.size()); assertTrue(map.keySet().contains("")); assertTrue(map.keySet().contains("com")); assertTrue(map.keySet().contains("com.myteam")); assertTrue(map.keySet().contains("com.myteam.mymodule")); assertTrue(map.keySet().contains("com.myteam.mymodule.mypackage")); verify(packagesLoadedCommand).execute(); }
Source:
<code>public void run() { try { wrapped.run(); } catch (Throwable t) { LOGGER.debug("Unhandled exception while watching query response runnable.", t); queryResponse .getProcessingDetails() <START> .add(new ProcessingDetailsImpl("unknown", new RuntimeException(t))); <END> queryResponse.closeResultQueue(); throw t; } }</code><technical_language>good create a custom subclass of RuntimeException for here, especially allow for code catches exception handle differently other RTExceptions</technical_language>

Target:
public void run() { try { wrapped.run(); } catch (Throwable t) { LOGGER.debug("Unhandled exception while watching query response runnable.", t); queryResponse .getProcessingDetails() .add( new ProcessingDetailsImpl( "unknown", new FederationException("Failed to apply federation strategy.", t))); queryResponse.closeResultQueue(); throw t; } }