auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public BigintValues(long[] values, boolean nullAllowed) <START> { <END> super(nullAllowed); requireNonNull(values, "values is null"); checkArgument(values.length > 1, "values must contain at least 2 entries"); this.originalValues = values; this.size = Integer.highestOneBit(values.length * 3); this.longs = new long[size]; Arrays.fill(longs, EMPTY_MARKER); for (long value : values) { if (value == EMPTY_MARKER) { containsEmptyMarker = true; } else { int position = (int) ((value * M) & (size - 1)); for (int i = position; i < position + size; i++) { int index = i & (size - 1); if (longs[index] == EMPTY_MARKER) { longs[index] = value; break; } } } } }</code><technical_language>0xBADC0FFEE0DDF00DL (bad coffee odd food)</technical_language>

Target:
private BigintValues(long[] values, boolean nullAllowed) { super(nullAllowed); requireNonNull(values, "values is null"); checkArgument(values.length > 1, "values must contain at least 2 entries"); this.values = values; this.size = Integer.highestOneBit(values.length * 3); this.hashTable = new long[size]; Arrays.fill(hashTable, EMPTY_MARKER); for (long value : values) { if (value == EMPTY_MARKER) { containsEmptyMarker = true; } else { int position = (int) ((value * M) & (size - 1)); for (int i = position; i < position + size; i++) { int index = i & (size - 1); if (hashTable[index] == EMPTY_MARKER) { hashTable[index] = value; break; } } } } }
Source:
<code>private Timestamp(BigDecimal millis, Integer localOffset) { if (millis == null) throw new NullPointerException("millis is null"); if(millis.compareTo(MINIMUM_ALLOWED_FRACTIONAL_MILLIS) < 0 || millis.compareTo(MAXIMUM_ALLOWED_FRACTIONAL_MILLIS) > 0) { throw new IllegalArgumentException("millis: " + millis + " is outside of valid the range: from " + MINIMUM_ALLOWED_FRACTIONAL_MILLIS + " to " + MAXIMUM_ALLOWED_FRACTIONAL_MILLIS + " both inclusive"); } <START> if(Math.abs(millis.scale()) >= MAXIMUM_ALLOWED_MILLIS_SCALE) { <END> throw new IllegalArgumentException("millis: " + millis + " has a scale outside the valid range:" + "from" + -MAXIMUM_ALLOWED_MILLIS_SCALE + "to" + MAXIMUM_ALLOWED_MILLIS_SCALE + "both inclusive"); } long ms = millis.longValue(); set_fields_from_millis(ms); this._precision = Precision.SECOND; int scale = millis.scale(); if (scale <= -3) { this._fraction = null; } else { BigDecimal secs = millis.movePointLeft(3); BigDecimal secsDown = secs.setScale(0, RoundingMode.FLOOR); this._fraction = secs.subtract(secsDown); } this._offset = localOffset; }</code><technical_language>noted previously, this violates library design goals. set bounds size of strings, decimals ints, else, do here. This is rejecting perfectly valid Ion data, I find acceptable (default) behavior for reference implementation of Ion. If intent is protect other operations undesirable performance, addressed point. In case of converting millis, is hard do. reasonable a configuration point allows applications reign in bounds of some things, done ad-hoc default</technical_language>

Target:
private Timestamp(BigDecimal millis, Integer localOffset) { if (millis == null) throw new NullPointerException("millis is null"); if(millis.compareTo(MINIMUM_ALLOWED_FRACTIONAL_MILLIS) < 0 || FRACTIONAL_MILLIS_UPPER_BOUND.compareTo(millis) < 0) { throw new IllegalArgumentException("millis: " + millis + " is outside of valid the range: from " + MINIMUM_ALLOWED_FRACTIONAL_MILLIS + " (0001T)" + ", inclusive, to " + FRACTIONAL_MILLIS_UPPER_BOUND + " (10000T)" + " , exclusive"); } long ms = isIntegralZero(millis) ? 0 : millis.longValue(); set_fields_from_millis(ms); this._precision = Precision.SECOND; int scale = millis.scale(); if (scale <= -3) { this._fraction = null; } else { BigDecimal secs = millis.movePointLeft(3); BigDecimal secsDown = isIntegralZero(secs) ? BigDecimal.ZERO : secs.setScale(0, BigDecimal.ROUND_FLOOR); this._fraction = secs.subtract(secsDown); } this._offset = localOffset; }
Source:
<code>private static ImmutableList<PaymentEvent> createFxResetEvents( List<RatePaymentPeriod> payPeriods, LocalDate initialExchangeDate) { ImmutableList.Builder<PaymentEvent> events = ImmutableList.builder(); for (int i = 0; i < payPeriods.size(); i++) { RatePaymentPeriod period = payPeriods.get(i); <START> LocalDate startPaymentDate = i == 0 ? initialExchangeDate : payPeriods.get(i - 1).getPaymentDate(); <END> if (period.getFxReset().isPresent()) { FxReset fxReset = period.getFxReset().get(); events.add(FxResetNotionalExchange.builder() .paymentDate(startPaymentDate) .referenceCurrency(fxReset.getReferenceCurrency()) .notional(-period.getNotional()) .index(fxReset.getIndex()) .fixingDate(fxReset.getFixingDate()) .build()); events.add(FxResetNotionalExchange.builder() .paymentDate(period.getPaymentDate()) .referenceCurrency(fxReset.getReferenceCurrency()) .notional(period.getNotional()) .index(fxReset.getIndex()) .fixingDate(fxReset.getFixingDate()) .build()); } else { events.add(NotionalExchange.builder() .paymentDate(startPaymentDate) .paymentAmount(CurrencyAmount.of(period.getCurrency(), -period.getNotional())) .build()); events.add(NotionalExchange.builder() .paymentDate(period.getPaymentDate()) .paymentAmount(CurrencyAmount.of(period.getCurrency(), period.getNotional())) .build()); } } return events.build(); }</code><technical_language>This do some clarifying parentheses</technical_language>

