auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void updateSealedStateOfReplicas(List<InstanceConfig> instanceConfigs) { for (InstanceConfig instanceConfig : instanceConfigs) { AmbryDataNode node = instanceNameToAmbryDataNode.get(instanceConfig.getInstanceName()); List<String> sealedReplicas = getSealedReplicas(instanceConfig); for (AmbryReplica replica : ambryDataNodeToAmbryReplicas.get(node)) { <START> replica.setSealedState(sealedReplicas.contains(replica.getPartitionId().toPathString())); <END> } } sealedStateChangeCounter.incrementAndGet(); }</code><technical_language>minor: doc</technical_language>

Target:
private void updateSealedStateOfReplicas(List<InstanceConfig> instanceConfigs) { for (InstanceConfig instanceConfig : instanceConfigs) { AmbryDataNode node = instanceNameToAmbryDataNode.get(instanceConfig.getInstanceName()); HashSet<String> sealedReplicas = new HashSet<>(getSealedReplicas(instanceConfig)); for (AmbryReplica replica : ambryDataNodeToAmbryReplicas.get(node)) { replica.setSealedState(sealedReplicas.contains(replica.getPartitionId().toPathString())); } } }
Source:
<code>public void enableTable(TableName tableName) throws IOException { <START> disabledTables.remove(tableName); <END> LOG.warn("Table " + tableName + " was enabled in memory only."); }</code><technical_language>disable table some validity checks, this</technical_language>

Target:
public void enableTable(TableName tableName) throws IOException { TableName.isLegalFullyQualifiedTableName(tableName.getName()); if (!this.tableExists(tableName)) { throw new TableNotFoundException(tableName); } disabledTables.remove(tableName); LOG.warn("Table " + tableName + " was enabled in memory only."); }
Source:
<code>public void sendRequest(final Exchange exchange, Request request) { if (request.getMID() == Message.NONE) { request.setMID(currendMID.getAndIncrement() & 0x0000FFFF); } KeyMID idByMID = new KeyMID(request.getMID(), null, 0); KeyToken idByToken; if (request.getToken() == null) { byte[] token; do { token = createNewToken(); idByToken = new KeyToken(token); } while (exchangesByToken.get(idByToken) != null); request.setToken(token); } else { idByToken = new KeyToken(request.getToken()); if (!(exchange.getFailedTransmissionCount()>0 || request.getOptions().hasBlock1() || request.getOptions().hasBlock2() || request.getOptions().hasObserve()) && exchangesByToken.get(idByToken) != null) { LOGGER.warning("Manual token overrides existing open request: "+idByToken); } } exchange.setObserver(exchangeObserver); if (LOGGER.isLoggable(Level.FINE)) LOGGER.fine("Stored open request by "+idByMID+", "+idByToken); exchangesByMID.put(idByMID, exchange); exchangesByToken.put(idByToken, exchange); if(request.isMulticast()) { executor.schedule(new Runnable() { @Override public void run() { exchange.getCurrentRequest().setTimedOut(true); <START> exchange.setTimedOut(); <END> } }, multicastMaxLifetime, TimeUnit.MILLISECONDS); } }</code><technical_language>Timeout related CON messages. RFC 7252, 8.1, page 65, multicast messages a timeout apply. Try cancel()</technical_language>

Target:
public void sendRequest(final Exchange exchange, Request request) { if (request.getMID() == Message.NONE) { request.setMID(currendMID.getAndIncrement() & 0x0000FFFF); } KeyMID idByMID = new KeyMID(request.getMID(), null, 0); KeyToken idByToken; if (request.getToken() == null) { byte[] token; do { token = createNewToken(); idByToken = new KeyToken(token); } while (exchangesByToken.get(idByToken) != null); request.setToken(token); } else { idByToken = new KeyToken(request.getToken()); if (!(exchange.getFailedTransmissionCount()>0 || request.getOptions().hasBlock1() || request.getOptions().hasBlock2() || request.getOptions().hasObserve()) && exchangesByToken.get(idByToken) != null) { LOGGER.warning("Manual token overrides existing open request: "+idByToken); } } exchange.setObserver(exchangeObserver); if (LOGGER.isLoggable(Level.FINE)) LOGGER.fine("Stored open request by "+idByMID+", "+idByToken); exchangesByMID.put(idByMID, exchange); exchangesByToken.put(idByToken, exchange); if(request.isMulticast()) { executor.schedule(new Runnable() { @Override public void run() { if(exchange.getResponse() == null) { exchange.getCurrentRequest().setCanceled(true); } exchange.setComplete(); } }, multicastMaxLifetime, TimeUnit.MILLISECONDS); } }
Source:
<code>public void onActivityResult(int requestCode, int resultCode, Intent data) { switch (requestCode) { case CAMERA_REQUEST: case REQUEST_CHOOSER: if (resultCode == Activity.RESULT_OK) { File dataFile = null; if (data == null) { Utils.d("Oops... Result was OK, but intent was null. That's just great."); dataFile = mTempImageFile; } else { dataFile = FileUtils.getFile(getActivity(), data.getData()); } if (dataFile == null || !dataFile.exists()) { Utils.d("Empty result was found!"); return; } IndexedFolder dir = mContentManager.getCurrentFolder(); mContentManager.addFile(dir, dataFile, new IOnResult<IndexedFile>() { @Override public void onResult(IndexedFile result) { if (result != null) { ArrayList<IndexedItem> itemList = new ArrayList<IndexedItem>(); itemList.add(result); mActionManager.actionLock(itemList, null); Utils.toast(R.string.content_success_add); } else { Utils.toast(R.string.content_fail_add); } } }); } break; case REQUEST_DIRECTORY: if(resultCode == DirectoryChooserActivity.RESULT_CODE_DIR_SELECTED){ File exportDir = new File(data.getStringExtra(DirectoryChooserActivity.RESULT_SELECTED_DIR)); <START> mActionManager.actionRestore(getSelectedItems(), null, exportDir); <END> } break; } }</code><technical_language>tabs spaces</technical_language>

