auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void createContainerWithVolume() throws DockerException { Volume volume = new Volume("/var/log"); CreateContainerResponse container = dockerClient.createContainerCmd("busybox").withVolumes(volume) .withCmd("true").exec(); LOG.info("Created container {}", container.toString()); assertThat(container.getId(), not(isEmptyString())); InspectContainerResponse inspectContainerResponse = dockerClient.inspectContainerCmd(container.getId()).exec(); LOG.info("Inspect container {}", inspectContainerResponse.getConfig().getVolumes()); assertThat(inspectContainerResponse.getConfig().getVolumes().keySet(), contains("/var/log")); assertEquals(inspectContainerResponse.getMounts().get(0).getDestination(), volume); <START> assertEquals(inspectContainerResponse.getMounts().get(0).getMode(), AccessMode.rw); <END> assertTrue(inspectContainerResponse.getMounts().get(0).getRW()); }</code><technical_language>Sounds RW RO (upper case)</technical_language>

Target:
public void createContainerWithVolume() throws DockerException { Volume volume = new Volume("/var/log"); CreateContainerResponse container = dockerClient.createContainerCmd("busybox").withVolumes(volume) .withCmd("true").exec(); LOG.info("Created container {}", container.toString()); assertThat(container.getId(), not(isEmptyString())); InspectContainerResponse inspectContainerResponse = dockerClient.inspectContainerCmd(container.getId()).exec(); LOG.info("Inspect container {}", inspectContainerResponse.getConfig().getVolumes()); assertThat(inspectContainerResponse.getConfig().getVolumes().keySet(), contains("/var/log")); assertThat(inspectContainerResponse.getMounts().get(0).getDestination(), equalTo(volume)); assertThat(inspectContainerResponse.getMounts().get(0).getMode(), equalTo("")); assertThat(inspectContainerResponse.getMounts().get(0).getRW(), equalTo(true)); }
Source:
<code><START> private static double getVariance(java.util.List<Integer> numbers) { <END> double sum = 0; int size = numbers.size(); for (Integer number : numbers) { sum += number; } double average = sum / size; sum = 0; for (int number : numbers) { sum += Math.abs(number - average); } return sum / size; }</code><technical_language>This more average absolute deviation variance, please rename change implementation</technical_language>

Target:
private static double getVariance(java.util.List<Integer> numbers) { double sum = 0; int size = numbers.size(); for (Integer number : numbers) { sum += number; } double average = sum / size; sum = 0; for (int number : numbers) { sum += Math.pow(number - average, 2); } return sum / size; }
Source:
<code>public void start() { if(mLogFile == null) { try { StringBuilder sb = new StringBuilder(); sb.append(mLogDirectory); sb.append(File.separator); sb.append(TimeStamp.getTimeStamp("_")); sb.append("_"); <START> sb.append(StringUtils.replaceIllegalCharacters(mFileNameSuffix)); <END> mLogFileName = sb.toString(); mLog.info("Creating log file:" + mLogFileName); mLogFile = new OutputStreamWriter(new FileOutputStream(mLogFileName)); write(getHeader()); } catch(FileNotFoundException e) { mLog.error("Couldn't create log file in directory:" + mLogDirectory); } } }</code><technical_language>please move cleaning method ChannelProcessingManager:290 clean channel.getName() value. current approach path separators in linux converted underscores illegal filepath. /* Setup event logging */ List<Module> loggers = mEventLogManager.getLoggers(channel.getEventLogConfiguration(), StringUtils.replaceIllegalCharacters(channel.getName()));</technical_language>

Target:
public void start() { if(mLogFile == null) { try { StringBuilder sb = new StringBuilder(); sb.append(mLogDirectory); sb.append(File.separator); sb.append(TimeStamp.getTimeStamp("_")); sb.append("_"); sb.append(mFileNameSuffix); mLogFileName = sb.toString(); mLog.info("Creating log file:" + mLogFileName); mLogFile = new OutputStreamWriter(new FileOutputStream(mLogFileName)); write(getHeader()); } catch(FileNotFoundException e) { mLog.error("Couldn't create log file in directory:" + mLogDirectory); } } }
Source:
<code>public void commitManually(String committed, String rewriteFile) throws IOException { Path srcDir = outputCommitter.getCommittedTaskPath(context); Path src = new Path(srcDir, committed); Path dst = new Path(path, rewriteFile); FileSystem fs = src.getFileSystem(context.getConfiguration()); if (fs.exists(dst) && !fs.delete(dst, true)) { <START> throw new IOException("Could not delete " + dst); <END> } if (!fs.exists(src)) { FileStatus[] matches = fs.globStatus(new Path(src.getParent(), committed+"*")); if (matches.length == 1) src = matches[0].getPath(); else throw new IOException("Could not find committed file " + src); } if (!fs.rename(src, dst)) { throw new IOException("Could not rename " + src + " to " + dst); } fs.delete(srcDir, true); }</code><technical_language>for some reason resultFile committed ? end in this situation</technical_language>

Target:
public void commitManually(String committed, String rewriteFile) throws IOException { Path srcDir = outputCommitter.getCommittedTaskPath(context); Path src = new Path(srcDir, committed); Path dst = new Path(path, rewriteFile); FileSystem fs = src.getFileSystem(context.getConfiguration()); if (fs.exists(dst) && !fs.delete(dst, true)) { throw new IOException("Could not delete " + dst); } if (!fs.exists(src)) { FileStatus[] matches = fs.globStatus(new Path(src.getParent(), committed+"*")); if (matches != null && matches.length == 1) src = matches[0].getPath(); else throw new IOException("Could not find committed file " + src); } if (!fs.rename(src, dst)) { throw new IOException("Could not rename " + src + " to " + dst); } fs.delete(srcDir, true); }
Source:
<code>public void waitForPanelsToExpand() { By panelCollapseSelector = By.cssSelector(".panel-heading+.panel-collapse"); List<WebElement> webElements = browser.driver.findElements(panelCollapseSelector); for (WebElement element : webElements) { try { waitForElementVisibility(element); <START> } catch (org.openqa.selenium.StaleElementReferenceException e) { <END> } } }</code><technical_language>import StaleElementReferenceException fully qualified name</technical_language>