Target:
private static ImmutableList<PaymentEvent> createFxResetEvents( List<RatePaymentPeriod> payPeriods, LocalDate initialExchangeDate) { ImmutableList.Builder<PaymentEvent> events = ImmutableList.builder(); for (int i = 0; i < payPeriods.size(); i++) { RatePaymentPeriod period = payPeriods.get(i); LocalDate startPaymentDate = (i == 0 ? initialExchangeDate : payPeriods.get(i - 1).getPaymentDate()); if (period.getFxReset().isPresent()) { FxReset fxReset = period.getFxReset().get(); events.add(FxResetNotionalExchange.builder() .paymentDate(startPaymentDate) .referenceCurrency(fxReset.getReferenceCurrency()) .notional(-period.getNotional()) .index(fxReset.getIndex()) .fixingDate(fxReset.getFixingDate()) .build()); events.add(FxResetNotionalExchange.builder() .paymentDate(period.getPaymentDate()) .referenceCurrency(fxReset.getReferenceCurrency()) .notional(period.getNotional()) .index(fxReset.getIndex()) .fixingDate(fxReset.getFixingDate()) .build()); } else { events.add(NotionalExchange.builder() .paymentDate(startPaymentDate) .paymentAmount(CurrencyAmount.of(period.getCurrency(), -period.getNotional())) .build()); events.add(NotionalExchange.builder() .paymentDate(period.getPaymentDate()) .paymentAmount(CurrencyAmount.of(period.getCurrency(), period.getNotional())) .build()); } } return events.build(); }
Source:
<code>public static String printTabularResults(Tabular tabular) { List<Integer> lengths = new ArrayList<>(tabular.headers.size()); for(int i = 0; i < tabular.headers.size(); ++i) { lengths.add(tabular.headers.get(i).length()); } for(Tabular.Row row : tabular.rows) { for(int i = 0; i < row.cols.size(); ++i) { if(lengths.get(i) < row.cols.get(i).length()) { lengths.set(i, row.cols.get(i).length()); } } } List<String> formats = new ArrayList<>(lengths.size()); for(Integer length : lengths) { <START> formats.add("%-" + (length + 5) + "s"); } StringBuilder stringBuilder = new StringBuilder(); for(int i = 0; i < tabular.headers.size(); ++i) { stringBuilder.append(Colored.boldWhite(String.format(formats.get(i), tabular.headers.get(i)))); } stringBuilder.append("\n"); int totalLength = lengths.stream().reduce(0, Integer::sum); totalLength += 5 * lengths.size(); <END> String separate = new String(new char[totalLength]).replace("\0", "="); stringBuilder.append(Colored.boldWhite(separate)).append("\n"); for(Tabular.Row row : tabular.rows) { for(int i = 0; i < row.cols.size(); ++i) { stringBuilder.append(String.format(formats.get(i), row.cols.get(i))); } stringBuilder.append("\n"); } return stringBuilder.toString(); }</code><technical_language>5 a descriptive constant</technical_language>

Target:
public static String printTabularResults(Tabular tabular) { List<Integer> lengths = new ArrayList<>(tabular.headers.size()); for(int i = 0; i < tabular.headers.size(); ++i) { lengths.add(tabular.headers.get(i).length()); } for(Tabular.Row row : tabular.rows) { for(int i = 0; i < row.cols.size(); ++i) { if(lengths.get(i) < row.cols.get(i).length()) { lengths.set(i, row.cols.get(i).length()); } } } final int padding = 5; List<String> formats = new ArrayList<>(lengths.size()); for(Integer length : lengths) { formats.add("%-" + (length + padding) + "s"); } StringBuilder stringBuilder = new StringBuilder(); for(int i = 0; i < tabular.headers.size(); ++i) { stringBuilder.append(Colored.boldWhite(String.format(formats.get(i), tabular.headers.get(i)))); } stringBuilder.append("\n"); int totalLength = lengths.stream().reduce(0, Integer::sum); totalLength += padding * lengths.size(); String separate = new String(new char[totalLength]).replace("\0", "="); stringBuilder.append(Colored.boldWhite(separate)).append("\n"); for(Tabular.Row row : tabular.rows) { for(int i = 0; i < row.cols.size(); ++i) { stringBuilder.append(String.format(formats.get(i), row.cols.get(i))); } stringBuilder.append("\n"); } return stringBuilder.toString(); }
Source:
<code>public String commitMessage(GitRepositoryManager repoManager, Provider<ReviewDb> db) { if (commitMessage == null) { PatchSet.Id psId = null; String sha1 = null; Project.NameKey name = null; Repository repo = null; try { psId = change(db).currentPatchSetId(); sha1 = db.get().patchSets().get(psId).getRevision().get(); name = change.getProject(); <START> repo = repoManager.openRepository(name); <END> RevWalk walk = new RevWalk(repo); try { RevCommit c = walk.parseCommit(ObjectId.fromString(sha1)); commitMessage = c.getFullMessage(); } finally { walk.release(); } } catch (RepositoryNotFoundException e) { log.error("Repository not found: " + name.toString(), e); } catch (IOException e) { if(repo == null) { log.error("Problem opening repository: " + name.toString(), e); } else { log.error("Problem parsing commit: " + sha1, e); } } catch (OrmException e) { if (psId != null) { log.error("Problem requesting sha1 from database for patchSetId: " + psId.toString(), e); } else { log.error("Problem requesting change from database for change: " + legacyId.toString(), e); } } } return commitMessage; }</code><technical_language>open a repository ensure close done it, resource handle is decremented. I need a finally block call repo.close()</technical_language>

Target:
public String commitMessage(GitRepositoryManager repoManager, Provider<ReviewDb> db) { if (commitMessage == null) { PatchSet.Id psId = null; String sha1 = null; Project.NameKey name = null; Repository repo = null; try { psId = change(db).currentPatchSetId(); sha1 = db.get().patchSets().get(psId).getRevision().get(); name = change.getProject(); repo = repoManager.openRepository(name); RevWalk walk = new RevWalk(repo); try { RevCommit c = walk.parseCommit(ObjectId.fromString(sha1)); commitMessage = c.getFullMessage(); } finally { walk.release(); } } catch (RepositoryNotFoundException e) { log.error("Repository not found: " + name.toString(), e); } catch (IOException e) { if(repo == null) { log.error("Problem opening repository: " + name.toString(), e); } else { log.error("Problem parsing commit: " + sha1, e); } } catch (OrmException e) { if (psId != null) { log.error("Problem requesting sha1 from database for patchSetId: " + psId.toString(), e); } else { log.error("Problem requesting change from database for change: " + legacyId.toString(), e); } } finally { if(repo != null) { repo.close(); } } } return commitMessage; }
Source:
<code>public void onIndexPageWithLocalResources() { ContentSecurityPolicyHeaderWriter writer = new ContentSecurityPolicyHeaderWriter( false, true, SiteUrl.SITE, <START> H2_CONSOLE_PATH <END> ); String[] directives = writer.constructDirectives("/").split(";"); assertThat(directives) .contains( "default-src 'none'", "img-src <LINK_1> 'self'", "font-src 'self'", "report-uri <LINK_0>", "style-src 'report-sample' <LINK_1> 'self'", "script-src 'report-sample' 'unsafe-inline' 'self'" ) .hasSize(NUMBER_OF_DIRECTIVES_ON_STANDARD_PAGES); }</code><technical_language>bool(), I suggest nullOr(H2_CONSOLE_PATH) similar behavior before</technical_language>

