auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> @Override protected boolean isApplicable(MultiBranchProjectDescriptor projectDescriptor) { <END> for (BranchProjectFactoryDescriptor d : projectDescriptor.getProjectFactoryDescriptors()) { Type factoryType = Types.getBaseClass(d.clazz, BranchProjectFactory.class); Type jobType = Types.getTypeArgument(factoryType, 0, Project.class); if (Project.class.isAssignableFrom(Types.erasure(jobType))) { return true; } } return false; }</code><technical_language>code style</technical_language>

Target:
protected boolean isApplicable(MultiBranchProjectDescriptor projectDescriptor) { for (BranchProjectFactoryDescriptor d : projectDescriptor.getProjectFactoryDescriptors()) { Type factoryType = Types.getBaseClass(d.clazz, BranchProjectFactory.class); Type jobType = Types.getTypeArgument(factoryType, 0, Project.class); if (Project.class.isAssignableFrom(Types.erasure(jobType))) { return true; } } return false; }
Source:
<code>@Test public void peekMaxCanBeSmallerThanQueueDepth() { List<String> peek = queue.peek(2); assertThat(peek).hasSize(2); <START> assertThat(peek).containsSequence("one", "two"); <END> }</code><technical_language>containsExactly. chain lines in a single assertion</technical_language>

Target:
@Test public void peekMaxCanBeSmallerThanQueueDepth() { List<String> peek = queue.peek(2); assertThat(peek).containsExactly("one", "two"); }
Source:
<code>private static int getHttpServicePortProperty(final BundleContext bc, final String propertyName) { Object value; int port = -1; ServiceReference<?>[] refs = new ServiceReference[0]; try { <START> refs = bc.getAllServiceReferences("org.osgi.service.http.HttpService", null); <END> } catch (final InvalidSyntaxException ex) { final Logger logger = LoggerFactory.getLogger(HttpServiceUtil.class); logger.warn("This error should only be thrown if a filter could not be parsed. We don't use a filter..."); } int candidate = Integer.MIN_VALUE; for (final ServiceReference<?> ref : refs) { value = ref.getProperty(propertyName); if (value == null) { continue; } final int servicePort; try { servicePort = Integer.parseInt(value.toString()); } catch (final NumberFormatException ex) { continue; } value = ref.getProperty(Constants.SERVICE_RANKING); final int serviceRanking; if (value == null || !(value instanceof Integer)) { serviceRanking = 0; } else { serviceRanking = (Integer) value; } if (serviceRanking >= candidate) { candidate = serviceRanking; port = servicePort; } } if (port > 0) { return port; } value = bc.getProperty(propertyName); if (value != null) { if (value instanceof String) { try { return Integer.parseInt(value.toString()); } catch (final NumberFormatException ex) { } } else if (value instanceof Integer) { return (Integer) value; } } return -1; }</code><technical_language>I need initialize refs array first, fetch correct catching error (that thrown) evaluate -- if error catched -- null array... If want move code of try-block final remove initialization null array. add a return -1; catch block</technical_language>

Target:
private static int getHttpServicePortProperty(final BundleContext bc, final String propertyName) { Object value; int port = -1; final ServiceReference<?>[] refs; try { refs = bc.getAllServiceReferences("org.osgi.service.http.HttpService", null); } catch (final InvalidSyntaxException ex) { final Logger logger = LoggerFactory.getLogger(HttpServiceUtil.class); logger.warn("This error should only be thrown if a filter could not be parsed. We don't use a filter..."); return -1; } int candidate = Integer.MIN_VALUE; for (final ServiceReference<?> ref : refs) { value = ref.getProperty(propertyName); if (value == null) { continue; } final int servicePort; try { servicePort = Integer.parseInt(value.toString()); } catch (final NumberFormatException ex) { continue; } value = ref.getProperty(Constants.SERVICE_RANKING); final int serviceRanking; if (value == null || !(value instanceof Integer)) { serviceRanking = 0; } else { serviceRanking = (Integer) value; } if (serviceRanking >= candidate) { candidate = serviceRanking; port = servicePort; } } if (port > 0) { return port; } value = bc.getProperty(propertyName); if (value != null) { if (value instanceof String) { try { return Integer.parseInt(value.toString()); } catch (final NumberFormatException ex) { } } else if (value instanceof Integer) { return (Integer) value; } } return -1; }
Source:
<code>public void onPost(final GitLabMergeRequest req) { final ParameterizedJobMixIn scheduledJob = new ParameterizedJobMixIn() { @Override protected Job asJob() { return job; } }; if (triggerOnMergeRequest && this.isBranchAllowed(req.getObjectAttribute().getTargetBranch())) { LOGGER.log(Level.INFO, "{0} triggered for merge request.", job.getFullName()); GitLabMergeCause cause = createGitLabMergeCause(req); Action action = createAction(req, job); int projectbuildDelay = 0; if (job instanceof ParameterizedJobMixIn.ParameterizedJob) { ParameterizedJobMixIn.ParameterizedJob abstractProject = (ParameterizedJobMixIn.ParameterizedJob)job; if (abstractProject.getQuietPeriod() > projectbuildDelay) { projectbuildDelay = abstractProject.getQuietPeriod(); } } if(addCiMessage) { req.createCommitStatus(getDescriptor().getGitlab().instance(), "pending", Jenkins.getInstance().getRootUrl() + job.getUrl()); } scheduledJob.scheduleBuild2(projectbuildDelay, action, new CauseAction(cause)); } else { if (triggerOnMergeRequest ) { LOGGER.log(Level.INFO, "trigger on merge request not set"); <START> } else if ( this.isBranchAllowed(req.getObjectAttribute().getTargetBranch())) { <END> LOGGER.log(Level.INFO, "branch {0} is not allowed", req.getObjectAttribute().getTargetBranch()); } } }</code><technical_language>I guess expression needs negated here, it</technical_language>

