auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException { super.onLoad(parent, name); if (buildMixIn == null) { buildMixIn = createBuildMixIn(); } buildMixIn.onLoad(parent, name); builds = buildMixIn.getRunMap(); triggers().setOwner(this); for (Trigger t : triggers()) { try { t.start(this, Items.currentlyUpdatingByXml()); <START> } catch (Exception e) { <END> Logger.getLogger(AbstractProject.class.getName()).log(Level.WARNING, "could not start trigger '" + t + "' while loading project '" + name + "'", e); } } if(scm==null) scm = new NullSCM(); if(transientActions==null) transientActions = new Vector<Action>(); updateTransientActions(); }</code><technical_language>Throwable here</technical_language>

Target:
public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException { super.onLoad(parent, name); if (buildMixIn == null) { buildMixIn = createBuildMixIn(); } buildMixIn.onLoad(parent, name); builds = buildMixIn.getRunMap(); triggers().setOwner(this); for (Trigger t : triggers()) { try { t.start(this, Items.currentlyUpdatingByXml()); } catch (Throwable e) { LOGGER.log(Level.WARNING, "could not start trigger while loading project '" + getFullName() + "'", e); } } if(scm==null) scm = new NullSCM(); if(transientActions==null) transientActions = new Vector<Action>(); updateTransientActions(); }
Source:
<code>private void setPropertyIfMetadataPresent( Node node, String propertyName, Object value ) throws RepositoryException { if (value != null) { if (value instanceof String && !StringUtil.isBlank((String) value)) { node.setProperty(propertyName, (String) value); } else if (value instanceof Boolean) { node.setProperty(propertyName, (Boolean) value); } else if (value instanceof Long) { node.setProperty(propertyName, (Long) value); } else if (value instanceof Integer) { node.setProperty(propertyName, new Long((Integer) value)); } else if (value instanceof Double) { node.setProperty(propertyName, (Double) value); } else if (value instanceof Calendar) { node.setProperty(propertyName, (Calendar) value); } else if (value instanceof byte[]) { InputStream is = new ByteArrayInputStream((byte []) value); javax.jcr.Binary binaryProperty = node.getSession().getValueFactory().createBinary(is); node.setProperty(propertyName, binaryProperty); } else if (value instanceof List<?>) { ValueFactory vf = node.getSession().getValueFactory(); List<Value> values = new ArrayList<Value>(); for (Object val : (List<?>) value) { if (val instanceof String) { values.add(vf.createValue((String) val)); } } if (values.size() > 0) { Value[] valuesArray = new Value[values.size()]; values.toArray(valuesArray); node.setProperty(propertyName, valuesArray); } } else { <START> throw new IllegalArgumentException(String.format("The value of the property %s has unknown type and couldn't be saved.", propertyName)); <END> } } }</code><technical_language>do want throw exception ? logging a warning continuing more</technical_language>

Target:
private void setPropertyIfMetadataPresent( Node node, String propertyName, Object value ) throws RepositoryException { if (value != null) { if (value instanceof String && !StringUtil.isBlank((String) value)) { node.setProperty(propertyName, (String) value); } else if (value instanceof Boolean) { node.setProperty(propertyName, (Boolean) value); } else if (value instanceof Long) { node.setProperty(propertyName, (Long) value); } else if (value instanceof Integer) { node.setProperty(propertyName, new Long((Integer) value)); } else if (value instanceof Double) { node.setProperty(propertyName, (Double) value); } else if (value instanceof Calendar) { node.setProperty(propertyName, (Calendar) value); } else if (value instanceof byte[]) { InputStream is = new ByteArrayInputStream((byte []) value); javax.jcr.Binary binaryProperty = node.getSession().getValueFactory().createBinary(is); node.setProperty(propertyName, binaryProperty); } else if (value instanceof List<?>) { ValueFactory vf = node.getSession().getValueFactory(); List<Value> values = new ArrayList<Value>(); for (Object val : (List<?>) value) { if (val instanceof String) { values.add(vf.createValue((String) val)); } } if (values.size() > 0) { node.setProperty(propertyName, values.toArray(new Value[values.size()])); } } else { throw new IllegalArgumentException(String.format("The value of the property %s has unknown type and couldn't be saved.", propertyName)); } } }
Source:
<code>protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException { Query<Boolean> connectQuery = new Query<Boolean>() { @Override public void execute(DataRequestMonitor<Boolean> rm) { connect(rm); } }; try { fExecutor.execute(connectQuery); connectQuery.get(); } catch (InterruptedException e) { } catch (ExecutionException e) { } catch (CancellationException e) { <START> System.out.println(); <END> } catch (RejectedExecutionException e) { } }</code><technical_language>I guess this is removed</technical_language>

Target:
protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException { Query<Boolean> connectQuery = new Query<Boolean>() { @Override public void execute(DataRequestMonitor<Boolean> rm) { connect(rm); } }; try { fExecutor.execute(connectQuery); connectQuery.get(); } catch (InterruptedException e) { } catch (ExecutionException e) { } catch (CancellationException e) { } catch (RejectedExecutionException e) { } }
Source:
<code>void send(Feature feature, FeatureStateStorageWrapper storageWrapper) { String featureName = feature.name(); try { LOG.info("Starting to update state of feature {}.", featureName); String featureStateAsString = serialize(storageWrapper); LOG.info("Successfully serialized state of feature {}.", featureName); producer.send(buildRecord(featureName, featureStateAsString), buildCallback(featureName)); <START> } catch (Exception e) { <END> LOG.error("An error occurred while updating state of feature {}.", featureName, e); } }</code><technical_language>RuntimeException sufficient</technical_language>

Target:
private void send(Feature feature, FeatureStateStorageWrapper storageWrapper) { String featureName = feature.name(); try { LOG.debug("Starting to update state of feature {}.", featureName); String featureStateAsString = serialize(storageWrapper); LOG.debug("Successfully serialized state of feature {}.", featureName); producer.send(buildRecord(featureName, featureStateAsString), buildCallback(featureName)); } catch (Exception e) { LOG.error("An error occurred while updating state of feature {}.", featureName, e); } }
Source:
<code>public AbstractUID(List<String> segments) { int minNumberOfSegments = getMinimalNumberOfSegments(); int numberOfSegments = segments.size(); if (numberOfSegments < minNumberOfSegments) { throw new IllegalArgumentException( String.format("UID must have at least %d segments.", minNumberOfSegments)); } for (int i = 0; i < numberOfSegments; i++) { String segment = segments.get(i); validateSegment(segment, i, numberOfSegments); } <START> this.segments = segments; <END> }</code><technical_language>I missed point some time... list is supplied caller ensure if changes list UID generation internals of UID object changed anymore. This call changed similar to: this.segments = Collections.unmodifiableList(new ArrayList<>(segments));</technical_language>

