auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void createGroup() throws OrmException { AccountGroup.Id groupId = new AccountGroup.Id(db.nextAccountGroupId()); AccountGroup.NameKey nameKey = new AccountGroup.NameKey(groupName); AccountGroup group = new AccountGroup(nameKey, groupId); if (ownerGroupId != null) { group.setOwnerGroupId(ownerGroupId); } if (groupDescription != null) { group.setDescription(groupDescription); } <START> db.accountGroups().insert(Collections.singleton(group)); <END> AccountGroupName groupName = new AccountGroupName(group); db.accountGroupNames().insert(Collections.singleton(groupName)); List<AccountGroupMember> memberships = new ArrayList<AccountGroupMember>(); List<AccountGroupMemberAudit> membershipsAudit = new ArrayList<AccountGroupMemberAudit>(); for (String userName : initialMembers) { AccountExternalId.Key key = new AccountExternalId.Key(SCHEME_USERNAME, userName); Account.Id accountId = db.accountExternalIds().get(key).getAccountId(); AccountGroupMember membership = new AccountGroupMember(new AccountGroupMember.Key(accountId, groupId)); memberships.add(membership); AccountGroupMemberAudit audit = new AccountGroupMemberAudit(membership, currentUser.getAccountId()); membershipsAudit.add(audit); } db.accountGroupMembers().insert(memberships); db.accountGroupMembersAudit().insert(membershipsAudit); }</code><technical_language>Please validate group name create group. simple inserting group name object first, fail if record is present</technical_language>

Target:
private void createGroup() throws OrmException, UnloggedFailure { AccountGroup.Id groupId = new AccountGroup.Id(db.nextAccountGroupId()); AccountGroup.NameKey nameKey = new AccountGroup.NameKey(groupName); AccountGroup group = new AccountGroup(nameKey, groupId); if (ownerGroupId != null) { group.setOwnerGroupId(ownerGroupId); } if (groupDescription != null) { group.setDescription(groupDescription); } AccountGroupName gn = new AccountGroupName(group); try { db.accountGroupNames().insert(Collections.singleton(gn)); } catch (OrmDuplicateKeyException e) { throw die("group '" + groupName + "' already exists"); } db.accountGroups().insert(Collections.singleton(group)); List<AccountGroupMember> memberships = new ArrayList<AccountGroupMember>(); List<AccountGroupMemberAudit> membershipsAudit = new ArrayList<AccountGroupMemberAudit>(); for (Account.Id accountId : initialMembers) { AccountGroupMember membership = new AccountGroupMember(new AccountGroupMember.Key(accountId, groupId)); memberships.add(membership); AccountGroupMemberAudit audit = new AccountGroupMemberAudit(membership, currentUser.getAccountId()); membershipsAudit.add(audit); } db.accountGroupMembers().insert(memberships); db.accountGroupMembersAudit().insert(membershipsAudit); }
Source:
<code>public boolean equals(final Object that) { <START> return Equal.equals0(Natural.class, this, that, Equal.equal(l -> r -> l.value.equals(r.value))); <END> }</code><technical_language>argument Equal.naturalEqual</technical_language>

Target:
public boolean equals(final Object that) { return Equal.equals0(Natural.class, this, that, Equal.naturalEqual); }
Source:
<code>private boolean isTransientAuthentication(Authentication authentication) { <START> if (authentication == null ) { <END> return false; } return AnnotationUtils.getAnnotation(authentication.getClass(), TransientAuthentication.class) != null; }</code><technical_language>This check is needed authentication is null based call path</technical_language>

Target:
private boolean isTransientAuthentication(Authentication authentication) { return AnnotationUtils.getAnnotation(authentication.getClass(), TransientAuthentication.class) != null; }
Source:
<code>public void shouldWrapExceptionIntoStorIOExceptionForObservable() { final StorIOSQLite storIOSQLite = mock(StorIOSQLite.class); when(storIOSQLite.observeChangesInTables(eq(singleton("test_table")))) .thenReturn(Observable.<Changes>empty()); final GetResolver<Integer> getResolver = mock(GetResolver.class); when(getResolver.performGet(eq(storIOSQLite), any(Query.class))) .thenThrow(new IllegalStateException("test exception")); final TestSubscriber<Integer> testSubscriber = new TestSubscriber<Integer>(); new PreparedGetNumberOfResults.Builder(storIOSQLite) .withQuery(Query.builder().table("test_table").build()) .withGetResolver(getResolver) .prepare() .createObservable() .subscribe(testSubscriber); testSubscriber.awaitTerminalEvent(60, SECONDS); testSubscriber.assertError(StorIOException.class); <START> StorIOException storIOException = (StorIOException) testSubscriber.getOnErrorEvents().get(0); <END> IllegalStateException cause = (IllegalStateException) storIOException.getCause(); assertThat(cause).hasMessage("test exception"); testSubscriber.unsubscribe(); }</code><technical_language>check onErrorEvents size is one</technical_language>

Target:
public void shouldWrapExceptionIntoStorIOExceptionForObservable() { final StorIOSQLite storIOSQLite = mock(StorIOSQLite.class); when(storIOSQLite.observeChangesInTables(eq(singleton("test_table")))) .thenReturn(Observable.<Changes>empty()); final GetResolver<Integer> getResolver = mock(GetResolver.class); when(getResolver.performGet(eq(storIOSQLite), any(Query.class))) .thenThrow(new IllegalStateException("test exception")); final TestSubscriber<Integer> testSubscriber = new TestSubscriber<Integer>(); new PreparedGetNumberOfResults.Builder(storIOSQLite) .withQuery(Query.builder().table("test_table").build()) .withGetResolver(getResolver) .prepare() .createObservable() .subscribe(testSubscriber); testSubscriber.awaitTerminalEvent(60, SECONDS); testSubscriber.assertError(StorIOException.class); assertThat(testSubscriber.getOnErrorEvents()).hasSize(1); StorIOException storIOException = (StorIOException) testSubscriber.getOnErrorEvents().get(0); IllegalStateException cause = (IllegalStateException) storIOException.getCause(); assertThat(cause).hasMessage("test exception"); testSubscriber.unsubscribe(); }
Source:
<code>private void setDebugStatus( String message ) { <START> if ( debug ) { <END> log.setLogLevel(LogLevel.DEBUG); log.logDebug( message ); } }</code><technical_language>This is be. This be: if (log.isDebugEnabled()) { log.logDebug( message ); } Do "if (debug)" this is hardcoded enabled. Do "setLogLevel()" overriding system administrator's configuration</technical_language>