Target:
public void waitForPanelsToExpand() { By panelCollapseSelector = By.cssSelector(".panel-heading+.panel-collapse"); List<WebElement> webElements = browser.driver.findElements(panelCollapseSelector); for (WebElement element : webElements) { try { waitForElementVisibility(element); } catch (StaleElementReferenceException e) { } } }
Source:
<code>public LogoutSuccessHandler getLogoutSuccessHandler() { return (httpServletRequest, httpServletResponse, authentication) -> { if (authentication != null && authentication.getDetails() != null){ try { httpServletRequest.getSession().invalidate(); } catch (IllegalStateException e) { log.error("Attempted to log out of an already logged out session"); } } validateHostname(httpServletRequest); String logoutServiceUrl = Link.toSitelessHandler() .toPattern(requestMappingContextDictionary, LOGOUT_HANDLER_NAME, <START> ImmutableMap.of(), ImmutableMultimap.of(), ImmutableList.of()) <END> .get(httpServletRequest); httpServletResponse.setStatus(HttpServletResponse.SC_OK); httpServletResponse.sendRedirect(runtimeConfiguration.getCasConfiguration().getLogoutUrl() + "?service=" + URLEncoder.encode(logoutServiceUrl, Charsets.UTF_8.name())); }; }</code><technical_language>a convenience method here? of building links Java code. method do a check for presence of a "simple" url pattern -- i.e. Uri Template vars. a suggestion, nice</technical_language>

Target:
public LogoutSuccessHandler getLogoutSuccessHandler() { return (httpServletRequest, httpServletResponse, authentication) -> { if (authentication != null && authentication.getDetails() != null){ try { httpServletRequest.getSession().invalidate(); } catch (IllegalStateException e) { log.error("Attempted to log out of an already logged out session"); } } validateHostname(httpServletRequest); String logoutServiceUrl = Link.toSitelessHandler() .toPattern(requestMappingContextDictionary, LOGOUT_HANDLER_NAME).build() .get(httpServletRequest); httpServletResponse.setStatus(HttpServletResponse.SC_OK); httpServletResponse.sendRedirect(runtimeConfiguration.getCasConfiguration().getLogoutUrl() + "?service=" + URLEncoder.encode(logoutServiceUrl, Charsets.UTF_8.name())); }; }
Source:
<code>public ViewContainers(ThemeManager themeManager) { super("Containers", themeManager); this.sideBar = new ContainerSideBar(); this.availableContainers = MiniatureListWidget.create(MiniatureListWidget.Element::create, (element, event) -> showContainerDetails(element.getValue())); this.categories = FXCollections.observableArrayList(); this.sortedCategories = this.categories.sorted(Comparator.comparing(ContainerCategoryDTO::getName)); this.containers = new ExpandedList<ContainerDTO, ContainerCategoryDTO>(this.sortedCategories, ContainerCategoryDTO::getContainers); this.sortedContainers = this.containers.sorted(Comparator.comparing(ContainerDTO::getName)); this.sideBar.setOnApplyFilter(this::applyFilter); this.sideBar.bindCategories(this.sortedCategories); Bindings.bindContent(this.availableContainers.getItems(), this.sortedContainers); <START> this.sideBar.setOnCategorySelection(category -> { <END> showAvailableContainers(); }); this.sideBar.setOnAllCategorySelection(() -> { showAvailableContainers(); }); this.setSideBar(sideBar); }</code><technical_language>need { } here</technical_language>

Target:
public ViewContainers(ThemeManager themeManager) { super("Containers", themeManager); this.sideBar = new ContainerSideBar(); this.availableContainers = MiniatureListWidget.create(MiniatureListWidget.Element::create, (element, event) -> showContainerDetails(element.getValue())); this.categories = FXCollections.observableArrayList(); this.sortedCategories = this.categories.sorted(Comparator.comparing(ContainerCategoryDTO::getName)); this.containers = new ExpandedList<ContainerDTO, ContainerCategoryDTO>(this.sortedCategories, ContainerCategoryDTO::getContainers); this.sortedContainers = this.containers.sorted(Comparator.comparing(ContainerDTO::getName)); this.sideBar.setOnApplyFilter(this::applyFilter); this.sideBar.bindCategories(this.sortedCategories); Bindings.bindContent(this.availableContainers.getItems(), this.sortedContainers); this.sideBar.setOnCategorySelection(category -> showAvailableContainers()); this.sideBar.setOnAllCategorySelection(this::showAvailableContainers); this.setSideBar(sideBar); }
Source:
<code>private boolean hasBlacklistedWords(String tokenName) { boolean result = false; for (String blacklistedWord : blacklistedWords) { if (tokenName.contains(blacklistedWord)) { <START> result = true; <END> break; } } return result; }</code><technical_language>return true return false end of method</technical_language>

Target:
private boolean hasBlacklistedWords(String tokenName) { for (String blacklistedWord : blacklistedWords) { if (tokenName.contains(blacklistedWord)) { return true; } } return false; }
Source:
<code><START> public void shouldSetDefaultProjectIntoDevfileIfNotSpecified() throws Exception { <END> String githubUrl = "<LINK_1>"; FactoryDto computedFactory = generateDevfileFactory(); when(urlFactoryBuilder.createFactoryFromDevfile(any(RemoteFactoryUrl.class), any(), anyMap())) .thenReturn(Optional.of(computedFactory)); Map<String, String> params = ImmutableMap.of(URL_PARAMETER_NAME, githubUrl); FactoryDto factory = githubFactoryParametersResolver.createFactory(params); assertNotNull(factory.getDevfile()); SourceDto source = factory.getDevfile().getProjects().get(0).getSource(); assertEquals(source.getLocation(), githubUrl); assertEquals(source.getBranch(), "master"); }</code><technical_language>missing a test for setting branch URL generated project</technical_language>

Target:
public void shouldSetDefaultProjectIntoDevfileIfNotSpecified() throws Exception { String githubUrl = "<LINK_1>/tree/foobar"; FactoryDto computedFactory = generateDevfileFactory(); when(urlFactoryBuilder.createFactoryFromDevfile(any(RemoteFactoryUrl.class), any(), anyMap())) .thenReturn(Optional.of(computedFactory)); Map<String, String> params = ImmutableMap.of(URL_PARAMETER_NAME, githubUrl); FactoryDto factory = githubFactoryParametersResolver.createFactory(params); assertNotNull(factory.getDevfile()); SourceDto source = factory.getDevfile().getProjects().get(0).getSource(); assertEquals(source.getLocation(), "<LINK_0>"); assertEquals(source.getBranch(), "foobar"); }
Source:
<code>private boolean isNullOrConcurrentException( final Throwable throwable ) { if ( throwable == null ){ return true; <START> }else if(throwable.getCause() instanceof ConcurrentModificationException) { <END> return true; } return false; }</code><technical_language>try stay current code style: if (throwable == null) { ... } else if (...) { }</technical_language>

