auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void toScopedState(ScopedPersistentState state) { state.setProperty(STATE_CONSISTENT_HASH, this.getClass().getName()); state.setProperty(STATE_NUM_OWNERS, numOwners); state.setProperty(STATE_NUM_SEGMENTS, getNumSegments());; state.setProperty(STATE_MEMBERS, members.size()); for (int i = 0; i < members.size(); i++) { <START> state.setProperty(String.format(STATE_MEMBER, i), <END> JGroupsAddressCache.getPersistentUUID(members.get(i)).toString()); } state.setProperty(STATE_CAPACITY_FACTORS, capacityFactors.length); for (int i = 0; i < capacityFactors.length; i++) { state.setProperty(String.format(STATE_CAPACITY_FACTOR, i), capacityFactors[i]); } state.setProperty(STATE_SEGMENT_OWNERS, segmentOwners.length); for (int i = 0; i < segmentOwners.length; i++) { List<Address> segmentOwnerAddresses = segmentOwners[i]; state.setProperty(String.format(STATE_SEGMENT_OWNER_COUNT, i), segmentOwnerAddresses.size()); for(int j = 0; j < segmentOwnerAddresses.size(); j++) { state.setProperty(String.format(STATE_SEGMENT_OWNER, i, j), JGroupsAddressCache.getPersistentUUID(segmentOwnerAddresses.get(j)).toString()); } } state.setProperty(STATE_HASH_FUNCTION, hashFunction.getClass().getName()); }</code><technical_language>Is state expected empty? If state contains a CH's state, new CH members, leave some extra members hanging around</technical_language>

Target:
public void toScopedState(ScopedPersistentState state) { state.setProperty(ConsistentHashPersistenceConstants.STATE_CONSISTENT_HASH, this.getClass().getName()); state.setProperty(STATE_NUM_OWNERS, numOwners); state.setProperty(STATE_NUM_SEGMENTS, getNumSegments());; state.setProperty(ConsistentHashPersistenceConstants.STATE_MEMBERS, members.size()); for (int i = 0; i < members.size(); i++) { state.setProperty(String.format(ConsistentHashPersistenceConstants.STATE_MEMBER, i), JGroupsAddressCache.getPersistentUUID(members.get(i)).toString()); } state.setProperty(STATE_CAPACITY_FACTORS, capacityFactors.length); for (int i = 0; i < capacityFactors.length; i++) { state.setProperty(String.format(STATE_CAPACITY_FACTOR, i), capacityFactors[i]); } state.setProperty(STATE_SEGMENT_OWNERS, segmentOwners.length); for (int i = 0; i < segmentOwners.length; i++) { List<Address> segmentOwnerAddresses = segmentOwners[i]; state.setProperty(String.format(STATE_SEGMENT_OWNER_COUNT, i), segmentOwnerAddresses.size()); for(int j = 0; j < segmentOwnerAddresses.size(); j++) { state.setProperty(String.format(STATE_SEGMENT_OWNER, i, j), JGroupsAddressCache.getPersistentUUID(segmentOwnerAddresses.get(j)).toString()); } } state.setProperty(ConsistentHashPersistenceConstants.STATE_HASH_FUNCTION, hashFunction.getClass().getName()); }
Source:
<code>public String[] endPoints(String backupAddress) { String[] endpoints = backupAddress.split(COMMA_SEPARATOR); List<String> addresses = Arrays.stream(endpoints) <START> .map(address -> address.contains(org.apache.dubbo.remoting.etcd.Constants.HTTP_SUBFIX_KEY) <END> ? address : org.apache.dubbo.remoting.etcd.Constants.HTTP_KEY + address) .collect(toList()); Collections.shuffle(addresses); return addresses.toArray(new String[0]); }</code><technical_language>This is import static org.apache.dubbo.remoting.etcd.Constants.HTTP_SUBFIX_KEY</technical_language>

Target:
public String[] endPoints(String backupAddress) { String[] endpoints = backupAddress.split(COMMA_SEPARATOR); List<String> addresses = Arrays.stream(endpoints) .map(address -> address.contains(HTTP_SUBFIX_KEY) ? address : HTTP_KEY + address) .collect(toList()); Collections.shuffle(addresses); return addresses.toArray(new String[0]); }
Source:
<code>public synchronized void start() { if (!this.mRunning) { this.mLastTick = System.nanoTime(); if (this.mSoundManager != null) { <START> this.mSoundManager.autoResume(); <END> } this.mRunning = true; } }</code><technical_language>Do want method names this give a more general name</technical_language>

Target:
public synchronized void start() { if (!this.mRunning) { this.mLastTick = System.nanoTime(); if (this.mSoundManager != null) { this.mSoundManager.onResume(); } this.mRunning = true; } }
Source:
<code>private Partitioning createPartitioning(List<Symbol> partitioningColumns) { <START> if (SYSTEM_PARTITIONING_PROVIDER.equals(partitioningProvider)) { <END> return Partitioning.create(FIXED_HASH_DISTRIBUTION, ImmutableList.copyOf(partitioningColumns)); } List<Type> partitioningTypes = partitioningColumns.stream() .map(column -> symbolAllocator.getTypes().get(column)) .collect(toImmutableList()); PartitioningHandle partitioningHandle = metadata.getPartitioningHandle(session, partitioningProvider, hashPartitionCount, partitioningTypes); return Partitioning.create(partitioningHandle, partitioningColumns); }</code><technical_language>I wondering if sense SystemTablesMetadata.getPartitioningHandle return this ConnectorPartitioningHandle? This unified (instead of cheating for SystemPartitioning :P ) add a TODO left this refactor future work, :)</technical_language>