Target:
public void onPost(final GitLabMergeRequest req) { final ParameterizedJobMixIn scheduledJob = new ParameterizedJobMixIn() { @Override protected Job asJob() { return job; } }; if (triggerOnMergeRequest && this.isBranchAllowed(req.getObjectAttribute().getTargetBranch())) { LOGGER.log(Level.INFO, "{0} triggered for merge request.", job.getFullName()); GitLabMergeCause cause = createGitLabMergeCause(req); Action action = createAction(req, job); int projectbuildDelay = 0; if (job instanceof ParameterizedJobMixIn.ParameterizedJob) { ParameterizedJobMixIn.ParameterizedJob abstractProject = (ParameterizedJobMixIn.ParameterizedJob)job; if (abstractProject.getQuietPeriod() > projectbuildDelay) { projectbuildDelay = abstractProject.getQuietPeriod(); } } if(addCiMessage) { req.createCommitStatus(getDescriptor().getGitlab().instance(), "pending", Jenkins.getInstance().getRootUrl() + job.getUrl()); } scheduledJob.scheduleBuild2(projectbuildDelay, action, new CauseAction(cause)); } else if ( ! triggerOnMergeRequest ) { LOGGER.log(Level.INFO, "trigger on merge request not set"); } else { LOGGER.log(Level.INFO, "branch {0} is not allowed", req.getObjectAttribute().getTargetBranch()); } }
Source:
<code>public void validateAccessToken(String accessToken, boolean atHashRequired) { if (!Strings.isNullOrEmpty(accessToken)) { String atHash = idToken.getClaims().getClaimAsString("at_hash"); if (Strings.isNullOrEmpty(atHash)) { if(atHashRequired) { LOG.error("`at_hash` is missing in `ID_TOKEN`."); <START> throw new HttpException(ErrorResponseCode.AT_HASH_NOT_FOUND); <END> } else { LOG.warn("Skip access_token validation because corresponding id_token does not have at_hash claim. access_token: " + accessToken + ", id_token: " + idToken); return; } } if (!jwsSigner.validateAccessToken(accessToken, idToken)) { LOG.error("Hash from id_token does not match hash of the access_token (at_hash). access_token:" + accessToken + ", idToken: " + idToken + ", at_hash:" + atHash); throw new HttpException(ErrorResponseCode.INVALID_ACCESS_TOKEN_BAD_HASH); } } }</code><technical_language>Please add configuration properties id_token_validation_at_hash_required: true, id_token_validation_c_hash_required: true on. Default true</technical_language>

Target:
public void validateAccessToken(String accessToken, boolean atHashRequired) { if (!configuration.getIdTokenValidationAtHashRequired()) { return; } if (Strings.isNullOrEmpty(accessToken)) { return; } String atHash = idToken.getClaims().getClaimAsString("at_hash"); if (Strings.isNullOrEmpty(atHash)) { if (atHashRequired) { LOG.error("`at_hash` is missing in `ID_TOKEN`."); throw new HttpException(ErrorResponseCode.AT_HASH_NOT_FOUND); } else { LOG.warn("Skip access_token validation because corresponding id_token does not have at_hash claim. access_token: " + accessToken + ", id_token: " + idToken); return; } } if (!jwsSigner.validateAccessToken(accessToken, idToken)) { LOG.error("Hash from id_token does not match hash of the access_token (at_hash). access_token:" + accessToken + ", idToken: " + idToken + ", at_hash:" + atHash); throw new HttpException(ErrorResponseCode.INVALID_ACCESS_TOKEN_BAD_HASH); } }
Source:
<code>public void testCompressedFrame() { EmbeddedChannel encoderChannel = new EmbeddedChannel( ZlibCodecFactory.newZlibEncoder(ZlibWrapper.NONE, 9, 15, 8)); EmbeddedChannel decoderChannel = new EmbeddedChannel(new PerFrameDeflateDecoder(false, NEVER_SKIP)); byte[] payload = new byte[300]; random.nextBytes(payload); encoderChannel.writeOutbound(Unpooled.wrappedBuffer(payload)); ByteBuf compressedPayload = encoderChannel.readOutbound(); BinaryWebSocketFrame compressedFrame = new BinaryWebSocketFrame(true, RSV1 | RSV3, compressedPayload.slice(0, compressedPayload.readableBytes() - 4)); decoderChannel.writeInbound(compressedFrame); BinaryWebSocketFrame uncompressedFrame = decoderChannel.readInbound(); assertNotNull(uncompressedFrame); assertNotNull(uncompressedFrame.content()); assertEquals(RSV3, uncompressedFrame.rsv()); <START> assertEquals(300, uncompressedFrame.content().readableBytes()); <END> byte[] finalPayload = new byte[300]; uncompressedFrame.content().readBytes(finalPayload); assertArrayEquals(finalPayload, payload); uncompressedFrame.release(); }</code><technical_language>this removed</technical_language>

Target:
public void testCompressedFrame() { EmbeddedChannel encoderChannel = new EmbeddedChannel( ZlibCodecFactory.newZlibEncoder(ZlibWrapper.NONE, 9, 15, 8)); EmbeddedChannel decoderChannel = new EmbeddedChannel(new PerFrameDeflateDecoder(false)); byte[] payload = new byte[300]; random.nextBytes(payload); assertTrue(encoderChannel.writeOutbound(Unpooled.wrappedBuffer(payload))); ByteBuf compressedPayload = encoderChannel.readOutbound(); BinaryWebSocketFrame compressedFrame = new BinaryWebSocketFrame(true, RSV1 | RSV3, compressedPayload.slice(0, compressedPayload.readableBytes() - 4)); assertTrue(decoderChannel.writeInbound(compressedFrame)); BinaryWebSocketFrame uncompressedFrame = decoderChannel.readInbound(); assertNotNull(uncompressedFrame); assertNotNull(uncompressedFrame.content()); assertEquals(RSV3, uncompressedFrame.rsv()); assertEquals(300, uncompressedFrame.content().readableBytes()); byte[] finalPayload = new byte[300]; uncompressedFrame.content().readBytes(finalPayload); assertArrayEquals(finalPayload, payload); uncompressedFrame.release(); }
Source:
<code><START> public static NotificationConfig<DownloadBatchStatus> createDownloadNotificationConfig(Context context, String channelId, String channelDescription, final int iconDrawable) { <END> NotificationCustomizer<DownloadBatchStatus> notificationCustomizer = new NotificationCustomizer<DownloadBatchStatus>() { @Override public Notification customNotificationFrom(NotificationCompat.Builder builder, DownloadBatchStatus downloadBatchStatus) { DownloadBatchTitle downloadBatchTitle = downloadBatchStatus.getDownloadBatchTitle(); int percentageDownloaded = downloadBatchStatus.percentageDownloaded(); int bytesFileSize = (int) downloadBatchStatus.bytesTotalSize(); int bytesDownloaded = (int) downloadBatchStatus.bytesDownloaded(); String title = downloadBatchTitle.asString(); String content = percentageDownloaded + "% downloaded"; Log.v("Create notification for " + title + ", " + content); return builder .setProgress(bytesFileSize, bytesDownloaded, NOT_INDETERMINATE) .setSmallIcon(iconDrawable) .setContentTitle(title) .setContentText(content) .build(); } }; return new NotificationConfig<>( context, channelId, channelDescription, notificationCustomizer, NotificationManagerCompat.IMPORTANCE_LOW ); }</code><technical_language>If planning lint run this need include private constructors factories. add please</technical_language>