Target:
private boolean isNullOrConcurrentException(final Throwable throwable) { return throwable == null || throwable.getCause() instanceof ConcurrentModificationException; }
Source:
<code>public void run() { ImmutableTriple<List<TurboIssue>, String, Date> changes = repo.getUpdatedIssues(model.getRepoId(), model.getUpdateSignature().issuesETag, model.getUpdateSignature().lastCheckTime); List<PullRequest> updatedPullRequests = repo.getUpdatedPullRequests( <START> model.getRepoId(), "", model.getUpdateSignature().lastCheckTime); <END> List<TurboIssue> existing = model.getIssues(); List<TurboIssue> updatedIssues = changes.left; logger.info(HTLog.format(model.getRepoId(), "%s issue(s)) changed%s", updatedIssues.size(), updatedIssues.isEmpty() ? "" : ": " + updatedIssues)); logger.info(HTLog.format(model.getRepoId(), "%s pr(s)) changed%s", updatedPullRequests.size(), updatedPullRequests.isEmpty() ? "" : ": " + updatedPullRequests)); List<TurboIssue> updated = updatedIssues.isEmpty() ? existing : TurboIssue.reconcile(model.getRepoId(), existing, updatedIssues); updated = TurboIssue.combineWithPullRequests(updated, updatedPullRequests); response.complete(new Result<>(updated, changes.middle, changes.right)); }</code><technical_language>ETags for PRs all? is passed in here, PullRequestUpdateService.getUpdatedItems is overridden check them</technical_language>

Target:
public void run() { ImmutableTriple<List<TurboIssue>, String, Date> changes = repo.getUpdatedIssues(model.getRepoId(), model.getUpdateSignature().issuesETag, model.getUpdateSignature().lastCheckTime); List<PullRequest> updatedPullRequests = repo.getUpdatedPullRequests( model.getRepoId(), model.getUpdateSignature().lastCheckTime); List<TurboIssue> existing = model.getIssues(); List<TurboIssue> updatedIssues = changes.left; logger.info(HTLog.format(model.getRepoId(), "%s issue(s)) changed%s", updatedIssues.size(), updatedIssues.isEmpty() ? "" : ": " + updatedIssues)); logger.info(HTLog.format(model.getRepoId(), "%s pr(s)) changed%s", updatedPullRequests.size(), updatedPullRequests.isEmpty() ? "" : ": " + updatedPullRequests)); List<TurboIssue> updated = updatedIssues.isEmpty() ? existing : TurboIssue.reconcile(model.getRepoId(), existing, updatedIssues); updated = TurboIssue.combineWithPullRequests(updated, updatedPullRequests); response.complete(new Result<>(updated, changes.middle, changes.right)); }
Source:
<code><START> private boolean isSurveyFragmentActive() { <END> Fragment currentFragment = this.getFragmentManager ().findFragmentById(R.id.dashboard_details_container); if (currentFragment instanceof SurveyFragment) { return true; } return false; }</code><technical_language>@idelcano is isDashboardUnsentFragmentActive method used</technical_language>

Target:
private boolean isSurveyFragmentActive() { return isFragmentActive(surveyFragment, R.id.dashboard_details_container); }
Source:
<code>public void postProcess() { uniqueID = UUID.randomUUID().toString(); if (hasMissingAttributes()) { int failuresCount = 0; int errorsCount = 0; Double totalTime = 0.0; for (TestSuiteModel suite : testsuite) { if (suite.getOverallStatus().equals(Constants.FAILED)) { failuresCount++; } else if (suite.getOverallStatus().equals(Constants.ERRORED)) { errorsCount++; } totalTime += Double.parseDouble(suite.getTime()); } if (failures == null) failures = Integer.toString(failuresCount); if (tests == null) tests = Integer.toString(testsuite.size()); if (time == null) time = Double.toString(totalTime); <START> if (errors == null) errors = Integer.toString(errorsCount); <END> } if (Integer.parseInt(failures) > 0 || Integer.parseInt(errors) > 0) { overallStatus = Constants.FAILED; } else { overallStatus = Constants.PASSED; } }</code><technical_language>i is mandatory brackets for single line statement, please add a new row, line, point of view more readable</technical_language>

Target:
public void postProcess() { uniqueID = UUID.randomUUID().toString(); if (hasMissingAttributes()) { int failuresCount = 0; int errorsCount = 0; Double totalTime = 0.0; for (TestSuiteModel suite : testsuite) { if (suite.getOverallStatus().equals(Constants.FAILED)) { failuresCount++; } else if (suite.getOverallStatus().equals(Constants.ERRORED)) { errorsCount++; } totalTime += Double.parseDouble(suite.getTime()); } if (failures == null) { failures = Integer.toString(failuresCount); } if (tests == null) { tests = Integer.toString(testsuite.size()); } if (time == null) { time = Double.toString(totalTime); } if (errors == null) { errors = Integer.toString(errorsCount); } } if (Integer.parseInt(failures) > 0 || Integer.parseInt(errors) > 0) { overallStatus = Constants.FAILED; } else { overallStatus = Constants.PASSED; } }
Source:
<code>private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException { List<Class> classes = new ArrayList<>(); if (!directory.exists()) { return classes; } File[] files = directory.listFiles(); for (File file : files) { <START> if (file.isDirectory()) { <END> assert !file.getName().contains("."); classes.addAll(findClasses(file, packageName + "." + file.getName())); } else if (file.getName().endsWith(".class")) { classes.add(Class.forName(packageName + "." + file.getName().substring(0, file.getName().length() - 6))); } } return classes; }</code><technical_language>need recurse for case</technical_language>

