auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void showExportSuccessDialog(final String path, final Uri streamUri) { <START> new AlertDialog.Builder(getContext()) <END> .setNeutralButton(android.R.string.ok, (dialog, which) -> dialog.dismiss()) .setTitle(R.string.export_success_title) .setMessage(getContext().getString(R.string.export_success_sum, path)) .setPositiveButton(R.string.send_label, (dialog, which) -> { Intent sendIntent = new Intent(Intent.ACTION_SEND) .putExtra(Intent.EXTRA_SUBJECT, getString(R.string.opml_export_label)) .putExtra(Intent.EXTRA_STREAM, streamUri) .setType("text/plain") .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) { List<ResolveInfo> resInfoList = getContext().getPackageManager().queryIntentActivities( sendIntent, PackageManager.MATCH_DEFAULT_ONLY); for (ResolveInfo resolveInfo : resInfoList) { String packageName = resolveInfo.activityInfo.packageName; getContext().grantUriPermission( packageName, streamUri, Intent.FLAG_GRANT_READ_URI_PERMISSION); } } getContext().startActivity(Intent.createChooser(sendIntent, getString(R.string.send_label))); }) .create() .show(); }</code><technical_language>In this case, I find easier read original version. needs indentation shows more belongs together</technical_language>

Target:
private void showExportSuccessDialog(final String path, final Uri streamUri) { final AlertDialog.Builder alert = new AlertDialog.Builder(getContext()); alert.setNeutralButton(android.R.string.ok, (dialog, which) -> dialog.dismiss()); alert.setTitle(R.string.export_success_title); alert.setMessage(getString(R.string.export_success_sum, path)); alert.setPositiveButton(R.string.send_label, (dialog, which) -> { Intent sendIntent = new Intent(Intent.ACTION_SEND) .putExtra(Intent.EXTRA_SUBJECT, getString(R.string.opml_export_label)) .putExtra(Intent.EXTRA_STREAM, streamUri) .setType("text/plain") .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) { List<ResolveInfo> resInfoList = getContext().getPackageManager() .queryIntentActivities(sendIntent, PackageManager.MATCH_DEFAULT_ONLY); for (ResolveInfo resolveInfo : resInfoList) { String packageName = resolveInfo.activityInfo.packageName; getContext().grantUriPermission(packageName, streamUri, Intent.FLAG_GRANT_READ_URI_PERMISSION); } } startActivity(Intent.createChooser(sendIntent, getString(R.string.send_label))); }); alert.create().show(); }
Source:
<code>static void checkLength(String stringToValidate, String jobParametersName) throws JobParametersInvalidException { <START> if(stringToValidate.length()>=250){ <END> throw new JobParametersInvalidException( String.format("%s in %s can't exceed 250 characters", stringToValidate, jobParametersName)); } }</code><technical_language>White-spaces missing, please reformat</technical_language>

Target:
static void checkLength(String stringToValidate, String jobParametersName) throws JobParametersInvalidException { if (stringToValidate.length() >= 250) { throw new JobParametersInvalidException( String.format("%s in %s can't exceed 250 characters", stringToValidate, jobParametersName)); } if (stringToValidate.trim().length() == 0) { throw new JobParametersInvalidException( String.format("%s in %s must be specified", stringToValidate, jobParametersName)); } }
Source:
<code>private List<ChannelTypeDTO> convertToChannelTypeDTOs(List<ChannelType> channelTypes, Locale locale) { <START> List<ChannelTypeDTO> channelTypeDTOs = new ArrayList<>(); <END> for (ChannelType channelType : channelTypes) { channelTypeDTOs.add(convertToChannelTypeDTO(channelType, locale)); } return channelTypeDTOs; }</code><technical_language>is uniqueness of channelTypes guaranteed? HashSet removed duplicates</technical_language>

Target:
private List<ChannelTypeDTO> convertToChannelTypeDTOs(List<ChannelType> channelTypes, Locale locale) { List<ChannelTypeDTO> channelTypeDTOs = new ArrayList<>(channelTypes.size()); for (ChannelType channelType : channelTypes) { channelTypeDTOs.add(convertToChannelTypeDTO(channelType, locale)); } return channelTypeDTOs; }
Source:
<code>public void setIsSender(boolean isSender) { final int color; if (isSender) { <START> color = ContextCompat.getColor(itemView.getContext(), R.color.material_green_300); <END> mLeftArrow.setVisibility(View.GONE); mRightArrow.setVisibility(View.VISIBLE); mMessageContainer.setGravity(Gravity.END); } else { color = ContextCompat.getColor(itemView.getContext(), R.color.material_gray_300); mLeftArrow.setVisibility(View.VISIBLE); mRightArrow.setVisibility(View.GONE); mMessageContainer.setGravity(Gravity.START); } ((GradientDrawable) mMessage.getBackground()).setColor(color); ((RotateDrawable) mLeftArrow.getBackground()).getDrawable() .setColorFilter(color, PorterDuff.Mode.SRC); ((RotateDrawable) mRightArrow.getBackground()).getDrawable() .setColorFilter(color, PorterDuff.Mode.SRC); }</code><technical_language>While feeling cache-y, cache colors ViewHolder creation (or a higher level)</technical_language>

Target:
public void setIsSender(boolean isSender) { final int color; if (isSender) { color = mGreen300; mLeftArrow.setVisibility(View.GONE); mRightArrow.setVisibility(View.VISIBLE); mMessageContainer.setGravity(Gravity.END); } else { color = mGray300; mLeftArrow.setVisibility(View.VISIBLE); mRightArrow.setVisibility(View.GONE); mMessageContainer.setGravity(Gravity.START); } ((GradientDrawable) mMessage.getBackground()).setColor(color); ((RotateDrawable) mLeftArrow.getBackground()).getDrawable() .setColorFilter(color, PorterDuff.Mode.SRC); ((RotateDrawable) mRightArrow.getBackground()).getDrawable() .setColorFilter(color, PorterDuff.Mode.SRC); }
Source:
<code>public void returnFalseForIsConnectedWhenNetworkConnectionIsUnavailable() { when(mockConnectivityManager.getActiveNetworkInfo()).thenReturn(mockNetworkInfo); when(mockNetworkInfo.isConnected()).thenReturn(false); <START> Assert.assertFalse(merlinsBeard.isConnected()); <END> }</code><technical_language>prefer Fest, watched this test fail? stacktrace is 100% unhelpful</technical_language>

