auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public boolean sprayCustomCSVHPCCFile(String fileName, String targetFileLabel, String targetCluster, String escapedEscapeSequence, String escapedFieldDelim, String escapedQuote, String escapedRecTerminator, boolean overwritesprayedfile, FileFormat format) <END> { boolean success = true; try { success = sprayVariableHPCCFile(fileName, targetFileLabel, targetCluster, new DelimitedDataOptions(escapedRecTerminator, escapedFieldDelim, escapedEscapeSequence, escapedQuote), overwritesprayedfile, format); } catch (Exception e) { Utils.println(System.out, "Error: Could not spray file", true, true); } return success; }</code><technical_language>returning success=true if spray fails</technical_language>

Target:
public boolean sprayCustomCSVHPCCFile(String fileName, String targetFileLabel, String targetCluster, String escapedEscapeSequence, String escapedFieldDelim, String escapedQuote, String escapedRecTerminator, boolean overwritesprayedfile, FileFormat format) { boolean success = true; try { success = sprayVariableHPCCFile(fileName, targetFileLabel, targetCluster, new DelimitedDataOptions(escapedRecTerminator, escapedFieldDelim, escapedEscapeSequence, escapedQuote), overwritesprayedfile, format); } catch (Exception e) { Utils.println(System.out, "Error: Could not spray file", true, true); success = false; } return success; }
Source:
<code>protected BlobHolder convertBlobToMimeType(BlobHolder bh, String destinationMimeType) { <START> return convertToMimeType(destinationMimeType, bh, null); <END> }</code><technical_language>Give Collections.singletonMap() for parameters parameter, underlining method call convert instantiate parameters a HashMap if null</technical_language>

Target:
protected BlobHolder convertBlobToMimeType(BlobHolder bh, String destinationMimeType) { return convertToMimeType(destinationMimeType, bh, Collections.emptyMap()); }
Source:
<code>public Future<Void> report(SinkRecord record, Throwable error) { <START> Function<SinkRecord, ConsumerRecord<byte[], byte[]>> function; <END> if (record instanceof InternalSinkRecord) { function = sinkRecord -> ((InternalSinkRecord) sinkRecord).originalRecord(); } else { function = sinkRecord -> { String topic = record.topic(); byte[] key = keyConverter.fromConnectData(topic, record.keySchema(), record.key()); byte[] value = valueConverter.fromConnectData(topic, record.valueSchema(), record.value()); RecordHeaders headers = new RecordHeaders(); if (record.headers() != null) { for (Header header : record.headers()) { String headerKey = header.key(); byte[] rawHeader = headerConverter.fromConnectHeader(topic, headerKey, header.schema(), header.value()); headers.add(headerKey, rawHeader); } } return new ConsumerRecord<>(record.topic(), record.kafkaPartition(), record.kafkaOffset(), record.timestamp(), record.timestampType(), -1L, -1, -1, key, value, headers); }; } Future<Void> future = retryWithToleranceOperator.executeFailed(function, Stage.TASK_PUT, SinkTask.class, record, error, callback); futures.add(future); return future; }</code><technical_language>a function here? a simple variable here. (I suggested a function offline avoid pass in converters. passing in converters this class encapsulates this logic nicely.)</technical_language>

Target:
public Future<Void> report(SinkRecord record, Throwable error) { ConsumerRecord<byte[], byte[]> consumerRecord; if (record instanceof InternalSinkRecord) { consumerRecord = ((InternalSinkRecord) record).originalRecord(); } else { String topic = record.topic(); byte[] key = keyConverter.fromConnectData(topic, record.keySchema(), record.key()); byte[] value = valueConverter.fromConnectData(topic, record.valueSchema(), record.value()); RecordHeaders headers = new RecordHeaders(); if (record.headers() != null) { for (Header header : record.headers()) { String headerKey = header.key(); byte[] rawHeader = headerConverter.fromConnectHeader(topic, headerKey, header.schema(), header.value()); headers.add(headerKey, rawHeader); } } int keyLength = key != null ? key.length : -1; int valLength = value != null ? value.length : -1; consumerRecord = new ConsumerRecord<>(record.topic(), record.kafkaPartition(), record.kafkaOffset(), record.timestamp(), record.timestampType(), -1L, keyLength, valLength, key, value, headers); } Future<Void> future = retryWithToleranceOperator.executeFailed(Stage.TASK_PUT, SinkTask.class, consumerRecord, error); if (!future.isDone()) { futures.add(future); } return future; }
Source:
<code>private Function<RowExpression, Optional<RowExpression>> translateGroupIdVariables(GroupIdNode node) { return variable -> { checkArgument(variable instanceof VariableReferenceExpression, "Expect VariableReferenceExpression"); if (node.getAggregationArguments().contains(variable)) { return Optional.of(variable); <START> } <END> if (node.getCommonGroupingColumns().contains(variable)) { return Optional.of((node.getGroupingColumns().get(variable))); } return Optional.empty(); }; }</code><technical_language>@highker , @hellium01 , mind a AddExchange ? -- basically a template parameter change</technical_language>

Target:
private Function<VariableReferenceExpression, Optional<VariableReferenceExpression>> translateGroupIdVariables(GroupIdNode node) { return variable -> { if (node.getAggregationArguments().contains(variable)) { return Optional.of(variable); } if (node.getCommonGroupingColumns().contains(variable)) { return Optional.of((node.getGroupingColumns().get(variable))); } return Optional.empty(); }; }
Source:
<code>protected void executeVDSCommand() { P parameters = getParameters(); Guid vdsId = parameters.getVdsId(); if (ResourceManager .getInstance() .runVdsCommand(VDSCommandType.SpmStop, new SpmStopVDSCommandParameters(vdsId, parameters.getStoragePoolId())).getSucceeded() || parameters.getIgnoreStopFailed()) { if (getParameters().getPreferredSPMId() != null) { getCurrentIrsProxyData().setPreferredHostId(getParameters().getPreferredSPMId()); } getCurrentIrsProxyData().resetIrs(); StoragePool pool = DbFacade.getInstance().getStoragePoolDao().get(parameters.getStoragePoolId()); if (pool != null && (pool.getStatus() == StoragePoolStatus.NotOperational)) { ResourceManager .getInstance() .getEventListener() .storagePoolStatusChange(parameters.getStoragePoolId(), StoragePoolStatus.NonResponsive, AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_RESET_IRS, VdcBllErrors.ENGINE); } } else { getVDSReturnValue().setSucceeded(false); } if (!getVDSReturnValue().getSucceeded()) { AuditLogableBase base = new AuditLogableBase(vdsId); AuditLogDirector.log(base, AuditLogType.FAILED_TO_STOP_SPM_ON_HOST); <START> } <END> }</code><technical_language>this command is called times error flows, this flood log. I suggest move setStatus command optional parameter perform log failure not, if want maintenancevdss command - i mind..just avoid flooding. thanks</technical_language>