Target:
public AbstractUID(List<String> segments) { int minNumberOfSegments = getMinimalNumberOfSegments(); int numberOfSegments = segments.size(); if (numberOfSegments < minNumberOfSegments) { throw new IllegalArgumentException( String.format("UID must have at least %d segments.", minNumberOfSegments)); } for (int i = 0; i < numberOfSegments; i++) { String segment = segments.get(i); validateSegment(segment, i, numberOfSegments); } this.segments = Collections.unmodifiableList(new ArrayList<>(segments)); }
Source:
<code>private void runPlumberAPI() { source_.withSaveFilesBeforeCommand(new Command() { @Override public void execute() { events_.fireEvent(new LaunchPlumberAPIEvent(getPath())); } }, new Command() { public void execute() { <START> } <END> }, "Run Plumber API"); }</code><technical_language>lambda: () -> {}</technical_language>

Target:
private void runPlumberAPI() { source_.withSaveFilesBeforeCommand(new Command() { @Override public void execute() { events_.fireEvent(new LaunchPlumberAPIEvent(getPath())); } }, () -> {}, "Run Plumber API"); }
Source:
<code>private void initServerBootstrap() { eventLoopGroup = new NioEventLoopGroup(); serverBootstrap = new ServerBootstrap() <START> .group(eventLoopGroup) <END> .channel(NioServerSocketChannel.class) .childHandler(new RestfulServiceChannelInitializer(configuration)); }</code><technical_language>Do need boss worker group ? worker group size is CPU * 2 + 1 default</technical_language>

Target:
private void initServerBootstrap() { bossEventLoopGroup = new NioEventLoopGroup(); workerEventLoopGroup = new NioEventLoopGroup(DEFAULT_WORKER_GROUP_THREADS); serverBootstrap = new ServerBootstrap() .group(bossEventLoopGroup, workerEventLoopGroup) .channel(NioServerSocketChannel.class) .childHandler(new RestfulServiceChannelInitializer(configuration)); }
Source:
<code>private void installPendingUpdate() { InstallStagedUpdateTask<LoginActivity> task = new InstallStagedUpdateTask<LoginActivity>(TASK_UPGRADE_INSTALL) { @Override protected void deliverResult(LoginActivity receiver, AppInstallStatus result) { if (result == AppInstallStatus.Installed) { <START> Toast.makeText(LoginActivity.this, <END> Localization.get("login.update.install.success"), Toast.LENGTH_LONG).show(); } else { CommCareApplication._().reportNotificationMessage(NotificationMessageFactory.message(result)); } } @Override protected void deliverUpdate(LoginActivity receiver, int[]... update) { } @Override protected void deliverError(LoginActivity receiver, Exception e) { e.printStackTrace(); Log.e(TAG, "update installation on login failed: " + e.getMessage()); Toast.makeText(LoginActivity.this, Localization.get("login.update.install.success"), Toast.LENGTH_LONG).show(); } }; task.connect(this); task.execute(); }</code><technical_language>This bound receiver, this</technical_language>

Target:
private void installPendingUpdate() { InstallStagedUpdateTask<LoginActivity> task = new InstallStagedUpdateTask<LoginActivity>(TASK_UPGRADE_INSTALL) { @Override protected void deliverResult(LoginActivity receiver, AppInstallStatus result) { if (result == AppInstallStatus.Installed) { Toast.makeText(receiver, Localization.get("login.update.install.success"), Toast.LENGTH_LONG).show(); } else { CommCareApplication._().reportNotificationMessage(NotificationMessageFactory.message(result)); } localLoginOrPullAndLogin(); } @Override protected void deliverUpdate(LoginActivity receiver, int[]... update) { } @Override protected void deliverError(LoginActivity receiver, Exception e) { e.printStackTrace(); Log.e(TAG, "update installation on login failed: " + e.getMessage()); Toast.makeText(receiver, Localization.get("login.update.install.failure"), Toast.LENGTH_LONG).show(); localLoginOrPullAndLogin(); } }; task.connect(this); task.execute(); }
Source:
<code>public Selector build() { Preconditions.checkState(this.type != null); <START> boolean requiresLocation = this.arguments.containsKey("x") || this.arguments.containsKey("y") || this.arguments.containsKey("z") || this.arguments.containsKey("dx") || this.arguments.containsKey("dy") || this.arguments.containsKey("dz") || this.arguments.containsKey("rm") || this.arguments.containsKey("r") || (this.arguments.containsKey("c") && !this.type.equals(SelectorTypes.RANDOM_PLAYER)); <END> return new SpongeSelector(this.type, this.arguments, requiresLocation); }</code><technical_language>double check this some point</technical_language>

Target:
public Selector build() { Preconditions.checkState(this.type != null); boolean requiresLocation = Collections.disjoint(this.arguments.keySet(), LOCATION_DEPENDENT_ARGS) || this.type.equals(SelectorTypes.NEAREST_PLAYER) || (this.arguments.containsKey("c") && !this.type.equals(SelectorTypes.RANDOM_PLAYER)); return new SpongeSelector(this.type, this.arguments, requiresLocation); }
Source:
<code>private HoverDto hover(TextDocumentPositionParams positionParams) { String uri = prefixURI(positionParams.getTextDocument().getUri()); positionParams.getTextDocument().setUri(uri); positionParams.setUri(prefixURI(positionParams.getUri())); HoverDto result = new HoverDto(); result.setContents(new ArrayList<>()); try { List<InitializedLanguageServer> servers = languageServerRegistry.getApplicableLanguageServers(uri).stream() .flatMap(Collection::stream).collect(toList()); OperationUtil.doInParallel(servers, new LSOperation<InitializedLanguageServer, Hover>() { @Override public boolean canDo(InitializedLanguageServer element) { return truish(element.getInitializeResult().getCapabilities().getHoverProvider()); } @Override public CompletableFuture<Hover> start(InitializedLanguageServer element) { return element.getServer().getTextDocumentService().hover(positionParams); } @Override public boolean handleResult(InitializedLanguageServer element, Hover hover) { if (hover != null) { <START> List<Either<String, MarkedString>> contents = <END> hover.getContents().stream() .map((Function<Either<String, MarkedString>, Either<String, MarkedString>>)either -> { String left = either.getLeft(); if (left != null) { return Either.forLeft(left); } MarkedString right = new MarkedStringDto(either.getRight()); return Either.forRight(right); }).collect(toList()); result.getContents().addAll(contents); } return true; } }, 10000); return result; } catch (LanguageServerException e) { throw new JsonRpcException(-27000, e.getMessage()); } }</code><technical_language>is a constructor a HoverDto out of a Hover in generated HoverDto class. simpler safer one</technical_language>

