auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private static boolean isValid(long value, long minValue, long maxValue, long increment) { return minValue <= value && maxValue >= value && maxValue > minValue && increment != 0 && <START> Math.abs(increment) + Long.MIN_VALUE < maxValue - minValue + Long.MIN_VALUE; <END> }</code><technical_language>if maxValue is Long.MAX_VALUE (i.e. 2^63-1) minValue is Long.MIN_VALUE (i.e. -2^63), maxValue - minValue is overflow</technical_language>

Target:
private static boolean isValid(long value, long minValue, long maxValue, long increment) { return minValue <= value && maxValue >= value && maxValue > minValue && increment != 0 && Math.abs(increment) + Long.MIN_VALUE <= maxValue - minValue + Long.MIN_VALUE; }
Source:
<code>protected void runWork() throws WorkCompletedException { if (securityIntegration.getSecurityContext() != null && ((CallbackImpl) workManager.getCallbackSecurity()).isElytronEnabled()) ((ElytronSecurityContext) securityIntegration.getSecurityContext()).runWork(() -> { try { WildflyWorkWrapper.super.runWork(); } catch (WorkCompletedException e) { <START> ROOT_LOGGER.error(e.getLocalizedMessage()); <END> } }); else super.runWork(); }</code><technical_language>This a meaningful error message (i.e. a message added relevant logger), include exception stack trace (like done below)</technical_language>

Target:
protected void runWork() throws WorkCompletedException { if (securityIntegration.getSecurityContext() != null && ((CallbackImpl) workManager.getCallbackSecurity()).isElytronEnabled()) ((ElytronSecurityContext) securityIntegration.getSecurityContext()).runWork(() -> { try { WildflyWorkWrapper.super.runWork(); } catch (WorkCompletedException e) { ConnectorLogger.ROOT_LOGGER.unexceptedWorkerCompletionError(e.getLocalizedMessage(),e); } }); else super.runWork(); }
Source:
<code>void forceRefresh(M model) { if (model instanceof SearchableListModel) { UICommand lastExecutedCommand = model.getLastExecutedCommand(); if (lastExecutedCommand != null && !lastExecutedCommand.getIsCancel()) { SearchableListModel searchableList = (SearchableListModel) model; <START> searchableList.getForceRefreshCommand().execute(); <END> } } }</code><technical_language>for readability/consistency, consider invoking SearchableListModel -> forceRefresh() instead..</technical_language>

Target:
void forceRefresh(M model) { if (model instanceof SearchableListModel) { UICommand lastExecutedCommand = model.getLastExecutedCommand(); if (lastExecutedCommand != null && !lastExecutedCommand.getIsCancel()) { SearchableListModel searchableList = (SearchableListModel) model; searchableList.forceRefresh(); } } }
Source:
<code>public void readLedgerMetadata(final long ledgerId, final GenericCallback<LedgerMetadata> readCb) { final String key = ledgerId2Key(ledgerId); MetastoreCallback<Versioned<Value>> msCallback = new MetastoreCallback<Versioned<Value>>() { @Override public void complete(int rc, Versioned<Value> value, Object ctx) { if (MSException.Code.NoKey.getCode() == rc) { LOG.error("No ledger metadata found for ledger " + ledgerId + " : ", MSException.create(MSException.Code.get(rc), "No key " + key + " found.")); readCb.operationComplete(BKException.Code.NoSuchLedgerExistsException, null); return; } if (MSException.Code.OK.getCode() != rc) { LOG.error("Could not read metadata for ledger " + ledgerId + " : ", MSException.create(MSException.Code.get(rc), "Failed to get key " + key)); readCb.operationComplete(BKException.Code.MetaStoreException, null); return; } LedgerMetadata metadata; try { metadata = LedgerMetadata <START> .parseConfig(value.getValue().getField(META_FIELD), value.getVersion(),null); <END> } catch (IOException e) { LOG.error("Could not parse ledger metadata for ledger " + ledgerId + " : ", e); readCb.operationComplete(BKException.Code.MetaStoreException, null); return; } readCb.operationComplete(BKException.Code.OK, metadata); } }; ledgerTable.get(key, this, msCallback, ALL_FIELDS); }</code><technical_language>Space comma</technical_language>

Target:
public void readLedgerMetadata(final long ledgerId, final GenericCallback<LedgerMetadata> readCb) { final String key = ledgerId2Key(ledgerId); MetastoreCallback<Versioned<Value>> msCallback = new MetastoreCallback<Versioned<Value>>() { @Override public void complete(int rc, Versioned<Value> value, Object ctx) { if (MSException.Code.NoKey.getCode() == rc) { LOG.error("No ledger metadata found for ledger " + ledgerId + " : ", MSException.create(MSException.Code.get(rc), "No key " + key + " found.")); readCb.operationComplete(BKException.Code.NoSuchLedgerExistsException, null); return; } if (MSException.Code.OK.getCode() != rc) { LOG.error("Could not read metadata for ledger " + ledgerId + " : ", MSException.create(MSException.Code.get(rc), "Failed to get key " + key)); readCb.operationComplete(BKException.Code.MetaStoreException, null); return; } LedgerMetadata metadata; try { metadata = LedgerMetadata .parseConfig(value.getValue().getField(META_FIELD), value.getVersion(), Optional.<Long>absent()); } catch (IOException e) { LOG.error("Could not parse ledger metadata for ledger " + ledgerId + " : ", e); readCb.operationComplete(BKException.Code.MetaStoreException, null); return; } readCb.operationComplete(BKException.Code.OK, metadata); } }; ledgerTable.get(key, this, msCallback, ALL_FIELDS); }
Source:
<code>public void process(final ElasticJob elasticJob, final JobConfiguration jobConfig, final JobFacade jobFacade, final ShardingContext shardingContext) { <START> System.out.println(jobConfig.getProps().getProperty(PrintJobProperties.CONTENT_KEY)); <END> }</code><technical_language>Please do System.out.println, log</technical_language>