Target:
private Partitioning createPartitioning(List<Symbol> partitioningColumns) { if (GlobalSystemConnector.NAME.equals(partitioningProviderCatalog)) { return Partitioning.create(FIXED_HASH_DISTRIBUTION, ImmutableList.copyOf(partitioningColumns)); } List<Type> partitioningTypes = partitioningColumns.stream() .map(column -> symbolAllocator.getTypes().get(column)) .collect(toImmutableList()); PartitioningHandle partitioningHandle = metadata.getPartitioningHandleForExchange(session, partitioningProviderCatalog, hashPartitionCount, partitioningTypes); return Partitioning.create(partitioningHandle, partitioningColumns); }
Source:
<code>private void clearPreviousRelationships(Object parent, FieldInfo reader) { Long id = session.context().nativeId(parent); String type = reader.relationshipType(); Class endNodeType = DescriptorMappings.getType(reader.getTypeDescriptor()); <START> if (reader.relationshipDirection().equals(Direction.INCOMING)) { <END> deregisterIncomingRelationship(id, type, endNodeType); } else if (reader.relationshipDirection().equals(Direction.OUTGOING)) { deregisterOutgoingRelationship(id, type, endNodeType); } else { deregisterOutgoingRelationship(id, type, endNodeType); deregisterIncomingRelationship(id, type, endNodeType); } }</code><technical_language>suggestion if (reader.relationshipDirection() == Direction.INCOMING) {</technical_language>

Target:
private void clearPreviousRelationships(Object parent, FieldInfo reader) { Long id = session.context().nativeId(parent); String type = reader.relationshipType(); Class endNodeType = DescriptorMappings.getType(reader.getTypeDescriptor()); switch (reader.relationshipDirection()) { case INCOMING: deregisterIncomingRelationship(id, type, endNodeType); return; case OUTGOING: deregisterOutgoingRelationship(id, type, endNodeType); return; default: deregisterOutgoingRelationship(id, type, endNodeType); deregisterIncomingRelationship(id, type, endNodeType); return; } }
Source:
<code>void callback() throws InterruptedException; } private void withHandlingRuntimeException(final RunnableRawCallback cb) throws InterruptedException { try { cb.callback(); } catch (final DBIException e) { <START> log.warn(String.format("%s: Thread %s got DBIException exception: %s", <END> svcQName, Thread.currentThread().getName(), e)); } catch (final RuntimeException e) { log.warn(String.format("%s: Thread %s got Runtime exception: %s", svcQName, Thread.currentThread().getName(), e)); } }</code><technical_language>![image](<LINK_1> <LINK_0></technical_language>

Target:
void callback() throws InterruptedException; } private void withHandlingRuntimeException(final RunnableRawCallback cb) throws InterruptedException { try { cb.callback(); } catch (final DBIException e) { log.warn("{}: Thread got DBIException exception: ", svcQName, Thread.currentThread().getName(), e); } catch (final RuntimeException e) { log.warn("{}: Thread got Runtime exception: ", svcQName, Thread.currentThread().getName(), e); } }
Source:
<code>public boolean visitPropertyCommand( Command.PropertyCommand command ) throws IOException { if ( command.getNodeId() != -1 ) { lockGroup.add( lockService.acquireNodeLock( command.getNodeId(), LockService.LockType.WRITE_LOCK ) ); } else if ( command.getRelId() != -1 ) { lockGroup.add( lockService.acquireRelationshipLock( command.getRelId(), LockService.LockType.WRITE_LOCK ) ); } PropertyRecord select = version.select( command ); <START> neoStores.getPropertyStore().updateRecord( select ); <END> return false; }</code><technical_language>Inline this patter everywhere</technical_language>

Target:
public boolean visitPropertyCommand( Command.PropertyCommand command ) throws IOException { if ( command.getNodeId() != -1 ) { lockGroup.add( lockService.acquireNodeLock( command.getNodeId(), LockService.LockType.WRITE_LOCK ) ); } else if ( command.getRelId() != -1 ) { lockGroup.add( lockService.acquireRelationshipLock( command.getRelId(), LockService.LockType.WRITE_LOCK ) ); } updateStore( neoStores.getPropertyStore(), command ); return false; }
Source:
<code>public void saveLocation_ShouldSaveCorrectLocation() { LocationEntity actualLocationEntity = createEntity(10L); mDatabase.locationRoomDAO().saveLocation(actualLocationEntity); mDatabase.locationRoomDAO().getLocations().subscribe(new SingleObserver<List<LocationEntity>>() { @Override public void onSubscribe(Disposable d) { } @Override public void onSuccess(List<LocationEntity> locationEntities) { <START> Assert.assertEquals(locationEntities.get(0).getName(), "name"); <END> } @Override public void onError(Throwable e) { } }); }</code><technical_language>Check id, display, description</technical_language>

Target:
public void saveLocation_ShouldSaveCorrectLocation() { mDatabase.locationRoomDAO().saveLocation(expectedLocationEntity); mDatabase.locationRoomDAO().getLocations().subscribe(new SingleObserver<List<LocationEntity>>() { @Override public void onSubscribe(Disposable d) { } @Override public void onSuccess(List<LocationEntity> locationEntities) { Assert.assertEquals(locationEntities.get(0).getName(), "name"); Assert.assertEquals(locationEntities.get(0).getDescription(), "description"); Assert.assertEquals(locationEntities.get(0).getDisplay(), "display"); } @Override public void onError(Throwable e) { Log.i(TAG, e.getMessage()); } }); }
Source:
<code>private void receiveTokenFromKeycloak(final String content) throws IOException, URISyntaxException { Assert.requireNonNull(content, "content"); LOG.debug("receiving new token from keycloak server"); final HttpClientConnection clientConnection = createConnection(); <START> clientConnection.addRequestHeader("Content-Type", "application/x-www-form-urlencoded"); <END> clientConnection.setDoOutput(true); clientConnection.writeRequestContent(content); final int responseCode = clientConnection.readResponseCode(); if(responseCode == SC_HTTP_UNAUTHORIZED) { throw new DolphinRuntimeException("Invalid login!"); } final String input = clientConnection.readUTFResponseContent(); final Gson gson = PlatformClient.getService(Gson.class); final KeycloakOpenidConnectResult result = gson.fromJson(input, KeycloakOpenidConnectResult.class); connectResult = result; tokenCreation = System.currentTimeMillis(); }</code><technical_language>Is constants for MIME Type defined somewhere</technical_language>