Target:
public void onActivityResult(int requestCode, int resultCode, Intent data) { switch (requestCode) { case CONTENT_REQUEST: case REQUEST_CHOOSER: if (resultCode == Activity.RESULT_OK) { File dataFile = null; if (data == null) { Utils.d("Oops... Result was OK, but intent was null. That's just great."); dataFile = mTempResultFile; } else { Uri uri = data.getData(); dataFile = FileUtils.getFile(getActivity(), uri); } if (dataFile == null) { Utils.d("Empty result was found!"); return; } if (!dataFile.exists()) { Utils.d("File with result does not exist...!"); return; } IndexedFolder dir = mContentManager.getCurrentFolder(); mContentManager.addFile(dir, dataFile, new IOnResult<IndexedFile>() { @Override public void onResult(IndexedFile result) { if (result != null) { ArrayList<IndexedItem> itemList = new ArrayList<IndexedItem>(); itemList.add(result); mActionManager.actionLock(itemList, null); result.getOriginalFile().delete(); Utils.toast(R.string.content_success_add); } else { Utils.toast(R.string.content_fail_add); } } }); } break; case REQUEST_DIRECTORY: if (resultCode == DirectoryChooserActivity.RESULT_CODE_DIR_SELECTED) { File exportDir = new File(data.getStringExtra(DirectoryChooserActivity.RESULT_SELECTED_DIR)); mActionManager.actionRestore(getSelectedItems(), null, exportDir); } break; } }
Source:
<code>public BigtableHBaseVeneerSettings(Configuration configuration) throws IOException { super(configuration); this.configuration = configuration; this.dataSettings = buildBigtableDataSettings().build(); this.tableAdminSettings = buildBigtableTableAdminSettings().build(); <START> } <END></code><technical_language>I buildBigtable*Settings return built settings InstanceAdmin return null if emulator is enabled</technical_language>

Target:
public BigtableHBaseVeneerSettings(Configuration configuration) throws IOException { super(configuration); this.configuration = configuration; this.dataSettings = buildBigtableDataSettings(); this.tableAdminSettings = buildBigtableTableAdminSettings(); if (!isNullOrEmpty(configuration.get(BIGTABLE_EMULATOR_HOST_KEY))) { this.instanceAdminSettings = null; } else { this.instanceAdminSettings = buildBigtableInstanceAdminSettings(); } String dataEndpoint = dataSettings.getStubSettings().getEndpoint(); this.dataHost = dataEndpoint.substring(0, dataEndpoint.lastIndexOf(":")); String adminEndpoint = tableAdminSettings.getStubSettings().getEndpoint(); this.adminHost = adminEndpoint.substring(0, adminEndpoint.lastIndexOf(":")); this.port = Integer.parseInt(dataEndpoint.substring(dataEndpoint.lastIndexOf(":") + 1)); this.bulkMaxRowKeyCount = dataSettings .getStubSettings() .bulkMutateRowsSettings() .getBatchingSettings() .getElementCountThreshold() .intValue(); this.batchingMaxMemory = dataSettings .getStubSettings() .bulkMutateRowsSettings() .getBatchingSettings() .getFlowControlSettings() .getMaxOutstandingRequestBytes(); if (Boolean.parseBoolean(configuration.get(BIGTABLE_USE_CACHED_DATA_CHANNEL_POOL)) || Boolean.parseBoolean(configuration.get(BIGTABLE_USE_BATCH))) { this.isChannelPoolCachingEnabled = true; } else { this.isChannelPoolCachingEnabled = false; } }
Source:
<code>public void close() { final List<RuntimeException> suppressed = new ArrayList<>(); <START> captureException(this::flush, suppressed); <END> captureException(() -> cache.close(cacheName), suppressed); captureException(super::close, suppressed); if (!suppressed.isEmpty()) { final RuntimeException toThrow = new RuntimeException("Caught an exception while closing caching key value store for store " + name()); for (final RuntimeException e : suppressed) { toThrow.addSuppressed(e); } throw toThrow; } }</code><technical_language>discussed offline, I call cache.flush(cacheName) instead of this.flush right</technical_language>

Target:
public void close() { lock.writeLock().lock(); try { final LinkedList<RuntimeException> suppressed = executeAll( () -> cache.flush(cacheName), () -> cache.close(cacheName), wrapped()::close ); if (!suppressed.isEmpty()) { throwSuppressed("Caught an exception while closing caching key value store for store " + name(), suppressed); } } finally { lock.writeLock().unlock(); } }
Source:
<code>public boolean test(HermesResponse response) { <START> return (response != null) && (isClientTimeoutOrServerError(response) || isFailedExceptionally(response)); <END> }</code><technical_language>if i get right: if response is null, retry. i retry if response is null. btw caused this in case? be: response == null || ...</technical_language>

Target:
public boolean test(HermesResponse response) { return response == null || (isClientTimeoutOrServerError(response) || isFailedExceptionally(response)); }
Source:
<code>public VSpan(AnnotationLayer aLayer, AnnotationFS aFS, String aType, VRange aOffsets, Map<String, String> aFeatures, Map<String, String> aHoverFeatures) { this(aLayer, new VID(getAddr(aFS)), aType, asList(aOffsets), aFeatures, <START> aHoverFeatures, null, null); <END> }</code><technical_language>suggest add action buttons flag constructor set a setter. constructor signature is large enough</technical_language>

Target:
public VSpan(AnnotationLayer aLayer, AnnotationFS aFS, String aType, VRange aOffsets, Map<String, String> aFeatures, Map<String, String> aHoverFeatures) { this(aLayer, new VID(getAddr(aFS)), aType, asList(aOffsets), aFeatures, aHoverFeatures, null); }
Source:
<code>public void testNoBucketProbing() throws Exception { Configuration configuration = this.getConfiguration(); configuration.setInt(S3A_BUCKET_PROBE, 0); try { fs = FileSystem.get(uri, configuration); } catch (IOException ex) { LOG.error("Exception : ", ex); <START> fail("Exception shouldn't have occurred"); <END> } assertNotNull("FileSystem should have been initialized", fs); Path path = new Path(uri); intercept(FileNotFoundException.class, () -> fs.getFileStatus(path)); Path src = new Path(fs.getUri() + "/testfile"); byte[] data = dataset(1024, 'a', 'z'); intercept(FileNotFoundException.class, () -> writeDataset(fs, src, data, data.length, 1024 * 1024, true)); }</code><technical_language>do this...just exception thrown</technical_language>