Target:
private void setDebugStatus( String message ) { if ( log.isDebug() ) { log.logDebug( message ); } }
Source:
<code>private static void initializeRealm(Realm realm) { long version = realm.getVersion(); boolean commitNeeded = false; try { realm.beginTransaction(); if (version == UNVERSIONED) { commitNeeded = true; realm.setVersion(realm.configuration.getSchemaVersion()); } RealmProxyMediator mediator = realm.configuration.getSchemaMediator(); final Set<Class<? extends RealmObject>> modelClasses = mediator.getModelClasses(); final Map<Class<? extends RealmObject>, ColumnInfo> columnInfoMap; columnInfoMap = new HashMap<Class<? extends RealmObject>, ColumnInfo>(modelClasses.size()); for (Class<? extends RealmObject> modelClass : modelClasses) { if (version == UNVERSIONED) { mediator.createTable(modelClass, realm.sharedGroupManager.getTransaction()); } columnInfoMap.put(modelClass, mediator.validateTable(modelClass, realm.sharedGroupManager.getTransaction())); } realm.schema.columnIndices = new ColumnIndices(columnInfoMap); <START> final Transaction transaction = realm.getConfiguration().getInitialDataTransaction(); <END> if (transaction != null) { transaction.execute(realm); } } finally { if (commitNeeded) { realm.commitTransaction(false, null); } else { realm.cancelTransaction(); } } }</code><technical_language>I this is enough ensure trigger this file is created, e.g. I pretty this get triggered in case: RealmConfiguration config = new RealmConfiguration.Builder(context).build(); Realm.getInstance(config).close(); Realm.getInstance(config).close(); // This trigger schema cleared Also, file copied assets instead. I of this is a method checks for existence of Realm file setting a flag. A good place calling BaseRealm constructor. Also, unit tests needed verify behaviour of this</technical_language>

Target:
private static void initializeRealm(Realm realm) { long version = realm.getVersion(); boolean commitNeeded = false; try { realm.beginTransaction(); if (version == UNVERSIONED) { commitNeeded = true; realm.setVersion(realm.configuration.getSchemaVersion()); } RealmProxyMediator mediator = realm.configuration.getSchemaMediator(); final Set<Class<? extends RealmObject>> modelClasses = mediator.getModelClasses(); final Map<Class<? extends RealmObject>, ColumnInfo> columnInfoMap; columnInfoMap = new HashMap<Class<? extends RealmObject>, ColumnInfo>(modelClasses.size()); for (Class<? extends RealmObject> modelClass : modelClasses) { if (version == UNVERSIONED) { mediator.createTable(modelClass, realm.sharedGroupManager.getTransaction()); } columnInfoMap.put(modelClass, mediator.validateTable(modelClass, realm.sharedGroupManager.getTransaction())); } realm.schema.columnIndices = new ColumnIndices(columnInfoMap); if (version == UNVERSIONED) { final Transaction transaction = realm.getConfiguration().getInitialDataTransaction(); if (transaction != null) { transaction.execute(realm); } } } finally { if (commitNeeded) { realm.commitTransaction(false, null); } else { realm.cancelTransaction(); } } }
Source:
<code>public Mono<MsalToken> authenticateWithPublicClientCache(TokenRequestContext request, IAccount account) { return Mono.fromFuture(() -> { SilentParameters.SilentParametersBuilder parametersBuilder = SilentParameters.builder( new HashSet<>(request.getScopes())); if (account != null) { parametersBuilder = parametersBuilder.account(account); } try { return getPublicClientApplication(false) .acquireTokenSilently(parametersBuilder.build()); } catch (MalformedURLException e) { throw logger.logExceptionAsError(Exceptions.propagate(e)); } }).map(ar -> new MsalToken(ar, options)) .filter(t -> !t.isExpired()) .switchIfEmpty(Mono.fromFuture(() -> { SilentParameters.SilentParametersBuilder forceParametersBuilder = SilentParameters.builder( new HashSet<>(request.getScopes())).forceRefresh(true); if (account != null) { forceParametersBuilder = forceParametersBuilder.account(account); } try { return getPublicClientApplication(false).acquireTokenSilently(forceParametersBuilder.build()); } catch (MalformedURLException e) { <START> throw logger.logExceptionAsError(Exceptions.propagate(e)); <END> } }).map(result -> new MsalToken(result, options))); }</code><technical_language>Mono.fromFuture wrap thrown exception a Mono.error this need handled a regular exception</technical_language>

Target:
public Mono<MsalToken> authenticateWithPublicClientCache(TokenRequestContext request, IAccount account) { return Mono.fromFuture(() -> { SilentParameters.SilentParametersBuilder parametersBuilder = SilentParameters.builder( new HashSet<>(request.getScopes())); if (account != null) { parametersBuilder = parametersBuilder.account(account); } try { return getPublicClientApplication(false) .acquireTokenSilently(parametersBuilder.build()); } catch (MalformedURLException e) { return getFailedCompletableFuture(logger.logExceptionAsError(new RuntimeException(e))); } }).map(ar -> new MsalToken(ar, options)) .filter(t -> !t.isExpired()) .switchIfEmpty(Mono.fromFuture(() -> { SilentParameters.SilentParametersBuilder forceParametersBuilder = SilentParameters.builder( new HashSet<>(request.getScopes())).forceRefresh(true); if (account != null) { forceParametersBuilder = forceParametersBuilder.account(account); } try { return getPublicClientApplication(false).acquireTokenSilently(forceParametersBuilder.build()); } catch (MalformedURLException e) { return getFailedCompletableFuture(logger.logExceptionAsError(new RuntimeException(e))); } }).map(result -> new MsalToken(result, options))); }
Source:
<code>public Builder useKryoSerializer() { try { config.setSerializationClassName(new KryoSerializer().getClass().getName()); } catch (NoClassDefFoundError e) { <START> throw new RuntimeException("Please link with kryo"); <END> } return this; }</code><technical_language>Suggest more explicit in error message, "Linking kryo is needed useKryoSerializer is used"</technical_language>