Target:
public void process(final ElasticJob elasticJob, final JobConfiguration jobConfig, final JobFacade jobFacade, final ShardingContext shardingContext) { log.info(jobConfig.getProps().getProperty(PrintJobProperties.CONTENT_KEY)); }
Source:
<code>public void testConjunction() { int v = 100; int v2 = v + 2 + 100; ConcreteIntPredicate conjunction = gt(v).and(lt(v2)); assertTrue(conjunction.test(150)); assertFalse(conjunction.test(Integer.MAX_VALUE)); assertFalse(conjunction.test(Integer.MIN_VALUE)); <START> assertEquals(gt(v).and(lt(v2)), conjunction); assertEquals(gt(v).and(lt(v2)).hashCode(), conjunction.hashCode()); <END> assertNotEquals(gt(v).and(lt(v2 + 1)), conjunction); assertNotEquals(gt(v).and(lt(v2 + 1)).hashCode(), conjunction.hashCode()); assertEquals(conjunction.toString(), "> " + v + " and " + "< " + v2); }</code><technical_language>conjunction (and disjunction) commutative... implement in equals / hashCode ? (no, messing you, loose time :)</technical_language>

Target:
public void testConjunction() { int v = 100; int v2 = v + 2 + 100; ConcreteIntPredicate conjunction = gt(v).and(lt(v2)); assertTrue(conjunction.test(150)); assertFalse(conjunction.test(Integer.MAX_VALUE)); assertFalse(conjunction.test(Integer.MIN_VALUE)); assertEquals(gt(v).and(lt(v2)), conjunction); assertEquals(gt(v).and(lt(v2)).hashCode(), conjunction.hashCode()); assertNotEquals(gt(v).and(lt(v2 + 1)), conjunction); assertEquals(conjunction.toString(), "> " + v + " and " + "< " + v2); }
Source:
<code><START> public boolean isDomainXmlEnabledForVds(Guid vdsId) { <END> return FeatureSupported.isDomainXMLSupported(getVdsManager(vdsId).getCompatibilityVersion()); }</code><technical_language>purpose of FullListAdapter is abstract implementation details of querying device list caller - moving changes done in VmDevicesMonitoring FullListVDSCommand</technical_language>

Target:
private boolean isDomainXmlEnabledForVds(Guid vdsId) { return FeatureSupported.isDomainXMLSupported(getVdsManager(vdsId).getCompatibilityVersion()); }
Source:
<code>public final Authentication getAuthentication() { if (!isEmpty()) { final String principalId = this.chainedAuthentication.get(0).getPrincipal().getId(); final MutablePrincipal compositePrincipal = new MutablePrincipal(principalId); <START> final Map<String, Object> authenticationAttribues = new Hashtable<String, Object>(); <END> for (final Authentication authn : this.chainedAuthentication) { final Principal authenticatedPrincipal = authn.getPrincipal(); compositePrincipal.getAttributes().putAll(authenticatedPrincipal.getAttributes()); for (final String attrName : authn.getAttributes().keySet()) { if (!authenticationAttribues.containsKey(attrName)) { authenticationAttribues.put(attrName, authn.getAttributes().get(attrName)); } else { final Object oldValue = authenticationAttribues.remove(attrName); final Collection<Object> listOfValues = MultiFactorUtils.convertValueToCollection(oldValue); listOfValues.add(authn.getAttributes().get(attrName)); authenticationAttribues.put(attrName, listOfValues); } } } return new DefaultCompositeAuthentication(compositePrincipal, authenticationAttribues); } return null; }</code><technical_language>authenticationAttribues --> authenticationAttributes</technical_language>

Target:
public final Authentication getAuthentication() { if (!isEmpty()) { final String principalId = this.chainedAuthentication.get(0).getPrincipal().getId(); final MutablePrincipal compositePrincipal = new MutablePrincipal(principalId); final Map<String, Object> authenticationAttributes = new Hashtable<String, Object>(); for (final Authentication authn : this.chainedAuthentication) { final Principal authenticatedPrincipal = authn.getPrincipal(); compositePrincipal.getAttributes().putAll(authenticatedPrincipal.getAttributes()); for (final String attrName : authn.getAttributes().keySet()) { if (!authenticationAttributes.containsKey(attrName)) { authenticationAttributes.put(attrName, authn.getAttributes().get(attrName)); } else { final Object oldValue = authenticationAttributes.remove(attrName); final Collection<Object> listOfValues = MultiFactorUtils.convertValueToCollection(oldValue); listOfValues.add(authn.getAttributes().get(attrName)); authenticationAttributes.put(attrName, listOfValues); } } } return new DefaultCompositeAuthentication(compositePrincipal, authenticationAttributes); } return null; }
Source:
<code>private gov.hhs.fha.nhinc.common.nhinccommonproxy.RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType createRequestForNhin( RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType request) { gov.hhs.fha.nhinc.common.nhinccommonproxy.RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType nhinRequest = new gov.hhs.fha.nhinc.common.nhinccommonproxy.RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType(); <START> nhinRequest.setNhinTargetSystem(getTargetSystemTypeFromCommunity(getNhinTargetHomeCommunity(request))); <END> nhinRequest.setProvideAndRegisterDocumentSetRequest(request.getProvideAndRegisterDocumentSetRequest()); return nhinRequest; }</code><technical_language>code create this NhinTargetSystemType NhinTargetCommunitiesType extracted request. This reduce 3 methods this class. NhinTargetSystemType target = getMessageGeneratorUtils().convertFirstToNhinTargetSystemType(targets);</technical_language>

Target:
createRequestForNhin(RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType request) { gov.hhs.fha.nhinc.common.nhinccommonproxy.RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType nhinRequest = new gov.hhs.fha.nhinc.common.nhinccommonproxy.RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType(); nhinRequest.setNhinTargetSystem(getMessageGeneratorUtils().convertFirstToNhinTargetSystemType( request.getNhinTargetCommunities())); nhinRequest.setProvideAndRegisterDocumentSetRequest(request.getProvideAndRegisterDocumentSetRequest()); return nhinRequest; }
Source:
<code>private void setDiskProfilesList(List<DiskProfile> diskProfiles) { if (diskProfiles != null && !diskProfiles.isEmpty()) { getDiskProfile().setItems(diskProfiles); } Guid defaultProfileId = (getDisk() != null && <START> isExistingDisk() <END> && getDisk().getDiskStorageType() == DiskStorageType.IMAGE) ? ((DiskImage) getDisk()).getDiskProfileId() : null; if (defaultProfileId != null) { for (DiskProfile profile : diskProfiles) { if (profile.getId().equals(defaultProfileId)) { getDiskProfile().setSelectedItem(profile); return; } } DiskProfile diskProfile = new DiskProfile(); diskProfile.setId(defaultProfileId); if (getDisk() != null) { diskProfile.setName(getDiskImage().getDiskProfileName()); } diskProfiles.add(diskProfile); getDiskProfile().setItems(diskProfiles); getDiskProfile().setSelectedItem(diskProfile); } }</code><technical_language>!getIsNew() instead</technical_language>