Target:
protected void executeVDSCommand() { P parameters = getParameters(); Guid vdsId = parameters.getVdsId(); if (ResourceManager .getInstance() .runVdsCommand(VDSCommandType.SpmStop, new SpmStopVDSCommandParameters(vdsId, parameters.getStoragePoolId())).getSucceeded() || parameters.getIgnoreStopFailed()) { if (getParameters().getPreferredSPMId() != null) { getCurrentIrsProxyData().setPreferredHostId(getParameters().getPreferredSPMId()); } getCurrentIrsProxyData().resetIrs(); StoragePool pool = DbFacade.getInstance().getStoragePoolDao().get(parameters.getStoragePoolId()); if (pool != null && (pool.getStatus() == StoragePoolStatus.NotOperational)) { ResourceManager .getInstance() .getEventListener() .storagePoolStatusChange(parameters.getStoragePoolId(), StoragePoolStatus.NonResponsive, AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_RESET_IRS, VdcBllErrors.ENGINE); } } else { getVDSReturnValue().setSucceeded(false); } }
Source:
<code>private int getValidPercentile(String fraction) { try { double p = Double.parseDouble(fraction); if (p < 0 || p > 1) { throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "Percentile must be between 0 and 1"); } double percent = p * 100.0; if (percent == Math.floor(percent)) { return (int) percent; } } catch (NumberFormatException ne) { } return -1; <START> } <END></code><technical_language>call this percent</technical_language>

Target:
private int getValidPercentile(String fraction) { try { double percent = Double.parseDouble(fraction); if (percent < 0 || percent > 1) { throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "Percentile must be between 0 and 1"); } percent = percent * 100.0; if (percent == Math.floor(percent)) { return (int) percent; } } catch (NumberFormatException ne) { } return -1; }
Source:
<code>protected RFuture<Boolean> replaceOperationAsync(K key, V oldValue, V newValue) { return commandExecutor.evalWriteAsync(getName(key), codec, RedisCommands.EVAL_BOOLEAN, <START> "local v = redis.call('hget', KEYS[1], ARGV[2]); " <END> + "if v == false then " + "return 0;" + "end;" + "local expireDate = 92233720368547758; " + "local expireDateScore = redis.call('zscore', KEYS[2], ARGV[2]); " + "if expireDateScore ~= false then " + "expireDate = tonumber(expireDateScore) " + "end; " + "local t, val = struct.unpack('dLc0', v); " + "if t ~= 0 then " + "local expireIdle = redis.call('zscore', KEYS[3], ARGV[2]); " + "if expireIdle ~= false then " + "expireDate = math.min(expireDate, tonumber(expireIdle)) " + "end; " + "end; " + "if expireDate > tonumber(ARGV[1]) and val == ARGV[3] then " + "local msg = struct.pack('Lc0Lc0Lc0', string.len(ARGV[2]), ARGV[2], string.len(ARGV[4]), ARGV[4], string.len(ARGV[3]), ARGV[3]); " + "redis.call('publish', KEYS[4], msg); " + "local value = struct.pack('dLc0', t, string.len(ARGV[4]), ARGV[4]); " + "redis.call('hset', KEYS[1], ARGV[2], value); " + "return 1; " + "end; " + "return 0; ", Arrays.<Object>asList(getName(key), getTimeoutSetNameByKey(key), getIdleSetNameByKey(key), getUpdatedChannelNameByKey(key)), System.currentTimeMillis(), encodeMapKey(key), encodeMapValue(oldValue), encodeMapValue(newValue)); }</code><technical_language>@johnou please format this lua-script properly</technical_language>

Target:
protected RFuture<Boolean> replaceOperationAsync(K key, V oldValue, V newValue) { return commandExecutor.evalWriteAsync(getName(key), codec, RedisCommands.EVAL_BOOLEAN, "local v = redis.call('hget', KEYS[1], ARGV[2]);" + "if v == false then" + " return 0;" + "end;" + "local expireDate = 92233720368547758;" + "local expireDateScore = redis.call('zscore', KEYS[2], ARGV[2]);" + "if expireDateScore ~= false then" + " expireDate = tonumber(expireDateScore)" + "end;" + "" + "local t, val = struct.unpack('dLc0', v);" + "if t ~= 0 then" + " local expireIdle = redis.call('zscore', KEYS[3], ARGV[2]);" + " if expireIdle ~= false then" + " expireDate = math.min(expireDate, tonumber(expireIdle))" + " end;" + "end;" + "if expireDate > tonumber(ARGV[1]) and val == ARGV[3] then" + " local msg = struct.pack('Lc0Lc0Lc0', string.len(ARGV[2]), ARGV[2], string.len(ARGV[4]), ARGV[4], string.len(ARGV[3]), ARGV[3]);" + " redis.call('publish', KEYS[4], msg);" + "" + " local value = struct.pack('dLc0', t, string.len(ARGV[4]), ARGV[4]);" + " redis.call('hset', KEYS[1], ARGV[2], value);" + " return 1;" + "end;" + "return 0;", Arrays.<Object>asList(getName(key), getTimeoutSetNameByKey(key), getIdleSetNameByKey(key), getUpdatedChannelNameByKey(key)), System.currentTimeMillis(), encodeMapKey(key), encodeMapValue(oldValue), encodeMapValue(newValue)); }
Source:
<code>public void limit() { populateTestRealm(realm, TEST_DATA_SIZE); RealmResults<AllTypes> results = realm.where(AllTypes.class).limit(5).findAll(); assertEquals(5, results.size()); for (int i = 0; i < 5; i++) { <START> assertEquals(i, results.get(i).getColumnLong()); <END> } }</code><technical_language>I guarantee order of findAll results, add a sort columnLong</technical_language>