Target:
public void testNoBucketProbing() throws Exception { describe("Disable init-time probes and expect FS operations to fail"); Configuration conf = createConfigurationWithProbe(0); conf.set(S3_METADATA_STORE_IMPL, S3GUARD_METASTORE_NULL); fs = FileSystem.get(uri, conf); Path root = new Path(uri); expectUnknownStore( () -> fs.getFileStatus(root)); expectUnknownStore( () -> fs.listStatus(root)); Path src = new Path(root, "testfile"); Path dest = new Path(root, "dst"); expectUnknownStore( () -> fs.getFileStatus(src)); expectUnknownStore(() -> fs.exists(src)); expectUnknownStore(() -> fs.isFile(src)); expectUnknownStore(() -> fs.isDirectory(src)); expectUnknownStore(() -> fs.mkdirs(src)); expectUnknownStore(() -> fs.delete(src)); expectUnknownStore(() -> fs.rename(src, dest)); byte[] data = dataset(1024, 'a', 'z'); expectUnknownStore( () -> writeDataset(fs, src, data, data.length, 1024 * 1024, true)); }
Source:
<code>public void testValidContainerIdWhenContainerIdIsValidInTheSecondAttempt() { final ServerTemplate template = mock(ServerTemplate.class); final ContainerSpec containerSpec = mock(ContainerSpec.class); when(template.getContainerSpec("org.jbpm:Evaluation:1.0")).thenReturn(containerSpec); when(template.getContainerSpec("org.jbpm:Evaluation:1.0-2")).thenReturn(null); doReturn(template).when(specManagementService).getServerTemplate(TEMPLATE_ID); final String containerId = specManagementServiceCDI.validContainerId(TEMPLATE_ID, "org.jbpm:Evaluation:1.0"); <START> assertEquals(containerId, "org.jbpm:Evaluation:1.0-2"); <END> }</code><technical_language>"org.jbpm:Evaluation:1.0-2" is repeated, in variable</technical_language>

Target:
public void testValidContainerIdWhenContainerIdIsValidInTheSecondAttempt() { final ServerTemplate template = mock(ServerTemplate.class); final ContainerSpec containerSpec = mock(ContainerSpec.class); when(template.getContainerSpec(EVALUATION_GAV_1_0)).thenReturn(containerSpec); when(template.getContainerSpec(EVALUATION_GAV_1_0_2)).thenReturn(null); doReturn(template).when(specManagementService).getServerTemplate(TEMPLATE_ID); final String containerId = specManagementServiceCDI.validContainerId(TEMPLATE_ID, EVALUATION_GAV_1_0); assertEquals(containerId, EVALUATION_GAV_1_0_2); }
Source:
<code>public void referenceChange(Match match, EReference reference, EObject value, DifferenceKind kind, DifferenceSource source) { if (!alreadyChanged.contains(reference)) { switch (kind) { case MOVE: <START> distance += weightProviderRegistry.getHighestRankingWeightProvider(reference) <END> .getWeight(reference) * orderChangeCoef; break; case ADD: case DELETE: case CHANGE: distance += weightProviderRegistry.getHighestRankingWeightProvider(reference) .getWeight(reference); break; default: break; } alreadyChanged.add(reference); } else { distance += 1; } }</code><technical_language>getHighestRankingProvider is called in performance critical loops (like millions of calls a comparison). implementation sustainable if called (I a quick extension point is parsed parsed parsed again), Calling for EObject overkill too. In understanding a weightprovider scope is nsURI. I added this commit scattered accross change</technical_language>

Target:
public void referenceChange(Match match, EReference reference, EObject value, DifferenceKind kind, DifferenceSource source) { if (!alreadyChanged.contains(reference)) { switch (kind) { case MOVE: distance += weightProviderRegistry.getHighestRankingWeightProvider( reference.eClass().getEPackage()).getWeight(reference) * orderChangeCoef; break; case ADD: case DELETE: case CHANGE: distance += weightProviderRegistry.getHighestRankingWeightProvider( reference.eClass().getEPackage()).getWeight(reference); break; default: break; } alreadyChanged.add(reference); } else { distance += 1; } }
Source:
<code>public Resource decorate(final Resource resource) { try { if (!this.accepts(resource)) { return resource; } } catch (Exception e) { if (LOG.isDebugEnabled()) { <START> LOG.debug("Failed binary sync check for remote asset: - {}", resource.getPath(), e.getMessage()); <END> } return resource; } Resource ret = resource; try { remoteResourcesSyncing.add(resource.getPath()); LOG.info("Sync'ing remote asset binaries: {}", resource.getPath()); ret = this.assetSync.syncAsset(resource); } catch (Exception e) { LOG.error("Failed to sync binaries for remote asset: - {}", resource.getPath(), e.getMessage()); } finally { remoteResourcesSyncing.remove(resource.getPath()); } return ret; }</code><technical_language>LOG.debug("Failed binary sync check for remote asset: {}", resource.getPath(), e.getMessage()); ... expose full stacktrace message</technical_language>

Target:
public Resource decorate(final Resource resource) { try { if (!this.accepts(resource)) { return resource; } } catch (Exception e) { LOG.debug("Failed binary sync check for remote asset: - {}", resource.getPath()); return resource; } boolean syncSuccessful = false; if (remoteResourcesSyncing.contains(resource.getPath())) { syncSuccessful = waitForSyncInProgress(resource); } else { syncSuccessful = syncAssetBinaries(resource); } if (syncSuccessful) { LOG.debug("Refreshing resource after binary sync of {}"); resource.getResourceResolver().refresh(); return resource.getResourceResolver().getResource(resource.getPath()); } else { return resource; } }
Source:
<code>public BlockManagementTaskResult run() { LOG.debug("Running align task."); final int alignRange = ServerConfiguration.getInt(PropertyKey.WORKER_MANAGEMENT_TIER_ALIGN_RANGE); BlockManagementTaskResult result = new BlockManagementTaskResult(); for (Pair<BlockStoreLocation, BlockStoreLocation> intersection : mMetadataManager .getStorageTierAssoc().intersectionList()) { BlockStoreLocation tierUpLoc = intersection.getFirst(); BlockStoreLocation tierDownLoc = intersection.getSecond(); Pair<List<Long>, List<Long>> swapLists = mMetadataManager.getBlockIterator().getSwaps( tierUpLoc, BlockOrder.Natural, tierDownLoc, BlockOrder.Reverse, alignRange, BlockOrder.Reverse, (blockId) -> !mEvictorView.isBlockEvictable(blockId)); Preconditions.checkArgument(swapLists.getFirst().size() == swapLists.getSecond().size()); LOG.debug("Acquired block pairs to align tiers - {}", swapLists.getFirst().size(), tierUpLoc.tierAlias(), tierDownLoc.tierAlias()); Consumer<Exception> excHandler = (e) -> { if (e instanceof WorkerOutOfSpaceException) { <START> LOG.warn("No sufficient space for worker swap space, swap restore task called."); <END> TierManagementTaskProvider.setSwapRestoreRequired(true); } }; BlockOperationResult tierResult = mTransferExecutor.executeTransferList(generateSwapTransferInfos(swapLists), excHandler); result.addOpResults(BlockOperationType.ALIGN_SWAP, tierResult); } return result; }</code><technical_language>suggestion LOG.warn("Insufficient space for worker swap space, swap restore task called.");</technical_language>