Target:
private void setDiskProfilesList(List<DiskProfile> diskProfiles) { if (diskProfiles != null && !diskProfiles.isEmpty()) { getDiskProfile().setItems(diskProfiles); } Guid defaultProfileId = (getDisk() != null && !getIsNew() && getDisk().getDiskStorageType() == DiskStorageType.IMAGE) ? ((DiskImage) getDisk()).getDiskProfileId() : null; if (defaultProfileId != null) { for (DiskProfile profile : diskProfiles) { if (profile.getId().equals(defaultProfileId)) { getDiskProfile().setSelectedItem(profile); return; } } DiskProfile diskProfile = new DiskProfile(); diskProfile.setId(defaultProfileId); if (getDisk() != null) { diskProfile.setName(getDiskImage().getDiskProfileName()); } diskProfiles.add(diskProfile); getDiskProfile().setItems(diskProfiles); getDiskProfile().setSelectedItem(diskProfile); } }
Source:
<code>private String[] calculateGroupsTouseConsideringValuesAndGroupValues(Class<? extends ITestOrConfiguration> annotationClass, String[] groups) { <START> ITestOrConfiguration annotation = getAnnotationFinder().findAnnotation(getConstructorOrMethod(), annotationClass); <END> if (groups == null || groups.length == 0) { groups = null != annotation ? annotation.getGroups() : null; } return groups; }</code><technical_language>Move this line if statement. need execute if groups is null empty</technical_language>

Target:
private String[] calculateGroupsTouseConsideringValuesAndGroupValues(Class<? extends ITestOrConfiguration> annotationClass, String[] groups) { if (groups == null || groups.length == 0) { ITestOrConfiguration annotation = getAnnotationFinder().findAnnotation(getConstructorOrMethod(), annotationClass); groups = null != annotation ? annotation.getGroups() : null; } return groups; }
Source:
<code><START> @VisibleForTesting void waitForBytesToFree(long minBytes, long startTimeMs) { <END> try { logger.debug("Waiting for " + (usedMemoryBytes + minBytes - maxMemoryBytes) + " bytes to be free " + startTimeMs); long remainingWaitTimeMs = maxWaitMs - (System.currentTimeMillis() - startTimeMs); if (remainingWaitTimeMs <= 0) { throw new InsufficientMemoryException("Requested memory of " + minBytes + " bytes could not be allocated. Using memory of " + usedMemoryBytes + " bytes from global pool of " + maxMemoryBytes + " bytes after waiting for " + maxWaitMs + "ms."); } sync.wait(remainingWaitTimeMs); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); throw new RuntimeException("Interrupted allocation of " + minBytes + " bytes", ie); } }</code><technical_language>Minor nit: Missing line carriage @VisibleForTesting</technical_language>

Target:
void waitForBytesToFree(long minBytes, long startTimeMs) { try { logger.debug("Waiting for " + (usedMemoryBytes + minBytes - maxMemoryBytes) + " bytes to be free " + startTimeMs); long remainingWaitTimeMs = maxWaitMs - (System.currentTimeMillis() - startTimeMs); if (remainingWaitTimeMs <= 0) { throw new InsufficientMemoryException("Requested memory of " + minBytes + " bytes could not be allocated. Using memory of " + usedMemoryBytes + " bytes from global pool of " + maxMemoryBytes + " bytes after waiting for " + maxWaitMs + "ms."); } sync.wait(remainingWaitTimeMs); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); throw new RuntimeException("Interrupted allocation of " + minBytes + " bytes", ie); } }
Source:
<code>public void run() { List<TaskResult> results = new ArrayList<TaskResult>(); for (String task : myTasks) { TaskResult taskResult = new TaskResult(); taskResult.myTaskName = task; taskResult.myIsSuccess = true; long loopStartTime = System.currentTimeMillis(); try { Class taskClass; taskClass = Runner.class.getClassLoader().loadClass(task); if (!BaseTask.class.isAssignableFrom(taskClass)) { throw new InvalidClassException("Invalid class " + task + ". It is not a subclass of " + BaseTask.class.getName() + "."); } BaseTask baseTask = (BaseTask)taskClass.getConstructor().newInstance(new Object[]{}); baseTask.setProjectNavigationUtil(myNavigationUtil); baseTask.setTaskContext(myTaskContext); try { <START> if (!baseTask.setup()) { <END> throw new Exception("Setup failed for task " + baseTask.getClass().getCanonicalName() + "."); } long taskStartTime = System.currentTimeMillis(); taskResult.myIsSuccess = baseTask.run(); taskResult.myRunningTime = System.currentTimeMillis() - taskStartTime; } finally { baseTask.teardown(); } } catch (Exception e) { taskResult.myIsSuccess = false; taskResult.myException = e.toString(); taskResult.myStackTraceElements = e.getStackTrace(); e.printStackTrace(); } taskResult.myTotalTime = System.currentTimeMillis() - loopStartTime; } myAllResults.add(results); for (TaskResult result : results) { myLastResults.put(result.myTaskName, result); } }</code><technical_language>setup() method throw exception in case of failure, instead of returning false? able provide more detail reason of failure. need 'return true' boilerplate for successful case</technical_language>