Target:
public void returnFalseForIsConnectedWhenNetworkConnectionIsUnavailable() { when(mockConnectivityManager.getActiveNetworkInfo()).thenReturn(mockNetworkInfo); when(mockNetworkInfo.isConnected()).thenReturn(false); assertThat(merlinsBeard.isConnected()).isFalse(); }
Source:
<code>private boolean isMasterDomain(StorageDomain domain) { <START> return domain.getStorageDomainType() == StorageDomainType.Master && domain.getStatus() != null <END> && domain.getStatus() == StorageDomainStatus.Active; }</code><technical_language>if status is Active, definition null - please remove this redundant check</technical_language>

Target:
private boolean isMasterDomain(StorageDomain domain) { return domain.getStorageDomainType() == StorageDomainType.Master && domain.getStatus() == StorageDomainStatus.Active; }
Source:
<code>public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); <START> if (mIsCreate && mDevice != null) { <END> outState.putSerializable("device", mDevice); } }</code><technical_language>This needed (you store null, cares if save/restore a device replace in #onApiChange?)</technical_language>

Target:
public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable("device", mDevice); }
Source:
<code>private void navigateToUrl(String url) { if (url.startsWith("www.")) url = "http://" + url; Pattern reWebLink = Pattern.create("^https?://"); if (reWebLink.test(url)) { globalDisplay_.openWindow(url); return; } Pattern reSrcRef = Pattern.create("@[^#]+#\\d+"); if (reSrcRef.test(url)) return; final String finalUrl = url; server_.stat(finalUrl, new ServerRequestCallback<FileSystemItem>() { @Override public void onResponseReceived(FileSystemItem file) { if (file == null || !file.exists()) { <START> globalDisplay_.showWarningBar(false, "No file at path '" + finalUrl + "'."); <END> return; } FileType fileType = fileTypeRegistry_.getTypeForFile(file); if (fileType != null && fileType instanceof EditableFileType) { fileType.openFile(file, null, NavigationMethods.DEFAULT, events_); } else { events_.fireEvent(new OpenFileInBrowserEvent(file)); } } @Override public void onError(ServerError error) { Debug.logError(error); } }); }</code><technical_language>If want bar top of source pane, TextEditingTarget.Display, a warning bar is local editor</technical_language>

Target:
private void navigateToUrl(String url) { if (url.startsWith("www.")) url = "http://" + url; Pattern reWebLink = Pattern.create("^https?://"); if (reWebLink.test(url)) { globalDisplay_.openWindow(url); return; } Pattern reSrcRef = Pattern.create("@[^#]+#\\d+"); if (reSrcRef.test(url)) return; final String finalUrl = url; server_.stat(finalUrl, new ServerRequestCallback<FileSystemItem>() { @Override public void onResponseReceived(FileSystemItem file) { if (file == null || !file.exists()) { String message = "No file at path '" + finalUrl + "'."; String caption = "Error navigating to file"; globalDisplay_.showErrorMessage(caption, message); return; } FileType fileType = fileTypeRegistry_.getTypeForFile(file); if (fileType != null && fileType instanceof EditableFileType) { fileType.openFile(file, null, NavigationMethods.DEFAULT, events_); } else { events_.fireEvent(new OpenFileInBrowserEvent(file)); } } @Override public void onError(ServerError error) { Debug.logError(error); } }); }
Source:
<code>public <T, E1 extends Exception, E2 extends Exception> T transaction(TransactionActionWithExceptions<T, D, E1, E2> action, Class<E1> exClass1, Class<E2> exClass2) throws E1, E2 { try { return transactionRetryExecutor.runInterruptible(() -> { try (Handle handle = dbi.open()) { handle.begin(); T retval; try { retval = action.call(handle, handle.attach(daoIface)); } catch (Exception ex) { try { handle.rollback(); } catch (Exception rollback) { ex.addSuppressed(rollback); } Throwables.propagateIfInstanceOf(ex, exClass1); Throwables.propagateIfInstanceOf(ex, exClass2); Throwables.propagateIfPossible(ex); throw new TransactionFailedException( <START> "Transaction failed do to exception being thrown " + <END> "from within the callback. See cause " + "for the original exception.", ex); } validateTransactionAndCommit(handle); return retval; } }); } catch (RetryGiveupException ex) { Throwable innerException = ex.getCause(); Throwables.propagateIfInstanceOf(innerException, exClass1); Throwables.propagateIfInstanceOf(innerException, exClass2); throw Throwables.propagate(innerException); } catch (InterruptedException ex) { throw Throwables.propagate(ex); } }</code><technical_language>s/do/due</technical_language>

Target:
public <T, E1 extends Exception, E2 extends Exception> T transaction(TransactionActionWithExceptions<T, D, E1, E2> action, Class<E1> exClass1, Class<E2> exClass2) throws E1, E2 { try { return transactionRetryExecutor.runInterruptible(() -> { try (Handle handle = dbi.open()) { handle.begin(); T retval; try { retval = action.call(handle, handle.attach(daoIface)); } catch (Exception ex) { try { handle.rollback(); } catch (Exception rollback) { ex.addSuppressed(rollback); } Throwables.propagateIfInstanceOf(ex, exClass1); Throwables.propagateIfInstanceOf(ex, exClass2); Throwables.propagateIfPossible(ex); throw new TransactionFailedException( "Transaction failed due to exception being thrown " + "from within the callback. See cause " + "for the original exception.", ex); } validateTransactionAndCommit(handle); return retval; } }); } catch (RetryGiveupException ex) { Throwable innerException = ex.getCause(); Throwables.propagateIfInstanceOf(innerException, exClass1); Throwables.propagateIfInstanceOf(innerException, exClass2); throw Throwables.propagate(innerException); } catch (InterruptedException ex) { throw Throwables.propagate(ex); } }
Source:
<code>public String getLatestRevisionLocation() { <START> return new String(req.getContextPath() + Prefix.XREF_P + <END> path + "?r=" + getLatestRevision()); }</code><technical_language>StringBuilder append please</technical_language>