Target:
private void receiveTokenFromKeycloak(final String content) throws IOException, URISyntaxException { Assert.requireNonNull(content, "content"); LOG.debug("receiving new token from keycloak server"); final HttpClientConnection clientConnection = createConnection(); clientConnection.addRequestHeader(CONTENT_TYPE_HEADER, FORM_MIME_TYPE); clientConnection.setDoOutput(true); clientConnection.writeRequestContent(content); final int responseCode = clientConnection.readResponseCode(); if(responseCode == SC_HTTP_UNAUTHORIZED) { throw new DolphinRuntimeException("Invalid login!"); } final String input = clientConnection.readUTFResponseContent(); final Gson gson = PlatformClient.getService(Gson.class); final KeycloakOpenidConnectResult result = gson.fromJson(input, KeycloakOpenidConnectResult.class); connectResult = result; tokenCreation = System.currentTimeMillis(); }
Source:
<code><START> static Pair<TextSelection, Boolean> getSelection(@NotNull Editor editor) { <END> SelectionModel selectionModel = editor.getSelectionModel(); int selectionStart = selectionModel.getSelectionStart(); int selectionEnd = selectionModel.getSelectionEnd(); TextSelection selection = calculateSelectionPosition(editor, selectionStart, selectionEnd); boolean isBackwardsSelection = isBackwardsSelection(editor, selectionStart, selectionEnd); return new Pair<>(selection, isBackwardsSelection); }</code><technical_language>written in a previous PR: I expect isBackwardsSelection moved in TextSelection</technical_language>

Target:
static TextSelection getSelection(@NotNull Editor editor) { SelectionModel selectionModel = editor.getSelectionModel(); int selectionStart = selectionModel.getSelectionStart(); int selectionEnd = selectionModel.getSelectionEnd(); return calculateSelectionPosition(editor, selectionStart, selectionEnd); }
Source:
<code>public String toString() { return "ModuleDeploymentStatus{" + "container='" + container + '\'' + ", key=" + key + <START> ", status=" + state + <END> ", errorDescription='" + errorDescription + '\'' + '}'; }</code><technical_language>technically "status=" "state="</technical_language>

Target:
public String toString() { return "ModuleDeploymentStatus{" + "container='" + container + '\'' + ", key=" + key + ", state=" + state + ", errorDescription='" + errorDescription + '\'' + '}'; }
Source:
<code>public void testHotRod() { ConfigurationBuilder builder = new ConfigurationBuilder(); if (!mechanism.isEmpty()) { builder.security().authentication() .saslMechanism(mechanism) <START> .serverName("infinispan") <END> .realm("default") .username("all_user") .password("all"); } try { RemoteCache<String, String> cache = SERVER_TEST.hotrod().withClientConfiguration(builder).withCacheMode(CacheMode.DIST_SYNC).create(); cache.put("k1", "v1"); assertEquals(1, cache.size()); assertEquals("v1", cache.get("k1")); } catch (HotRodClientException e) { if (!mechanism.isEmpty() && !"PLAIN".equals(mechanism)) throw e; } }</code><technical_language>is server name mandatory</technical_language>

Target:
public void testHotRod() { ConfigurationBuilder builder = new ConfigurationBuilder(); if (!mechanism.isEmpty()) { builder.security().authentication() .saslMechanism(mechanism) .realm("default") .username("all_user") .password("all"); } try { RemoteCache<String, String> cache = SERVER_TEST.hotrod().withClientConfiguration(builder).withCacheMode(CacheMode.DIST_SYNC).create(); cache.put("k1", "v1"); assertEquals(1, cache.size()); assertEquals("v1", cache.get("k1")); } catch (HotRodClientException e) { if (!mechanism.isEmpty() && !"PLAIN".equals(mechanism)) throw e; } }
Source:
<code>void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) { if (GTK.GTK4) { background = rgba; super.setBackgroundGdkRGBA(context, handle, rgba); } else { <START> if (rgba == null) { background = defaultBackground(); } else { background = rgba; } <END> String css; String properties; String name; name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "spinbutton" : "GtkSpinButton"; String color = display.gtk_rgba_to_css_string (background); properties = " {background-image: -gtk-gradient (linear, 0 0, 0 1, color-stop(0, " + color + "), color-stop(1, " + color + "));}"; css = name + properties; cssBackground = css; String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND); gtk_css_provider_load_from_css(context, finalCss); } }</code><technical_language>This abstracted out of GTK4 guard, applies GTK4 GTK3 -- top of this method</technical_language>

Target:
void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) { if (rgba == null) { background = defaultBackground(); } else { background = rgba; } if (GTK.GTK4) { super.setBackgroundGdkRGBA(context, handle, rgba); } else { String color = display.gtk_rgba_to_css_string (background); String properties = " {background-image: -gtk-gradient (linear, 0 0, 0 1, color-stop(0, " + color + "), color-stop(1, " + color + "));}"; String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "spinbutton" : "GtkSpinButton"; String css = name + properties; cssBackground = css; String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND); gtk_css_provider_load_from_css(context, finalCss); } }
Source:
<code>public void useAadAsyncClient() { <START> DefaultAzureCredential defaultCredential = new DefaultAzureCredentialBuilder().build(); <END> TextAnalyticsAsyncClient textAnalyticsClient = new TextAnalyticsClientBuilder() .endpoint("{endpoint}") .credential(defaultCredential) .buildAsyncClient(); }</code><technical_language>suggestion TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build();</technical_language>

Target:
public void useAadAsyncClient() { TokenCredential defaultCredential = new DefaultAzureCredentialBuilder().build(); TextAnalyticsAsyncClient textAnalyticsClient = new TextAnalyticsClientBuilder() .endpoint("{endpoint}") .credential(defaultCredential) .buildAsyncClient(); }
Source:
<code>public Object hasPermission(ProceedingJoinPoint proceedingJoinPoint) { long startTime = System.currentTimeMillis(); MethodSignature methodSignature = (MethodSignature) proceedingJoinPoint.getSignature(); LOGGER.debug("Permission check started at (method: {})", startTime, methodSignature.getMethod().getDeclaringClass().getSimpleName() + "#" + methodSignature.getMethod().getName()); <START> Optional<Object> initiatorUserCrn = reflectionUtil.getParameter(proceedingJoinPoint, methodSignature, InitiatorUserCrn.class); <END> if (initiatorUserCrn.isPresent() && initiatorUserCrn.get() instanceof String && Crn.isCrn((String) initiatorUserCrn.get())) { String newUserCrn = (String) initiatorUserCrn.get(); internalUserModifier.persistModifiedInternalUser(crnUserDetailsService.loadUserByUsername(newUserCrn)); return ThreadBasedUserCrnProvider.doAs(newUserCrn, () -> commonPermissionCheckingUtils.proceed(proceedingJoinPoint, methodSignature, startTime)); } if (commonPermissionCheckingUtils.isAuthorizationDisabled(proceedingJoinPoint) || InternalCrnBuilder.isInternalCrn(ThreadBasedUserCrnProvider.getUserCrn())) { return commonPermissionCheckingUtils.proceed(proceedingJoinPoint, methodSignature, startTime); } checkPrerequisitesOnClass(proceedingJoinPoint, methodSignature); return checkPermission(proceedingJoinPoint, methodSignature, startTime); }</code><technical_language>check if endpoint @InternalOnly annotation</technical_language>