Target:
public void run() { List<TaskResult> results = new ArrayList<TaskResult>(); for (String task : myTasks) { TaskResult taskResult = new TaskResult(); taskResult.myTaskName = task; taskResult.myIsSuccess = true; long loopStartTime = System.currentTimeMillis(); try { Class taskClass; taskClass = Runner.class.getClassLoader().loadClass(task); if (!BaseTask.class.isAssignableFrom(taskClass)) { throw new InvalidClassException("Invalid class " + task + ". It is not a subclass of " + BaseTask.class.getName() + "."); } BaseTask baseTask = (BaseTask)taskClass.getConstructor().newInstance(new Object[]{}); baseTask.setProjectNavigationUtil(myNavigationUtil); baseTask.setTaskContext(myTaskContext); try { baseTask.setup(); long taskStartTime = System.currentTimeMillis(); taskResult.myIsSuccess = baseTask.run(); taskResult.myRunningTime = System.currentTimeMillis() - taskStartTime; } finally { baseTask.teardown(); } } catch (Exception e) { taskResult.myIsSuccess = false; taskResult.myException = e.toString(); taskResult.myStackTraceElements = e.getStackTrace(); e.printStackTrace(); } taskResult.myTotalTime = System.currentTimeMillis() - loopStartTime; } myAllResults.add(results); for (TaskResult result : results) { myLastResults.put(result.myTaskName, result); } }
Source:
<code>boolean copyObject(BaseObject srcObj, BaseObject trgObj, boolean set) { boolean hasChanged = false; if (srcObj != trgObj) { Set<String> srcProps = srcObj.getPropertyList(); Set<String> trgProps = new HashSet<>(trgObj.getPropertyList()); for (String name : srcProps) { Object srcVal = modelAccess.getProperty(srcObj, name); Object trgVal = modelAccess.getProperty(trgObj, name); if (!Objects.equal(srcVal, trgVal)) { if (set) { modelAccess.setProperty(trgObj, name, srcVal); } hasChanged = true; LOGGER.trace("for doc '{}' field '{}' changed from '{}' to '{}'", trgObj.getDocumentReference(), name, trgVal, srcVal); } trgProps.remove(name); } for (String name : trgProps) { if (set) { trgObj.removeField(name); } hasChanged = true; LOGGER.trace("for doc '{}' field '{}' set to null", trgObj.getDocumentReference(), name); } <START> } <END> return hasChanged; }</code><technical_language>a issue. Please add logging ob **warn** **Info** Level. suggestion } else { LOGGER.warn("skip copyObject reason: identical reference"); }</technical_language>