Target:
private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException { List<Class> classes = new ArrayList<>(); if (!directory.exists()) { return classes; } File[] files = directory.listFiles(); for (File file : files) { if (file.getName().endsWith(".class")) { classes.add(Class.forName(packageName + "." + file.getName().substring(0, file.getName().length() - ".class".length()))); } } return classes; }
Source:
<code>private void updatePartitioning(VoltTable vt) { <START> List<Integer> ketSet = new ArrayList<Integer>(); <END> while (vt.advanceRow()) { if (vt.getColumnCount() == 2) { Integer key = (int)(vt.getLong("PARTITION_KEY")); ketSet.add(key); } } m_partitionKeys.set(ImmutableSet.copyOf(ketSet)); }</code><technical_language>is ketSet a typo? keySet? I missing ket is</technical_language>

Target:
private void updatePartitioning(VoltTable vt) { List<Integer> keySet = new ArrayList<Integer>(); while (vt.advanceRow()) { if (vt.getColumnCount() == 2) { Integer key = (int)(vt.getLong("PARTITION_KEY")); keySet.add(key); } } m_partitionKeys.set(ImmutableSet.copyOf(keySet)); }
Source:
<code>public void catchThrowableOfType_should_succeed_and_return_actual_instance_with_correct_class() { final Exception expected = new RuntimeException("boom!!"); Exception actual = null; try { actual = catchThrowableOfType(raisingException(expected), Exception.class); } catch (AssertionError a) { <START> Fail.fail("catchThrowableOfType should not have asserted", a); <END> } assertThat(actual).isSameAs(expected); }</code><technical_language>static import fail</technical_language>

Target:
public void catchThrowableOfType_should_succeed_and_return_actual_instance_with_correct_class() { final Exception expected = new RuntimeException("boom!!"); Exception actual = null; try { actual = catchThrowableOfType(raisingException(expected), Exception.class); } catch (AssertionError a) { fail("catchThrowableOfType should not have asserted", a); } assertThat(actual).isSameAs(expected); }
Source:
<code>public List<Attribute> getAttributes(String entryPath, boolean isDirectory) { if (rules.isEmpty()) return Collections.emptyList(); <START> for (int i = rules.size() - 1; i > -1; i--) { <END> AttributesRule rule = rules.get(i); if (rule.isMatch(entryPath, isDirectory)) { return rule.getAttributes(); } } return Collections.emptyList(); }</code><technical_language>nit: i prefer i >= 0 for reverse iteration loops</technical_language>

Target:
public List<Attribute> getAttributes(String entryPath, boolean isDirectory) { if (rules.isEmpty()) return Collections.emptyList(); for (int i = rules.size() - 1; i >= 0; i--) { AttributesRule rule = rules.get(i); if (rule.isMatch(entryPath, isDirectory)) return rule.getAttributes(); } return Collections.emptyList(); }
Source:
<code>public TaskPlatform localTaskPlatform(LocalPlatformProperties localPlatformProperties) { List<Launcher> launchers = new ArrayList<>(); Map<String, LocalDeployerProperties> localDeployerPropertiesMap = localPlatformProperties.getAccounts(); for (Map.Entry<String, LocalDeployerProperties> entry : localDeployerPropertiesMap .entrySet()) { LocalDeployerProperties localDeployerProperties = entry.getValue(); <START> validateLauncherMaximumConcurrentTasks(entry.getKey(),"Local", <END> localDeployerProperties.getMaximumConcurrentTasks(), localPlatformProperties.getMaximumConcurrentTasks()); LocalTaskLauncher localTaskLauncher = new LocalTaskLauncher(localDeployerProperties); Launcher launcher = new Launcher(entry.getKey(), "local", localTaskLauncher); launcher.setDescription(prettyPrintLocalDeployerProperties(entry.getValue())); launchers.add(launcher); } return new TaskPlatform("Local", launchers); }</code><technical_language>validating in dataflow local deployer</technical_language>

Target:
public TaskPlatform localTaskPlatform(LocalPlatformProperties localPlatformProperties) { List<Launcher> launchers = new ArrayList<>(); Map<String, LocalDeployerProperties> localDeployerPropertiesMap = localPlatformProperties.getAccounts(); for (Map.Entry<String, LocalDeployerProperties> entry : localDeployerPropertiesMap .entrySet()) { LocalDeployerProperties localDeployerProperties = entry.getValue(); LocalTaskLauncher localTaskLauncher = new LocalTaskLauncher(localDeployerProperties); Launcher launcher = new Launcher(entry.getKey(), "local", localTaskLauncher); launcher.setDescription(prettyPrintLocalDeployerProperties(entry.getValue())); launchers.add(launcher); } return new TaskPlatform("Local", launchers); }
Source:
<code><START> public SagaConfigurer<T> listenerInvocationHandler( <END> Function<Configuration, ListenerInvocationErrorHandler> listenerInvocationErrorHandlerBuilder) { assertNonNull(listenerInvocationErrorHandlerBuilder, "Listener invocation error handler builder is not allowed to be null"); this.listenerInvocationErrorHandlerBuilder = listenerInvocationErrorHandlerBuilder; return this; }</code><technical_language>Check method name. listenerInvocationErrorHandler</technical_language>

Target:
public SagaConfigurer<T> listenerInvocationHandler( Function<Configuration, ListenerInvocationErrorHandler> listenerInvocationErrorHandlerBuilder) { assertNonNull(listenerInvocationErrorHandlerBuilder, "ListenerInvocationErrorHandler builder is not allowed to be null"); this.listenerInvocationErrorHandlerBuilder = listenerInvocationErrorHandlerBuilder; return this; }
Source:
<code>public void validate() throws JobConfigValidationException { super.validate(); try { final JobArguments arguments = this.getJobArguments(); final String ownerKey = arguments.getAsString(OWNER_KEY); final Boolean create = arguments.getAsBoolean(CREATE); final String data = arguments.getAsString(DATA); if (ownerKey == null || ownerKey.isEmpty()) { <START> final String errmsg = "consumer has not been set, or the provided consumer lacks a UUID"; <END> throw new JobConfigValidationException(errmsg); } if (create == null) { final String errmsg = "create flag has not been set!"; throw new JobConfigValidationException(errmsg); } if (data == null || data.isEmpty()) { final String errmsg = "hypervisor data has not been set!"; throw new JobConfigValidationException(errmsg); } } catch (ArgumentConversionException e) { final String errmsg = "One or more required arguments are of the wrong type"; throw new JobConfigValidationException(errmsg, e); } }</code><technical_language>error message match (should owner, consumer)</technical_language>