Target:
public Builder useKryoSerializer() { try { config.setSerializationClassName(new KryoSerializer().getClass().getName()); } catch (NoClassDefFoundError e) { throw new RuntimeException("Linking with kryo is needed because useKryoSerializer is used"); } return this; }
Source:
<code>public double min(String colName) { <START> double[] colArray = toDoubleArray(colName); double arrayMin = StatUtils.min(colArray); return arrayMin; <END> }</code><technical_language>return StatUtils. min(toDoubleArray(colName)) directly</technical_language>

Target:
public double min(String colName) { return StatUtils.min(toDoubleArray(colName)); }
Source:
<code>final static JSONObject getEnumOrigin(String enumOrigin) { String typeName = enumOrigin.substring(0, enumOrigin.lastIndexOf(".")); JSONArray enums = Simulator.getDatabase().getModelStructure() .getJSONArray("enums"); JSONObject originDeclaration = null; for (int num = 0; num < enums.length(); num++) { JSONObject curType = enums.getJSONObject(num); if (typeName.equals(curType.getString("name"))) { originDeclaration = curType; <START> break; <END> } } return originDeclaration; }</code><technical_language>java return item;</technical_language>

Target:
final static JSONObject getEnumOrigin(String enumOrigin) { String typeName = enumOrigin.substring(0, enumOrigin.lastIndexOf(".")); JSONArray enums = Simulator.getDatabase().getModelStructure() .getJSONArray("enums"); for (int num = 0; num < enums.length(); num++) { JSONObject enumItem = enums.getJSONObject(num); if (typeName.equals(enumItem.getString("name"))) { return enumItem; } } return null; }
Source:
<code>public void getSearchHandler_shouldReturnSearchHandlerProvidingAllRequestParametersAndParametersSatisfyingItsRequiredParameters() throws Exception { SearchHandler searchHandler1 = mock(SearchHandler.class); SearchConfig searchConfig1 = new SearchConfig("default", "v1/concept", "1.8.*", new SearchQuery.Builder( "description").withRequiredParameters(new SearchParameter("source", "some source")) .withOptionalParameters(new SearchParameter("code", "some code")).build()); when(searchHandler1.getSearchConfig()).thenReturn(searchConfig1); SearchHandler searchHandler2 = mock(SearchHandler.class); SearchConfig searchConfig2 = new SearchConfig("conceptByMapping", "v1/concept", "1.8.*", new SearchQuery.Builder( <START> "description").withRequiredParameters(new SearchParameter("source", "some source")).build()); <END> when(searchHandler2.getSearchConfig()).thenReturn(searchConfig2); setCurrentOpenmrsVersion("1.8.10"); when(restHelperService.getRegisteredSearchHandlers()).thenReturn(asList(searchHandler1, searchHandler2)); RestUtil.disableContext(); Map<String, String[]> parameters = new HashMap<String, String[]>(); parameters.put("source", new String[] { "some source" }); parameters.put("code", new String[] { "some code" }); assertThat(restService.getSearchHandler("v1/concept", parameters), is(searchHandler1)); }</code><technical_language>modify existing test? failing? introduced tests</technical_language>

Target:
public void getSearchHandler_shouldReturnSearchHandlerProvidingAllRequestParametersAndParametersSatisfyingItsRequiredParameters() throws Exception { SearchHandler searchHandler1 = mock(SearchHandler.class); SearchConfig searchConfig1 = new SearchConfig("default", "v1/concept", "1.8.*", new SearchQuery.Builder( "description").withRequiredParameters("source").withOptionalParameters("code").build()); when(searchHandler1.getSearchConfig()).thenReturn(searchConfig1); SearchHandler searchHandler2 = mock(SearchHandler.class); SearchConfig searchConfig2 = new SearchConfig("conceptByMapping", "v1/concept", "1.8.*", new SearchQuery.Builder( "description").withRequiredParameters("source").build()); when(searchHandler2.getSearchConfig()).thenReturn(searchConfig2); setCurrentOpenmrsVersion("1.8.10"); when(restHelperService.getRegisteredSearchHandlers()).thenReturn(asList(searchHandler1, searchHandler2)); RestUtil.disableContext(); Map<String, String[]> parameters = new HashMap<String, String[]>(); parameters.put("source", new String[] { "some source" }); parameters.put("code", new String[] { "some code" }); assertThat(restService.getSearchHandler("v1/concept", parameters), is(searchHandler1)); }
Source:
<code>public void setProtocol(ProtocolConfig protocol) { <START> setProtocols(new ArrayList<ProtocolConfig>(Arrays.asList(protocol))); <END> }</code><technical_language>setProtocols(new ArrayList<>(protocol)); more concise me</technical_language>

Target:
public void setProtocol(ProtocolConfig protocol) { setProtocols(new ArrayList<>(Arrays.asList(protocol))); }
Source:
<code>public void testGetGeoJsonResponseWfs20() throws Exception { JSON response = getAsJSON( "wfs?request=GetFeature&version=2.0" + "&typenames=st_gml32:Station_gml32&outputFormat=application/json"); <START> print(response); <END> checkStation1Exists(response); JSONObject station = getFeaturePropertiesById(response, "st.2"); assertThat(station, notNullValue()); JSONObject contact = station.getJSONObject("contact"); assertThat(contact.size(), is(3)); assertThat(contact.get("@mail"), is("st2@stations.org")); JSONObject phone = contact.getJSONObject("phone"); assertThat(phone.size(), is(1)); assertFalse(phone.has("value")); assertThat(phone.get("@timeZone"), is("")); JSONObject featureLinkA = station.getJSONArray("featureLinkA").getJSONObject(0); assertEquals("<LINK_2>", featureLinkA.getString("@href")); JSONObject featureLinkB = station.getJSONArray("featureLinkB").getJSONObject(0); assertEquals("<LINK_0>", featureLinkB.getString("@href")); JSONObject featureLinkC = station.getJSONObject("featureLinkC"); assertEquals("<LINK_1>", featureLinkC.getString("@href")); }</code><technical_language>Leftover</technical_language>