Target:
boolean copyObject(BaseObject srcObj, BaseObject trgObj, boolean set) { boolean hasChanged = false; if (srcObj != trgObj) { Set<String> srcProps = srcObj.getPropertyList(); Set<String> trgProps = new HashSet<>(trgObj.getPropertyList()); for (String name : srcProps) { Object srcVal = modelAccess.getProperty(srcObj, name); Object trgVal = modelAccess.getProperty(trgObj, name); if (!Objects.equal(srcVal, trgVal)) { if (set) { modelAccess.setProperty(trgObj, name, srcVal); } hasChanged = true; LOGGER.trace("copyObject - for doc '{}' field '{}' changed from '{}' to '{}'", trgObj.getDocumentReference(), name, trgVal, srcVal); } trgProps.remove(name); } for (String name : trgProps) { if (set) { trgObj.removeField(name); } hasChanged = true; LOGGER.trace("copyObject - for doc '{}' field '{}' set to null", trgObj.getDocumentReference(), name); } } else { LOGGER.warn("copyObject - skipped because identical reference: {}", srcObj); } return hasChanged; }
Source:
<code>private Map<HivePartitionName, PartitionStatistics> loadPartitionColumnStatistics(Iterable<? extends HivePartitionName> keys) { <START> SetMultimap<HiveTableName, HivePartitionName> tablePartitions = stream(keys) <END> .collect(toImmutableSetMultimap(HivePartitionName::getHiveTableName, key -> key)); ImmutableMap.Builder<HivePartitionName, PartitionStatistics> result = ImmutableMap.builder(); tablePartitions.keySet().forEach(table -> { Set<String> partitionNames = tablePartitions.get(table).stream() .map(HivePartitionName::getPartitionName) .collect(toImmutableSet()); Map<String, PartitionStatistics> partitionStatistics = delegate.getPartitionStatistics(table.getDatabaseName(), table.getTableName(), partitionNames); for (String partitionName : partitionNames) { verify(partitionStatistics.containsKey(partitionName), "the result doesn't contain statistics for partition %s", partitionName); result.put(HivePartitionName.partition(table, partitionName), partitionStatistics.get(partitionName)); } }); return result.build(); }</code><technical_language>categorized errors possible: java if (!partitionStatistics.containsKey(partition.getPartitionName()) { throw new PrestoException(HIVE_METASTORE_ERROR, "Statistics result entry for partition: " + partitionValues); }</technical_language>

Target:
private Map<HivePartitionName, PartitionStatistics> loadPartitionColumnStatistics(Iterable<? extends HivePartitionName> keys) { SetMultimap<HiveTableName, HivePartitionName> tablePartitions = stream(keys) .collect(toImmutableSetMultimap(HivePartitionName::getHiveTableName, key -> key)); ImmutableMap.Builder<HivePartitionName, PartitionStatistics> result = ImmutableMap.builder(); tablePartitions.keySet().forEach(table -> { Set<String> partitionNames = tablePartitions.get(table).stream() .map(HivePartitionName::getPartitionName) .collect(toImmutableSet()); Map<String, PartitionStatistics> partitionStatistics = delegate.getPartitionStatistics(table.getDatabaseName(), table.getTableName(), partitionNames); for (String partitionName : partitionNames) { if (!partitionStatistics.containsKey(partitionName)) { throw new PrestoException(HIVE_PARTITION_DROPPED_DURING_QUERY, "Statistics result does not contain entry for partition: " + partitionName); } result.put(HivePartitionName.partition(table, partitionName), partitionStatistics.get(partitionName)); } }); return result.build(); }
Source:
<code>public RsWithoutHeader(final Response res, final CharSequence name) { super( <START> new RsOf( <END> () -> { final String prefix = String.format( "%s:", new EnglishLowerCase(name.toString()).string() ); return new Filtered<>( header -> { return !new EnglishLowerCase(header).string() .startsWith(prefix); }, res.head() ); }, res::body ) ); }</code><technical_language>@fanifieiev above</technical_language>

Target:
public RsWithoutHeader(final Response res, final CharSequence name) { super( new ResponseOf( () -> { final String prefix = String.format( "%s:", new EnglishLowerCase(name.toString()).string() ); return new Filtered<>( header -> { return !new EnglishLowerCase(header).string() .startsWith(prefix); }, res.head() ); }, res::body ) ); }
Source:
<code>public void tags_facet_should_not_find_tags_of_any_other_organization() { OrganizationDto organization1 = dbTester.organizations().insert(); OrganizationDto organization2 = dbTester.organizations().insert(); RuleDefinitionDto rule = insertRuleDefinition(setSystemTags()); dbTester.rules().insertOrUpdateMetadata(rule, organization1, setTags("bla")); RuleQuery query = new RuleQuery() .setOrganizationUuid(organization2.getUuid()); SearchOptions options = new SearchOptions().addFacets(singletonList(FACET_TAGS)); SearchIdResult result = index.search(query, options); <START> assertThat(result.getFacets().get(FACET_TAGS)).contains(); <END> }</code><technical_language>goal of this assertion ? .isEmpty()</technical_language>

Target:
public void tags_facet_should_not_find_tags_of_any_other_organization() { OrganizationDto organization1 = dbTester.organizations().insert(); OrganizationDto organization2 = dbTester.organizations().insert(); RuleDefinitionDto rule = insertRuleDefinition(setSystemTags()); insertRuleMetaData(organization1, rule, setTags("bla1")); insertRuleMetaData(organization2, rule, setTags("bla2")); RuleQuery query = new RuleQuery() .setOrganizationUuid(organization2.getUuid()); SearchOptions options = new SearchOptions().addFacets(singletonList(FACET_TAGS)); SearchIdResult result = index.search(query, options); assertThat(result.getFacets().get(FACET_TAGS).entrySet()).extracting(e -> entry(e.getKey(), e.getValue())).containsExactly( entry("bla2", 1L) ); }
Source:
<code>public MetadataWebServiceDataInfo(MetadataWebService metadataWebService, String xpsrc, String label, String mapping, String field) { this.xpsrc = xpsrc; <START> this.expr = expr; <END> this.label = label; this.mapping = mapping; if (field != null) { String[] parsed = metadataWebService.parseTransform(field); String[] parts = parsed[0].split("\\."); this.schema = parts[0]; this.element = parts[1]; this.qualifier = (parts.length == 3) ? parts[2] : null; this.transform = parsed[1]; } }</code><technical_language>If this self-assignment, I there</technical_language>

Target:
public MetadataWebServiceDataInfo(MetadataWebService metadataWebService, String xpsrc, String label, String mapping, String field) { this.xpsrc = xpsrc; this.label = label; this.mapping = mapping; if (field != null) { String[] parsed = metadataWebService.parseTransform(field); String[] parts = parsed[0].split("\\."); this.schema = parts[0]; this.element = parts[1]; this.qualifier = (parts.length == 3) ? parts[2] : null; this.transform = parsed[1]; } }
Source:
<code><START> public void write(ReadHeadInfo headInfo, DataOutput out) throws IOException { <END> out.writeByte(headInfo.getActiveFields()); out.writeLong(headInfo.value); if (this.thisReadSequence != null && this.thisReadSequence.getKmerLetterLength() > 0) { headInfo.thisReadSequence.write(out); } if (this.mateReadSequence != null && this.mateReadSequence.getKmerLetterLength() > 0) { headInfo.mateReadSequence.write(out); } }</code><technical_language>this function write headInfo information read this.thisReadSequence</technical_language>

Target:
public static void write(ReadHeadInfo headInfo, DataOutput out) throws IOException { out.writeByte(headInfo.getActiveFields()); out.writeLong(headInfo.value); headInfo.getThisReadSequence().write(out); if (headInfo.mateReadSequence != null && headInfo.mateReadSequence.getKmerLetterLength() > 0) { headInfo.mateReadSequence.write(out); } }
Source:
<code>public void encode(LuceneDocumentBuilder documentBuilder, String absoluteFieldPath, String value) { if ( value == null && indexNullAsValue != null ) { value = indexNullAsValue; } if ( value == null ) { return; } if ( searchable ) { documentBuilder.addField( new Field( absoluteFieldPath, value, fieldType ) ); } else if ( fieldType.stored() ) { documentBuilder.addField( new StoredField( absoluteFieldPath, normalize( absoluteFieldPath, value ) ) ); <START> } <END> if ( sortable ) { documentBuilder.addField( new SortedDocValuesField( absoluteFieldPath, normalize( absoluteFieldPath, value ) ) ); } if ( !sortable && fieldType.omitNorms() ) { documentBuilder.addFieldName( absoluteFieldPath ); } }</code><technical_language>this is necessary? fieldType account. org.hibernate.search.backend.lucene.types.dsl.impl.LuceneStringIndexFieldTypeContext#getFieldType. In particular, if field is searchable, indexOptions forced IndexOptions.NONE. disable norms term vectors too, if explicitly set, matters if indexOptions is set NONE</technical_language>

Target:
public void encode(LuceneDocumentBuilder documentBuilder, String absoluteFieldPath, String value) { if ( value == null && indexNullAsValue != null ) { value = indexNullAsValue; } if ( value == null ) { return; } if ( searchable || fieldType.stored() ) { documentBuilder.addField( new Field( absoluteFieldPath, value, fieldType ) ); } if ( sortable ) { documentBuilder.addField( new SortedDocValuesField( absoluteFieldPath, normalize( absoluteFieldPath, value ) ) ); } if ( !sortable && fieldType.omitNorms() ) { documentBuilder.addFieldName( absoluteFieldPath ); } }
Source:
<code>public AnnotationDeclaration asAnnotationDeclaration() { <START> return (AnnotationDeclaration) this; <END> }</code><technical_language>this throw exception</technical_language>

Target:
public AnnotationDeclaration asAnnotationDeclaration() { throw new IllegalStateException(f("%s is not an AnnotationDeclaration", this)); }
Source:
<code><START> void setMetric(Object metric) { <END> this.metric = metric; }</code><technical_language>synchronized</technical_language>

Target:
synchronized void setMetric(Object metric) { this.metric = metric; }
Source:
<code>private void completeAllProcessableWork() { captureOutputsAndReEnqueueInternalResults(); if (task != null) { while (task.hasRecordsQueued() && task.isProcessable(mockWallClockTime.milliseconds())) { task.process(mockWallClockTime.milliseconds()); task.maybePunctuateStreamTime(); task.commit(); captureOutputsAndReEnqueueInternalResults(); } if (task.hasRecordsQueued()) { log.info("Due to the configuration, there are currently some records that can't be processed." + <START> " Advancing wall-clock time or enqueuing records on the empty partitions will allow" + <END> " Streams to process more.", StreamsConfig.MAX_TASK_IDLE_MS_CONFIG); } } }</code><technical_language>empty partitions -> empty topics ? clarify some partitions _different_ topics empty</technical_language>

Target:
private void completeAllProcessableWork() { captureOutputsAndReEnqueueInternalResults(); if (task != null) { while (task.hasRecordsQueued() && task.isProcessable(mockWallClockTime.milliseconds())) { task.process(mockWallClockTime.milliseconds()); task.maybePunctuateStreamTime(); task.commit(); captureOutputsAndReEnqueueInternalResults(); } if (task.hasRecordsQueued()) { log.info("Due to the configuration, there are currently some records" + " that cannot be processed. Advancing wall-clock time or" + " enqueuing records on the empty topics will allow" + " Streams to process more.", StreamsConfig.MAX_TASK_IDLE_MS_CONFIG); } } }
Source:
<code>public void listSettingsWithPagination() { final int numberExpected = 50; for (int value = 0; value < numberExpected; value++) { client.setSetting(new ConfigurationSetting().key(keyPrefix + "-" + value).value("myValue").label(labelPrefix)); } SettingSelector filter = new SettingSelector().keys(keyPrefix + "-*").labels(labelPrefix); <START> assertEquals(numberExpected, client.listSettings(filter).streamByPage().count()); <END> }</code><technical_language>This right. I assumed this stream(), streamByPage()</technical_language>

Target:
public void listSettingsWithPagination() { final int numberExpected = 50; for (int value = 0; value < numberExpected; value++) { client.setSetting(new ConfigurationSetting().key(keyPrefix + "-" + value).value("myValue").label(labelPrefix)); } SettingSelector filter = new SettingSelector().keys(keyPrefix + "-*").labels(labelPrefix); assertEquals(numberExpected, client.listSettings(filter).stream().count()); }
Source:
<code>public String toString() { <START> return com.google.common.base.Objects.toStringHelper(this) <END> .add("id", this.getId()) .add("application", this.getApplicationName()) .add("reductionKeys", this.getReductionKeys()) .toString(); }</code><technical_language>above, this is deprecated longer used</technical_language>

Target:
public String toString() { return MoreObjects.toStringHelper(this) .add("m_manager", m_manager) .add("m_entity", m_entity) .toString(); }
Source:
<code>public Response getGeoAlertsHistoryForGeoClusters(@QueryParam("from") long from, @QueryParam("to") long to) { String tableName = "IOT_PER_DEVICE_STREAM_GEO_ALERTNOTIFICATIONS"; String fromDate = String.valueOf(from); String toDate = String.valueOf(to); String query = ""; if (from != 0 || to != 0) { query = "timeStamp : [" + fromDate + " TO " + toDate + "]"; } try { List<SortByField> sortByFields = new ArrayList<>(); SortByField sortByField = new SortByField("timeStamp", SortType.ASC); sortByFields.add(sortByField); String authorizedUser = MultitenantUtils.getTenantAwareUsername( CarbonContext.getThreadLocalCarbonContext().getUsername()); <START> try { <END> String tenantDomain = MultitenantUtils.getTenantDomain(authorizedUser); int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain); AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI(); List<SearchResultEntry> searchResults = analyticsDataAPI.search(tenantId, tableName, query, 0, 100, sortByFields); List<Event> events = getEventBeans(analyticsDataAPI, tenantId, tableName, new ArrayList<String>(), searchResults); return Response.ok().entity(events).build(); } catch (AnalyticsException | UserStoreException e) { log.error("Failed to perform search on table: " + tableName + " : " + e.getMessage(), e); throw DeviceMgtUtil.buildBadRequestException( Constants.ErrorMessages.STATUS_BAD_REQUEST_MESSAGE_DEFAULT); } } catch (Exception e) { log.error(e.getMessage()); return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build(); } }</code><technical_language>Suggestion. Move this nested try block a separate method catch exception main try-catch block</technical_language>