Target:
public BlockManagementTaskResult run() { LOG.debug("Running align task."); final int alignRange = ServerConfiguration.getInt(PropertyKey.WORKER_MANAGEMENT_TIER_ALIGN_RANGE); BlockManagementTaskResult result = new BlockManagementTaskResult(); for (Pair<BlockStoreLocation, BlockStoreLocation> intersection : mMetadataManager .getStorageTierAssoc().intersectionList()) { BlockStoreLocation tierUpLoc = intersection.getFirst(); BlockStoreLocation tierDownLoc = intersection.getSecond(); Pair<List<Long>, List<Long>> swapLists = mMetadataManager.getBlockIterator().getSwaps( tierUpLoc, BlockOrder.Natural, tierDownLoc, BlockOrder.Reverse, alignRange, BlockOrder.Reverse, (blockId) -> !mEvictorView.isBlockEvictable(blockId)); Preconditions.checkArgument(swapLists.getFirst().size() == swapLists.getSecond().size()); LOG.debug("Acquired block pairs to align tiers - {}", swapLists.getFirst().size(), tierUpLoc.tierAlias(), tierDownLoc.tierAlias()); Consumer<Exception> excHandler = (e) -> { if (e instanceof WorkerOutOfSpaceException) { LOG.warn("Insufficient space for worker swap space, swap restore task called."); TierManagementTaskProvider.setSwapRestoreRequired(true); } }; BlockOperationResult tierResult = mTransferExecutor.executeTransferList(generateSwapTransferInfos(swapLists), excHandler); result.addOpResults(BlockOperationType.ALIGN_SWAP, tierResult); } return result; }
Source:
<code>public void Type(int type) { <START> this.type = type; <END> boolean chartViewExists = (chartView != null); if (chartViewExists) { view.removeView(chartView.getView()); } chartView = createChartViewFromType(type); view.addView(chartView.getView(), 0); if (chartViewExists) { reinitializeChart(); } }</code><technical_language>Check type is valid in case in future add new types. Newer companions understand new types break companions giving types understand</technical_language>

Target:
public void Type(int type) { if (type >= 0 && type < ComponentConstants.CHART_TYPES) { this.type = type; boolean chartViewExists = (chartView != null); if (chartViewExists) { view.removeView(chartView.getView()); } chartView = createChartViewFromType(type); view.addView(chartView.getView(), 0); if (chartViewExists) { reinitializeChart(); } } }
Source:
<code>public void init() { loadProperties(); httpClient = HttpUtils.createDefaultExecutor(); <START> threadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 8); <END> }</code><technical_language>8? this property defined a private static final String a name explain is</technical_language>

Target:
public void init() { loadProperties(); httpClient = HttpUtils.createDefaultExecutor(); threadPool = Executors.newFixedThreadPool(THREAD_POOL_SIZE); }
Source:
<code>public boolean isContainer(){ <START> return descendants != null; <END> }</code><technical_language>I null a sentinel if avoid (since nice able empty objects avoid crashes null references). I server guarantees children is nil empty list</technical_language>

Target:
public boolean isContainer(){ return type != null ? type.isContainer() : (descendants != null && descendants.size() > 0); }
Source:
<code>public void linkNewChild(HTNode childNode) { rwl.writeLock().lock(); try { <START> assert(nbChildren < getConfig().getMaxChildren()); <END> children[nbChildren] = childNode.getSequenceNumber(); childStart[nbChildren] = childNode.getNodeStart(); nbChildren++; } finally { rwl.writeLock().unlock(); } }</code><technical_language>replace if()throw exception</technical_language>

Target:
public void linkNewChild(HTNode childNode) { rwl.writeLock().lock(); try { if(nbChildren >= getConfig().getMaxChildren()){ throw new IllegalStateException("Asked to link another child but parent already has maximum number of children"); } children[nbChildren] = childNode.getSequenceNumber(); childStart[nbChildren] = childNode.getNodeStart(); nbChildren++; } finally { rwl.writeLock().unlock(); } }
Source:
<code>private void reorderClustersBasedOnImplicitTags(List<Long> clusterList, int requiredCpu, long requiredRam) { final HashMap<Long, Long> UniqueTagsInClusterMap = new HashMap<Long, Long>(); <START> Long uniqueTags; <END> for (Long clusterId : clusterList) { uniqueTags = 0L; List<Long> hostList = capacityDao.listHostsWithEnoughCapacity(requiredCpu, requiredRam, clusterId, Host.Type.Routing.toString()); if (!hostList.isEmpty() && implicitHostTags.length > 0) { uniqueTags = new Long(hostTagsDao.getDistinctImplicitHostTags(hostList, implicitHostTags).size()); } UniqueTagsInClusterMap.put(clusterId, uniqueTags); } Collections.sort(clusterList, new Comparator<Long>() { @Override public int compare(Long o1, Long o2) { Long t1 = UniqueTagsInClusterMap.get(o1); Long t2 = UniqueTagsInClusterMap.get(o2); return t1.compareTo(t2); } }); }</code><technical_language>declare this variable loop</technical_language>