Target:
public void testGetGeoJsonResponseWfs20() throws Exception { JSON response = getAsJSON( "wfs?request=GetFeature&version=2.0" + "&typenames=st_gml32:Station_gml32&outputFormat=application/json"); checkStation1Exists(response); JSONObject station = getFeaturePropertiesById(response, "st.2"); assertThat(station, notNullValue()); JSONObject contact = station.getJSONObject("contact"); assertThat(contact.size(), is(3)); assertThat(contact.get("@mail"), is("st2@stations.org")); JSONObject phone = contact.getJSONObject("phone"); assertThat(phone.size(), is(1)); assertFalse(phone.has("value")); assertThat(phone.get("@timeZone"), is("")); JSONObject featureLinkA = station.getJSONArray("featureLinkA").getJSONObject(0); assertEquals("<LINK_2>", featureLinkA.getString("@href")); JSONObject featureLinkB = station.getJSONArray("featureLinkB").getJSONObject(0); assertEquals("<LINK_0>", featureLinkB.getString("@href")); JSONObject featureLinkC = station.getJSONObject("featureLinkC"); assertEquals("<LINK_1>", featureLinkC.getString("@href")); }
Source:
<code>public void tickGO() { if(running) { <START> if(playersDead()) <END> { levelLost(); } } }</code><technical_language>PMD: if statements merged. <layout, logic</technical_language>

Target:
public void tickGO() { if(running && playersDead()) { levelLost(); } }
Source:
<code>public long getTableWriteId(String dbName, String tableName) throws LockException { String fullTableName = AcidUtils.getFullTableName(dbName, tableName); if (tableWriteIds.containsKey(fullTableName)) { return tableWriteIds.get(fullTableName); } try { <START> long writeId = 0; END> if (isTxnOpen()) { writeId = getMS().allocateTableWriteId(txnId, dbName, tableName); tableWriteIds.put(fullTableName, writeId); } return writeId; } catch (TException e) { throw new LockException(ErrorMsg.METASTORE_COMMUNICATION_FAILED.getMsg(), e); } }</code><technical_language>is valid call this w/o open txn? this throw? If not, this doc'd</technical_language>

Target:
public long getTableWriteId(String dbName, String tableName) throws LockException { assert isTxnOpen(); String fullTableName = AcidUtils.getFullTableName(dbName, tableName); if (tableWriteIds.containsKey(fullTableName)) { return tableWriteIds.get(fullTableName); } try { long writeId = getMS().allocateTableWriteId(txnId, dbName, tableName); tableWriteIds.put(fullTableName, writeId); return writeId; } catch (TException e) { throw new LockException(ErrorMsg.METASTORE_COMMUNICATION_FAILED.getMsg(), e); } }
Source:
<code>protected void persistExpansion() { if(fLaunchConfigurationView != null) { IDialogSettings settings = getDialogSettings(); TreeItem[] items = fLaunchConfigurationView.getTreeViewer().getTree().getItems(); String value = settings.get(DIALOG_EXPANDED_NODES); if(value == null) { value = IInternalDebugCoreConstants.EMPTY_STRING; } ArrayList<String> list = new ArrayList<>(); String[] persisted = value.split(DELIMITER); Collections.addAll(list, persisted); String type = IInternalDebugCoreConstants.EMPTY_STRING; for (TreeItem item : items) { type = ((ILaunchConfigurationType) item.getData()).getIdentifier(); if (!list.contains(type) & item.getExpanded()) { list.add(type); } else if (!item.getExpanded()) { list.remove(type); } } value = IInternalDebugCoreConstants.EMPTY_STRING; for (String <START> string : <END> list) { value += string + DELIMITER; } settings.put(DIALOG_EXPANDED_NODES, value); } }</code><technical_language>rename segment</technical_language>

Target:
protected void persistExpansion() { if(fLaunchConfigurationView != null) { IDialogSettings settings = getDialogSettings(); TreeItem[] items = fLaunchConfigurationView.getTreeViewer().getTree().getItems(); String value = settings.get(DIALOG_EXPANDED_NODES); if(value == null) { value = IInternalDebugCoreConstants.EMPTY_STRING; } ArrayList<String> list = new ArrayList<>(); String[] persisted = value.split(DELIMITER); Collections.addAll(list, persisted); String type = IInternalDebugCoreConstants.EMPTY_STRING; for (TreeItem item : items) { type = ((ILaunchConfigurationType) item.getData()).getIdentifier(); if (!list.contains(type) & item.getExpanded()) { list.add(type); } else if (!item.getExpanded()) { list.remove(type); } } value = IInternalDebugCoreConstants.EMPTY_STRING; for (String segment : list) { value += segment + DELIMITER; } settings.put(DIALOG_EXPANDED_NODES, value); } }
Source:
<code>public static void main(String...args) { @SuppressWarnings({ "unchecked" }) CliBuilder<Callable> builder = Cli.buildCli("brooklyn", Callable.class) .withDescription("Brooklyn Management Service") .withDefaultCommand(Help.class) .withCommands( Help.class, Launch.class ); Cli<Callable> brooklynParser = builder.build(); <START> Help.help(brooklynParser.getMetadata(), Arrays.asList("launch"), launchHelp); <END> try { Callable<?> command = brooklynParser.parse(args); command.call(); } catch (ParseException pe) { System.err.println("Parse error: " + pe.getMessage()); System.err.println(launchHelp.toString()); System.exit(1); } catch (Exception e) { System.err.println("Execution error: " + e.getMessage()); e.printStackTrace(); } }</code><technical_language>Try @Inject help; get this</technical_language>

Target:
public static void main(String...args) { Cli<BrooklynCommand> parser = buildCli(); try { log.debug("Parsing command line arguments"); BrooklynCommand command = parser.parse(args); log.debug("Executing command: "+command); command.call(); } catch (ParseException pe) { System.err.println("Parse error: " + pe.getMessage()); StringBuilder help = new StringBuilder(); Help.help(parser.getMetadata(), ImmutableList.of("brooklyn"), help); System.err.println(help); System.exit(1); } catch (Exception e) { System.err.println("Execution error: " + e.getMessage()); e.printStackTrace(); } }
Source:
<code>public ActualProperties visitSpatialJoin(SpatialJoinNode node, List<ActualProperties> inputProperties) { ActualProperties probeProperties = inputProperties.get(0); ActualProperties buildProperties = inputProperties.get(1); switch (node.getType()) { case INNER: probeProperties = probeProperties.translate(column -> filterIfMissing(node.getOutputSymbols(), column)); buildProperties = buildProperties.translate(column -> filterIfMissing(node.getOutputSymbols(), column)); Map<Symbol, NullableValue> constants = new HashMap<>(); constants.putAll(probeProperties.getConstants()); constants.putAll(buildProperties.getConstants()); return ActualProperties.builderFrom(probeProperties) .constants(constants) .build(); case LEFT: return ActualProperties.builderFrom(probeProperties.translate(column -> filterIfMissing(node.getOutputSymbols(), column))) .build(); default: <START> throw new UnsupportedOperationException("Unsupported spatial join type: " + node.getType()); <END> } }</code><technical_language>IllegalArgumentException</technical_language>