Target:
public Object hasPermission(ProceedingJoinPoint proceedingJoinPoint) { long startTime = System.currentTimeMillis(); MethodSignature methodSignature = (MethodSignature) proceedingJoinPoint.getSignature(); LOGGER.debug("Permission check started at (method: {})", startTime, methodSignature.getMethod().getDeclaringClass().getSimpleName() + "#" + methodSignature.getMethod().getName()); Optional<Object> initiatorUserCrn = reflectionUtil.getParameter(proceedingJoinPoint, methodSignature, InitiatorUserCrn.class); if (InternalCrnBuilder.isInternalCrn(ThreadBasedUserCrnProvider.getUserCrn()) && initiatorUserCrn.isPresent() && initiatorUserCrn.get() instanceof String && Crn.isCrn((String) initiatorUserCrn.get())) { String newUserCrn = (String) initiatorUserCrn.get(); internalUserModifier.persistModifiedInternalUser(crnUserDetailsService.loadUserByUsername(newUserCrn)); return ThreadBasedUserCrnProvider.doAs(newUserCrn, () -> commonPermissionCheckingUtils.proceed(proceedingJoinPoint, methodSignature, startTime)); } if (commonPermissionCheckingUtils.isAuthorizationDisabled(proceedingJoinPoint) || InternalCrnBuilder.isInternalCrn(ThreadBasedUserCrnProvider.getUserCrn())) { return commonPermissionCheckingUtils.proceed(proceedingJoinPoint, methodSignature, startTime); } checkPrerequisitesOnClass(proceedingJoinPoint, methodSignature); return checkPermission(proceedingJoinPoint, methodSignature, startTime); }
Source:
<code><START> public void shouldValidateValueWithDifferentDigester() throws Exception { <END> String value = "myPassword"; final byte[] salt = KeySources.random(16).getKey(); Digester digester1 = new Digester(KeySources.random(16), DigestSources.pbkDf2(salt)); Digester digester2 = new Digester(KeySources.random(16), DigestSources.pbkDf2(salt)); final String digest = digester1.digest(value); assertTrue(digester2.validate("myPassword", digest)); assertFalse(digester2.validate("MyPassword", digest)); }</code><technical_language>test a salt yields a output</technical_language>

Target:
public void shouldValidateValueWithDifferentDigester() throws Exception { String value = "myPassword"; Digester digester1 = new Digester(KeySources.random(16), DigestSources.pbkDf2()); Digester digester2 = new Digester(KeySources.random(16), DigestSources.pbkDf2()); final String digest1 = digester1.digest(value); final String digest2 = digester2.digest(value); assertTrue(digester2.validate("myPassword", digest1)); assertFalse(digester2.validate("MyPassword", digest1)); assertNotEquals(digest1, digest2); }
Source:
<code>private Stack prepareSharedServiceIfNeed(Stack stack) { if (stack.getDatalakeResourceId() != null) { return sharedServiceConfigProvider.prepareDatalakeConfigs(stack); } <START> LOGGER.debug("No datalake resource id has been given for stack! (crn: {})", stack.getResourceCrn()); <END> return stack; }</code><technical_language>datalake -> Data Lake</technical_language>