Target:
public void validate() throws JobConfigValidationException { super.validate(); try { final JobArguments arguments = this.getJobArguments(); final String ownerKey = arguments.getAsString(OWNER_KEY); final Boolean create = arguments.getAsBoolean(CREATE); final String data = arguments.getAsString(DATA); if (ownerKey == null || ownerKey.isEmpty()) { final String errmsg = "owner has not been set!"; throw new JobConfigValidationException(errmsg); } if (create == null) { final String errmsg = "create flag has not been set!"; throw new JobConfigValidationException(errmsg); } if (data == null || data.isEmpty()) { final String errmsg = "hypervisor data has not been set!"; throw new JobConfigValidationException(errmsg); } } catch (ArgumentConversionException e) { final String errmsg = "One or more required arguments are of the wrong type"; throw new JobConfigValidationException(errmsg, e); } }
Source:
<code>private static void toStringBuilder(Map<String, ?> map, StringBuilder builder) { <START> if (map.isEmpty()) { builder.append("{}"); return; } <END> builder.append("{"); Iterator<? extends Map.Entry<String, ?>> iterator = map.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<String, ?> entry = iterator.next(); builder.append(String.format("%1$s=", entry.getKey())); toStringBuilder(entry.getValue(), builder); if (iterator.hasNext()) { builder.append(", "); } } builder.append("}"); }</code><technical_language>need this special case</technical_language>

Target:
private static void toStringBuilder(Map<String, ?> map, StringBuilder builder) { builder.append("{"); Iterator<? extends Map.Entry<String, ?>> iterator = map.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<String, ?> entry = iterator.next(); builder.append(String.format("%1$s=", entry.getKey())); toStringBuilder(entry.getValue(), builder); if (iterator.hasNext()) { builder.append(", "); } } builder.append("}"); }
Source:
<code>public static boolean isInitialAckDRId(long drId) { if (drId == -1) return true; int clusterId = getClusterIdFromDRId(drId); <START> if (clusterId >= 0 && clusterId < MAX_CLUSTER_ID) { <END> return !((drId >>> 63) == 1L) && (getSequenceNumberFromDRId(drId) == MAX_SEQUENCE_NUMBER); } return false; }</code><technical_language>condition clusterId <= MAX_CLUSTER_ID</technical_language>