Target:
public ActualProperties visitSpatialJoin(SpatialJoinNode node, List<ActualProperties> inputProperties) { ActualProperties probeProperties = inputProperties.get(0); ActualProperties buildProperties = inputProperties.get(1); switch (node.getType()) { case INNER: probeProperties = probeProperties.translate(column -> filterIfMissing(node.getOutputSymbols(), column)); buildProperties = buildProperties.translate(column -> filterIfMissing(node.getOutputSymbols(), column)); Map<Symbol, NullableValue> constants = new HashMap<>(); constants.putAll(probeProperties.getConstants()); constants.putAll(buildProperties.getConstants()); return ActualProperties.builderFrom(probeProperties) .constants(constants) .build(); case LEFT: return ActualProperties.builderFrom(probeProperties.translate(column -> filterIfMissing(node.getOutputSymbols(), column))) .build(); default: throw new IllegalArgumentException("Unsupported spatial join type: " + node.getType()); } }
Source:
<code>public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { binding = DataBindingUtil.inflate(inflater, R.layout.fragment_albums, container, false); binding.albumRecycler.setHasFixedSize(true); binding.albumRecycler.setLayoutManager(new GridLayoutManager(getContext(), calculateColumnCount())); binding.photoRecycler.setHasFixedSize(true); <START> binding.photoRecycler.setLayoutManager(new GridLayoutManager(getContext(), calculateColumnCount() * Integer.parseInt(SettingsPreferences.getSettingPreference(SettingsPreferences.KEY_NUMBER_ROW, "3")))); <END> return binding.getRoot(); }</code><technical_language>Integer.parseInt is necessary if PreferenceManager instead of passing SettingsPreferences</technical_language>

Target:
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { binding = DataBindingUtil.inflate(inflater, R.layout.fragment_albums, container, false); binding.albumRecycler.setHasFixedSize(true); binding.albumRecycler.setLayoutManager(new GridLayoutManager(getContext(), calculateColumnCount())); binding.photoRecycler.setHasFixedSize(true); binding.photoRecycler.setLayoutManager(new GridLayoutManager(getContext(), calculateColumnCount() * preferences.getInt(PreferencesRepository.KEY_PREF_PHOTOS_PER_ROW))); return binding.getRoot(); }
Source:
<code>public void testAddPointsTwoSprites() { <START> final int expectedInvocations = 1; <END> testSprite1.getActionFactory().createStitchAction(testSprite1).act(1f); testSprite2.getActionFactory().createStitchAction(testSprite2).act(1f); Mockito.verify(StageActivity.stageListener.embroideryList, Mockito.times(expectedInvocations)).add(new StitchPoint(spriteCoords1, StitchPoint.NORMALSTITCH, testSprite1)); Mockito.verify(StageActivity.stageListener.embroideryList, Mockito.times(expectedInvocations)).add(new StitchPoint(spriteCoords2, StitchPoint.NORMALSTITCH, testSprite2)); }</code><technical_language>Please inline this variable</technical_language>

Target:
public void testAddPointsTwoSprites() { ActionFactory.createStitchAction(testSprite1).act(1f); ActionFactory.createStitchAction(testSprite2).act(1f); Mockito.verify(StageActivity.stageListener.embroideryPatternManager, Mockito.times(1)).addStitchCommand(new DSTStitchCommand(spriteCoords1.x, spriteCoords1.y, testSprite1.look.getZIndex(), testSprite1)); Mockito.verify(StageActivity.stageListener.embroideryPatternManager, Mockito.times(1)).addStitchCommand(new DSTStitchCommand(spriteCoords2.x, spriteCoords2.y, testSprite2.look.getZIndex(), testSprite2)); }
Source:
<code>public Scope newScope(TraceContext currentSpan) { final String previousTraceId = (String) MDC.get("traceId"); final String previousSpanId = (String) MDC.get("spanId"); <START> MDC.put("traceId", currentSpan.traceIdString()); <END> MDC.put("spanId", HexCodec.toLowerHex(currentSpan.spanId())); Scope scope = delegate.newScope(currentSpan); return () -> { scope.close(); if (previousTraceId != null) { MDC.put("traceId", previousTraceId); } else { MDC.remove("traceId"); } if (previousSpanId != null) { MDC.put("spanId", previousSpanId); } else { MDC.remove("spanId"); } }; }</code><technical_language>want check out #413 currentSpan null, guard this set null</technical_language>

Target:
public Scope newScope(TraceContext currentSpan) { final Object previousTraceId = MDC.get("traceId"); final Object previousSpanId = MDC.get("spanId"); if (currentSpan != null) { MDC.put("traceId", currentSpan.traceIdString()); MDC.put("spanId", HexCodec.toLowerHex(currentSpan.spanId())); } else { MDC.remove("traceId"); MDC.remove("spanId"); } Scope scope = delegate.newScope(currentSpan); return () -> { scope.close(); if (previousTraceId != null) { MDC.put("traceId", previousTraceId); } else { MDC.remove("traceId"); } if (previousSpanId != null) { MDC.put("spanId", previousSpanId); } else { MDC.remove("spanId"); } }; }
Source:
<code>public void copyFrom(ColumnIndices other, RealmProxyMediator mediator) { for (Map.Entry<Class<? extends RealmModel>, ColumnInfo> entry : classes.entrySet()) { final ColumnInfo otherColumnInfo = other.getColumnInfo(entry.getKey()); if (otherColumnInfo == null) { <START> throw new IllegalStateException("failed to copy ColumnIndices cache: " <END> + Table.tableNameToClassName(mediator.getTableName(entry.getKey()))); } entry.getValue().copyColumnInfoFrom(otherColumnInfo); } this.schemaVersion = other.schemaVersion; }</code><technical_language>failed -> Failed</technical_language>