Target:
public void limit() { populateTestRealm(realm, TEST_DATA_SIZE); RealmResults<AllTypes> results = realm.where(AllTypes.class).sort(AllTypes.FIELD_LONG).limit(5).findAll(); assertEquals(5, results.size()); for (int i = 0; i < 5; i++) { assertEquals(i, results.get(i).getColumnLong()); } }
Source:
<code>public void testTaskExecutionWithAuthorization(String principal, Subject subject) throws Exception { System.out.println("Run with " + principal); Security.doAs(subject, new PrivilegedAction<Void>() { @Override public Void run() { CompletableFuture<Object> slowTask = taskManager.runTask(DummyTaskEngine.DummyTaskTypes.SLOW_TASK.name(), new TaskContext()); Collection<TaskExecution> currentTasks = taskManager.getCurrentTasks(); assertEquals(1, currentTasks.size()); TaskExecution currentTask = currentTasks.iterator().next(); assertEquals(DummyTaskEngine.DummyTaskTypes.SLOW_TASK.name(), currentTask.getName()); assertEquals(principal, currentTask.getWho().get()); taskEngine.getSlowTask().complete("slow"); assertEquals(0, taskManager.getCurrentTasks().size()); try { assertEquals("slow", slowTask.get()); } catch (InterruptedException | ExecutionException e) { <START> e.printStackTrace(); <END> } taskEngine.setSlowTask(new CompletableFuture<>()); return null; } }); }</code><technical_language>fail() here</technical_language>

Target:
public void testTaskExecutionWithAuthorization(String principal, Subject subject) throws Exception { System.out.println("Run with " + principal); Security.doAs(subject, new PrivilegedAction<Void>() { @Override public Void run() { CompletableFuture<Object> slowTask = taskManager.runTask(DummyTaskEngine.DummyTaskTypes.SLOW_TASK.name(), new TaskContext()); Collection<TaskExecution> currentTasks = taskManager.getCurrentTasks(); assertEquals(1, currentTasks.size()); TaskExecution currentTask = currentTasks.iterator().next(); assertEquals(DummyTaskEngine.DummyTaskTypes.SLOW_TASK.name(), currentTask.getName()); assertEquals(principal, currentTask.getWho().get()); taskEngine.getSlowTask().complete("slow"); assertEquals(0, taskManager.getCurrentTasks().size()); try { assertEquals("slow", slowTask.get()); } catch (InterruptedException | ExecutionException e) { fail("Exception thrown while getting the slowTask. "); } taskEngine.setSlowTask(new CompletableFuture<>()); return null; } }); }
Source:
<code>private void determineAtomicFileCreationSupport() { <START> Boolean ret = getAtomicFileCreationSupportOption( <END> SystemReader.getInstance().openUserConfig(null, this)); if (ret == null && StringUtils.isEmptyOrNull(SystemReader.getInstance() .getenv(Constants.GIT_CONFIG_NOSYSTEM_KEY))) { ret = getAtomicFileCreationSupportOption( SystemReader.getInstance().openSystemConfig(null, this)); } supportsAtomicCreateNewFile = (ret != null && !ret.booleanValue()) ? Boolean.FALSE : Boolean.TRUE; }</code><technical_language>add a TODO enhance SystemReader enable this copying some of code</technical_language>

Target:
private void determineAtomicFileCreationSupport() { Boolean ret = getAtomicFileCreationSupportOption( SystemReader.getInstance().openUserConfig(null, this)); if (ret == null && StringUtils.isEmptyOrNull(SystemReader.getInstance() .getenv(Constants.GIT_CONFIG_NOSYSTEM_KEY))) { ret = getAtomicFileCreationSupportOption( SystemReader.getInstance().openSystemConfig(null, this)); } supportsAtomicCreateNewFile = (ret == null || ret.booleanValue()) ? Boolean.TRUE : Boolean.FALSE; }
Source:
<code>public PathBreadcrumbWidget(FileSystemContext context) { RStudioGinjector.INSTANCE.injectMembers(this); context_ = context; pathPanel_ = new HorizontalPanel(); pathPanel_.setStylePrimaryName(RES.styles().path()); panel_ = new HorizontalPanel(); panel_.setSize("100%", "100%"); panel_.add(pathPanel_); <START> outer_ = new FocusPanel(panel_); <END> outer_.setStylePrimaryName(RES.styles().breadcrumb()); Roles.getGroupRole().setAriaLabelProperty(outer_.getElement(), "Selected path breadcrumb"); Image fade = new Image(RES.fade()); fade.setStylePrimaryName(STYLES.fade()); fade_ = fade.getElement(); fadeWrapper_ = new HTMLPanel(""); fadeWrapper_.setStylePrimaryName(STYLES.fadeWrapper()); fadeWrapper_.getElement().appendChild(fade_); outer_.getElement().appendChild(fadeWrapper_.getElement()); frame_ = new DockLayoutPanel(Unit.PX); eastFrame_ = new FlowPanel(); Button browse = new Button("..."); browse.setStyleName(STYLES.browse()); browse.addStyleName(ThemeResources.INSTANCE.themeStyles().handCursor()); browse.addClickHandler(event -> browse()); String buttonTitle = "Go to directory"; browse.setTitle(buttonTitle); Roles.getButtonRole().setAriaLabelProperty(browse.getElement(), buttonTitle); eastFrame_.add(browse); frame_.addEast(eastFrame_, 22); frame_.add(outer_); frame_.setStyleName(STYLES.breadcrumbFrame()); initWidget(frame_); }</code><technical_language>a FocusPanel here? creates extra focusable element Tabbing is extra stop, a meaningful accessible description obvious purpose</technical_language>