Target:
public void reorderClustersBasedOnImplicitTags(List<Long> clusterList, int requiredCpu, long requiredRam) { Map<Long, Long> UniqueTagsInClusterMap = new HashMap<>(); for (Long clusterId : clusterList) { long uniqueTags = 0l; List<Long> hostList = capacityDao.listHostsWithEnoughCapacity(requiredCpu, requiredRam, clusterId, Host.Type.Routing.toString()); if (!hostList.isEmpty() && implicitHostTags.length > 0) { uniqueTags = hostTagsDao.getDistinctImplicitHostTags(hostList, implicitHostTags).size(); } UniqueTagsInClusterMap.put(clusterId, uniqueTags); } Collections.sort(clusterList, new Comparator<Long>() { @Override public int compare(Long o1, Long o2) { Long t1 = UniqueTagsInClusterMap.get(o1); Long t2 = UniqueTagsInClusterMap.get(o2); return t1.compareTo(t2); } }); }
Source:
<code>public void configurePipeline(PipelineConfigurer pipelineConfigurer) throws IllegalArgumentException { FailureCollector collector = pipelineConfigurer.getStageConfigurer().getFailureCollector(); Schema inputSchema = pipelineConfigurer.getStageConfigurer().getInputSchema(); if (inputSchema != null) { if (config.messageField != null && inputSchema.getField(config.messageField) != null) { collector.addFailure( String.format("Input schema already contains message field '%s'.", config.messageField), <START> "Please set message field to a different value.") <END> .withConfigProperty(MESSAGE_FIELD).withInputSchemaField(config.messageField); } if (config.codeField != null && inputSchema.getField(config.codeField) != null) { collector.addFailure( String.format("Input schema already contains code field '%s'.", config.codeField), "Please set code field to a different value.") .withConfigProperty(CODE_FIELD).withInputSchemaField(config.codeField); } if (config.stageField != null && inputSchema.getField(config.stageField) != null) { collector.addFailure( String.format("Input schema already contains stage field '%s'.", config.stageField), "Please set stage field to a different value.") .withConfigProperty(STAGE_FIELD).withInputSchemaField(config.stageField); } Schema outputSchema = getOutputSchema(config, inputSchema); pipelineConfigurer.getStageConfigurer().setOutputSchema(outputSchema); } }</code><technical_language>messages, stopped putting 'Please', weird in some places others, sense. Set message field a</technical_language>

Target:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) { FailureCollector collector = pipelineConfigurer.getStageConfigurer().getFailureCollector(); Schema inputSchema = pipelineConfigurer.getStageConfigurer().getInputSchema(); if (inputSchema != null) { if (config.messageField != null && inputSchema.getField(config.messageField) != null) { collector.addFailure( String.format("Input schema already contains field '%s'.", config.messageField), "Set message field to a different value.") .withConfigProperty(Config.MESSAGE_FIELD).withInputSchemaField(config.messageField); } if (config.codeField != null && inputSchema.getField(config.codeField) != null) { collector.addFailure( String.format("Input schema already contains field '%s'.", config.codeField), "Set code field to a different value.") .withConfigProperty(Config.CODE_FIELD).withInputSchemaField(config.codeField); } if (config.stageField != null && inputSchema.getField(config.stageField) != null) { collector.addFailure( String.format("Input schema already contains field '%s'.", config.stageField), "Set stage field to a different value.") .withConfigProperty(Config.STAGE_FIELD).withInputSchemaField(config.stageField); } Schema outputSchema = getOutputSchema(config, inputSchema); pipelineConfigurer.getStageConfigurer().setOutputSchema(outputSchema); } }
Source:
<code>public void assertIsCloseToPercentage(AssertionInfo info, Long actual, Long other, Percentage<Long> percentage) { assertNotNull(info, actual); checkPercentageIsNotNull(percentage); checkNumberIsNotNull(other); if (org.assertj.core.util.Objects.areEqual(actual, other)) return; Offset<Double> calculatedOffset = offset(percentage.value * other / 100d); Long absDiff = abs(other - actual); if (absDiff > calculatedOffset.value) throw failures.failure(info, ShouldBeEqualWithinPercentage <START> .shouldBeEqualWithinPercentage(actual, other, percentage, absDiff)); <END> }</code><technical_language>static import shouldBeEqualWithinPercentage, code more readable applies other classes</technical_language>

Target:
public void assertIsCloseToPercentage(AssertionInfo info, Long actual, Long other, Percentage<Long> percentage) { assertNotNull(info, actual); checkPercentageIsNotNull(percentage); checkNumberIsNotNull(other); Offset<Double> calculatedOffset = offset(percentage.value * other / 100d); Long absDiff = abs(other - actual); if (absDiff > calculatedOffset.value) throw failures.failure(info, shouldBeEqualWithinPercentage(actual, other, percentage, absDiff)); }
Source:
<code>public static void sortImageList(List<DiskImage> images) { List<DiskImage> hold = new ArrayList<>(); DiskImage curr = null; for (int i = 0; i < images.size(); i++) { int pos = getFirstImage(images, images.get(i)); if (pos == -1) { curr = images.get(i); hold.add(images.get(i)); images.remove(images.get(i)); break; } } while (images.size() > 0) { int pos = getNextImage(images, curr); if (pos == -1) { log.error("Image list error in SortImageList"); break; } curr = images.get(pos); hold.add(images.get(pos)); images.remove(images.get(pos)); } <START> images.addAll(hold); <END> }</code><technical_language>unrelated this patch</technical_language>

Target:
public static void sortImageList(List<DiskImage> images) { List<DiskImage> hold = new ArrayList<>(); DiskImage curr = null; for (int i = 0; i < images.size(); i++) { int pos = getFirstImage(images, images.get(i)); if (pos == -1) { curr = images.get(i); hold.add(images.get(i)); images.remove(images.get(i)); break; } } while (images.size() > 0) { int pos = getNextImage(images, curr); if (pos == -1) { log.error("Image list error in SortImageList"); break; } curr = images.get(pos); hold.add(images.get(pos)); images.remove(images.get(pos)); } for (DiskImage image : hold) { images.add(image); } }
Source:
<code>public void testToJSONWithListData() throws IOException { long timestampMillis = 1496712943487L; Position position = new Position(new BinlogPosition(1L, "binlog-0001"), 0L); RowMap rowMap = new RowMap("insert", "MyDatabase", "MyTable", timestampMillis, null, position); rowMap.putData("id", "9001"); rowMap.putData("first_name", "foo"); rowMap.putData("middle_name", "buzz"); rowMap.putData("last_name", "bar"); rowMap.putData("salary", "4000"); rowMap.putData("department", "science"); rowMap.putData("interests", Arrays.asList("classical music", "hiking", "biking", "programming")); MaxwellOutputConfig outputConfig = getMaxwellOutputConfig(); <START> Assert.assertEquals("{\"database\":\"MyDatabase\",\"table\":\"MyTable\",\"type\":\"insert\",\"ts\":1496712943,\"position\":\"binlog-0001:1\",\"gtid\":null,\"data\":{\"id\":\"9001\",\"salary\":\"4000\",\"department\":\"science\",\"interests\":[\"classical music\",\"hiking\",\"biking\",\"programming\"]}}", rowMap.toJSON(outputConfig)); <END> }</code><technical_language>Again, need this sample data - if works & fields, chances work 3+</technical_language>

