buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void ejbRemove() {
}
void ejbHomeResetId() {
id = 0;
}
} | public void ejbHomeResetId() {
id = 0;
}
} |
public boolean hasNext() {
if (cachedLine != null) {
return true;
} else if (finished) {
return false;
} else {
try {
while (true) {
String line = bufferedReader.readLine();
if (line == null) {
... | public boolean hasNext() {
if (cachedLine != null) {
return true;
} else if (finished) {
return false;
} else {
try {
while (true) {
String line = bufferedReader.readLine();
if (line == null) {
... |
protected void prepareBeanFactory(ConfigurableListableBeanFactory beanFactory) {
// Tell the internal bean factory to use the context's class loader etc.
beanFactory.setBeanClassLoader(getClassLoader());
beanFactory.setBeanExpressionResolver(new StandardBeanExpressionResolver());
beanFactory.addPropertyEditorR... | protected void prepareBeanFactory(ConfigurableListableBeanFactory beanFactory) {
// Tell the internal bean factory to use the context's class loader etc.
beanFactory.setBeanClassLoader(getClassLoader());
beanFactory.setBeanExpressionResolver(new StandardBeanExpressionResolver(beanFactory.getBeanClassLoader()));
... |
public TransactionalTopologyBuilder(String id, String spoutId, ITransactionalSpout spout, Number spoutParallelism) {
_id = id;
_spoutId = spoutId;
_spout = spout;
_spoutParallelism = (spoutParallelism == null) ? null : spoutParallelism.intValue();
}
| public TransactionalTopologyBuilder(String id, String spoutId, ITransactionalSpout spout, Number spoutParallelism) {
_id = id;
_spoutId = spoutId;
_spout = spout;
_spoutParallelism = spoutParallelism.intValue();
}
|
private void createSecurityRoles(final Deployment dep, final JBossWebMetaData jbossWebMD) {
final String authMethod = getAuthMethod(dep);
final boolean hasAuthMethod = authMethod != null;
if (hasAuthMethod) {
final SecurityMetaDataAccessorEJB ejbMDAccessor = getEjbSecurityMetaDa... | private void createSecurityRoles(final Deployment dep, final JBossWebMetaData jbossWebMD) {
final String authMethod = getAuthMethod(dep);
final boolean hasAuthMethod = authMethod != null;
if (hasAuthMethod) {
final SecurityMetaDataAccessorEJB ejbMDAccessor = getEjbSecurityMetaDa... |
public void testAdHocRestriction() {
List<PasswordRestriction> restrictions = new ArrayList<PasswordRestriction>();
restrictions.add(ALPHA_RESTRICTION);
restrictions.add(SYMBOL_RESTRICTION);
SimplePasswordStrengthChecker checker = new SimplePasswordStrengthChecker(restrictions, this.... | public void testAdHocRestriction() {
List<PasswordRestriction> restrictions = new ArrayList<PasswordRestriction>();
restrictions.add(ALPHA_RESTRICTION);
restrictions.add(SYMBOL_RESTRICTION);
SimplePasswordStrengthChecker checker = new SimplePasswordStrengthChecker(restrictions, this.... |
public void testWrappedHandle() throws IOException, NamingException {
final ClientEjb ejb = client();
Assert.assertEquals("hello", ejb.getRemoteViaWrappedHandle());
}
| public void testWrappedHandle() throws IOException, NamingException {
final ClientEjb ejb = client();
Assert.assertEquals("hello", ejb.getRemoteViaHandleMessage());
}
|
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
return;
}
final Resour... | public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
return;
}
final Resour... |
public interface ICoordinatorState {
package backtype.storm.transactional;
import backtype.storm.task.TopologyContext;
import java.util.Map;
public interface ITransactionState {
void open(Map conf, TopologyContext context);
void close();
void setTransactionId(int txid);
int getTransactionId();
} | public interface ICoordinatorState {
package backtype.storm.transactional;
import backtype.storm.task.TopologyContext;
import java.util.Map;
public interface ICoordinatorState {
void open(Map conf, TopologyContext context);
void close();
void setTransactionId(int txid);
int getTransactionId();
} |
public JtaTransactionManagerFactoryBean() {
String className = resolveJtaTransactionManagerClassName();
try {
Class<? extends JtaTransactionManager> clazz = (Class<? extends JtaTransactionManager>)
JtaTransactionManagerFactoryBean.class.getClassLoader().loadClass(className);
this.transactionManager = Be... | public JtaTransactionManagerFactoryBean() {
String className = resolveJtaTransactionManagerClassName();
try {
Class<? extends JtaTransactionManager> clazz = (Class<? extends JtaTransactionManager>)
ClassUtils.forName(className, JtaTransactionManagerFactoryBean.class.getClassLoader());
this.transactionMa... |
public static void zip(File sourceDir, File zipFile) {
try {
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile));
for (File file : sourceDir.listFiles()) {
if (file.isDirectory()) {
addDirectoryToZip(file, file.getName(), zos)... | public static void zip(File sourceDir, File zipFile) {
try {
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile));
for (File file : sourceDir.listFiles()) {
if (file.isDirectory()) {
addDirectoryToZip(file, file.getName(), zos)... |
public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
final String patchId = operation.require(PATCH_ID).asString();
//
context.acquireControllerLock();
final ServiceController<?> mgrService = context.getServiceRegistry(false... | public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
final String patchId = operation.require(PATCH_ID).asString();
//
context.acquireControllerLock();
final ServiceController<?> mgrService = context.getServiceRegistry(false... |
public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
context.acquireControllerLock();
// Setup
final InstallationManager installationManager = (InstallationManager) context.getServiceRegistry(false).getRequiredService(InstallationMa... | public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
context.acquireControllerLock();
// Setup
final InstallationManager installationManager = (InstallationManager) context.getServiceRegistry(false).getRequiredService(InstallationMa... |
public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
final ServiceController<?> mgrService = context.getServiceRegistry(false).getRequiredService(InstallationManagerService.NAME);
final InstallationManager mgr = (InstallationManager) mgrSe... | public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
final ServiceController<?> mgrService = context.getServiceRegistry(false).getRequiredService(InstallationManagerService.NAME);
final InstallationManager mgr = (InstallationManager) mgrSe... |
public PatchElement createElement(PatchType patchType) {
final PatchType type = element.getProvider().getPatchType();
if (type == null) {
if (patchType == PatchType.CUMULATIVE) {
((PatchElementProviderImpl)element.getProvider()).upg... | public PatchElement createElement(PatchType patchType) {
final PatchType type = element.getProvider().getPatchType();
if (type == null) {
if (patchType == PatchType.CUMULATIVE) {
((PatchElementProviderImpl)element.getProvider()).upg... |
public void setup() throws Exception {
tempDir = mkdir(new File(System.getProperty("java.io.tmpdir")), randomString());
File jbossHome = mkdir(tempDir, "jboss-installation");
mkdir(jbossHome, MODULES, "system", LAYERS, BASE);
mkdir(jbossHome, BUNDLES, "system", LAYERS, BASE);
... | public void setup() throws Exception {
tempDir = mkdir(new File(System.getProperty("java.io.tmpdir")), randomString());
File jbossHome = mkdir(tempDir, "jboss-installation");
mkdir(jbossHome, MODULES, "system", LAYERS, BASE);
mkdir(jbossHome, BUNDLES, "system", LAYERS, BASE);
... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
WarMetaData metaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
if(metaData == null || metaData.getMergedJBoss... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
WarMetaData metaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
if(metaData == null || metaData.getMergedJBoss... |
public void setUp() {
finder = new FileFinder();
options = new HashMap();
options.put(Finder.NOT+Finder.PATH, "*CVS*");
// uncomment for debugging
// finder.addFindListener( new DebugListener() );
}
| public void setUp() {
finder = new FileFinder();
options = new HashMap();
options.put(Finder.NOT+Finder.PATH, "*.svn*");
// uncomment for debugging
// finder.addFindListener( new DebugListener() );
}
|
public void testTailer() throws Exception {
// Create & start the Tailer
final long delayMillis = 50;
final File file = new File(getTestDirectory(), "tailer1-test.txt");
createFile(file, 0);
final TestTailerListener listener = new TestTailerListener();
final String o... | public void testTailer() throws Exception {
// Create & start the Tailer
final long delayMillis = 50;
final File file = new File(getTestDirectory(), "tailer1-test.txt");
createFile(file, 0);
final TestTailerListener listener = new TestTailerListener();
final String o... |
public static final PathElement DISTRIBUTED_CACHE_PATH = PathElement.pathElement(ModelKeys.DISTRIBUTED_CACHE);
// attributes
static final SimpleAttributeDefinition L1_LIFESPAN =
new SimpleAttributeDefinitionBuilder(ModelKeys.L1_LIFESPAN, ModelType.LONG, true)
.setXmlName(Att... | public static final PathElement DISTRIBUTED_CACHE_PATH = PathElement.pathElement(ModelKeys.DISTRIBUTED_CACHE);
// attributes
static final SimpleAttributeDefinition L1_LIFESPAN =
new SimpleAttributeDefinitionBuilder(ModelKeys.L1_LIFESPAN, ModelType.LONG, true)
.setXmlName(Att... |
public SortedMap<K, V> prefixMap(K key);
| SortedMap<K, V> prefixMap(K key);
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Versi... |
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
// no attributes
if (reader.getAttributeCount() > 0) {
throw unexpectedAttribute(reader, 0);
}
final ModelNode address = new ModelNode();
address.add(SUBSYST... | public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
// no attributes
if (reader.getAttributeCount() > 0) {
throw unexpectedAttribute(reader, 0);
}
final ModelNode address = new ModelNode();
address.add(SUBSYST... |
private Collection<ComponentDescription> getApplicableComponents(final CompositeIndex index, final ClassInfo klass, final EEModuleDescription eeModuleDescription) {
Set<ComponentDescription> componentDescriptions = new HashSet<ComponentDescription>();
final List<ComponentDescription> descriptions = ... | private Collection<ComponentDescription> getApplicableComponents(final CompositeIndex index, final ClassInfo klass, final EEModuleDescription eeModuleDescription) {
Set<ComponentDescription> componentDescriptions = new HashSet<ComponentDescription>();
final List<ComponentDescription> descriptions = ... |
public Base64InputStream(InputStream in, boolean doEncode) {
super(in);
this.doEncode = doEncode;
this.base64 = new Base64();
}
| public Base64InputStream(InputStream in, boolean doEncode) {
super(in);
this.doEncode = doEncode;
this.base64 = new Base64(false);
}
|
public Base64OutputStream(OutputStream out, boolean doEncode) {
super(out);
this.doEncode = doEncode;
this.base64 = new Base64();
}
| public Base64OutputStream(OutputStream out, boolean doEncode) {
super(out);
this.doEncode = doEncode;
this.base64 = new Base64(false);
}
|
public LeastSquaresBuilder base() {
return new LeastSquaresBuilder()
.checker(new SimpleVectorValueChecker(1e-6, 1e-6))
.maxEvaluations(100)
.maxIterations(getMaxIterations());
}
| public LeastSquaresBuilder base() {
return new LeastSquaresBuilder()
.checkerPair(new SimpleVectorValueChecker(1e-6, 1e-6))
.maxEvaluations(100)
.maxIterations(getMaxIterations());
}
|
public void testMaxEvaluations(LeastSquaresOptimizer optimizer) throws Exception {
try{
CircleVectorial circle = new CircleVectorial();
circle.addPoint( 30.0, 68.0);
circle.addPoint( 50.0, -6.0);
circle.addPoint(110.0, -20.0);
circle.addPoint( 35.0, 15.0);
... | public void testMaxEvaluations(LeastSquaresOptimizer optimizer) throws Exception {
try{
CircleVectorial circle = new CircleVectorial();
circle.addPoint( 30.0, 68.0);
circle.addPoint( 50.0, -6.0);
circle.addPoint(110.0, -20.0);
circle.addPoint( 35.0, 15.0);
... |
public void configure(final DeploymentPhaseContext context, final ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
final Class<?> componentClass = configuration.getModuleClassConfiguration().getModuleClass();
... | public void configure(final DeploymentPhaseContext context, final ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
final Class<?> componentClass = configuration.getModuleClassConfiguration().getModuleClass();
... |
protected AbstractExceptionHandlerMethodResolver(Map<Class<? extends Throwable>, Method> mappedMethods) {
Assert.notNull(mappedMethods, "'mappedMethods' is required");
this.mappedMethods.putAll(mappedMethods);
}
| protected AbstractExceptionHandlerMethodResolver(Map<Class<? extends Throwable>, Method> mappedMethods) {
Assert.notNull(mappedMethods, "Mapped Methods must not be null");
this.mappedMethods.putAll(mappedMethods);
}
|
public AbstractBrokerRegistration(MessageChannel clientOutboundChannel, String[] destinationPrefixes) {
Assert.notNull(clientOutboundChannel, "'clientOutboundChannel' is required");
this.clientOutboundChannel = clientOutboundChannel;
this.destinationPrefixes = (destinationPrefixes != null)
? Arrays.<String>a... | public AbstractBrokerRegistration(MessageChannel clientOutboundChannel, String[] destinationPrefixes) {
Assert.notNull(clientOutboundChannel, "'clientOutboundChannel' must not be null");
this.clientOutboundChannel = clientOutboundChannel;
this.destinationPrefixes = (destinationPrefixes != null)
? Arrays.<Str... |
protected void handleBinaryMessage(WebSocketSession session, BinaryMessage message) {
try {
session.close(CloseStatus.NOT_ACCEPTABLE.withReason("Binary messages not supported"));
}
catch (IOException e) {
// ignore
}
}
| protected void handleBinaryMessage(WebSocketSession session, BinaryMessage message) {
try {
session.close(CloseStatus.NOT_ACCEPTABLE.withReason("Binary messages not supported"));
}
catch (IOException ex) {
// ignore
}
}
|
public void setTaskExecutor(TaskExecutor taskExecutor) {
Assert.notNull(taskExecutor, "taskExecutor is required");
this.taskExecutor = taskExecutor;
}
| public void setTaskExecutor(TaskExecutor taskExecutor) {
Assert.notNull(taskExecutor, "TaskExecutor must not be null");
this.taskExecutor = taskExecutor;
}
|
public void setTaskExecutor(AsyncListenableTaskExecutor taskExecutor) {
Assert.notNull(taskExecutor, "taskExecutor is required");
this.taskExecutor = taskExecutor;
}
| public void setTaskExecutor(AsyncListenableTaskExecutor taskExecutor) {
Assert.notNull(taskExecutor, "TaskExecutor must not be null");
this.taskExecutor = taskExecutor;
}
|
private SockJsFrame(String content) {
Assert.notNull("content is required");
this.content = content;
}
| private SockJsFrame(String content) {
Assert.notNull("Content must not be null");
this.content = content;
}
|
private BufferPoolRootResourceDefinition() {
super(PlatformMBeanConstants.BUFFER_POOL_PATH,
PlatformMBeanUtil.getResolver(PlatformMBeanConstants.BUFFER_POOL));
}
| private BufferPoolRootResourceDefinition() {
super(PlatformMBeanConstants.BUFFER_POOL_PATH,
PlatformMBeanDescriptions.getResolver(PlatformMBeanConstants.BUFFER_POOL));
}
|
protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String name = operation.require(ModelDescriptionConstants.NAME).asString();
if (PlatformMBeanConstants.OBJECT_NAME.getName().equals(name)) {
context.getResult().se... | protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String name = operation.require(ModelDescriptionConstants.NAME).asString();
if (PlatformMBeanUtil.JVM_MAJOR_VERSION > 6 && PlatformMBeanConstants.OBJECT_NAME.getName().equals(... |
protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String gcName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
final String name = operation.require(ModelDescriptio... | protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String gcName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
final String name = operation.require(ModelDescriptio... |
private GarbageCollectorRootResourceDefinition() {
super(PlatformMBeanConstants.GARBAGE_COLLECTOR_PATH,
PlatformMBeanUtil.getResolver("garbage-collectors"));
}
| private GarbageCollectorRootResourceDefinition() {
super(PlatformMBeanConstants.GARBAGE_COLLECTOR_PATH,
PlatformMBeanDescriptions.getResolver("garbage-collectors"));
}
|
protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String name = operation.require(ModelDescriptionConstants.NAME).asString();
if (PlatformMBeanConstants.OBJECT_NAME.getName().equals(name)) {
context.getResult().se... | protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String name = operation.require(ModelDescriptionConstants.NAME).asString();
if (PlatformMBeanUtil.JVM_MAJOR_VERSION > 6 && PlatformMBeanConstants.OBJECT_NAME.getName().equals(... |
public static final MemoryMXBeanGCHandler INSTANCE = new MemoryMXBeanGCHandler();
static final OperationDefinition DEFINITION = new SimpleOperationDefinitionBuilder(PlatformMBeanConstants.GC, PlatformMBeanUtil.getResolver(PlatformMBeanConstants.MEMORY))
.setRuntimeOnly()
| public static final MemoryMXBeanGCHandler INSTANCE = new MemoryMXBeanGCHandler();
static final OperationDefinition DEFINITION = new SimpleOperationDefinitionBuilder(PlatformMBeanConstants.GC, PlatformMBeanDescriptions.getResolver(PlatformMBeanConstants.MEMORY))
.setRuntimeOnly()
|
protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String mmName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
final String name = operation.require(ModelDescriptio... | protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String mmName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
final String name = operation.require(ModelDescriptio... |
private MemoryManagerRootResourceDefinition() {
super(PlatformMBeanConstants.MEMORY_MANAGER_PATH,
PlatformMBeanUtil.getResolver(PlatformMBeanConstants.MEMORY_MANAGER));
}
| private MemoryManagerRootResourceDefinition() {
super(PlatformMBeanConstants.MEMORY_MANAGER_PATH,
PlatformMBeanDescriptions.getResolver(PlatformMBeanConstants.MEMORY_MANAGER));
}
|
private MemoryPoolRootResourceDefinition() {
super(PlatformMBeanConstants.MEMORY_POOL_PATH,
PlatformMBeanUtil.getResolver(PlatformMBeanConstants.MEMORY_POOL));
}
| private MemoryPoolRootResourceDefinition() {
super(PlatformMBeanConstants.MEMORY_POOL_PATH,
PlatformMBeanDescriptions.getResolver(PlatformMBeanConstants.MEMORY_POOL));
}
|
private RuntimeResourceDefinition() {
super(RUNTIME_PATH,
PlatformMBeanUtil.getResolver(PlatformMBeanConstants.RUNTIME));
}
| private RuntimeResourceDefinition() {
super(RUNTIME_PATH,
PlatformMBeanDescriptions.getResolver(PlatformMBeanConstants.RUNTIME));
}
|
Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException;
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy ... | Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException;
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy ... |
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
if (deployed) {
SimpleAttributeDefinition runtimeAttribute = new SimpleAttributeDefinitionBuilder(Constants.CONNECTION_PROPERTY_VALUE).setFlags(AttributeAccess.Flag.STORAGE_RUNTIME).build();
resourc... | public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
if (deployed) {
SimpleAttributeDefinition runtimeAttribute = new SimpleAttributeDefinitionBuilder(Constants.CONNECTION_PROPERTY_VALUE).setFlags(AttributeAccess.Flag.STORAGE_RUNTIME).build();
resourc... |
private static final long serialVersionUID = 2238421096712364033L;
public static final AttachmentKey<BeansXmlDescriptor> BEANS_XML = new AttachmentKey<BeansXmlDescriptor>(BeansXmlDescriptor.class);
} | private static final long serialVersionUID = 2238421096712364033L;
public static final AttachmentKey<BeansXmlDescriptor> BEANS_XML = AttachmentKey.create(BeansXmlDescriptor.class);
} |
private static final long serialVersionUID = 5844905201567666811L;
public static final AttachmentKey<JBossWebXmlDescriptor> WEB_XML = new AttachmentKey<JBossWebXmlDescriptor>(JBossWebXmlDescriptor.class);
| private static final long serialVersionUID = 5844905201567666811L;
public static final AttachmentKey<JBossWebXmlDescriptor> WEB_XML = AttachmentKey.create(JBossWebXmlDescriptor.class);
|
private static final long serialVersionUID = 5844905201567666811L;
public static final AttachmentKey<WebXmlDescriptor> WEB_XML = new AttachmentKey<WebXmlDescriptor>(WebXmlDescriptor.class);
} | private static final long serialVersionUID = 5844905201567666811L;
public static final AttachmentKey<WebXmlDescriptor> WEB_XML = AttachmentKey.create(WebXmlDescriptor.class);
} |
public void install(final BatchBuilder builder) {
// add services
}
} | public void install(final DeploymentItemContext context) {
// add services
}
} |
public void install(final BatchBuilder builder) {
// builder.addService(JBOSS_MANAGEDBEAN.append("module-name-here").append(BINDING).append(name), new JNDIBindingService(name));
}
protected static abstract class Resource {
}
} | public void install(final DeploymentItemContext context) {
// builder.addService(JBOSS_MANAGEDBEAN.append("module-name-here").append(BINDING).append(name), new JNDIBindingService(name));
}
protected static abstract class Resource {
}
} |
public void install(final BatchBuilder builder) {
}
} | public void install(final DeploymentItemContext context) {
}
} |
public void readElement(final XMLExtendedStreamReader reader, final ParseResult<Domain> value) throws XMLStreamException {
// read attributes first
// no required attributes
final int count = reader.getAttributeCount();
for (int i = 0; i < count; i ++) {
if (reader.getAtt... | public void readElement(final XMLExtendedStreamReader reader, final ParseResult<Domain> value) throws XMLStreamException {
// read attributes first
// no required attributes
final int count = reader.getAttributeCount();
for (int i = 0; i < count; i ++) {
if (reader.getAtt... |
protected void writeResponse(final FlushableDataOutput output) throws IOException {
ModelNode result;
try {
System.out.println("--- Executing client request " + batchId);
result = controller.execute(
operation,
... | protected void writeResponse(final FlushableDataOutput output) throws IOException {
ModelNode result;
try {
System.out.println("--- Executing client request " + batchId + " on " + getContext().getChannel().getName());
result = controller.execute(
... |
boolean isCallerInRole(final String ejbName, final Object mappedRoles, final Map<String, Collection<String>> roleLinks,
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for... | boolean isCallerInRole(final String ejbName, final Object mappedRoles, final Map<String, Collection<String>> roleLinks,
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for... |
protected void reconfigure(final URI connectionURI) {
configuration.setUri(connectionURI);
final Connection connection = this.connection;
if(connection != null) {
connection.closeAsync();
}
}
/**
* Resolve the subsystem versions.
*
* @param extensi... | protected void reconfigure(final URI connectionURI) {
configuration.setUri(connectionURI);
final Connection connection = this.connection;
if(connection != null) {
connection.closeAsync();
}
}
/**
* Resolve the subsystem versions.
*
* @param extensi... |
public ModelNode getModelDescription(Locale locale) {
return MessagingDescriptions.getGroupingHandlerAdd(locale);
}
static void addGroupingHandlerConfig(final OperationContext context, final Configuration configuration, final ModelNode model) throws OperationFailedException {
if (model.has... | public ModelNode getModelDescription(Locale locale) {
return MessagingDescriptions.getGroupingHandlerAdd(locale);
}
static void addGroupingHandlerConfig(final OperationContext context, final Configuration configuration, final ModelNode model) throws OperationFailedException {
if (model.has... |
public static long freeSpaceKb(long timeout) throws IOException {
return freeSpaceKb(new File(".").getAbsolutePath(), timeout);
}
//-----------------------------------------------------------------------
/**
* Returns the free space on a drive or volume in a cross-platform manner.
... | public static long freeSpaceKb(long timeout) throws IOException {
return freeSpaceKb(new File(".").getAbsolutePath(), timeout);
}
//-----------------------------------------------------------------------
/**
* Returns the free space on a drive or volume in a cross-platform manner.
... |
protected String getSubsystemXml() throws IOException {
//This is just copied from standalone.xml testing more combinations would be good
return
"<subsystem xmlns=\"urn:jboss:domain:weld:1.0\" />";
}
| protected String getSubsystemXml() throws IOException {
//This is just copied from standalone.xml testing more combinations would be good
return
"<subsystem xmlns=\"urn:jboss:domain:weld:2.0\" require-bean-descriptor=\"false\" non-portable-mode=\"false\" />";
}
|
public SimpleConsumer getConsumer(int partition) {
if (!_kafka.containsKey(partition)) {
HostPort hp = hosts.getPartitionInformation().getHostFor(partition);
_kafka.put(partition, new SimpleConsumer(hp.host, hp.port, _config.socketTimeoutMs, _config.bufferSizeBytes, _config.clientId)... | public SimpleConsumer getConsumer(int partition) {
if (!_kafka.containsKey(partition)) {
Broker hp = hosts.getPartitionInformation().getBrokerFor(partition);
_kafka.put(partition, new SimpleConsumer(hp.host, hp.port, _config.socketTimeoutMs, _config.bufferSizeBytes, _config.clientId)... |
public void testNextGaussian() {
try {
randomData.nextGaussian(0,0);
fail("zero sigma -- IllegalArgumentException expected");
} catch (IllegalArgumentException ex) {
;
}
SummaryStatistics u = SummaryStatistics.newInstance();
for (int i = 0... | public void testNextGaussian() {
try {
randomData.nextGaussian(0,0);
fail("zero sigma -- IllegalArgumentException expected");
} catch (IllegalArgumentException ex) {
;
}
SummaryStatistics u = new SummaryStatistics();
for (int i = 0; i<larg... |
public void shutdown() throws Exception {
simpleConsumer.close();
broker.shutdown();
server.close();
}
| public void shutdown() throws Exception {
simpleConsumer.close();
broker.shutdown();
server.stop();
}
|
public int complete(CommandContext ctx, String buffer, int cursor, List<String> candidates) {
int cmdFirstIndex = 0;
while(cmdFirstIndex < buffer.length()) {
if(!Character.isWhitespace(buffer.charAt(cmdFirstIndex))) {
break;
}
++cmdFirstIndex;
... | public int complete(CommandContext ctx, String buffer, int cursor, List<String> candidates) {
int cmdFirstIndex = 0;
while(cmdFirstIndex < buffer.length()) {
if(!Character.isWhitespace(buffer.charAt(cmdFirstIndex))) {
break;
}
++cmdFirstIndex;
... |
public void handle(ParsingContext ctx) throws OperationFormatException {
if(ctx.getCharacter() != '=') {
ArgumentValueState.this.getDefaultHandler().handle(ctx);
}
}});
putHandler(' ', GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
... | public void handle(ParsingContext ctx) throws OperationFormatException {
if(ctx.getCharacter() != '=') {
getHandler(ctx.getCharacter()).handle(ctx);
}
}});
putHandler(' ', GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
enterState... |
public void run(ILocalCluster cluster);
} | public void run(ILocalCluster cluster) throws Exception;
} |
public boolean permit(ReqContext context, String operation, Map topology_conf) {
LOG.info("[req "+ context.requestID()+ "] Access "
+ " from: " + (context.remoteAddress() == null? "null" : context.remoteAddress().toString())
+ (context.principal() == null? "" : (" principal... | public boolean permit(ReqContext context, String operation, Map topology_conf) {
LOG.info("[req "+ context.requestID()+ "] Access "
+ " from: " + (context.remoteAddress() == null? "null" : context.remoteAddress().toString())
+ (context.principal() == null? "" : (" principal... |
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException {
final String operationName = operation.require(OP).asString();
HornetQComponentControl control = null;
boolean appliedToRuntime = false;
Object handback = null;
... | protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException {
final String operationName = operation.require(OP).asString();
HornetQComponentControl control = null;
boolean appliedToRuntime = false;
Object handback = null;
... |
protected final void addElement(AbstractModelElement<?> element) {
if (! elements.add(element)) {
throw new IllegalArgumentException("Domain already contains element " + element);
}
}
| protected final void addElement(AbstractModelElement<?> element) {
if (! elements.add(element)) {
throw new IllegalArgumentException("Duplicate element " + element);
}
}
|
private Process process;
ManagedProcess(final ProcessManagerMaster master, final String processName, final List<String> command, final Map<String, String> env, final String workingDirectory) {
this.master = master;
this.processName = processName;
this.command = command;
this.env... | private Process process;
ManagedProcess(final ProcessManagerMaster master, final String processName, final List<String> command, final Map<String, String> env, final String workingDirectory) {
this.master = master;
this.processName = processName;
this.command = command;
this.env... |
public void topologyChanged(TopologyChangedEvent<String, ?> event) {
if (event.isPre()) return;
Cache<String, ?> cache = event.getCache();
Address localAddress = cache.getCacheManager().getAddress();
ConsistentHash oldHash = event.getConsistentHashAtStart();
ConsistentHash n... | public void topologyChanged(TopologyChangedEvent<String, ?> event) {
if (event.isPre()) return;
Cache<String, ?> cache = event.getCache();
Address localAddress = cache.getCacheManager().getAddress();
ConsistentHash oldHash = event.getConsistentHashAtStart();
ConsistentHash n... |
package org.jboss.as.ejb3.timerservice.persistence;
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; yo... | package org.jboss.as.ejb3.timerservice.persistence;
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; yo... |
public int hash(final Integer o) {
return o.intValue() % 2 == 0 ? Integer.valueOf(0).hashCode() : Integer.valueOf(1).hashCode();
}
};
assertTrue(CollectionUtils.isEqualCollection(collectionA, collectionA, e));
assertTrue(CollectionUtils.isEqualCol... | public int hash(final Integer o) {
return o.intValue() % 2 == 0 ? Integer.valueOf(0).hashCode() : Integer.valueOf(1).hashCode();
}
};
assertTrue(CollectionUtils.isEqualCollection(collectionA, collectionA, e));
assertTrue(CollectionUtils.isEqualCol... |
public void initialize(final ExtensionContext context) {
WeldLogger.ROOT_LOGGER.debug("Activating Weld Extension");
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION,
MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSI... | public void initialize(final ExtensionContext context) {
WeldLogger.ROOT_LOGGER.debug("Activating Weld Extension");
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION,
MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSI... |
private void testCustomHandler(final String profileName) throws Exception {
final ModelNode address = createCustomHandlerAddress(profileName, "CONSOLE").toModelNode();
// Add the handler
final ModelNode addOp = Operations.createAddOperation(address);
addOp.get("module").set("org.jbo... | private void testCustomHandler(final String profileName) throws Exception {
final ModelNode address = createCustomHandlerAddress(profileName, "CONSOLE2").toModelNode();
// Add the handler
final ModelNode addOp = Operations.createAddOperation(address);
addOp.get("module").set("org.jb... |
protected final SourceClass doProcessConfigurationClass(ConfigurationClass configClass, SourceClass sourceClass) throws IOException {
// recursively process any member (nested) classes first
processMemberClasses(configClass, sourceClass);
// process any @PropertySource annotations
for (AnnotationAttributes pr... | protected final SourceClass doProcessConfigurationClass(ConfigurationClass configClass, SourceClass sourceClass) throws IOException {
// recursively process any member (nested) classes first
processMemberClasses(configClass, sourceClass);
// process any @PropertySource annotations
for (AnnotationAttributes pr... |
private void schedule(Cache<BeanKey<I>, BeanEntry<G>> cache, Locality oldLocality, Locality newLocality) {
// Iterate over sessions in memory
for (Object key: cache.getAdvancedCache().withFlags(Flag.CACHE_MODE_LOCAL, Flag.SKIP_CACHE_LOAD, Flag.SKIP_LOCKING).keySet()) {
// Cache may conta... | private void schedule(Cache<BeanKey<I>, BeanEntry<G>> cache, Locality oldLocality, Locality newLocality) {
// Iterate over sessions in memory
for (Object key: cache.getAdvancedCache().withFlags(Flag.CACHE_MODE_LOCAL, Flag.SKIP_CACHE_LOAD, Flag.SKIP_LOCKING).keySet()) {
// Cache may conta... |
public Void getValue() throws IllegalStateException {
return null;
}
InjectedValue<JMSServerManager> getJmsServer() {
return jmsServer;
}
} | public InjectedValue<JMSServerManager> getJmsServer() {
return jmsServer;
}
} |
public synchronized void start(final StartContext startContext) throws StartException {
transientPoaMap = Collections.synchronizedMap(new HashMap<String, POA>());
persistentPoaMap = Collections.synchronizedMap(new HashMap<String, POA>());
final POA rootPOA = this.rootPOA.getValue();
... | public synchronized void start(final StartContext startContext) throws StartException {
transientPoaMap = Collections.synchronizedMap(new HashMap<String, POA>());
persistentPoaMap = Collections.synchronizedMap(new HashMap<String, POA>());
final POA rootPOA = this.rootPOA.getValue();
... |
package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... | package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... |
package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... | package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... |
package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... | package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... |
package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... | package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... |
package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... | package org.wildfly.iiop.openjdk.rmi.ir;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free softwar... |
package org.wildfly.iiop.openjdk.rmi.marshal;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free so... | package org.wildfly.iiop.openjdk.rmi.marshal;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free so... |
package org.wildfly.iiop.openjdk.rmi.marshal;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free so... | package org.wildfly.iiop.openjdk.rmi.marshal;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free so... |
public XmlStreamWriter(OutputStream out, String defaultEncoding) {
this.out = out;
this.defaultEncoding = (defaultEncoding != null ? defaultEncoding : "UTF-8");
}
| public XmlStreamWriter(OutputStream out, String defaultEncoding) {
this.out = out;
this.defaultEncoding = defaultEncoding != null ? defaultEncoding : "UTF-8";
}
|
public void rule() {
assertEquals(this.caseName, this.expected, this.rule.languageMatches(this.langs));
}
} | public void testRuleLanguageMatches() {
assertEquals(this.caseName, this.expected, this.rule.languageMatches(this.langs));
}
} |
public IoFuture<Connection> connect() throws IOException {
final Endpoint endpoint = this.endpointInjectedValue.getValue();
return endpoint.connect(this.destination, this.connectionCreationOptions);
}
| public IoFuture<Connection> connect() throws IOException {
final Endpoint endpoint = this.endpointInjectedValue.getValue();
return endpoint.connect(this.destination, this.connectionCreationOptions, getCallbackHandler());
}
|
public IoFuture<Connection> connect() throws IOException {
final URI uri;
try {
// we lazily generate the URI on first request to connect() instead of on start() of the service
// in order to delay resolving the destination address. No point trying to resolve that address
... | public IoFuture<Connection> connect() throws IOException {
final URI uri;
try {
// we lazily generate the URI on first request to connect() instead of on start() of the service
// in order to delay resolving the destination address. No point trying to resolve that address
... |
public static AbstractKernelServicesImpl create(ProcessType processType, RunningModeControl runningModeControl, boolean validateOperations,
List<ModelNode> bootOperations, ModelTestParser testParser, ModelVersion legacyModelVersion, TestModelType type, ModelInitializer modelInitializer, ExtensionRegistr... | public static AbstractKernelServicesImpl create(ProcessType processType, RunningModeControl runningModeControl, boolean validateOperations,
List<ModelNode> bootOperations, ModelTestParser testParser, ModelVersion legacyModelVersion, TestModelType type, ModelInitializer modelInitializer, ExtensionRegistr... |
protected void addAddOutboundConnectionOperations(List<ModelNode> bootOperations) throws Exception {
bootOperations.add(OutboundConnectionAddBuilder.builder(MASTER_CONNECTION_NAME)
.setUrl("ldap://" + HOST_NAME + ":" + MASTER_LDAP_PORT)
.setSearchDn(getSearchDn())
... | protected void addAddOutboundConnectionOperations(List<ModelNode> bootOperations) throws Exception {
bootOperations.add(OutboundConnectionAddBuilder.builder(MASTER_CONNECTION_NAME)
.setUrl("ldap://" + HOST_NAME + ":" + MASTER_LDAP_PORT)
.setSearchDn(getSearchDn())
... |
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
if (context.isResourceServiceRestartAllowed()) {
EJB3RemoteServiceAdd.INSTANCE.installRuntimeServices(context, model);
} else {
context.revertReloa... | protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
if (context.isResourceServiceRestartAllowed()) {
EJB3RemoteServiceAdd.INSTANCE.installRuntimeServices(context, model, null);
} else {
context.rever... |
private void testCustomHandler(final String profileName) throws Exception {
final ModelNode address = createCustomHandlerAddress(profileName, "CONSOLE2").toModelNode();
// Add the handler
final ModelNode addOp = Operations.createAddOperation(address);
addOp.get("module").set("org.jb... | private void testCustomHandler(final String profileName) throws Exception {
final ModelNode address = createCustomHandlerAddress(profileName, "CONSOLE").toModelNode();
// Add the handler
final ModelNode addOp = Operations.createAddOperation(address);
addOp.get("module").set("org.jbo... |
protected AccessLogHandler configureAccessLogHandler(HttpHandler handler) {
return new AccessLogHandler(handler, logReceiver, pattern, AccessLogService.class.getClassLoader());
}
| protected AccessLogHandler configureAccessLogHandler(HttpHandler handler) {
return new AccessLogHandler(handler, logReceiver, pattern, AccessLogHandler.class.getClassLoader());
}
|
public synchronized void start(final StartContext startContext) throws StartException {
ClassLoader oldTccl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(module.getClassLoader());
DeploymentInfo deploymentInfo = createSer... | public synchronized void start(final StartContext startContext) throws StartException {
ClassLoader oldTccl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(module.getClassLoader());
DeploymentInfo deploymentInfo = createSer... |
public Object clone() {
try {
StrTokenizer cloned = (StrTokenizer) super.clone();
if (cloned.chars != null) {
cloned.chars = (char[]) cloned.chars;
}
cloned.reset();
return cloned;
} catch (CloneNotSupportedException ex) {
... | public Object clone() {
try {
StrTokenizer cloned = (StrTokenizer) super.clone();
if (cloned.chars != null) {
cloned.chars = cloned.chars;
}
cloned.reset();
return cloned;
} catch (CloneNotSupportedException ex) {
... |
public TarArchiveEntry(String name, byte linkFlag) {
this(name, linkFlag, false);
}
/**
* Construct an entry with a name and a link flag.
s *
* @param name the entry name
| public TarArchiveEntry(String name, byte linkFlag) {
this(name, linkFlag, false);
}
/**
* Construct an entry with a name and a link flag.
*
* @param name the entry name
|
public boolean handles(HttpServletRequest request, Resource original) {
return LESS_EXT.equals(StringUtils.getFilenameExtension(original.getFilename()));
}
} | public boolean willTransform(HttpServletRequest request, Resource original) {
return LESS_EXT.equals(StringUtils.getFilenameExtension(original.getFilename()));
}
} |
public void getExtensionMappedResourceUrl() {
List<ResourceResolver> resolvers = new ArrayList<ResourceResolver>();
resolvers.add(new ExtensionMappingResourceResolver());
resolvers.add(new PathResourceResolver());
handler.setResourceResolvers(resolvers);
resetMapper();
String url = mapper.getUrlForResourc... | public void getExtensionMappedResourceUrl() {
List<ResourceResolver> resolvers = new ArrayList<ResourceResolver>();
resolvers.add(new PathExtensionResourceResolver());
resolvers.add(new PathResourceResolver());
handler.setResourceResolvers(resolvers);
resetMapper();
String url = mapper.getUrlForResource("... |
public int hashCode() {
return this.id.hashCode();
}
| public int hashCode() {
return this.id.hashCode() ^ this.attribute.hashCode();
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.