Target:
public void onIndexPageWithLocalResources() { ContentSecurityPolicyHeaderWriter writer = new ContentSecurityPolicyHeaderWriter( false, true, SiteUrl.SITE, nullOr(H2_CONSOLE_PATH) ); String[] directives = writer.constructDirectives("/").split(";"); assertThat(directives) .contains( "default-src 'none'", "img-src <LINK_1> 'self'", "font-src 'self'", "report-uri <LINK_0>", "style-src 'report-sample' <LINK_1> 'self'", "script-src 'report-sample' 'unsafe-inline' 'self'" ) .hasSize(NUMBER_OF_DIRECTIVES_ON_STANDARD_PAGES); }
Source:
<code>public void put(K key, V value) { try { putAsync(key, value).get(); } catch (InterruptedException e) { throw new SamzaException(e); } catch (Exception e) { <START> throw (SamzaException) e.getCause(); <END> } }</code><technical_language>Wrap in a SamzaException add separate catch blocks for general exceptions SamzaExceptions if treated differently</technical_language>

Target:
public void put(K key, V value) { try { putAsync(key, value).get(); } catch (Exception e) { throw new SamzaException(e); } }
Source:
<code><START> String getExternalId(boolean fromServer) { <END> return null; }</code><technical_language>mark @Nullable</technical_language>

Target:
@Nullable String getExternalId(boolean fromServer) { return null; }
Source:
<code><START> public static boolean matches(final MbusChannelElementsDto mbusChannelElements, <END> final ChannelElementValuesDto channelElementValues) { if (!channelElementValues.isMbusSlaveDeviceConfigured()) { return false; } if (mbusChannelElements.hasMbusIdentificationNumber() && !mbusChannelElements.getMbusIdentificationNumber() .equals(channelElementValues.getIdentificationNumber())) { return false; } if (mbusChannelElements.hasMbusManufacturerIdentification() && !mbusChannelElements .getMbusManufacturerIdentification().equals(channelElementValues.getManufacturerIdentification())) { return false; } if (mbusChannelElements.hasMbusVersion() && !mbusChannelElements.getMbusVersion().equals(channelElementValues.getVersion())) { return false; } if (mbusChannelElements.hasMbusDeviceTypeIdentification() && !mbusChannelElements .getMbusDeviceTypeIdentification().equals(channelElementValues.getDeviceTypeIdentification())) { return false; } return true; }</code><technical_language>Fix cyclomatic complexity sonar issue</technical_language>

Target:
public static boolean matches(final MbusChannelElementsDto mbusChannelElements, final ChannelElementValuesDto channelElementValues) { if (!channelElementValues.isMbusSlaveDeviceConfigured()) { return false; } if (failMatchOnMbusIdentificationNumber(mbusChannelElements, channelElementValues) || failMatchOnMbusManufacturerIdentification(mbusChannelElements, channelElementValues) || failMatchOnMbusVersion(mbusChannelElements, channelElementValues) || failMatchOnMbusDeviceTypeIdentification(mbusChannelElements, channelElementValues)) { return false; } return true; }
Source:
<code>public void validateConfig(WorkspaceConfig config) throws ValidationException, ServerException { checkNotNull(config.getName(), "Workspace name required"); check( WS_NAME.matcher(config.getName()).matches(), "Incorrect workspace name, it must be between 3 and 100 characters and may contain digits, " + "latin letters, underscores, dots, dashes and must start and end only with digits, " + "latin letters or underscores"); <START> if ((config.getEnvironments() != null && !config.getEnvironments().isEmpty()) <END> || !isNullOrEmpty(config.getDefaultEnv()) || !isSidecarBasedWorkspace(config.getAttributes())) { validateEnvironments(config); } for (Command command : config.getCommands()) { check( !isNullOrEmpty(command.getName()), "Workspace %s contains command with null or empty name", config.getName()); check( !isNullOrEmpty(command.getCommandLine()), "Command line required for command '%s' in workspace '%s'", command.getName(), config.getName()); } validatePlugins(config); }</code><technical_language>skip config.getEnvironments() != null agreement collections in model objects null</technical_language>

Target:
public void validateConfig(WorkspaceConfig config) throws ValidationException, ServerException { checkNotNull(config.getName(), "Workspace name required"); check( WS_NAME.matcher(config.getName()).matches(), "Incorrect workspace name, it must be between 3 and 100 characters and may contain digits, " + "latin letters, underscores, dots, dashes and must start and end only with digits, " + "latin letters or underscores"); validateEnvironments(config); for (Command command : config.getCommands()) { check( !isNullOrEmpty(command.getName()), "Workspace %s contains command with null or empty name", config.getName()); check( !isNullOrEmpty(command.getCommandLine()), "Command line required for command '%s' in workspace '%s'", command.getName(), config.getName()); } validatePlugins(config); }
Source:
<code>private List<FeedbackSubmissionEditResponse> createResponses( FeedbackQuestionAttributes questionAttributes, int qnIndx, int numOfResponseBoxes) { List<FeedbackSubmissionEditResponse> responses = new ArrayList<FeedbackSubmissionEditResponse>(); List<FeedbackResponseAttributes> existingResponses = bundle.questionResponseBundle.get(questionAttributes); int responseIndx = 0; for(FeedbackResponseAttributes existingResponse : existingResponses) { List<String> recipientOptionsForQuestion = getRecipientOptionsForQuestion( questionAttributes.getId(), existingResponse.recipientEmail); String submissionFormHtml = questionAttributes.getQuestionDetails() <START> .getQuestionWithExistingResponseSubmissionFormHtml(isSessionOpenForSubmission(), <END> qnIndx, responseIndx, questionAttributes.courseId, existingResponse.getResponseDetails()); responses.add(new FeedbackSubmissionEditResponse(responseIndx, true, recipientOptionsForQuestion, submissionFormHtml, existingResponse.getId())); responseIndx++; } while (responseIndx < numOfResponseBoxes) { List<String> recipientOptionsForQuestion = getRecipientOptionsForQuestion(questionAttributes.getId(), null); String submissionFormHtml = questionAttributes.getQuestionDetails() .getQuestionWithoutExistingResponseSubmissionFormHtml(isSessionOpenForSubmission(), qnIndx, responseIndx, questionAttributes.courseId); responses.add(new FeedbackSubmissionEditResponse(responseIndx, false, recipientOptionsForQuestion, submissionFormHtml, "")); responseIndx++; } return responses; }</code><technical_language>isSessionOpenForSubmission below</technical_language>