Target:
private HoverDto hover(TextDocumentPositionParams positionParams) { String uri = prefixURI(positionParams.getTextDocument().getUri()); positionParams.getTextDocument().setUri(uri); positionParams.setUri(prefixURI(positionParams.getUri())); HoverDto result = new HoverDto(); result.setContents(new ArrayList<>()); try { List<InitializedLanguageServer> servers = languageServerRegistry.getApplicableLanguageServers(uri).stream() .flatMap(Collection::stream).collect(Collectors.toList()); OperationUtil.doInParallel(servers, new LSOperation<InitializedLanguageServer, Hover>() { @Override public boolean canDo(InitializedLanguageServer element) { return truish(element.getInitializeResult().getCapabilities().getHoverProvider()); } @Override public CompletableFuture<Hover> start(InitializedLanguageServer element) { return element.getServer().getTextDocumentService().hover(positionParams); } @Override public boolean handleResult(InitializedLanguageServer element, Hover hover) { if (hover != null) { HoverDto hoverDto = new HoverDto(hover); result.getContents().addAll(hoverDto.getContents()); } return true; } }, 10000); return result; } catch (LanguageServerException e) { throw new JsonRpcException(-27000, e.getMessage()); } }
Source:
<code>public void setContext( final ProjectContext context, final boolean includeDefaultPackage, final Command packagesLoadedCommand ) { noPackage(); packages.clear(); if ( context.getActiveProject() == null ) { return; } final Package activePackage = context.getActivePackage(); projectService.call( new RemoteCallback<Set<Package>>() { @Override public void callback( final Set<Package> pkgs ) { final List<Package> sortedPackages = new ArrayList<Package>(); sortedPackages.addAll( pkgs ); Collections.sort( sortedPackages, <START> new Comparator<Package>() { <END> @Override public int compare( final Package p1, final Package p2 ) { return p1.getCaption().compareTo( p2.getCaption() ); } } ); if ( !includeDefaultPackage ) { sortedPackages.remove( 0 ); } if ( sortedPackages.size() == 0 ) { return; } addPackagesToSelect( sortedPackages, activePackage ); if ( packagesLoadedCommand != null ) { packagesLoadedCommand.execute(); } } } ).resolvePackages( context.getActiveProject() ); }</code><technical_language>lamdas too..</technical_language>

Target:
public void setContext( final ProjectContext context, final boolean includeDefaultPackage, final Command packagesLoadedCommand ) { noPackage(); packages.clear(); if ( context.getActiveProject() == null ) { return; } final Package activePackage = context.getActivePackage(); projectService.call( new RemoteCallback<Set<Package>>() { @Override public void callback( final Set<Package> pkgs ) { final List<Package> sortedPackages = new ArrayList<Package>(); sortedPackages.addAll( pkgs ); Collections.sort( sortedPackages, ( p1, p2 ) -> p1.getCaption().compareTo( p2.getCaption() ) ); if ( !includeDefaultPackage ) { sortedPackages.remove( 0 ); } if ( sortedPackages.size() == 0 ) { return; } addPackagesToSelect( sortedPackages, activePackage ); if ( packagesLoadedCommand != null ) { packagesLoadedCommand.execute(); } } } ).resolvePackages( context.getActiveProject() ); }
Source:
<code>public Cluster create(AutoscaleStackV4Response stack) { Cluster cluster = new Cluster(); cluster.setStackName(stack.getName()); cluster.setStackCrn(stack.getStackCrn()); cluster.setStackId(stack.getStackId()); cluster.setStackType(stack.getStackType()); cluster.setTunnel(stack.getTunnel()); cluster.setState(ClusterState.PENDING); if (stack.getCloudPlatform() != null) { cluster.setCloudPlatform(stack.getCloudPlatform().toUpperCase()); } String gatewayPort = String.valueOf(stack.getGatewayPort()); ClusterManager clusterManager = new ClusterManager(stack.getClusterManagerIp(), gatewayPort, stack.getUserNamePath(), stack.getPasswordPath(), ClusterManagerVariant.CLOUDERA_MANAGER); cluster.setClusterManager(clusterManager); ClusterPertain clusterPertain = new ClusterPertain(stack.getTenant(), stack.getWorkspaceId(), stack.getUserId(), stack.getUserCrn()); cluster.setClusterPertain( <START> clusterPertainRepository.findByUserId(clusterPertain.getUserId()) <END> .orElseGet(() -> clusterPertainRepository.save(clusterPertain))); cluster = save(cluster); securityConfigService.syncSecurityConfigForCluster(cluster.getId()); calculateClusterStateMetrics(); return cluster; }</code><technical_language>change userCRN userID? userID is concept rely userCRN possible. I get case I want get a list based someones CRN</technical_language>