Target:
public String getLatestRevisionLocation() { StringBuilder sb = new StringBuilder(); sb.append(req.getContextPath()); sb.append(Prefix.XREF_P); sb.append(path); sb.append("?r="); sb.append(Util.URIEncode(getLatestRevision())); return sb.toString(); }
Source:
<code>private void makePrivate(String noteId, AuthenticationInfo subject) { <START> if (subject != null && !"anonymous".equals(subject.getUser())) { <END> NotebookAuthorization notebookAuthorization = NotebookAuthorization.getInstance(); Set<String> users = notebookAuthorization.getOwners(noteId); users.add(subject.getUser()); notebookAuthorization.setOwners(noteId, users); users = notebookAuthorization.getReaders(noteId); users.add(subject.getUser()); notebookAuthorization.setReaders(noteId, users); users = notebookAuthorization.getWriters(noteId); users.add(subject.getUser()); notebookAuthorization.setWriters(noteId, users); } }</code><technical_language>creating in AuthenticationInfo a new method called isAnonymous(AuthenticationInfo subject) move check inside? // In AuthenticationInfo.java private static final String ANONYMOUS = "anonymous"; public static boolean isAnonymous(AuthenticationInfo subject) { if (subject != null ) { LOG.info("Subject is null assuming anonymous"); return true; } return ANONYMOUS.equals(subject.getUser(); } //for fun public boolean isAnonymous() { return ANONYMOUS.equals(user); } //then do this in makePrivate if (AuthenticationInfo.isAnonymous(subject)) { // Add meaningful log :) return; } NotebookAuthorization notebookAuthorization = NotebookAuthorization.getInstance(); Set<String> users = notebookAuthorization.getOwners(noteId); users.add(subject.getUser()); notebookAuthorization.setOwners(noteId, users); users = notebookAuthorization.getReaders(noteId); users.add(subject.getUser()); notebookAuthorization.setReaders(noteId, users); users = notebookAuthorization.getWriters(noteId); users.add(subject.getUser()); notebookAuthorization.setWriters(noteId, users);</technical_language>

Target:
private void makePrivate(String noteId, AuthenticationInfo subject) { if (AuthenticationInfo.isAnonymous(subject)) { LOG.info("User is anonymous, permissions are not set for pulled notes"); return; } NotebookAuthorization notebookAuthorization = NotebookAuthorization.getInstance(); Set<String> users = notebookAuthorization.getOwners(noteId); users.add(subject.getUser()); notebookAuthorization.setOwners(noteId, users); users = notebookAuthorization.getReaders(noteId); users.add(subject.getUser()); notebookAuthorization.setReaders(noteId, users); users = notebookAuthorization.getWriters(noteId); users.add(subject.getUser()); notebookAuthorization.setWriters(noteId, users); }
Source:
<code>BundleDescription[] getFragments(final BundleDescription host) { final List<BundleDescription> fragments = new ArrayList<>(); synchronized (this.monitor) { for (Iterator<BundleDescription> iter = bundleDescriptions.values().iterator(); iter.hasNext();) { BundleDescription bundle = iter.next(); HostSpecification hostSpec = bundle.getHost(); if (hostSpec != null) { BundleDescription[] hosts = hostSpec.getHosts(); if (hosts != null) for (BundleDescription <START> host1 : <END> hosts) { if (host1 == host) { fragments.add(bundle); break; } } } } } return fragments.toArray(new BundleDescription[fragments.size()]); }</code><technical_language>rename hostCandidate</technical_language>

Target:
BundleDescription[] getFragments(final BundleDescription host) { final List<BundleDescription> fragments = new ArrayList<>(); synchronized (this.monitor) { for (Iterator<BundleDescription> iter = bundleDescriptions.values().iterator(); iter.hasNext();) { BundleDescription bundle = iter.next(); HostSpecification hostSpec = bundle.getHost(); if (hostSpec != null) { BundleDescription[] hosts = hostSpec.getHosts(); if (hosts != null) for (BundleDescription hostCandidate : hosts) { if (hostCandidate == host) { fragments.add(bundle); break; } } } } } return fragments.toArray(new BundleDescription[fragments.size()]); }
Source:
<code>public String getFieldType() { <START> return fieldType; <END> }</code><technical_language>convert a RegistrationFieldType this code work nice enum instead of strings. simplify activity code</technical_language>