Target:
public PathBreadcrumbWidget(FileSystemContext context) { RStudioGinjector.INSTANCE.injectMembers(this); context_ = context; pathPanel_ = new HorizontalPanel(); pathPanel_.setStylePrimaryName(RES.styles().path()); panel_ = new HorizontalPanel(); panel_.setSize("100%", "100%"); panel_.add(pathPanel_); outer_ = new SimplePanel(); outer_.setWidget(panel_); outer_.setStylePrimaryName(RES.styles().breadcrumb()); Roles.getGroupRole().setAriaLabelProperty(outer_.getElement(), "Selected path breadcrumb"); Image fade = new Image(RES.fade()); fade.setStylePrimaryName(STYLES.fade()); fade_ = fade.getElement(); fadeWrapper_ = new HTMLPanel(""); fadeWrapper_.setStylePrimaryName(STYLES.fadeWrapper()); fadeWrapper_.getElement().appendChild(fade_); outer_.getElement().appendChild(fadeWrapper_.getElement()); frame_ = new DockLayoutPanel(Unit.PX); eastFrame_ = new FlowPanel(); Button browse = new Button("..."); browse.setStyleName(STYLES.browse()); browse.addStyleName(ThemeResources.INSTANCE.themeStyles().handCursor()); browse.addClickHandler(event -> browse()); String buttonTitle = "Go to directory"; browse.setTitle(buttonTitle); Roles.getButtonRole().setAriaLabelProperty(browse.getElement(), buttonTitle); eastFrame_.add(browse); frame_.addEast(eastFrame_, 22); frame_.add(outer_); frame_.setStyleName(STYLES.breadcrumbFrame()); initWidget(frame_); }
Source:
<code>public ConstantValueExpression visitLiteral(RexLiteral literal) { ConstantValueExpression cve = new ConstantValueExpression(); <START> String value = null; <END> if (literal.getValue() instanceof NlsString) { NlsString nlsString = (NlsString) literal.getValue(); value = nlsString.getValue(); } else if (literal.getValue() instanceof BigDecimal) { BigDecimal bd = (BigDecimal) literal.getValue(); if (literal.getType() instanceof IntervalSqlType) { BigDecimal thousand = BigDecimal.valueOf(1000); bd = bd.multiply(thousand); } value = bd.toPlainString(); } else if (literal.getValue() instanceof GregorianCalendar) { long time = ((GregorianCalendar) literal.getValue()).getTimeInMillis() * 1000; value = Long.toString(time); } else { value = literal.getValue().toString(); } Preconditions.checkNotNull(value); cve.setValue(value); TypeConverter.setType(cve, literal.getType()); return cve; }</code><technical_language>Minor: mark final here, spare check L150</technical_language>

Target:
public ConstantValueExpression visitLiteral(RexLiteral literal) { ConstantValueExpression cve = new ConstantValueExpression(); final String value; if (literal.getValue() instanceof NlsString) { NlsString nlsString = (NlsString) literal.getValue(); value = nlsString.getValue(); } else if (literal.getValue() instanceof BigDecimal) { BigDecimal bd = (BigDecimal) literal.getValue(); if (literal.getType() instanceof IntervalSqlType) { BigDecimal thousand = BigDecimal.valueOf(1000); bd = bd.multiply(thousand); } value = bd.toPlainString(); } else if (literal.getValue() instanceof GregorianCalendar) { long time = ((GregorianCalendar) literal.getValue()).getTimeInMillis() * 1000; value = Long.toString(time); } else { value = literal.getValue().toString(); } cve.setValue(value); RexConverter.setType(cve, literal.getType()); return cve; }
Source:
<code>protected List<String> getCommand() { if(!serverng) { return super.getCommand(); } ArrayList<String> command = new ArrayList<String>(); command.add(FileSystems.getDefault().getPath(getHome(), "bin", getStartScriptPrefix() + (getWindows() ? "bat" : "sh")).toString()); <START> command.add("-c "+getFile()); <END> command.addAll(args); return command; }</code><technical_language>Formatting</technical_language>

Target:
protected List<String> getCommand() { if(isEapServer()) { return super.getCommand(); } Path sererConfiguration = createSererConfiguration(); ArrayList<String> command = new ArrayList<String>(); command.add(FileSystems.getDefault().getPath(getRadargunInstalationFolder(), "bin", getStartScriptPrefix() + (getWindows() ? "bat" : "sh")).toString()); command.add("-c"); command.add(sererConfiguration.toString()); command.add("-b"); command.add("0.0.0.0"); command.addAll(args); return command; }
Source:
<code>private <RequestT extends StorageRequest<?>> void setEncryptionHeaders(RequestT request) { HttpHeaders headers = request.getRequestHeaders(); if (storageOptions.getEncryptionAlgorithm() != null && storageOptions.getEncryptionKey() != null && storageOptions.getEncryptionKeyHash() != null) { headers.set("x-goog-encryption-algorithm", storageOptions.getEncryptionAlgorithm()); headers.set("x-goog-encryption-key", storageOptions.getEncryptionKey()); headers.set("x-goog-encryption-key-sha256", storageOptions.getEncryptionKeyHash()); } else { return; } <START> request.setRequestHeaders(headers); <END> }</code><technical_language>Move if condition delete else branch</technical_language>

Target:
private <RequestT extends StorageRequest<?>> void setEncryptionHeaders(RequestT request) { if (storageOptions.getEncryptionKey() == null) { return; } request .getRequestHeaders() .set( "x-goog-encryption-algorithm", checkNotNull( storageOptions.getEncryptionAlgorithm(), "encryption algorithm must not be null")) .set( "x-goog-encryption-key", checkNotNull(storageOptions.getEncryptionKey(), "encryption key must not be null")) .set( "x-goog-encryption-key-sha256", checkNotNull( storageOptions.getEncryptionKeyHash(), "encryption key hash must not be null")); }
Source:
<code>createCredentialsCallback(final Builder<HeaderInterceptor> headerInterceptorBuilder) { return new Callable<Void>() { @Override public Void call() throws IOException { try { HeaderInterceptor headerInterceptor = getCredentialsInterceptor(); if (headerInterceptor != null) { headerInterceptorBuilder.add(headerInterceptor); } return null; } catch (GeneralSecurityException e) { throw new IOException("Could not load auth credentials", e); } } protected HeaderInterceptor getCredentialsInterceptor() throws IOException, GeneralSecurityException { CredentialOptions credentialOptions = BigtableSession.this.options.getCredentialOptions(); boolean isDefaultCredentials = credentialOptions.getCredentialType() == CredentialType.DefaultCredentials; synchronized (CREDENTIALS_REFRESH_EXECUTOR_SERVICE) { <START> if (isDefaultCredentials && defaultCredentialOauth != null) { <END> return defaultCredentialOauth; } Credentials credentials = CredentialFactory.getCredentials(credentialOptions); if (credentials == null) { return null; } Preconditions.checkState(credentials instanceof OAuth2Credentials, String.format("Credentials must be an instance of OAuth2Credentials, but got %s.", credentials.getClass().getName())); RefreshingOAuth2CredentialsInterceptor oauth2Interceptor = new RefreshingOAuth2CredentialsInterceptor(CREDENTIALS_REFRESH_EXECUTOR_SERVICE, (OAuth2Credentials) credentials, BigtableSession.this.options.getRetryOptions()); oauth2Interceptor.asyncRefresh(); if (isDefaultCredentials) { defaultCredentialOauth = oauth2Interceptor; } return oauth2Interceptor; } } }; }</code><technical_language>Move this out of synchronized? synchronized needs "new RefreshingOAuth2CredentialsInterceptor" ? is serialize access to? defaultCredentialOauth</technical_language>