Target:
public Cluster create(AutoscaleStackV4Response stack) { Cluster cluster = new Cluster(); cluster.setStackName(stack.getName()); cluster.setStackCrn(stack.getStackCrn()); cluster.setStackId(stack.getStackId()); cluster.setStackType(stack.getStackType()); cluster.setTunnel(stack.getTunnel()); cluster.setState(ClusterState.PENDING); if (stack.getCloudPlatform() != null) { cluster.setCloudPlatform(stack.getCloudPlatform().toUpperCase()); } String gatewayPort = String.valueOf(stack.getGatewayPort()); ClusterManager clusterManager = new ClusterManager(stack.getClusterManagerIp(), gatewayPort, stack.getUserNamePath(), stack.getPasswordPath(), ClusterManagerVariant.CLOUDERA_MANAGER); cluster.setClusterManager(clusterManager); ClusterPertain clusterPertain = new ClusterPertain(stack.getTenant(), stack.getWorkspaceId(), stack.getUserId(), stack.getUserCrn()); cluster.setClusterPertain( clusterPertainRepository.findByUserCrn(clusterPertain.getUserCrn()) .orElseGet(() -> clusterPertainRepository.save(clusterPertain))); cluster = save(cluster); securityConfigService.syncSecurityConfigForCluster(cluster.getId()); calculateClusterStateMetrics(); return cluster; }
Source:
<code>public void run() { ui.header("Git Repositories"); File d = gerrit.path("Location of Git repositories", "basePath", "git"); <START> File b = gerrit.path("Location of archive directory", "archivePath", "git"); <END> if (d == null) { throw die("gerrit.basePath is required"); } if (b == null) { throw die("gerrit.archivePath is required"); } if (!d.exists() && !d.mkdirs()) { throw die("Cannot create " + d); } if (!b.exists() && !b.mkdirs()) { throw die("Cannot create " + b); } }</code><technical_language>PS1 & PS2, default path changed "archive" "git". this intended</technical_language>

Target:
public void run() { ui.header("Git Repositories"); File d = gerrit.path("Location of Git repositories", "basePath", "git"); File b = gerrit.path("Location of archive directory", "archivePath", "archive"); if (d == null) { throw die("gerrit.basePath is required"); } if (b == null) { throw die("gerrit.archivePath is required"); } if (!d.exists() && !d.mkdirs()) { throw die("Cannot create " + d); } if (!b.exists() && !b.mkdirs()) { throw die("Cannot create " + b); } }
Source:
<code>public void testZkConnectionManager() { <START> final String TEST_ROOT = "/testZkConnectionManager/IDEALSTATES"; <END> final String TEST_PATH = TEST_ROOT + TEST_NODE + TestHelper.getTestMethodName(); ZkConnectionManager zkConnectionManager = new ZkConnectionManager(new ZkConnection(ZK_ADDR), HelixZkClient.DEFAULT_CONNECTION_TIMEOUT, null); Assert.assertTrue(zkConnectionManager.waitUntilConnected(1, TimeUnit.SECONDS)); zkConnectionManager.createPersistent(TEST_PATH, true); zkConnectionManager.writeData(TEST_PATH, "Test"); Assert.assertNotNull(zkConnectionManager.readData(TEST_PATH)); zkConnectionManager.deleteRecursively(TEST_ROOT); SharedZkClient sharedZkClient = new SharedZkClient(zkConnectionManager, new HelixZkClient.ZkClientConfig(), null); try { zkConnectionManager.close(); Assert.fail("Dedicated ZkClient cannot be closed while sharing!"); } catch (ZkClientException hex) { } sharedZkClient.close(); Assert.assertTrue(sharedZkClient.isClosed()); Assert.assertFalse(sharedZkClient.waitUntilConnected(100, TimeUnit.MILLISECONDS)); zkConnectionManager.close(); Assert.assertTrue(zkConnectionManager.isClosed()); Assert.assertFalse(zkConnectionManager.waitUntilConnected(100, TimeUnit.MILLISECONDS)); try { new SharedZkClient(zkConnectionManager, new HelixZkClient.ZkClientConfig(), null); Assert.fail("Sharing a closed dedicated ZkClient shall fail."); } catch (ZkClientException hex) { } deleteCluster("testZkConnectionManager"); }</code><technical_language>I TEST_ROOT contains test method name</technical_language>

Target:
public void testZkConnectionManager() { final String TEST_ROOT = "/testZkConnectionManager/IDEALSTATES"; final String TEST_PATH = TEST_ROOT + TEST_NODE; ZkConnectionManager zkConnectionManager = new ZkConnectionManager(new ZkConnection(ZK_ADDR), HelixZkClient.DEFAULT_CONNECTION_TIMEOUT, null); Assert.assertTrue(zkConnectionManager.waitUntilConnected(1, TimeUnit.SECONDS)); zkConnectionManager.createPersistent(TEST_PATH, true); zkConnectionManager.writeData(TEST_PATH, "Test"); Assert.assertNotNull(zkConnectionManager.readData(TEST_PATH)); zkConnectionManager.deleteRecursively(TEST_ROOT); SharedZkClient sharedZkClient = new SharedZkClient(zkConnectionManager, new HelixZkClient.ZkClientConfig(), null); try { zkConnectionManager.close(); Assert.fail("Dedicated ZkClient cannot be closed while sharing!"); } catch (ZkClientException hex) { } sharedZkClient.close(); Assert.assertTrue(sharedZkClient.isClosed()); Assert.assertFalse(sharedZkClient.waitUntilConnected(100, TimeUnit.MILLISECONDS)); zkConnectionManager.close(); Assert.assertTrue(zkConnectionManager.isClosed()); Assert.assertFalse(zkConnectionManager.waitUntilConnected(100, TimeUnit.MILLISECONDS)); try { new SharedZkClient(zkConnectionManager, new HelixZkClient.ZkClientConfig(), null); Assert.fail("Sharing a closed dedicated ZkClient shall fail."); } catch (ZkClientException hex) { } deleteCluster("testZkConnectionManager"); }
Source:
<code>public void enrichAnnotation(VariantAnnotation variantAnnotation) { if (enrichers != null) { Iterator<Entry<String, AnnotationEnricher>> it = enrichers.entrySet().iterator(); while (it.hasNext()) { Entry<String, AnnotationEnricher> enricher = it.next(); try { enricher.getValue().enrich(variantAnnotation); } catch (Exception e) { LOG.warn("Failed to enrich with " + enricher.getKey() + ": " + variantAnnotation.getVariant() + " " + e.getLocalizedMessage()); } } <START> for (AnnotationEnricher enricher: enrichers.values()) <END> { try { enricher.enrich(variantAnnotation); } catch (Exception e) { } } } }</code><technical_language>@inodb remove this for loop, moved enrichment while loop above</technical_language>