Target:
public RegistrationFieldType getFieldType() { return fieldType; }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof VmNetworkInterface)) { return false; } VmNetworkInterface other = (VmNetworkInterface) obj; <START> if (!ObjectUtils.objectsEqual(getNetworkName(), other.getNetworkName())) { <END> return false; } if (!ObjectUtils.objectsEqual(getVnicProfileName(), other.getVnicProfileName())) { return false; } if (isPortMirroring() != other.isPortMirroring()) { return false; } if (!ObjectUtils.objectsEqual(getVmName(), other.getVmName())) { return false; } if (isPlugged() != other.isPlugged()) { return false; } if (!ObjectUtils.objectsEqual(getQosName(), other.getNetworkName())) { return false; } return true; }</code><technical_language>thanks for this fix, this bug fix a separate patch is related this commit</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof VmNetworkInterface)) { return false; } VmNetworkInterface other = (VmNetworkInterface) obj; if (!ObjectUtils.objectsEqual(other.getNetworkName(), other.getNetworkName())) { return false; } if (!ObjectUtils.objectsEqual(other.getVnicProfileName(), other.getVnicProfileName())) { return false; } if (isPortMirroring() != other.isPortMirroring()) { return false; } if (!ObjectUtils.objectsEqual(other.getVmName(), other.getVmName())) { return false; } if (isPlugged() != other.isPlugged()) { return false; } if (!ObjectUtils.objectsEqual(getQosName(), other.getQosName())) { return false; } return true; }
Source:
<code>public void listSettingRevisionsContext() { ConfigurationClient configurationClient = createSyncConfigurationClient(); SettingSelector settingSelector = new SettingSelector().keys("prodDBConnection"); Context ctx = new Context(key2, value2); PagedIterable<ConfigurationSetting> csStream = configurationClient.listSettingRevisions(settingSelector, ctx); csStream.streamByPage().forEach(setting -> { <START> System.out.printf("Key: %s, Value: %s", setting.value().get(0).key(), setting.value().get(0).value()); <END> }); END: com.azure.data.applicationconfig.configurationclient.listSettingRevisions#SettingSelector-Context }</code><technical_language>Is this a typical use-case? setting.value().get(0).key()</technical_language>

Target:
public void listSettingRevisionsContext() { ConfigurationClient configurationClient = createSyncConfigurationClient(); SettingSelector settingSelector = new SettingSelector().keys("prodDBConnection"); Context ctx = new Context(key2, value2); configurationClient.listSettingRevisions(settingSelector, ctx).forEach(setting -> { System.out.printf("Key: %s, Value: %s", setting.key(), setting.value()); }); END: com.azure.data.applicationconfig.configurationclient.listSettingRevisions#settingSelector-context }
Source:
<code>public void write(NullWritable n, T record) throws IOException { try { <START> record.write(this.statement); <END> this.numRecords += 1L; this.statement.addBatch(); if (this.numRecords % this.batchSize == 0L) { LOG.info("log commit called on a batch of size : " + this.batchSize); this.statement.executeBatch(); } } catch (SQLException e) { throw new IOException("Exception while committing to database.", e); } }</code><technical_language>datatype conversion Hive Phoenix</technical_language>

Target:
public void write(NullWritable n, T record) throws IOException { try { record.write(this.statement); this.numRecords += 1L; this.statement.addBatch(); if (this.numRecords % this.batchSize == 0L) { LOG.info("log commit called on a batch of size : " + this.batchSize); this.statement.executeBatch(); this.conn.commit(); } } catch (SQLException e) { throw new IOException("Exception while committing to database.", e); } }
Source:
<code><START> private static int divide(BigInteger[] unscaled, int divisor) { BigInteger[] bi = unscaled[0].divideAndRemainder(BigInteger.valueOf(divisor)); unscaled[0] = bi[0]; return bi[1].shortValue(); <END> }</code><technical_language>convert short int Integer below</technical_language>

Target:
private static int divide(BigInteger[] unscaled, int divisor) { BigInteger[] bi = unscaled[0].divideAndRemainder(BigInteger.valueOf(divisor)); unscaled[0] = bi[0]; return bi[1].intValue(); }
Source:
<code>public void testASCIIMinMax() { final String CHARS = "#O*o+-,. "; final int len = CHARS.length(); final int width = 10; final byte[] array = new byte[width * len]; for (int i = 0; i < len; i++) { for (int j = 0; j < width; j++) { array[i * width + j] = (byte) (i * width + j); } } final UnsignedByteType min = new UnsignedByteType(0); final UnsignedByteType max = new UnsignedByteType(90); final Img<UnsignedByteType> img = ArrayImgs.unsignedBytes(array, width, len); final String ascii = (String) ops.run(DefaultASCII.class, img, min, max); for (int i = 0; i < len; i++) { for (int j = 0; j < width; j++) { assertTrue(ascii.charAt(i * (width + 1) + j) == CHARS.charAt(i)); } assertTrue(ascii.charAt(i * (width + 1) + width) == '\n'); } final String asciiUnclamped = (String) ops.run(DefaultASCII.class, img); <START> assertTrue(asciiUnclamped != ascii); <END> }</code><technical_language>comparing strings, equals instead of !=. compares reference equality, is want test here. in this case: assertEquals(asciiUnclamped, ascii). if _do_ want compare reference equality, assertSame for that</technical_language>

Target:
public void testASCIIMinMax() { final String CHARS = "#O*o+-,. "; final int len = CHARS.length(); final int width = 10; final byte[] array = new byte[width * len]; for (int i = 0; i < len; i++) { for (int j = 0; j < width; j++) { array[i * width + j] = (byte) (i * width + j); } } final UnsignedByteType min = new UnsignedByteType(0); final UnsignedByteType max = new UnsignedByteType(90); final Img<UnsignedByteType> img = ArrayImgs.unsignedBytes(array, width, len); final String ascii = (String) ops.run(DefaultASCII.class, img, min, max); for (int i = 0; i < len; i++) { for (int j = 0; j < width; j++) { assertEquals(ascii.charAt(i * (width + 1) + j), CHARS.charAt(i)); } assertEquals(ascii.charAt(i * (width + 1) + width), '\n'); } final String asciiUnclamped = (String) ops.run(DefaultASCII.class, img); assertEquals(asciiUnclamped, ascii); }
Source:
<code>public static Slice stBuffer(@SqlType(GEOMETRY_TYPE_NAME) Slice input, @SqlType(DOUBLE) double distance) { if (distance < 0) { throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "distance must be greater than or equal to 0"); } if (distance == 0) { return input; } <START> if (Double.isNaN(distance)) { <END> throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "distance must not be NaN"); } OGCGeometry geometry = deserialize(input); if (geometry.isEmpty()) { return null; } return serialize(geometry.buffer(distance)); }</code><technical_language>move this isNan check distance == 0 check failure case checks beginning</technical_language>