Target:
private Stack prepareSharedServiceIfNeed(Stack stack) { if (stack.getDatalakeResourceId() != null) { return sharedServiceConfigProvider.prepareDatalakeConfigs(stack); } LOGGER.debug("No Data Lake resource id has been given for stack! (crn: {})", stack.getResourceCrn()); return stack; }
Source:
<code>public String buildAuthorizeUrl(List<String> scopes){ String scopeParameter = scopes.stream().collect(Collectors.joining(" ")); System.out.println(scopeParameter); <START> URIBuilder builder = new URIBuilder() <END> .setScheme("https") .setHost(domain) .setPath(authenticationUrl) .addParameter("redirect_uri", callbackURI) .addParameter("client_id", clientId) .addParameter("scope", scopeParameter) .addParameter("response_type", "code"); return builder.toString(); }</code><technical_language>please [org.springframework.web.util.UriComponentsBuilder](<LINK_0> instead. This allow remove httpclient dependency</technical_language>

Target:
public String buildAuthorizeUrl(List<String> scopes) { String scopeParameter = String.join("+", scopes); UriComponents uri = UriComponentsBuilder.newInstance() .scheme("https") .host(domain) .path(authenticationUrl) .queryParam("redirect_uri", callbackURI) .queryParam("client_id", clientId) .queryParam("scope", scopeParameter) .queryParam("response_type", "code") .build(); return uri.toUriString(); }
Source:
<code>public boolean createAccountingDocumentsFromXml() { List<String> inputFileNames = batchInputFileService.listInputFileNamesWithDoneFile(accountingDocumentBatchInputFileType); LOG.info("createAccountingDocumentsFromXml: Found " + inputFileNames.size() + " files to process"); CreateAccountingDocumentLogReport logReport = new CreateAccountingDocumentLogReport(); inputFileNames.stream() <START> .forEach(fileName -> {processAccountingDocumentFromXml(fileName, logReport);}); <END> LOG.info("createAccountingDocumentsFromXml, files with non business rule errors: " + logReport.getFilesWithNonBusinessRuleFailures()); LOG.info("createAccountingDocumentsFromXml, files without non business rule errors: " + logReport.getFilesWithoutNonBusinessRuleFailures()); LOG.info("createAccountingDocumentsFromXml: Finished processing all pending accounting document XML files"); return logReport.getFilesWithNonBusinessRuleFailures().isEmpty(); }</code><technical_language>If lambda expression is a single line of code, need curly braces</technical_language>

Target:
public boolean createAccountingDocumentsFromXml() { List<String> inputFileNames = batchInputFileService.listInputFileNamesWithDoneFile(accountingDocumentBatchInputFileType); LOG.info("createAccountingDocumentsFromXml: Found " + inputFileNames.size() + " files to process"); CreateAccountingDocumentLogReport logReport = new CreateAccountingDocumentLogReport(); inputFileNames.stream() .forEach(fileName -> processAccountingDocumentFromXml(fileName, logReport)); LOG.info("createAccountingDocumentsFromXml, files with non business rule errors: " + logReport.getFilesWithNonBusinessRuleFailures()); LOG.info("createAccountingDocumentsFromXml, files successfully processed: " + logReport.getFilesSuccessfullyProcessed()); LOG.info("createAccountingDocumentsFromXml: Finished processing all pending accounting document XML files"); return logReport.getFilesWithNonBusinessRuleFailures().isEmpty(); }
Source:
<code>private boolean isHeaderUnique() { final String header = getHeader(); for (final ActionCol52 col52 : presenter.getModel().getActionCols()) { if (col52.getHeader().equals(header)) { return false; } } for (CompositeColumn<?> cc : presenter.getModel().getConditions()) { for (int iChild = 0; iChild < cc.getChildColumns().size(); iChild++) { if (cc.getChildColumns().get(iChild).getHeader().equals(header)) { return false; } } <START> } <END> return true; }</code><technical_language>Instead of iterating time, do array of headers plugin</technical_language>

Target:
private boolean isHeaderUnique() { final String header = getHeader(); return !plugin().getAlreadyUsedColumnHeaders().contains(header); }
Source:
<code>private boolean rowMatchesPredicate() { if (!predicate.isPresent() || predicate.get().isAll()) { return true; } <START> Set<ColumnHandle> predicatePushdownColumns = predicate.get().getDomains().get().keySet(); <END> Map<ColumnHandle, NullableValue> rowMap = predicatePushdownColumns.stream() .collect(toImmutableMap( column -> column, column -> { TpchColumnHandle tpchColumnHandle = (TpchColumnHandle) column; Type type = tpchColumnHandle.getType(); TpchColumn tpchColumn = table.getColumn(tpchColumnHandle.getColumnName()); return NullableValue.of(type, getPrestoObject(tpchColumn, type)); })); TupleDomain<ColumnHandle> rowTupleDomain = TupleDomain.fromFixedValues(rowMap); return predicate.get().contains(rowTupleDomain); }</code><technical_language>not: Set<TpchColumnHandle> predicatePushdownColumns = predicate.get().getDomains().get().keySet().stream() .map(column -> (TpchColumnHandle) column) .collect(toImmutableSet());</technical_language>

Target:
private boolean rowMatchesPredicate() { if (predicate.isAll()) { return true; } Map<ColumnHandle, NullableValue> rowMap = predicate.getDomains().get().keySet().stream() .collect(toImmutableMap( column -> column, column -> { TpchColumnHandle tpchColumnHandle = (TpchColumnHandle) column; Type type = tpchColumnHandle.getType(); TpchColumn tpchColumn = table.getColumn(tpchColumnHandle.getColumnName()); return NullableValue.of(type, getPrestoObject(tpchColumn, type)); })); TupleDomain<ColumnHandle> rowTupleDomain = TupleDomain.fromFixedValues(rowMap); return predicate.contains(rowTupleDomain); }
Source:
<code>void handleResponse(ResponseInfo responseInfo) { DeleteRequest deleteRequest = (DeleteRequest) responseInfo.getRequest(); DeleteOperation deleteOperation = correlationIdToDeleteOperation.remove(deleteRequest.getCorrelationId()); if (deleteOperations.contains(deleteOperation)) { deleteOperation.handleResponse(responseInfo); } else { <START> logger.trace("Received response for a request of an operation that has completed."); <END> } }</code><technical_language>add blobId msg</technical_language>

Target:
void handleResponse(ResponseInfo responseInfo) { int correlationId = ((DeleteRequest) responseInfo.getRequest()).getCorrelationId(); DeleteOperation deleteOperation = correlationIdToDeleteOperation.remove(correlationId); if (deleteOperations.contains(deleteOperation)) { deleteOperation.handleResponse(responseInfo); if (deleteOperation.isOperationComplete()) { deleteOperations.remove(deleteOperation); onComplete(deleteOperation); } } }
Source:
<code><START> public void deleteTenant(String tenantUniqueID) throws UserStoreException { <END> try { deleteTenant(tenantUniqueID, true); } catch (UserStoreException e) { throw new UserStoreException(e); } }</code><technical_language>Java doc missing</technical_language>

Target:
public void deleteTenant(String tenantUniqueID) throws UserStoreException { Tenant tenant = this.getTenant(tenantUniqueID); if (tenant != null) { clearTenantCaches(tenant); invalidateCacheManager(tenant.getDomain()); } String sqlStmt = TenantConstants.DELETE_TENANT_BY_UUID_SQL; try (Connection dbConnection = getDBConnection()) { try (PreparedStatement prepStmt = dbConnection.prepareStatement(sqlStmt)) { prepStmt.setString(1, tenantUniqueID); prepStmt.executeUpdate(); dbConnection.commit(); } catch (SQLException e) { DatabaseUtil.rollBack(dbConnection); } } catch (SQLException e) { String msg = "Error in deleting the tenant with tenant unique ID " + tenantUniqueID + "."; if (log.isDebugEnabled()) { log.debug(msg, e); } throw new UserStoreException(msg, e); } }
Source:
<code>public void setup() { <START> this.idcIdTokenValidator = new OidcIdTokenValidator(this.registration.build()); <END> this.headers.put("alg", JwsAlgorithms.RS256); this.claims.put(IdTokenClaimNames.ISS, "<LINK_0>"); this.claims.put(IdTokenClaimNames.SUB, "rob"); this.claims.put(IdTokenClaimNames.AUD, Collections.singletonList("client-id")); }</code><technical_language>member idTokenValidator, ensure validateIdToken() is it</technical_language>

Target:
public void setup() { this.idTokenValidator = new OidcIdTokenValidator(this.registration.build()); this.headers.put("alg", JwsAlgorithms.RS256); this.claims.put(IdTokenClaimNames.ISS, "<LINK_0>"); this.claims.put(IdTokenClaimNames.SUB, "rob"); this.claims.put(IdTokenClaimNames.AUD, Collections.singletonList("client-id")); }
Source:
<code>public static Type getSuperType(final Type type) { return SUPER_TYPE_MAP.computeIfAbsent(type, _type -> { if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; Type genericSuperClass = ((Class<?>) parameterizedType.getRawType()).getGenericSuperclass(); if (genericSuperClass instanceof ParameterizedType) { final Type[] superTypeArguments = getTypeArguments(genericSuperClass); final Type[] typeParameters = ((GenericDeclaration) parameterizedType.getRawType()).getTypeParameters(); int k = 0; outer: for (int i = 0; i != superTypeArguments.length; i++) { for (int j = 0; i < typeParameters.length; j++) { if (typeParameters[j].equals(superTypeArguments[i])) { superTypeArguments[i] = parameterizedType.getActualTypeArguments()[k++]; break outer; } } } <START> return new ParameterizedType() { @Override public Type[] getActualTypeArguments() { return superTypeArguments; } @Override public Type getRawType() { return ((ParameterizedType) genericSuperClass).getRawType(); } @Override public Type getOwnerType() { return null; } }; <END> } else { return genericSuperClass; } } else { return ((Class<?>) type).getGenericSuperclass(); } }); }</code><technical_language>this call createParameterizedType</technical_language>