Target:
public static boolean isInitialAckDRId(long drId) { if (drId == -1) return true; int clusterId = getClusterIdFromDRId(drId); if (clusterId >= 0 && clusterId <= MAX_CLUSTER_ID) { return ((drId >>> 63) != 1L) && (getSequenceNumberFromDRId(drId) == MAX_SEQUENCE_NUMBER); } return false; }
Source:
<code>public SearchResponse search(IssueQuery query, SearchOptions options) { SearchRequestBuilder requestBuilder = client.prepareSearch(INDEX_TYPE_ISSUE); configureSorting(query, requestBuilder); configurePagination(options, requestBuilder); configureRouting(query, options, requestBuilder); QueryBuilder esQuery = matchAllQuery(); BoolQueryBuilder esFilter = boolQuery(); Map<String, QueryBuilder> filters = createFilters(query); for (QueryBuilder filter : filters.values()) { if (filter != null) { esFilter.must(filter); } } if (esFilter.hasClauses()) { requestBuilder.setQuery(boolQuery().must(esQuery).filter(esFilter)); } else { requestBuilder.setQuery(esQuery); } configureStickyFacets(query, options, filters, esQuery, requestBuilder); requestBuilder.setFetchSource(false); <START> System.out.println(requestBuilder.internalBuilder()); <END> return requestBuilder.get(); }</code><technical_language>![MAJOR](<LINK_0> 'Severity: MAJOR') Replace this of System.out System.err a logger. [![rule](<LINK_1>](<LINK_2></technical_language>

Target:
public SearchResponse search(IssueQuery query, SearchOptions options) { SearchRequestBuilder requestBuilder = client.prepareSearch(INDEX_TYPE_ISSUE); configureSorting(query, requestBuilder); configurePagination(options, requestBuilder); configureRouting(query, options, requestBuilder); QueryBuilder esQuery = matchAllQuery(); BoolQueryBuilder esFilter = boolQuery(); Map<String, QueryBuilder> filters = createFilters(query); for (QueryBuilder filter : filters.values()) { if (filter != null) { esFilter.must(filter); } } if (esFilter.hasClauses()) { requestBuilder.setQuery(boolQuery().must(esQuery).filter(esFilter)); } else { requestBuilder.setQuery(esQuery); } configureStickyFacets(query, options, filters, esQuery, requestBuilder); requestBuilder.setFetchSource(false); return requestBuilder.get(); }
Source:
<code>private String getTextValue(Element element, String tagName) { <START> NodeList hostName = element.getElementsByTagName(tagName); <END> Element hostNameElement = (Element) hostName.item(0); NodeList hostNameNode = hostNameElement.getChildNodes(); return hostNameNode.item(0).getNodeValue().trim(); }</code><technical_language>While method a generic fetching of a tag, variable "hostName" sounds specific, if tagName HOST_NAME. change method prototype a tagName argument all, change variable name more generic, "nodes"</technical_language>

Target:
private String getTextValue(Element element, String tagName) { NodeList nodes = element.getElementsByTagName(tagName); Element nodeElement = (Element) nodes.item(0); NodeList nodeList = nodeElement.getChildNodes(); return nodeList.item(0).getNodeValue().trim(); }
Source:
<code>protected AbstractNexusMojo() { getLog().warn( "" ); getLog().warn( "DEPRECATION WARNING" ); getLog().warn( "===================" ); <START> getLog().warn( "This whole plugin has been deprecated, and is replaced with set of new Maven Plugins." ); <END> getLog().warn( "Please update your build, and stop using this plugin altogether,"); getLog().warn( "as this plugin is about to be dropped in near future." ); getLog().warn( "" ); }</code><technical_language>"This plugin deprecated in favor of a new set of Maven Plugins."</technical_language>

Target:
protected AbstractNexusMojo() { getLog().warn( "" ); getLog().warn( "DEPRECATION WARNING" ); getLog().warn( "===================" ); getLog().warn( "This whole plugin has been deprecated in favor of a new set of Maven Plugins." ); getLog().warn( "Please update your build, and stop using this plugin altogether,"); getLog().warn( "as this plugin is about to be dropped in near future." ); getLog().warn( "" ); }
Source:
<code>private void checkClassField(DetailAST objBlockToken) { for (DetailAST ast = objBlockToken.getFirstChild(); ast != null; ast = ast.getNextSibling()) { if (TokenTypes.VARIABLE_DEF != ast.getType()) { continue; } final DetailAST modifiersToken = ast.findFirstToken(TokenTypes.MODIFIERS); if (!modifiersToken.branchContains(TokenTypes.FINAL)) { <START> log(modifiersToken, String.format("The variable field ''%s'' of @ServiceClient should be final. The class annotated with @ServiceClient supposed to be immutable.", <END> ast.findFirstToken(TokenTypes.IDENT).getText())); } } }</code><technical_language>@ServiceClient, able state class name? Also, small wording suggestion: suggestion log(modifiersToken, String.format("The variable field ''%s'' of @ServiceClient final. Classes annotated @ServiceClient supposed immutable.",</technical_language>

Target:
private void checkClassField(DetailAST objBlockToken) { for (DetailAST ast = objBlockToken.getFirstChild(); ast != null; ast = ast.getNextSibling()) { if (TokenTypes.VARIABLE_DEF != ast.getType()) { continue; } final DetailAST modifiersToken = ast.findFirstToken(TokenTypes.MODIFIERS); if (!modifiersToken.branchContains(TokenTypes.FINAL)) { log(modifiersToken, String.format("The variable field ''%s'' of class ''%s'' should be final. Classes annotated with @ServiceClient are supposed to be immutable.", ast.findFirstToken(TokenTypes.IDENT).getText(), objBlockToken.getPreviousSibling().getText())); } } }
Source:
<code>private void react_main_region_A() { if (check_main_region_A_tr0_tr0()) { effect_main_region_A_tr0(); } else { if (check_main_region_A_tr1_tr1()) { effect_main_region_A_tr1(); } else { if (check_main_region_A_tr2_tr2()) { effect_main_region_A_tr2(); } else { if (check_main_region_A_tr3_tr3()) { effect_main_region_A_tr3(); <START> } else { <END> } } } } }</code><technical_language>empty elses generated (at in Java)</technical_language>

Target:
private void react_main_region_A() { if (check_main_region_A_tr0_tr0()) { effect_main_region_A_tr0(); } else { if (check_main_region_A_tr1_tr1()) { effect_main_region_A_tr1(); } else { if (check_main_region_A_tr2_tr2()) { effect_main_region_A_tr2(); } else { if (check_main_region_A_tr3_tr3()) { effect_main_region_A_tr3(); } } } } }
Source:
<code>public void checkUpdateCenter(ConnectionCheckJob job, String updateCenterUrl) throws IOException { if (updateCenterUrl.startsWith("http://") || updateCenterUrl.startsWith("https://")) { <START> testConnection(new URL(updateCenterUrl + (updateCenterUrl.indexOf('?') == -1 ? "?uctest" : "&uctest"))); <END> } else { testConnection(new URL(updateCenterUrl)); } }</code><technical_language>ant: String.contains</technical_language>

Target:
public void checkUpdateCenter(ConnectionCheckJob job, String updateCenterUrl) throws IOException { testConnection(toUpdateCenterCheckUrl(updateCenterUrl)); }
Source:
<code>public final synchronized ILogData nextUpTo(final long maxGlobal) { if (getCurrentContext().getGlobalPointer() > maxGlobal) { return null; } if (getCurrentContext().getGlobalPointer() >= getCurrentContext().maxGlobalAddress) { final T last = streamContexts.pollFirst(); log.trace("Completed context {}@{}, removing.", last.id, last.maxGlobalAddress); } <START> ILogData entry = streamReadWithCheck(() -> getNextEntry(getCurrentContext(), maxGlobal), maxGlobal); <END> if (entry != null) { updatePointer(entry); if (processEntryForContext(entry)) { return nextUpTo(maxGlobal); } } return entry; }</code><technical_language>if rolling back, i.e., resolved in for "compacted addresses" is in cache (undo records snapshot).. do abort (throw trimmedExceptions?) of this</technical_language>

Target:
public final synchronized ILogData nextUpTo(final long maxGlobal) { if (getCurrentContext().getGlobalPointer() > maxGlobal) { return null; } if (getCurrentContext().getGlobalPointer() >= getCurrentContext().maxGlobalAddress) { final T last = streamContexts.pollFirst(); log.trace("Completed context {}@{}, removing.", last.id, last.maxGlobalAddress); } ILogData entry = getNextEntry(getCurrentContext(), maxGlobal); if (entry != null) { updatePointer(entry); if (processEntryForContext(entry)) { return nextUpTo(maxGlobal); } } return entry; }
Source:
<code>public BoxCreateAuthRequest setRefreshExpiresAt(long expiresAt) { <START> mBodyMap.put("box_refresh_token_expires_at", Long.toString(expiresAt)); <END> return this; }</code><technical_language>move strings constants</technical_language>

Target:
public BoxCreateAuthRequest setRefreshExpiresAt(long expiresAt) { mBodyMap.put(BoxConstants.KEY_BOX_REFRESH_TOKEN_EXPIRES_AT, Long.toString(expiresAt)); return this; }
Source:
<code>public static DependencyQueueTaskDispatcher getInstance() { ExtensionList<DependencyQueueTaskDispatcher> dispatchers = Jenkins.getInstance().getExtensionList(DependencyQueueTaskDispatcher.class); <START> if (dispatchers == null) { <END> return null; } return dispatchers.get(0); }</code><technical_language>I guess list empty causing indexoutofbounds line 110. adding " || dispatchers.isEmpty()" safer</technical_language>

Target:
public static DependencyQueueTaskDispatcher getInstance() { ExtensionList<DependencyQueueTaskDispatcher> dispatchers = Jenkins.getInstance().getExtensionList(DependencyQueueTaskDispatcher.class); if (dispatchers == null || dispatchers.isEmpty()) { return null; } return dispatchers.get(0); }
Source:
<code>public static Flux<ByteBuffer> toFluxByteBuffer(InputStream inputStream, int chunkSize) { <START> if (chunkSize <= 0) { throw new IllegalArgumentException("'chunkSize' must be greater than 0."); } <END> if (inputStream == null) { return Flux.empty(); } return Flux.<ByteBuffer, InputStream>generate(() -> inputStream, (stream, sink) -> { byte[] buffer = new byte[chunkSize]; try { int offset = 0; while (offset < chunkSize) { int readCount = inputStream.read(buffer, offset, chunkSize - offset); if (readCount == -1) { if (offset > 0) { sink.next(ByteBuffer.wrap(buffer, 0, offset)); } sink.complete(); return stream; } offset += readCount; } sink.next(ByteBuffer.wrap(buffer)); } catch (IOException ex) { sink.error(ex); } return stream; }).filter(ByteBuffer::hasRemaining); }</code><technical_language>A method returning a reactive publisher throw exceptions. chaining of reactive operators difficult caller handle errors in 2 ways. Return Flux.error() instead</technical_language>

Target:
public static Flux<ByteBuffer> toFluxByteBuffer(InputStream inputStream, int chunkSize) { if (chunkSize <= 0) { return Flux.error(new IllegalArgumentException("'chunkSize' must be greater than 0.")); } if (inputStream == null) { return Flux.empty(); } return Flux.<ByteBuffer, InputStream>generate(() -> inputStream, (stream, sink) -> { byte[] buffer = new byte[chunkSize]; try { int offset = 0; while (offset < chunkSize) { int readCount = inputStream.read(buffer, offset, chunkSize - offset); if (readCount == -1) { if (offset > 0) { sink.next(ByteBuffer.wrap(buffer, 0, offset)); } sink.complete(); return stream; } offset += readCount; } sink.next(ByteBuffer.wrap(buffer)); } catch (IOException ex) { sink.error(ex); } return stream; }).filter(ByteBuffer::hasRemaining); }
Source:
<code>public boolean removeEdge(final V v1, final V v2) { final Map<V, I> adjEdges = getEdges(v1); if (adjEdges == null) { throw new NoSuchElementException("No src vertex " + v1); } if (adjEdges.remove(v2) != null) { final int inDegree = inDegrees.get(v2); inDegrees.put(v2, inDegree - 1); if (inDegree == 1) { rootVertices.add(v2); <START> } <END> return true; } else { LOG.log(Level.WARNING, "The edge from {0} to {1} does not exists", new Object[]{v1, v2}); return false; } }</code><technical_language>code lines race condition</technical_language>

Target:
public boolean removeEdge(final V v1, final V v2) { final Map<V, I> adjEdges = getEdges(v1); if (adjEdges == null) { throw new NoSuchElementException("No src vertex " + v1); } if (adjEdges.remove(v2) != null) { numEdges -= 1; final int inDegree = inDegrees.get(v2); inDegrees.put(v2, inDegree - 1); return true; } else { LOG.log(Level.WARNING, "The edge from {0} to {1} does not exists", new Object[]{v1, v2}); return false; } }
Source:
<code>private static Map<Class<?>, DataType> classToDataType(Map<Class<?>, Class<?>> primitiveWrappers) { <START> Map<Class<?>, DataType> dataTypesByJavaClass = new HashMap<Class<?>, DataType>(16); <END> for (DataType dataType : DataType.allPrimitiveTypes()) { Class<?> javaClass = dataType.asJavaClass(); dataTypesByJavaClass.put(javaClass, dataType); Class<?> primitiveJavaClass = primitiveWrappers.get(javaClass); if (primitiveJavaClass != null) { dataTypesByJavaClass.put(primitiveJavaClass, dataType); } } dataTypesByJavaClass.put(String.class, DataType.text()); return dataTypesByJavaClass; }</code><technical_language>classToDataType</technical_language>

Target:
private static Map<Class<?>, DataType> classToDataType(Map<Class<?>, Class<?>> primitiveWrappers) { Map<Class<?>, DataType> classToDataType = new HashMap<Class<?>, DataType>(16); for (DataType dataType : DataType.allPrimitiveTypes()) { Class<?> javaClass = dataType.asJavaClass(); classToDataType.put(javaClass, dataType); Class<?> primitiveJavaClass = primitiveWrappers.get(javaClass); if (primitiveJavaClass != null) { classToDataType.put(primitiveJavaClass, dataType); } } classToDataType.put(String.class, DataType.text()); return classToDataType; }
Source:
<code>public SettingsPanel(SettingsPanelForm form, BriefcasePreferences appPreferences, Analytics analytics, FormCache formCache) { this.form = form; appPreferences.getBriefcaseDir().ifPresent(path -> form.setStorageLocation(path.getParent())); appPreferences.getPullInParallel().ifPresent(form::setPullInParallel); appPreferences.getRememberPasswords().ifPresent(form::setRememberPasswords); appPreferences.getSendUsageData().ifPresent(form::setSendUsageData); appPreferences.getHttpProxy().ifPresent(httpProxy -> { form.enableUseHttpProxy(); form.setHttpProxy(httpProxy); form.updateHttpProxyFields(); }); form.onStorageLocation(path -> { Path briefcaseDir = BriefcasePreferences.buildBriefcaseDir(path); UncheckedFiles.createBriefcaseDir(briefcaseDir); formCache.setLocation(briefcaseDir); formCache.update(); appPreferences.setStorageDir(path); }, () -> { formCache.unsetLocation(); formCache.update(); appPreferences.unsetStorageDir(); }); form.onPullInParallelChange(appPreferences::setPullInParallel); form.onRememberPasswordsChange(appPreferences::setRememberPasswords); form.onSendUsageDataChange(enabled -> { appPreferences.setSendUsage(enabled); analytics.enableTracking(enabled, false); }); form.onHttpProxy(appPreferences::setHttpProxy, appPreferences::unsetHttpProxy); form.onReloadCache(() -> { formCache.update(); <START> JOptionPane.showMessageDialog(getContainer(), "The form cache has been successfully reloaded"); <END> }); }</code><technical_language>I prefer rebuilt reloaded</technical_language>

Target:
public SettingsPanel(SettingsPanelForm form, BriefcasePreferences appPreferences, Analytics analytics, FormCache formCache) { this.form = form; appPreferences.getBriefcaseDir().ifPresent(path -> form.setStorageLocation(path.getParent())); appPreferences.getPullInParallel().ifPresent(form::setPullInParallel); appPreferences.getRememberPasswords().ifPresent(form::setRememberPasswords); appPreferences.getSendUsageData().ifPresent(form::setSendUsageData); appPreferences.getHttpProxy().ifPresent(httpProxy -> { form.enableUseHttpProxy(); form.setHttpProxy(httpProxy); form.updateHttpProxyFields(); }); form.onStorageLocation(path -> { Path briefcaseDir = BriefcasePreferences.buildBriefcaseDir(path); UncheckedFiles.createBriefcaseDir(briefcaseDir); formCache.setLocation(briefcaseDir); formCache.update(); appPreferences.setStorageDir(path); }, () -> { formCache.unsetLocation(); formCache.update(); appPreferences.unsetStorageDir(); }); form.onPullInParallelChange(appPreferences::setPullInParallel); form.onRememberPasswordsChange(appPreferences::setRememberPasswords); form.onSendUsageDataChange(enabled -> { appPreferences.setSendUsage(enabled); analytics.enableTracking(enabled, false); }); form.onHttpProxy(appPreferences::setHttpProxy, appPreferences::unsetHttpProxy); form.onReloadCache(() -> { formCache.update(); JOptionPane.showMessageDialog(getContainer(), "Forms successfully reloaded from storage location."); }); }
Source:
<code>public String exportTopology(Topology topology) throws Exception { Preconditions.checkNotNull(topology); <START> TopologyReprBuilder topologyBuilder = new TopologyReprBuilder(); <END> TopologyExportVisitor exportVisitor = new TopologyExportVisitor(topologyBuilder, this); topologyBuilder.setName(topology.getName()); topologyBuilder.setConfig(topology.getConfig()); TopologyDag topologyDag = topology.getTopologyDag(); if (topologyDag != null) { topologyDag.traverse(exportVisitor); } topologyBuilder.setMetadata(getTopologyEditorMetadata(topology.getId())); ObjectMapper mapper = new ObjectMapper(); return mapper.writeValueAsString(topologyBuilder); }</code><technical_language>TopologyData a name, this is a wrapper for holding topology entities, building topology</technical_language>

Target:
public String exportTopology(Topology topology) throws Exception { Preconditions.checkNotNull(topology); TopologyData topologyData = new TopologyData(); TopologyExportVisitor exportVisitor = new TopologyExportVisitor(topology.getId(), topologyData, this); topologyData.setName(topology.getName()); topologyData.setConfig(topology.getConfig()); TopologyDag topologyDag = topology.getTopologyDag(); if (topologyDag != null) { topologyDag.traverse(exportVisitor); } topologyData.setMetadata(getTopologyEditorMetadata(topology.getId())); ObjectMapper mapper = new ObjectMapper(); return mapper.writeValueAsString(topologyData); }
Source:
<code>private String decryptData() { String result = ""; try { String key = "HubTurboHubTurbo"; Key aesKey = new SecretKeySpec(key.getBytes(), "AES"); Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.DECRYPT_MODE, aesKey); result = new String(cipher.doFinal(lastLoginEncrypted)); }catch(Exception e) { e.printStackTrace(); <START> } <END> return result; }</code><technical_language>Catching Exception is bad lets other exception type slip through. a bit verbose in this case I feel more explicit is better. Also, log error instead of printing stack trace. Applicable methods</technical_language>

Target:
private String decryptData() { String result = ""; try { String key = "HubTurboHubTurbo"; Key aesKey = new SecretKeySpec(key.getBytes(), "AES"); Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.DECRYPT_MODE, aesKey); result = new String(cipher.doFinal(lastLoginEncrypted)); } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | IllegalBlockSizeException | BadPaddingException e) { logger.error("Cannot encrypt data " + e.getMessage(), e); } return result; }
Source:
<code>public void schedule(ScheduledExecutorService exec) { log.info("Scheduling TaskLogAutoCleaner with config [%s].", config.toString()); ScheduledExecutors.scheduleWithFixedDelay( exec, Duration.millis(config.getInitialDelay()), Duration.millis(config.getDelay()), new Runnable() { @Override public void run() { try { taskLogKiller.killOlderThan(System.currentTimeMillis() - config.getDurationToRetain()); <START> taskStorage.removeTasksBefore(DateTimes.nowUtc().minus(config.getDurationToRetain())); <END> } catch (Exception ex) { log.error(ex, "Failed to clean-up the task logs"); } } } ); }</code><technical_language>same, change taskStorage.removeTasksOlderThan(System.currentTimeMillis() - config.getDurationToRetain())) for consistency</technical_language>