Target:
public void enrichAnnotation(VariantAnnotation variantAnnotation) { if (enrichers != null) { Iterator<Entry<String, AnnotationEnricher>> it = enrichers.entrySet().iterator(); while (it.hasNext()) { Entry<String, AnnotationEnricher> enricher = it.next(); try { enricher.getValue().enrich(variantAnnotation); } catch (Exception e) { LOG.warn("Failed to enrich with " + enricher.getKey() + ": " + variantAnnotation.getVariant() + " " + e.getLocalizedMessage()); } } } }
Source:
<code>public void testForValueOn() { final AdministrativeStatusType administrativeStatusType = AdministrativeStatusType.ON; final AdministrativeStatusTypeDto administrativeStatusTypeDto = this.configurationMapper.map( administrativeStatusType, AdministrativeStatusTypeDto.class); <START> assertNotNull(administrativeStatusType); <END> assertNotNull(administrativeStatusTypeDto); assertEquals(administrativeStatusType.value(), administrativeStatusTypeDto.value()); }</code><technical_language>useless check for administrativeStatusType null, assigned line 47</technical_language>

Target:
public void testForValueOn() { final AdministrativeStatusType administrativeStatusType = AdministrativeStatusType.ON; final AdministrativeStatusTypeDto administrativeStatusTypeDto = this.configurationMapper.map( administrativeStatusType, AdministrativeStatusTypeDto.class); assertNotNull(administrativeStatusTypeDto); assertEquals(administrativeStatusType.value(), administrativeStatusTypeDto.value()); }
Source:
<code>public TransactionTemplate() { this( null, new Monitor.Adapter(), 0, 0, <START> ex -> !Error.class.isInstance( ex ) && !TransactionTerminatedException.class.isInstance( ex ) ); <END> }</code><technical_language>This violates invariant retries greater 0</technical_language>

Target:
public TransactionTemplate() { this( (GraphDatabaseService) Proxy.newProxyInstance( GraphDatabaseService.class.getClassLoader(), new Class<?>[]{GraphDatabaseService.class}, ( proxy, method, args ) -> { throw new IllegalArgumentException( "You need to call 'with(GraphDatabaseService)' on the template in order to use it" ); } ), new Monitor.Adapter(), 0, 0, ex -> !Error.class.isInstance( ex ) && !TransactionTerminatedException.class.isInstance( ex ) ); }
Source:
<code>public int read(byte[] bytes, int offset, int length) throws IOException { <START> if (length == 0) { <END> return 0; } if (position >= streamSize) { return -1; } int count = (int) Math.min(length, streamSize - position); Arrays.fill(bytes, offset, offset + count, (byte) 0); position += count; return count; }</code><technical_language>this class tests</technical_language>

Target:
public int read(byte[] bytes, int offset, int length) throws IOException { if (bytes == null) { throw new NullPointerException(); } else if (offset < 0 || length < 0 || length > bytes.length - offset) { throw new IndexOutOfBoundsException(); } else if (length == 0) { return 0; } if (position >= streamSize) { return -1; } int count = (int) Math.min(length, streamSize - position); Arrays.fill(bytes, offset, offset + count, (byte) 0); position += count; return count; }
Source:
<code>public void setOnForceCompleteListener(@Nullable OnForceCompleteListener l) { this.onForceCompleteListener = l; post(() -> { if (!isFocused()) { <START> onForceComplete(-2, AdapterView.INVALID_ROW_ID); <END> } }); }</code><technical_language>curious, -2 -1 for argument</technical_language>

Target:
public void setOnForceCompleteListener(@Nullable OnForceCompleteListener l) { this.onForceCompleteListener = l; post(() -> { if (!isFocused()) { onForceComplete(AdapterView.INVALID_POSITION, AdapterView.INVALID_ROW_ID); } }); }
Source:
<code>public boolean select(Viewer viewer, Object parentElement, Object element) { if (element instanceof TreePath) { element = ((TreePath) element).getLastSegment(); } if (element instanceof EntityDefinition) { EntityDefinition entityDef = (EntityDefinition) element; Definition<?> def = entityDef.getDefinition(); if (def instanceof PropertyDefinition) { Cardinality cardinality = ((PropertyDefinition) def) .getConstraint(Cardinality.class); <START> return !(cardinality.getMinOccurs() == 0 && ((PropertyDefinition) def) <END> .getConstraint(NillableFlag.class).isEnabled()); } } return true; }</code><technical_language>minOccurs is zero for element is optional, independent of NillableFlag. If element occur more optional, if is nillable optional children</technical_language>

Target:
public boolean select(Viewer viewer, Object parentElement, Object element) { if (element instanceof TreePath) { element = ((TreePath) element).getLastSegment(); } if (element instanceof EntityDefinition) { EntityDefinition entityDef = (EntityDefinition) element; Definition<?> def = entityDef.getDefinition(); if (def instanceof PropertyDefinition) { Cardinality cardinality = ((PropertyDefinition) def) .getConstraint(Cardinality.class); if (cardinality.getMinOccurs() == 0) return false; if (((PropertyDefinition) def).getConstraint(NillableFlag.class).isEnabled()) { return !areChildrenOptional(entityDef); } } } return true; }
Source:
<code>public void makeDiscoverablePatchUnauthorizedTest() throws Exception { context.turnOffAuthorisationSystem(); parentCommunity = CommunityBuilder.createCommunity(context) .withName("Parent Community") .build(); Community child1 = CommunityBuilder.createSubCommunity(context, parentCommunity) .withName("Sub Community") .build(); Collection col1 = CollectionBuilder.createCollection(context, child1).withName("Collection 1").build(); Item item = ItemBuilder.createItem(context, col1) .withTitle("Public item 1") .withIssueDate("2017-10-17") .withAuthor("Smith, Donald").withAuthor("Doe, John") .withSubject("ExtraEntry") .makeUnDiscoverable() .build(); String token = getAuthToken(admin.getEmail(), password); List<Operation> ops = new ArrayList<Operation>(); <START> ReplaceOperation replaceOperation = new ReplaceOperation("/discoverable", "true"); <END> ops.add(replaceOperation); String patchBody = getPatchContent(ops); getClient().perform(patch("/api/core/items/" + item.getID()) .content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) .andExpect(status().isUnauthorized()); getClient(token).perform(get("/api/core/items/" + item.getID())) .andExpect(status().isOk()) .andExpect(jsonPath("$.uuid", Matchers.is(item.getID().toString()))) .andExpect(jsonPath("$.discoverable", Matchers.is(false))); }</code><technical_language>official true instead "true"</technical_language>

