auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void allSessions() { String url1 = "realm://objectserver.realm.io/default"; String url2 = "realm://objectserver.realm.io/~/default"; SyncUser user = createTestUser(); assertEquals(0, user.allSessions().size()); SyncConfiguration configuration1 = new SyncConfiguration.Builder(user, url1).build(); Realm realm1 = Realm.getInstance(configuration1); assertEquals(1, user.allSessions().size()); List<SyncSession> allSessions = user.allSessions(); Iterator<SyncSession> iter = allSessions.iterator(); SyncSession session = iter.next(); assertEquals(user, session.getUser()); assertEquals(url1, session.getServerUrl().toString()); SyncConfiguration configuration2 = new SyncConfiguration.Builder(user, url2).build(); Realm realm2 = Realm.getInstance(configuration2); assertEquals(2, user.allSessions().size()); allSessions = user.allSessions(); iter = allSessions.iterator(); <START> String indivisualUrl = url2.replace("~", user.getIdentity()); <END> int foundCount = 0; while (iter.hasNext()) { session = iter.next(); assertEquals(user, session.getUser()); if (indivisualUrl.equals(session.getServerUrl().toString())) { foundCount++; } } assertEquals(1, foundCount); realm1.close(); assertEquals(1, user.allSessions().size()); allSessions = user.allSessions(); iter = allSessions.iterator(); session = iter.next(); assertEquals(user, session.getUser()); assertEquals(indivisualUrl, session.getServerUrl().toString()); realm2.close(); assertEquals(0, user.allSessions().size()); }</code><technical_language>typo in indivisualUrl -> individualUrl</technical_language>

Target:
public void allSessions() { String url1 = "realm://objectserver.realm.io/default"; String url2 = "realm://objectserver.realm.io/~/default"; SyncUser user = createTestUser(); assertEquals(0, user.allSessions().size()); SyncConfiguration configuration1 = new SyncConfiguration.Builder(user, url1).build(); Realm realm1 = Realm.getInstance(configuration1); List<SyncSession> allSessions = user.allSessions(); assertEquals(1, allSessions.size()); Iterator<SyncSession> iter = allSessions.iterator(); SyncSession session = iter.next(); assertEquals(user, session.getUser()); assertEquals(url1, session.getServerUrl().toString()); SyncConfiguration configuration2 = new SyncConfiguration.Builder(user, url2).build(); Realm realm2 = Realm.getInstance(configuration2); allSessions = user.allSessions(); assertEquals(2, allSessions.size()); iter = allSessions.iterator(); String individualUrl = url2.replace("~", user.getIdentity()); int foundCount = 0; while (iter.hasNext()) { session = iter.next(); assertEquals(user, session.getUser()); if (individualUrl.equals(session.getServerUrl().toString())) { foundCount++; } } assertEquals(1, foundCount); realm1.close(); allSessions = user.allSessions(); assertEquals(1, allSessions.size()); iter = allSessions.iterator(); session = iter.next(); assertEquals(user, session.getUser()); assertEquals(individualUrl, session.getServerUrl().toString()); realm2.close(); assertEquals(0, user.allSessions().size()); }
Source:
<code>public void addSections(Collection<String> sections) { <START> for (String section : sections) { <END> if (!this.sections.contains(section)) { this.sections.add(section); } } }</code><technical_language>in swagger core, sections field is null default, add... method initializes empty list if needed. I pattern is good</technical_language>

Target:
public void addSections(Collection<String> sections) { for (String section : sections) { addSection(section); } }
Source:
<code>public Iterable<String> getEdgeIds(final Vertex otherVertex, final Direction direction, final String[] labels, final Authorizations authorizations) { <START> getFetchHints().validateHasEdgeFetchHints(direction); <END> return getEdgeIdsWithOtherVertexId(otherVertex.getId(), direction, labels, authorizations); }</code><technical_language>checking labels</technical_language>

Target:
public Iterable<String> getEdgeIds(final Vertex otherVertex, final Direction direction, final String[] labels, final Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, labels); return getEdgeIdsWithOtherVertexId(otherVertex.getId(), direction, labels, authorizations); }
Source:
<code>public boolean canExecute(ITmfTrace trace) { if (!(trace instanceof TmfExperiment)) { throw new <START> IllegalStateException(); <END> } return super.canExecute(trace); }</code><technical_language>return false here, : return trace instanceof TmfExperiment && super.canExecute(trace);</technical_language>

Target:
public boolean canExecute(ITmfTrace trace) { return (trace instanceof TmfExperiment) && super.canExecute(trace); }
Source:
<code>public ExtendedPluginFQN evaluateFqn(String reference, FileContentProvider fileContentProvider) throws InfrastructureException { try { String pluginMetaContent = fileContentProvider.fetchContent(reference); JsonNode contentNode = yamlReader.readTree(pluginMetaContent); String publisher = contentNode.get("publisher").textValue(); String name = contentNode.get("name").textValue(); String version = contentNode.get("version").textValue(); return new ExtendedPluginFQN(reference, publisher, name, version); } catch (DevfileException | IOException e) { <START> throw new InfrastructureException(format("Plugin reference URL '%s' is invalid.", reference)); <END> } }</code><technical_language>Please propagate exception message here. error message clear if JSON required nodes</technical_language>

Target:
public ExtendedPluginFQN evaluateFqn(String reference, FileContentProvider fileContentProvider) throws InfrastructureException { JsonNode contentNode; try { String pluginMetaContent = fileContentProvider.fetchContent(reference); contentNode = yamlReader.readTree(pluginMetaContent); } catch (DevfileException | IOException e) { throw new InfrastructureException( format("Plugin reference URL '%s' is invalid.", reference), e); } JsonNode publisher = contentNode.path("publisher"); if (publisher.isMissingNode()) { throw new InfrastructureException(formatMessage(reference, "publisher")); } JsonNode name = contentNode.get("name"); if (name.isMissingNode()) { throw new InfrastructureException(formatMessage(reference, "name")); } JsonNode version = contentNode.get("version"); if (version.isMissingNode()) { throw new InfrastructureException(formatMessage(reference, "version")); } return new ExtendedPluginFQN( reference, publisher.textValue(), name.textValue(), version.textValue()); }
Source:
<code>String getFullyQualifiedNamespace() { <START> return connection.getFullyQualifiedDomainName(); <END> }</code><technical_language>This connection.getFullyQualifiedNamespace()</technical_language>