Target:
public Response getGeoAlertsHistoryForGeoClusters(@QueryParam("from") long from, @QueryParam("to") long to) { String tableName = "IOT_PER_DEVICE_STREAM_GEO_ALERTNOTIFICATIONS"; String fromDate = String.valueOf(from); String toDate = String.valueOf(to); String query = ""; if (from != 0 || to != 0) { query = "timeStamp : [" + fromDate + " TO " + toDate + "]"; } try { List<SortByField> sortByFields = new ArrayList<>(); SortByField sortByField = new SortByField("timeStamp", SortType.ASC); sortByFields.add(sortByField); String authorizedUser = MultitenantUtils.getTenantAwareUsername( CarbonContext.getThreadLocalCarbonContext().getUsername()); String tenantDomain = MultitenantUtils.getTenantDomain(authorizedUser); int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain); AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI(); List<SearchResultEntry> searchResults = analyticsDataAPI.search(tenantId, tableName, query, 0, 100, sortByFields); List<Event> events = getEventBeans(analyticsDataAPI, tenantId, tableName, new ArrayList<String>(), searchResults); return Response.ok().entity(events).build(); } catch (AnalyticsException | UserStoreException e) { log.error("Failed to perform search on table: " + tableName + " : " + e.getMessage(), e); throw DeviceMgtUtil.buildBadRequestException( Constants.ErrorMessages.STATUS_BAD_REQUEST_MESSAGE_DEFAULT); } }
Source:
<code>public int[] getRequiredTokens() { <START> return new int[] {TokenTypes.ENUM_DEF}; <END> }</code><technical_language>ENUM_DEF examine children for comma if another trailing constant def. manually looping here. this check simplier if stopped ENUM_CONSTANT_DEF next token 2? check if next token is a comma another ENUM_CONSTANT_DEF</technical_language>

