auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void canDeserializeTimeLockServerConfiguration() throws IOException { File testConfigFile = new File( <START> PaxosConfigDeserializationTest.class.getResource(getConfigFileName()).getPath()); <END> TimeLockServerConfiguration configuration = OBJECT_MAPPER.readValue(testConfigFile, TimeLockServerConfiguration.class); assertThat(configuration.cluster().localServer()).isEqualTo("localhost:8080"); assertThat(configuration.cluster().servers()).containsExactlyInAnyOrder( "localhost:8080", "localhost:8081", "localhost:8082"); assertThat(configuration.clients()).containsExactlyInAnyOrder("test", "test2", "test3", "acceptor", "learner"); assertAlgorithmConfigurationCorrect(configuration.algorithm()); assertThat(configuration.useClientRequestLimit()).isTrue(); assertThat(configuration.timeLimiterConfiguration().enableTimeLimiting()).isTrue(); assertThat(configuration.timeLimiterConfiguration().blockingTimeoutErrorMargin()).isEqualTo(0.03); assertThat(configuration.asyncLockConfiguration().useAsyncLockService()).isTrue(); assertThat(configuration.asyncLockConfiguration().disableLegacySafetyChecksWarningPotentialDataCorruption()) .isFalse(); }</code><technical_language>nit: a bit unusual TimestampBoundStoreConfigDeserializationTest getResource() method of PaxosConfigDeserializationTest - I this this class (i.e. AbstractTimelockServer...Test.class.getResource...)</technical_language>