Target:
public void makeDiscoverablePatchUnauthorizedTest() throws Exception { context.turnOffAuthorisationSystem(); parentCommunity = CommunityBuilder.createCommunity(context) .withName("Parent Community") .build(); Community child1 = CommunityBuilder.createSubCommunity(context, parentCommunity) .withName("Sub Community") .build(); Collection col1 = CollectionBuilder.createCollection(context, child1).withName("Collection 1").build(); Item item = ItemBuilder.createItem(context, col1) .withTitle("Public item 1") .withIssueDate("2017-10-17") .withAuthor("Smith, Donald").withAuthor("Doe, John") .withSubject("ExtraEntry") .makeUnDiscoverable() .build(); String token = getAuthToken(admin.getEmail(), password); List<Operation> ops = new ArrayList<Operation>(); ReplaceOperation replaceOperation = new ReplaceOperation("/discoverable", true); ops.add(replaceOperation); String patchBody = getPatchContent(ops); getClient().perform(patch("/api/core/items/" + item.getID()) .content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) .andExpect(status().isUnauthorized()); getClient(token).perform(get("/api/core/items/" + item.getID())) .andExpect(status().isOk()) .andExpect(jsonPath("$.uuid", Matchers.is(item.getID().toString()))) .andExpect(jsonPath("$.discoverable", Matchers.is(false))); }
Source:
<code><START> public List<OtherCanonicalAlignment> getOtherCanonicalAlignments() { <END> String xp=this.getStringAttribute(ReservedTagConstants.SA); if(xp==null) return Collections.emptyList(); String ss[]=xp.split("[;]"); List<OtherCanonicalAlignment> L=new ArrayList<OtherCanonicalAlignment>(ss.length); for(String s:ss) { if(s.isEmpty()) continue; String tokens[]=s.split("[,]"); if(tokens.length!=6) { String msg="Cannot extract OtherCanonicalAlignment from "+s+" expected 6 tokens, got "+tokens.length; switch(this.getValidationStringency()) { case STRICT:throw new SAMFormatException(msg); case LENIENT:System.err.println(msg);break; default:break; } continue; } OtherCanonicalAlignmentImpl aln=new OtherCanonicalAlignmentImpl(); aln.reference=tokens[0]; aln.pos=Integer.parseInt(tokens[1]); aln.strand=tokens[2].charAt(0); aln.cigarStr=tokens[3]; aln.mapq=Integer.parseInt(tokens[4]); aln.nm=Integer.parseInt(tokens[5]); L.add(aln); } return L; }</code><technical_language>variable names short intuitive, expand them</technical_language>

Target:
public List<SAMRecord> getOtherCanonicalAlignments() { final Pattern semiColonRegex = Pattern.compile("[;]"); final Pattern commaRegex = Pattern.compile("[,]"); final DefaultSAMRecordFactory samRecordFactory=new DefaultSAMRecordFactory(); String saAttribute = this.getStringAttribute(ReservedTagConstants.SA); if(saAttribute==null) return Collections.emptyList(); String otherAlignments[] = semiColonRegex.split(saAttribute); List<SAMRecord> returnedList = new ArrayList<SAMRecord>(otherAlignments.length); for(String alignAsString : otherAlignments) { if(alignAsString.isEmpty()) continue; String tokens[]=commaRegex.split(alignAsString); if(tokens.length!=6) { String msg="Cannot extract OtherCanonicalAlignment from "+alignAsString+ " expected 6 tokens, got "+tokens.length; switch(this.getValidationStringency()) { case STRICT:throw new SAMFormatException(msg); case LENIENT:System.err.println(msg);break; default:break; } continue; } SAMRecord aln=samRecordFactory.createSAMRecord(this.getHeader()); aln.setSupplementaryAlignmentFlag(true); aln.setMappingQuality(Integer.parseInt(tokens[4])); aln.setReadNegativeStrandFlag(tokens[2].equals("-")); aln.setReferenceName(tokens[0]); aln.setReadName(this.getReadName()); aln.setAlignmentStart(Integer.parseInt(tokens[1])); aln.setAttribute("NM", Integer.parseInt(tokens[5])); aln.setCigarString(tokens[3]); aln.setReadBases(this.getReadBases()); aln.setBaseQualities(this.getBaseQualities()); aln.setFileSource(this.getFileSource()); returnedList.add(aln); } return returnedList; }
Source:
<code>public void onBuffer(Buffer buffer, int sequenceNumber, int backlog) throws IOException { boolean recycleBuffer = true; try { if (isReleased.get()) { return; } if (expectedSequenceNumber != sequenceNumber) { onError(new BufferReorderingException(expectedSequenceNumber, sequenceNumber)); return; } if (inputGate.bufferReceivedListener != null) { CheckpointBarrier checkpointBarrier = parseCheckpointBarrier(buffer); if (checkpointBarrier == null) { inputGate.bufferReceivedListener.notifyBufferReceived(buffer, channelInfo); } else { inputGate.bufferReceivedListener.notifyBarrierReceived(checkpointBarrier, channelInfo); } } <START> final boolean wasEmpty; <END> synchronized (receivedBuffers) { wasEmpty = receivedBuffers.isEmpty(); receivedBuffers.add(buffer); recycleBuffer = false; } ++expectedSequenceNumber; if (wasEmpty) { notifyChannelNonEmpty(); } if (backlog >= 0) { onSenderBacklog(backlog); } } finally { if (recycleBuffer) { buffer.recycleBuffer(); } } }</code><technical_language>Do miss a check for isReleased.get() synchronized? If 1st check synchronized some other thread enters releaseAllResources, sets flag releases buffers; continue; I is error</technical_language>

Target:
public void onBuffer(Buffer buffer, int sequenceNumber, int backlog) throws IOException { boolean recycleBuffer = true; try { if (expectedSequenceNumber != sequenceNumber) { onError(new BufferReorderingException(expectedSequenceNumber, sequenceNumber)); return; } final boolean wasEmpty; final CheckpointBarrier notifyReceivedBarrier; final Buffer notifyReceivedBuffer; final BufferReceivedListener listener = inputGate.getBufferReceivedListener(); synchronized (receivedBuffers) { if (isReleased.get()) { return; } wasEmpty = receivedBuffers.isEmpty(); receivedBuffers.add(buffer); if (listener != null && buffer.isBuffer() && receivedCheckpointId < lastRequestedCheckpointId) { notifyReceivedBuffer = buffer.retainBuffer(); } else { notifyReceivedBuffer = null; } notifyReceivedBarrier = listener != null ? parseCheckpointBarrierOrNull(buffer) : null; } recycleBuffer = false; ++expectedSequenceNumber; if (wasEmpty) { notifyChannelNonEmpty(); } if (backlog >= 0) { onSenderBacklog(backlog); } if (notifyReceivedBarrier != null) { receivedCheckpointId = notifyReceivedBarrier.getId(); listener.notifyBarrierReceived(notifyReceivedBarrier, channelInfo); } else if (notifyReceivedBuffer != null) { listener.notifyBufferReceived(notifyReceivedBuffer, channelInfo); } } finally { if (recycleBuffer) { buffer.recycleBuffer(); } } }
Source:
<code><START> public static List<EObject> getNonUnionSupersetReferences(EReference reference) { <END> return Lists.newArrayList(Iterables.filter(getSupersetReferences(reference), new KeepOnlyNonUnionEReferences())); }</code><technical_language>If EReferences, properly type list</technical_language>