Target:
private List<FeedbackSubmissionEditResponse> createResponses( FeedbackQuestionAttributes questionAttributes, int qnIndx, int numOfResponseBoxes) { List<FeedbackSubmissionEditResponse> responses = new ArrayList<FeedbackSubmissionEditResponse>(); List<FeedbackResponseAttributes> existingResponses = bundle.questionResponseBundle.get(questionAttributes); int responseIndx = 0; for(FeedbackResponseAttributes existingResponse : existingResponses) { List<String> recipientOptionsForQuestion = getRecipientOptionsForQuestion( questionAttributes.getId(), existingResponse.recipientEmail); String submissionFormHtml = questionAttributes.getQuestionDetails() .getQuestionWithExistingResponseSubmissionFormHtml(isSessionOpenForSubmission, qnIndx, responseIndx, questionAttributes.courseId, existingResponse.getResponseDetails()); responses.add(new FeedbackSubmissionEditResponse(responseIndx, true, recipientOptionsForQuestion, submissionFormHtml, existingResponse.getId())); responseIndx++; } while (responseIndx < numOfResponseBoxes) { List<String> recipientOptionsForQuestion = getRecipientOptionsForQuestion(questionAttributes.getId(), null); String submissionFormHtml = questionAttributes.getQuestionDetails() .getQuestionWithoutExistingResponseSubmissionFormHtml(isSessionOpenForSubmission, qnIndx, responseIndx, questionAttributes.courseId); responses.add(new FeedbackSubmissionEditResponse(responseIndx, false, recipientOptionsForQuestion, submissionFormHtml, "")); responseIndx++; } return responses; }
Source:
<code>public OutputWriter createOutputWriter() { List<String> headers = new ArrayList<String>(); for (int i = 0; i < columns.length; i++) { String columnName = getColumnHeader(i); headers.add(columnName); if (columnToBeSortedOn != null) { if (columns[i].equals(columnToBeSortedOn)) { _indexOfColumnToBeSortedOn = i; } } } if (columnToBeSortedOn != null) { if (_indexOfColumnToBeSortedOn == -1) { <START> this._isColumnToBeSortedOnPresentInInput = false; <END> _indexOfColumnToBeSortedOn = columns.length; headers.add(columnToBeSortedOn.getName()); InputColumn<?>[] newColumns = new InputColumn<?>[columns.length + 1]; for (int i = 0; i < columns.length; i++) { newColumns[i] = columns[i]; } newColumns[columns.length] = columnToBeSortedOn; columns = newColumns; } } if (_targetFile == null) { try { initTempFile(); } catch (Exception e) { throw new RuntimeException(e); } } return CsvOutputWriterFactory.getWriter(_targetFile.getPath(), headers.toArray(new String[0]), separatorChar, getSafeQuoteChar(), getSafeEscapeChar(), includeHeader, columns); }</code><technical_language>"this" is redundant underscore in name</technical_language>

Target:
public OutputWriter createOutputWriter() { List<String> headers = new ArrayList<String>(); for (int i = 0; i < columns.length; i++) { String columnName = getColumnHeader(i); headers.add(columnName); if (columnToBeSortedOn != null) { if (columns[i].equals(columnToBeSortedOn)) { _indexOfColumnToBeSortedOn = i; } } } if (columnToBeSortedOn != null) { if (_indexOfColumnToBeSortedOn == -1) { _isColumnToBeSortedOnPresentInInput = false; _indexOfColumnToBeSortedOn = columns.length; headers.add(columnToBeSortedOn.getName()); InputColumn<?>[] newColumns = new InputColumn<?>[columns.length + 1]; for (int i = 0; i < columns.length; i++) { newColumns[i] = columns[i]; } newColumns[columns.length] = columnToBeSortedOn; columns = newColumns; } } if (_targetFile == null) { try { initTempFile(); } catch (Exception e) { throw new RuntimeException(e); } } return CsvOutputWriterFactory.getWriter(_targetFile.getPath(), headers.toArray(new String[0]), separatorChar, getSafeQuoteChar(), getSafeEscapeChar(), includeHeader, columns); }
Source:
<code>public Map<String, String> getHeaders() throws AuthFailureError { <START> String clientId = ""; <END> Map<String, String> headers = new ArrayMap<>(1); headers.put("Authorization", "Client-ID " + clientId); return headers; }</code><technical_language>forgot this</technical_language>

Target:
public Map<String, String> getHeaders() throws AuthFailureError { String clientId = AwfulPreferences.getInstance().getResources().getString(R.string.imgur_api_client_id); Map<String, String> headers = new ArrayMap<>(1); headers.put("Authorization", "Client-ID " + clientId); return headers; }
Source:
<code>public static FolderItem toFolderItem( final org.uberfire.java.nio.file.Path path ) { if ( Files.isRegularFile( path ) ) { final org.uberfire.backend.vfs.Path p = Paths.convert( path ); return new FolderItem( p, p.getFileName(), FolderItemType.FILE, false, <START> Paths.readLockedBy( p ), null ); <END> } else if ( Files.isDirectory( path ) ) { final org.uberfire.backend.vfs.Path p = Paths.convert( path ); return new FolderItem( p, p.getFileName(), FolderItemType.FOLDER ); } return null; }</code><technical_language>is add a new constructor FolderItem class pass null in here</technical_language>

