auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testIterationApp() throws Exception { LocalMode lma = LocalMode.newInstance(); Configuration conf = new Configuration(false); Application app = new Application(); String outputFileName = "target/output.txt"; new File(outputFileName).delete(); app.setExtraOutputFileName(outputFileName); lma.prepareDAG(app, conf); LocalMode.Controller lc = lma.getController(); lc.runAsync(); <START> while (true) { <END> try { Thread.sleep(500); } catch (InterruptedException ex) { break; } File file = new File(outputFileName); if (file.length() > 50) { break; } } lc.shutdown(); try (BufferedReader br = new BufferedReader(new FileReader(outputFileName))) { Assert.assertEquals("1", br.readLine()); Assert.assertEquals("1", br.readLine()); Assert.assertEquals("2", br.readLine()); Assert.assertEquals("3", br.readLine()); Assert.assertEquals("5", br.readLine()); Assert.assertEquals("8", br.readLine()); Assert.assertEquals("13", br.readLine()); Assert.assertEquals("21", br.readLine()); Assert.assertEquals("34", br.readLine()); Assert.assertEquals("55", br.readLine()); Assert.assertEquals("89", br.readLine()); Assert.assertEquals("144", br.readLine()); Assert.assertEquals("233", br.readLine()); Assert.assertEquals("377", br.readLine()); Assert.assertEquals("610", br.readLine()); Assert.assertEquals("987", br.readLine()); } }</code><technical_language>a timeout</technical_language>

Target:
public void testIterationApp() throws Exception { LocalMode lma = LocalMode.newInstance(); Configuration conf = new Configuration(false); Application app = new Application(); String outputFileName = "target/output.txt"; long timeout = 10 * 1000; new File(outputFileName).delete(); app.setExtraOutputFileName(outputFileName); lma.prepareDAG(app, conf); LocalMode.Controller lc = lma.getController(); lc.runAsync(); long startTime = System.currentTimeMillis(); do { try { Thread.sleep(500); } catch (InterruptedException ex) { break; } File file = new File(outputFileName); if (file.length() > 50) { break; } } while (System.currentTimeMillis() - startTime < timeout); lc.shutdown(); try (BufferedReader br = new BufferedReader(new FileReader(outputFileName))) { Assert.assertEquals("1", br.readLine()); Assert.assertEquals("1", br.readLine()); Assert.assertEquals("2", br.readLine()); Assert.assertEquals("3", br.readLine()); Assert.assertEquals("5", br.readLine()); Assert.assertEquals("8", br.readLine()); Assert.assertEquals("13", br.readLine()); Assert.assertEquals("21", br.readLine()); Assert.assertEquals("34", br.readLine()); Assert.assertEquals("55", br.readLine()); Assert.assertEquals("89", br.readLine()); Assert.assertEquals("144", br.readLine()); Assert.assertEquals("233", br.readLine()); Assert.assertEquals("377", br.readLine()); Assert.assertEquals("610", br.readLine()); Assert.assertEquals("987", br.readLine()); } }
Source:
<code>public void setNotificationPreferenceStatus(String userId, String eventType, String applicationId, String notificationFormat, boolean notificationStatus, Date startDate) throws NotificationException { <START> NotificationFormat format = NotificationFormat.valueOf(notificationFormat.toUpperCase()); <END> NotificationPreference preference = new NotificationPreference(eventType, applicationId, notificationStatus, format, startDate); try { this.modelBridge.saveNotificationPreference(this.documentReferenceResolver.resolve(userId), preference); } catch (NotificationException e) { throw new NotificationException(String.format( "Unable to save the notification preferences [%s] in [%s] for the user [%s]", eventType, applicationId, userId)); } }</code><technical_language>If check rights, is able change preferences of everybody</technical_language>

Target:
public void setNotificationPreferenceStatus(String userId, String eventType, String applicationId, String notificationFormat, boolean notificationStatus, Date startDate) throws NotificationException { NotificationPreference preference = new NotificationPreference(eventType, applicationId, notificationStatus, notificationFormat, startDate); DocumentReference userReference = this.documentReferenceResolver.resolve(userId); try { this.authorizationManager.checkAccess(Right.EDIT, userReference); this.modelBridge.saveNotificationPreference(userReference, preference); } catch (Exception e) { throw new NotificationException(String.format( "Unable to save the notification preferences [%s] in [%s] for the user [%s]", eventType, applicationId, userId)); } }
Source:
<code>public PersistedData serializeCollection(Collection<T> value, SerializationContext context) { List<PersistedData> rawList = Lists.newArrayList(); <START> rawList.addAll(value.stream().map(item -> serialize(item, context)).collect(Collectors.toList())); <END> return context.create(rawList); }</code><technical_language>original version, I find easier read called often</technical_language>

Target:
public PersistedData serializeCollection(Collection<T> value, SerializationContext context) { List<PersistedData> rawList = Lists.newArrayList(); for (T item : value) { rawList.add(serialize(item, context)); } return context.create(rawList); }
Source:
<code>private static Optional<TypeSignature> getColumnTypeRewrite(TypeSignature type) { <START> if (type.equals(DATE.getTypeSignature())) { <END> return Optional.of(TIMESTAMP.getTypeSignature()); } return Optional.empty(); }</code><technical_language>This logic is Hive-specific. Verifier support Hive connector</technical_language>

Target:
private static Optional<TypeSignature> getColumnTypeRewrite(TypeSignature type) { if (type.equals(DATE.getTypeSignature())) { return Optional.of(TIMESTAMP.getTypeSignature()); } if (type.equals(UNKNOWN.getTypeSignature())) { return Optional.of(BIGINT.getTypeSignature()); } return Optional.empty(); }
Source:
<code>private CacheEntry getFromContainerForWrite(Object key, int segment, boolean isOwner) { if (isOwner) { final InternalCacheEntry ice = innerGetFromContainer(key, segment, false, isPrimaryOwner(isOwner, segment)); if (trace) log.tracef("Retrieved from container %s", ice); if (ice == null) { return NullCacheEntry.getInstance(); } return ice; } else if (isL1Enabled) { <START> final InternalCacheEntry ice = innerGetFromContainer(key, segment, false, isPrimaryOwner(isOwner, segment)); <END> if (trace) log.tracef("Retrieved from container %s", ice); if (ice == null || !ice.isL1Entry()) return null; return ice; } return null; }</code><technical_language>a primary owner if owner</technical_language>