Target:
String getFullyQualifiedNamespace() { return connection.getFullyQualifiedNamespace(); }
Source:
<code><START> public List getClients() { <END> final Query query = em.createNamedQuery("getClients"); return query.getResultList(); }</code><technical_language>List<ClientEntity></technical_language>

Target:
public List<ClientEntity> getClients() { return em.createNamedQuery("getClients", ClientEntity.class).getResultList(); }
Source:
<code>public void alwaysDisplayInAccountConsole() { <START> driver.navigate().refresh(); waitForPageToLoad(); <END> newClient = createClientRep("always-display-in-console", OIDC); createClient(newClient); newClient.setRedirectUris(TEST_REDIRECT_URIs); newClient.setAlwaysDisplayInConsole(true); assertFalse(clientSettingsPage.form().isAlwaysDisplayInConsole()); clientSettingsPage.form().setAlwaysDisplayInConsole(true); clientSettingsPage.form().setRedirectUris(TEST_REDIRECT_URIs); clientSettingsPage.form().save(); assertTrue(clientSettingsPage.form().isAlwaysDisplayInConsole()); ClientRepresentation found = findClientByClientId(newClient.getClientId()); assertNotNull("Client " + newClient.getClientId() + " was not found.", found); assertClientSettingsEqual(newClient, found); clientSettingsPage.form().setAccessType(BEARER_ONLY); assertFalse(clientSettingsPage.form().isAlwaysDisplayInConsoleVisible()); clientSettingsPage.form().setProtocol(SAML); assertTrue(clientSettingsPage.form().isAlwaysDisplayInConsoleVisible()); }</code><technical_language>small pick. :) [refreshPageAndWaitForLoad](<LINK_0> suggestion refreshPageAndWaitForLoad();</technical_language>

Target:
public void alwaysDisplayInAccountConsole() { refreshPageAndWaitForLoad(); newClient = createClientRep("always-display-in-console", OIDC); createClient(newClient); newClient.setRedirectUris(TEST_REDIRECT_URIs); newClient.setAlwaysDisplayInConsole(true); assertFalse(clientSettingsPage.form().isAlwaysDisplayInConsole()); clientSettingsPage.form().setAlwaysDisplayInConsole(true); clientSettingsPage.form().setRedirectUris(TEST_REDIRECT_URIs); clientSettingsPage.form().save(); assertTrue(clientSettingsPage.form().isAlwaysDisplayInConsole()); ClientRepresentation found = findClientByClientId(newClient.getClientId()); assertNotNull("Client " + newClient.getClientId() + " was not found.", found); assertClientSettingsEqual(newClient, found); clientSettingsPage.form().setAccessType(BEARER_ONLY); assertFalse(clientSettingsPage.form().isAlwaysDisplayInConsoleVisible()); clientSettingsPage.form().setProtocol(SAML); assertTrue(clientSettingsPage.form().isAlwaysDisplayInConsoleVisible()); }
Source:
<code>public static List<FilterEntry> parse(String filters) { List<FilterEntry> ret = new LinkedList<>(); if (!PATTERN_BLANK.matcher(filters).matches()) { Matcher m = PATTERN_PARSE.matcher(filters); boolean ok = false; int expectedStart = 0; while (m.find()) { log.debug(String.format("parse: handling '%s'", m.group(0))); if (m.start() != expectedStart) { throw new RuntimeException("Cannot parse filters"); } expectedStart = m.end(); ok = m.end() == m.regionEnd(); ret.add( new FilterEntry( m.group("anymsg") != null ? null : m.group("message"), m.group("exclude") != null, m.group("anyrecipient") != null ? null : m.group("transport"), m.group("name") ) ); } if (!ok) { throw new IllegalArgumentException("Cannot parse filters"); } } <START> return Collections.unmodifiableList(ret); <END> }</code><technical_language>this is required *unmodifiable" do store reference. added if some point add. this is is return plain array. in this case need for wrapper</technical_language>

Target:
public static List<FilterEntry> parse(String filters) { List<FilterEntry> ret = new LinkedList<>(); if (!PATTERN_BLANK.matcher(filters).matches()) { Matcher m = PATTERN_PARSE.matcher(filters); boolean ok = false; int expectedStart = 0; while (m.find()) { log.debug(String.format("parse: handling '%s'", m.group(0))); if (m.start() != expectedStart) { throw new RuntimeException("Cannot parse filters"); } expectedStart = m.end(); ok = m.end() == m.regionEnd(); ret.add( new FilterEntry( m.group("anymsg") != null ? null : m.group("message"), m.group("exclude") != null, m.group("recipient") == null || m.group("anyrecipient") != null ? null : new Recipient( m.group("transport"), m.group("name") ) ) ); } if (!ok) { throw new IllegalArgumentException("Cannot parse filters"); } } return ret; }
Source:
<code>protected void doFilterInternal(final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain) throws IOException, ServletException { openHttpConnectionsCounter.inc(); final Timer.Context timerContext = httpConnectionsTimer.time(); final String clientId = Optional.ofNullable(request.getUserPrincipal()) .map(Principal::getName) .orElse("unauthenticated"); final String perPathMetricKey = MetricRegistry.name( clientId, request.getMethod(), request.getServletPath()); final Timer.Context perPathTimerContext = perPathMetricRegistry.timer(perPathMetricKey).time(); try { filterChain.doFilter(request, response); } finally { <START> if (perPathTimerContext != null) { <END> perPathTimerContext.stop(); } timerContext.stop(); openHttpConnectionsCounter.dec(); } }</code><technical_language>Is is null here</technical_language>

Target:
protected void doFilterInternal(final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain) throws IOException, ServletException { openHttpConnectionsCounter.inc(); final Timer.Context timerContext = httpConnectionsTimer.time(); final String clientId = Optional.ofNullable(request.getUserPrincipal()) .map(Principal::getName) .orElse("unauthenticated"); final String perPathMetricKey = MetricRegistry.name( clientId, request.getMethod(), request.getServletPath()); final Timer.Context perPathTimerContext = perPathMetricRegistry.timer(perPathMetricKey).time(); try { filterChain.doFilter(request, response); } finally { perPathTimerContext.stop(); timerContext.stop(); openHttpConnectionsCounter.dec(); } }
Source:
<code>public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((key == null) ? 0 : key.hashCode()); result = prime * result + ((samzaSqlRelRecord == null) ? 0 : samzaSqlRelRecord.hashCode()); <START> return result; <END> }</code><technical_language>Objects.hashCode HashCodeBuilder work</technical_language>