Target:
public static Slice stBuffer(@SqlType(GEOMETRY_TYPE_NAME) Slice input, @SqlType(DOUBLE) double distance) { if (Double.isNaN(distance)) { throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "distance is NaN"); } if (distance < 0) { throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "distance is negative"); } if (distance == 0) { return input; } OGCGeometry geometry = deserialize(input); if (geometry.isEmpty()) { return null; } return serialize(geometry.buffer(distance)); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); setTitle(getString(R.string.txtSignIn)); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); userLoginUri = Uri.parse(getString(R.string.website) + "cgi/user.pl"); resetPasswordUri = Uri.parse(getString(R.string.website) + "cgi/reset_password.pl"); customTabActivityHelper = new CustomTabActivityHelper(); customTabActivityHelper.setConnectionCallback(this); customTabActivityHelper.mayLaunchUrl(userLoginUri, null, null); signup.setEnabled(false); final SharedPreferences settings = getSharedPreferences("login", 0); String loginS = settings.getString("user", getResources().getString(R.string.txt_anonymous)); if (!loginS.equals(getResources().getString(R.string.txt_anonymous))) { new MaterialDialog.Builder(this) .title("Login") <START> .content("Already logged in!") <END> .neutralText(R.string.ok_button) .show(); } apiClient = new Retrofit.Builder() .baseUrl(BuildConfig.HOST) .client(Utils.HttpClientBuilder()) .build() .create(OpenFoodAPIService.class); }</code><technical_language>translatable</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(getResources().getBoolean(R.bool.portrait_only)){ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } setContentView(R.layout.activity_login); setTitle(getString(R.string.txtSignIn)); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); userLoginUri = Uri.parse(getString(R.string.website) + "cgi/user.pl"); resetPasswordUri = Uri.parse(getString(R.string.website) + "cgi/reset_password.pl"); customTabActivityHelper = new CustomTabActivityHelper(); customTabActivityHelper.setConnectionCallback(this); customTabActivityHelper.mayLaunchUrl(userLoginUri, null, null); signup.setEnabled(false); final SharedPreferences settings = getSharedPreferences("login", 0); String loginS = settings.getString("user", getResources().getString(R.string.txt_anonymous)); if (!loginS.equals(getResources().getString(R.string.txt_anonymous))) { new MaterialDialog.Builder(this) .title(R.string.log_in) .content(R.string.login_true) .neutralText(R.string.ok_button) .show(); } apiClient = new Retrofit.Builder() .baseUrl(BuildConfig.HOST) .client(Utils.HttpClientBuilder()) .build() .create(OpenFoodAPIService.class); }
Source:
<code>public Take route(final Request request) throws IOException { <START> return new TkEmpty(); <END> }</code><technical_language>throw UnsupportedOperationException is implemented</technical_language>

Target:
public Take route(final Request request) throws IOException { throw new UnsupportedOperationException("not implemented yet"); }
Source:
<code>public void testLoadOrderedPublicEvents_8() throws Throwable { UserDetails user = new OAuth2TestUtils.UserBuilder("jack_bauer", "0x24") .withAuthorization(Group.FREE_GROUP_NAME, "tempRole", Permission.BACKOFFICE).build(); String accessToken = mockOAuthInterceptor(user); ResultActions result = mockMvc .perform(get("/plugins/cms/contents") .param("status", IContentService.STATUS_ONLINE) .param("sort", IEntityManager.ENTITY_TYPE_CODE_FILTER_KEY) .param("direction", FieldSearchFilter.ASC_ORDER) .param("filters[0].attribute", IContentManager.ENTITY_TYPE_CODE_FILTER_KEY) .param("filters[0].operator", "eq") .param("filters[0].value", "EVN") .sessionAttr("user", user) .header("Authorization", "Bearer " + accessToken)); <START> String bodyResult = result.andReturn().getResponse().getContentAsString(); result.andExpect(status().isOk()); String[] expectedFreeContentsId = {"EVN20", "EVN192", "EVN23", "EVN24", "EVN21", "EVN25", "EVN191", "EVN194", "EVN193"}; int payloadSize = JsonPath.read(bodyResult, "$.payload.size()"); Assert.assertEquals(expectedFreeContentsId.length, payloadSize); for (int i = 0; i < expectedFreeContentsId.length; i++) { String expectedId = expectedFreeContentsId[i]; String extractedId = JsonPath.read(bodyResult, "$.payload[" + i + "].id"); Assert.assertEquals(expectedId, extractedId); } <END> }</code><technical_language>Code style</technical_language>

Target:
public void testLoadOrderedPublicEvents_8() throws Throwable { UserDetails user = new OAuth2TestUtils.UserBuilder("jack_bauer", "0x24") .withAuthorization(Group.FREE_GROUP_NAME, "tempRole", Permission.BACKOFFICE).build(); String accessToken = mockOAuthInterceptor(user); ResultActions result = mockMvc .perform(get("/plugins/cms/contents") .param("status", IContentService.STATUS_ONLINE) .param("sort", IEntityManager.ENTITY_TYPE_CODE_FILTER_KEY) .param("direction", FieldSearchFilter.ASC_ORDER) .param("filters[0].attribute", IContentManager.ENTITY_TYPE_CODE_FILTER_KEY) .param("filters[0].operator", "eq") .param("filters[0].value", "EVN") .sessionAttr("user", user) .header("Authorization", "Bearer " + accessToken)); result.andDo(print()) .andExpect(status().isOk()) .andExpect(jsonPath("$.payload.size()", is(9))) .andExpect(jsonPath("$.payload[0].id", is("EVN20"))) .andExpect(jsonPath("$.payload[1].id", is("EVN192"))) .andExpect(jsonPath("$.payload[2].id", is("EVN23"))) .andExpect(jsonPath("$.payload[3].id", is("EVN24"))) .andExpect(jsonPath("$.payload[4].id", is("EVN21"))) .andExpect(jsonPath("$.payload[5].id", is("EVN25"))) .andExpect(jsonPath("$.payload[6].id", is("EVN191"))) .andExpect(jsonPath("$.payload[7].id", is("EVN194"))) .andExpect(jsonPath("$.payload[8].id", is("EVN193"))); }
Source:
<code>private void validateSize(int bytes) { bytesRead += bytes; if (bytesRead > maxRequestSize && shouldLimit) { <START> throw new IllegalArgumentException( <END> "Request size exceeded maximum number of allowed bytes " + MAX_REQUEST_SIZE_BYTES); } }</code><technical_language>this a ServiceException, serialized such</technical_language>

Target:
private void validateSize(int bytes) { bytesRead += bytes; if (bytesRead > maxRequestSize && shouldLimit) { throw new ServiceException(ErrorType.REQUEST_ENTITY_TOO_LARGE, SafeArg.of("maxRequestSizeBytes", maxRequestSize)); } }
Source:
<code>private void validateNewCommits(RefControl ctl, ReceiveCommand cmd) { if (ctl.canForgeAuthor() && ctl.canForgeCommitter() && ctl.canForgeGerritServerIdentity() && ctl.canUploadMerges() && !project.isUseSignedOffBy() && Iterables.isEmpty(rejectCommits) && !GitRepositoryManager.REF_CONFIG.equals(ctl.getRefName()) && !(MagicBranch.isMagicBranch(cmd.getRefName()) || NEW_PATCHSET.matcher(cmd.getRefName()).matches())) { return; } final RevWalk walk = rp.getRevWalk(); walk.reset(); walk.sort(RevSort.NONE); try { Set<ObjectId> existing = Sets.newHashSet(); walk.markStart(walk.parseCommit(cmd.getNewId())); markHeadsAsUninteresting(walk, existing); RevCommit c; while ((c = walk.next()) != null) { <START> if (existing.contains(c)) <END> continue; if (!validCommit(ctl, cmd, c)) { break; } } } catch (IOException err) { cmd.setResult(REJECTED_MISSING_OBJECT); log.error("Invalid pack upload; one or more objects weren't sent", err); } }</code><technical_language>nit: curly braces body</technical_language>