Target:
public static NotificationConfig<DownloadBatchStatus> createDownloadNotificationConfig(Context context, String channelId, String channelDescription, final int iconDrawable) { NotificationCustomizer<DownloadBatchStatus> notificationCustomizer = new DownloadNotificationCustomizer(iconDrawable); return new NotificationConfig<>( context, channelId, channelDescription, notificationCustomizer, NotificationManagerCompat.IMPORTANCE_LOW ); }
Source:
<code><START> public LongRunningOperationStatus getOperationStatus() { <END> switch (this.pollingType) { case AZURE_ASYNC_OPERATION_POLL: return toLongRunningOperationStatus(this.azureAsyncOperationData.getProvisioningState()); case LOCATION_POLL: return toLongRunningOperationStatus(this.locationData.getProvisioningState()); case PROVISIONING_STATE_POLL: return toLongRunningOperationStatus(this.provisioningStateData.getProvisioningState()); case SYNCHRONOUSLY_SUCCEEDED_LRO_NO_POLL: return LongRunningOperationStatus.SUCCESSFULLY_COMPLETED; case SYNCHRONOUSLY_FAILED_LRO_NO_POLL: return LongRunningOperationStatus.FAILED; default: throw LOGGER.logExceptionAsError(new IllegalStateException("Unknown pollingType:" + this.pollingType)); } }</code><technical_language>is factory method in this file PollState is set internally in PollerFactory file, thus, MGMT code is <LINK_0></technical_language>

Target:
LongRunningOperationStatus getOperationStatus() { switch (this.pollingType) { case AZURE_ASYNC_OPERATION_POLL: return toLongRunningOperationStatus(this.azureAsyncOperationData.getProvisioningState()); case LOCATION_POLL: return toLongRunningOperationStatus(this.locationData.getProvisioningState()); case PROVISIONING_STATE_POLL: return toLongRunningOperationStatus(this.provisioningStateData.getProvisioningState()); case SYNCHRONOUSLY_SUCCEEDED_LRO_NO_POLL: return LongRunningOperationStatus.SUCCESSFULLY_COMPLETED; case SYNCHRONOUSLY_FAILED_LRO_NO_POLL: return LongRunningOperationStatus.FAILED; default: throw LOGGER.logExceptionAsError(new IllegalStateException("Unknown pollingType:" + this.pollingType)); } }
Source:
<code>public void clearAsyncTask(boolean forceDelete) { VDSReturnValue vdsReturnValue = null; try { log.info("SPMAsyncTask::ClearAsyncTask: Attempting to clear task '{}'", getVdsmTaskId()); vdsReturnValue = coco.clearTask(getStoragePoolID(), getVdsmTaskId()); } catch (RuntimeException e) { log.error("SPMAsyncTask::ClearAsyncTask: Clearing task '{}' threw an exception: {}", <START> getVdsmTaskId(), <END> e.getMessage()); log.error("Exception", e); } boolean shouldGracefullyDeleteTask = false; if (!isTaskStateError(vdsReturnValue)) { if (vdsReturnValue == null || !vdsReturnValue.getSucceeded()) { setState(AsyncTaskState.ClearFailed); onTaskCleanFailure(); } else { setState(AsyncTaskState.Cleared); shouldGracefullyDeleteTask = true; } } if (shouldGracefullyDeleteTask || forceDelete) { removeTaskFromDB(); } }</code><technical_language>Error during... remove threw excpetion</technical_language>

Target:
public void clearAsyncTask(boolean forceDelete) { VDSReturnValue vdsReturnValue = null; try { log.info("SPMAsyncTask::ClearAsyncTask: Attempting to clear task '{}'", getVdsmTaskId()); vdsReturnValue = coco.clearTask(getStoragePoolID(), getVdsmTaskId()); } catch (RuntimeException e) { log.error("SPMAsyncTask::ClearAsyncTask: Error during clearing task '{}': {}", getVdsmTaskId(), e.getMessage()); log.error("Exception", e); } boolean shouldGracefullyDeleteTask = false; if (!isTaskStateError(vdsReturnValue)) { if (vdsReturnValue == null || !vdsReturnValue.getSucceeded()) { setState(AsyncTaskState.ClearFailed); onTaskCleanFailure(); } else { setState(AsyncTaskState.Cleared); shouldGracefullyDeleteTask = true; } } if (shouldGracefullyDeleteTask || forceDelete) { removeTaskFromDB(); } }
Source:
<code>private static Intent getFeedbackEmailIntent(Context context) { String email; try { email = context.getString(R.string.amp_feedback_email); } catch (Resources.NotFoundException e) { <START> throw new IllegalArgumentException("R.string.amp_feedback_email resource not found, you must set this in your strings file for the" <END> + " feedback util to function", e); } final String feedbackMailTo = "mailto:" + email; final String feedbackEmailSubject = Uri.encode("Android App Feedback", "UTF-8"); final String appInfo = getAppInfo(context); final String uriString = feedbackMailTo + "?subject=" + feedbackEmailSubject + "&body=" + Uri.encode(appInfo); final Uri uri = Uri.parse(uriString); final Intent emailIntent = new Intent(Intent.ACTION_SENDTO); emailIntent.setData(uri); return emailIntent; }</code><technical_language>Runtime crash, log</technical_language>