Target:
public int[] getRequiredTokens() { return new int[] {TokenTypes.ENUM_CONSTANT_DEF}; }
Source:
<code>public InvocationHandler(Object target, Appendable writer) { this.target = target; this.writer = writer; <START> screenMap.put("\n", "\\\\n"); <END> screenMap.put("\r", "\\\\r"); screenMap.put("\b", "\\\\b"); screenMap.put("\t", "\\\\t"); screenMap.put("\f", "\\\\f"); }</code><technical_language><LINK_0></technical_language>

Target:
public InvocationHandler(Object target, Appendable writer) { this.target = target; this.writer = writer; screenMap.put("\n", "\\\\n"); screenMap.put("\r", "\\\\r"); screenMap.put("\b", "\\\\b"); screenMap.put("\t", "\\\\t"); screenMap.put("\f", "\\\\f"); screenMap.put("\"", "\\\""); }
Source:
<code>public static List<String> readLines(final String s) { List<String> l = new ArrayList<String>(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (c == '\n') { l.add(sb.toString()); sb.setLength(0); continue; } if (c == '\r') { if (i + 1 < s.length()) { c = s.charAt(++i); l.add(sb.toString()); sb.setLength(0); <START> if (c != '\n') { <END> sb.append(c); } continue; } else { l.add(sb.toString()); break; } } sb.append(c); } l.add(sb.toString()); return l; }</code><technical_language>style nit: braces single line blocks</technical_language>

Target:
public static List<String> readLines(final String s) { List<String> l = new ArrayList<String>(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (c == '\n') { l.add(sb.toString()); sb.setLength(0); continue; } if (c == '\r') { if (i + 1 < s.length()) { c = s.charAt(++i); l.add(sb.toString()); sb.setLength(0); if (c != '\n') sb.append(c); continue; } else { l.add(sb.toString()); break; } } sb.append(c); } l.add(sb.toString()); return l; }
Source:
<code>public void testToFailureLoop() { Throwable exception1 = new RuntimeException("fake exception 1"); Throwable exception2 = new RuntimeException("fake exception 2"); exception1.addSuppressed(exception2); exception2.addSuppressed(exception1); <START> toFailure(exception1); <END> toFailures(ImmutableList.of(exception2)); }</code><technical_language>verify result (e.g. empty)</technical_language>

Target:
public void testToFailureLoop() { Throwable exception1 = new PrestoException(TOO_MANY_REQUESTS_FAILED, "fake exception 1"); Throwable exception2 = new RuntimeException("fake exception 2", exception1); exception1.addSuppressed(exception2); ExecutionFailureInfo failure = toFailure(exception1); assertEquals(failure.getMessage(), "fake exception 1"); assertNull(failure.getCause()); assertEquals(failure.getSuppressed().size(), 1); assertEquals(failure.getSuppressed().get(0).getMessage(), "fake exception 2"); assertEquals(failure.getErrorCode(), TOO_MANY_REQUESTS_FAILED.toErrorCode()); failure = toFailure(exception2); assertEquals(failure.getMessage(), "fake exception 2"); assertNotNull(failure.getCause()); assertEquals(failure.getCause().getMessage(), "fake exception 1"); assertEquals(failure.getSuppressed().size(), 0); assertEquals(failure.getErrorCode(), TOO_MANY_REQUESTS_FAILED.toErrorCode()); exception1 = new PrestoException(TOO_MANY_REQUESTS_FAILED, "fake exception 1"); exception2 = new RuntimeException("fake exception 2"); exception1.addSuppressed(exception2); exception2.addSuppressed(exception1); failure = toFailure(exception1); assertEquals(failure.getMessage(), "fake exception 1"); assertNull(failure.getCause()); assertEquals(failure.getSuppressed().size(), 1); assertEquals(failure.getSuppressed().get(0).getMessage(), "fake exception 2"); assertEquals(failure.getErrorCode(), TOO_MANY_REQUESTS_FAILED.toErrorCode()); exception1 = new RuntimeException("fake exception 1"); exception2 = new RuntimeException("fake exception 2", exception1); exception1.initCause(exception2); failure = toFailure(exception2); assertEquals(failure.getMessage(), "fake exception 2"); assertNotNull(failure.getCause()); assertEquals(failure.getCause().getMessage(), "fake exception 1"); assertEquals(failure.getSuppressed().size(), 0); assertEquals(failure.getErrorCode(), GENERIC_INTERNAL_ERROR.toErrorCode()); }
Source:
<code>public void impactScore(RuleContext kcontext) { throw new UnsupportedOperationException("In the rule (" + kcontext.getRule().getName() + "), the scoreHolder class (" + getClass() <START> + ") does not support an no weightMultiplier."); <END> }</code><technical_language>support no? requires a instead</technical_language>

Target:
public void impactScore(RuleContext kcontext) { throw new UnsupportedOperationException("In the rule (" + kcontext.getRule().getName() + "), the scoreHolder class (" + getClass() + ") requires a weightMultiplier."); }
Source:
<code>public crafttweaker.api.block.IBlockState withProperty(String name, String value) { IProperty property = blockState.getBlock().getBlockState().getProperty(name); Optional<? extends Comparable> propValue = property.parseValue(value); if (propValue.isPresent()) { return new MCBlockState(blockState.withProperty(property, propValue.get())); } <START> return null; <END> }</code><technical_language>if return null in ZS is great. return current state log a message of some sort? Log a message</technical_language>