Target:
private void validateNewCommits(RefControl ctl, ReceiveCommand cmd) { if (ctl.canForgeAuthor() && ctl.canForgeCommitter() && ctl.canForgeGerritServerIdentity() && ctl.canUploadMerges() && !project.isUseSignedOffBy() && Iterables.isEmpty(rejectCommits) && !GitRepositoryManager.REF_CONFIG.equals(ctl.getRefName()) && !(MagicBranch.isMagicBranch(cmd.getRefName()) || NEW_PATCHSET.matcher(cmd.getRefName()).matches())) { return; } final RevWalk walk = rp.getRevWalk(); walk.reset(); walk.sort(RevSort.NONE); try { Set<ObjectId> existing = Sets.newHashSet(); walk.markStart(walk.parseCommit(cmd.getNewId())); markHeadsAsUninteresting(walk, existing); RevCommit c; while ((c = walk.next()) != null) { if (existing.contains(c)) { continue; } else if (!validCommit(ctl, cmd, c)) { break; } } } catch (IOException err) { cmd.setResult(REJECTED_MISSING_OBJECT); log.error("Invalid pack upload; one or more objects weren't sent", err); } }
Source:
<code>private void createMetrics() { LatencyMetric globalBaselineCalcLatencyGauge = new RebalanceLatencyGauge( WagedRebalancerMetricNames.GlobalBaselineCalcLatencyGauge.name(), getResetIntervalInMs()); LatencyMetric partialRebalanceLatencyGauge = new RebalanceLatencyGauge( WagedRebalancerMetricNames.PartialRebalanceLatencyGauge.name(), getResetIntervalInMs()); LatencyMetric stateReadLatencyGauge = new RebalanceLatencyGauge(WagedRebalancerMetricNames.StateReadLatencyGauge.name(), getResetIntervalInMs()); LatencyMetric stateWriteLatencyGauge = new RebalanceLatencyGauge(WagedRebalancerMetricNames.StateWriteLatencyGauge.name(), getResetIntervalInMs()); CountMetric calcFailureCount = new RebalanceFailureCount(WagedRebalancerMetricNames.RebalanceFailureCount.name()); <START> <END> addMetric(globalBaselineCalcLatencyGauge); addMetric(partialRebalanceLatencyGauge); addMetric(stateReadLatencyGauge); addMetric(stateWriteLatencyGauge); addMetric(calcFailureCount); }</code><technical_language>lines change reformatted</technical_language>

Target:
private void createMetrics() { LatencyMetric globalBaselineCalcLatencyGauge = new RebalanceLatencyGauge(WagedRebalancerMetricNames.GlobalBaselineCalcLatencyGauge.name(), getResetIntervalInMs()); LatencyMetric partialRebalanceLatencyGauge = new RebalanceLatencyGauge(WagedRebalancerMetricNames.PartialRebalanceLatencyGauge.name(), getResetIntervalInMs()); LatencyMetric stateReadLatencyGauge = new RebalanceLatencyGauge(WagedRebalancerMetricNames.StateReadLatencyGauge.name(), getResetIntervalInMs()); LatencyMetric stateWriteLatencyGauge = new RebalanceLatencyGauge(WagedRebalancerMetricNames.StateWriteLatencyGauge.name(), getResetIntervalInMs()); CountMetric calcFailureCount = new RebalanceFailureCount(WagedRebalancerMetricNames.RebalanceFailureCounter.name()); addMetric(globalBaselineCalcLatencyGauge); addMetric(partialRebalanceLatencyGauge); addMetric(stateReadLatencyGauge); addMetric(stateWriteLatencyGauge); addMetric(calcFailureCount); }
Source:
<code>} catch (JAXBException e) { <START> throw new RuntimeException("Could not initialize " + StandardBusinessDocumentConverter.class, e); <END> }</code><technical_language>Meldingsutveksling<something>Exception</technical_language>

Target:
} catch (JAXBException e) { throw new MeldingsUtvekslingRuntimeException("Could not initialize " + StandardBusinessDocumentConverter.class, e); }
Source:
<code>private void removeMember(DbSession dbSession, OrganizationDto organization, UserDto user) { ensureLastAdminIsNotRemoved(dbSession, organization, user); int userId = user.getId(); String organizationUuid = organization.getUuid(); dbClient.userPermissionDao().deleteOrganizationMemberPermissions(dbSession, organizationUuid, userId); dbClient.permissionTemplateDao().deleteUserPermissionsByOrganization(dbSession, organizationUuid, userId); <START> dbClient.qProfileEditUsersDao().deleteByUser(dbSession, user); <END> dbClient.userGroupDao().deleteByOrganizationAndUser(dbSession, organizationUuid, userId); dbClient.propertiesDao().deleteByOrganizationAndUser(dbSession, organizationUuid, userId); dbClient.propertiesDao().deleteByOrganizationAndMatchingLogin(dbSession, organizationUuid, user.getLogin(), singletonList(DEFAULT_ISSUE_ASSIGNEE)); dbClient.organizationMemberDao().delete(dbSession, organizationUuid, userId); userIndexer.commitAndIndex(dbSession, user); }</code><technical_language>restricted organization? remove a member, want delete qprofile user permissions for organization. a deleteByOrganizationAndUser get organization profile delete</technical_language>