Target:
private CacheEntry getFromContainerForWrite(Object key, int segment, boolean isOwner) { if (isOwner) { final InternalCacheEntry ice = innerGetFromContainerForWrite(key, segment, false, isPrimaryOwner(segment)); if (trace) log.tracef("Retrieved from container %s", ice); if (ice == null) { return NullCacheEntry.getInstance(); } return ice; } else if (isL1Enabled) { final InternalCacheEntry ice = innerGetFromContainerForWrite(key, segment, false, false); if (trace) log.tracef("Retrieved from container %s", ice); if (ice == null || !ice.isL1Entry()) return null; return ice; } return null; }
Source:
<code>public HostStatusTracker refreshHosts() { if (stop.get() || Thread.currentThread().isInterrupted()) { return null; } List<Host> allHosts = hostSupplier.getHosts(); if (allHosts == null || allHosts.isEmpty()) { throw new NoAvailableHostsException("No available hosts when starting HostsUpdater"); } List<Host> hostsUp = new ArrayList<>(); List<Host> hostsDown = new ArrayList<>(); for (Host host : allHosts) { if (host.isUp()) { hostsUp.add(host); } else { hostsDown.add(host); } } if (!hostTracker.get().checkIfChanged(new HashSet<>(hostsUp), new HashSet<>(hostsDown))) { return hostTracker.get(); } Collections.sort(allHosts); Set<Host> hostSet = new HashSet<>(allHosts); List<HostToken> hostTokens; if (tokenMapSupplier != null) { <START> Logger.info("Getting Hosts from TMS"); <END> hostTokens = tokenMapSupplier.getTokens(hostSet); if (hostTokens.isEmpty()) { throw new DynoException("No hosts in the TokenMapSupplier"); } } else { throw new DynoException("TokenMapSupplier not provided"); } Map<Host, Host> allHostSetFromTMS = new HashMap<>(); for (HostToken ht : hostTokens) { allHostSetFromTMS.put(ht.getHost(), ht.getHost()); } hostsUp.clear(); hostsDown.clear(); for (Host host : allHosts) { if (host.isUp()) { hostsUp.add(allHostSetFromTMS.get(host)); } else { hostsDown.add(allHostSetFromTMS.get(host)); } } HostStatusTracker newTracker = hostTracker.get().computeNewHostStatus(hostsUp, hostsDown); hostTracker.set(newTracker); return hostTracker.get(); }</code><technical_language>Please write TokenMapSupplier... Abbreviations helpful debug logs</technical_language>

Target:
public HostStatusTracker refreshHosts() { if (stop.get() || Thread.currentThread().isInterrupted()) { return null; } List<Host> allHosts = hostSupplier.getHosts(); if (allHosts == null || allHosts.isEmpty()) { throw new NoAvailableHostsException("No available hosts when starting HostsUpdater"); } List<Host> hostsUp = new ArrayList<>(); List<Host> hostsDown = new ArrayList<>(); for (Host host : allHosts) { if (host.isUp()) { hostsUp.add(host); } else { hostsDown.add(host); } } if (!hostTracker.get().checkIfChanged(new HashSet<>(hostsUp), new HashSet<>(hostsDown))) { return hostTracker.get(); } Collections.sort(allHosts); Set<Host> hostSet = new HashSet<>(allHosts); List<HostToken> hostTokens; if (tokenMapSupplier != null) { Logger.info("Getting Hosts from TokenMapSupplier"); hostTokens = tokenMapSupplier.getTokens(hostSet); if (hostTokens.isEmpty()) { throw new DynoException("No hosts in the TokenMapSupplier"); } } else { throw new DynoException("TokenMapSupplier not provided"); } Map<Host, Host> allHostSetFromTokenMapSupplier = new HashMap<>(); for (HostToken ht : hostTokens) { allHostSetFromTokenMapSupplier.put(ht.getHost(), ht.getHost()); } hostsUp.clear(); hostsDown.clear(); for (Host host : allHosts) { if (host.isUp()) { hostsUp.add(allHostSetFromTokenMapSupplier.get(host)); } else { hostsDown.add(allHostSetFromTokenMapSupplier.get(host)); } } HostStatusTracker newTracker = hostTracker.get().computeNewHostStatus(hostsUp, hostsDown); hostTracker.set(newTracker); return hostTracker.get(); }
Source:
<code><START> public void colorSettingsChanged(StateItem[] stateItems) { <END> if (stateItems != null) { fEventColorMap = new Color[stateItems.length]; for (int i = 0; i < stateItems.length; i++) { fEventColorMap[i] = fResourceManager.createColor(stateItems[i].getStateColor()); } } else { fEventColorMap = new Color[] { }; } }</code><technical_language>previous colors destroyed resource manager, in case this called multiple times eventual dispose</technical_language>

Target:
public void colorSettingsChanged(StateItem[] stateItems) { for (Color color : fEventColorMap) { fResourceManager.destroyColor(color.getRGB()); } if (stateItems != null) { fEventColorMap = new Color[stateItems.length]; for (int i = 0; i < stateItems.length; i++) { fEventColorMap[i] = fResourceManager.createColor(stateItems[i].getStateColor()); } } else { fEventColorMap = new Color[] { }; } redraw(); }
Source:
<code>private void closeStatements() throws SQLException { List<SQLCloseable> statements = this.statements; this.statements = Lists.newArrayList(); try { <START> mutationState.clear(); <END> } finally { try { SQLCloseables.closeAll(statements); } finally { statements.clear(); } } }</code><technical_language>In fact, if mutationState.clear() a private method in MutationState</technical_language>

Target:
private void closeStatements() throws SQLException { List<SQLCloseable> statements = this.statements; this.statements = Lists.newArrayList(); try { mutationState.rollback(this); } finally { try { SQLCloseables.closeAll(statements); } finally { statements.clear(); } } }
Source:
<code>private List<String> extractPortValues(String prefix, Properties properties) { List<String> ports = listWithPrefix(prefix, PORTS, properties); if (ports == null) { return null; } Iterable<String[]> parsedPorts = EnvUtil.splitOnLastColon(ports); <START> return Lists.newArrayList(Iterables.transform(parsedPorts, EXTRACT_SECOND)); <END> }</code><technical_language>in this is smaller first, more direct version for extracting port ;-) I appreciate higher abstractions necessary, in this case I original version is more readable (and require knowledge of guava)</technical_language>