Target:
public static FolderItem toFolderItem( final org.uberfire.java.nio.file.Path path ) { if ( Files.isRegularFile( path ) ) { final org.uberfire.backend.vfs.Path p = Paths.convert( path ); return new FolderItem( p, p.getFileName(), FolderItemType.FILE, false, Paths.readLockedBy( p ), new ArrayList<String>( ) ); } else if ( Files.isDirectory( path ) ) { final org.uberfire.backend.vfs.Path p = Paths.convert( path ); return new FolderItem( p, p.getFileName(), FolderItemType.FOLDER ); } return null; }
Source:
<code>private <R extends PersistableBusinessObject> void writeResultsSummaryToReportByResultCode(List<RassBusinessObjectUpdateResult<R>> results, RassObjectUpdateResultCode resultCode, Class businessObjectClass) { <START> List<RassBusinessObjectUpdateResult<R>> filteresdResults = results.stream().filter(result -> resultCode.equals(result.getResultCode())) <END> .collect(Collectors.toList()); writeSummaryLineToReport(filteresdResults, resultCode, businessObjectClass); }</code><technical_language>Minor typo in variable name; changed "filteresdResults" "filteredResults"</technical_language>

Target:
private <R extends PersistableBusinessObject> void writeResultsSummaryToReportByResultCode(List<RassBusinessObjectUpdateResult<R>> results, RassObjectUpdateResultCode resultCode, Class businessObjectClass) { List<RassBusinessObjectUpdateResult<R>> filteredResults = results.stream().filter(result -> resultCode.equals(result.getResultCode())) .collect(Collectors.toList()); writeSummaryLineToReport(filteredResults, resultCode, businessObjectClass); }
Source:
<code><START> public ServerCapabilities getServerCapabilities() { <END> try { start(); if (this.initializeFuture != null) { this.initializeFuture.get(capabilitiesAlreadyRequested ? 0 : 1000, TimeUnit.MILLISECONDS); } } catch (TimeoutException e) { if (System.currentTimeMillis() - initializeStartTime > 10000) { LanguageServerPlugin.logError("LanguageServer not initialized after 10s", e); } } catch (IOException | InterruptedException | ExecutionException e) { LanguageServerPlugin.logError(e); } this.capabilitiesAlreadyRequested = true; if (this.initializeResult != null) { return this.initializeResult.getCapabilities(); } else { return null; } }</code><technical_language>refactored top of getInitializedServer()</technical_language>

Target:
public ServerCapabilities getServerCapabilities() { try { getInitializedServer().get(10, TimeUnit.SECONDS); } catch (TimeoutException e) { LanguageServerPlugin.logError("LanguageServer not initialized after 10s", e); } catch (InterruptedException | ExecutionException e) { LanguageServerPlugin.logError(e); } this.capabilitiesAlreadyRequested = true; if (this.initializeResult != null) { return this.initializeResult.getCapabilities(); } else { return null; } }
Source:
<code>public static void setUp() throws IOException, TimeoutException, InterruptedException, CommandFailedException { <START> administration.reloadIfRequired(); <END> client.apply(new DeployCommand.Builder(FILE_PATH + FILE_NAME) .name(NAME) .build()); }</code><technical_language>Is administration.reloadIfRequired() necessary deployment?. If I suggest calling this method deployment</technical_language>

Target:
public static void setUp() throws IOException, TimeoutException, InterruptedException, CommandFailedException { client.apply(new DeployCommand.Builder(XssScriptingTestCase.class.getClassLoader().getResource(FILE_NAME).getFile()) .name(NAME) .build()); }
Source:
<code>public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) { <START> if(DefaultDebugExecutor.EXECUTOR_ID.equals(executorId)) { <END> return false; } return DefaultRunExecutor.EXECUTOR_ID.equals(executorId) && profile instanceof GoApplicationConfiguration; }</code><technical_language>point? method is false for DefaultDebugExecutor.EXECUTOR_ID changes</technical_language>

Target:
public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) { return DefaultRunExecutor.EXECUTOR_ID.equals(executorId) && profile instanceof GoApplicationConfiguration; }
Source:
<code>public void handle(Patient patient, User originalVoidingUser, Date origParentVoidedDate, String unused) { if (patient.getId() != null) { EncounterService es = Context.getEncounterService(); EncounterSearchCriteria encounterSearchCriteria = new EncounterSearchCriteriaBuilder() .setPatient(patient) .setIncludeVoided(true) .createEncounterSearchCriteria(); List<Encounter> encounters = es.getEncounters(encounterSearchCriteria); if (CollectionUtils.isNotEmpty(encounters)) { for (Encounter encounter : encounters) { if (encounter.isVoided() && encounter.getDateVoided().equals(origParentVoidedDate) && encounter.getVoidedBy().equals(originalVoidingUser)) { es.unvoidEncounter(encounter); } } } OrderService os = Context.getOrderService(); List<Order> orders = os.getAllOrdersByPatient(patient); if (CollectionUtils.isNotEmpty(orders)) { for (Order order : orders) { if (order.isVoided() && order.getDateVoided().equals(origParentVoidedDate) && order.getVoidedBy().equals(originalVoidingUser)) { os.unvoidOrder(order); } } } CohortService cs = Context.getCohortService(); if (patient.getId() != null) { if (patient.getDateVoided().equals(origParentVoidedDate) && <START> patient.getVoidedBy().equals(originalVoidingUser)) { <END> cs.patientUnvoided(patient, originalVoidingUser, origParentVoidedDate, patient.getVoidReason()); } } } }</code><technical_language>This logic in patientUnvoided method</technical_language>