Target:
private void removeMember(DbSession dbSession, OrganizationDto organization, UserDto user) { ensureLastAdminIsNotRemoved(dbSession, organization, user); int userId = user.getId(); String organizationUuid = organization.getUuid(); dbClient.userPermissionDao().deleteOrganizationMemberPermissions(dbSession, organizationUuid, userId); dbClient.permissionTemplateDao().deleteUserPermissionsByOrganization(dbSession, organizationUuid, userId); dbClient.qProfileEditUsersDao().deleteByOrganizationAndUser(dbSession, organization, user); dbClient.userGroupDao().deleteByOrganizationAndUser(dbSession, organizationUuid, userId); dbClient.propertiesDao().deleteByOrganizationAndUser(dbSession, organizationUuid, userId); dbClient.propertiesDao().deleteByOrganizationAndMatchingLogin(dbSession, organizationUuid, user.getLogin(), singletonList(DEFAULT_ISSUE_ASSIGNEE)); dbClient.organizationMemberDao().delete(dbSession, organizationUuid, userId); userIndexer.commitAndIndex(dbSession, user); }
Source:
<code>public static String sanitize(String input) { String sanitized = CharMatcher.JAVA_LETTER_OR_DIGIT .or(CharMatcher.WHITESPACE) <START> .retainFrom(input); <END> sanitized = CharMatcher.WHITESPACE.trimAndCollapseFrom(sanitized, ' '); return CharMatcher.WHITESPACE.replaceFrom(sanitized, '-').toLowerCase(); }</code><technical_language>this handle nulls</technical_language>

Target:
public static String sanitize(String input) { if (Strings.isNullOrEmpty(input)) { return input; } String sanitized = CharMatcher.JAVA_LETTER_OR_DIGIT .or(CharMatcher.WHITESPACE) .retainFrom(input); sanitized = CharMatcher.WHITESPACE.trimAndCollapseFrom(sanitized, ' '); return CharMatcher.WHITESPACE.replaceFrom(sanitized, '-').toLowerCase(); }
Source:
<code><START> @BeforeClass public void beforeClass() throws Exception { <END> admin = _gSetupTool.getClusterManagementTool(); super.beforeClass(); }</code><technical_language>format diff helix-style? @BeforeClass a line itself</technical_language>

Target:
public void beforeClass() throws Exception { super.beforeClass(); }
Source:
<code>@Override public RelNode convert(RelNode rel) { LogicalJoin join = (LogicalJoin) rel; List<RelNode> newInputs = new ArrayList<>(); for (RelNode input : join.getInputs()) { if (!(input.getConvention() instanceof EnumerableConvention)) { input = convert( input, input.getTraitSet() .replace(EnumerableConvention.INSTANCE)); } newInputs.add(input); } final RelOptCluster cluster = join.getCluster(); final RelNode left = newInputs.get(0); final RelNode right = newInputs.get(1); final JoinInfo info = JoinInfo.of(left, right, join.getCondition()); if (!info.isEqui() && join.getJoinType() != JoinRelType.INNER) { try { return EnumerableThetaJoin.create( left, right, join.getCondition(), join.getVariablesSet(), join.getJoinType()); } catch (InvalidRelException e) { EnumerableRules.LOGGER.debug(e.toString()); return null; } } else if (info.isEqui() && join.isNonCorrelateSemiJoin()) { <START> return EnumerableNestedLoopJoin.create( <END> left, right, join.getCondition(), join.getVariablesSet(), ImmutableBitSet.of(), join.getJoinType()); } else { RelNode newRel; try { newRel = EnumerableHashJoin.create( left, right, info.getEquiCondition(left, right, cluster.getRexBuilder()), join.getVariablesSet(), join.getJoinType()); } catch (InvalidRelException e) { EnumerableRules.LOGGER.debug(e.toString()); return null; } if (!info.isEqui()) { newRel = new EnumerableFilter(cluster, newRel.getTraitSet(), newRel, info.getRemaining(cluster.getRexBuilder())); } return newRel; } }</code><technical_language>I this rule generate EnumerableNestedLoopJoin. In opinion created LogicalCorrelate, i.e. like: a) LogicalJoin == [EnumerableJoinRule] ==> EnumerableJoin (now EnumerableHashJoin) / EnumerableThetaJoin b) LogicalJoin == [JoinToCorrelateRule] ==> LogicalCorrelate == [EnumerableCorrelateRule] ==> EnumerableCorrelate (now EnumerableNestedLoop)</technical_language>

Target:
@Override public RelNode convert(RelNode rel) { LogicalJoin join = (LogicalJoin) rel; List<RelNode> newInputs = new ArrayList<>(); for (RelNode input : join.getInputs()) { if (!(input.getConvention() instanceof EnumerableConvention)) { input = convert( input, input.getTraitSet() .replace(EnumerableConvention.INSTANCE)); } newInputs.add(input); } final RelOptCluster cluster = join.getCluster(); final RelNode left = newInputs.get(0); final RelNode right = newInputs.get(1); final JoinInfo info = JoinInfo.of(left, right, join.getCondition()); if (!info.isEqui() && join.getJoinType() != JoinRelType.INNER) { try { return EnumerableNestedLoopJoin.create( left, right, join.getCondition(), join.getVariablesSet(), join.getJoinType()); } catch (InvalidRelException e) { EnumerableRules.LOGGER.debug(e.toString()); return null; } } else { RelNode newRel; try { newRel = EnumerableHashJoin.create( left, right, info.getEquiCondition(left, right, cluster.getRexBuilder()), join.getVariablesSet(), join.getJoinType()); } catch (InvalidRelException e) { EnumerableRules.LOGGER.debug(e.toString()); return null; } if (!info.isEqui()) { newRel = new EnumerableFilter(cluster, newRel.getTraitSet(), newRel, info.getRemaining(cluster.getRexBuilder())); } return newRel; } }
Source:
<code>public void testInsertSingleIterable() throws Exception { UsesBatching b = handle.attach(UsesBatching.class); List<Something> to_insert = Arrays.asList(new Something(1, "Tom"), new Something(2, "Tatu")); int[] counts = b.insertBeans(to_insert); <START> assertThat(counts).hasSize(2).containsOnly(1); <END> assertThat(b.size()).isEqualTo(2); }</code><technical_language>While strictly correct, weird a size assertion of 2, next a contains assertion element. A single containsExactly(1,1) match expectations</technical_language>