Target:
public int hashCode() { return Objects.hash(key, samzaSqlRelRecord); }
Source:
<code>public StompAndHowl(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); this.getSpellAbility().addTarget(new TargetPermanent(filterArtifact)); <START> this.getSpellAbility().addTarget(new TargetPermanent(filterEnchantment)); <END> this.getSpellAbility().addEffect(new DestroyMultiTargetEffect()); }</code><technical_language>TargetArtifactPermanent TargetEnchantmentPermanent instead of creating a filter manually</technical_language>

Target:
public StompAndHowl(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); this.getSpellAbility().addTarget(new TargetArtifactPermanent()); this.getSpellAbility().addTarget(new TargetEnchantmentPermanent()); this.getSpellAbility().addEffect(new DestroyMultiTargetEffect()); }
Source:
<code>public MergePolicyCustomTest() { <START> super(); <END> this.mergePolicy = ((preferredEntry, otherEntries) -> TestInternalCacheEntryFactory.create(conflictKey, "Custom")); }</code><technical_language>redundant</technical_language>

Target:
public MergePolicyCustomTest() { this.mergePolicy = ((preferredEntry, otherEntries) -> TestInternalCacheEntryFactory.create(conflictKey, "Custom")); }
Source:
<code>private OkHttpClientBuilderProvider findProvider(DefaultServiceEndpoint service) { OkHttpClientBuilderProvider providerImpl = providers.stream() .sorted(Comparator.comparingInt(OkHttpClientBuilderProvider::priority).reversed()) .filter(provider -> provider.supports(service)) .findFirst() <START> .orElse(null); if (providerImpl == null) { throw new SystemException( format("No client provider found for url (%s)", service.getBaseUrl())); } <END> return providerImpl; }</code><technical_language>nit: This shortened .orElseThrow(() -> new SystemException("..."));</technical_language>

Target:
private OkHttpClientBuilderProvider findProvider(DefaultServiceEndpoint service) { return providers.stream() .filter(provider -> provider.supports(service)) .findFirst() .orElseThrow( () -> new SystemException( format("No client provider found for url (%s)", service.getBaseUrl()))); }
Source:
<code>public SecurityGroup addIpPermission(IpProtocol protocol, int startPort, int endPort, Multimap<String, String> tenantIdGroupNamePairs, Iterable<String> ipRanges, Iterable<String> groupIds, SecurityGroup group) { String zone = group.getLocation().getId(); String id = group.getId(); <START> Optional<? extends SecurityGroupApi> sgApi = client.getSecurityGroupExtensionForZone(zone); <END> if (!sgApi.isPresent()) { return null; } if (Iterables.size(ipRanges) > 0) { for (String cidr : ipRanges) { sgApi.get().createRuleAllowingCidrBlock(id, Ingress.builder() .ipProtocol(protocol) .fromPort(startPort) .toPort(endPort) .build(), cidr); } } if (Iterables.size(groupIds) > 0) { for (String zoneAndGroupRaw : groupIds) { ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(zoneAndGroupRaw); String groupId = zoneAndId.getId(); sgApi.get().createRuleAllowingSecurityGroupId(id, Ingress.builder() .ipProtocol(protocol) .fromPort(startPort) .toPort(endPort) .build(), groupId); } } return getSecurityGroupById(ZoneAndId.fromZoneAndId(zone, id).slashEncode()); }</code><technical_language>null check for zone</technical_language>

Target:
public SecurityGroup addIpPermission(IpProtocol protocol, int startPort, int endPort, Multimap<String, String> tenantIdGroupNamePairs, Iterable<String> ipRanges, Iterable<String> groupIds, SecurityGroup group) { String zone = group.getLocation().getId(); String id = group.getId(); Optional<? extends SecurityGroupApi> sgApi = api.getSecurityGroupExtensionForZone(zone); if (!sgApi.isPresent()) { return null; } if (Iterables.size(ipRanges) > 0) { for (String cidr : ipRanges) { sgApi.get().createRuleAllowingCidrBlock(id, Ingress.builder() .ipProtocol(protocol) .fromPort(startPort) .toPort(endPort) .build(), cidr); } } if (Iterables.size(groupIds) > 0) { for (String zoneAndGroupRaw : groupIds) { ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(zoneAndGroupRaw); String groupId = zoneAndId.getId(); sgApi.get().createRuleAllowingSecurityGroupId(id, Ingress.builder() .ipProtocol(protocol) .fromPort(startPort) .toPort(endPort) .build(), groupId); } } return getSecurityGroupById(ZoneAndId.fromZoneAndId(zone, id).slashEncode()); }
Source:
<code>public int sendMessage(MessageReference reference, org.apache.activemq.artemis.api.core.Message message, ServerConsumer consumer, int deliveryCount) { AMQConsumer theConsumer = (AMQConsumer) consumer.getProtocolData(); <START> rollbackedIds.remove(message.getMessageID()); <END> return theConsumer.handleDeliver(reference, message.toCore(), deliveryCount); }</code><technical_language>in hot path of send operation rollbackIds contended producers/consumers AMQSession create a Long instance call of it. other ways implement it</technical_language>

Target:
public int sendMessage(MessageReference reference, org.apache.activemq.artemis.api.core.Message message, ServerConsumer consumer, int deliveryCount) { AMQConsumer theConsumer = (AMQConsumer) consumer.getProtocolData(); theConsumer.removeRolledback(reference); return theConsumer.handleDeliver(reference, message.toCore(), deliveryCount); }
Source:
<code>public char getLabel() { <START> char rv; <END> switch (getType()) { case INPUT_VAL: rv = buttonData.inputVal; break; case AUTO_CHAR: rv = buttonData.autoChar; break; case CUSTOM: rv = buttonData.customChar; break; default: rv='*'; } return rv; }</code><technical_language>final char rv;</technical_language>