Target:
public void handle(Patient patient, User originalVoidingUser, Date origParentVoidedDate, String unused) { if (patient.getId() != null) { EncounterService es = Context.getEncounterService(); EncounterSearchCriteria encounterSearchCriteria = new EncounterSearchCriteriaBuilder() .setPatient(patient) .setIncludeVoided(true) .createEncounterSearchCriteria(); List<Encounter> encounters = es.getEncounters(encounterSearchCriteria); if (CollectionUtils.isNotEmpty(encounters)) { for (Encounter encounter : encounters) { if (encounter.getVoided() && encounter.getDateVoided().equals(origParentVoidedDate) && encounter.getVoidedBy().equals(originalVoidingUser)) { es.unvoidEncounter(encounter); } } } OrderService os = Context.getOrderService(); List<Order> orders = os.getAllOrdersByPatient(patient); if (CollectionUtils.isNotEmpty(orders)) { for (Order order : orders) { if (order.getVoided() && order.getDateVoided().equals(origParentVoidedDate) && order.getVoidedBy().equals(originalVoidingUser)) { os.unvoidOrder(order); } } } CohortService cs = Context.getCohortService(); cs.patientUnvoided(patient, originalVoidingUser, origParentVoidedDate); } }
Source:
<code>public void resumeOfflinePack(final String packName, final Promise promise) { mainHandler.post(new Runnable() { @Override public void run() { OfflineRegionProgressObserver foundObserver = null; <START> for (OfflineRegionProgressObserver observer : offlinePackObservers) { <END> if (packName.equals(observer.name)) { foundObserver = observer; break; } } if (foundObserver == null) { promise.resolve(Arguments.createMap()); return; } foundObserver.region.setDownloadState(OfflineRegion.STATE_ACTIVE); final OfflineRegionProgressObserver _foundObserver = foundObserver; foundObserver.region.getStatus(new OfflineRegion.OfflineRegionStatusCallback() { @Override public void onStatus(OfflineRegionStatus status) { _foundObserver.onStatusChanged(status); WritableMap result = Arguments.createMap(); result.putString("resumed", _foundObserver.name); promise.resolve(result); } @Override public void onError(String error) { Log.e(context.getApplicationContext().getPackageName(), error); promise.reject(new JSApplicationIllegalArgumentException(error)); } }); } }); }</code><technical_language>break out finding observer method private OfflineRegionProgressObserver getObserver(String name) initialize variable final OfflineRegionProgressObserver foundObserver instead of initialize foundObserver _foundObserver. reducing code</technical_language>

Target:
public void resumeOfflinePack(final String packName, final Promise promise) { mainHandler.post(new Runnable() { @Override public void run() { final OfflineRegionProgressObserver foundObserver = getObserver(packName); if (foundObserver == null) { promise.resolve(Arguments.createMap()); return; } foundObserver.region.setDownloadState(OfflineRegion.STATE_ACTIVE); foundObserver.region.getStatus(new OfflineRegion.OfflineRegionStatusCallback() { @Override public void onStatus(OfflineRegionStatus status) { foundObserver.onStatusChanged(status); WritableMap result = Arguments.createMap(); result.putString("resumed", foundObserver.name); promise.resolve(result); } @Override public void onError(String error) { Log.e(context.getApplicationContext().getPackageName(), error); promise.reject(new JSApplicationIllegalArgumentException(error)); } }); } }); }
Source:
<code><START> protected String getPluginName(final InputStream manifest) throws IOException { <END> Properties properties = new Properties(); try (BufferedInputStream stream = new BufferedInputStream(manifest)) { properties.load(stream); } String property = properties.getProperty("Bundle-SymbolicName"); if (property == null) { return null; } if (property.contains(";")) { return property.substring(0, property.indexOf(';')).trim(); } return property.trim(); }</code><technical_language>Optional<String></technical_language>

Target:
protected Optional<String> getPluginName(final InputStream manifest) throws IOException { Properties properties = new Properties(); try (BufferedInputStream stream = new BufferedInputStream(manifest)) { properties.load(stream); } String property = properties.getProperty("Bundle-SymbolicName"); if (property == null) { return Optional.empty(); } if (property.contains(";")) { return Optional.of(property.substring(0, property.indexOf(';')).trim()); } return Optional.of(property.trim()); }
Source:
<code>public Set<String> getUniqueUsersWithTokenCache() { Iterator<TokenCacheItem> results = this.getAll(); <START> Set<String> users = new HashSet<>(); <END> while (results.hasNext()) { final TokenCacheItem tokenCacheItem = results.next(); if (tokenCacheItem.getUserInfo() != null && !users.contains(tokenCacheItem.getUserInfo().getUserId())) { users.add(tokenCacheItem.getUserInfo().getUserId()); } } return users; }</code><technical_language>final</technical_language>

Target:
public Set<String> getUniqueUsersWithTokenCache() { Iterator<TokenCacheItem> results = this.getAll(); final Set<String> users = new HashSet<>(); while (results.hasNext()) { final TokenCacheItem tokenCacheItem = results.next(); if (tokenCacheItem.getUserInfo() != null && !users.contains(tokenCacheItem.getUserInfo().getUserId())) { users.add(tokenCacheItem.getUserInfo().getUserId()); } } return users; }
Source:
<code>@Override protected Ignite startGrid(String igniteInstanceName, IgniteConfiguration cfg, GridSpringResourceContext ctx) throws Exception { final Ignite ignite; if (locJvmInstance == null && rmJvmInstance != null) { final UUID syncId = ((IgniteProcessProxy)rmJvmInstance).getId(); final UUID nodeId = cfg.getNodeId(); ignite = super.startGrid(igniteInstanceName, cfg, ctx); assert ignite.configuration().getNodeId() == nodeId : "Started node has unexpected node id."; assert GridTestUtils.waitForCondition(new GridAbsPredicate() { @Override public boolean apply() { <START> return ignite.cluster().node(syncId) != null; <END> } }, NODE_JOIN_TIMEOUT) : "Node has not joined [id=" + nodeId + "]"; } else ignite = super.startGrid(igniteInstanceName, cfg, ctx); if (locJvmInstance == null && !isRemoteJvm(igniteInstanceName)) locJvmInstance = ignite; return ignite; }</code><technical_language>add awaitPartitionMapExchange()</technical_language>

Target:
@Override protected Ignite startGrid(String igniteInstanceName, IgniteConfiguration cfg, GridSpringResourceContext ctx) throws Exception { final Ignite ignite; if (locJvmInstance == null && rmJvmInstance != null) { final UUID nodeId = cfg.getNodeId(); final UUID syncNodeId = ((IgniteProcessProxy)rmJvmInstance).getId(); ignite = super.startGrid(igniteInstanceName, cfg, ctx); assert ignite.configuration().getNodeId() == nodeId : "Started node has unexpected node id."; assert ignite.cluster().node(syncNodeId) != null : "Node has not joined [id=" + nodeId + "]"; } else ignite = super.startGrid(igniteInstanceName, cfg, ctx); if (locJvmInstance == null && !isRemoteJvm(igniteInstanceName)) locJvmInstance = ignite; return ignite; }
Source:
<code>private void checkRequiresCapability() throws RequireCapabilityException { RequiresCapability rc = getClass().getAnnotation(RequiresCapability.class); if (rc != null) { CurrentUser user = currentUser.get(); CapabilityControl ctl = user.getCapabilities(); if (!ctl.canPerform(rc.value()) && !ctl.canAdministrateServer()) { String fallbackUserId; <START> if(user instanceof IdentifiedUser) { <END> fallbackUserId = ((IdentifiedUser)user).getNameEmail(); } else { fallbackUserId = user.toString(); } String msg = String.format("fatal: %s does not have \"%s\" capability.", Objects.firstNonNull(user.getUserName(), fallbackUserId), rc.value()); throw new RequireCapabilityException(msg); } } }</code><technical_language>nit: space if</technical_language>