Target:
public void schedule(ScheduledExecutorService exec) { log.info("Scheduling TaskLogAutoCleaner with config [%s].", config.toString()); ScheduledExecutors.scheduleWithFixedDelay( exec, Duration.millis(config.getInitialDelay()), Duration.millis(config.getDelay()), new Runnable() { @Override public void run() { try { long timestamp = System.currentTimeMillis() - config.getDurationToRetain(); taskLogKiller.killOlderThan(timestamp); taskStorage.removeTasksOlderThan(timestamp); } catch (Exception ex) { log.error(ex, "Failed to clean-up the task logs"); } } } ); }
Source:
<code><START> private WTab addTab(final WTab tab) { <END> super.add(tab); return tab; }</code><technical_language>Constructor for WTab is protected, addTab method protected well, allow class extended. do think</technical_language>

Target:
protected WTab addTab(final WTab tab) { super.add(tab); return tab; }
Source:
<code>public IndexConfig setBitmapIndexOptions(BitmapIndexOptions bitmapIndexOptions) { <START> this.bitmapIndexOptions.setUniqueKey(bitmapIndexOptions.getUniqueKey()); <END> this.bitmapIndexOptions.setUniqueKeyTransformation(bitmapIndexOptions.getUniqueKeyTransformation()); return this; }</code><technical_language>lines dangerous mutate object set earlier. Consider code: IndexConfig config = new IndexConfig(); BitmapIndexOptions options = config1.getBitmapIndexOptions(); // ... config.setBitmapIndexOptions(<new options>); // "options" object changed unexpectedly I overwrite object in setter perform a lazy initialization in getter do in other config classes (e.g. IndexConfig.getAttributes() copies this approach)</technical_language>

Target:
public IndexConfig setBitmapIndexOptions(BitmapIndexOptions bitmapIndexOptions) { this.bitmapIndexOptions = bitmapIndexOptions == null ? null : new BitmapIndexOptions(bitmapIndexOptions); return this; }