Target:
public void copyFrom(ColumnIndices other, RealmProxyMediator mediator) { for (Map.Entry<Class<? extends RealmModel>, ColumnInfo> entry : classes.entrySet()) { final ColumnInfo otherColumnInfo = other.getColumnInfo(entry.getKey()); if (otherColumnInfo == null) { throw new IllegalStateException("Failed to copy ColumnIndices cache: " + Table.tableNameToClassName(mediator.getTableName(entry.getKey()))); } entry.getValue().copyColumnInfoFrom(otherColumnInfo); } this.schemaVersion = other.schemaVersion; }
Source:
<code>protected void prepareTestData() { dataBundle = getTypicalDataBundle(); typicalBundle = getTypicalDataBundle(); removeAndRestoreDataBundle(typicalBundle); <START> removeAndRestoreTypicalDataBundle(); <END> }</code><technical_language>typical data bundle removed restored twice</technical_language>

Target:
protected void prepareTestData() { removeAndRestoreTypicalDataBundle(); }
Source:
<code>public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); if (spell != null) { for (Ability ability : spell.getAbilities()) { <START> if (ability instanceof KickerAbility && ((KickerAbility) ability).getKickedCounter(game, spell.getSpellAbility()) > 0) { <END> return true; } } } return false; }</code><technical_language>This trigger for a multikicked spell, needs trigger separately for kick</technical_language>

Target:
public boolean checkTrigger(GameEvent event, Game game) { return true; }
Source:
<code>public Point find(Square square){ for (int i = 0; i < squares.length; i++){ for (int j = 0; j < squares[i].length; j++){ if (square == squares[i][j]) return new Point(i, j); } } <START> return null; END> }</code><technical_language>throw exception</technical_language>

Target:
public Point find(Square square){ for (int j = 0; j < size.height; j++){ for (int i = 0; i < size.width; i++){ if (square == squares[j][i]){ return new Point(i, j); } } } throw new IllegalArgumentException("Square not found in grid"); }
Source:
<code><START> public PatchLink createLink(int index, PatchScreen.Type patchType, <END> SafeHtml before, SafeHtml after) { Patch patch = patchList.get(index); Key thisKey = patch.getKey(); PatchLink link; if (patchType == PatchScreen.Type.SIDE_BY_SIDE && patch.getPatchType() == Patch.PatchType.UNIFIED) { link = new PatchLink.SideBySide("", base, thisKey, index, detail, this); } else { link = new PatchLink.Unified("", base, thisKey, index, detail, this); } SafeHtmlBuilder text = new SafeHtmlBuilder(); text.append(before); text.append(getFileNameOnly(patch)); text.append(after); SafeHtml.set(link, text); return link; }</code><technical_language>this need public</technical_language>

Target:
private PatchLink createLink(int index, PatchScreen.Type patchType, SafeHtml before, SafeHtml after) { Patch patch = patchList.get(index); Key thisKey = patch.getKey(); PatchLink link; if (patchType == PatchScreen.Type.SIDE_BY_SIDE && patch.getPatchType() == Patch.PatchType.UNIFIED) { link = new PatchLink.SideBySide("", base, thisKey, index, detail, this); } else { link = new PatchLink.Unified("", base, thisKey, index, detail, this); } SafeHtmlBuilder text = new SafeHtmlBuilder(); text.append(before); text.append(getFileNameOnly(patch)); text.append(after); SafeHtml.set(link, text); return link; }
Source:
<code>public Collection<Measurement> executeSensors() { for (TopologyAPI.Config.KeyValue kv : physicalPlanProvider.get().getTopology().getTopologyConfig().getKvsList()) { LOG.info("kv " + kv.getKey() + " => " + kv.getValue()); if (kv.getKey().equals(TOGGLE_RUNTIME_CONFIG_KEY)) { <START> String val = kv.getValue(); <END> if ("False".equals(val) || "false".equals(val)) { if (running) { running = false; LOG.info("policy running status changed to False"); } } else if ("True".equals(val) || "true".equals(val)) { if (!running) { running = true; LOG.info("policy running status changed to True"); } } else { LOG.warning("unknown runtime config for `policy running status`: " + val); } } } if (running) { return super.executeSensors(); } else { return new ArrayList<Measurement>(); } }</code><technical_language>Boolean.parseBoolean(val) simplify code</technical_language>

Target:
public Collection<Measurement> executeSensors() { for (TopologyAPI.Config.KeyValue kv : physicalPlanProvider.get().getTopology().getTopologyConfig().getKvsList()) { LOG.fine("kv " + kv.getKey() + ":" + kv.getValue()); if (kv.getKey().equals(policyIdRuntime)) { try { PolicyMode val = PolicyMode.valueOf(kv.getValue()); if (!policyMode.equals(val)) { policyMode = val; LOG.info("policy " + policyId + " status changed to " + policyMode); } else { LOG.fine("policy " + policyId + " status remains same " + policyMode); } break; } catch (IllegalArgumentException e) { LOG.warning("policy " + policyId + " status does not change " + policyMode + "; unknown input " + kv.getValue()); } } } if (policyMode.equals(PolicyMode.activated)) { return super.executeSensors(); } else { return new ArrayList<Measurement>(); } }
Source:
<code>public void shouldReturnNone() { Option<String> none = HashMap.<Integer, String>empty().lift().apply(1); <START> assertThat(none instanceof Option.None); <END> }</code><technical_language>Dito java assertThat(oneToOne).isEqualTo(Option.none());</technical_language>

Target:
public void shouldReturnNone() { Option<String> oneToOne = HashMap.<Integer, String>empty().lift().apply(1); assertThat(oneToOne).isEqualTo(Option.none()); }
Source:
<code>private boolean save(Path targetPath, SaveDatabaseMode mode) { <START> var f = throttler.scheduleTask(() -> executeSave(targetPath, mode)); <END> try { var ok = f.get(); LOGGER.debug("Saved {}", ok); return (boolean) f.get(); } catch (InterruptedException | ExecutionException e) { LOGGER.error("Exectutor Exception", e); } return false; }</code><technical_language>reame f -> task</technical_language>