Target:
public void testToJSONWithListData() throws IOException { RowMap rowMap = new RowMap("insert", "MyDatabase", "MyTable", TIMESTAMP_MILLISECONDS, new ArrayList<String>(), POSITION); rowMap.putData("id", "9001"); rowMap.putData("first_name", "foo"); rowMap.putData("last_name", "bar"); rowMap.putData("interests", Arrays.asList("hiking", "programming")); rowMap.setServerId(7653213L); rowMap.setThreadId(6532312L); MaxwellOutputConfig outputConfig = getMaxwellOutputConfig(Pattern.compile("^.*name.*$")); Assert.assertEquals("{\"database\":\"MyDatabase\",\"table\":\"MyTable\",\"type\":\"insert\",\"ts\":1496712943," + "\"position\":\"binlog-0001:1\",\"gtid\":null,\"server_id\":7653213,\"thread_id\":6532312," + "\"data\":{\"id\":\"9001\",\"interests\":[\"hiking\",\"programming\"]}}", rowMap.toJSON(outputConfig)); }
Source:
<code>protected String evalNamespaceName(String workspaceId, Subject currentUser) { if (isNullOrEmpty(this.namespaceName)) { return workspaceId; } else { String tmpNamespaceName = this.namespaceName; <START> for (String placeholder : NAMESPACE_NAME_PLACEHOLDERS.keySet()) { <END> tmpNamespaceName = tmpNamespaceName.replaceAll( placeholder, NAMESPACE_NAME_PLACEHOLDERS.get(placeholder).apply(currentUser)); } return tmpNamespaceName; } }</code><technical_language>a performance improvement code clearer if check isPredefined iterating placeholders? I java protected String evalNamespaceName(String workspaceId, Subject currentUser) { if (isPredefined) { return this.namespaceName; } else if (isNullOrEmpty(this.namespaceName)) { return workspaceId; } else { String tmpNamespaceName = this.namespaceName; for (String placeholder : NAMESPACE_NAME_PLACEHOLDERS.keySet()) { tmpNamespaceName = tmpNamespaceName.replaceAll( placeholder, NAMESPACE_NAME_PLACEHOLDERS.get(placeholder).apply(currentUser)); } return tmpNamespaceName; } }</technical_language>

Target:
protected String evalNamespaceName(String workspaceId, Subject currentUser) { if (isPredefined) { return this.namespaceName; } else if (isNullOrEmpty(this.namespaceName)) { return workspaceId; } else { String tmpNamespaceName = this.namespaceName; for (String placeholder : NAMESPACE_NAME_PLACEHOLDERS.keySet()) { tmpNamespaceName = tmpNamespaceName.replaceAll( placeholder, NAMESPACE_NAME_PLACEHOLDERS.get(placeholder).apply(currentUser)); } return tmpNamespaceName; } }
Source:
<code>public void glancingTest() { Rectangle bounds = new Rectangle(0, 0, 638, 1119); <START> int x0 = 1115; int y0 = -468; int x1 = 1132; int y1 = 42; <END> Rectangle rect = LineClipper.clip(bounds, x0, y0, x1, y1); assertEquals(null, rect); }</code><technical_language>do values from</technical_language>

Target:
public void glancingTest() { Rectangle bounds = new Rectangle(0, 0, 638, 1119); int x0 = 1115; int y0 = -468; int x1 = 1132; int y1 = 42; Rectangle rect = LineClipper.clip(bounds, x0, y0, x1, y1); assertNull(rect); }
Source:
<code>public void fireResourcesAdded(List<Resource<L>> resources) { if (!resources.isEmpty()) { try { <START> inventoryListenerRWLock.readLock().lock(); <END> LOG.debugf("Firing inventory event for [%d] added/modified resources", resources.size()); InventoryEvent<L> event = new InventoryEvent<L>(EndpointService.this, resources); for (InventoryListener inventoryListener : inventoryListeners) { inventoryListener.resourcesAdded(event); } } finally { inventoryListenerRWLock.readLock().unlock(); } } }</code><technical_language>acquisition of locks (just before) entering try-catch. if wrong, finally block is try unlock a lock acquired. swap lines 89-90. Do for others</technical_language>

Target:
public void fireResourcesAdded(List<Resource<L>> resources) { if (!resources.isEmpty()) { inventoryListenerRWLock.readLock().lock(); try { LOG.debugf("Firing inventory event for [%d] added/modified resources", resources.size()); InventoryEvent<L> event = new InventoryEvent<L>(EndpointService.this, resources); for (InventoryListener inventoryListener : inventoryListeners) { inventoryListener.resourcesAdded(event); } } finally { inventoryListenerRWLock.readLock().unlock(); } } }
Source:
<code>private void importJayceFile(@Nonnull InputJackLibrary inputJackLibrary, @Nonnull InputVElement element, @Nonnull JSession session, @Nonnull String currentPath) throws JPackageLookupException, TypeImportConflictException, ResourceImportConflictException, JTypeLookupException { String path = currentPath + element.getName(); if (element.isVDir()) { for (InputVElement subFile : ((InputVDir) element).list()) { importJayceFile(inputJackLibrary, subFile, session, path + VPATH_SEPARATOR); } } else { InputVFile file = (InputVFile) element; if (isJackFileName(file.getName())) { String typeName = path.substring(0, path.length() - JAYCE_FILE_EXTENSION.length()).replace( VPATH_SEPARATOR, '.'); addImportedTypes(session, path, <START> new TypeInInputLibraryLocation(inputJackLibrary.getLocation(), typeName)); <END> } else { addImportedResource(file, session, path); } } }</code><technical_language>is right place do that. idea</technical_language>