Target:
public static Iterable<EReference> getNonUnionSupersetReferences(EReference reference) { return Iterables.filter(getSupersetReferences(reference), isNonUnionReference()); }
Source:
<code>private Set<GlusterVolumeEntity> getUpVolumesWithSuggestedCapacityAndNotInMasterCluster(GlusterVolumeEntity masterVolume) { Set<GlusterVolumeEntity> eligibleVolumeList = new HashSet<GlusterVolumeEntity>(); <START> List<VDSGroup> vdsGroups = getVdsGroupDao().getAll(); <END> VDSGroup masterVdsGroup = getVdsGroupDao().get(masterVolume.getClusterId()); for (VDSGroup vdsGroup : vdsGroups) { if (vdsGroup.getId() != masterVolume.getClusterId() && vdsGroup.getcompatibility_version().equals(masterVdsGroup.getcompatibility_version()) && vdsGroup.supportsGlusterService()) { List<GlusterVolumeEntity> volumes = getGlusterVolumeDao().getByClusterId(vdsGroup.getId()); for (GlusterVolumeEntity volume : volumes) { if (volume.getStatus() == GlusterStatus.UP) { if (volume.getAdvancedDetails().getCapacityInfo()!= null && masterVolume.getAdvancedDetails().getCapacityInfo()!= null) { if(volume.getAdvancedDetails().getCapacityInfo().getTotalSize() != null && masterVolume.getAdvancedDetails().getCapacityInfo().getTotalSize() != null && volume.getAdvancedDetails().getCapacityInfo().getTotalSize() >= masterVolume.getAdvancedDetails().getCapacityInfo().getTotalSize()) { eligibleVolumeList.add(volume); } } } } } } return eligibleVolumeList; }</code><technical_language>get vdsGroups supports gluster service compatibility version == masterVdsGroup.getcompatibility_version() here</technical_language>

Target:
private Set<GlusterVolumeEntity> getUpVolumesWithSuggestedCapacityAndNotInMasterCluster(GlusterVolumeEntity masterVolume) { Set<GlusterVolumeEntity> eligibleVolumeList = new HashSet<GlusterVolumeEntity>(); VDSGroup masterVdsGroup = getVdsGroupDao().get(masterVolume.getClusterId()); List<VDSGroup> vdsGroups = getVdsGroupDao().getClustersByServiceAndCompatibilityVersion(true, false, masterVdsGroup.getcompatibility_version()); for (VDSGroup vdsGroup : vdsGroups) { if (!vdsGroup.getId().equals(masterVolume.getClusterId())) { List<GlusterVolumeEntity> volumes = getGlusterVolumeDao().getByClusterId(vdsGroup.getId()); for (GlusterVolumeEntity volume : volumes) { if (volume.getStatus() == GlusterStatus.UP) { if (volume.getAdvancedDetails().getCapacityInfo()!= null && masterVolume.getAdvancedDetails().getCapacityInfo()!= null) { if(volume.getAdvancedDetails().getCapacityInfo().getTotalSize() != null && masterVolume.getAdvancedDetails().getCapacityInfo().getTotalSize() != null && volume.getAdvancedDetails().getCapacityInfo().getTotalSize() >= masterVolume.getAdvancedDetails().getCapacityInfo().getTotalSize()) { eligibleVolumeList.add(volume); } } } } } } return eligibleVolumeList; }
Source:
<code>public IndexDefinition apply(boolean useStateFromBuilder) { IndexFormatVersion version = IndexDefinition.determineVersionForFreshIndex(definitionBuilder); definitionBuilder.setProperty(IndexDefinition.INDEX_VERSION, version.getVersion()); NodeState defnState = useStateFromBuilder ? definitionBuilder.getNodeState() : definitionBuilder.getBaseState(); if (!IndexDefinition.isDisableStoredIndexDefinition()) { definitionBuilder.setChildNode(INDEX_DEFINITION_NODE, NodeStateCloner.cloneVisibleState(defnState)); if (definitionBuilder.getChildNode(STATUS_NODE).exists()) { definitionBuilder.getChildNode(STATUS_NODE).removeProperty(REINDEX_COMPLETION_TIMESTAMP); <START> log.info(REINDEX_COMPLETION_TIMESTAMP + " property removed for index at {}", this.indexPath); <END> } } String uid = configureUniqueId(definitionBuilder); return indexDefBuilder .root(root) .defn(defnState) .indexPath(indexPath) .version(version) .uid(uid) .reindex() .build(); }</code><technical_language>suggestion log.info("{} property removed for index {}", REINDEX_COMPLETION_TIMESTAMP, this.indexPath);</technical_language>

Target:
public IndexDefinition apply(boolean useStateFromBuilder) { IndexFormatVersion version = IndexDefinition.determineVersionForFreshIndex(definitionBuilder); definitionBuilder.setProperty(IndexDefinition.INDEX_VERSION, version.getVersion()); NodeState defnState = useStateFromBuilder ? definitionBuilder.getNodeState() : definitionBuilder.getBaseState(); if (!IndexDefinition.isDisableStoredIndexDefinition()) { definitionBuilder.setChildNode(INDEX_DEFINITION_NODE, NodeStateCloner.cloneVisibleState(defnState)); if (definitionBuilder.getChildNode(STATUS_NODE).exists()) { definitionBuilder.getChildNode(STATUS_NODE).removeProperty(REINDEX_COMPLETION_TIMESTAMP); LOG.info("{} property removed for index at {}", REINDEX_COMPLETION_TIMESTAMP, this.indexPath); } } String uid = configureUniqueId(definitionBuilder); return indexDefBuilder .root(root) .defn(defnState) .indexPath(indexPath) .version(version) .uid(uid) .reindex() .build(); }
Source:
<code>public synchronized long requestMemoryRevoking() { boolean alreadyRequested = isMemoryRevokingRequested(); <START> if (!alreadyRequested && revocableMemoryReservation > 0) { <END> memoryRevokingRequested.set(true); runListener(); return revocableMemoryReservation; } return 0; }</code><technical_language>Consider inlining alreadyRequested variable call isMemoryRevokingRequested()</technical_language>