Target:
public void canDeserializeTimeLockServerConfiguration() throws IOException { File testConfigFile = new File( AbstractTimelockServerConfigDeserializationTest.class.getResource(getConfigFileName()).getPath()); TimeLockServerConfiguration configuration = OBJECT_MAPPER.readValue(testConfigFile, TimeLockServerConfiguration.class); assertThat(configuration.cluster().localServer()).isEqualTo("localhost:8080"); assertThat(configuration.cluster().servers()).containsExactlyInAnyOrder( "localhost:8080", "localhost:8081", "localhost:8082"); assertThat(configuration.clients()).containsExactlyInAnyOrder("test", "test2", "test3", "acceptor", "learner"); assertAlgorithmConfigurationCorrect(configuration.algorithm()); assertTimestampBoundPersisterConfigurationCorrect(configuration.getTsBoundPersisterConfiguration()); assertThat(configuration.useClientRequestLimit()).isTrue(); assertThat(configuration.timeLimiterConfiguration().enableTimeLimiting()).isTrue(); assertThat(configuration.timeLimiterConfiguration().blockingTimeoutErrorMargin()).isEqualTo(0.03); assertThat(configuration.asyncLockConfiguration().useAsyncLockService()).isTrue(); assertThat(configuration.asyncLockConfiguration().disableLegacySafetyChecksWarningPotentialDataCorruption()) .isFalse(); }
Source:
<code>protected void updateData(double[] x, @NonNull AnalysisBaseQueryFilter filters, IProgressMonitor monitor) { if (fXYDataProvider == null) { return; } <START> ICommonXAxisResponse response = null; ICommonXAxisModel model = null; ICommonXAxisResponse.Status status; long currentEnd <END> = 0; while (currentEnd < filters.getQueryInterval().getEndTime().toNanos()) { response = fXYDataProvider.fetch(x, filters, monitor); model = response.getModel(); if (model != null) { updateDisplay(model); } status = response.getStatus(); if (status == ICommonXAxisResponse.Status.COMPLETED) { return; } else if(status == ICommonXAxisResponse.Status.FAILED || status == ICommonXAxisResponse.Status.CANCELLED) { LOGGER.log(Level.WARNING, response.getStatusMessage()); return; } else { try { finishedLatch.await(BUILD_UPDATE_TIMEOUT, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { LOGGER.log(Level.INFO, e.getMessage()); return; } } } }</code><technical_language>please move declarations loop, preferably line assignments</technical_language>

Target:
protected void updateData(double[] x, @NonNull AnalysisBaseQueryFilter filters, IProgressMonitor monitor) { if (fXYDataProvider == null) { LOGGER.log(Level.WARNING, "Data provider for this viewer is not available"); return; } long currentEnd = 0; while (currentEnd < filters.getQueryInterval().getEndTime().toNanos()) { ICommonXAxisResponse response = fXYDataProvider.fetch(x, filters, monitor); ICommonXAxisModel model = response.getModel(); if (model != null) { updateDisplay(model); } ICommonXAxisResponse.Status status = response.getStatus(); if (status == ICommonXAxisResponse.Status.COMPLETED) { return; } else if (status == ICommonXAxisResponse.Status.FAILED || status == ICommonXAxisResponse.Status.CANCELLED) { LOGGER.log(Level.WARNING, response.getStatusMessage()); return; } else { try { finishedLatch.await(BUILD_UPDATE_TIMEOUT, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { LOGGER.log(Level.INFO, e.getMessage()); return; } } } }
Source:
<code>public PrimitiveLongIterator fuzzyQuery( String... terms ) { MultiFieldQueryParser multiFieldQueryParser = new MultiFieldQueryParser( properties, analyzer ); multiFieldQueryParser.setDefaultOperator( QueryParser.Operator.OR ); Query query; try { query = multiFieldQueryParser.parse( String.join( "~ ", terms ) + "~" ); } catch ( ParseException e ) { query = parseFallbackBooleanQuery( multiFieldQueryParser, terms ); <START> } <END> return query( query ); }</code><technical_language>please aware before, high chance work expected</technical_language>

Target:
public PrimitiveLongIterator fuzzyQuery( String... terms ) { String concatenatedQuery = String.join( "~ ", terms ) + "~"; return innerQuery( concatenatedQuery ); }
Source:
<code>public <T extends IBootstrapComponent> Iterator<T> getBootstrapComponents( Class<T> eventType ) { <START> List<IBootstrapComponent> ret = this.bootstrapComponents.get( eventType ); <END> if( ret == null ) { return Collections.emptyIterator(); } return (Iterator<T>) ret.iterator(); }</code><technical_language>getOrDefault(eventType , Collections.emptyList()) reduce LoCs a bit</technical_language>

Target:
public <T extends IBootstrapComponent> Iterator<T> getBootstrapComponents( Class<T> eventType ) { return (Iterator<T>) this.bootstrapComponents.getOrDefault( eventType, Collections.emptyList() ).iterator(); }
Source:
<code>protected void reestablishConnectionIfNeeded() { if (getVds().getProtocol() <START> != VdsProtocol.STOMP <END> && FeatureSupported.jsonProtocol(getVds().getVdsGroupCompatibilityVersion()) && getVds().getHostOs() != null) { getVds().setProtocol(VdsProtocol.STOMP); getVdsStaticDao().save(getVds().getStaticData()); initializeVds(); } }</code><technical_language>more explicit. protocols compare XML. comparing enums equals here</technical_language>

Target:
protected void reestablishConnectionIfNeeded() { if (getVds().getProtocol() == VdsProtocol.XML && FeatureSupported.jsonProtocol(getVds().getVdsGroupCompatibilityVersion()) && getVds().getHostOs() != null) { getVds().setProtocol(VdsProtocol.STOMP); getVdsStaticDao().save(getVds().getStaticData()); initializeVds(); } }
Source:
<code>private void checkActiveCqCount(MemberVM vm, int expectedResult) { vm.invoke(() -> { QueryService queryService = getCache().getQueryService(); CqServiceStatistics cqServiceStats = queryService.getCqStatistics(); <START> await() <END> .untilAsserted(() -> assertThat(cqServiceStats.numCqsActive()).isEqualTo(expectedResult)); }); }</code><technical_language>Please provide a timeout. I tested timeout(30, TimeUnit.SECONDS). This way, this test terminate in a "reasonable" time</technical_language>

Target:
private void checkActiveCqCount(MemberVM vm, int expectedResult) { vm.invoke(() -> { QueryService queryService = getCache().getQueryService(); CqServiceStatistics cqServiceStats = queryService.getCqStatistics(); await() .atMost(30, TimeUnit.SECONDS) .untilAsserted(() -> assertThat(cqServiceStats.numCqsActive()).isEqualTo(expectedResult)); }); }
Source:
<code>public void onListItemClick(ListView listView, View view, int position, long id) { <START> Log.i("list", <END> "onListItemClick"); super.onListItemClick(listView, view, position, id); ATMItem item = (ATMItem) getListAdapter().getItem(position); mDataManager.setCurrentItem(item); mModeChangeRequester.onModeChange(ModesManager.ModeIndex.DETAIL); }</code><technical_language>const LOG</technical_language>

Target:
public void onListItemClick(ListView listView, View view, int position, long id) { super.onListItemClick(listView, view, position, id); ATMItem item = (ATMItem) getListAdapter().getItem(position); mDataManager.setCurrentItem(item); mModeChangeRequester.onModeChange(ModesManager.ModeIndex.DETAIL); }
Source:
<code>private float calcSwapCost(final int idx, final EditDistItem otherItem, final int otherIdx) { float cost = swapCost; if (this.isDigit[idx] && otherItem.isDigit[otherIdx]) { <START> cost += digitChangePenalty; <END> } return cost; }</code><technical_language>if () { return swapCost + digitChangePenalty; } return swapCost;</technical_language>

Target:
private float calcSwapCost(final int idx, final EditDistItem otherItem, final int otherIdx) { if (this.isDigit[idx] && otherItem.isDigit[otherIdx]) { return edItemConfig.swapCost + edItemConfig.digitChangePenalty; } return edItemConfig.swapCost; }
Source:
<code>public void testExecuteQueryWarnings() throws SQLException { try (ResultSet rs = statement.executeQuery("SELECT a FROM (VALUES 1, 2, 3) t(a)")) { assertNull(statement.getConnection().getWarnings()); assertNull(statement.getWarnings()); assertNull(rs.getWarnings()); Set<WarningEntry> currentWarnings = new HashSet<>(); while (rs.next()) { SQLWarning warning = statement.getConnection().getWarnings(); if (warning != null) { int previousSize = currentWarnings.size(); addWarnings(currentWarnings, warning); assertTrue(currentWarnings.size() >= previousSize); <START> } <END> warning = statement.getWarnings(); if (warning != null) { int previousSize = currentWarnings.size(); addWarnings(currentWarnings, warning); assertTrue(currentWarnings.size() >= previousSize); } warning = rs.getWarnings(); if (warning != null) { int previousSize = currentWarnings.size(); addWarnings(currentWarnings, warning); assertTrue(currentWarnings.size() >= previousSize); } } List<PrestoWarning> expectedWarnings = new TestingWarningCollector(new WarningCollectorConfig(), new TestingWarningCollectorConfig().setPreloadedWarnings(PRELOADED_WARNINGS).setAddWarnings(true)).getWarnings(); for (PrestoWarning prestoWarning : expectedWarnings) { assertTrue(currentWarnings.contains(new WarningEntry(new PrestoSqlWarning(prestoWarning)))); } } }</code><technical_language>if blocks same, nice get rid of repetition</technical_language>

Target:
public void testExecuteQueryWarnings() throws SQLException { try (ResultSet rs = statement.executeQuery("SELECT a FROM (VALUES 1, 2, 3) t(a)")) { assertNull(statement.getConnection().getWarnings()); assertNull(statement.getWarnings()); assertNull(rs.getWarnings()); Set<WarningEntry> currentWarnings = new HashSet<>(); while (rs.next()) { assertWarnings(rs.getWarnings(), currentWarnings); } TestingWarningCollectorConfig warningCollectorConfig = new TestingWarningCollectorConfig().setPreloadedWarnings(PRELOADED_WARNINGS).setAddWarnings(true); TestingWarningCollector warningCollector = new TestingWarningCollector(new WarningCollectorConfig(), warningCollectorConfig); List<PrestoWarning> expectedWarnings = warningCollector.getWarnings(); for (PrestoWarning prestoWarning : expectedWarnings) { assertTrue(currentWarnings.contains(new WarningEntry(new PrestoSqlWarning(prestoWarning)))); } } }
Source:
<code>public void provision(KubernetesEnvironment k8sEnv, OpenShiftProject project) throws InfrastructureException { if (!trustedStoreInitialized) { return; } ConfigMap configMap = clientFactory .createOC() .configMaps() <START> .inNamespace(cheInstallationLocation.getInstallationLocationNamespace()) <END> .withName(caBundleConfigMap) .get(); if (configMap == null) { return; } Optional<ConfigMap> existing = project.configMaps().get(configMapName); if (!existing.isPresent() || !existing.get().getData().equals(configMap.getData())) { k8sEnv .getConfigMaps() .put( configMapName, new ConfigMapBuilder() .withMetadata( new ObjectMetaBuilder() .withName(configMapName) .withAnnotations(configMap.getMetadata().getAnnotations()) .withLabels(configMapLabelKeyValue) .build()) .withApiVersion(configMap.getApiVersion()) .withData(configMap.getData()) .build()); } for (PodData pod : k8sEnv.getPodsData().values()) { if (pod.getRole() == PodRole.DEPLOYMENT) { if (pod.getSpec() .getVolumes() .stream() .noneMatch(v -> v.getName().equals(CHE_TRUST_STORE_VOLUME))) { pod.getSpec() .getVolumes() .add( new VolumeBuilder() .withName(CHE_TRUST_STORE_VOLUME) .withConfigMap( new ConfigMapVolumeSourceBuilder().withName(configMapName).build()) .build()); } } for (Container container : pod.getSpec().getInitContainers()) { provisionTrustStoreVolumeMountIfNeeded(container); } for (Container container : pod.getSpec().getContainers()) { provisionTrustStoreVolumeMountIfNeeded(container); } } }</code><technical_language>do this installation namespace evaluation in constructor</technical_language>

Target:
public void provision(KubernetesEnvironment k8sEnv, OpenShiftProject project) throws InfrastructureException { if (!trustedStoreInitialized) { return; } ConfigMap configMap = cheServerClientFactory .create() .configMaps() .inNamespace(installationLocationNamespace) .withName(caBundleConfigMap) .get(); if (configMap == null) { return; } Optional<ConfigMap> existing = project.configMaps().get(configMapName); if (!existing.isPresent() || !existing.get().getData().equals(configMap.getData())) { k8sEnv .getConfigMaps() .put( configMapName, new ConfigMapBuilder() .withMetadata( new ObjectMetaBuilder() .withName(configMapName) .withAnnotations(configMap.getMetadata().getAnnotations()) .withLabels(configMapLabelKeyValue) .build()) .withApiVersion(configMap.getApiVersion()) .withData(configMap.getData()) .build()); } for (PodData pod : k8sEnv.getPodsData().values()) { if (pod.getRole() == PodRole.DEPLOYMENT) { if (pod.getSpec() .getVolumes() .stream() .noneMatch(v -> v.getName().equals(CHE_TRUST_STORE_VOLUME))) { pod.getSpec() .getVolumes() .add( new VolumeBuilder() .withName(CHE_TRUST_STORE_VOLUME) .withConfigMap( new ConfigMapVolumeSourceBuilder().withName(configMapName).build()) .build()); } } for (Container container : pod.getSpec().getInitContainers()) { provisionTrustStoreVolumeMountIfNeeded(container); } for (Container container : pod.getSpec().getContainers()) { provisionTrustStoreVolumeMountIfNeeded(container); } } }
Source:
<code>private void ensureClientCachesStarted() { GridCacheProcessor cacheProcessor = cctx.cache(); List<CacheConfiguration> notStartedCacheConfigs = new ArrayList<>(); for (CacheConfiguration cCfg : cctx.gridConfig().getCacheConfiguration()) { <START> if (!cacheProcessor.cacheNames().contains(cCfg.getName())) { <END> notStartedCacheConfigs.add(cCfg); } } if (!notStartedCacheConfigs.isEmpty()) { cacheProcessor.dynamicStartCaches(notStartedCacheConfigs, false, false); } }</code><technical_language>I recommend extracting cacheProcessor.cacheNames() a variable converting a Set in process speed lookups. in cases of caches a performance issue</technical_language>

Target:
private void ensureClientCachesStarted() { GridCacheProcessor cacheProcessor = cctx.cache(); Set<String> cacheNames = new HashSet<>(cacheProcessor.cacheNames()); List<CacheConfiguration> notStartedCacheConfigs = new ArrayList<>(); for (CacheConfiguration cCfg : cctx.gridConfig().getCacheConfiguration()) { if (!cacheNames.contains(cCfg.getName())) { notStartedCacheConfigs.add(cCfg); } } if (!notStartedCacheConfigs.isEmpty()) { cacheProcessor.dynamicStartCaches(notStartedCacheConfigs, false, false, false); } }
Source:
<code>private void getMetaDataProperties(IMediaStream stream, HashMap<String,Object> streamHash){ WMSProperties props = stream.getProperties(); AMFDataObj obj; if (props == null){ logger.warn(httpSessionId+"[" + stream.getName() + "] Can't find properties"); return; } synchronized (props) { obj = (AMFDataObj) props.getProperty(Constants.AMFSETDATAFRAME); } if (obj == null) { logger.warn(httpSessionId+"[" + stream.getName() + "] Can't find meta data"); return; } logger.info(httpSessionId+"[" + stream.getName() + " ] Find property AMFDataObj for stream"); <START> for (String streamParam : Constants.streamParams) { <END> if (obj.containsKey(streamParam)) { if (streamParam.equals(Constants.ONMETADATA_VIDEOCODECIDSTR) || streamParam.equals(Constants.ONMETADATA_AUDIOCODECIDSTR)){ streamHash.put(streamParam, obj.getString(streamParam)); } else{ streamHash.put(streamParam, obj.getDouble(streamParam)); } } } }</code><technical_language>getPublishAudioCodecId</technical_language>

Target:
private void getMetaDataProperties(IMediaStream stream, HashMap<String,Object> streamHash){ WMSProperties props = stream.getProperties(); AMFDataObj obj; if (props == null){ logger.warn(httpSessionId+"[" + stream.getName() + "] Can't find properties"); return; } synchronized (props) { obj = (AMFDataObj) props.getProperty(Constants.AMFSETDATAFRAME); } if (obj == null) { logger.warn(httpSessionId+"[" + stream.getName() + "] Can't find meta data"); return; } logger.info(httpSessionId+"[" + stream.getName() + " ] Find property AMFDataObj for stream"); for (String streamParam : Constants.streamParams) { if (obj.containsKey(streamParam)) { if (! streamParam.equals(Constants.ONMETADATA_VIDEOCODECIDSTR) && ! streamParam.equals(Constants.ONMETADATA_AUDIOCODECIDSTR)){ streamHash.put(streamParam, obj.getDouble(streamParam)); } } } }
Source:
<code>public State merge(State s) { if (s instanceof Null) { return this; } <START> if(!(s instanceof CloseableState)) { <END> throw new IllegalStateException("Merging incompatible states"); } return s; }</code><technical_language>throwing this exception for Closed state for CloseableState? (same remark for Unlocked state of LockState)</technical_language>

Target:
public State merge(State s) { return s; }
Source:
<code>protected ServerErrorCode validateRequest(PartitionId partition, RequestOrResponseType requestType, boolean skipPartitionAndDiskAvailableCheck) { ServerErrorCode errorCode = super.validateRequest(partition, requestType, skipPartitionAndDiskAvailableCheck); if (errorCode != ServerErrorCode.No_Error) { return errorCode; } if (!skipPartitionAndDiskAvailableCheck) { ReplicaId localReplica = localPartitionToReplicaMap.get(partition); if (localReplica != null && localReplica.getDiskId().getState() == HardwareState.UNAVAILABLE) { metrics.diskUnavailableError.inc(); return ServerErrorCode.Disk_Unavailable; } errorCode = storeManager.checkLocalPartitionStatus(partition, localReplica); switch (errorCode) { case Disk_Unavailable: metrics.diskUnavailableError.inc(); localReplica.markDiskDown(); return errorCode; case Replica_Unavailable: metrics.replicaUnavailableError.inc(); return errorCode; case Partition_Unknown: metrics.partitionUnknownError.inc(); return errorCode; } } if (requestType.equals(RequestOrResponseType.PutRequest) && partition.getPartitionState() == PartitionState.READ_ONLY) { metrics.partitionReadOnlyError.inc(); return ServerErrorCode.Partition_ReadOnly; } <START> if (requestType.equals(RequestOrResponseType.UndeleteRequest) && !serverConfig.serverHandleUndeleteRequestEnabled) { metrics.temporarilyDisabledError.inc(); return ServerErrorCode.Temporarily_Disabled; } <END> if (!isRequestEnabled(requestType, partition)) { metrics.temporarilyDisabledError.inc(); return ServerErrorCode.Temporarily_Disabled; } return ServerErrorCode.No_Error; }</code><technical_language>move this piece of code isRequestEnabled()</technical_language>

Target:
protected ServerErrorCode validateRequest(PartitionId partition, RequestOrResponseType requestType, boolean skipPartitionAndDiskAvailableCheck) { ServerErrorCode errorCode = super.validateRequest(partition, requestType, skipPartitionAndDiskAvailableCheck); if (errorCode != ServerErrorCode.No_Error) { return errorCode; } if (!skipPartitionAndDiskAvailableCheck) { ReplicaId localReplica = localPartitionToReplicaMap.get(partition); if (localReplica != null && localReplica.getDiskId().getState() == HardwareState.UNAVAILABLE) { metrics.diskUnavailableError.inc(); return ServerErrorCode.Disk_Unavailable; } errorCode = storeManager.checkLocalPartitionStatus(partition, localReplica); switch (errorCode) { case Disk_Unavailable: metrics.diskUnavailableError.inc(); localReplica.markDiskDown(); return errorCode; case Replica_Unavailable: metrics.replicaUnavailableError.inc(); return errorCode; case Partition_Unknown: metrics.partitionUnknownError.inc(); return errorCode; } } if (requestType.equals(RequestOrResponseType.PutRequest) && partition.getPartitionState() == PartitionState.READ_ONLY) { metrics.partitionReadOnlyError.inc(); return ServerErrorCode.Partition_ReadOnly; } if (!isRequestEnabled(requestType, partition)) { metrics.temporarilyDisabledError.inc(); return ServerErrorCode.Temporarily_Disabled; } return ServerErrorCode.No_Error; }
Source:
<code>public Map<String, DbParameterAccessor> getAllColumns(String tableOrViewName) throws SQLException { String[] qualifiers = NameNormaliser.normaliseName(tableOrViewName) .split("\\."); <START> String cols = " cname, coltype, length, 'OUT' As is_output, 0 As is_cursor_ref "; <END> String qry = "select " + cols + " from sys.SYSCOLUMNS where 1=1 and "; if (qualifiers.length == 2) { qry += " (creator=? and tname=?) "; } else { qry += " (creator=user and tname=?)"; } return readIntoParams(tableOrViewName, qry); }</code><technical_language>This OUT IN</technical_language>

Target:
public Map<String, DbParameterAccessor> getAllColumns(String tableOrViewName) throws SQLException { String[] qualifiers = NameNormaliser.normaliseName(tableOrViewName) .split("\\."); String cols = " cname, coltype, length, 'IN' As is_output, 0 As is_cursor_ref "; String qry = "select " + cols + " from sys.SYSCOLUMNS where 1=1 and "; if (qualifiers.length == 2) { qry += " (creator=? and tname=?) "; } else { qry += " (creator=user and tname=?)"; } return readIntoParams(tableOrViewName, qry); }
Source:
<code>public void testIscsiLunCannotBeAddedIfSgioIsFilteredAndScsiReservationEnabled() { LunDisk disk = createISCSILunDisk(ScsiGenericIO.FILTERED, true, DiskInterface.IDE); AddDiskParameters parameters = createParameters(); parameters.setDiskInfo(disk); initializeCommand(Guid.newGuid(), parameters); mockVm(); mockInterfaceList(); assertFalse("Lun disk added successfully WHILE sgio is filtered and scsi reservation is enabled", command.checkIfLunDiskCanBeAdded(spyDiskValidator(disk))); assertTrue(command.getReturnValue() .getCanDoActionMessages() <START> .contains(VdcBllMessages.ACTION_TYPE_FAILED_SGIO_IS_FILTERED.toString())); <END> }</code><technical_language>replace verifyCanDoActionMessagesContainMessage</technical_language>

Target:
public void testIscsiLunCannotBeAddedIfSgioIsFilteredAndScsiReservationEnabled() { LunDisk disk = createISCSILunDisk(ScsiGenericIO.FILTERED, true, DiskInterface.IDE); AddDiskParameters parameters = createParameters(); parameters.setDiskInfo(disk); initializeCommand(Guid.newGuid(), parameters); mockVm(); mockInterfaceList(); assertFalse("Lun disk added successfully WHILE sgio is filtered and scsi reservation is enabled", command.checkIfLunDiskCanBeAdded(spyDiskValidator(disk))); verifyCanDoActionMessagesContainMessage(VdcBllMessages.ACTION_TYPE_FAILED_SGIO_IS_FILTERED); }
Source:
<code>public <Z, D extends Database<Z>> void restore(D database, Decoder decoder, File file, boolean dataOnly) throws Exception { try (Connection c = database.connect(decoder)) { try (Statement s = c.createStatement()) { if (!s.execute("set EXCLUSIVE 1;")) { try { s.execute("DROP ALL OBJECTS;"); s.execute("RUNSCRIPT FROM '" + file.getAbsolutePath() + "';"); } finally { s.execute("set EXCLUSIVE 0;"); } } } <START> } catch (Exception e) { <END> System.err.println(e.getMessage()); e.printStackTrace(); throw e; } }</code><technical_language>Same. done, merge</technical_language>

Target:
public <Z, D extends Database<Z>> void restore(D database, Decoder decoder, File file, boolean dataOnly) throws Exception { try (Connection c = database.connect(decoder)) { try (Statement s = c.createStatement()) { if (!s.execute("set EXCLUSIVE 1;")) { try { s.execute("DROP ALL OBJECTS;"); s.execute("RUNSCRIPT FROM '" + file.getAbsolutePath() + "';"); } finally { s.execute("set EXCLUSIVE 0;"); } } } } }
Source:
<code>private void populateCPUList(List<ServerCpu> cpus, boolean canChangeArchitecture) { getArchitecture().getSelectedItemChangedEvent().removeListener(this); ServerCpu oldSelectedCpu = getCPU().getSelectedItem(); ArchitectureType oldSelectedArch = getArchitecture().getSelectedItem(); getCPU().setItems(cpus); initSupportedArchitectures(); try { <START> getCPU().setSelectedItem(oldSelectedCpu != null ? <END> Linq.firstOrNull(cpus, new Linq.ServerCpuPredicate(oldSelectedCpu.getCpuName())) : null); } catch (JavaScriptException e) { logger.log(Level.WARNING, "Failed setting the ServerCpu. Exception message: " + e.getMessage()); } if (getCPU().getSelectedItem() == null || !isCPUinitialized) { initCPU(); } if (getIsEdit()) { if (!canChangeArchitecture) { getArchitecture().setItems(new ArrayList<>(Collections.singletonList(getEntity().getArchitecture()))); } if (oldSelectedArch != null) { getArchitecture().setSelectedItem(oldSelectedArch); } else { if (getEntity() != null) { getArchitecture().setSelectedItem(getEntity().getArchitecture()); } else { getArchitecture().setSelectedItem(ArchitectureType.undefined); } } } else { getArchitecture().setSelectedItem(ArchitectureType.undefined); } initCpuArchTypeFiltering(); }</code><technical_language>is java solution select wrong catch exception. is need for a warning - is a normal state in a new context cpu selection is applicable. instead check if oldSelectedCpu is in cpus list if not, select null. try catch warnings around</technical_language>

Target:
private void populateCPUList(List<ServerCpu> cpus, boolean canChangeArchitecture) { getArchitecture().getSelectedItemChangedEvent().removeListener(this); ServerCpu oldSelectedCpu = getCPU().getSelectedItem(); ArchitectureType oldSelectedArch = getArchitecture().getSelectedItem(); getCPU().setItems(cpus); initSupportedArchitectures(); getCPU().setSelectedItem(oldSelectedCpu != null ? Linq.firstOrNull(cpus, new Linq.ServerCpuPredicate(oldSelectedCpu.getCpuName())) : null); if (getCPU().getSelectedItem() == null || !isCPUinitialized) { initCPU(); } if (getIsEdit()) { if (!canChangeArchitecture) { getArchitecture().setItems(new ArrayList<>(Collections.singletonList(getEntity().getArchitecture()))); } if (oldSelectedArch != null) { getArchitecture().setSelectedItem(oldSelectedArch); } else { if (getEntity() != null) { getArchitecture().setSelectedItem(getEntity().getArchitecture()); } else { getArchitecture().setSelectedItem(ArchitectureType.undefined); } } } else { getArchitecture().setSelectedItem(ArchitectureType.undefined); } initCpuArchTypeFiltering(); }
Source:
<code>private String[] rootArgumentsOnly() throws BadArgumentException { List<String> rootArguments = new ArrayList<String>(); for (int i = 0; i < this.args.length; i++) { final String token = this.args[i]; if (token.equals("-c")) { rootArguments.add(token); if (i < this.args.length) { rootArguments.add(this.args[++i]); } else { throw new BadArgumentException("No argument supplied for option: " + token); } } if (token.equals("--help")) { rootArguments.add(token); if ((i < this.args.length) && (!this.args[i + 1].startsWith("-"))) { rootArguments.add(this.args[++i]); } } if ((token.equals("--version")) || (token.equals("-h"))) { rootArguments.add(token); } <START> if ((token.equals("--trace")) || (token.equals("--debug")) || (token.equals("--verbose")) <END> || (token.equals("--log-trace")) || (token.equals("--log-debug")) || (token.equals("--logverbose"))) { rootArguments.add(token); } } String[] ret = new String[rootArguments.size()]; ret = rootArguments.toArray(ret); return ret; }</code><technical_language>Is reason this if statement separate above</technical_language>

Target:
private String[] rootArgumentsOnly() throws BadArgumentException { List<String> rootArguments = new ArrayList<String>(); for (int i = 0; i < this.args.length; i++) { final String token = this.args[i]; if (matchesOption(COMMAND, token) || matchesOption(VIEW_TYPE, token) || matchesOption(ACCESS_KEY, token) || matchesOption(SECRET_KEY, token) || matchesOption(ENDPOINT, token) || matchesOption(PROXY, token)) { rootArguments.add(token); if (i < this.args.length) { rootArguments.add(this.args[++i]); } else { throw new BadArgumentException("No argument supplied for option: " + token); } } if (matchesOption(COMMAND_HELP, token)) { rootArguments.add(token); if ((i < this.args.length) && (!this.args[i + 1].startsWith("-"))) { rootArguments.add(this.args[++i]); } } if ((matchesOption(VERBOSE, token)) || (matchesOption(PRINT_HELP, token)) || (matchesOption(TRACE, token)) || (matchesOption(DEBUG, token)) || (matchesOption(VERBOSE, token)) || (matchesOption(LOG_TRACE, token)) || (matchesOption(LOG_DEBUG, token)) || (matchesOption(LOG_VERBOSE, token))) { rootArguments.add(token); } } String[] ret = new String[rootArguments.size()]; ret = rootArguments.toArray(ret); return ret; }
Source:
<code>private String getText(final EObject element) { ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); <START> AdapterFactoryItemDelegator adapterFactoryItemDelegator = new AdapterFactoryItemDelegator(adapterFactory); String text = adapterFactoryItemDelegator.getText(element); adapterFactory.dispose(); <END> return text; }</code><technical_language>dispose() called a finally block, ensure is called if exception occurs getText() (which is call user-specified code of control)</technical_language>

Target:
private String getText(final EObject element) { String text = null; ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); AdapterFactoryItemDelegator adapterFactoryItemDelegator = new AdapterFactoryItemDelegator(adapterFactory); try { text = adapterFactoryItemDelegator.getText(element); } finally { adapterFactory.dispose(); } return text; }
Source:
<code>private static DetailAST findWarningsHolder(final DetailAST annotation) { <START> DetailAST warningsHolder = annotation; <END> final DetailAST annValuePair = annotation.findFirstToken(TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR); final DetailAST annArrayInit; if (annValuePair == null) { annArrayInit = annotation.findFirstToken(TokenTypes.ANNOTATION_ARRAY_INIT); } else { annArrayInit = annValuePair.findFirstToken(TokenTypes.ANNOTATION_ARRAY_INIT); } if (annArrayInit != null) { warningsHolder = annArrayInit; } return warningsHolder; }</code><technical_language>Please move close usage</technical_language>

Target:
private static DetailAST findWarningsHolder(final DetailAST annotation) { final DetailAST annValuePair = annotation.findFirstToken(TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR); final DetailAST annArrayInit; if (annValuePair == null) { annArrayInit = annotation.findFirstToken(TokenTypes.ANNOTATION_ARRAY_INIT); } else { annArrayInit = annValuePair.findFirstToken(TokenTypes.ANNOTATION_ARRAY_INIT); } DetailAST warningsHolder = annotation; if (annArrayInit != null) { warningsHolder = annArrayInit; } return warningsHolder; }
Source:
<code>public int createAndLinkVertex (double lat, double lon) { int stopVertex = vertexStore.addVertex(lat, lon); int streetVertex = getOrCreateVertexNear(lat, lon, StreetMode.WALK); if (streetVertex == -1) { return -1; } double streetVertexLat = vertexStore.fixedLats.get(streetVertex)/FIXED_FACTOR; double streetVertexLon = vertexStore.fixedLons.get(streetVertex)/FIXED_FACTOR; ArrayList<Node> edgeNodes = new ArrayList<>(); edgeNodes.add(new Node(lat, lon)); edgeNodes.add(new Node(streetVertexLat,streetVertexLon)); <START> int length = getEdgeLengthMillimeters(edgeNodes); <END> Edge e = edgeStore.addStreetPair(stopVertex, streetVertex, length, -1); e.allowAllModes(); e.setFlag(EdgeStore.EdgeFlag.LINK); e.advance(); e.allowAllModes(); e.setFlag(EdgeStore.EdgeFlag.LINK); return stopVertex; }</code><technical_language>Internally this method com.conveyal.r5.common.GeometryUtils#distance, operates lat/lon pairs. calling function avoid construction of ArrayList Node objects. essentially optimization (and a ton of impact) intent of code clearer (find a distance retaining List Nodes). Nodes OSM objects a detour loosely related data model</technical_language>

Target:
public int createAndLinkVertex (double lat, double lon) { int stopVertex = vertexStore.addVertex(lat, lon); int streetVertexIndex = getOrCreateVertexNear(lat, lon, StreetMode.WALK); if (streetVertexIndex == -1) { return -1; } VertexStore.Vertex streetVertex = vertexStore.getCursor(streetVertexIndex); int length_mm = (int) (GeometryUtils.distance(lat,lon, streetVertex.getLat(), streetVertex.getLon())*1000); Edge e = edgeStore.addStreetPair(stopVertex, streetVertexIndex, length_mm, -1); e.allowAllModes(); e.setFlag(EdgeStore.EdgeFlag.LINK); e.advance(); e.allowAllModes(); e.setFlag(EdgeStore.EdgeFlag.LINK); return stopVertex; }
Source:
<code>private void initMember(HazelcastInstanceType instanceType, boolean reInitialize) { if (_memberInstances.get(instanceType) == null || reInitialize) { long start = System.currentTimeMillis(); synchronized (syncMe) { if (_memberInstances.get(instanceType) == null || reInitialize) { Logger.info(this, "Setting Up HazelCast ("+ instanceType +")"); HazelcastInstance memberInstance = _memberInstances.remove(instanceType); if (memberInstance != null) { try { Thread.sleep(1000); } catch (InterruptedException e) { Logger.error(this, "Error waiting instance to become vacant", e); } finally { memberInstance.shutdown(); } } <START> if (instanceType == HazelcastInstanceType.EMBEDDED) { <END> memberInstance = newHazelcastInstanceEmbedded(instanceType.getPath()); } else if (instanceType == HazelcastInstanceType.CLIENT) { memberInstance = newHazelcastInstanceClient(instanceType.getPath()); } _memberInstances.put(instanceType, memberInstance); Logger.info(this, "Initialized Hazelcast member "+ memberInstance); } } System.setProperty(WebKeys.DOTCMS_STARTUP_TIME_HAZEL, String.valueOf(System.currentTimeMillis() - start)); } }</code><technical_language>@agomez-dotcms move this code a Factory? HazelCastInstanceFactory, a getInstance(String xmlPath) method if else proper creation</technical_language>

Target:
private void initMember(HazelcastInstanceType instanceType, boolean reInitialize) { if (_memberInstances.get(instanceType) == null || reInitialize) { long start = System.currentTimeMillis(); synchronized (this) { if (_memberInstances.get(instanceType) == null || reInitialize) { Logger.info(this, "Setting Up HazelCast ("+ instanceType +")"); HazelcastInstance memberInstance = _memberInstances.remove(instanceType); if (memberInstance != null) { try { Thread.sleep(1000); } catch (InterruptedException e) { Logger.error(this, "Error waiting instance to become vacant", e); } finally { memberInstance.shutdown(); } } memberInstance = _memberFactory.createHazelcastInstance(instanceType); _memberInstances.put(instanceType, memberInstance); Logger.info(this, "Initialized Hazelcast member "+ memberInstance); } } System.setProperty(WebKeys.DOTCMS_STARTUP_TIME_HAZEL, String.valueOf(System.currentTimeMillis() - start)); } }
Source:
<code>public final EmailConfiguration build() { Preconditions.checkArgument(!Strings.isNullOrEmpty(host), "host can not be empty."); <START> Preconditions.checkArgument(port > 0 && port < 65535, "port should larger than 0 and small than 65535."); <END> Preconditions.checkArgument(!Strings.isNullOrEmpty(username), "username can not be empty."); Preconditions.checkArgument(!Strings.isNullOrEmpty(password), "password can not be empty."); Preconditions.checkArgument(!Strings.isNullOrEmpty(from), "from can not be empty."); Preconditions.checkArgument(!Strings.isNullOrEmpty(to), "to can not be empty."); return new EmailConfiguration(host, port, username, password, useSsl, subject, from, to, cc, bcc, debug); }</code><technical_language>Constants left</technical_language>

Target:
public final EmailConfiguration build() { Preconditions.checkArgument(!Strings.isNullOrEmpty(host), "host can not be empty."); Preconditions.checkArgument(0 < port && 65535 > port, "port should larger than 0 and small than 65535."); Preconditions.checkArgument(!Strings.isNullOrEmpty(username), "username can not be empty."); Preconditions.checkArgument(!Strings.isNullOrEmpty(password), "password can not be empty."); Preconditions.checkArgument(!Strings.isNullOrEmpty(from), "from can not be empty."); Preconditions.checkArgument(!Strings.isNullOrEmpty(to), "to can not be empty."); return new EmailConfiguration(host, port, username, password, useSsl, subject, from, to, cc, bcc, debug); }
Source:
<code>public static <T> ReplaySubject<T> create(int capacity) { final UnboundedReplayState<T> state = new UnboundedReplayState<T>(capacity); SubjectSubscriptionManager<T> ssm = new SubjectSubscriptionManager<T>(); ssm.onStart = new Action1<SubjectObserver<T>>() { @Override public void call(SubjectObserver<T> o) { int lastIndex = state.replayObserverFromIndex(0, o); o.index(lastIndex); } }; ssm.onAdded = new Action1<SubjectObserver<T>>() { @Override public void call(SubjectObserver<T> o) { synchronized (o) { if (!o.first || o.emitting) { return; } o.first = false; o.emitting = true; } boolean skipFinal = false; try { for (;;) { int idx = o.<Integer>index(); <START> int sidx = state.index.get(); <END> if (idx != sidx) { Integer j = state.replayObserverFromIndex(idx, o); o.index(j); } synchronized (o) { if (sidx == state.index.get()) { o.emitting = false; skipFinal = true; break; } } } } finally { if (!skipFinal) { synchronized (o) { o.emitting = false; } } } } }; ssm.onTerminated = new Action1<SubjectObserver<T>>() { @Override public void call(SubjectObserver<T> o) { Integer idx = o.index(); if (idx == null) { idx = 0; } state.replayObserverFromIndex(idx, o); } }; return new ReplaySubject<T>(ssm, ssm, state); }</code><technical_language>state.index moved loop a local variable</technical_language>

Target:
public static <T> ReplaySubject<T> create(int capacity) { final UnboundedReplayState<T> state = new UnboundedReplayState<T>(capacity); SubjectSubscriptionManager<T> ssm = new SubjectSubscriptionManager<T>(); ssm.onStart = new Action1<SubjectObserver<T>>() { @Override public void call(SubjectObserver<T> o) { int lastIndex = state.replayObserverFromIndex(0, o); o.index(lastIndex); } }; ssm.onAdded = new Action1<SubjectObserver<T>>() { @Override public void call(SubjectObserver<T> o) { synchronized (o) { if (!o.first || o.emitting) { return; } o.first = false; o.emitting = true; } boolean skipFinal = false; try { final UnboundedReplayState<T> localState = state; for (;;) { int idx = o.<Integer>index(); int sidx = localState.get(); if (idx != sidx) { Integer j = localState.replayObserverFromIndex(idx, o); o.index(j); } synchronized (o) { if (sidx == localState.get()) { o.emitting = false; skipFinal = true; break; } } } } finally { if (!skipFinal) { synchronized (o) { o.emitting = false; } } } } }; ssm.onTerminated = new Action1<SubjectObserver<T>>() { @Override public void call(SubjectObserver<T> o) { Integer idx = o.index(); if (idx == null) { idx = 0; } state.replayObserverFromIndex(idx, o); } }; return new ReplaySubject<T>(ssm, ssm, state); }
Source:
<code>public void unregisterJob(final String groupName) throws SchedulerException { if(!ifJobExist(groupName)) { logger.warn("can not find job with " + groupName + " in quartz."); } else { <START> this.scheduler.deleteJob(new JobKey("job1", groupName)); <END> } }</code><technical_language>job1</technical_language>

Target:
public void unregisterJob(final String groupName) throws SchedulerException { if(!ifJobExist(groupName)) { logger.warn("can not find job with " + groupName + " in quartz."); } else { this.scheduler.deleteJob(new JobKey(DEFAULT_JOB_NAME, groupName)); } }
Source:
<code><START> public Set<String> fetchSpecies(SemanticQueryTerm geneQueryTerm) { <END> SolrQuery query = new SolrQuery(); query.setRows(1); query.setQuery( geneQueryTerm.hasNoCategory() ? MessageFormat.format("bioentity_identifier:\"{0}\"", geneQueryTerm.value()) : geneQueryTerm.asGxaIndexQueryLiteral()); return solrClient.query(query, false, "species"); }</code><technical_language>This is confusing correct: is default property name "bioentity_identifier" ? If category needs there, method a SemanticQueryTerm a category? delegating SemanticQueryTerm::asGxaIndexQueryLiteral adding this special case here</technical_language>

Target:
public Set<String> fetchSpecies(SemanticQueryTerm geneQueryTerm) { SolrQuery query = new SolrQuery(); query.setRows(1); if (geneQueryTerm.hasNoCategory()) { query.setQuery(MessageFormat.format("bioentity_identifier:\"{0}\"", geneQueryTerm.value())); } Set<String> queryResults = solrClient.query(query, false, "species"); if (!queryResults.isEmpty()) { return queryResults; } query.setQuery(geneQueryTerm.asBioentitiesIndexQueryLiteral()); return solrClient.query(query, false, "species"); }
Source:
<code>public void visitMethodInvocation(MethodInvocationTree syntaxNode) { for (MethodMatcher matcher : CLOSEABLE_EXCEPTIONS) { if (matcher.matches(syntaxNode)) { return; } } if (syntaxNode.methodSelect().is(Tree.Kind.MEMBER_SELECT) && needsClosing(syntaxNode.symbolType())) { final ExpressionTree targetExpression = ((MemberSelectExpressionTree) syntaxNode.methodSelect()).expression(); <START> boolean jdbcResourceCreation = isJdbcResourceCreation(syntaxNode); <END> if (targetExpression.is(Tree.Kind.IDENTIFIER) && !isWithinTryHeader(syntaxNode) && (syntaxNode.symbol().isStatic() || jdbcResourceCreation)) { SymbolicValue peekedValue = programState.peekValue(); programState = programState.addConstraintTransitively(peekedValue, OPEN); if (jdbcResourceCreation) { programState = programState.addConstraint(peekedValue, ObjectConstraint.NOT_NULL); } } } }</code><technical_language>need for a dedicated method anymore, I inline remaining usage. I calling JDBC_RESOURCE_CREATIONS.anyMatch(syntaxNode) is explicit enough assignment</technical_language>

Target:
public void visitMethodInvocation(MethodInvocationTree syntaxNode) { for (MethodMatcher matcher : CLOSEABLE_EXCEPTIONS) { if (matcher.matches(syntaxNode)) { return; } } if (syntaxNode.methodSelect().is(Tree.Kind.MEMBER_SELECT) && needsClosing(syntaxNode.symbolType())) { final ExpressionTree targetExpression = ((MemberSelectExpressionTree) syntaxNode.methodSelect()).expression(); boolean jdbcResourceCreation = JDBC_RESOURCE_CREATIONS.anyMatch(syntaxNode); if (targetExpression.is(Tree.Kind.IDENTIFIER) && !isWithinTryHeader(syntaxNode) && (syntaxNode.symbol().isStatic() || jdbcResourceCreation)) { SymbolicValue peekedValue = programState.peekValue(); programState = programState.addConstraintTransitively(peekedValue, OPEN); if (jdbcResourceCreation) { programState = programState.addConstraint(peekedValue, ObjectConstraint.NOT_NULL); } } } }
Source:
<code>public static SupportedAdditionalClusterFeature getEnabledFeature(BackendResource resource, Guid clusterId, Guid id) { Set<SupportedAdditionalClusterFeature> addlFeatures = resource.getOptionalEntity(Set.class, QueryType.GetClusterFeaturesByClusterId, new IdQueryParameters(clusterId), clusterId.toString(), <START> false); <END> SupportedAdditionalClusterFeature feature = addlFeatures .stream() .filter(f -> f.getFeature().getId().equals(id) && f.isEnabled()) .findFirst() .orElseThrow(() -> new WebApplicationException(Response.Status.NOT_FOUND)); return feature; }</code><technical_language>if result is null? check it</technical_language>

Target:
public static SupportedAdditionalClusterFeature getEnabledFeature(BackendResource resource, Guid clusterId, Guid id) { Set<SupportedAdditionalClusterFeature> addlFeatures = resource.getOptionalEntity(Set.class, QueryType.GetClusterFeaturesByClusterId, new IdQueryParameters(clusterId), clusterId.toString(), false); SupportedAdditionalClusterFeature feature = addlFeatures .stream() .filter(f -> f.getFeature().getId().equals(id) && f.isEnabled()) .findFirst() .orElse(null); return feature; }
Source:
<code>public List<RefundHistory> searchAllHistoryByChargeExternalId(String chargeExternalId) { String query = "SELECT r.id, r.external_id, r.amount, r.status, charge_id, r.created_date, r.version, " + "r.reference, history_start_date, history_end_date, user_external_id, r.gateway_transaction_id, " + "c.external_id AS charge_external_id, c.gateway_account_id, r.user_email " + " FROM refunds_history r , charges c" + <START> " WHERE charge_external_id = ?1" + <END> " and r.charge_external_id = c.external_id"; return entityManager.get() .createNativeQuery(query, "RefundEntityHistoryMapping") .setParameter(1, chargeExternalId) .getResultList(); }</code><technical_language>remove join Charges ? gateway_account_id in query. If a separate PR</technical_language>

Target:
public List<RefundHistory> searchAllHistoryByChargeExternalId(String chargeExternalId) { String query = "SELECT r.id, r.external_id, r.amount, r.status, r.charge_id, r.created_date, r.version, " + "r.reference, history_start_date, history_end_date, user_external_id, r.gateway_transaction_id, " + "r.charge_external_id AS charge_external_id, r.user_email " + " FROM refunds_history r " + " WHERE charge_external_id = ?1"; return entityManager.get() .createNativeQuery(query, "RefundEntityHistoryMapping") .setParameter(1, chargeExternalId) .getResultList(); }
Source:
<code>private Acl createAcl(DocId docId, Permissions.Acl permissions, PermissionSource permSrc, String parentFragment) { return createAcl(docId, parentFragment, <START> Acl.InheritanceType.CHILD_OVERRIDES, <END> options.getGlobalNamespace(), permissions.getAllowUsers(permSrc), permissions.getDenyUsers(permSrc), permissions.getAllowGroups(permSrc), permissions.getDenyGroups(permSrc)); }</code><technical_language>I I added inheritance type a parameter for inherited ACLs. If want touch existing code, do in followup, too</technical_language>

Target:
private Acl createAcl(DocId docId, Permissions.Acl permissions, PermissionSource permSrc, String parentFragment) { return createAcl(docId, parentFragment, Acl.InheritanceType.CHILD_OVERRIDES, permissions.getAllowUsers(permSrc), permissions.getDenyUsers(permSrc), permissions.getAllowGroups(permSrc), permissions.getDenyGroups(permSrc)); }