Target:
private List<String> extractPortValues(String prefix, Properties properties) { List<String> ret = new ArrayList<>(); List<String> ports = listWithPrefix(prefix, PORTS, properties); if (ports == null) { return null; } List<String[]> parsedPorts = EnvUtil.splitOnLastColon(ports); for (String[] port : parsedPorts) { ret.add(port[1]); } return ret; }
Source:
<code>public Commit ensureExists(RepositoryEntity repositoryEntity, String commitId) { return retrieve(repositoryEntity, commitId).orElseGet(() -> { final Commit commit = new Commit(); <START> final DiffModel diffModel = retrieveDiffModel(repositoryEntity, commitId); <END> commit.setCommitId(commitId); commit.setRepository(repositoryEntity); commit.setComments(Lists.newArrayList()); commit.setPushTime(new Date()); commit.setLinesAdded(diffModel.getLinesAdded()); commit.setLinesRemoved(diffModel.getLinesRemoved()); enhanceCommitSafely(repositoryEntity, commitId, commit); return persist(commit); }); }</code><technical_language>Git server requests fail. question is handle it. create a commit, missing data? create commit all? I approach, this approach is inconsistent fetch other commit information. enhanceCommitSafely(...) is invoked line 68. is idea move this diff retrieval (and results in lines 65-66) enhanceCommitSafely method. fix build (which fails retrieveDiffModel retrieveCommit fail due lack of a git server mock</technical_language>

Target:
public Commit ensureExists(RepositoryEntity repositoryEntity, String commitId) { return retrieve(repositoryEntity, commitId).orElseGet(() -> { final Commit commit = new Commit(); commit.setCommitId(commitId); commit.setRepository(repositoryEntity); commit.setComments(Lists.newArrayList()); commit.setPushTime(new Date()); enhanceCommitSafely(commit); return persist(commit); }); }
Source:
<code>protected void showLocaleChangeMenu(final CommCareActivityUIController uiController) { final PaneledChoiceDialog dialog = new PaneledChoiceDialog(this, Localization.get("home.menu.locale.select")); AdapterView.OnItemClickListener listClickListener = (parent, view, position, id) -> { String[] localeCodes = ChangeLocaleUtil.getLocaleCodes(); if (position >= localeCodes.length) { Localization.setLocale("default"); } else { String selectedLocale = localeCodes[position]; <START> LocalePreferences.saveCurrentLocale(selectedLocale); <END> Localization.setLocale(selectedLocale); } if (uiController != null) { uiController.setupUI(); } rebuildOptionsMenu(); dismissAlertDialog(); recreate(); }; dialog.setChoiceItems(buildLocaleChoices(), listClickListener); showAlertDialog(dialog); }</code><technical_language>for making clear upfront, want CommCare language settings for switching Layout RTL. Instead wanna rely System locale (Phone locale settings) this switch. reason want consistent rest of phone in choosing layout direction wanna in a RTL mode rest of phone is in LTR</technical_language>

Target:
protected void showLocaleChangeMenu(final CommCareActivityUIController uiController) { final PaneledChoiceDialog dialog = new PaneledChoiceDialog(this, Localization.get("home.menu.locale.select")); AdapterView.OnItemClickListener listClickListener = (parent, view, position, id) -> { String[] localeCodes = ChangeLocaleUtil.getLocaleCodes(); if (position >= localeCodes.length) { Localization.setLocale("default"); } else { String selectedLocale = localeCodes[position]; Localization.setLocale(selectedLocale); MainConfigurablePreferences.setCurrentLocale(selectedLocale); } if (uiController != null) { uiController.setupUI(); } rebuildOptionsMenu(); dismissAlertDialog(); }; dialog.setChoiceItems(buildLocaleChoices(), listClickListener); showAlertDialog(dialog); }
Source:
<code>private void writeEmailsIntoTextFile(HashSet<String> studentEmailSet, HashSet<String> instructorEmailSet) { try { File newFile = new File(filePathForSaving + this.getCurrentDateForDisplay() + ".txt"); try (FileOutputStream fos = new FileOutputStream(newFile); OutputStreamWriter osw = new OutputStreamWriter(fos); Writer w = new BufferedWriter(osw)) { int studentEmailCount = 0; <START> if (!studentEmailSet.isEmpty()) { <END> for (String email : studentEmailSet) { if (!shouldIncludeTestData && email.endsWith(".tmt")) { continue; } w.write(email + ","); studentEmailCount++; } } int instructorEmailCount = 0; if (!instructorEmailSet.isEmpty()) { for (String email : instructorEmailSet) { if (!shouldIncludeTestData && email.endsWith(".tmt")) { continue; } w.write(email + ","); instructorEmailCount++; } } System.out.print("Student email num: " + studentEmailCount + "\n"); System.out.print("Instructor email num: " + instructorEmailCount + "\n"); } } catch (IOException e) { System.err.println("Problem writing to the file statsTest.txt"); } }</code><technical_language>fault, this if is redundant if set is empty for loop skipped anyway. remove if condition</technical_language>

Target:
private void writeEmailsIntoTextFile(HashSet<String> studentEmailSet, HashSet<String> instructorEmailSet) { try { File newFile = new File(filePathForSaving + this.getCurrentDateForDisplay() + ".txt"); try (Writer w = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(newFile)))) { int studentEmailCount = 0; for (String email : studentEmailSet) { if (!shouldIncludeTestData && email.endsWith(".tmt")) { continue; } w.write(email + ","); studentEmailCount++; } int instructorEmailCount = 0; for (String email : instructorEmailSet) { if (!shouldIncludeTestData && email.endsWith(".tmt")) { continue; } w.write(email + ","); instructorEmailCount++; } System.out.print("Student email num: " + studentEmailCount + "\n"); System.out.print("Instructor email num: " + instructorEmailCount + "\n"); } } catch (IOException e) { System.err.println("Problem writing to the file statsTest.txt"); } }
Source:
<code>protected void packColumns() { if (fPackDone) { return; } fTable.setRedraw(false); try { TableColumn tableColumns[] = fTable.getColumns(); for (int i = 0; i < tableColumns.length; i++) { final TableColumn column = tableColumns[i]; packSingleColumn(i, column); <START> column.setData(WIDTH, column.getWidth()); <END> } } finally { fTable.setRedraw(true); } fPackDone = true; }</code><technical_language>store width hide it. storing user setting, initial width</technical_language>