Target:
createCredentialsCallback(final Builder<HeaderInterceptor> headerInterceptorBuilder) { return new Callable<Void>() { @Override public Void call() throws IOException { try { CredentialInterceptorCache credentialsCache = CredentialInterceptorCache.getInstance(); RetryOptions retryOptions = options.getRetryOptions(); CredentialOptions credentialOptions = options.getCredentialOptions(); HeaderInterceptor headerInterceptor = credentialsCache.getCredentialsInterceptor(credentialOptions, retryOptions); if (headerInterceptor != null) { headerInterceptorBuilder.add(headerInterceptor); } return null; } catch (GeneralSecurityException e) { throw new IOException("Could not load auth credentials", e); } } }; }
Source:
<code>protected IkeSessionConfiguration buildIkeSessionConfiguration(IkeMessage ikeMessage) { IkeConfigPayload configPayload = ikeMessage.getPayloadForType(IkePayload.PAYLOAD_TYPE_CP, IkeConfigPayload.class); if (configPayload == null) { logd("No config payload in ikeMessage."); return new <START> IkeSessionConfiguration(null); <END> } if (configPayload.configType != CONFIG_TYPE_REPLY) { logw("Unexpected config payload. Config Type: " + configPayload.configType); return null; } return new IkeSessionConfiguration(configPayload); }</code><technical_language>add /*configPayload*/ for readability</technical_language>

Target:
protected IkeSessionConfiguration buildIkeSessionConfiguration(IkeMessage ikeMessage) { IkeConfigPayload configPayload = ikeMessage.getPayloadForType(IkePayload.PAYLOAD_TYPE_CP, IkeConfigPayload.class); if (configPayload == null) { logd("No config payload in ikeMessage."); return new IkeSessionConfiguration(null ); } if (configPayload.configType != CONFIG_TYPE_REPLY) { logw("Unexpected config payload. Config Type: " + configPayload.configType); return new IkeSessionConfiguration(null ); } return new IkeSessionConfiguration(configPayload); }
Source:
<code>private void buildConditionalPermissionInfo( ConditionalPermissionAdmin conditionalPermissionAdmin, List<ParsedPolicyEntry> entries, List<ConditionalPermissionInfo> infos, String type) { for (ParsedPolicyEntry parsedPolicyEntry : entries) { List<ParsedPermission> permissions = parsedPolicyEntry.getPermissions(); PermissionInfo[] permissionInfos = new PermissionInfo[permissions.size()]; int index = 0; for (ParsedPermission parsedPermission : permissions) { permissionInfos[index++] = new PermissionInfo( parsedPermission.getPermissionType(), replaceSystemProperties(parsedPermission.getPermissionName()), parsedPermission.getActions()); } List<ConditionInfo> conditionInfos = new ArrayList<>(); addCodebase(parsedPolicyEntry, conditionInfos); addSignedBy(parsedPolicyEntry, conditionInfos); addPrincipals(parsedPolicyEntry, conditionInfos); infos.add( conditionalPermissionAdmin.newConditionalPermissionInfo( null, <START> (conditionInfos.isEmpty()) ? null : conditionInfos.toArray(new ConditionInfo[0]), <END> permissionInfos, type)); } }</code><technical_language>More optimal do new ConditionInfo[conditionInfos.size()] avoid creating array for</technical_language>

Target:
private void buildConditionalPermissionInfo( ConditionalPermissionAdmin conditionalPermissionAdmin, List<ParsedPolicyEntry> entries, List<ConditionalPermissionInfo> infos, String type) { for (ParsedPolicyEntry parsedPolicyEntry : entries) { List<ParsedPermission> permissions = parsedPolicyEntry.getPermissions(); PermissionInfo[] permissionInfos = new PermissionInfo[permissions.size()]; int index = 0; for (ParsedPermission parsedPermission : permissions) { permissionInfos[index++] = new PermissionInfo( parsedPermission.getPermissionType(), replaceSystemProperties(parsedPermission.getPermissionName()), parsedPermission.getActions()); } List<ConditionInfo> conditionInfos = new ArrayList<>(); addCodebase(parsedPolicyEntry, conditionInfos); addSignedBy(parsedPolicyEntry, conditionInfos); addPrincipals(parsedPolicyEntry, conditionInfos); infos.add( conditionalPermissionAdmin.newConditionalPermissionInfo( null, (conditionInfos.isEmpty()) ? null : conditionInfos.toArray(new ConditionInfo[conditionInfos.size()]), permissionInfos, type)); } }
Source:
<code><START> public void testHexNoHashSign() { <END> assertThat(faker.color().hex(true), matchesRegularExpression("^[0-9A-F]{6}$")); }</code><technical_language>technically a test tests passing in a false... testHexWithHashSign()</technical_language>

Target:
public void testHexNoHashSign() { assertThat(faker.color().hex(false), matchesRegularExpression("^[0-9A-F]{6}$")); }
Source:
<code>public SslConfig getSslConfig(AllocateDatabaseServerV4Request source, DBStack dbStack) { SslConfig sslConfig = new SslConfig(); if (sslEnabled && source.getSslConfiguration() != null && SslMode.isEnabled(source.getSslConfiguration().getMode())) { <START> sslConfig.setSslCertificates(databaseServerSSlCertificateConfig.getCertsByPlatform(dbStack.getCloudPlatform())); <END> sslConfig.setType(SslCertificateType.CLOUD_PROVIDER_OWNED); } return sslConfig; }</code><technical_language>storing certificate text in DB? store some internal cert ID for CLOUD_PROVIDER_OWNED certs save storage space</technical_language>