Target:
private boolean save(Path targetPath, SaveDatabaseMode mode) { if (mode == SaveDatabaseMode.NORMAL) { dialogService.notify(String.format("%s...", Localization.lang("Saving library"))); } libraryTab.setSaving(true); try { Charset encoding = libraryTab.getBibDatabaseContext() .getMetaData() .getEncoding() .orElse(preferences.getDefaultEncoding()); libraryTab.getBibDatabaseContext().getMetaData().setEncoding(encoding, ChangePropagation.DO_NOT_POST_EVENT); boolean success = saveDatabase(targetPath, false, encoding, SavePreferences.DatabaseSaveType.ALL); if (success) { libraryTab.getUndoManager().markUnchanged(); libraryTab.resetChangedProperties(); } return success; } catch (SaveException ex) { LOGGER.error(String.format("A problem occurred when trying to save the file %s", targetPath), ex); dialogService.showErrorDialogAndWait(Localization.lang("Save library"), Localization.lang("Could not save file."), ex); return false; } finally { libraryTab.setSaving(false); } }
Source:
<code><START> public TDImportResult importBytes(String databaseName, String tableName, byte[] content) <END> { return doPut(buildUrl(String.format("/v3/table/import/%s/%s/%s", databaseName, tableName, "msgpack.gz")), ImmutableMap.of(), content, TDImportResult.class); }</code><technical_language>support offset length arguments well</technical_language>

Target:
public TDImportResult importBytes(String databaseName, String tableName, byte[] content) { return doPut(buildUrl(String.format("/v3/table/import/%s/%s/%s", databaseName, tableName, "msgpack.gz")), ImmutableMap.of(), content, 0, content.length, TDImportResult.class); }
Source:
<code>public boolean isFinal() { boolean parkAndRide = stateData.opt.parkAndRide; boolean bikeParkAndRide = stateData.opt.bikeParkAndRide; boolean bikeRentingOk; boolean bikeParkAndRideOk; boolean carParkAndRideOk; <START> boolean taxiOk; <END> if (stateData.opt.arriveBy) { bikeRentingOk = !isBikeRenting() && (!stateData.opt.bikeRental || hasUsedRentedBike()); bikeParkAndRideOk = !bikeParkAndRide || !isBikeParked(); carParkAndRideOk = !parkAndRide || !isCarParked(); taxiOk = getTaxiState() != CarPickupState.WALK_FROM_DROP_OFF; } else { bikeRentingOk = !isBikeRenting() && (!stateData.opt.bikeRental || hasUsedRentedBike()); bikeParkAndRideOk = !bikeParkAndRide || isBikeParked(); carParkAndRideOk = !parkAndRide || isCarParked(); taxiOk = getTaxiState() != CarPickupState.WALK_TO_PICKUP; } return bikeRentingOk && bikeParkAndRideOk && carParkAndRideOk && taxiOk; }</code><technical_language>rename match new term "car pickup", for example pickedUpByCar</technical_language>

Target:
public boolean isFinal() { boolean parkAndRide = stateData.opt.parkAndRide; boolean bikeParkAndRide = stateData.opt.bikeParkAndRide; boolean bikeRentingOk; boolean bikeParkAndRideOk; boolean carParkAndRideOk; boolean pickedUpByCar; if (stateData.opt.arriveBy) { bikeRentingOk = !isBikeRenting() && (!stateData.opt.bikeRental || hasUsedRentedBike()); bikeParkAndRideOk = !bikeParkAndRide || !isBikeParked(); carParkAndRideOk = !parkAndRide || !isCarParked(); pickedUpByCar = getCarPickupState() != CarPickupState.WALK_FROM_DROP_OFF; } else { bikeRentingOk = !isBikeRenting() && (!stateData.opt.bikeRental || hasUsedRentedBike()); bikeParkAndRideOk = !bikeParkAndRide || isBikeParked(); carParkAndRideOk = !parkAndRide || isCarParked(); pickedUpByCar = getCarPickupState() != CarPickupState.WALK_TO_PICKUP; } return bikeRentingOk && bikeParkAndRideOk && carParkAndRideOk && pickedUpByCar; }
Source:
<code>SharedTokenCacheCredential(String username, String clientID, IdentityClientOptions identityClientOptions) { this.configuration = Configuration.getGlobalConfiguration().clone(); if (username == null) { <START> if (configuration.contains(Configuration.PROPERTY_AZURE_USERNAME)) { <END> this.username = configuration.get(Configuration.PROPERTY_AZURE_USERNAME); } else { this.username = null; } } else { this.username = username; } this.clientID = clientID; }</code><technical_language>other if/else question</technical_language>

Target:
SharedTokenCacheCredential(String username, String clientID, IdentityClientOptions identityClientOptions) { this.configuration = Configuration.getGlobalConfiguration().clone(); if (username == null) { this.username = configuration.get(Configuration.PROPERTY_AZURE_USERNAME); } else { this.username = username; } this.clientID = clientID; }
Source:
<code>public Response updateFirmware( @HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @ApiParam(value = "language") String language, @PathParam("thingUID") @ApiParam(value = "thing") String thingUID, @PathParam("firmwareVersion") @ApiParam(value = "version") String firmwareVersion) throws IOException { Thing thing = thingRegistry.get(new ThingUID(thingUID)); if (thing == null) { <START> return JSONResponse.createResponse(Status.BAD_REQUEST, null, "Unknown thingUID"); <END> } FirmwareUID firmwareUID = new FirmwareUID(thing.getThingTypeUID(), firmwareVersion); try { firmwareUpdateService.updateFirmware(thing.getUID(), firmwareUID, LocaleUtil.getLocale(language)); } catch (IllegalArgumentException | NullPointerException ex) { return JSONResponse.createResponse(Status.BAD_REQUEST, null, "Unknown thing/firmware id"); } return Response.status(Status.OK).build(); }</code><technical_language>I review this I assume this results in a 404 needs added API doc</technical_language>

Target:
public Response updateFirmware( @HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @ApiParam(value = "language") String language, @PathParam("thingUID") @ApiParam(value = "thing") String thingUID, @PathParam("firmwareVersion") @ApiParam(value = "version") String firmwareVersion) throws IOException { Thing thing = thingRegistry.get(new ThingUID(thingUID)); if (thing == null) { return getThingNotFoundResponse(thingUID); } FirmwareUID firmwareUID = new FirmwareUID(thing.getThingTypeUID(), firmwareVersion); try { firmwareUpdateService.updateFirmware(thing.getUID(), firmwareUID, LocaleUtil.getLocale(language)); } catch (IllegalArgumentException | NullPointerException | IllegalStateException ex) { return JSONResponse.createResponse(Status.BAD_REQUEST, null, "Firmware update preconditions not satisfied."); } return Response.status(Status.OK).build(); }
Source:
<code>public void init(FilterConfig filterConfig) throws ServletException { List<String> filterParams = Collections.list(filterConfig .getInitParameterNames()); <START> if (null == cachePattern) { <END> for (String paramName : filterParams) { if (CACHE.equals(paramName)) { cachePattern = Pattern.compile(filterConfig .getInitParameter(paramName)); break; } } } if (null == noCachePattern) { for (String paramName : filterParams) { if (NO_CACHE.equals(paramName)) { noCachePattern = Pattern.compile(filterConfig .getInitParameter(paramName)); break; } } } }</code><technical_language>consider switching null loc (cachePattern == null), standard in engine</technical_language>