Target:
private static Intent getFeedbackEmailIntent(Context context) { final String feedbackEmailSubject = Uri.encode("Android App Feedback", "UTF-8"); final String appInfo = getAppInfo(context); final StringBuilder uriStringBuilder = new StringBuilder("mailto:"); try { uriStringBuilder.append(context.getString(R.string.amp_feedback_email)); } catch (Resources.NotFoundException e) { IllegalArgumentException illegalArgumentException = new IllegalArgumentException("R.string.amp_feedback_email" + "resource not found, you must set this in your strings file for the feedback util to function", e); Log.d(TAG, "ResourceNotFound", illegalArgumentException); } uriStringBuilder.append("?subject=") .append(feedbackEmailSubject) .append("&body=") .append(appInfo); final Uri uri = Uri.parse(uriStringBuilder.toString()); return new Intent(Intent.ACTION_SENDTO, uri); }
Source:
<code>public void cancelTransactionShouldReturnTheRequest() throws Exception { final AtomicReference<Request> bodyRef = new AtomicReference<>(); final CountDownLatch latch = new CountDownLatch(1); final RestAdapter adapter = new RestAdapter.Builder().setEndpoint(MOCK_URL).setClient(new Client() { @Override public Response execute(Request request) throws IOException { bodyRef.set(request); latch.countDown(); <START> return null; <END> } }).build(); final UserCardService userCardService = adapter.create(UserCardService.class); userCardService.cancelTransaction("foo", "bar", new RetrofitPromise<Transaction>()); latch.await(); Assert.assertEquals(bodyRef.get().getUrl(), String.format("%s/v0/me/cards/%s/transactions/%s/cancel", MOCK_URL, "foo", "bar")); Assert.assertEquals(bodyRef.get().getMethod(), "POST"); }</code><technical_language>Add newline return</technical_language>

Target:
public void cancelTransactionShouldReturnTheRequest() throws Exception { final AtomicReference<Request> bodyRef = new AtomicReference<>(); final CountDownLatch latch = new CountDownLatch(1); final RestAdapter adapter = new RestAdapter.Builder().setEndpoint(MOCK_URL).setClient(new Client() { @Override public Response execute(Request request) throws IOException { bodyRef.set(request); latch.countDown(); return null; } }).build(); final UserCardService userCardService = adapter.create(UserCardService.class); userCardService.cancelTransaction("foo", "bar", new RetrofitPromise<Transaction>()); latch.await(); Assert.assertEquals(bodyRef.get().getMethod(), "POST"); Assert.assertEquals(bodyRef.get().getUrl(), String.format("%s/v0/me/cards/%s/transactions/%s/cancel", MOCK_URL, "foo", "bar")); }
Source:
<code><START> public void validateDetailCount(ConcurStandardAccountingExtractFile concurStandardAccountingExtractFile) throws ValidationException { <END> Integer numberOfDetailsInHeader = concurStandardAccountingExtractFile.getRecordCount(); int actualNumberOfDetails = concurStandardAccountingExtractFile.getConcurStandardAccountingExtractDetailLines().size(); if (numberOfDetailsInHeader.intValue() != actualNumberOfDetails) { String message = "The header said there were " + numberOfDetailsInHeader + " the but the actual number of details was " + actualNumberOfDetails; LOG.debug("validateDetailCount, " + message); throw new ValidationException(message); } else { if (LOG.isDebugEnabled()) { LOG.debug("validateDetailCount, Number of detail lines is what we expected."); } } }</code><technical_language>I cleaner for this method return true/false log error throw ValidationException. care log a valid value</technical_language>

Target:
public boolean validateDetailCount(ConcurStandardAccountingExtractFile concurStandardAccountingExtractFile) { Integer numberOfDetailsInHeader = concurStandardAccountingExtractFile.getRecordCount(); int actualNumberOfDetails = concurStandardAccountingExtractFile.getConcurStandardAccountingExtractDetailLines().size(); boolean valid = numberOfDetailsInHeader.intValue() == actualNumberOfDetails; if (valid) { LOG.debug("validateDetailCount, Number of detail lines is what we expected: " + actualNumberOfDetails); } else { LOG.error("validateDetailCount, The header said there were (" + numberOfDetailsInHeader + ") detail lines expected, but the actual number of details were (" + actualNumberOfDetails + ")"); } return valid; }
Source:
<code>public AnalyzerProvider() { factTypes.add( new FactTypes.FactType( "Applicant", <START> new HashSet<FactTypes.Field>() {{ <END> add( new FactTypes.Field( "age", DataType.TYPE_NUMERIC_INTEGER ) ); }} ) ); factTypes.add( new FactTypes.FactType( "Account", new HashSet<FactTypes.Field>() {{ add( new FactTypes.Field( "deposit", DataType.TYPE_NUMERIC_DOUBLE ) ); }} ) ); factTypes.add( new FactTypes.FactType( "Person", new HashSet<FactTypes.Field>() {{ add( new FactTypes.Field( "age", DataType.TYPE_NUMERIC_INTEGER ) ); add( new FactTypes.Field( "name", DataType.TYPE_STRING ) ); add( new FactTypes.Field( "lastName", DataType.TYPE_STRING ) ); add( new FactTypes.Field( "description", DataType.TYPE_STRING ) ); add( new FactTypes.Field( "approved", DataType.TYPE_BOOLEAN ) ); add( new FactTypes.Field( "salary", DataType.TYPE_NUMERIC_INTEGER ) ); }} ) ); }</code><technical_language>need modify Set later, Collections.singleton(...) work bring nicer code</technical_language>

Target:
public AnalyzerProvider() { factTypes.add(new FactTypes.FactType("Applicant", Collections.singleton(new FactTypes.Field("age", DataType.TYPE_NUMERIC_INTEGER)))); factTypes.add(new FactTypes.FactType("Account", new HashSet<FactTypes.Field>() {{ add(new FactTypes.Field("deposit", DataType.TYPE_NUMERIC_DOUBLE)); }})); factTypes.add(new FactTypes.FactType("Person", new HashSet<FactTypes.Field>() {{ add(new FactTypes.Field("age", DataType.TYPE_NUMERIC_INTEGER)); add(new FactTypes.Field("name", DataType.TYPE_STRING)); add(new FactTypes.Field("lastName", DataType.TYPE_STRING)); add(new FactTypes.Field("description", DataType.TYPE_STRING)); add(new FactTypes.Field("approved", DataType.TYPE_BOOLEAN)); add(new FactTypes.Field("salary", DataType.TYPE_NUMERIC_INTEGER)); }})); }
Source:
<code>void deleteIfManaged() throws InfrastructureException { KubernetesClient client = clientFactory.create(workspaceId); if (!isNamespaceManaged(client)) { <START> LOG.debug( <END> "Namespace for workspace is not marked as managed. Ignoring the delete request.", name, workspaceId); return; } try { delete(name, client); } catch (KubernetesClientException e) { if (e.getCode() == 403) { throw new InfrastructureException( format( "Could not access the namespace %s when deleting it for workspace %s", name, workspaceId), e); } throw new KubernetesInfrastructureException(e); } }</code><technical_language>sense print Log.info instead. admin understand namespace is deleted workspace creation</technical_language>