Target:
private void checkRequiresCapability() throws RequireCapabilityException { RequiresCapability rc = getClass().getAnnotation(RequiresCapability.class); if (rc != null) { CurrentUser user = currentUser.get(); CapabilityControl ctl = user.getCapabilities(); if (!ctl.canPerform(rc.value()) && !ctl.canAdministrateServer()) { String msg = String.format( "fatal: %s does not have \"%s\" capability.", Objects.firstNonNull( user.getUserName(), user instanceof IdentifiedUser ? ((IdentifiedUser) user).getNameEmail() : user.toString()), rc.value()); throw new RequireCapabilityException(msg); } } }
Source:
<code>public void whenClientErrorResponseThenGetProjectFeatureFlagsShouldThrow() throws Exception { <START> when(restTemplate.getForObject(PROJECT_FEATURE_FLAGS_URI_PATTERN, ProjectFeatureFlags.class, PROJECT_ID)) <END> .thenThrow(new RestClientException("")); service.listProjectFeatureFlags(project); }</code><technical_language>missing matches()</technical_language>

Target:
public void whenClientErrorResponseThenGetProjectFeatureFlagsShouldThrow() throws Exception { when(restTemplate.getForObject(new URI(PROJECT_FEATURE_FLAGS_URI), ProjectFeatureFlags.class)) .thenThrow(new RestClientException("")); service.listProjectFeatureFlags(project); }
Source:
<code>public Set<Integer> getPartitionGroupPeersContainHighestPid() { Set<Integer> peers = Sets.newHashSet(); int hPid = getPartitionCount() -1; Collection<Integer> hHostIds = getHostIdList(hPid); if (hHostIds == null) { return peers; } int hHostId = hHostIds.iterator().next(); assert hostsById.get(hHostId) != null; <START> for (Partition p : hostsById.get(hHostId).partitions) { <END> peers.addAll(p.hostIds); } return peers; }</code><technical_language>This replaced return getPartitionGroupPeers(hHostId);</technical_language>

Target:
public Set<Integer> getPartitionGroupPeersContainHighestPid() { int hPid = getPartitionCount() -1; Collection<Integer> hHostIds = getHostIdList(hPid); if (hHostIds == null || hHostIds.isEmpty()) { return Collections.emptySet(); } int hHostId = hHostIds.iterator().next(); return getPartitionGroupPeers(hHostId); }
Source:
<code>BookKeeper() { conf = new ClientConfiguration(); <START> internalConf = ClientInternalConf.defaultValues(); <END> statsLogger = NullStatsLogger.INSTANCE; clientStats = BookKeeperClientStats.newInstance(statsLogger); scheduler = null; requestTimer = null; metadataDriver = null; placementPolicy = null; ownTimer = false; mainWorkerPool = null; ledgerManagerFactory = null; ledgerManager = null; ledgerIdGenerator = null; featureProvider = null; eventLoopGroup = null; bookieWatcher = null; bookieInfoScheduler = null; bookieClient = null; }</code><technical_language>construct a default conf already, call defaultValues. internalConf = ClientInternalConf.fromConfig(conf)</technical_language>

Target:
BookKeeper() { conf = new ClientConfiguration(); internalConf = ClientInternalConf.fromConfig(conf); statsLogger = NullStatsLogger.INSTANCE; clientStats = BookKeeperClientStats.newInstance(statsLogger); scheduler = null; requestTimer = null; metadataDriver = null; placementPolicy = null; ownTimer = false; mainWorkerPool = null; ledgerManagerFactory = null; ledgerManager = null; ledgerIdGenerator = null; featureProvider = null; eventLoopGroup = null; bookieWatcher = null; bookieInfoScheduler = null; bookieClient = null; }
Source:
<code><START> public LinkPreviewContents(@NonNull Page page) { <END> title = page.getTitle(); NodeList elements = getXmlChildren(page.getSections().get(0).getContent()); if (elements == null) { extract = ""; return; } String firstSection = ""; for (int i = 0; i < elements.getLength(); i++) { if (elements.item(i).getNodeName().equalsIgnoreCase("p")) { firstSection += elements.item(i).getTextContent() + " "; } } firstSection = Html.fromHtml(firstSection).toString(); firstSection = firstSection.replaceAll("\\[\\d+\\]", ""); extract = makeStringFromSentences(getSentences(removeParens(firstSection), title.getSite()), EXTRACT_MAX_SENTENCES); }</code><technical_language>This is pretty neat. I this code more easier test in a separate class responsibility is convert Pages previews</technical_language>

Target:
public LinkPreviewContents(@NonNull Page page) { title = page.getTitle(); PageExtract pageExtract = new PageExtract(page); extract = makeStringFromSentences(getSentences(removeParens(pageExtract.getText()), title.getSite()), EXTRACT_MAX_SENTENCES); }
Source:
<code>protected void init(NodeMainExecutor nodeMainExecutor) { talker = new Talker(); <START> String host = InetAddressFactory.newNonLoopback().getHostName(); <END> NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic(host, getMasterUri()); nodeMainExecutor.execute(talker, nodeConfiguration); nodeMainExecutor.execute(rosTextView, nodeConfiguration); }</code><technical_language>This getHostAddress() instead</technical_language>

Target:
protected void init(NodeMainExecutor nodeMainExecutor) { talker = new Talker(); String host = InetAddressFactory.newNonLoopback().getHostAddress(); NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic(host, getMasterUri()); nodeMainExecutor.execute(talker, nodeConfiguration); nodeMainExecutor.execute(rosTextView, nodeConfiguration); }
Source:
<code>public NoteJobInfo(Note note) { boolean isNoteRunning = false; long lastRunningUnixTime = 0; this.noteId = note.getId(); this.noteName = note.getName(); if (note.getConfig().containsKey("cron") && !note.getConfig() <START> .get("cron").equals("")) { <END> this.noteType = "cron"; } else { this.noteType = "normal"; } this.interpreter = note.getDefaultInterpreterGroup(); this.paragraphs = new ArrayList<>(); for (Paragraph paragraph : note.getParagraphs()) { if (paragraph.getStatus().isRunning()) { isNoteRunning = true; } ParagraphJobInfo paragraphItem = new ParagraphJobInfo(paragraph); lastRunningUnixTime = getUnixTimeLastRunParagraph(paragraph); paragraphs.add(paragraphItem); } this.isRunningJob = isNoteRunning; this.unixTimeLastRun = lastRunningUnixTime; }</code><technical_language>consider adding a helper perhaps? check for get("cron") is whitespace only</technical_language>