Target:
public void init(FilterConfig filterConfig) throws ServletException { if (cachePattern == null) { String cachePatternString = filterConfig.getInitParameter(CACHE); if(cachePatternString != null) { cachePattern = Pattern.compile(filterConfig .getInitParameter(cachePatternString)); } } if (noCachePattern == null) { String noCachePatternString = filterConfig.getInitParameter(NO_CACHE); if(noCachePatternString != null) { noCachePattern = Pattern.compile(filterConfig .getInitParameter(noCachePatternString)); } } }
Source:
<code>public Object[] factory() { <START> List<Object> tests = new ArrayList<>(3 * 2); <END> for (org.infinispan.configuration.cache.TransactionMode txMode : org.infinispan.configuration.cache.TransactionMode.values()) { if (txMode == org.infinispan.configuration.cache.TransactionMode.NONE) { continue; } for (LockingMode lockingMode : LockingMode.values()) { tests.add(new TxFunctionalTest().transactionMode(txMode).lockingMode(lockingMode)); } } return tests.toArray(); }</code><technical_language>re: flatMap</technical_language>

Target:
public Object[] factory() { return Arrays.stream(org.infinispan.configuration.cache.TransactionMode.values()) .filter(tMode -> tMode != org.infinispan.configuration.cache.TransactionMode.NONE) .flatMap(txMode -> Arrays.stream(LockingMode.values()) .map(lockingMode -> new TxFunctionalTest() .transactionMode(txMode) .lockingMode(lockingMode))) .toArray(); }
Source:
<code>private static List<StartIdentifiedAtlasDbTransactionResponse> getStartTransactionResponses( LockLeaseService lockLeaseService, LockWatchEventCache lockWatchEventCache, int numberOfTransactions) { List<StartIdentifiedAtlasDbTransactionResponse> result = new ArrayList<>(); while (result.size() < numberOfTransactions) { try { Optional<IdentifiedVersion> requestedVersion = lockWatchEventCache.lastKnownVersion(); ConjureStartTransactionsResponse response = lockLeaseService.startTransactionsWithWatches( requestedVersion, numberOfTransactions - result.size()); lockWatchEventCache.processStartTransactionsUpdate( response.getTimestamps().stream().boxed().collect(Collectors.toSet()), response.getLockWatchUpdate()); result.addAll(split(response)); <START> if (log.isDebugEnabled()) { <END> Optional<LockWatchStateUpdate.Success> successfulUpdate = response.getLockWatchUpdate() .accept(new LockWatchStateUpdate.Visitor<Optional<LockWatchStateUpdate.Success>>() { @Override public Optional<LockWatchStateUpdate.Success> visit( LockWatchStateUpdate.Success success) { return Optional.of(success); } @Override public Optional<LockWatchStateUpdate.Success> visit( LockWatchStateUpdate.Snapshot snapshot) { return Optional.empty(); } }); successfulUpdate.ifPresent(success -> log.debug("Start transaction batch request and response", SafeArg.of("requestedVersion", requestedVersion), SafeArg.of("responseFirstVersion", Iterables.getFirst(success.events(), null)), SafeArg.of("responseLatestVersion", success.lastKnownVersion()))); } } catch (Throwable t) { unlock(result.stream() .map(response -> response.immutableTimestamp().getLock()) .collect(Collectors.toSet()), lockLeaseService); throw Throwables.throwUncheckedException(t); } } return result; }</code><technical_language>I need change in CommitTimestampGetter</technical_language>

Target:
private static List<StartIdentifiedAtlasDbTransactionResponse> getStartTransactionResponses( LockLeaseService lockLeaseService, LockWatchEventCache lockWatchEventCache, int numberOfTransactions) { List<StartIdentifiedAtlasDbTransactionResponse> result = new ArrayList<>(); while (result.size() < numberOfTransactions) { try { Optional<IdentifiedVersion> requestedVersion = lockWatchEventCache.lastKnownVersion(); ConjureStartTransactionsResponse response = lockLeaseService.startTransactionsWithWatches( requestedVersion, numberOfTransactions - result.size()); lockWatchEventCache.processStartTransactionsUpdate( response.getTimestamps().stream().boxed().collect(Collectors.toSet()), response.getLockWatchUpdate()); result.addAll(split(response)); LockWatchLogUtility.logTransactionEvents(requestedVersion, response.getLockWatchUpdate()); } catch (Throwable t) { unlock(result.stream() .map(response -> response.immutableTimestamp().getLock()) .collect(Collectors.toSet()), lockLeaseService); throw Throwables.throwUncheckedException(t); } } return result; }
Source:
<code>public void testChangeUserPasswordH2DB() throws Exception { int httpsPort = Integer.parseInt(FrameworkConstants.SERVER_DEFAULT_HTTPS_PORT) + portOffset; String url = context.getContextUrls().getBackEndUrl(); String backendURL = url.replaceAll("(:\\d+)", ":" + httpsPort); <START> String loginStatusString = loginLogoutUtil.login("admin", "admin123".toCharArray(), backendURL); <END> assertTrue(loginStatusString.contains("JSESSIONID"), "Unsuccessful login"); }</code><technical_language>code user name password values</technical_language>

Target:
public void testChangeUserPasswordH2DB() throws Exception { int httpsPort = Integer.parseInt(FrameworkConstants.SERVER_DEFAULT_HTTPS_PORT) + portOffset; String url = context.getContextUrls().getBackEndUrl(); String backendURL = url.replaceAll("(:\\d+)", ":" + httpsPort); String loginStatusString = loginLogoutUtil.login("admin", String.valueOf(userNewPassword).toCharArray(), backendURL); assertTrue(loginStatusString.contains("JSESSIONID"), "Unsuccessful login"); }