Target:
void deleteIfManaged() throws InfrastructureException { KubernetesClient client = clientFactory.create(workspaceId); if (!isNamespaceManaged(client)) { LOG.info( "Namespace for workspace is not marked as managed. Ignoring the delete request.", name, workspaceId); return; } try { delete(name, client); } catch (KubernetesClientException e) { if (e.getCode() == 403) { throw new InfrastructureException( format( "Could not access the namespace %s when deleting it for workspace %s", name, workspaceId), e); } throw new KubernetesInfrastructureException(e); } }
Source:
<code>public IdentityProvider[] getAllIdPs() throws IdentityProviderManagementException { try { String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); List<IdentityProvider> identityProviders = IdentityProviderManager.getInstance().getIdPs(tenantDomain); for (int i = 0; i < identityProviders.size(); i++) { String providerName = identityProviders.get(i).getIdentityProviderName(); if (providerName != null && providerName.startsWith(IdPManagementConstants.SHARED_IDP_PREFIX)) { identityProviders.remove(i); i--; } } return identityProviders.toArray(new IdentityProvider[identityProviders.size()]); } catch (IdentityProviderManagementException idpException) { <START> log.error("Error while getting IdPs", idpException); <END> throw idpException; } }</code><technical_language>log tenantDomain if</technical_language>

Target:
public IdentityProvider[] getAllIdPs() throws IdentityProviderManagementException { String tenantDomain = ""; try { tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); List<IdentityProvider> identityProviders = IdentityProviderManager.getInstance().getIdPs(tenantDomain); for (int i = 0; i < identityProviders.size(); i++) { String providerName = identityProviders.get(i).getIdentityProviderName(); if (providerName != null && providerName.startsWith(IdPManagementConstants.SHARED_IDP_PREFIX)) { identityProviders.remove(i); i--; } } return identityProviders.toArray(new IdentityProvider[identityProviders.size()]); } catch (IdentityProviderManagementException idpException) { log.error("Error while getting IdPs in tenantDomain : " + tenantDomain, idpException); throw idpException; } }
Source:
<code>public Optional<KiePMMLModel> getModel(String modelName) { <START> logger.trace("getModel {}", modelName); <END> return KnowledgeBaseUtils.getModel(knowledgeBase, modelName); }</code><technical_language>please add isTraceEnabled check</technical_language>

Target:
public Optional<KiePMMLModel> getModel(String modelName) { return KnowledgeBaseUtils.getModel(knowledgeBase, modelName); }
Source:
<code>public boolean validate() { getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(40), new LengthValidation(getMaxNameLength()), new AsciiNameValidation() }); getStorageTypeList().validateSelectedItem(new IValidation[] { new NotEmptyValidation() }); getVersion().validateSelectedItem(new IValidation[] { new NotEmptyValidation() }); getDescription().validateEntity(new IValidation[] { new AsciiOrNoneValidation() }); <START> getComment().validateEntity(new IValidation[] { new AsciiOrNoneValidation() }); <END> return getName().getIsValid() && getDescription().getIsValid() && getComment().getIsValid() && getStorageTypeList().getIsValid() && getVersion().getIsValid(); }</code><technical_language>issue I18N? I validated SpecialAsciiI18NOrNoneValidation</technical_language>

Target:
public boolean validate() { getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(40), new LengthValidation(getMaxNameLength()), new AsciiNameValidation() }); getStorageTypeList().validateSelectedItem(new IValidation[] { new NotEmptyValidation() }); getVersion().validateSelectedItem(new IValidation[] { new NotEmptyValidation() }); getDescription().validateEntity(new IValidation[] { new AsciiOrNoneValidation() }); getComment().validateEntity(new IValidation[] { new SpecialAsciiI18NOrNoneValidation() }); return getName().getIsValid() && getDescription().getIsValid() && getComment().getIsValid() && getStorageTypeList().getIsValid() && getVersion().getIsValid(); }
Source:
<code>public void prepare(Object o) { executor = MoreExecutors.listeningDecorator(newFixedThreadPoolWithQueueSize(5, 20)); Preconditions.checkNotNull(providerQueue); Preconditions.checkNotNull(this.klass); Preconditions.checkNotNull(config.getOauth().getConsumerKey()); Preconditions.checkNotNull(config.getOauth().getConsumerSecret()); Preconditions.checkNotNull(config.getOauth().getAccessToken()); Preconditions.checkNotNull(config.getOauth().getAccessTokenSecret()); Preconditions.checkNotNull(config.getFollow()); idsCount = config.getFollow().size(); ids = config.getFollow().iterator(); jsonStoreEnabled = Optional.fromNullable(new Boolean(Boolean.parseBoolean(config.getJsonStoreEnabled()))).or(true); includeEntitiesEnabled = Optional.fromNullable(new Boolean(Boolean.parseBoolean(config.getIncludeEntities()))).or(true); client = getTwitterClient(); <START> providerQueue = constructQueue(); <END> }</code><technical_language>time replace reference queue, do a write lock</technical_language>

Target:
public void prepare(Object o) { executor = MoreExecutors.listeningDecorator(newFixedThreadPoolWithQueueSize(5, 20)); try { lock.writeLock().lock(); providerQueue = constructQueue(); } finally { lock.writeLock().unlock(); } Preconditions.checkNotNull(providerQueue); Preconditions.checkNotNull(this.klass); Preconditions.checkNotNull(config.getOauth().getConsumerKey()); Preconditions.checkNotNull(config.getOauth().getConsumerSecret()); Preconditions.checkNotNull(config.getOauth().getAccessToken()); Preconditions.checkNotNull(config.getOauth().getAccessTokenSecret()); Preconditions.checkNotNull(config.getFollow()); idsCount = config.getFollow().size(); ids = config.getFollow().iterator(); jsonStoreEnabled = Optional.fromNullable(new Boolean(Boolean.parseBoolean(config.getJsonStoreEnabled()))).or(true); includeEntitiesEnabled = Optional.fromNullable(new Boolean(Boolean.parseBoolean(config.getIncludeEntities()))).or(true); client = getTwitterClient(); }
Source:
<code>public Map<String, Object> aggregate(long windowId, Collection<AutoMetric.PhysicalMetricsContext> physicalMetrics) { <START> return null; <END> }</code><technical_language>I this test aggregator method do something, verify result in testDefaultMetricsAggregator method</technical_language>