Target:
public NoteJobInfo(Note note) { boolean isNoteRunning = false; long lastRunningUnixTime = 0; this.noteId = note.getId(); this.noteName = note.getName(); if (isCron(note)) { this.noteType = "cron"; } else { this.noteType = "normal"; } this.interpreter = note.getDefaultInterpreterGroup(); this.paragraphs = new ArrayList<>(); for (Paragraph paragraph : note.getParagraphs()) { if (paragraph.getStatus().isRunning()) { isNoteRunning = true; } ParagraphJobInfo paragraphItem = new ParagraphJobInfo(paragraph); lastRunningUnixTime = getUnixTimeLastRunParagraph(paragraph); paragraphs.add(paragraphItem); } this.isRunningJob = isNoteRunning; this.unixTimeLastRun = lastRunningUnixTime; }
Source:
<code>public void alertsWithoutJSessionidInOptions() throws HttpMalformedHeaderException, URIException { String testURI = "<LINK_0>;JSESSIONID=asdfasdfasdf1234?foo=bar"; HttpMessage msg = createHttpMessageWithRespBody(BODY); msg.getRequestHeader().setURI(new URI(testURI, false)); OptionsParam options = Model.getSingleton().getOptionsParam(); HttpSessionsParam sessionOptions = options.getParamSet(HttpSessionsParam.class); <START> if (sessionOptions != null) { <END> sessionOptions.setDefaultTokens(Collections.emptyList()); } else { sessionOptions = new HttpSessionsParam(); sessionOptions.setDefaultTokens(Collections.emptyList()); options.addParamSet(sessionOptions); } rule.scanHttpResponseReceive(msg, -1, new Source(BODY)); assertEquals(1, alertsRaised.size()); }</code><technical_language>This null check removed, non-null</technical_language>

Target:
public void alertsWithoutJSessionidInOptions() throws HttpMalformedHeaderException, URIException { String testURI = "<LINK_0>;JSESSIONID=asdfasdfasdf1234?foo=bar"; HttpMessage msg = createHttpMessageWithRespBody(BODY); msg.getRequestHeader().setURI(new URI(testURI, false)); OptionsParam options = Model.getSingleton().getOptionsParam(); HttpSessionsParam sessionOptions = options.getParamSet(HttpSessionsParam.class); sessionOptions.setDefaultTokens(Collections.emptyList()); rule.scanHttpResponseReceive(msg, -1, new Source(BODY)); assertEquals(1, alertsRaised.size()); }
Source:
<code>private String getZkConnectionInfo() { String zkConnectionInfo; if (_zkAddress == null) { if (_helixManagerProperty != null && _helixManagerProperty.getZkConnectionConfig() != null) { zkConnectionInfo = _helixManagerProperty.getZkConnectionConfig().toString(); } else { <START> zkConnectionInfo = "ZkAddr and ZkConnectionConfig are null!"; <END> } } else { zkConnectionInfo = _zkAddress; } return zkConnectionInfo; }</code><technical_language>nit, I return "None" is enough. otherwise, log string strange</technical_language>

Target:
private String getZkConnectionInfo() { String zkConnectionInfo; if (_zkAddress == null) { if (_helixManagerProperty != null && _helixManagerProperty.getZkConnectionConfig() != null) { zkConnectionInfo = _helixManagerProperty.getZkConnectionConfig().toString(); } else { zkConnectionInfo = "None"; } } else { zkConnectionInfo = _zkAddress; } return zkConnectionInfo; }
Source:
<code>private void adminUnitMove(PID sourcePid, ContentObject moveObj) { <START> HashMap<String, String> destContainerInfo = getContainerInfo(destinationPid, 1); <END> String destAdminUnit = destContainerInfo.get("adminUnit"); HashMap<String, String> currentContainerInfo = getContainerInfo(sourcePid, 2); String currentAdminUnit = currentContainerInfo.get("adminUnit"); if (currentAdminUnit != null && destAdminUnit != null && !currentAdminUnit.equals(destAdminUnit)) { moveObj.getPremisLog().buildEvent(Premis.MetadataModification) .addAuthorizingAgent(agent.getUsername()) .addEventDetail("Object moved from source {0} ({1}) in Admin Unit {2} ({3}) " + "to destination {4} ({5}) in Admin Unit {6} ({7})", currentContainerInfo.get("container"), currentContainerInfo.get("containerTitle"), currentAdminUnit, currentContainerInfo.get("adminUnitTitle"), destContainerInfo.get("container"), destContainerInfo.get("containerTitle"), destAdminUnit, destContainerInfo.get("adminUnitTitle")) .writeAndClose(); } }</code><technical_language>suggestion Map<String, String> destContainerInfo = getContainerInfo(destinationPid, 1); interface implementation</technical_language>

Target:
private void adminUnitMove(PID sourcePid, ContentObject moveObj) { Map<String, String> destContainerInfo = getContainerInfo(destinationPid, 1); String destAdminUnit = destContainerInfo.get("adminUnit"); Map<String, String> currentContainerInfo = getContainerInfo(sourcePid, 2); String currentAdminUnit = currentContainerInfo.get("adminUnit"); if (currentAdminUnit != null && destAdminUnit != null && !currentAdminUnit.equals(destAdminUnit)) { moveObj.getPremisLog().buildEvent(Premis.MetadataModification) .addAuthorizingAgent(agent.getUsername()) .addEventDetail("Object moved from source {0} ({1}) in Admin Unit {2} ({3}) " + "to destination {4} ({5}) in Admin Unit {6} ({7})", currentContainerInfo.get("container"), currentContainerInfo.get("containerTitle"), currentAdminUnit, currentContainerInfo.get("adminUnitTitle"), destContainerInfo.get("container"), destContainerInfo.get("containerTitle"), destAdminUnit, destContainerInfo.get("adminUnitTitle")) .writeAndClose(); } }