Target:
public SslConfig getSslConfig(AllocateDatabaseServerV4Request source, DBStack dbStack) { SslConfig sslConfig = new SslConfig(); if (sslEnabled && source.getSslConfig() != null && SslMode.isEnabled(source.getSslConfig().getSslMode())) { sslConfig.setSslCertificates(databaseServerSSlCertificateConfig.getCertsByPlatform(dbStack.getCloudPlatform())); sslConfig.setSslCertificateType(SslCertificateType.CLOUD_PROVIDER_OWNED); } return sslConfig; }
Source:
<code>public void visitJavadocToken(DetailNode ast) { String firstSentence = getFirstSentence(ast); final int endOfSentence = firstSentence.lastIndexOf(period); if (endOfSentence == -1) { if (!firstSentence.trim().startsWith(INHERIT_DOC_LITERAL) && !FIRST_CHARACTER_ASTERIC_PATTERN.matcher(firstSentence.trim()) <START> .replaceFirst("").trim().startsWith(INHERIT_DOC_LITERAL)) { <END> log(ast.getLineNumber(), MSG_SUMMARY_FIRST_SENTENCE); } } else { firstSentence = firstSentence.substring(0, endOfSentence); if (containsForbiddenFragment(firstSentence)) { log(ast.getLineNumber(), MSG_SUMMARY_JAVADOC); } } }</code><technical_language>scan node tree instead of parsing pure text? Regardless, xdoc description updated require a full summary for {@inheritDoc}</technical_language>

Target:
public void visitJavadocToken(DetailNode ast) { String firstSentence = getFirstSentence(ast); final int endOfSentence = firstSentence.lastIndexOf(period); if (endOfSentence == -1) { if (!isOnlyInheritDoc(ast)) { log(ast.getLineNumber(), MSG_SUMMARY_FIRST_SENTENCE); } } else { firstSentence = firstSentence.substring(0, endOfSentence); if (containsForbiddenFragment(firstSentence)) { log(ast.getLineNumber(), MSG_SUMMARY_JAVADOC); } } }
Source:
<code>public Collection<DetailedLink> getLinks() throws ClassNotFoundException, IOException { List<DetailedLink> results = new ArrayList<DetailedLink>(); List<Class<?>> classes = ReflectionHelper.getClasses(RESOURCES_PACKAGE); List<String> paths = applicationMode == ApplicationMode.GlusterOnly ? ApiUtils.getGlusterRels(uriInfo) <START> : ApiUtils.getAllRels(uriInfo); <END> for (String path : paths) { Class<?> resource = findResource(path, classes); String entryPointPath = uriInfo.getBaseUri().getPath(); String prefix = entryPointPath.endsWith("/") ? entryPointPath + path : entryPointPath + "/" + path; results.addAll(describe(resource, prefix, new HashMap<String, Type>())); } return results; }</code><technical_language>If create a class manage RSDL this logic decide "rels" here</technical_language>

Target:
public Collection<DetailedLink> getLinks() throws ClassNotFoundException, IOException { List<DetailedLink> results = new ArrayList<DetailedLink>(); List<Class<?>> classes = ReflectionHelper.getClasses(RESOURCES_PACKAGE); String entryPointPath = uriInfo.getBaseUri().getPath(); for (String path : rels) { Class<?> resource = findResource(path, classes); String prefix = entryPointPath.endsWith("/") ? entryPointPath + path : entryPointPath + "/" + path; results.addAll(describe(resource, prefix, new HashMap<String, Type>())); } return results; }
Source:
<code>private boolean newValueAlreadyExpired(K key, V oldValue, V newValue) { if (newValue == null) { return false; } final Duration duration; if (oldValue == null) { try { duration = runtimeConfiguration.getExpiry().getExpiryForCreation(key, newValue); } catch (RuntimeException re) { <START> logger.error("Expiry caused an exception ", re); <END> return true; } } else { try { duration = runtimeConfiguration.getExpiry().getExpiryForUpdate(key, oldValue, newValue); } catch (RuntimeException re) { logger.error("Expiry caused an exception ", re); return true; } } return Duration.ZERO.equals(duration); }</code><technical_language>Clarify message: _Expiry computation caused exception - Expiry duration 0_</technical_language>