Target:
public Map<String, Object> aggregate(long windowId, Collection<AutoMetric.PhysicalMetricsContext> physicalMetrics) { result.put("progress", physicalMetrics.iterator().next().getMetrics().get("progress")); latch.countDown(); return result; }
Source:
<code>void closeAllWriters() { if (m_hasClosed) return; for (Entry<FileHandle, CSVWriter> entry : m_writers.entrySet()) { CSVWriter writer = entry.getValue(); if (writer == null) { m_logger.info("Null writer found for: " + entry.getKey().toString()); continue; } try { writer.flush(); writer.close(); } catch (IOException e) { <START> m_logger.error("Failed to flush or close file, " + entry.getKey().getActivePath() + <END> ". Export file may be unavailable/unwritable, or not enough space.", e); } finally { if (writer.checkError()) { m_logger.error("Failed to flush or close file, " + entry.getKey().getActivePath() + ". Export file may be unavailable/unwritable, or not enough space."); } } } if (m_batched) { closeBatch(); } else { closeFiles(); } m_writers.clear(); m_hasClosed = true; }</code><technical_language>Nit: I comma preceding file path is grammatically redundant in messages. Instead of "Failed flush close file, /foo/bar" "Failed flush close file, /foo/bar", surround file path double quotes</technical_language>

Target:
void closeAllWriters() { if (m_hasClosed) return; for (Entry<FileHandle, CSVWriter> entry : m_writers.entrySet()) { CSVWriter writer = entry.getValue(); if (writer == null) { m_logger.info("Null writer found for: " + entry.getKey().toString()); continue; } try { writer.flush(); writer.close(); } catch (IOException e) { m_logger.error("Failed to flush or close file '" + entry.getKey().getActivePath() + "'. Export file may be unavailable/unwritable, or not enough space.", e); } finally { if (writer.checkError()) { m_logger.error("Failed to flush or close file '" + entry.getKey().getActivePath() + "'. Export file may be unavailable/unwritable, or not enough space."); } } } if (m_batched) { closeBatch(); } else { closeFiles(); } m_writers.clear(); m_hasClosed = true; }
Source:
<code>public ReadMapContextJob(MapElement editableMap) { this.editableMap = editableMap; <START> Services.registerService(MapElement.class, <END> I18N.tr("Access to the MapElement"), editableMap); }</code><technical_language>Map element is a service. create another instance it</technical_language>

Target:
public ReadMapContextJob(MapElement editableMap) { this.editableMap = editableMap; }
Source:
<code>protected ExecutorService getDeferredCloseExecutor() { if (null != getExecutorService()) { return getExecutorService(); } synchronized (this.connectionMonitor) { if (null == this.deferredCloseExecutor) { this.deferredCloseExecutor = <START> Executors.newCachedThreadPool(new AmqpNamedThreadPoolFactory()); <END> } } return this.deferredCloseExecutor; }</code><technical_language>Inconsistent tab/space indentation - exclusively tabs</technical_language>

Target:
protected ExecutorService getDeferredCloseExecutor() { if (null != getExecutorService()) { return getExecutorService(); } synchronized (this.connectionMonitor) { if (null == this.deferredCloseExecutor) { final String threadPrefix = (null == getBeanName()) ? DEFAULT_DEFERRED_POOL_PREFIX + threadPoolId.incrementAndGet() : getBeanName(); ThreadFactory threadPoolFactory = new CustomizableThreadFactory(threadPrefix); this.deferredCloseExecutor = Executors.newCachedThreadPool(threadPoolFactory); } } return this.deferredCloseExecutor; }
Source:
<code>public SAMRecord next() { if (!hasNext()) { <START> return null; <END> } return nextUnalignment(); }</code><technical_language>NoSuchElementException</technical_language>