Target:
public crafttweaker.api.block.IBlockState withProperty(String name, String value) { IProperty property = blockState.getBlock().getBlockState().getProperty(name); if (property == null) { CraftTweakerAPI.logWarning("Invalid property name"); } else { Optional<? extends Comparable> propValue = property.parseValue(value); if (propValue.isPresent()) { return new MCBlockState(blockState.withProperty(property, propValue.get())); } CraftTweakerAPI.logWarning("Invalid property value"); } return this; }
Source:
<code>public void initialise(FBOConfig inputFboConfig, BaseFBOsManager inputFboManager, FBOConfig outputFboConfig, BaseFBOsManager outputFboManager, String aLabel) { this.outputFboManager = outputFboManager; this.outputFboUrn = outputFboConfig.getName(); requiresFBO(inputFboConfig, inputFboManager); outputFbo = requiresFBO(outputFboConfig, outputFboManager); addDesiredStateChange(new BindFBO(outputFboConfig.getName(), outputFboManager)); <START> addDesiredStateChange(new SetViewportToSizeOf(outputFboConfig.getName(), outputFboManager)); <END> addDesiredStateChange(new SetInputTextureFromFBO(SLOT_0, inputFboConfig.getName(), ColorTexture, inputFboManager, DOWN_SAMPLER_MATERIAL, TEXTURE_NAME)); setupConditions(); addDesiredStateChange(new EnableMaterial(DOWN_SAMPLER_MATERIAL.toString())); downSampler = getMaterial(DOWN_SAMPLER_MATERIAL); this.performanceMonitorLabel = aLabel; outputFboManager.subscribe(this); }</code><technical_language>In lines outputFboUrn</technical_language>

Target:
public void initialise(FBOConfig inputFboConfig, BaseFBOsManager inputFboManager, FBOConfig outputFboConfig, BaseFBOsManager outputFboManager, String aLabel) { this.outputFboManager = outputFboManager; this.outputFboUrn = outputFboConfig.getName(); requiresFBO(inputFboConfig, inputFboManager); requiresFBO(outputFboConfig, outputFboManager); addDesiredStateChange(new BindFBO(outputFboUrn, outputFboManager)); addDesiredStateChange(new SetViewportToSizeOf(outputFboUrn, outputFboManager)); addDesiredStateChange(new SetInputTextureFromFBO(SLOT_0, inputFboConfig.getName(), ColorTexture, inputFboManager, DOWN_SAMPLER_MATERIAL, TEXTURE_NAME)); update(); outputFboManager.subscribe(this); setupConditions(); addDesiredStateChange(new EnableMaterial(DOWN_SAMPLER_MATERIAL.toString())); downSampler = getMaterial(DOWN_SAMPLER_MATERIAL); this.performanceMonitorLabel = aLabel; }
Source:
<code>public void setWifiApEnabled(WifiConfiguration wifiConfig, boolean enabled) { enforceChangePermission(); <START> mLog.trace("setWifiApEnabled uid=%").c(Binder.getCallingUid()).flush(); <END> ConnectivityManager.enforceTetherChangePermission(mContext); if (mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_TETHERING)) { throw new SecurityException("DISALLOW_CONFIG_TETHERING is enabled for this user."); } if (wifiConfig == null || isValid(wifiConfig)) { mWifiController.obtainMessage(CMD_SET_AP, enabled ? 1 : 0, 0, wifiConfig).sendToTarget(); } else { Slog.e(TAG, "Invalid WifiConfiguration"); } }</code><technical_language>log if is enabled disabled</technical_language>

Target:
public void setWifiApEnabled(WifiConfiguration wifiConfig, boolean enabled) { enforceChangePermission(); ConnectivityManager.enforceTetherChangePermission(mContext); mLog.trace("setWifiApEnabled uid=% enable=%") .c(Binder.getCallingUid()) .c(enabled ? "true" : "false").flush(); if (mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_TETHERING)) { throw new SecurityException("DISALLOW_CONFIG_TETHERING is enabled for this user."); } if (wifiConfig == null || isValid(wifiConfig)) { mWifiController.obtainMessage(CMD_SET_AP, enabled ? 1 : 0, 0, wifiConfig).sendToTarget(); } else { Slog.e(TAG, "Invalid WifiConfiguration"); } }
Source:
<code>private static void setAlertnessOptions(JSONObject fcmJson, NotificationCompat.Builder notifBuilder) { int payloadPriority = fcmJson.optInt("pri", 6); int androidPriority = convertOSToAndroidPriority(payloadPriority); notifBuilder.setPriority(androidPriority); boolean lowDisplayPriority = androidPriority < NotificationCompat.PRIORITY_DEFAULT; if (lowDisplayPriority) return; int notificationDefaults = 0; if (fcmJson.has("ledc") && fcmJson.optInt("led", 1) == 1) { try { BigInteger ledColor = new BigInteger(fcmJson.optString("ledc"), 16); notifBuilder.setLights(ledColor.intValue(), 2000, 5000); } catch (Throwable t) { notificationDefaults |= Notification.DEFAULT_LIGHTS; } } else { notificationDefaults |= Notification.DEFAULT_LIGHTS; } notifBuilder.setDefaults(notificationDefaults); <START> } <END></code><technical_language>want remove OneSignal.getVibrate() call here. a compatibility for pre-O devices OneSignal backend send "vib" depending if Notification Category this set</technical_language>

Target:
private static void setAlertnessOptions(JSONObject fcmJson, NotificationCompat.Builder notifBuilder) { int payloadPriority = fcmJson.optInt("pri", 6); int androidPriority = convertOSToAndroidPriority(payloadPriority); notifBuilder.setPriority(androidPriority); boolean lowDisplayPriority = androidPriority < NotificationCompat.PRIORITY_DEFAULT; if (lowDisplayPriority) return; int notificationDefaults = 0; if (fcmJson.has("ledc") && fcmJson.optInt("led", 1) == 1) { try { BigInteger ledColor = new BigInteger(fcmJson.optString("ledc"), 16); notifBuilder.setLights(ledColor.intValue(), 2000, 5000); } catch (Throwable t) { notificationDefaults |= Notification.DEFAULT_LIGHTS; } } else { notificationDefaults |= Notification.DEFAULT_LIGHTS; } if (fcmJson.optInt("vib", 1) == 1) { if (fcmJson.has("vib_pt")) { long[] vibrationPattern = OSUtils.parseVibrationPattern(fcmJson); if (vibrationPattern != null) notifBuilder.setVibrate(vibrationPattern); } else notificationDefaults |= Notification.DEFAULT_VIBRATE; } if (isSoundEnabled(fcmJson)) { Uri soundUri = OSUtils.getSoundUri(currentContext, fcmJson.optString("sound", null)); if (soundUri != null) notifBuilder.setSound(soundUri); else notificationDefaults |= Notification.DEFAULT_SOUND; } notifBuilder.setDefaults(notificationDefaults); }