Target:
protected void packColumns() { if (fPackDone) { return; } fTable.setRedraw(false); try { TableColumn tableColumns[] = fTable.getColumns(); for (int i = 0; i < tableColumns.length; i++) { final TableColumn column = tableColumns[i]; packSingleColumn(i, column); column.setData(Key.WIDTH, column.getWidth()); } } finally { fTable.setRedraw(true); } fPackDone = true; }
Source:
<code>public void removeCache(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags) { String cacheMode = findCacheMode(name, false); if (cacheMode == null) { <START> throw new CacheConfigurationException("No such cache"); <END> } final ModelNode cacheRemoveOp = new ModelNode(); cacheRemoveOp.get(OP).set(REMOVE_OPERATION); cacheRemoveOp.get(OP_ADDR).set(rootPath.append(cacheMode, name).toModelNode()); try { ModelNode resp = modelControllerClient.execute(cacheRemoveOp); if (!SUCCESS.equals(resp.get(OUTCOME).asString())) { throw new CacheConfigurationException("Could not remove cache"); } } catch (IOException e) { throw new CacheConfigurationException("Could not remove cache", e); } }</code><technical_language>"No ..." sound right (although I similar messages elsewhere), "Cache '%s' exist", name is more informative clear IMO. applies in createCache(..)</technical_language>

Target:
public void removeCache(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags) { String cacheMode = findCacheMode(name, false); if (cacheMode == null) { throw InfinispanMessages.MESSAGES.nonExistingCache(name); } final ModelNode cacheRemoveOp = new ModelNode(); cacheRemoveOp.get(OP).set(REMOVE_OPERATION); cacheRemoveOp.get(OP_ADDR).set(rootPath.append(cacheMode, name).toModelNode()); try { ModelNode resp = modelControllerClient.execute(cacheRemoveOp); if (!SUCCESS.equals(resp.get(OUTCOME).asString())) { throw InfinispanMessages.MESSAGES.cannotRemoveCache(null, name); } } catch (IOException e) { throw InfinispanMessages.MESSAGES.cannotRemoveCache(e, name); } }
Source:
<code>public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { checkPermission(CONFIGURE); String proposedName = Util.fixEmptyAndTrim(req.getSubmittedForm().getString("name")); Jenkins.checkGoodName(proposedName); Node node = getNode(); if (node == null) { throw new ServletException("No such node " + nodeName); } if ((!proposedName.equals(nodeName)) && Jenkins.getActiveInstance().getNode(proposedName) != null) { throw new FormException(Messages.ComputerSet_SlaveAlreadyExists(proposedName), "name"); } String nExecutors = req.getSubmittedForm().getString("numExecutors"); <START> if (!nExecutors.matches("^(\\d*[1-9]\\d*)$")) { <END> throw new FormException(Messages.Slave_InvalidConfig_Executors(nodeName), "numExecutors"); } Node result = node.reconfigure(req, req.getSubmittedForm()); Jenkins.getInstance().getNodesObject().replaceNode(this.getNode(), result); rsp.sendRedirect2("../" + result.getNodeName() + '/'); }</code><technical_language>^ $ gratuitous matches (as opposed to, say, Matcher.find). (), asking for group. More point, this improperly reject 0 AFAICT, is a valid executor number (for master node anyway). is this code called for agents? simpler Integer.parseInt, catch NumberFormatException, reject a negative result</technical_language>

Target:
public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { checkPermission(CONFIGURE); String proposedName = Util.fixEmptyAndTrim(req.getSubmittedForm().getString("name")); Jenkins.checkGoodName(proposedName); Node node = getNode(); if (node == null) { throw new ServletException("No such node " + nodeName); } if ((!proposedName.equals(nodeName)) && Jenkins.getActiveInstance().getNode(proposedName) != null) { throw new FormException(Messages.ComputerSet_SlaveAlreadyExists(proposedName), "name"); } String nExecutors = req.getSubmittedForm().getString("numExecutors"); if (Integer.parseInt(nExecutors)<=0) { throw new FormException(Messages.Slave_InvalidConfig_Executors(nodeName), "numExecutors"); } Node result = node.reconfigure(req, req.getSubmittedForm()); Jenkins.getInstance().getNodesObject().replaceNode(this.getNode(), result); rsp.sendRedirect2("../" + result.getNodeName() + '/'); }
Source:
<code>private void logToIndexToolOutputTable(byte[] dataRowKey, byte[] indexRowKey, long dataRowTs, long indexRowTs, String errorMsg) { try (Table hTable = ServerUtil.ConnectionFactory.getConnection(ServerUtil.ConnectionType.INDEX_WRITER_CONNECTION, env).getTable(TableName.valueOf(IndexTool.OUTPUT_TABLE_NAME))) { byte[] rowKey = new byte[Long.BYTES]; Bytes.putLong(rowKey, 0, scan.getTimeRange().getMax()); Put put = new Put(rowKey); long scanMaxTs = scan.getTimeRange().getMax(); put.addColumn(IndexTool.OUTPUT_TABLE_COLUMN_FAMILY, IndexTool.DATA_TABLE_NAME_BYTES, scanMaxTs, region.getRegionInfo().getTable().getName()); put.addColumn(IndexTool.OUTPUT_TABLE_COLUMN_FAMILY, IndexTool.INDEX_TABLE_NAME_BYTES, scanMaxTs, indexMaintainer.getIndexTableName()); if (dataRowKey != null) { put.addColumn(IndexTool.OUTPUT_TABLE_COLUMN_FAMILY, IndexTool.DATA_TABLE_ROW_KEY_BYTES, scanMaxTs, dataRowKey); put.addColumn(IndexTool.OUTPUT_TABLE_COLUMN_FAMILY, IndexTool.DATA_TABLE_TS_BYTES, scanMaxTs, Bytes.toBytes(dataRowTs)); } if (indexRowKey != null) { put.addColumn(IndexTool.OUTPUT_TABLE_COLUMN_FAMILY, IndexTool.DATA_TABLE_ROW_KEY_BYTES, scanMaxTs, indexRowKey); put.addColumn(IndexTool.OUTPUT_TABLE_COLUMN_FAMILY, IndexTool.DATA_TABLE_TS_BYTES, scanMaxTs, Bytes.toBytes(indexRowTs)); } <START> put.addColumn(IndexTool.OUTPUT_TABLE_COLUMN_FAMILY, IndexTool.ERROR_MESSAGE_BYTES, <END> scanMaxTs, Bytes.toBytes(errorMsg)); hTable.put(put); } catch (IOException e) { exceptionMessage = "LogToIndexToolOutputTable failed " + e; } }</code><technical_language>INDEX_TABLE_ROW_KEY_BYTES</technical_language>