Target:
public void testInsertSingleIterable() throws Exception { UsesBatching b = handle.attach(UsesBatching.class); List<Something> to_insert = Arrays.asList(new Something(1, "Tom"), new Something(2, "Tatu")); int[] counts = b.insertBeans(to_insert); assertThat(counts).containsExactly(1, 1); assertThat(b.size()).isEqualTo(2); }
Source:
<code>public void exitJava(int exitCode, boolean hardExit) { FMLLog.log.info("Java has been asked to exit (code {}) by {}.", exitCode, Thread.currentThread().getStackTrace()[2]); if (hardExit) { <START> FMLLog.log.info("This is an abortive exit and could cause world corruption or other things"); <END> } if (Boolean.parseBoolean(System.getProperty("fml.debugExit", "false"))) { FMLLog.log.info("Exit trace", new Throwable()); } else { FMLLog.log.info("If this was an unexpected exit, use -Dfml.debugExit=true as a JVM argument to find out where it was called"); } if (hardExit) { Runtime.getRuntime().halt(exitCode); } else { Runtime.getRuntime().exit(exitCode); } }</code><technical_language>While here, this warn instead of info</technical_language>

Target:
public void exitJava(int exitCode, boolean hardExit) { FMLLog.log.warn("Java has been asked to exit (code {})", exitCode); if (hardExit) { FMLLog.log.warn("This is an abortive exit and could cause world corruption or other things"); } StackTraceElement[] stack = Thread.currentThread().getStackTrace(); FMLLog.log.warn("Exit trace:"); for (int i = 2; i < stack.length; i++) { FMLLog.log.warn("\t{}", stack[i]); } if (hardExit) { Runtime.getRuntime().halt(exitCode); } else { Runtime.getRuntime().exit(exitCode); } }
Source:
<code>public void testPhoneHomeParameterCreator() { PhoneHomeParameterCreator phoneHomeParameterCreator = new PhoneHomeParameterCreator(); phoneHomeParameterCreator.addParam("1", "hazelcast"); phoneHomeParameterCreator.addParam("2", "phonehome"); Map<String, String> map = phoneHomeParameterCreator.getParameters(); assertEquals(phoneHomeParameterCreator.build(), "?1=hazelcast&2=phonehome"); assertNotNull(map); assertEquals(map.get("1"), "hazelcast"); assertEquals(map.get("2"), "phonehome"); <START> assertNull(map.get("3")); <END> }</code><technical_language>I suggest encoding 4 assertions in a single call: assertEquals(ImmutableMap.of("1", "hazelcast", "2", "phonehome"), map);. In general is a good practice check expected output in assertion, instead of checking pieces separately. Also, in assertEquals() calls expected actual values mixed up. expected, actual. Of works this too, if assertion fails, output confusing if expected actual swapped, is useful put in correct order</technical_language>

Target:
public void testPhoneHomeParameterCreator() { PhoneHomeParameterCreator phoneHomeParameterCreator = new PhoneHomeParameterCreator(); phoneHomeParameterCreator.addParam("1", "hazelcast"); phoneHomeParameterCreator.addParam("2", "phonehome"); Map<String, String> map = phoneHomeParameterCreator.getParameters(); assertEquals("?1=hazelcast&2=phonehome", phoneHomeParameterCreator.build()); assertEquals(ImmutableMap.of("1", "hazelcast", "2", "phonehome"), map); }
Source:
<code>private void buildFailoverRegions() { <START> final Set<? extends Set<? extends SchedulingExecutionVertex>> distinctRegions = <END> PipelinedRegionComputeUtil.computePipelinedRegions(topology); for (Set<? extends SchedulingExecutionVertex> regionVertices : distinctRegions) { LOG.debug("Creating a failover region with vertices.", regionVertices.size()); final FailoverRegion failoverRegion = new FailoverRegion(regionVertices); regions.add(failoverRegion); for (SchedulingExecutionVertex vertex : regionVertices) { vertexToRegionMap.put(vertex.getId(), failoverRegion); } } LOG.info("Created failover regions.", regions.size()); }</code><technical_language>simplified Set<Set<SchedulingExecutionVertex>></technical_language>

Target:
private void buildFailoverRegions() { final Set<Set<SchedulingExecutionVertex>> distinctRegions = PipelinedRegionComputeUtil.computePipelinedRegions(topology); for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) { LOG.debug("Creating a failover region with vertices.", regionVertices.size()); final FailoverRegion failoverRegion = new FailoverRegion(regionVertices); regions.add(failoverRegion); for (SchedulingExecutionVertex vertex : regionVertices) { vertexToRegionMap.put(vertex.getId(), failoverRegion); } } LOG.info("Created failover regions.", regions.size()); }
Source:
<code>public void route(final Message message, final RoutingContext context) throws Exception { if (logger.isTraceEnabled()) { logger.trace("Diverting message " + message + " into " + this); } Message copy = null; if (!forwardAddress.equals(context.getAddress(message))) { long id = storageManager.generateID(); copy = message.copy(id); copy.referenceOriginalMessage(message, this.getUniqueName().toString()); copy.setAddress(forwardAddress); copy.setExpiration(message.getExpiration()); copy.reencode(); switch (routingType) { case ANYCAST: copy.setRoutingType(RoutingType.ANYCAST); break; case MULTICAST: copy.setRoutingType(RoutingType.MULTICAST); break; case STRIP: copy.setRoutingType(null); break; case PASS: break; } if (transformer != null) { copy = transformer.transform(copy); <START> copy.reencode(); <END> } } else { copy = message; } postOffice.route(copy, context.getTransaction(), false); }</code><technical_language>This responsibility of transformer code</technical_language>

Target:
public void route(final Message message, final RoutingContext context) throws Exception { if (logger.isTraceEnabled()) { logger.trace("Diverting message " + message + " into " + this); } context.setReusable(false); Message copy = null; if (!forwardAddress.equals(context.getAddress(message))) { long id = storageManager.generateID(); copy = message.copy(id); copy.referenceOriginalMessage(message, this.getUniqueName().toString()); copy.setAddress(forwardAddress); copy.setExpiration(message.getExpiration()); copy.reencode(); switch (routingType) { case ANYCAST: copy.setRoutingType(RoutingType.ANYCAST); break; case MULTICAST: copy.setRoutingType(RoutingType.MULTICAST); break; case STRIP: copy.setRoutingType(null); break; case PASS: break; } if (transformer != null) { copy = transformer.transform(copy); } } else { copy = message; } postOffice.route(copy, new RoutingContextImpl(context.getTransaction()).setReusable(false), false); }