Target:
private boolean newValueAlreadyExpired(K key, V oldValue, V newValue) { if (newValue == null) { return false; } final Duration duration; if (oldValue == null) { try { duration = runtimeConfiguration.getExpiry().getExpiryForCreation(key, newValue); } catch (RuntimeException re) { logger.error("Expiry computation caused an exception - Expiry duration will be 0 ", re); return true; } } else { try { duration = runtimeConfiguration.getExpiry().getExpiryForUpdate(key, oldValue, newValue); } catch (RuntimeException re) { logger.error("Expiry computation caused an exception - Expiry duration will be 0 ", re); return true; } } return Duration.ZERO.equals(duration); }
Source:
<code><START> public void attemptAuthenticationWhenOAuth2AuthorizationRequestIsNullDoesNotCreateOAuth2AuthorizationResponse() throws IOException, ServletException { <END> MockHttpServletRequest request = new MockHttpServletRequest(); request.addParameter(OAuth2ParameterNames.CODE, "code"); request.addParameter(OAuth2ParameterNames.STATE, "state"); MockHttpServletResponse response = new MockHttpServletResponse(); try { this.filter.attemptAuthentication(request, response); fail(); } catch (OAuth2AuthenticationException ex) { verify(this.filter, never()).convert(any(HttpServletRequest.class)); } }</code><technical_language>@izeye mock private methods [Powermock](<LINK_0> verify zero interaction invocation. a [OidcAuthorizationCodeAuthenticationProviderTests](<LINK_1> is mocking a private method</technical_language>

Target:
public void attemptAuthenticationWhenOAuth2AuthorizationRequestIsNullDoesNotCreateOAuth2AuthorizationResponse() throws Exception { OAuth2LoginAuthenticationFilter filter = PowerMockito.spy(new OAuth2LoginAuthenticationFilter( this.clientRegistrationRepository, this.authorizedClientService)); MockHttpServletRequest request = new MockHttpServletRequest(); request.addParameter(OAuth2ParameterNames.CODE, "code"); request.addParameter(OAuth2ParameterNames.STATE, "state"); MockHttpServletResponse response = new MockHttpServletResponse(); try { filter.attemptAuthentication(request, response); fail(); } catch (OAuth2AuthenticationException ex) { verifyPrivate(filter, never()).invoke("convert", any(HttpServletRequest.class)); } }
Source:
<code>private int writeHeader(ChunkCompressorFactory.CompressionType compressionType, int totalDocs, int numDocsPerChunk, int sizeOfEntry, int version) { int numChunks = (totalDocs + numDocsPerChunk - 1) / numDocsPerChunk; <START> int headerSize = (7 * Integer.BYTES) + (numChunks * VarByteChunkSingleValueWriter.FILE_HEADER_ENTRY_CHUNK_OFFSET_SIZE); <END> _header = ByteBuffer.allocateDirect(headerSize); int offset = 0; _header.putInt(version); offset += Integer.BYTES; _header.putInt(numChunks); offset += Integer.BYTES; _header.putInt(numDocsPerChunk); offset += Integer.BYTES; _header.putInt(sizeOfEntry); offset += Integer.BYTES; if (version > 1) { _header.putInt(totalDocs); offset += Integer.BYTES; _header.putInt(compressionType.getValue()); offset += Integer.BYTES; int dataHeaderStart = offset + Integer.BYTES; _header.putInt(dataHeaderStart); } return headerSize; }</code><technical_language>this based version passed in writer. Yes, version 2 now, versioning clean. is in constructor, it. if want select a version in writer for reason</technical_language>

Target:
private int writeHeader(ChunkCompressorFactory.CompressionType compressionType, int totalDocs, int numDocsPerChunk, int sizeOfEntry, int version) { int numChunks = (totalDocs + numDocsPerChunk - 1) / numDocsPerChunk; int headerSize = (7 * Integer.BYTES) + (numChunks * _headerEntryChunkOffsetSize); _header = ByteBuffer.allocateDirect(headerSize); int offset = 0; _header.putInt(version); offset += Integer.BYTES; _header.putInt(numChunks); offset += Integer.BYTES; _header.putInt(numDocsPerChunk); offset += Integer.BYTES; _header.putInt(sizeOfEntry); offset += Integer.BYTES; if (version > 1) { _header.putInt(totalDocs); offset += Integer.BYTES; _header.putInt(compressionType.getValue()); offset += Integer.BYTES; int dataHeaderStart = offset + Integer.BYTES; _header.putInt(dataHeaderStart); } return headerSize; }
Source:
<code>private static ExpressionTree getComparedWithNullExpression(ExpressionTree expression, Tree.Kind kind) { ExpressionTree comparedExpression = getExpressionEqualNullWithAnd(expression, kind); if (comparedExpression == null) { comparedExpression = getExpressionNotEqualNullWithOr(expression, kind); if (comparedExpression == null) { comparedExpression = getExpressionComparedWithFunction(expression, kind); <START> if (comparedExpression == null) { <END> return null; } } } return comparedExpression; }</code><technical_language>@vilchik-elena Do need this block</technical_language>

Target:
private static ExpressionTree getComparedWithNullExpression(ExpressionTree expression, Tree.Kind kind) { ExpressionTree comparedExpression = getExpressionEqualNullWithAnd(expression, kind); if (comparedExpression == null) { comparedExpression = getExpressionNotEqualNullWithOr(expression, kind); if (comparedExpression == null) { comparedExpression = getExpressionComparedWithFunction(expression, kind); } } return comparedExpression; }
Source:
<code>private boolean hasSuspendedVms() { List<VM> vmList = <START> vmDao.getAllForStoragePool(getOldStoragePool().getId()); <END> String suspendedVms = vmList.stream() .filter(vm -> vm.getStatus().isSuspended() && getStoragePool().getCompatibilityVersion().greater(vm.getCustomCompatibilityVersion())) .map(VM::getName) .collect(Collectors.joining("\n")); if (!suspendedVms.isEmpty()) { addValidationMessage(EngineMessage.ERROR_CANNOT_UPDATE_STORAGE_POOL_SUSPENDED_VM_COMPATIBILITY_VERSION_NOT_SUPPORTED); addValidationMessageVariable("VmsList", suspendedVms); return true; } return false; }</code><technical_language>getStoragePool().getId() also, id remains 'old' DC 'new'</technical_language>

Target:
private boolean hasSuspendedVms() { List<VM> vmList = vmDao.getAllForStoragePool(getStoragePool().getId()); String suspendedVms = vmList.stream() .filter(vm -> vm.getStatus().isSuspended() && vm.getCustomCompatibilityVersion() != null) .filter(vm -> getStoragePool().getCompatibilityVersion().greater(vm.getCustomCompatibilityVersion())) .map(VM::getName) .collect(Collectors.joining("\n")); if (!suspendedVms.isEmpty()) { addValidationMessage(EngineMessage.ERROR_CANNOT_UPDATE_STORAGE_POOL_SUSPENDED_VM_COMPATIBILITY_VERSION_NOT_SUPPORTED); addValidationMessageVariable("VmsList", suspendedVms); return true; } return false; }
Source:
<code>public void setWidth(int desiredPrecision, int desiredScale, boolean errorOnTrunc) throws StandardException { if (isNull()) return; if (desiredPrecision != IGNORE_PRECISION && ((desiredPrecision - desiredScale) < SQLDecimal.getWholeDigits(getBigDecimal()))) { throw StandardException.newException(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, ("DECIMAL/NUMERIC("+desiredPrecision+","+desiredScale+")")); } rawData = null; setValue(value.setScale(desiredScale, BigDecimal.ROUND_HALF_UP)); if (value.signum() == 0) <START> setPrecision(value.scale() + 1); <END> }</code><technical_language>If this is for decimal 0, fix good. is problem other numbers</technical_language>

Target:
public void setWidth(int desiredPrecision, int desiredScale, boolean errorOnTrunc) throws StandardException { if (isNull()) return; if (desiredPrecision != IGNORE_PRECISION && ((desiredPrecision - desiredScale) < SQLDecimal.getWholeDigits(getBigDecimal()))) { throw StandardException.newException(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, ("DECIMAL/NUMERIC("+desiredPrecision+","+desiredScale+")")); } rawData = null; setValue(value.setScale(desiredScale, BigDecimal.ROUND_HALF_UP)); }
Source:
<code>private boolean isSeriesUnique() { if("".equals(txtTitle.getText().trim())) <START> return false; <END> if(null != txtKey && txtKey.isEnabled() && txtKey.getText().length() <= 0) return false; if (cboXItem.getText().contentEquals(Localization.getString("SelectGraphAndSeriesWizardPage.Deleted"))) { return false; } for(int j,i=0; i<cboYItems.length; i++) { if (cboYItems[i].getText().contentEquals(Localization.getString("SelectGraphAndSeriesWizardPage.Deleted"))) { return false; } if(cboYItems[i].isVisible()) { for(j=i+1; j<cboYItems.length; j++) { if(cboYItems[j].isVisible()) { if(0 > cboYItems[i].getSelectionIndex()) return false; else if(0 > cboYItems[j].getSelectionIndex()) return false; else if(cboYItems[i].getItem(cboYItems[i].getSelectionIndex()).equals(cboYItems[j].getItem(cboYItems[j].getSelectionIndex()))) { return false; } } } if(0 > cboYItems[i].getSelectionIndex()) return false; else if(0 > cboXItem.getSelectionIndex()) return false; else if(cboYItems[i].getItem(cboYItems[i].getSelectionIndex()).equals(cboXItem.getItem(cboXItem.getSelectionIndex()))) { return false; } } } return true; }</code><technical_language>Missing parenthesis String.isEmpty is better</technical_language>

Target:
private boolean isSeriesUnique() { if("".equals(txtTitle.getText().trim())) { return false; } if(null != txtKey && txtKey.isEnabled() && txtKey.getText().length() <= 0) { return false; } if (cboXItem.getText().contentEquals(Localization.getString("SelectGraphAndSeriesWizardPage.Deleted"))) { return false; } for(int j,i=0; i<cboYItems.length; i++) { if (cboYItems[i].getText().contentEquals(Localization.getString("SelectGraphAndSeriesWizardPage.Deleted"))) { return false; } if(cboYItems[i].isVisible()) { for(j=i+1; j<cboYItems.length; j++) { if(cboYItems[j].isVisible()) { if(0 > cboYItems[i].getSelectionIndex()) return false; else if(0 > cboYItems[j].getSelectionIndex()) return false; else if(cboYItems[i].getItem(cboYItems[i].getSelectionIndex()).equals(cboYItems[j].getItem(cboYItems[j].getSelectionIndex()))) { return false; } } } if(0 > cboYItems[i].getSelectionIndex()) return false; else if(0 > cboXItem.getSelectionIndex()) return false; else if(cboYItems[i].getItem(cboYItems[i].getSelectionIndex()).equals(cboXItem.getItem(cboXItem.getSelectionIndex()))) { return false; } } } return true; }
Source:
<code>public void test_attach_to_activated_cluster() throws Exception { startNode(1, 1); waitUntil(out.getLog(1, 1), containsLog("Started the server in diagnostic mode")); activateCluster(); assertThat(getUpcomingCluster("localhost", getNodePort(1, 1)).getNodeCount(), is(equalTo(1))); startNode(1, 2); waitUntil(out.getLog(1, 2), containsLog("Started the server in diagnostic mode")); assertThat(getUpcomingCluster("localhost", getNodePort(1, 2)).getNodeCount(), is(equalTo(1))); assertThat(configToolInvocation("attach", "-d", "localhost:" + getNodePort(1, 1), "-s", "localhost:" + getNodePort(1, 2)), is(successful())); waitUntil(out.getLog(1, 2), containsLog("Moved to State[ PASSIVE-STANDBY ]")); <START> assertThat(getUpcomingCluster("localhost", getNodePort(1, 1)).getNodeCount(), is(equalTo(2))); <END> assertThat(getRuntimeCluster("localhost", getNodePort(1, 1)).getNodeCount(), is(equalTo(2))); assertThat(getUpcomingCluster("localhost", getNodePort(1, 2)).getNodeCount(), is(equalTo(2))); assertThat(getRuntimeCluster("localhost", getNodePort(1, 2)).getNodeCount(), is(equalTo(2))); out.clearLog(1, 2); stopNode(1, 1); waitUntil(out.getLog(1, 2), containsLog("Not enough registered voters. Require override intervention or 1 members of the stripe to be connected for action MOVE_TO_ACTIVE")); }</code><technical_language>do forge test isActivated() flag: is important testing node count... withTopologyService(1, XX topologyService -> assertFalse(topologyService.isActivated()));</technical_language>

Target:
public void test_attach_to_activated_cluster() throws Exception { startNode(1, 1); waitUntil(out.getLog(1, 1), containsLog("Started the server in diagnostic mode")); activateCluster(); assertThat(getUpcomingCluster("localhost", getNodePort(1, 1)).getNodeCount(), is(equalTo(1))); startNode(1, 2); waitUntil(out.getLog(1, 2), containsLog("Started the server in diagnostic mode")); assertThat(getUpcomingCluster("localhost", getNodePort(1, 2)).getNodeCount(), is(equalTo(1))); assertThat(configToolInvocation("attach", "-d", "localhost:" + getNodePort(1, 1), "-s", "localhost:" + getNodePort(1, 2)), is(successful())); waitUntil(out.getLog(1, 2), containsLog("Moved to State[ PASSIVE-STANDBY ]")); assertThat(getUpcomingCluster("localhost", getNodePort(1, 1)).getNodeCount(), is(equalTo(2))); assertThat(getRuntimeCluster("localhost", getNodePort(1, 1)).getNodeCount(), is(equalTo(2))); assertThat(getUpcomingCluster("localhost", getNodePort(1, 2)).getNodeCount(), is(equalTo(2))); assertThat(getRuntimeCluster("localhost", getNodePort(1, 2)).getNodeCount(), is(equalTo(2))); withTopologyService(1, 1, topologyService -> assertTrue(topologyService.isActivated())); withTopologyService(1, 2, topologyService -> assertTrue(topologyService.isActivated())); out.clearLog(1, 2); stopNode(1, 1); waitUntil(out.getLog(1, 2), containsLog("Not enough registered voters. Require override intervention or 1 members of the stripe to be connected for action MOVE_TO_ACTIVE")); }
Source:
<code>public String toString() { <START> return String.format("%1$d.%2$d.%3$d_%4$d-b%5$d", discard, major, minor, update, build); <END> }</code><technical_language>%d instead? need positional parts if fields in order</technical_language>

Target:
public String toString() { return String.format("%d.%d.%d_%d-b%d", discard, major, minor, update, build); }