Target:
public static Type getSuperType(final Type type) { return SUPER_TYPE_MAP.computeIfAbsent(type, _type -> { if (type instanceof ParameterizedType) { final ParameterizedType parameterizedType = (ParameterizedType) type; final Type genericSuperClass = ((Class<?>) parameterizedType.getRawType()).getGenericSuperclass(); if (genericSuperClass instanceof ParameterizedType) { final Type[] superTypeArguments = getTypeArguments(genericSuperClass); final Type[] typeParameters = ((GenericDeclaration) parameterizedType.getRawType()).getTypeParameters(); int k = 0; for (int i = 0; i != superTypeArguments.length; i++) { for (int j = 0; i < typeParameters.length; j++) { if (typeParameters[j].equals(superTypeArguments[i])) { superTypeArguments[i] = parameterizedType.getActualTypeArguments()[k++]; break; } } } return createParameterizedType(((ParameterizedType) genericSuperClass).getRawType(), superTypeArguments); } else { return genericSuperClass; } } else { return ((Class<?>) type).getGenericSuperclass(); } }); }
Source:
<code>public EntityArchetype createArchetype() { <START> throw new UnsupportedOperationException(); <END> }</code><technical_language>this a simple call EntityArchetype.builder()</technical_language>

Target:
public EntityArchetype createArchetype() { EntityArchetype.Builder builder = new SpongeEntityArchetypeBuilder(); builder.type(this.entityType); if (this.compound != null) { builder.entityData(NbtTranslator.getInstance().translate(this.compound)); } return builder.build(); }
Source:
<code>public static void main(final String[] args) { try { final CommandLine cl = new CommandLine(); cl.registerShortNameOfClass(Parameters.Address.class); cl.registerShortNameOfClass(Parameters.Port.class); final Configuration networkConf = cl.processCommandLine(args).getBuilder().build(); final Injector injector = Tang.Factory.getTang().newInjector(networkConf); final JobCommandSender sender = injector.getInstance(JobCommandSender.class); <START> sender.sendJobCommand(Parameters.SHUTDOWN_COMMAND, EMPTY_JOB_CONF); <END> } catch (Exception e) { throw new RuntimeException(e); } }</code><technical_language>Please a separate explicit method shutdown JobServer, exploiting a method for submitting jobs</technical_language>

Target:
public static void main(final String[] args) { try { final Injector injector = Tang.Factory.getTang().newInjector(); final CommandSender commandSender = injector.getInstance(CommandSender.class); commandSender.sendShutdownCommand(); } catch (Exception e) { throw new RuntimeException(e); } }
Source:
<code>public void verifyFromModuleHasUserAndWikiField() { <START> List<WebElement> List = driver.findElements(fromCommunityWikinameAndUsernameFieldsBy); <END> for (int i = 0; i < List.size(); i++) { PageObjectLogging.log("verifyFromModuleHasUserAndWikiField", "Checking field number "+(i+1), true); scrollToElement(List.get(i)); waitForElementByElement(List.get(i)); } PageObjectLogging.log("verifyFromModuleHasUserAndWikiField", "Verify that from the community module has username field", true); }</code><technical_language>move this UI mapping</technical_language>

Target:
public void verifyFromModuleHasUserAndWikiField() { for (WebElement element : fromCommunityWikinameAndUsernameFields) { scrollToElement(element); waitForElementByElement(element); } PageObjectLogging.log( "verifyFromModuleHasUserAndWikiField", "Verify that from the community module has username field", true ); }
Source:
<code>public void dispose() { if (getAndSet(null) != null) { timed.dispose(); timed.dispose(); <START> } <END> }</code><technical_language>timed --> direct</technical_language>

Target:
public void dispose() { if (getAndSet(null) != null) { timed.dispose(); direct.dispose(); } }
Source:
<code>public void attachKeyTypeValidator( final JTextComponent textComponent, final Predicate<String> dataValidation, final Consumer<Boolean> action) { DocumentListenerBuilder.attachDocumentListener( textComponent, () -> new Thread( () -> { if (!validationIsInFlight) { validationIsInFlight = true; <START> Interruptibles.sleep(200); <END> final String textData = textComponent.getText().trim(); final boolean valid = dataValidation.test(textData); SwingUtilities.invokeLater( () -> { action.accept(valid); validationIsInFlight = false; }); } }) .start()); }</code><technical_language>this provide a benefit? I for server-side validation a timeout sense requets time, for local validation this is completely overkill IMO</technical_language>

Target:
public void attachKeyTypeValidator( final JTextComponent textComponent, final Predicate<String> dataValidation, final Consumer<Boolean> action) { DocumentListenerBuilder.attachDocumentListener( textComponent, () -> new Thread( () -> { if (validationIsInFlight.compareAndSet(false, true)) { if (!Interruptibles.sleep(200)) { validationIsInFlight.set(false); return; } validationIsInFlight.set(false); final String textData = textComponent.getText().trim(); final boolean valid = dataValidation.test(textData); SwingUtilities.invokeLater(() -> action.accept(valid)); } }) .start()); }
Source:
<code>public int getSessionTimeout() { <START> System.err.println("CALLING GETSESSIONTIMEOUT"); <END> if (!isStarting()) throw new IllegalStateException(); if (!_enabled) throw new UnsupportedOperationException(); int timeout = -1; if (_sessionHandler != null) { timeout = _sessionHandler.getMaxInactiveInterval(); System.err.println("GETSESSIONTIMEOUT FROM SESSIONHANDLER = " + timeout); } return (int)TimeUnit.SECONDS.toMinutes(timeout); }</code><technical_language>ditto... more</technical_language>