Target:
private void importJayceFile(@Nonnull InputJackLibrary inputJackLibrary, @Nonnull InputVElement element, @Nonnull JSession session, @Nonnull String currentPath) throws JPackageLookupException, TypeImportConflictException, ResourceImportConflictException, JTypeLookupException { String path = currentPath + element.getName(); if (element.isVDir()) { for (InputVElement subFile : ((InputVDir) element).list()) { importJayceFile(inputJackLibrary, subFile, session, path + VPATH_SEPARATOR); } } else { InputVFile file = (InputVFile) element; if (isJackFileName(file.getName())) { addImportedTypes(session, path, inputJackLibrary); } else { addImportedResource(file, session, path); } } }
Source:
<code>public static String getCellValue(Workbook wb, Cell cell) { if (cell == null) { return null; } final String result; switch (cell.getCellType()) { case BLANK: case _NONE: result = null; break; case BOOLEAN: result = Boolean.toString(cell.getBooleanCellValue()); break; case ERROR: String errorResult; try { byte errorCode = cell.getErrorCellValue(); FormulaError formulaError = FormulaError.forInt(errorCode); errorResult = formulaError.getString(); } catch (RuntimeException e) { logger .debug("Getting error code for ({},{}) failed!: {}", cell.getRowIndex(), cell.getColumnIndex(), e.getMessage()); if (cell instanceof XSSFCell) { String value = ((XSSFCell) cell).getErrorCellString(); errorResult = value; } else { logger <START> .error("Couldn't handle unexpected error scenario in cell: (" + cell.getRowIndex() + "," <END> + cell.getColumnIndex() + ")", e); throw e; } } result = errorResult; break; case FORMULA: result = getFormulaCellValue(wb, cell); break; case NUMERIC: if (DateUtil.isCellDateFormatted(cell)) { Date date = cell.getDateCellValue(); if (date == null) { result = null; } else { result = DateUtils.createDateFormat().format(date); } } else { result = getNumericCellValueAsString(cell.getCellStyle(), cell.getNumericCellValue()); } break; case STRING: result = cell.getRichStringCellValue().getString(); break; default: throw new IllegalStateException("Unknown cell type: " + cell.getCellType()); } logger.debug("cell ({},{}) resolved to value: {}", cell.getRowIndex(), cell.getColumnIndex(), result); return result; }</code><technical_language>I log this error level, warning level, throwing exception, I log complete exception (only message). If do that, string format for logging, instead of appending a String together</technical_language>

Target:
public static String getCellValue(Workbook wb, Cell cell) { if (cell == null) { return null; } final String result; switch (cell.getCellType()) { case BLANK: case _NONE: result = null; break; case BOOLEAN: result = Boolean.toString(cell.getBooleanCellValue()); break; case ERROR: result = getErrorResult(cell); break; case FORMULA: result = getFormulaCellValue(wb, cell); break; case NUMERIC: if (DateUtil.isCellDateFormatted(cell)) { Date date = cell.getDateCellValue(); if (date == null) { result = null; } else { result = DateUtils.createDateFormat().format(date); } } else { result = getNumericCellValueAsString(cell.getCellStyle(), cell.getNumericCellValue()); } break; case STRING: result = cell.getRichStringCellValue().getString(); break; default: throw new IllegalStateException("Unknown cell type: " + cell.getCellType()); } logger.debug("cell ({},{}) resolved to value: {}", cell.getRowIndex(), cell.getColumnIndex(), result); return result; }
Source:
<code>public void setContext(CommandContext context) { if (context == null) { return; } CompensationContext compensationContext = context.getCompensationContext(); if (compensationContext != null) { setCompensationContext(compensationContext); } ExecutionContext executionContext = context.getExecutionContext(); if (executionContext != null) { setExecutionContext(executionContext); if (executionContext.getJob() != null) { if (executionContext.getJob().getOwnerId() != null) { <START> DbUser user = DbFacade.getInstance().getDbUserDao().get(executionContext.getJob().getOwnerId().getValue()); <END> if (user != null) { setUserName(user.getusername()); } } setJobId(executionContext.getJob().getId()); } else if (executionContext.getStep() != null) { setJobId(executionContext.getStep().getJobId()); } } if (commandLock == null) { commandLock = context.getLock(); } }</code><technical_language>please replace DbFacade.getInstance().getDbUserDao() getDbUserDAO</technical_language>

Target:
public void setContext(CommandContext context) { if (context == null) { return; } CompensationContext compensationContext = context.getCompensationContext(); if (compensationContext != null) { setCompensationContext(compensationContext); } ExecutionContext executionContext = context.getExecutionContext(); if (executionContext != null) { setExecutionContext(executionContext); if (executionContext.getJob() != null) { setJobId(executionContext.getJob().getId()); } else if (executionContext.getStep() != null) { setJobId(executionContext.getStep().getJobId()); } } if (commandLock == null) { commandLock = context.getLock(); } }
Source:
<code>protected void onLoad() { super.onLoad(); CallbackGroup cbs = new CallbackGroup(); Util.DETAIL_SVC.patchSetPublishDetail(patchSetId, cbs.add( <START> (com.google.gwtjsonrpc.common.AsyncCallback<PatchSetPublishDetail>) <END> new ScreenLoadCallback<PatchSetPublishDetail>(this) { @Override protected void preDisplay(final PatchSetPublishDetail result) { send.setEnabled(true); display(result); } @Override protected void postDisplay() { message.setFocus(true); } })); }</code><technical_language>do need this cast? Is ScreenLoadCallback implements interfaces picking wrong return type for style RPC call? If is issue add a 3rd method addOldCallback() calls type add() version compiler guess wrong for a ScreenLoadCallback</technical_language>

Target:
protected void onLoad() { super.onLoad(); CallbackGroup cbs = new CallbackGroup(); Util.DETAIL_SVC.patchSetPublishDetail(patchSetId, cbs.addGwtjsonrpc( new ScreenLoadCallback<PatchSetPublishDetail>(this) { @Override protected void preDisplay(final PatchSetPublishDetail result) { send.setEnabled(true); display(result); } @Override protected void postDisplay() { message.setFocus(true); } })); }
Source:
<code>public static void EwsAssert(boolean condition, String caller, String message) { <START> assert condition : String.format("[%s] %s", caller, message); <END> }</code><technical_language>I get rid of basic java assert this disabled in production code</technical_language>