Target:
public char getLabel() { final char rv; switch (getType()) { case INPUT_VAL: rv = buttonData.inputVal; break; case AUTO_CHAR: rv = buttonData.autoChar; break; case CUSTOM: rv = buttonData.customChar; break; default: rv = '*'; } return rv; }
Source:
<code>public void testProcedureDetail() throws Exception { Client client = getClient(); int maxConfigValue = 1 << ProcedureDetailTestConfig.m_optionCount; for (int configValue = 0; configValue < maxConfigValue; configValue++) { ProcedureDetailTestConfig testConfig = new ProcedureDetailTestConfig(configValue); System.out.println("\n========================================================================================"); System.out.println(String.format("exec %s %d '%s'", testConfig.getNameOfProcedureToCall(), configValue, testConfig.getArgumentString())); try { client.callProcedure(testConfig.getNameOfProcedureToCall(), configValue, testConfig.getArgumentString()); } catch (ProcCallException pce) { if (! testConfig.expectsException()) { throw pce; } System.out.println("\nCaught exception as expected:\n" + pce.getMessage()); continue; } finally { VoltTable procedureDetail = client.callProcedure("@Statistics", "PROCEDUREDETAIL", 1).getResults()[0]; System.out.println(procedureDetail.toFormattedString()); validateProcedureDetail(testConfig, procedureDetail); } if (testConfig.expectsException()) { <START> throw new Exception(String.format("Expects an exception from exec %s %d '%s', but did not get it.", <END> testConfig.getNameOfProcedureToCall(), configValue, testConfig.getArgumentString())); } } VoltTable procedureDetail = client.callProcedure("@Statistics", "PROCEDUREDETAIL", 0).getResults()[0]; }</code><technical_language>normal fail a unit test fail("reason...")</technical_language>

Target:
public void testProcedureDetail() throws Exception { Client client = getClient(); int maxConfigValue = 1 << ProcedureDetailTestConfig.m_optionCount; for (int configValue = 0; configValue < maxConfigValue; configValue++) { ProcedureDetailTestConfig testConfig = new ProcedureDetailTestConfig(configValue); System.out.println("\n========================================================================================"); System.out.println(String.format("exec %s %d '%s'", testConfig.getNameOfProcedureToCall(), configValue, testConfig.getArgumentString())); boolean caughtException = false; try { client.callProcedure(testConfig.getNameOfProcedureToCall(), configValue, testConfig.getArgumentString()); } catch (ProcCallException pce) { if (! testConfig.expectsException()) { throw pce; } System.out.println("\nCaught exception as expected:\n" + pce.getMessage()); caughtException = true; } finally { VoltTable procedureDetail = client.callProcedure("@Statistics", "PROCEDUREDETAIL", 1).getResults()[0]; System.out.println(procedureDetail.toFormattedString()); verifyProcedureDetailResult(testConfig, procedureDetail); } if (testConfig.expectsException() && ! caughtException) { fail(String.format("Expects an exception from exec %s %d '%s', but did not get it.", testConfig.getNameOfProcedureToCall(), configValue, testConfig.getArgumentString())); } } }
Source:
<code>public void appendTextToConsole(String text, ConsoleTextType textType) { final Text commandText = new Text(text); commandText.setWrappingWidth(console.getWidth()); switch (textType) { case NORMAL: <START> commandText.getStyleClass().addAll("consoleText", "normal"); <END> break; case ERROR: commandText.getStyleClass().addAll("consoleText", "error"); break; case DEFAULT: default: commandText.getStyleClass().addAll("consoleText", "default"); } Platform.runLater(() -> { forceScroll = true; console.getChildren().add(commandText); console.layout(); consolePane.vvalueProperty().setValue(1.0); }); }</code><technical_language>add attribute ConsoleTextType instead of a switch</technical_language>

Target:
public void appendTextToConsole(String text, ConsoleTextType textType) { final Text commandText = new Text(text); commandText.setWrappingWidth(console.getWidth()); commandText.getStyleClass().addAll("consoleText", textType.getCssName()); Platform.runLater(() -> { forceScroll = true; console.getChildren().add(commandText); console.layout(); consolePane.vvalueProperty().setValue(1.0); }); }
Source:
<code>private void log(Object value) { <START> LOGGER.debug(indent() + value); <END> }</code><technical_language>This a formatting call: LOGGER.debug("{}{}", indent(), value) This is a place sense check if debug is enabled this call avoid indent() is if debug enabled. calls this function fine is fine increment decrement indent checking if debug is enabled</technical_language>