Target:
public int getSessionTimeout() { if (!isStarting()) throw new IllegalStateException(); if (!_enabled) throw new UnsupportedOperationException(); int timeout = -1; if (_sessionHandler != null) { timeout = _sessionHandler.getMaxInactiveInterval(); } return (int)TimeUnit.SECONDS.toMinutes(timeout); }
Source:
<code>public boolean isSkipped(Plugin plugin) { PluginStats pluginStats = mapPluginStats.get(plugin.getId()); if (this.scannerParam.getMaxRuleDurationInMins() > 0 && plugin.getTimeStarted() != null) { long endtime = System.currentTimeMillis(); if (plugin.getTimeFinished() != null) { endtime = plugin.getTimeFinished().getTime(); } if (endtime - plugin.getTimeStarted().getTime() > TimeUnit.MINUTES.toMillis(this.scannerParam.getMaxRuleDurationInMins())) { <START> return true; <END> } } if (this.scannerParam.getMaxScanDurationInMins() > 0 && plugin.getTimeFinished() == null) { if (System.currentTimeMillis() - this.hostProcessStartTime > TimeUnit.MINUTES.toMillis(this.scannerParam.getMaxScanDurationInMins())) { return true; } } if (pluginStats == null) { return false; } return pluginStats.isSkipped(); }</code><technical_language>set reason returning calling pluginSkipped(Plugin, String), check removed getSkippedReason(Plugin)</technical_language>

Target:
public boolean isSkipped(Plugin plugin) { PluginStats pluginStats = mapPluginStats.get(plugin.getId()); if (pluginStats != null && pluginStats.isSkipped()) { return true; } if (plugin.getTimeFinished() == null && stopReason != null) { this.pluginSkipped(plugin, stopReason); return true; } else if (this.scannerParam.getMaxRuleDurationInMins() > 0 && plugin.getTimeStarted() != null) { long endtime = System.currentTimeMillis(); if (plugin.getTimeFinished() != null) { endtime = plugin.getTimeFinished().getTime(); } if (endtime - plugin.getTimeStarted().getTime() > TimeUnit.MINUTES.toMillis(this.scannerParam.getMaxRuleDurationInMins())) { this.pluginSkipped(plugin, Constant.messages.getString("ascan.progress.label.skipped.reason.maxRule")); return true; } } return false; }
Source:
<code>public Subquery parameter(String listId, Object... values) { if (values == null || values.length == 0 || values[0] == null) { return this; } where.setToNormal(); where.setToIntersection(); where.addParameter(listId, values); <START> return this; <END> }</code><technical_language>2 called once</technical_language>

Target:
public Subquery parameter(String listId, Object... values) { if (values == null || values.length == 0 || values[0] == null) { return this; } where.setToIntersection(); where.addParameter(listId, values); return this; }
Source:
<code>public static FirstWant fromLine(String line) throws PackProtocolException { String wantLine; Set<String> capabilities; if (line.length() > 45) { String opt = line.substring(45); if (!opt.startsWith(" ")) { throw new PackProtocolException(JGitText.get().wantNoSpaceWithCapabilities); } opt = opt.substring(1); <START> final HashSet<String> opts = new HashSet<>( <END> Arrays.asList(opt.split(" "))); wantLine = line.substring(0, 45); capabilities = Collections.unmodifiableSet(opts); } else { wantLine = line; capabilities = Collections.emptySet(); } return new FirstWant(wantLine, capabilities); }</code><technical_language>style: JGit prefer avoiding unnecessary of final local variables</technical_language>

Target:
public static FirstWant fromLine(String line) throws PackProtocolException { String wantLine; Set<String> capabilities; if (line.length() > 45) { String opt = line.substring(45); if (!opt.startsWith(" ")) { throw new PackProtocolException(JGitText.get().wantNoSpaceWithCapabilities); } opt = opt.substring(1); HashSet<String> opts = new HashSet<>( Arrays.asList(opt.split(" "))); wantLine = line.substring(0, 45); capabilities = Collections.unmodifiableSet(opts); } else { wantLine = line; capabilities = Collections.emptySet(); } return new FirstWant(wantLine, capabilities); }
Source:
<code>public void sendRequestReview() throws MessagingException { if (begin("requestReview")) { final Account a = Common.getAccountCache().get(fromId); if (a == null) { body.append("A Gerrit user"); } else { final String e = a.getFullName(); body.append(e); } <START> body.append(" has requested that you review a change\n\n"); <END> if (changeUrl() != null) { openFooter(); body.append("To respond visit "); body.append(changeUrl()); body.append("\n"); } initInReplyToChange(); add(RecipientType.TO, reviewers); add(RecipientType.CC, extraCC); if (fromId != null) { add(RecipientType.CC, fromId); } send(); } }</code><technical_language>I include change.getChangeId() in message, do in sendNewChange()</technical_language>

Target:
public void sendRequestReview() throws MessagingException { if (begin("requestReview")) { final Account a = Common.getAccountCache().get(fromId); if (a == null || a.getFullName() == null || a.getFullName().length() == 0) { body.append("A Gerrit user"); } else { body.append(a.getFullName()); } body.append(" has requested that you review a change:\n\n"); body.append(change.getChangeId()); body.append(" - "); body.append(change.getSubject()); body.append("\n\n"); if (changeUrl() != null) { openFooter(); body.append("To respond visit "); body.append(changeUrl()); body.append("\n"); } initInReplyToChange(); add(RecipientType.TO, reviewers); add(RecipientType.CC, extraCC); if (fromId != null) { add(RecipientType.CC, fromId); } send(); } }
Source:
<code>public void populateDAG(DAG dag, Configuration conf) { AddDataGenerator dataGenerator = dag.addOperator("dataGenerator", new AddDataGenerator()); CsvParser parserOperator = dag.addOperator("csvParser", new CsvParser()); ConsoleOutputOperator consoleOperator = dag.addOperator("dataconsole", new ConsoleOutputOperator()); ConsoleOutputOperator errorConsoleOperator = dag.addOperator("errorConsole", new ConsoleOutputOperator()); dag.addStream("inputData", dataGenerator.out, parserOperator.in); dag.addStream("parsedData", parserOperator.parsedOutput, consoleOperator.input); <START> dag.addStream("errorData", parserOperator.err, errorConsoleOperator.input); <END> }</code><technical_language>I suggest add more console operator receive POJOs. downstream operators expect a POJO in example good</technical_language>