Target:
public static void EwsAssert(boolean condition, String caller, String message) { if (!condition) { throw new RuntimeException(String.format("[%s] %s", caller, message)); } }
Source:
<code><START> protected int hash(InputRow inputRow) <END> { final Map<String, Set<String>> dims = Maps.newTreeMap(); for (final String dim : inputRow.getDimensions()) { final Set<String> dimValues = ImmutableSortedSet.copyOf(inputRow.getDimension(dim)); if (dimValues.size() > 0) { dims.put(dim, dimValues); } } final List<Object> groupKey = ImmutableList.of( inputRow.getTimestampFromEpoch(), dims ); try { return hashFunction.hashBytes(jsonMapper.writeValueAsBytes(groupKey)).asInt(); } catch (JsonProcessingException e) { throw Throwables.propagate(e); } }</code><technical_language>This private if possible</technical_language>

Target:
private int hash(InputRow inputRow) { final List<Object> groupKey = Rows.toGroupKey(inputRow.getTimestampFromEpoch(), inputRow); try { return hashFunction.hashBytes(jsonMapper.writeValueAsBytes(groupKey)).asInt(); } catch (JsonProcessingException e) { throw Throwables.propagate(e); } }
Source:
<code>public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget) { IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager(); IWorkingSet targetWorkingSet = (IWorkingSet) ((IAdaptable)aTarget).getAdapter(IWorkingSet.class); ISelection sel = LocalSelectionTransfer.getTransfer().getSelection(); <START> if (sel instanceof TreeSelection) { <END> for (TreePath path : ((ITreeSelection)sel).getPaths()) { if (path.getFirstSegment() instanceof IAdaptable) { IProject project = (IProject) ((IAdaptable)path.getLastSegment()).getAdapter(IProject.class); IWorkingSet sourceWorkingSet = (IWorkingSet) ((IAdaptable)path.getFirstSegment()).getAdapter(IWorkingSet.class); if (! targetWorkingSet.equals(sourceWorkingSet)) { if (! workingSetContains(targetWorkingSet, project)) { workingSetManager.addToWorkingSets(project, new IWorkingSet[] { targetWorkingSet }); } if (sourceWorkingSet != null) { removeFromWorkingSet(project, sourceWorkingSet); } } } } } else if (sel instanceof IStructuredSelection) { for (Object item : ((IStructuredSelection)sel).toArray()) { IProject project = (IProject) ((IAdaptable)item).getAdapter(IProject.class); if (! workingSetContains(targetWorkingSet, project)) { workingSetManager.addToWorkingSets(project, new IWorkingSet[] { targetWorkingSet }); } } } return Status.OK_STATUS; }</code><technical_language>This ITreeSelection</technical_language>

Target:
public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget) { IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager(); IWorkingSet targetWorkingSet = (IWorkingSet) ((IAdaptable)aTarget).getAdapter(IWorkingSet.class); ISelection sel = LocalSelectionTransfer.getTransfer().getSelection(); if (sel instanceof ITreeSelection) { for (TreePath path : ((ITreeSelection)sel).getPaths()) { if (path.getFirstSegment() instanceof IAdaptable) { IProject project = (IProject) ((IAdaptable)path.getLastSegment()).getAdapter(IProject.class); IWorkingSet sourceWorkingSet = (IWorkingSet) ((IAdaptable)path.getFirstSegment()).getAdapter(IWorkingSet.class); if (! targetWorkingSet.equals(sourceWorkingSet)) { if (! workingSetContains(targetWorkingSet, project)) { workingSetManager.addToWorkingSets(project, new IWorkingSet[] { targetWorkingSet }); } if (sourceWorkingSet != null) { removeFromWorkingSet(project, sourceWorkingSet); } } } } } else if (sel instanceof IStructuredSelection) { for (Object item : ((IStructuredSelection)sel).toArray()) { IProject project = (IProject) ((IAdaptable)item).getAdapter(IProject.class); if (! workingSetContains(targetWorkingSet, project)) { workingSetManager.addToWorkingSets(project, new IWorkingSet[] { targetWorkingSet }); } } } return Status.OK_STATUS; }
Source:
<code>public WiFiDirectBroadcastReceiver(WifiP2pManager manager, WiFiDirectManagementFragment activity) { super(); this.manager = manager; this.activity = activity; if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O_MR1) { <START> connectivityManager = (ConnectivityManager)activity.getContext().getSystemService(Context.CONNECTIVITY_SERVICE); <END> } }</code><technical_language>Is a specific reason initializing connectivityManager in constructor instead of need in onReceive</technical_language>

Target:
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, WiFiDirectManagementFragment activity) { super(); this.manager = manager; this.activity = activity; }
Source:
<code><START> public SignatureAndHashAlgorithm getSignatureAndHashAlgorithm(List<X509Certificate> chain) { <END> X509Certificate certificate = chain.get(0); PublicKey publicKey = certificate.getPublicKey(); if (isSupportedKeyType(certificate)) { SignatureAndHashAlgorithm signatureAndHashAlgorithm = SignatureAndHashAlgorithm .getSupportedSignatureAlgorithm(supportedSignatureAlgorithms, publicKey); if (signatureAndHashAlgorithm != null && SignatureAndHashAlgorithm.isSignedWithSupportedAlgorithms(supportedSignatureAlgorithms, chain)) { return signatureAndHashAlgorithm; } } return null; }</code><technical_language>This method sounds ? a list returned ? I for a certChain algorithm</technical_language>

Target:
public SignatureAndHashAlgorithm getSignatureAndHashAlgorithm(List<X509Certificate> chain) { X509Certificate certificate = chain.get(0); if (isSupportedKeyType(certificate)) { SignatureAndHashAlgorithm signatureAndHashAlgorithm = SignatureAndHashAlgorithm .getSupportedSignatureAlgorithm(supportedSignatureAlgorithms, certificate.getPublicKey()); if (signatureAndHashAlgorithm != null && SignatureAndHashAlgorithm.isSignedWithSupportedAlgorithms(supportedSignatureAlgorithms, chain)) { return signatureAndHashAlgorithm; } } return null; }