Target:
public long requestMemoryRevoking() { long revokedMemory = 0L; Runnable listener = null; synchronized (this) { if (!isMemoryRevokingRequested() && revocableMemoryReservation > 0) { memoryRevokingRequested = true; revokedMemory = revocableMemoryReservation; listener = memoryRevocationRequestListener; } } if (listener != null) { runListener(listener); } return revokedMemory; }
Source:
<code>public HttpLatencyDetector build() { <START> HttpLatencyDetector result = new HttpLatencyDetector(); <END> if (urlSensor!=null) { result.urlSensor = urlSensor; if (urlPostProcessing!=null) result.urlPostProcessing = urlPostProcessing; if (url!=null) throw new IllegalStateException("Cannot set URL and UrlSensor"); } else { result.url.set(url); } result.rollupPeriod = rollupWindowSize; return result; }</code><technical_language>I prefer passing builder instance constructor. constructor extracts values, declares fields final appropriate</technical_language>

Target:
public HttpLatencyDetector build() { HttpLatencyDetector result = new HttpLatencyDetector(); if (periodMillis!=null) result.periodMillis = periodMillis; if (requireServiceUp!=null) result.requireServiceUp = requireServiceUp; if (urlSensor!=null) { result.urlSensor = urlSensor; if (urlPostProcessing!=null) result.urlPostProcessing = urlPostProcessing; if (url!=null) throw new IllegalStateException("Cannot set URL and UrlSensor"); } else { result.url.set(url); } result.rollupPeriod = rollupWindowSize; return result; }
Source:
<code>public boolean equals(Object other) { if (other == null) { return false; } if (!(other instanceof Principal)) { return false; } if (this.name.equals(everyone) || ((Principal) other).getName().equals(everyone)) { return true; } <START> return ((Principal) other).getName().equals(name); <END> }</code><technical_language>a more concise easier follow this: if (other instanceof Principal ) { if (other == this) return true; if ( this.getName().equals(everyone)) return true; Principal = (Principal)other; return this.getName().equals(that.getName()); } return false;</technical_language>

Target:
public boolean equals(Object other) { if (other instanceof Principal) { if (other == this) { return true; } if (this.getName().equals(EVERYONE_PRINCIPAL_NAME)) { return true; } Principal that = (Principal) other; return this.getName().equals(that.getName()); } return false; }
Source:
<code>public static Path getAppDataRoot() { if (APP_DATA_ROOT == null) { <START> throw new RuntimeException("Missing required application data root"); <END> } return APP_DATA_ROOT; }</code><technical_language>![MAJOR](<LINK_0> 'Severity: MAJOR') Define throw a dedicated exception instead of a generic one. [![rule](<LINK_1>](<LINK_2></technical_language>

Target:
public static Path getAppDataRoot() { if (APP_DATA_ROOT == null) { throw new IllegalStateException("Missing required application data root"); } return APP_DATA_ROOT; }
Source:
<code>public void onConfigChanged(OnConfigChangedEvent event) { if (getMetadata().modId.equals(event.getModID())) { if ("chunkLoader".equals(event.getConfigID())) <START> { <END> ForgeChunkManager.syncConfigDefaults(); ForgeChunkManager.loadConfiguration(); } else { if (event.isWorldRunning()) { boolean tmp = config.get(Configuration.CATEGORY_CLIENT, "disableStairSlabCulling", disableStairSlabCulling).getBoolean(); if (disableStairSlabCulling != tmp) { disableStairSlabCulling = tmp; FMLCommonHandler.instance().reloadRenderers(); } } syncConfig(false); } } }</code><technical_language>point is configs do while server is running do care sync effect? If moved editable in in-game menu. if cleaning this move new Annotation based config system. it</technical_language>

Target:
public void onConfigChanged(OnConfigChangedEvent event) { if (getMetadata().modId.equals(event.getModID())) { if ("chunkLoader".equals(event.getConfigID())) { ForgeChunkManager.syncConfigDefaults(); ForgeChunkManager.loadConfiguration(); } else { boolean tmpStairs = disableStairSlabCulling; syncConfig(false); if (event.isWorldRunning() && tmpStairs != disableStairSlabCulling) { FMLCommonHandler.instance().reloadRenderers(); } } } }
Source:
<code>public Object postProcess(Message<?> message, Object result) { if (result == null) { <START> if (StringUtils.hasText(this.discardChannelName)) { <END> synchronized (this) { if (this.discardChannelName != null) { try { this.discardChannel = this.getBeanFactory() .getBean(this.discardChannelName, MessageChannel.class); this.discardChannelName = null; } catch (BeansException e) { throw new DestinationResolutionException("Failed to look up MessageChannel with name '" + this.discardChannelName + "' in the BeanFactory."); } } } } if (this.discardChannel != null) { this.getMessagingTemplate().send(this.discardChannel, message); } if (this.throwExceptionOnRejection) { throw new MessageRejectedException(message, "MessageFilter '" + this.getComponentName() + "' rejected Message"); } } return result; }</code><technical_language>optimize</technical_language>

Target:
public Object postProcess(Message<?> message, Object result) { if (result == null) { if (this.discardChannelName != null) { synchronized (this) { if (this.discardChannelName != null) { try { this.discardChannel = this.getBeanFactory() .getBean(this.discardChannelName, MessageChannel.class); this.discardChannelName = null; } catch (BeansException e) { throw new DestinationResolutionException("Failed to look up MessageChannel with name '" + this.discardChannelName + "' in the BeanFactory."); } } } } if (this.discardChannel != null) { this.getMessagingTemplate().send(this.discardChannel, message); } if (this.throwExceptionOnRejection) { throw new MessageRejectedException(message, "MessageFilter '" + this.getComponentName() + "' rejected Message"); } } return result; }