Target:
public void populateDAG(DAG dag, Configuration conf) { AdDataGenerator dataGenerator = dag.addOperator("dataGenerator", new AdDataGenerator()); CsvParser parserOperator = dag.addOperator("csvParser", new CsvParser()); FileOutputOperator dataOutput = dag.addOperator("dataOutput", new FileOutputOperator()); FileOutputOperator errorOutput = dag.addOperator("errorOutput", new FileOutputOperator()); ConsoleOutputOperator consoleOutput = dag.addOperator("consoleOutput", new ConsoleOutputOperator()); dag.addStream("inputData", dataGenerator.out, parserOperator.in); dag.addStream("parsedData", parserOperator.parsedOutput, dataOutput.input); dag.addStream("errorData", parserOperator.err, errorOutput.input); dag.addStream("pojoData", parserOperator.out, consoleOutput.input); }
Source:
<code>public long getBufferedSize() { if (fellBackAlready) { return currentWriter.getBufferedSize(); } final long dictEncodedByteSize = initialWriter.getBufferedSize(); final double utilization = initialWriter.getUtilization(); long weightedSize; if (utilization < UTILIZATION_THRESHOLD) { weightedSize = dictEncodedByteSize; } else { <START> final double weight_for_raw_size = (utilization - UTILIZATION_THRESHOLD) / (1 - UTILIZATION_THRESHOLD); <END> weightedSize = (long) (weight_for_raw_size * rawDataByteSize + (1 - weight_for_raw_size) * dictEncodedByteSize); } LOG.debug("utilization = {}, dictEncodedByteSize = {}, rawDataByteSize = {}, weightedSize = {}", utilization, dictEncodedByteSize, rawDataByteSize, weightedSize); return weightedSize; }</code><technical_language>nit: In java, constants _ characters</technical_language>

Target:
public long getBufferedSize() { if (fellBackAlready) { return currentWriter.getBufferedSize(); } final long dictEncodedByteSize = initialWriter.getBufferedSize(); final double utilization = initialWriter.getUtilization(); long weightedSize; if (utilization < UTILIZATION_THRESHOLD) { weightedSize = dictEncodedByteSize; } else { final double weightForRawSize = (utilization - UTILIZATION_THRESHOLD) / (1 - UTILIZATION_THRESHOLD); weightedSize = (long) (weightForRawSize * rawDataByteSize + (1 - weightForRawSize) * dictEncodedByteSize); } LOG.debug("utilization = {}, dictEncodedByteSize = {}, rawDataByteSize = {}, weightedSize = {}", utilization, dictEncodedByteSize, rawDataByteSize, weightedSize); return weightedSize; }
Source:
<code>public long countProjectsByFilter(final Map<ProgramFilters, Object> filters) throws MiddlewareException { try { <START> Criteria criteria = this.getSession().createCriteria(Project.class); <END> for (Map.Entry<ProgramFilters, Object> entry : filters.entrySet()) { ProgramFilters filter = entry.getKey(); Object value = entry.getValue(); criteria.add(Restrictions.eq(filter.getStatement(), value)); } return criteria.list().size(); } catch (HibernateException e) { throw new MiddlewareException("Error in countProjectsByFilter(): " + e.getMessage(), e); } }</code><technical_language>add final criteria, entry, filter, entry</technical_language>

Target:
public long countProjectsByFilter(final Map<ProgramFilters, Object> filters) throws MiddlewareException { try { final Criteria criteria = this.getSession().createCriteria(Project.class); for (Map.Entry<ProgramFilters, Object> entry : filters.entrySet()) { final ProgramFilters filter = entry.getKey(); final Object value = entry.getValue(); criteria.add(Restrictions.eq(filter.getStatement(), value)); } return criteria.list().size(); } catch (HibernateException e) { throw new MiddlewareException("Error in countProjectsByFilter(): " + e.getMessage(), e); } }
Source:
<code>public void visitFunctionCall(FunctionCallTree tree) { if (isSetCookie(tree) && httpOnlySetToFalse(tree)) { <START> if (tree.arguments().size() > HTTP_ONLY_PARAMETER_INDEX) { <END> context().newIssue(this, tree.callee(), MESSAGE).secondary(tree.arguments().get(HTTP_ONLY_PARAMETER_INDEX), null); } else if(tree.arguments().size() != 3) { context().newIssue(this, tree.callee(), MESSAGE); } } super.visitFunctionCall(tree); }</code><technical_language>I rework flow avoid duplication of this condition: if (isSetCookie(tree)) { if (tree.arguments().size() > HTTP_ONLY_PARAMETER_INDEX) { ExpressionTree httpOnlyArgument = tree.arguments().get(HTTP_ONLY_PARAMETER_INDEX); if (httpOnlyArgument.is(Kind.BOOLEAN_LITERAL) && CheckUtils.isFalseValue(httpOnlyArgument)) { context().newIssue(this, tree.callee(), MESSAGE).secondary(tree.arguments().get(HTTP_ONLY_PARAMETER_INDEX), null); } } else if (tree.arguments().size() != 3) { context().newIssue(this, tree.callee(), MESSAGE); } }</technical_language>

Target:
public void visitFunctionCall(FunctionCallTree tree) { if (isSetCookie(tree)) { if (tree.arguments().size() > HTTP_ONLY_PARAMETER_INDEX) { ExpressionTree httpOnlyArgument = tree.arguments().get(HTTP_ONLY_PARAMETER_INDEX); if (httpOnlyArgument.is(Kind.BOOLEAN_LITERAL) && isFalseValue(httpOnlyArgument)) { context().newIssue(this, tree.callee(), MESSAGE).secondary(tree.arguments().get(HTTP_ONLY_PARAMETER_INDEX), null); } } else if (tree.arguments().size() != 3) { context().newIssue(this, tree.callee(), MESSAGE); } } super.visitFunctionCall(tree); }