Target:
public SAMRecord next() { if (!hasNext()) { throw new NoSuchElementException("No more alignments are available"); } return nextUnalignment(); }
Source:
<code>protected NuxeoPrincipal getAuthor(DocumentModel docModel) { String author = null; if (docModel.hasSchema(COMMENT_SCHEMA)) { author = (String) docModel.getPropertyValue(COMMENT_AUTHOR); } if (StringUtils.isBlank(author)) { String[] contributors = (String[]) docModel.getPropertyValue("dc:contributors"); author = contributors[0]; } NuxeoPrincipal principal = Framework.getService(UserManager.class).getPrincipal(author); if (principal == null) { <START> log.debug("Principal not found: " + principal); <END> } return principal; }</code><technical_language>suggestion log.debug("Principal for: {}, author);</technical_language>

Target:
protected NuxeoPrincipal getAuthor(DocumentModel docModel) { String author = null; if (docModel.hasSchema(COMMENT_SCHEMA)) { author = (String) docModel.getPropertyValue(COMMENT_AUTHOR); } if (StringUtils.isBlank(author)) { String[] contributors = (String[]) docModel.getPropertyValue("dc:contributors"); author = contributors[0]; } NuxeoPrincipal principal = Framework.getService(UserManager.class).getPrincipal(author); if (principal == null) { log.debug("Principal not found: " + author); } return principal; }
Source:
<code>private void verifyValidDestination(RepositoryObject destObj, PID pid) { RepositoryObject moveObj = repositoryObjectLoader.getRepositoryObject(pid); if (destObj instanceof AdminUnit) { if (!(moveObj instanceof CollectionObject)) { throw new IllegalArgumentException( "Object with pid: " + pid + " is not a collection and cannot be added to an admin unit"); } } else if (destObj instanceof CollectionObject) { if (!(moveObj instanceof FolderObject) && !(moveObj instanceof WorkObject)) { throw new IllegalArgumentException( "Object with pid: " + pid + " is not a folder or a work and cannot be added to a collection"); } } else if (destObj instanceof FolderObject) { if (!(moveObj instanceof FolderObject) && !(moveObj instanceof WorkObject)) { throw new IllegalArgumentException( "Object with pid: " + pid + " is not a folder or a work and cannot be added to a folder"); } } else if (destObj instanceof WorkObject) { if (!(moveObj instanceof FileObject)) { throw new IllegalArgumentException( "Object with pid: " + pid + " is not a file and cannot be added to a work"); } } else { throw new IllegalArgumentException( <START> "Object with pid: " + pid + " is not a container"); <END> } }</code><technical_language>"Object pid: \<pid\> added destination"</technical_language>

Target:
private void verifyValidDestination(RepositoryObject destObj, PID pid) { RepositoryObject moveObj = repositoryObjectLoader.getRepositoryObject(pid); if (destObj instanceof AdminUnit) { if (!(moveObj instanceof CollectionObject)) { throw new IllegalArgumentException( "Object with pid: " + pid + " is not a collection and cannot be added to an admin unit"); } } else if (destObj instanceof CollectionObject) { if (!(moveObj instanceof FolderObject) && !(moveObj instanceof WorkObject)) { throw new IllegalArgumentException( "Object with pid: " + pid + " is not a folder or a work and cannot be added to a collection"); } } else if (destObj instanceof FolderObject) { if (!(moveObj instanceof FolderObject) && !(moveObj instanceof WorkObject)) { throw new IllegalArgumentException( "Object with pid: " + pid + " is not a folder or a work and cannot be added to a folder"); } } else if (destObj instanceof WorkObject) { if (!(moveObj instanceof FileObject)) { throw new IllegalArgumentException( "Object with pid: " + pid + " is not a file and cannot be added to a work"); } } else { throw new IllegalArgumentException( "Object with pid: " + pid + " cannot be added to destination"); } }
Source:
<code>private void startWsAgentComponents(final Iterator<Provider<WsAgentComponent>> componentProviderIterator) { if (componentProviderIterator.hasNext()) { Provider<WsAgentComponent> componentProvider = componentProviderIterator.next(); final WsAgentComponent component = componentProvider.get(); component.start(new Callback<WsAgentComponent, Exception>() { @Override public void onSuccess(WsAgentComponent result) { <START> Log.error(component.getClass(), result); <END> startWsAgentComponents(componentProviderIterator); } @Override public void onFailure(Exception reason) { Log.error(component.getClass(), reason); initializationFailed(reason.getMessage()); } }); } }</code><technical_language>debug output</technical_language>

Target:
private void startWsAgentComponents(final Iterator<Provider<WsAgentComponent>> componentProviderIterator) { if (componentProviderIterator.hasNext()) { Provider<WsAgentComponent> componentProvider = componentProviderIterator.next(); final WsAgentComponent component = componentProvider.get(); component.start(new Callback<WsAgentComponent, Exception>() { @Override public void onSuccess(WsAgentComponent result) { startWsAgentComponents(componentProviderIterator); } @Override public void onFailure(Exception reason) { Log.error(component.getClass(), reason); initializationFailed(reason.getMessage()); } }); } }
Source:
<code>public MerlinBuilder withRxCallbacks() { rxCallbacksManager = new RxCallbacksManager(); if (connectableRegisterer == null && disconnectableRegisterer == null) { return this.withConnectableCallbacks().withDisconnectableCallbacks(); } else if (connectableRegisterer == null) { return this.withConnectableCallbacks(); } else if (disconnectableRegisterer == null) { return this.withDisconnectableCallbacks(); } <START> return this; <END> }</code><technical_language>this block simplified? java public MerlinBuilder withRxCallbacks() { rxCallbacksManager = new RxCallbacksManager(); if (connectableRegisterer == null) { withConnectableCallbacks(); } if (disconnectableRegisterer == null) { withDisconnectableCallbacks(); } return this; }</technical_language>

Target:
public MerlinBuilder withRxCallbacks() { rxCallbacksManager = new RxCallbacksManager(); if (connectableRegisterer == null) { withConnectableCallbacks(); } if (disconnectableRegisterer == null) { withDisconnectableCallbacks(); } return this; }
Source:
<code>private void waitForFeatures(Set<Feature> features) throws InterruptedException { final String featuresNamesString = StringUtils.join(features, ", "); LOGGER.trace("Waiting for features {}", featuresNamesString); long timeoutLimit = System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(BUNDLE_WAIT_TIMEOUT); boolean starting = true; while (starting) { BundleStateSet bundleStates = getCurrentBundleStates(features); if (!bundleStates.getTransitionalBundles().isEmpty()) { if (System.currentTimeMillis() > timeoutLimit) { break; } if (LOGGER.isTraceEnabled()) { LOGGER.trace( "Waiting for the following bundles to become ACTIVE: {}", bundleStates .getTransitionalBundles() .stream() .map(Object::toString) .collect(Collectors.joining(", "))); } synchronized (this) { <START> this.wait(TimeUnit.SECONDS.toMillis(1)); <END> } } else { starting = false; } } }</code><technical_language>Meh. a wait() a sleep(). is notifying</technical_language>

Target:
private void waitForFeatures(Set<Feature> features) throws InterruptedException { final String featuresNamesString = StringUtils.join(features, ", "); LOGGER.trace("Waiting for features {}", featuresNamesString); long timeoutLimit = System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(BUNDLE_WAIT_TIMEOUT); boolean starting = true; while (starting) { BundleStateSet bundleStates = getCurrentBundleStates(features); if (!bundleStates.getTransitionalBundles().isEmpty()) { if (System.currentTimeMillis() > timeoutLimit) { break; } if (LOGGER.isTraceEnabled()) { LOGGER.trace( "Waiting for the following bundles to become ACTIVE: {}", bundleStates .getTransitionalBundles() .stream() .map(Object::toString) .collect(Collectors.joining(", "))); } TimeUnit.MILLISECONDS.sleep(1); } else { starting = false; } } }
Source:
<code>public void passivate(InternalCacheEntry entry) { Object key; <START> if (enabled && (key = entry.getKey()) != null && <END> (distributionManager == null || distributionManager.getLocality(key).isLocal())) { notifier.notifyCacheEntryPassivated(key, entry.getValue(), true, ImmutableContext.INSTANCE, null); if (trace) log.tracef("Passivating entry %s", key); try { MarshalledEntry marshalledEntry = marshalledEntryFactory.newMarshalledEntry(entry.getKey(), entry.getValue(), internalMetadata(entry)); persistenceManager.writeToAllStores(marshalledEntry, false); if (statsEnabled) passivations.getAndIncrement(); } catch (CacheException e) { log.unableToPassivateEntry(key, e); } notifier.notifyCacheEntryPassivated(key, null, false, ImmutableContext.INSTANCE, null); } }</code><technical_language>key is null</technical_language>

Target:
public void passivate(InternalCacheEntry entry) { Object key; if (enabled && entry != null && !isL1Key(key = entry.getKey())) { notifier.notifyCacheEntryPassivated(key, entry.getValue(), true, ImmutableContext.INSTANCE, null); if (trace) log.tracef("Passivating entry %s", key); try { MarshalledEntry marshalledEntry = marshalledEntryFactory.newMarshalledEntry(entry.getKey(), entry.getValue(), internalMetadata(entry)); persistenceManager.writeToAllStores(marshalledEntry, false); if (statsEnabled) passivations.getAndIncrement(); } catch (CacheException e) { log.unableToPassivateEntry(key, e); } notifier.notifyCacheEntryPassivated(key, null, false, ImmutableContext.INSTANCE, null); } }
Source:
<code>public Object postProcessAfterInitialization(final Object bean, final String beanName) throws BeansException { <START> if (beanName != null && !bean.equals(null) && beanFactory.containsBean(beanName) && !beanFactory.isSingleton(beanName)) { <END> return bean; } Class<?> targetClass = bean.getClass(); final ClassLoader classLoader = targetClass.getClassLoader(); if (parameterResolverFactory == null) { parameterResolverFactory = ClasspathParameterResolverFactory.forClassLoader(classLoader); } if (handlerDefinition == null) { handlerDefinition = ClasspathHandlerDefinition.forClassLoader(classLoader); } if (isPostProcessingCandidate(targetClass)) { T adapter = initializeAdapterFor(bean, parameterResolverFactory, handlerDefinition); return createAdapterProxy(bean, adapter, getAdapterInterfaces(), true, classLoader); } else if (!isInstance(bean, getAdapterInterfaces()) && isPostProcessingCandidate(AopProxyUtils.ultimateTargetClass(bean))) { try { Object targetBean = ((Advised) bean).getTargetSource().getTarget(); Object proxyInvokingBean = createJavaProxyInvoker(bean, targetBean); T adapter = initializeAdapterFor(proxyInvokingBean, parameterResolverFactory, handlerDefinition); return createAdapterProxy(proxyInvokingBean, adapter, getAdapterInterfaces(), false, classLoader); } catch (Exception e) { throw new AxonConfigurationException("Unable to wrap annotated handler.", e); } } return bean; }</code><technical_language>!bean.equals(null) -> lol</technical_language>

Target:
public Object postProcessAfterInitialization(final Object bean, final String beanName) throws BeansException { if (beanName != null && !isNullBean(bean) && beanFactory.containsBean(beanName) && !beanFactory.isSingleton(beanName)) { return bean; } Class<?> targetClass = bean.getClass(); final ClassLoader classLoader = targetClass.getClassLoader(); if (parameterResolverFactory == null) { parameterResolverFactory = ClasspathParameterResolverFactory.forClassLoader(classLoader); } if (handlerDefinition == null) { handlerDefinition = ClasspathHandlerDefinition.forClassLoader(classLoader); } if (isPostProcessingCandidate(targetClass)) { T adapter = initializeAdapterFor(bean, parameterResolverFactory, handlerDefinition); return createAdapterProxy(bean, adapter, getAdapterInterfaces(), true, classLoader); } else if (!isInstance(bean, getAdapterInterfaces()) && isPostProcessingCandidate(AopProxyUtils.ultimateTargetClass(bean))) { try { Object targetBean = ((Advised) bean).getTargetSource().getTarget(); Object proxyInvokingBean = createJavaProxyInvoker(bean, targetBean); T adapter = initializeAdapterFor(proxyInvokingBean, parameterResolverFactory, handlerDefinition); return createAdapterProxy(proxyInvokingBean, adapter, getAdapterInterfaces(), false, classLoader); } catch (Exception e) { throw new AxonConfigurationException("Unable to wrap annotated handler.", e); } } return bean; }
Source:
<code>private List<AliasMetaData> convertAliasResponse(String aliasResponse) { ObjectMapper mapper = new ObjectMapper(); try { JsonNode node = mapper.readTree(aliasResponse); node = node.findValue("aliases"); <START> if (node == null) <END> return Collections.emptyList(); Map<String, AliasData> aliasData = mapper.readValue(mapper.writeValueAsString(node), new TypeReference<Map<String, AliasData>>() {}); Iterable<Map.Entry<String, AliasData>> aliasIter = aliasData.entrySet(); List<AliasMetaData> aliasMetaDataList = new ArrayList<AliasMetaData>(); for (Map.Entry<String, AliasData> aliasentry : aliasIter) { AliasData data = aliasentry.getValue(); aliasMetaDataList.add(AliasMetaData.newAliasMetaDataBuilder(aliasentry.getKey()).filter(data.getFilter()) .routing(data.getRouting()).searchRouting(data.getSearch_routing()).indexRouting(data.getIndex_routing()) .build()); } return aliasMetaDataList; } catch (IOException e) { throw new ElasticsearchException("Could not map alias response : " + aliasResponse, e); } }</code><technical_language>Nit: Wrap return { }</technical_language>

Target:
private List<AliasMetaData> convertAliasResponse(String aliasResponse) { ObjectMapper mapper = new ObjectMapper(); try { JsonNode node = mapper.readTree(aliasResponse); node = node.findValue("aliases"); if (node == null) { return Collections.emptyList(); } Map<String, AliasData> aliasData = mapper.readValue(mapper.writeValueAsString(node), new TypeReference<Map<String, AliasData>>() {}); Iterable<Map.Entry<String, AliasData>> aliasIter = aliasData.entrySet(); List<AliasMetaData> aliasMetaDataList = new ArrayList<AliasMetaData>(); for (Map.Entry<String, AliasData> aliasentry : aliasIter) { AliasData data = aliasentry.getValue(); aliasMetaDataList.add(AliasMetaData.newAliasMetaDataBuilder(aliasentry.getKey()).filter(data.getFilter()) .routing(data.getRouting()).searchRouting(data.getSearch_routing()).indexRouting(data.getIndex_routing()) .build()); } return aliasMetaDataList; } catch (IOException e) { throw new ElasticsearchException("Could not map alias response : " + aliasResponse, e); } }