Target:
private void log(Object value) { LOGGER.debug("{}{}", indent(), value); }
Source:
<code>private void createNonReqChangeDemoActions() throws Exception { SkynetTransaction transaction = TransactionManager.createTransaction(AtsUtil.getAtsBranch(), "Populate Demo DB - Create Actions"); if (DEBUG) { OseeLog.log(Activator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_3"); } List<ActionArtifact> actions = Collections.castAll(createActions(DemoDbActionData.getNonReqSawActionData(), DemoArtifactToken.SAW_Bld_3, <START> null, transaction)); <END> appendBuildNameToTitles(actions, DemoSawBuilds.SAW_Bld_3.getName(), transaction); if (DEBUG) { OseeLog.log(Activator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_2"); } actions = Collections.castAll(createActions(DemoDbActionData.getNonReqSawActionData(), DemoArtifactToken.SAW_Bld_2, null, transaction)); appendBuildNameToTitles(actions, DemoSawBuilds.SAW_Bld_2.getName(), transaction); if (DEBUG) { OseeLog.log(Activator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_1"); } actions = Collections.castAll(createActions(DemoDbActionData.getNonReqSawActionData(), DemoArtifactToken.SAW_Bld_1, TeamState.Completed, transaction)); appendBuildNameToTitles(actions, DemoSawBuilds.SAW_Bld_1.toString(), transaction); transaction.execute(); }</code><technical_language>do casting in createActions call in order reduce memory consumption. time this need double initial collection's memory</technical_language>

Target:
private void createNonReqChangeDemoActions() throws Exception { SkynetTransaction transaction = TransactionManager.createTransaction(AtsUtil.getAtsBranch(), "Populate Demo DB - Create Actions"); if (DEBUG) { OseeLog.log(Activator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_3"); } Set<ActionArtifact> actions = createActions(DemoDbActionData.getNonReqSawActionData(), DemoArtifactToken.SAW_Bld_3, null, transaction); appendBuildNameToTitles(actions, DemoSawBuilds.SAW_Bld_3.getName(), transaction); if (DEBUG) { OseeLog.log(Activator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_2"); } actions = createActions(DemoDbActionData.getNonReqSawActionData(), DemoArtifactToken.SAW_Bld_2, null, transaction); appendBuildNameToTitles(actions, DemoSawBuilds.SAW_Bld_2.getName(), transaction); if (DEBUG) { OseeLog.log(Activator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_1"); } actions = createActions(DemoDbActionData.getNonReqSawActionData(), DemoArtifactToken.SAW_Bld_1, TeamState.Completed, transaction); appendBuildNameToTitles(actions, DemoSawBuilds.SAW_Bld_1.toString(), transaction); transaction.execute(); }
Source:
<code>private void takeScreenshot(String screenshotName) { <START> idleFor(8000); <END> try { if (runningInTestLab()) { ScreenShotter.takeScreenshot(screenshotName, getCurrentActivity()); } else { Screengrab.screenshot(screenshotName); } } catch (RuntimeException r) { } }</code><technical_language>if a 8s pause embedded takeScreenshot site instead of deciding call site long wait for screen load screenshot. if some screens require idle time enough time for images post load, hoping case for _all_ screens (e.g. screens similar screen prologue need long of a delay load, slowing screenshots for locale device for those)</technical_language>

Target:
private void takeScreenshot(String screenshotName) { try { if (runningInTestLab()) { ScreenShotter.takeScreenshot(screenshotName, getCurrentActivity()); } else { Screengrab.screenshot(screenshotName); } } catch (RuntimeException r) { } }
Source:
<code>public ECTopologyVerifierResult getECTopologyResultForPolicies( final String... policyNames) throws IOException { if (this.vfs == null) { return super.getECTopologyResultForPolicies(policyNames); } <START> throw new UnsupportedOperationException( "unsetErasureCodingPolicy is not supported in ViewDFS"); } <END></code><technical_language>give result DefaultDFS? If not, correct API name</technical_language>

Target:
public ECTopologyVerifierResult getECTopologyResultForPolicies( final String... policyNames) throws IOException { if (this.vfs == null) { return super.getECTopologyResultForPolicies(policyNames); } List<IOException> failedExceptions = new ArrayList<>(); ECTopologyVerifierResult result = null; for (FileSystem fs : getChildFileSystems()) { if (!(fs instanceof DistributedFileSystem)) { continue; } DistributedFileSystem dfs = (DistributedFileSystem) fs; try { result = dfs.getECTopologyResultForPolicies(policyNames); if (!result.isSupported()) { return result; } } catch (IOException ioe) { failedExceptions.add(ioe); } } if (result == null) { throw new UnsupportedOperationException( "No DFS available in child filesystems"); } if (failedExceptions.size() > 0) { throw MultipleIOException.createIOException(failedExceptions); } return result; }
Source:
<code><START> public Set<Long> getLatestActivitiesForTasks() { <END> List<Long> activitiesIds = taskActivitiesDataService.executeQuery(new QueryExecution<List<Long>>() { @Override public List<Long> execute(Query query, InstanceSecurityRestriction restriction) { query.setResult("max(id)"); query.setGrouping("task"); return (List<Long>) query.execute(); } }); return new HashSet<>(activitiesIds); }</code><technical_language>private, remove method interface</technical_language>

Target:
private Set<Long> getLatestActivitiesForTasks() { List<Long> activitiesIds = taskActivitiesDataService.executeQuery(new QueryExecution<List<Long>>() { @Override public List<Long> execute(Query query, InstanceSecurityRestriction restriction) { query.setResult("max(id)"); query.setGrouping("task"); return (List<Long>) query.execute(); } }); return new HashSet<>(activitiesIds); }
Source:
<code><START> protected void doStart() throws Exception { <END> UserServiceImp userServiceImp = new UserServiceImp(); register(UserService.class, userServiceImp); UserServiceRedisImp userServiceRedisImp = new UserServiceRedisImp(); register(UserServiceRedis.class, userServiceRedisImp); }</code><technical_language>scr</technical_language>

Target:
protected void doStart() throws Exception { UserServiceImpl userServiceImpl = new UserServiceImpl(); register(UserService.class, userServiceImpl); UserServiceRedisImpl userServiceRedisImpl = new UserServiceRedisImpl(); register(UserServiceRedis.class, userServiceRedisImpl); }
Source:
<code>public static String getPath(RepositoryRestConfiguration configuration, ResourceMapping mapping) { BaseUri baseUri = new BaseUri(configuration.getBaseUri()); <START> if (mapping == null) { <END> return baseUri.getUriComponentsBuilder().path(ProfileController.PROFILE_ROOT_MAPPING).build().toString(); } else { return baseUri.getUriComponentsBuilder().path(ProfileController.PROFILE_ROOT_MAPPING + mapping.getPath()).build().toString(); } }</code><technical_language>extract common part</technical_language>

Target:
public static String getPath(RepositoryRestConfiguration configuration, ResourceMapping mapping) { if (mapping == null) { return getRootPath(configuration); } else { return getRootPath(configuration) + mapping.getPath(); } }
Source:
<code>public void testConfigBuilder() { GlobalConfiguration globalConfig = new GlobalConfigurationBuilder() .globalJmxStatistics().transport().defaultTransport().build(); Configuration cacheConfig = new ConfigurationBuilder().loaders() .addLoader(LevelDBCacheStoreConfigurationBuilder.class) .location("/tmp/leveldb/fluent/data") .expiredLocation("/tmp/leveldb/fluent/expired") .build(); CacheLoaderConfiguration cacheLoaderConfig = cacheConfig.loaders().cacheLoaders().get(0); assert cacheLoaderConfig instanceof LevelDBCacheStoreConfiguration; LevelDBCacheStoreConfiguration leveldbConfig = (LevelDBCacheStoreConfiguration) cacheLoaderConfig; <START> assert leveldbConfig.location().equals("/tmp/leveldb/fluent/data"); <END> assert leveldbConfig.expiredLocation().equals("/tmp/leveldb/fluent/expired"); EmbeddedCacheManager cacheManager = new DefaultCacheManager( globalConfig); cacheManager.defineConfiguration("testCache", cacheConfig); cacheManager.start(); Cache<String, String> cache = cacheManager.getCache("testCache"); cache.put("hello", "there"); cache.stop(); cacheManager.stop(); TestingUtil.recursiveFileRemove("/tmp/leveldb/fluent"); }</code><technical_language>Please JUnit assertions, AssertJUnit.assertEquals() more readable provide messages failure. Also, /tmp a location work non-Unix environments. env variable java.io.tmpdir</technical_language>

Target:
public void testConfigBuilder() { GlobalConfiguration globalConfig = new GlobalConfigurationBuilder() .globalJmxStatistics().transport().defaultTransport().build(); Configuration cacheConfig = new ConfigurationBuilder().loaders() .addLoader(LevelDBCacheStoreConfigurationBuilder.class) .location(tmpDataDirectory) .expiredLocation(tmpExpiredDirectory) .build(); CacheLoaderConfiguration cacheLoaderConfig = cacheConfig.loaders().cacheLoaders().get(0); assertTrue(cacheLoaderConfig instanceof LevelDBCacheStoreConfiguration); LevelDBCacheStoreConfiguration leveldbConfig = (LevelDBCacheStoreConfiguration) cacheLoaderConfig; assertEquals(tmpDataDirectory, leveldbConfig.location()); assertEquals(tmpExpiredDirectory, leveldbConfig.expiredLocation()); EmbeddedCacheManager cacheManager = new DefaultCacheManager( globalConfig); cacheManager.defineConfiguration("testCache", cacheConfig); cacheManager.start(); Cache<String, String> cache = cacheManager.getCache("testCache"); cache.put("hello", "there"); cache.stop(); cacheManager.stop(); }
Source:
<code>public void setTopItem (TreeItem item) { <START> checkWidget(); <END> if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT); if (item.parent != this) return; long vAdjustment; if (OS.GTK3) { vAdjustment = OS.gtk_scrollable_get_vadjustment(handle); } else { vAdjustment = OS.gtk_tree_view_get_vadjustment(handle); } cachedAdjustment = OS.gtk_adjustment_get_value(vAdjustment); topItem= item; long path = OS.gtk_tree_model_get_path (modelHandle, item.handle); showItem (path, false); OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0, 0); OS.gtk_tree_path_free (path); }</code><technical_language>add this call</technical_language>

Target:
public void setTopItem (TreeItem item) { if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT); if (item.parent != this) return; long vAdjustment; if (OS.GTK3) { vAdjustment = OS.gtk_scrollable_get_vadjustment(handle); } else { vAdjustment = OS.gtk_tree_view_get_vadjustment(handle); } cachedAdjustment = OS.gtk_adjustment_get_value(vAdjustment); topItem= item; long path = OS.gtk_tree_model_get_path (modelHandle, item.handle); showItem (path, false); OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0, 0); OS.gtk_tree_path_free (path); }
Source:
<code><START> public void copyFileToContainer(MountableFile mountableFile, String containerPath) { <END> if (!isCreated()) { throw new IllegalStateException("copyFileToContainer can only be used with created / running container"); } try ( ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); TarArchiveOutputStream tarArchive = new TarArchiveOutputStream(byteArrayOutputStream) ) { tarArchive.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX); File sourceFile = new File(mountableFile.getFilesystemPath()); final String destination; String remotePath; if (containerPath.endsWith("/") && sourceFile.isFile()) { logger().warn("folder-like containerPath in copyFileToContainer is deprecated, please explicitly specify a file path"); remotePath = containerPath; destination = sourceFile.getName(); } else { File containerPathFile = new File(containerPath); remotePath = containerPathFile.getParent(); destination = containerPathFile.getName(); } mountableFile.transferTo(tarArchive, destination); tarArchive.finish(); dockerClient .copyArchiveToContainerCmd(containerId) .withTarInputStream(new ByteArrayInputStream(byteArrayOutputStream.toByteArray())) .withRemotePath(remotePath) .exec(); } }</code><technical_language>functions do same. merged? (Can't call othercopyFileToContainerfunction? MountableFile implements Transferable0</technical_language>

Target:
public void copyFileToContainer(MountableFile mountableFile, String containerPath) { File sourceFile = new File(mountableFile.getResolvedPath()); if (containerPath.endsWith("/") && sourceFile.isFile()) { logger().warn("folder-like containerPath in copyFileToContainer is deprecated, please explicitly specify a file path"); copyFileToContainer((Transferable) mountableFile, containerPath + sourceFile.getName()); } else { copyFileToContainer((Transferable) mountableFile, containerPath); } }
Source:
<code>private Storage createStorage() { MutableStorage newStorage = new MutableStorage(testRepository.storageId()); configurationManagementService.addStorageIfNotExists(newStorage); <START> ThrowingConsumer.unchecked(storageManagementService::saveStorage).accept(newStorage); <END> return configurationManagementService.getConfiguration().getStorage(testRepository.storageId()); }</code><technical_language>above, add throws IOException ThrowingSupplier this method</technical_language>

Target:
private Storage createStorage() throws IOException { StorageDto newStorage = new StorageDto(testRepository.storageId()); configurationManagementService.addStorageIfNotExists(newStorage); storageManagementService.saveStorage(newStorage); return configurationManagementService.getConfiguration().getStorage(testRepository.storageId()); }
Source:
<code>private DatasourceInputSplit toDataSourceSplit( List<WindowedDataSegment> segments, org.apache.hadoop.mapred.InputFormat fio, JobConf conf ) { String[] locations = null; try { locations = getFrequentLocations(segments, fio, conf); } catch (Exception e) { logger.error(e, "Exception thrown finding location of splits"); <START> throw Throwables.propagate(e); <END> } return new DatasourceInputSplit(segments, locations); }</code><technical_language>i this needs propagated. finding locations effort</technical_language>

Target:
private DatasourceInputSplit toDataSourceSplit( List<WindowedDataSegment> segments, org.apache.hadoop.mapred.InputFormat fio, JobConf conf ) { String[] locations = null; try { locations = getFrequentLocations(segments, fio, conf); } catch (Exception e) { logger.error(e, "Exception thrown finding location of splits"); } return new DatasourceInputSplit(segments, locations); }
Source:
<code>public void forget() throws org.omg.CORBA.SystemException { if (jtaxLogger.logger.isTraceEnabled()) { jtaxLogger.logger.trace("XAResourceRecord.forget for " + _tranID); } if (!handleForget()) <START> throw new UNKNOWN(); END> destroyState(); removeConnection(); }</code><technical_language>Great find - I missed one</technical_language>

Target:
public void forget() throws org.omg.CORBA.SystemException { if (jtaxLogger.logger.isTraceEnabled()) { jtaxLogger.logger.trace("XAResourceRecord.forget for " + _tranID + " _forgotten=" + _forgotten); } if (!_forgotten) { handleForget(); destroyState(); removeConnection(); } }
Source:
<code>public boolean depositAllExcept(final int... ids) { <START> final boolean[] ret = { true }; <END> final int count = ctx.inventory.select().count(); ctx.inventory.select(new Filter<Item>() { @Override public boolean accept(Item item) { for (int id : ids) { if (item.id() == id) { return false; } } return true; } }); if (count != ctx.inventory.count()) { ctx.inventory.shuffle().each(new Filter<Item>() { @Override public boolean accept(Item item) { if (!deposit(item.id(), Amount.ALL)) { ret[0] = false; } return true; } }); } else { return depositInventory(); } return ret[0]; }</code><technical_language>final boolean[] ret = {true};</technical_language>

Target:
public boolean depositAllExcept(final int... ids) { final boolean[] ret = {true}; final int count = ctx.inventory.select().count(); ctx.inventory.select(new Filter<Item>() { @Override public boolean accept(final Item item) { for (final int id : ids) { if (item.id() == id) { return false; } } return true; } }); if (count != ctx.inventory.count()) { ctx.inventory.shuffle().each(new Filter<Item>() { @Override public boolean accept(final Item item) { if (!deposit(item.id(), Amount.ALL)) { ret[0] = false; } return true; } }); } else { return depositInventory(); } return ret[0]; }
Source:
<code>void cmnClearRegion(RegionEventImpl regionEvent, boolean cacheWrite, boolean useRVV) { synchronized (clearLock) { <START> clearPartitionedRegion.doClear(regionEvent, cacheWrite, this); <END> } }</code><technical_language>I calling doClear(), need call: final TXStateProxy tx = cache.getTXMgr().pauseTransaction(); get rvvLock for buckets clear, guaranteed sequence for rvvlock for buckets, if some on-going tx requested some rvvLock some buckets (such bucket1) is requesting rvvLock bucket2. If clear thread pause transaction, deadlock</technical_language>

Target:
void cmnClearRegion(RegionEventImpl regionEvent, boolean cacheWrite, boolean useRVV) { synchronized (clearLock) { partitionedRegionClear.doClear(regionEvent, cacheWrite, this); } }
Source:
<code>public List<T> getSelectedItems() { if (getDataProvider().getModel().isSingleSelectionOnly()) { <START> return (List<T>) Collections.singletonList(((SingleSelectionModel<T>)getDataProvider().getModel().getSelectionModel()).getSelectedObject()); <END> } else { return ((OrderedMultiSelectionModel<T>)getDataProvider().getModel().getSelectionModel()).getSelectedList(); } }</code><technical_language>OK, I a suggestion for improvement: instead of typecasting right kind of selection model, simply a useful method ListModel itself, like: List<T> getSelectedList() callers simply need list do if/else magic? if do this, simply need selection model field in ListModel itself? basically fact complex code is due not-useful-enough API objects need work with</technical_language>

Target:
public List<T> getSelectedItems() { return getDataProvider().getModel().getSelectedObjects(); }
Source:
<code>public NatsProcessor(InboundProcessorParams params) { this.name = params.getName(); this.natsProperties = params.getProperties(); String inboundEndpointInterval = natsProperties.getProperty(PollingConstants.INBOUND_ENDPOINT_INTERVAL); <START> if (inboundEndpointInterval != null) { <END> try { this.interval = Long.parseLong(inboundEndpointInterval); } catch (NumberFormatException nfe) { throw new SynapseException("Invalid numeric value for interval.", nfe); } } this.sequential = true; String inboundEndpointSequential = natsProperties.getProperty(PollingConstants.INBOUND_ENDPOINT_SEQUENTIAL); if (inboundEndpointSequential != null) { this.sequential = Boolean.parseBoolean(inboundEndpointSequential); } this.coordination = true; String inboundCoordination = natsProperties.getProperty(PollingConstants.INBOUND_COORDINATION); if (inboundCoordination != null) { this.coordination = Boolean.parseBoolean(inboundCoordination); } this.injectingSeq = params.getInjectingSeq(); this.onErrorSeq = params.getOnErrorSeq(); this.synapseEnvironment = params.getSynapseEnvironment(); }</code><technical_language>this null if parameter exist in configuration? If so, do need print a warning set interval a default</technical_language>

Target:
public NatsProcessor(InboundProcessorParams params) { this.name = params.getName(); this.natsProperties = params.getProperties(); String inboundEndpointInterval = natsProperties.getProperty(PollingConstants.INBOUND_ENDPOINT_INTERVAL); if (inboundEndpointInterval != null) { try { this.interval = Long.parseLong(inboundEndpointInterval); } catch (NumberFormatException nfe) { throw new SynapseException("Invalid numeric value for interval: " + inboundEndpointInterval, nfe); } } this.sequential = true; String inboundEndpointSequential = natsProperties.getProperty(PollingConstants.INBOUND_ENDPOINT_SEQUENTIAL); if (inboundEndpointSequential != null) { this.sequential = Boolean.parseBoolean(inboundEndpointSequential); } this.coordination = true; String inboundCoordination = natsProperties.getProperty(PollingConstants.INBOUND_COORDINATION); if (inboundCoordination != null) { this.coordination = Boolean.parseBoolean(inboundCoordination); } this.injectingSeq = params.getInjectingSeq(); this.onErrorSeq = params.getOnErrorSeq(); this.synapseEnvironment = params.getSynapseEnvironment(); }
Source:
<code><START> public void writeToParcel(Parcel dest, int flags) { <END> dest.writeMap(menus); dest.writeTypedList(reservationList); dest.writeParcelable(info, flags); dest.writeTypedList(orders); dest.writeTypedList(sessions); }</code><technical_language>objectID inherited storable</technical_language>

Target:
public void writeToParcel(Parcel dest, int flags) { dest.writeTypedList(menus); dest.writeTypedList(reservationList); dest.writeParcelable(info, flags); dest.writeTypedList(orders); dest.writeTypedList(sessions); dest.writeTypedList(customerRequests); dest.writeString(this.getObjId()); }
Source:
<code>public PlanWithProperties visitMarkDistinct(MarkDistinctNode node, PreferredProperties preferredProperties) { PreferredProperties preferredChildProperties = PreferredProperties.partitionedWithLocal(ImmutableSet.copyOf(node.getDistinctSymbols()), grouped(node.getDistinctSymbols())) .mergeWithParent(preferredProperties); PlanWithProperties child = node.getSource().accept(this, preferredChildProperties); if (child.getProperties().isSingleNode() || !child.getProperties().isStreamPartitionedOn(node.getDistinctSymbols())) { <START> child = withDerivedProperties(createPartitionedRemoteExchange(child.getNode(), node.getDistinctSymbols(), node.getHashSymbol()), child.getProperties()); <END> } return rebaseAndDeriveProperties(node, child); }</code><technical_language>nit: add some line breaks, similar original formats. ditto for others</technical_language>

Target:
public PlanWithProperties visitMarkDistinct(MarkDistinctNode node, PreferredProperties preferredProperties) { PreferredProperties preferredChildProperties = PreferredProperties.partitionedWithLocal(ImmutableSet.copyOf(node.getDistinctSymbols()), grouped(node.getDistinctSymbols())) .mergeWithParent(preferredProperties); PlanWithProperties child = node.getSource().accept(this, preferredChildProperties); if (child.getProperties().isSingleNode() || !child.getProperties().isStreamPartitionedOn(node.getDistinctSymbols())) { child = withDerivedProperties( partitionedExchange( idAllocator.getNextId(), REMOTE, child.getNode(), createPartitioning(node.getDistinctSymbols()), node.getHashSymbol()), child.getProperties()); } return rebaseAndDeriveProperties(node, child); }
Source:
<code>private void displayPlaylist() { switchToPanel(R.id.playlist); PlaylistHolder playlistHolder = playlists.get(playlistsBar.getSelectedPlaylistType()); if (playlistHolder == null) { displayEmptyPlaylistMessage(); return; } GetPlaylist.GetPlaylistResult getPlaylistResult = playlistHolder.getPlaylistResult; <START> if ( getPlaylistResult == null ) { <END> displayEmptyPlaylistMessage(); return; } if (getPlaylistResult.type.contentEquals(ListType.ItemBase.TYPE_PICTURE)) playlistListView.enableItemDragging(false); else playlistListView.enableItemDragging(true); if ( ! playlistListView.isItemBeingDragged() ) { playListAdapter.setPlaylistItems(getPlaylistResult.items); } if ( isPlaying(getPlaylistResult) ) highlightCurrentlyPlayingItem(); else playlistListView.clearChoices(); }</code><technical_language>For consistency rest of code, spaces ()</technical_language>

Target:
private void displayPlaylist() { switchToPanel(R.id.playlist); PlaylistHolder playlistHolder = playlists.get(playlistsBar.getSelectedPlaylistType()); if (playlistHolder == null) { displayEmptyPlaylistMessage(); return; } GetPlaylist.GetPlaylistResult getPlaylistResult = playlistHolder.getPlaylistResult; if (getPlaylistResult == null) { displayEmptyPlaylistMessage(); return; } if (getPlaylistResult.type.contentEquals(ListType.ItemBase.TYPE_PICTURE)) playlistListView.enableItemDragging(false); else playlistListView.enableItemDragging(true); if (!playlistListView.isItemBeingDragged()) { playListAdapter.setPlaylistItems(getPlaylistResult.items); } playlistListView.setSelectionFromTop(playlistHolder.index, playlistHolder.top); }
Source:
<code>public static void legacyFill(FileChannel fc, long newLength, long offset, boolean starting) throws IOException { MersenneTwister mt = new MersenneTwister(); byte[] b = new byte[4096]; ByteBuffer bb = ByteBuffer.wrap(b); int x = 0; while (offset < newLength) { bb.rewind(); mt.nextBytes(b); offset += fc.write(bb, offset); if (offset % (1024 * 1024 * 1024L) == 0) { mt = new MersenneTwister(); if (starting) { WrapperManager.signalStarting( (int) MINUTES.toMillis(5)); if (x++ % 32 == 0) System.err.println( "Preallocating space : " + offset + "/" <START> + newLength); <END> } } } }</code><technical_language>reduce spamminess of this method, I file a separate pull request this landed? Logger.normal sufficient</technical_language>

Target:
public static void legacyFill(FileChannel fc, long newLength, long offset, boolean starting) throws IOException { MersenneTwister mt = new MersenneTwister(); byte[] b = new byte[4096]; ByteBuffer bb = ByteBuffer.wrap(b); int x = 0; while (offset < newLength) { bb.rewind(); mt.nextBytes(b); offset += fc.write(bb, offset); if (offset % (1024 * 1024 * 1024L) == 0) { mt = new MersenneTwister(); if (starting) { WrapperManager.signalStarting( (int) MINUTES.toMillis(5)); if (x++ % 32 == 1) System.err.println( "Preallocating space : " + offset + "/" + newLength); } } } }