Target:
private void logToIndexToolOutputTable(byte[] dataRowKey, byte[] indexRowKey, long dataRowTs, long indexRowTs, String errorMsg) { logToIndexToolOutputTable(dataRowKey, indexRowKey, dataRowTs, indexRowTs, errorMsg, null, null); }
Source:
<code>@Test public void connectWithIdnUrl() throws MalformedURLException { URL url = new URL("https://тест.рф"); <START> Connection con = HttpConnection.connect(url, true); <END> String expectedUrl = url.getProtocol() + "://" + IDN.toASCII(url.getHost()) + url.getPath(); assertEquals(expectedUrl, con.request().url().toExternalForm()); }</code><technical_language>Need test for redirects IDNs, for finding IDN in HTML following</technical_language>

Target:
@Test public void connectWithIdnUrl() throws MalformedURLException { URL url = new URL("https://тест.рф"); Connection con = HttpConnection.connect(url); String expectedUrl = url.getProtocol() + "://" + IDN.toASCII(url.getHost()) + url.getPath(); assertEquals(expectedUrl, con.request().url().toExternalForm()); }
Source:
<code>public void testDataStalenessCheck() throws NetworkException, InterruptedException { final int numberOfKeys = 3; for (int i = 0; i < numberOfKeys; i++) { parameterWorker.pull(i); } verify(mockSender, times(numberOfKeys)).sendPullMsg(anyString(), anyObject()); for (int i = 0; i < numberOfKeys; i++) { parameterWorker.pull(i); } verify(mockSender, times(numberOfKeys)).sendPullMsg(anyString(), anyObject()); final int oldWorkerClock = workerClock.getWorkerClock(); final int deltaWorkerClock = STALENESS_BOUND + 1; for (int i = 0; i < deltaWorkerClock; i++) { workerClock.clock(); } assertEquals(oldWorkerClock + deltaWorkerClock, workerClock.getWorkerClock()); final int oldGlobalMinimumClock = workerClock.getGlobalMinimumClock(); <START> final int deltaGlobMinClock = 1; <END> final byte[] initClockMsgData = codec.encode(ClockManager.getBroadcastMinClockMessage(oldGlobalMinimumClock + deltaGlobMinClock)); mockAggregationMaster.send(ClockManager.AGGREGATION_CLIENT_NAME, WORKER_ID, initClockMsgData); assertEquals(workerClock.getWorkerClock(), workerClock.getGlobalMinimumClock() + STALENESS_BOUND); for (int i = 0; i < numberOfKeys; i++) { parameterWorker.pull(i); } verify(mockSender, times(2 * numberOfKeys)).sendPullMsg(anyString(), anyObject()); }</code><technical_language>avoid Glob word a specific meaning (<LINK_0></technical_language>

Target:
public void testDataStalenessCheck() throws NetworkException, InterruptedException { final int numberOfKeys = 3; for (int i = 0; i < numberOfKeys; i++) { parameterWorker.pull(i); } verify(mockSender, times(numberOfKeys)).sendPullMsg(anyString(), anyObject()); for (int i = 0; i < numberOfKeys; i++) { parameterWorker.pull(i); } verify(mockSender, times(numberOfKeys)).sendPullMsg(anyString(), anyObject()); final int oldWorkerClock = workerClock.getWorkerClock(); final int deltaWorkerClock = STALENESS_BOUND + 1; for (int i = 0; i < deltaWorkerClock; i++) { workerClock.clock(); } assertEquals(oldWorkerClock + deltaWorkerClock, workerClock.getWorkerClock()); final int oldGlobalMinimumClock = workerClock.getGlobalMinimumClock(); final int deltaGlobalMinClock = 1; final byte[] initClockMsgData = codec.encode(ClockManager.getBroadcastMinClockMessage(oldGlobalMinimumClock + deltaGlobalMinClock)); mockAggregationMaster.send(ClockManager.AGGREGATION_CLIENT_NAME, WORKER_ID, initClockMsgData); assertEquals(workerClock.getWorkerClock(), workerClock.getGlobalMinimumClock() + STALENESS_BOUND); for (int i = 0; i < numberOfKeys; i++) { parameterWorker.pull(i); } verify(mockSender, times(2 * numberOfKeys)).sendPullMsg(anyString(), anyObject()); }
Source:
<code>public Builder setClient(CDAClient client) { if (accessToken != null) { throw new IllegalStateException( "Do not set a client, when an access token is already set. Use either space id and " + "a token or a previously created client." ); } if (spaceId != null) { throw new IllegalStateException( "Do not set a client, when a space id is already set. Use either space id and " + "a token or a previously created client." ); } if (environment != null) { throw new IllegalStateException( <START> "Do not set a client, when an environment is already set. User either environment " + <END> "or a previously created client." ); } this.client = client; return this; }</code><technical_language>@miron4dev here. if throwing message I extract text a constant, do think</technical_language>

Target:
public Builder setClient(CDAClient client) { if (accessToken != null) { throw new IllegalStateException(format(FIELD_ALREADY_EXISTS, "client", "access token")); } if (spaceId != null) { throw new IllegalStateException(format(FIELD_ALREADY_EXISTS, "client", "space id")); } if (environment != null) { throw new IllegalStateException(format(FIELD_ALREADY_EXISTS, "client", "environment")); } this.client = client; return this; }
Source:
<code>public UpgradeConfirmationModel(final VDS host) { this.host = host; getLatch().setIsAvailable(true); getLatch().setEntity(true); <START> getLatch().setIsChangeable(true); <END> }</code><technical_language>latch for this. Latch is meant a checkbox checked in order continue (e.g. like: "This is a dangerous operation. Please check this acknowledge it.")</technical_language>

Target:
public UpgradeConfirmationModel(final VDS host) { this.host = host; setReboot(new EntityModel<>()); getReboot().setEntity(true); getReboot().setIsAvailable(true); getReboot().setIsChangeable(true); }
Source:
<code>protected void activate(Map<String, Object> properties) { if (properties != null) { <START> String value = (String) properties.get("autoIgnore"); <END> autoIgnore = value == null || !value.toString().equals("false"); } }</code><technical_language>Careful! property is declared a boolean, if set Paper UI, config is a Boolean here. support String Boolean safe</technical_language>

Target:
protected void activate(Map<String, Object> properties) { if (properties != null) { Object value = properties.get("autoIgnore"); autoIgnore = value == null || !value.toString().equals("false"); } }
Source:
<code>public <T extends Annotation> Set<T> getInterceptorBindingsByType(Class<T> annotationType) { Preconditions.checkArgumentNotNull(annotationType, "annotationType"); <START> Set<T> result = new HashSet<>(); <END> for (Annotation interceptorBinding : interceptorBindings) { if (interceptorBinding.annotationType().equals(annotationType)) { result.add((T) interceptorBinding); } } return result; }</code><technical_language>is new resource, I Java 8 Stream, this: java return interceptorBindings.stream().filter( j -> j.annotationType().equals(annotationType).collec(Collerctor.toSet());</technical_language>

Target:
public <T extends Annotation> Set<T> getInterceptorBindingsByType(Class<T> annotationType) { Preconditions.checkArgumentNotNull(annotationType, "annotationType"); return interceptorBindings.stream() .filter((annotation) -> annotation.annotationType().equals(annotationType)) .map(annotation -> (T) annotation) .collect(ImmutableSet.collector()); }
Source:
<code>private <T extends HasMetadata> String resolvePlural(Class<T> apiTypeClass) { if (CustomResource.class.isAssignableFrom(apiTypeClass)) { return CustomResourceDefinitionContext.fromCustomResourceType(apiTypeClass).getPlural(); } <START> return Pluralize.toPlural(HasMetadata.getKind(apiTypeClass)).toLowerCase(); <END> }</code><technical_language>be: CustomResource.getPlural(apiTypeClass). problem, though, is this requires apiTypeClass extend CustomResource, is I tend logic for methods moved HasMetadata. that, informers methods a CustomResource instance? problem logic is potentially class annotated @Singular means singular version equal kind. class annotated @Plural in case, some other computation</technical_language>

Target:
private <T extends HasMetadata> String resolvePlural(Class<T> apiTypeClass) { if (CustomResource.class.isAssignableFrom(apiTypeClass)) { return CustomResource.getPlural((Class<? extends CustomResource>)apiTypeClass); } return Pluralize.toPlural(HasMetadata.getKind(apiTypeClass)).toLowerCase(); }
Source:
<code>private void allocate0(long index) { if (index > Integer.MAX_VALUE) { throw new OutOfMemoryError(); } if (index > maxPages) { <START> throw LimitOverflowException.instance().put("Maximum number of pages (").put(maxPages).put(") breached"); <END> } if (index >= pages.size()) { pages.extendAndSet((int) index, Unsafe.malloc(pageSize)); LOG.info().$("new page [size=").$(pageSize).$(']').$(); } cachePageLo = index << bits; cachePageHi = cachePageLo + pageSize; }</code><technical_language>likewise, need denote source of exception</technical_language>

Target:
private void allocate0(long index) { if (index > Integer.MAX_VALUE) { throw new OutOfMemoryError(); } if (index > maxPages) { throw LimitOverflowException.instance().put("Maximum number of pages (").put(maxPages).put(") breached in MemoryPages"); } if (index >= pages.size()) { pages.extendAndSet((int) index, Unsafe.malloc(pageSize)); LOG.info().$("new page [size=").$(pageSize).$(']').$(); } cachePageLo = index << bits; cachePageHi = cachePageLo + pageSize; }
Source:
<code>protected JobLaunchingTasklet(MessageBus messageBus, JobDefinitionRepository jobDefinitionRepository, DomainRepository instanceRepository, String jobName, MessageChannel launchingChannel, PublishSubscribeChannel listeningChannel) { <START> Assert.notNull(messageBus, "A message bus is required."); <END> Assert.notNull(jobDefinitionRepository, "A JobDefinitionRepository is required"); Assert.notNull(instanceRepository, "A DomainRepository is required"); Assert.notNull(jobName, "A job name is required"); this.jobName = jobName; this.messageBus = messageBus; this.definitionRepository = jobDefinitionRepository; this.instanceRepository = instanceRepository; this.launchingChannel = launchingChannel; this.listeningChannel = listeningChannel; }</code><technical_language>Assertion message consistency - Personally I favor "full stops" mix</technical_language>

Target:
protected JobLaunchingTasklet(MessageBus messageBus, JobDefinitionRepository jobDefinitionRepository, DomainRepository instanceRepository, String jobName, MessageChannel launchingChannel, PublishSubscribeChannel listeningChannel) { Assert.notNull(messageBus, "A message bus is required"); Assert.notNull(jobDefinitionRepository, "A JobDefinitionRepository is required"); Assert.notNull(instanceRepository, "A DomainRepository is required"); Assert.notNull(jobName, "A job name is required"); this.jobName = jobName; this.messageBus = messageBus; this.definitionRepository = jobDefinitionRepository; this.instanceRepository = instanceRepository; this.launchingChannel = launchingChannel; this.listeningChannel = listeningChannel; }
Source:
<code>public AdvancedXboxButton getXboxButton(XboxButton buttonName) { if (!allocatedButtons.containsKey(buttonName)) { <START> allocatedButtons.put(buttonName, true); <END> } else { assertionManager.assertTrue( !allocatedButtons.get(buttonName), "Button " + buttonName + " has already been allocated!"); } if (buttonName == XboxButton.LeftTrigger || buttonName == XboxButton.RightTrigger) { return new AdvancedXboxAxisButton(this, buttonName, 0.75); } return new AdvancedXboxButton(this, buttonName); }</code><technical_language>instead maintain a map of AdvancedXboxButtons contains buttons returned check that? feels odd returning a button lose references instead maintain state describes generated a button. thinking keeping references buttons useful in future</technical_language>

Target:
public AdvancedXboxButton getXboxButton(XboxButton buttonName) { if (!allocatedButtons.containsKey(buttonName)) { AdvancedXboxButton candidate; if (buttonName == XboxButton.LeftTrigger || buttonName == XboxButton.RightTrigger) { candidate = new AdvancedXboxAxisButton(this, buttonName, 0.75); } else { candidate = new AdvancedXboxButton(this, buttonName); } allocatedButtons.put(buttonName, candidate); } else { assertionManager.assertTrue(false, "Button " + buttonName + " has already been allocated!"); } return allocatedButtons.get(buttonName); }
Source:
<code>static String getCanonicalArchitecture(String arch, boolean softfloat) { arch = arch.toLowerCase().trim(); if ("powerpc".equals(arch)) { arch = "ppc"; } else if ("powerpc64".equals(arch)) { arch = "ppc64"; } else if ("i386".equals(arch) || "i686".equals(arch)) { arch = "x86"; } else if ("x86_64".equals(arch) || "amd64".equals(arch)) { arch = "x86-64"; } if ("ppc64".equals(arch) && "little".equals(System.getProperty("sun.cpu.endian"))) { arch = "ppc64le"; } if("arm".equals(arch) && softfloat) { arch = "armel"; } if ("mips64el".equals(arch)) { arch = "mips64el"; <START> } <END> return arch; }</code><technical_language>This is a NOOP, arch is unmodified, this change removed</technical_language>

Target:
static String getCanonicalArchitecture(String arch, boolean softfloat) { arch = arch.toLowerCase().trim(); if ("powerpc".equals(arch)) { arch = "ppc"; } else if ("powerpc64".equals(arch)) { arch = "ppc64"; } else if ("i386".equals(arch) || "i686".equals(arch)) { arch = "x86"; } else if ("x86_64".equals(arch) || "amd64".equals(arch)) { arch = "x86-64"; } if ("ppc64".equals(arch) && "little".equals(System.getProperty("sun.cpu.endian"))) { arch = "ppc64le"; } if("arm".equals(arch) && softfloat) { arch = "armel"; } return arch; }
Source:
<code>private static synchronized ActivationService getActivationService() { if (activationService.get() == null) { <START> setActivationService(); <END> } return activationService.get(); }</code><technical_language>I a query style this patch. I added "private static synchronized" methods called places replaced original setter. I wondered if read if calls inline. Is a security style/precedent personal preference</technical_language>

Target:
private static synchronized ActivationService getActivationService() { if (activationService.get() == null) { activationService.set(PrivilegedServiceFactory.getInstance(ActivationService.class).getService()); } return activationService.get(); }
Source:
<code>NamesStep(List<DataSource> existingDataSources, Metadata metadata, Resources resources, boolean xa) { super(resources.constants().attributes()); FormItem<String> nameItem = new NameItem(); nameItem.addValidationHandler(value -> { for (DataSource dataSource : existingDataSources) { if (dataSource.getName().equals(value)) { return ValidationResult.invalid(resources.messages().duplicateResource(Names.DATASOURCE)); } } return ValidationResult.OK; }); form = new ModelNodeForm.Builder<DataSource>(Ids.DATA_SOURCE_NAMES_FORM, metadata) .unboundFormItem(nameItem, 0) .include(JNDI_NAME) .onSave((form, changedValues) -> { wizard().getContext().dataSource = new DataSource(nameItem.getValue(), xa); wizard().getContext().dataSource.update(form.getModel()); }) .build(); <START> <END> form.getFormItem(JNDI_NAME).addValidationHandler(value -> value.toString().matches("java:(jboss)?/.*") ? ValidationResult.OK : ValidationResult.invalid("JNDI name has to start with java:/ or java:jboss/") ); registerAttachable(form); }</code><technical_language>I worth moving this class org.jboss.hal.ballroom.form. other resources / form items need validation</technical_language>

Target:
NamesStep(List<DataSource> existingDataSources, Metadata metadata, Resources resources, boolean xa) { super(resources.constants().attributes()); FormItem<String> nameItem = new NameItem(); nameItem.addValidationHandler(value -> { for (DataSource dataSource : existingDataSources) { if (dataSource.getName().equals(value)) { return ValidationResult.invalid(resources.messages().duplicateResource(Names.DATASOURCE)); } } return ValidationResult.OK; }); form = new ModelNodeForm.Builder<DataSource>(Ids.DATA_SOURCE_NAMES_FORM, metadata) .unboundFormItem(nameItem, 0) .include(JNDI_NAME) .onSave((form, changedValues) -> { wizard().getContext().dataSource = new DataSource(nameItem.getValue(), xa); wizard().getContext().dataSource.update(form.getModel()); }) .build(); form.getFormItem(JNDI_NAME).addValidationHandler(new PatternValidation.JNDINameValidation()); registerAttachable(form); }
Source:
<code>public void testCheckAndMutate() throws InterruptedException, ExecutionException { AsyncTable<?> table = getTable.get(); int count = 10; CountDownLatch putLatch = new CountDownLatch(count + 1); table.put(new Put(row).addColumn(FAMILY, QUALIFIER, VALUE)).thenRun(() -> putLatch.countDown()); IntStream.range(0, count) .forEach(i -> table.put(new Put(row).addColumn(FAMILY, concat(QUALIFIER, i), VALUE)) .thenRun(() -> putLatch.countDown())); putLatch.await(); AtomicInteger successCount = new AtomicInteger(0); AtomicInteger successIndex = new AtomicInteger(-1); CountDownLatch mutateLatch = new CountDownLatch(count); IntStream.range(0, count).forEach(i -> { <START> RowMutations mutation = new RowMutations(row); <END> try { mutation.add((Mutation) new Delete(row).addColumn(FAMILY, QUALIFIER)); mutation .add((Mutation) new Put(row).addColumn(FAMILY, concat(QUALIFIER, i), concat(VALUE, i))); } catch (IOException e) { throw new UncheckedIOException(e); } table.checkAndMutate(new CheckAndMutate(row) .ifEquals(FAMILY, QUALIFIER, VALUE) .action(mutation)) .thenAccept(x -> { if (x) { successCount.incrementAndGet(); successIndex.set(i); } mutateLatch.countDown(); }); }); mutateLatch.await(); assertEquals(1, successCount.get()); Result result = table.get(new Get(row)).get(); IntStream.range(0, count).forEach(i -> { if (i == successIndex.get()) { assertArrayEquals(concat(VALUE, i), result.getValue(FAMILY, concat(QUALIFIER, i))); } else { assertArrayEquals(VALUE, result.getValue(FAMILY, concat(QUALIFIER, i))); } }); }</code><technical_language>Cast Mutation unnecessary</technical_language>

Target:
public void testCheckAndMutate() throws InterruptedException, ExecutionException { AsyncTable<?> table = getTable.get(); int count = 10; CountDownLatch putLatch = new CountDownLatch(count + 1); table.put(new Put(row).addColumn(FAMILY, QUALIFIER, VALUE)).thenRun(() -> putLatch.countDown()); IntStream.range(0, count) .forEach(i -> table.put(new Put(row).addColumn(FAMILY, concat(QUALIFIER, i), VALUE)) .thenRun(() -> putLatch.countDown())); putLatch.await(); AtomicInteger successCount = new AtomicInteger(0); AtomicInteger successIndex = new AtomicInteger(-1); CountDownLatch mutateLatch = new CountDownLatch(count); IntStream.range(0, count).forEach(i -> { RowMutations mutation = new RowMutations(row); try { mutation.add((Mutation) new Delete(row).addColumn(FAMILY, QUALIFIER)); mutation .add((Mutation) new Put(row).addColumn(FAMILY, concat(QUALIFIER, i), concat(VALUE, i))); } catch (IOException e) { throw new UncheckedIOException(e); } table.checkAndMutate(CheckAndMutate.newBuilder(row) .ifEquals(FAMILY, QUALIFIER, VALUE) .build(mutation)) .thenAccept(x -> { if (x) { successCount.incrementAndGet(); successIndex.set(i); } mutateLatch.countDown(); }); }); mutateLatch.await(); assertEquals(1, successCount.get()); Result result = table.get(new Get(row)).get(); IntStream.range(0, count).forEach(i -> { if (i == successIndex.get()) { assertArrayEquals(concat(VALUE, i), result.getValue(FAMILY, concat(QUALIFIER, i))); } else { assertArrayEquals(VALUE, result.getValue(FAMILY, concat(QUALIFIER, i))); } }); }
Source:
<code>private Iterable<ThriftStructFieldInfo> getFieldInfos(ThriftStructCodec<?> c) { Class<? extends ThriftStructCodec> klass = c.getClass(); if (isUnion(klass)){ return getFieldInfosForUnion(klass); } else { try { Object r = klass.getMethod("fieldInfos").invoke(c); return JavaConversions$.MODULE$.asJavaIterable((scala.collection.Iterable<ThriftStructFieldInfo>)r); <START> } catch (ReflectiveOperationException e) { <END> throw new ScroogeSchemaConversionException("can not get field Info from: " + c.toString(), e); } } }</code><technical_language>catch ClassCastException too</technical_language>

Target:
private Iterable<ThriftStructFieldInfo> getFieldInfos(ThriftStructCodec<?> c) { Class<? extends ThriftStructCodec> klass = c.getClass(); if (isUnion(klass)) { return getFieldInfosForUnion(klass); } else { try { Object r = klass.getMethod("fieldInfos").invoke(c); return JavaConversions$.MODULE$.asJavaIterable((scala.collection.Iterable<ThriftStructFieldInfo>) r); } catch (ClassCastException e) { throw new ScroogeSchemaConversionException("can not get field Info from: " + c.toString(), e); } catch (InvocationTargetException e) { throw new ScroogeSchemaConversionException("can not get field Info from: " + c.toString(), e); } catch (NoSuchMethodException e) { throw new ScroogeSchemaConversionException("can not get field Info from: " + c.toString(), e); } catch (IllegalAccessException e) { throw new ScroogeSchemaConversionException("can not get field Info from: " + c.toString(), e); } } }
Source:
<code>public void handleStateChanged(Watcher.Event.KeeperState state) throws Exception { if (state == Watcher.Event.KeeperState.Expired) { <START> LOG.warn("Got session expired event for processor=" + processorId); <END> } }</code><technical_language>expire jobmodel stop processing here? Otherwise, end in a situation orphaned containers, no</technical_language>

Target:
public void handleStateChanged(Watcher.Event.KeeperState state) throws Exception { if (state == Watcher.Event.KeeperState.Expired) { LOG.warn("Got session expired event for processor=" + processorId); zkUtils.incGeneration(); if (coordinatorListener != null) { coordinatorListener.onJobModelExpired(); } zkUtils.unregister(); } }
Source:
<code>public HttpResponse doChangePassword( @QueryParameter String password, @QueryParameter String newPassword1, @QueryParameter String newPassword2 ) throws Exception { <START> if ( "".equals(password)) <END> throw new UserError("Wrong current password"); if ( "".equals(newPassword1) || "".equals(newPassword2)) throw new UserError("New password is empty"); if (!newPassword1.equals(newPassword2)) throw new UserError("Password does not match the confirm password"); try { parent.connect(dn,password).close(); } catch (javax.naming.AuthenticationException e) { throw new UserError("Wrong current password"); } Attributes attrs = new BasicAttributes(); attrs.put("userPassword", PasswordUtil.hashPassword(newPassword1)); LdapContext context = parent.connect(); try { context.modifyAttributes(dn,DirContext.REPLACE_ATTRIBUTE,attrs); } finally { context.close(); } LOGGER.info("User "+userId+" changed the password"); return new HttpRedirect("done"); }</code><technical_language>fixEmpty essentially thing</technical_language>

Target:
public HttpResponse doChangePassword( @QueryParameter String password, @QueryParameter String newPassword1, @QueryParameter String newPassword2 ) throws Exception { if (fixEmpty(password) == null) throw new UserError("Current password is empty"); if (fixEmpty(newPassword1) == null || fixEmpty(newPassword2) == null) throw new UserError("New password is empty"); if (!newPassword1.equals(newPassword2)) throw new UserError("Password does not match the confirm password"); try { parent.connect(dn,password).close(); } catch (javax.naming.AuthenticationException e) { throw new UserError("Wrong current password"); } Attributes attrs = new BasicAttributes(); attrs.put("userPassword", PasswordUtil.hashPassword(newPassword1)); LdapContext context = parent.connect(); try { context.modifyAttributes(dn,DirContext.REPLACE_ATTRIBUTE,attrs); } finally { context.close(); } LOGGER.info("User "+userId+" changed the password"); return new HttpRedirect("done"); }