buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public synchronized void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentUnit parent = deploymentUnit.getParent();
final DeploymentUnit topLevelDeployment = ... | public synchronized void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentUnit parent = deploymentUnit.getParent();
final DeploymentUnit topLevelDeployment = ... |
protected BlockingBuffer(Buffer<E> buffer, long timeoutMillis) {
super(buffer);
this.timeout = (timeoutMillis < 0 ? 0 : timeoutMillis);
}
| protected BlockingBuffer(Buffer<E> buffer, long timeoutMillis) {
super(buffer);
this.timeout = timeoutMillis < 0 ? 0 : timeoutMillis;
}
|
public boolean isFull() {
// size() is synchronized
return (size() == maxSize());
}
| public boolean isFull() {
// size() is synchronized
return size() == maxSize();
}
|
public boolean evaluate(T object) {
return (iPredicate1.evaluate(object) && iPredicate2.evaluate(object));
}
| public boolean evaluate(T object) {
return iPredicate1.evaluate(object) && iPredicate2.evaluate(object);
}
|
public boolean evaluate(T object) {
return (iValue == object);
}
| public boolean evaluate(T object) {
return iValue == object;
}
|
public boolean evaluate(Object object) {
return (iType.isInstance(object));
}
| public boolean evaluate(Object object) {
return iType.isInstance(object);
}
|
public boolean evaluate(T object) {
return (object != null);
}
| public boolean evaluate(T object) {
return object != null;
}
|
public boolean evaluate(T object) {
return !(iPredicate.evaluate(object));
}
| public boolean evaluate(T object) {
return !iPredicate.evaluate(object);
}
|
public boolean evaluate(T object) {
return (object == null);
}
| public boolean evaluate(T object) {
return object == null;
}
|
public boolean evaluate(T object) {
return (iPredicate1.evaluate(object) || iPredicate2.evaluate(object));
}
| public boolean evaluate(T object) {
return iPredicate1.evaluate(object) || iPredicate2.evaluate(object);
}
|
public boolean hasNext() {
return (index < endIndex);
}
| public boolean hasNext() {
return index < endIndex;
}
|
public boolean hasPrevious() {
return (this.index > this.startIndex);
}
| public boolean hasPrevious() {
return this.index > this.startIndex;
}
|
public int previousIndex() {
return (nextIndex-1);
}
| public int previousIndex() {
return nextIndex-1;
}
|
public boolean hasNext() {
return (collection.size() > 0);
}
| public boolean hasNext() {
return collection.size() > 0;
}
|
public boolean hasNext() {
return (this.index < this.endIndex);
}
| public boolean hasNext() {
return this.index < this.endIndex;
}
|
public boolean hasNext() {
return (beforeFirst && !removed);
}
| public boolean hasNext() {
return beforeFirst && !removed;
}
|
public boolean add(E object) {
// gets initial size
final int sizeBefore = size();
// adds element if unique
add(size(), object);
// compares sizes to detect if collection changed
return (sizeBefore != size());
}
| public boolean add(E object) {
// gets initial size
final int sizeBefore = size();
// adds element if unique
add(size(), object);
// compares sizes to detect if collection changed
return sizeBefore != size();
}
|
public Object put(K key, Object value) {
boolean result = false;
Collection<V> coll = getCollection(key);
if (coll == null) {
coll = createCollection(1); // might produce a non-empty collection
coll.add((V) value);
if (coll.size() > 0) {
/... | public Object put(K key, Object value) {
boolean result = false;
Collection<V> coll = getCollection(key);
if (coll == null) {
coll = createCollection(1); // might produce a non-empty collection
coll.add((V) value);
if (coll.size() > 0) {
/... |
private boolean isExpired(long now, Long expirationTimeObject) {
if (expirationTimeObject != null) {
long expirationTime = expirationTimeObject.longValue();
return (expirationTime >= 0 && now >= expirationTime);
}
| private boolean isExpired(long now, Long expirationTimeObject) {
if (expirationTimeObject != null) {
long expirationTime = expirationTimeObject.longValue();
return expirationTime >= 0 && now >= expirationTime;
}
|
protected boolean isSetValueChecking() {
return (valuePredicate != null);
}
| protected boolean isSetValueChecking() {
return valuePredicate != null;
}
|
protected boolean isSetValueChecking() {
return (valueTransformer != null);
}
| protected boolean isSetValueChecking() {
return valueTransformer != null;
}
|
public int hashCode() {
int code = 0;
for (E e : this) {
code += (e == null ? 0 : e.hashCode());
}
return code;
}
| public int hashCode() {
int code = 0;
for (E e : this) {
code += e == null ? 0 : e.hashCode();
}
return code;
}
|
protected final void verify() {
for (ListIterator<Object> i = mockObjects.listIterator(); i.hasNext();) {
try {
EasyMock.verify(i.next());
} catch (AssertionError e) {
throw new AssertionError((i.previousIndex() + 1) + ""
+ e.ge... | protected final void verify() {
for (ListIterator<Object> i = mockObjects.listIterator(); i.hasNext();) {
try {
EasyMock.verify(i.next());
} catch (AssertionError e) {
throw new AssertionError(i.previousIndex() + 1 + ""
+ e.getM... |
public void testIterator() {
Iterator<E> iter = makeObject();
for (int element : testArray) {
Integer testValue = new Integer(element);
Number iterValue = (Number) iter.next();
assertEquals("Iteration value is correct", testValue, iterValue);
}
a... | public void testIterator() {
Iterator<E> iter = makeObject();
for (int element : testArray) {
Integer testValue = new Integer(element);
Number iterValue = (Number) iter.next();
assertEquals("Iteration value is correct", testValue, iterValue);
}
a... |
public void testIterator() {
Iterator<E> iter = makeObject();
for (String testValue : testArray) {
E iterValue = iter.next();
assertEquals("Iteration value is correct", testValue, iterValue);
}
assertTrue("Iterator should now be empty", !iter.hasNext());
... | public void testIterator() {
Iterator<E> iter = makeObject();
for (String testValue : testArray) {
E iterValue = iter.next();
assertEquals("Iteration value is correct", testValue, iterValue);
}
assertTrue("Iterator should now be empty", !iter.hasNext());
... |
public void testListIterator() {
ListIterator<E> iter = makeObject();
// TestArrayIterator#testIterator() has already tested the iterator forward,
// now we need to test it in reverse
// fast-forward the iterator to the end...
while (iter.hasNext()) {
iter.next... | public void testListIterator() {
ListIterator<E> iter = makeObject();
// TestArrayIterator#testIterator() has already tested the iterator forward,
// now we need to test it in reverse
// fast-forward the iterator to the end...
while (iter.hasNext()) {
iter.next... |
public void testIterator() {
Iterator<String> iter = makeObject();
for (String testValue : testArray) {
Object iterValue = iter.next();
assertEquals( "Iteration value is correct", testValue, iterValue );
}
assertTrue("Iterator should now be empty", !iter.has... | public void testIterator() {
Iterator<String> iter = makeObject();
for (String testValue : testArray) {
Object iterValue = iter.next();
assertEquals( "Iteration value is correct", testValue, iterValue );
}
assertTrue("Iterator should now be empty", !iter.has... |
public void testIterator() {
Iterator<E> iter = makeObject();
assertTrue("Iterator has a first item", iter.hasNext());
E iterValue = iter.next();
assertEquals("Iteration value is correct", testValue, iterValue);
assertTrue("Iterator should now be empty", !iter.hasNext());
... | public void testIterator() {
Iterator<E> iter = makeObject();
assertTrue("Iterator has a first item", iter.hasNext());
E iterValue = iter.next();
assertEquals("Iteration value is correct", testValue, iterValue);
assertTrue("Iterator should now be empty", !iter.hasNext());
... |
public void testIterator() {
Iterator<E> iter = makeObject();
for (String testValue : testArray) {
E iterValue = iter.next();
assertEquals( "Iteration value is correct", testValue, iterValue );
}
assertTrue("Iterator should now be empty", ! iter.hasNext() );... | public void testIterator() {
Iterator<E> iter = makeObject();
for (String testValue : testArray) {
E iterValue = iter.next();
assertEquals( "Iteration value is correct", testValue, iterValue );
}
assertTrue("Iterator should now be empty", ! iter.hasNext() );... |
public boolean evaluate(Object o) {
return (o instanceof String);
}
};
| public boolean evaluate(Object o) {
return o instanceof String;
}
};
|
public boolean evaluate(E o) {
return (o instanceof String) && (((String) o).startsWith("A"));
}
};
| public boolean evaluate(E o) {
return o instanceof String && ((String) o).startsWith("A");
}
};
|
public <RT extends Number> RT convert(Number source, Class<RT> targetClass) throws Exception {
return NumberUtils.convertNumberToTargetClass(source, targetClass);
}
}
| public <RT extends Number> RT convert(Number source, Class<RT> targetClass) {
return NumberUtils.convertNumberToTargetClass(source, targetClass);
}
}
|
public static int nextPrime(int n) {
if (n < 0) {
throw new MathIllegalArgumentException(LocalizedFormats.NUMBER_TOO_SMALL, n, 0);
}
if (n == 2) {
return 2;
}
n = n | 1;//make sur n is odd
if (n == 1) {
return 2;
}
... | public static int nextPrime(int n) {
if (n < 0) {
throw new MathIllegalArgumentException(LocalizedFormats.NUMBER_TOO_SMALL, n, 0);
}
if (n == 2) {
return 2;
}
n = n | 1;//make sure n is odd
if (n == 1) {
return 2;
}
... |
public WebSocketHttpRequestHandler( WebSocketHandler webSocketHandler, HandshakeHandler handshakeHandler) {
Assert.notNull(webSocketHandler, "webSocketHandler must not be null");
Assert.notNull(handshakeHandler, "handshakeHandler must not be null");
this.webSocketHandler = decorateWebSocketHandler(webSocketHandl... | public WebSocketHttpRequestHandler( WebSocketHandler webSocketHandler, HandshakeHandler handshakeHandler) {
Assert.notNull(webSocketHandler, "webSocketHandler must not be null");
Assert.notNull(handshakeHandler, "handshakeHandler must not be null");
this.webSocketHandler = decorateWebSocketHandler(webSocketHandl... |
public void handleMessage() {
this.registry.registerSessionId("joe", "123");
when(this.brokerChannel.send(Mockito.any(Message.class))).thenReturn(true);
this.messageHandler.handleMessage(createMessage(SimpMessageType.MESSAGE, "joe", "123", "/user/joe/queue/foo"));
ArgumentCaptor<Message> captor = ArgumentCapt... | public void handleMessage() {
this.registry.registerSessionId("joe", "123");
when(this.brokerChannel.send(Mockito.any(Message.class))).thenReturn(true);
this.messageHandler.handleMessage(createMessage(SimpMessageType.MESSAGE, "joe", "123", "/user/joe/queue/foo"));
ArgumentCaptor<Message> captor = ArgumentCapt... |
public void handleMessageToClientUserDestination() {
StompHeaderAccessor headers = StompHeaderAccessor.create(StompCommand.MESSAGE);
headers.setMessageId("mess0");
headers.setSubscriptionId("sub0");
headers.setDestination("/queue/foo-user123");
headers.setHeader(UserDestinationMessageHandler.SUBSCRIBE_DESTI... | public void handleMessageToClientUserDestination() {
StompHeaderAccessor headers = StompHeaderAccessor.create(StompCommand.MESSAGE);
headers.setMessageId("mess0");
headers.setSubscriptionId("sub0");
headers.setDestination("/queue/foo-user123");
headers.setHeader(StompHeaderAccessor.ORIGINAL_DESTINATION, "/u... |
private final OperationHandler operationHandler;
ProxyOperationRegistry(final String valueString, final Subregistry parent, final OperationHandler operationHandler) {
super(valueString, parent);
this.operationHandler = operationHandler;
}
| private final OperationHandler operationHandler;
ProxyOperationRegistry(final String valueString, final OperationSubregistry parent, final OperationHandler operationHandler) {
super(valueString, parent);
this.operationHandler = operationHandler;
}
|
protected String getString(byte[] bytes, String enc)
throws ZipException {
if (enc == null) {
return new String(bytes);
} else {
try {
return ZipEncodingHelper.decodeName(bytes, encoding);
} catch (java.nio.charset.UnsupportedCharsetExcepti... | protected String getString(byte[] bytes, String enc)
throws ZipException {
if (enc == null) {
return new String(bytes);
} else {
try {
return ZipEncodingHelper.decodeName(bytes, enc);
} catch (java.nio.charset.UnsupportedCharsetException ex... |
private static boolean isLineBreak(final Character c) {
return c != null && (c == LF || c == CR);
}
/**
* Verifies the consistency of the parameters and throws an IllegalStateException if necessary.
*
* @throws IllegalStateException
*/
void validate() throws IllegalStateExc... | private static boolean isLineBreak(final Character c) {
return c != null && (c == LF || c == CR);
}
/**
* Verifies the consistency of the parameters and throws an IllegalStateException if necessary.
*
* @throws IllegalStateException
*/
void validate() throws IllegalStateExc... |
import org.jboss.as.ee.component.lifecycle.ComponentLifecycle;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., 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... | import org.jboss.as.ee.component.lifecycle.ComponentLifecycle;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., 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... |
package org.jboss.as.ee.component.lifecycle;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., 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 software; yo... | package org.jboss.as.ee.component.lifecycle;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., 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 software; yo... |
@Message(id = 15061, value = "Extension with module 'org.jboss.as.deployment-scanner' cannot be installed in a managed domain. Please remove it and any subsystem referencing it")
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author ... | @Message(id = 15061, value = "Extension with module 'org.jboss.as.deployment-scanner' cannot be installed in a managed domain. Please remove it and any subsystem referencing it")
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author ... |
private static void usage() {
System.out.println("Usage: ./run.sh [args...]\n");
System.out.println("where args include:");
System.out.println(" -D<name>[=<value>] Set a system property");
System.out.println(" -help Display this message an... | private static void usage() {
System.out.println("Usage: ./run.sh [args...]\n");
System.out.println("where args include:");
System.out.println(" -D<name>[=<value>] Set a system property");
System.out.println(" -help Display this message an... |
public TestServerManagerProcess(Managed managed, ServerManagerEnvironment environment) {
super(environment);
this.managed = managed;
}
| public TestServerManagerProcess(Managed managed, ServerManagerEnvironment environment) {
super(environment, authCode);
this.managed = managed;
}
|
public ResourceReference<EntityManager> createResource() {
final TransactionScopedEntityManager result = new TransactionScopedEntityManager(scopedPuName, new HashMap<Object, Object>(), persistenceUnitService.getEntityManagerFactory(), context.synchronizationType());
return ne... | public ResourceReference<EntityManager> createResource() {
final TransactionScopedEntityManager result = new TransactionScopedEntityManager(scopedPuName, new HashMap<Object, Object>(), persistenceUnitService.getEntityManagerFactory(), context.synchronization());
return new Si... |
public Object lookup(String name) throws IllegalArgumentException {
if (name == null) {
throw new IllegalArgumentException("jndi name cannot be null during lookup");
}
final NamespaceContextSelector namespaceContextSelector = NamespaceContextSelector.getCurrentSelector();
... | public Object lookup(String name) throws IllegalArgumentException {
if (name == null) {
throw new IllegalArgumentException("jndi name cannot be null during lookup");
}
final NamespaceContextSelector namespaceContextSelector = NamespaceContextSelector.getCurrentSelector();
... |
public E next() {
inUse = true;
for (Iterator<Iterator<E>> it = iterators.iterator(); it.hasNext();) {
Iterator<E> iterator = it.next();
if (iterator.hasNext()) {
return iterator.next();
}
}
throw new NoSuchElementException("Exhaused all iterators");
}
| public E next() {
inUse = true;
for (Iterator<Iterator<E>> it = iterators.iterator(); it.hasNext();) {
Iterator<E> iterator = it.next();
if (iterator.hasNext()) {
return iterator.next();
}
}
throw new NoSuchElementException("Exhausted all iterators");
}
|
protected void handleMessageInternal(Message<?> message) {
SimpMessageHeaderAccessor headers = SimpMessageHeaderAccessor.wrap(message);
SimpMessageType messageType = headers.getMessageType();
String destination = headers.getDestination();
if (!checkDestinationPrefix(destination)) {
if (logger.isTraceEnabl... | protected void handleMessageInternal(Message<?> message) {
SimpMessageHeaderAccessor headers = SimpMessageHeaderAccessor.wrap(message);
SimpMessageType messageType = headers.getMessageType();
String destination = headers.getDestination();
if (!checkDestinationPrefix(destination)) {
if (logger.isTraceEnabl... |
protected int getOrder() {
return this.order;
}
| protected int getOrder() {
return (this.order != null ? this.order : Ordered.LOWEST_PRECEDENCE);
}
|
public void testGetBeanWithNullArg() {
try {
getBeanFactory().getBean(null);
fail("Can't get null bean");
}
catch (IllegalArgumentException ex) {
// OK
}
}
| public void testGetBeanWithNullArg() {
try {
getBeanFactory().getBean((String) null);
fail("Can't get null bean");
}
catch (IllegalArgumentException ex) {
// OK
}
}
|
public void testEscapeHiragana() throws java.io.UnsupportedEncodingException {
// Some random Japanese unicode characters
String original = "\u304B\u304C\u3068";
String escaped = StringEscapeUtils.escapeHtml4(original);
assertEquals( "Hiragana character unicode behaviour should not b... | public void testEscapeHiragana() {
// Some random Japanese unicode characters
String original = "\u304B\u304C\u3068";
String escaped = StringEscapeUtils.escapeHtml4(original);
assertEquals( "Hiragana character unicode behaviour should not be being escaped by escapeHtml4",
ori... |
public void doOneRandom(final CSVFormat format) throws Exception {
final Random r = new Random();
final int nLines = r.nextInt(4) + 1;
final int nCol = r.nextInt(3) + 1;
// nLines=1;nCol=2;
final String[][] lines = new String[nLines][];
for (int i = 0; i < nLines; i+... | public void doOneRandom(final CSVFormat format) throws Exception {
final Random r = new Random();
final int nLines = r.nextInt(4) + 1;
final int nCol = r.nextInt(3) + 1;
// nLines=1;nCol=2;
final String[][] lines = new String[nLines][];
for (int i = 0; i < nLines; i+... |
public Cancellable execute(NewOperationContext updateContext, ModelNode operation, ResultHandler resultHandler) {
final ModelNode config = operation.get(REQUEST_PROPERTIES, CommonAttributes.CONTAINER_CONFIG);
final ModelNode compensatingOperation = new ModelNode();
compensatingOperation.get... | public Cancellable execute(NewOperationContext updateContext, ModelNode operation, ResultHandler resultHandler) {
final ModelNode config = operation.get(REQUEST_PROPERTIES, CommonAttributes.CONTAINER_CONFIG);
final ModelNode compensatingOperation = new ModelNode();
compensatingOperation.get... |
private static String performCall(String urlPattern) throws Exception {
return HttpRequest.get("http://localhost:8080/jaxrsnoap/" + urlPattern, 5, TimeUnit.SECONDS);
}
| private static String performCall(String urlPattern) throws Exception {
return HttpRequest.get("http://localhost:8080/jaxrsnoap/" + urlPattern, 10, TimeUnit.SECONDS);
}
|
protected void finishModelStage(OperationContext context, ModelNode operation, String attributeName, ModelNode newValue,
ModelNode oldValue, Resource model) throws OperationFailedException {
if (newValue.getType() == ModelType.EXPRESSION || newValue.asBoolean(false) == false) {
/*
... | protected void finishModelStage(OperationContext context, ModelNode operation, String attributeName, ModelNode newValue,
ModelNode oldValue, Resource model) throws OperationFailedException {
if (newValue.getType() == ModelType.EXPRESSION || newValue.asBoolean(false) == false) {
/*
... |
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
ModelNode model = context.readResource(PathAddress.EMPTY_ADDRESS).getModel();
final String roleName = RoleMappingResourceDefinition.getRoleName(operation);
final AuthorizerConfiguration.Prin... | public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
ModelNode model = context.readResource(PathAddress.EMPTY_ADDRESS).getModel();
final String roleName = RoleMappingResourceDefinition.getRoleName(operation);
final AuthorizerConfiguration.Prin... |
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
context.removeResource(PathAddress.EMPTY_ADDRESS);
PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
final String roleName = address.getLastElement().getValue().toUpperC... | public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
context.removeResource(PathAddress.EMPTY_ADDRESS);
PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
final String roleName = address.getLastElement().getValue().toUpperC... |
protected void updateModel(OperationContext context, ModelNode operation) throws OperationFailedException {
context.removeResource(PathAddress.EMPTY_ADDRESS);
if (validateAuthentication && !context.isBooting()) {
ModelNode validationOp = AuthenticationValidatingHandler.createOperation(o... | protected void updateModel(OperationContext context, ModelNode operation) throws OperationFailedException {
context.removeResource(PathAddress.EMPTY_ADDRESS);
if (validateAuthentication && !context.isBooting()) {
ModelNode validationOp = AuthenticationValidatingHandler.createOperation(o... |
protected void finishModelStage(OperationContext context, ModelNode operation, String attributeName, ModelNode newValue,
ModelNode oldValue, Resource model) throws OperationFailedException {
if ((oldValue.equals(newValue) == false) && newValue.isDefined() &&
(newValue.getType() =... | protected void finishModelStage(OperationContext context, ModelNode operation, String attributeName, ModelNode newValue,
ModelNode oldValue, Resource model) throws OperationFailedException {
if ((oldValue.equals(newValue) == false) && newValue.isDefined() &&
(newValue.getType() =... |
protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) {
HostModelUtil.createRootRegistry(rootRegistration, environment, ignoredRegistry, this, processType);
VersionModelInitializer.registerRootResource(rootResource, environment != null ? environment.getProd... | protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) {
HostModelUtil.createRootRegistry(rootRegistration, environment, ignoredRegistry, this, processType, authorizer);
VersionModelInitializer.registerRootResource(rootResource, environment != null ? environ... |
public void registerOperations(ManagementResourceRegistration resourceRegistration) {
GlobalOperationHandlers.registerGlobalOperations(resourceRegistration, ProcessType.STANDALONE_SERVER);
if (serverEnvironment != null) {
resourceRegistration.registerOperationHandler(ValidateOperationHa... | public void registerOperations(ManagementResourceRegistration resourceRegistration) {
GlobalOperationHandlers.registerGlobalOperations(resourceRegistration, ProcessType.STANDALONE_SERVER);
if (serverEnvironment != null) {
resourceRegistration.registerOperationHandler(ValidateOperationHa... |
protected void performRemove(OperationContext context, ModelNode operation, ModelNode model)
throws OperationFailedException {
RbacSanityCheckOperation.registerOperation(context);
super.performRemove(context, operation, model);
}
| protected void performRemove(OperationContext context, ModelNode operation, ModelNode model)
throws OperationFailedException {
RbacSanityCheckOperation.addOperation(context);
super.performRemove(context, operation, model);
}
|
* Returns the task ids that received the tuples.
package backtype.storm.task;
import backtype.storm.tuple.IAnchorable;
import backtype.storm.tuple.Tuple;
import java.util.Collection;
import java.util.List;
public interface IOutputCollector {
/**
Returns the task ids that received the tuples.
*/
... | * Returns the task ids that received the tuples.
package backtype.storm.task;
import backtype.storm.tuple.IAnchorable;
import backtype.storm.tuple.Tuple;
import java.util.Collection;
import java.util.List;
public interface IOutputCollector {
/**
* Returns the task ids that received the tuples.
*/
... |
public void run(Map<ServiceName, StartException> serviceFailures, long elapsedTime, int totalServices, int onDemandServices, int startedServices) {
if(serviceFailures.isEmpty()) {
log.infof("JBoss AS started - Installed %d and started %d services in %dms.", totalServices,... | public void run(Map<ServiceName, StartException> serviceFailures, long elapsedTime, int totalServices, int onDemandServices, int startedServices) {
if(serviceFailures.isEmpty()) {
log.infof("JBoss AS started in %dms. - Services [Total: %d, On-demand: %d. Started: %d]", el... |
public void run(Map<ServiceName, StartException> serviceFailures, long elapsedTime, int totalServices, int onDemandServices, int startedServices) {
if(serviceFailures.isEmpty()) {
log.infof("JBoss AS started - Installed %d and started %d services in %dms.", totalServices,... | public void run(Map<ServiceName, StartException> serviceFailures, long elapsedTime, int totalServices, int onDemandServices, int startedServices) {
if(serviceFailures.isEmpty()) {
log.infof("JBoss AS started in %dms. - Services [Total: %d, On-demand: %d. Started: %d]", el... |
private static final String[] DEFAULT_TEST_EXECUTION_LISTENER_CLASS_NAMES = new String[] {
"org.springframework.test.context.web.WebTestExecutionListener",
"org.springframework.test.context.support.DependencyInjectionTestExecutionListener",
"org.springframework.test.context.support.DirtiesContextTestExecutionLis... | private static final String[] DEFAULT_TEST_EXECUTION_LISTENER_CLASS_NAMES = new String[] {
"org.springframework.test.context.web.ServletTestExecutionListener",
"org.springframework.test.context.support.DependencyInjectionTestExecutionListener",
"org.springframework.test.context.support.DirtiesContextTestExecutio... |
private boolean equals(AbstractRealmPrincipal user) {
return this == user ? true : super.equals(user) && realm.equals(user.realm);
}
| private boolean equals(AbstractRealmPrincipal user) {
return (this == user ? true : super.equals(user)) && (realm == null ? user.realm == null : realm.equals(user.realm));
}
|
protected void parseExtensions(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list) throws XMLStreamException {
requireNoAttributes(reader);
final Set<String> found = new HashSet<String>();
final ExtensionParsingContextImpl context = new ExtensionParsi... | protected void parseExtensions(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list) throws XMLStreamException {
requireNoAttributes(reader);
final Set<String> found = new HashSet<String>();
final ExtensionParsingContextImpl context = new ExtensionParsi... |
public Stream newValuesStream() {
return new Stream(_topology, _node.name, _node);
}
| public Stream newValuesStream() {
return new Stream(_topology, _node);
}
|
public SpoutNode(String streamId, Fields allOutputFields, String txid, Object spout, SpoutType type) {
super(streamId, null, allOutputFields);
this.txId = txid;
this.spout = spout;
this.type = type;
}
| public SpoutNode(String streamId, Fields allOutputFields, String txid, Object spout, SpoutType type) {
super(streamId, allOutputFields);
this.txId = txid;
this.spout = spout;
this.type = type;
}
|
protected OperationResult execute(ExecutionContext executionContext, ResultHandler handler, ModelProvider modelSource,
OperationContextFactory contextFactory, ConfigurationPersisterProvider configurationPersisterProvider,
ControllerTransactionContext transaction) {
try {
... | protected OperationResult execute(ExecutionContext executionContext, ResultHandler handler, ModelProvider modelSource,
OperationContextFactory contextFactory, ConfigurationPersisterProvider configurationPersisterProvider,
ControllerTransactionContext transaction) {
try {
... |
public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException {
// Add MB association interceptors
... | public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException {
// Add MB association interceptors
... |
public void scan(String[] basePackages) {
this.scanner.scan(basePackages);
}
} | public void scan(String... basePackages) {
this.scanner.scan(basePackages);
}
} |
private static final Set<TypeFilter> entityTypeFilters;
static {
entityTypeFilters = new LinkedHashSet<TypeFilter>(4);
entityTypeFilters.add(new AnnotationTypeFilter(Entity.class, false));
entityTypeFilters.add(new AnnotationTypeFilter(Embeddable.class, false));
entityTypeFilters.add(new AnnotationTypeFilter... | private static final Set<TypeFilter> entityTypeFilters;
static {
entityTypeFilters = new LinkedHashSet<TypeFilter>(4);
entityTypeFilters.add(new AnnotationTypeFilter(Entity.class, false));
entityTypeFilters.add(new AnnotationTypeFilter(Embeddable.class, false));
entityTypeFilters.add(new AnnotationTypeFilter... |
private static final Set<TypeFilter> entityTypeFilters;
static {
entityTypeFilters = new LinkedHashSet<TypeFilter>(4);
entityTypeFilters.add(new AnnotationTypeFilter(Entity.class, false));
entityTypeFilters.add(new AnnotationTypeFilter(Embeddable.class, false));
entityTypeFilters.add(new AnnotationTypeFilter... | private static final Set<TypeFilter> entityTypeFilters;
static {
entityTypeFilters = new LinkedHashSet<TypeFilter>(4);
entityTypeFilters.add(new AnnotationTypeFilter(Entity.class, false));
entityTypeFilters.add(new AnnotationTypeFilter(Embeddable.class, false));
entityTypeFilters.add(new AnnotationTypeFilter... |
protected <P> void applyUpdate(UpdateContext context, UpdateResultHandler<? super Void, P> resultHandler, P param) {
final QueueService service = new QueueService(address, name, filter, durable != null ? true : durable, false);
context.getBatchBuilder().addService(MessagingSubsystemElement.CORE_QUEU... | protected <P> void applyUpdate(UpdateContext context, UpdateResultHandler<? super Void, P> resultHandler, P param) {
final QueueService service = new QueueService(address, name, filter, durable != null ? durable : true, false);
context.getBatchBuilder().addService(MessagingSubsystemElement.CORE_QUEU... |
public void testCollections265() {
Bag bag = new TreeBag();
try {
bag.add(new Object());
fail("IllegalArgumentException expected");
} catch(IllegalArgumentException iae) {
// expected;
}
}
| public void testCollections265() {
Bag<Object> bag = new TreeBag<Object>();
try {
bag.add(new Object());
fail("IllegalArgumentException expected");
} catch(IllegalArgumentException iae) {
// expected;
}
}
|
private void processBindings(DeploymentPhaseContext phaseContext, ComponentConfiguration configuration, ServiceTarget serviceTarget, ServiceName contextServiceName, InjectionSource.ResolutionContext resolutionContext, List<BindingConfiguration> bindings, final Map<ServiceName, BindingConfiguration> existingBindings... | private void processBindings(DeploymentPhaseContext phaseContext, ComponentConfiguration configuration, ServiceTarget serviceTarget, ServiceName contextServiceName, InjectionSource.ResolutionContext resolutionContext, List<BindingConfiguration> bindings, final Map<ServiceName, BindingConfiguration> existingBindings... |
public void start(StartContext context) throws StartException {
this.path = resolvePath();
}
| public void start(StartContext context) throws StartException {
path = resolvePath();
}
|
public TricubicSplineInterpolatingFunction interpolate(final double[] xval,
final double[] yval,
final double[] zval,
final double[][][] fv... | public TricubicSplineInterpolatingFunction interpolate(final double[] xval,
final double[] yval,
final double[] zval,
final double[][][] fv... |
public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
_collector = collector;
if(_local_drpc_id==null) {
int numTasks = context.getComponentTasks(context.getThisComponentId()).size();
int index = context.getThisTaskIndex();
int por... | public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
_collector = collector;
if(_local_drpc_id==null) {
int numTasks = context.getComponentTasks(context.getThisComponentId()).size();
int index = context.getThisTaskIndex();
int por... |
package backtype.storm.coordination;
package backtype.storm.transactional;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IComponent;
import backtype.storm.tuple.Tuple;
import java.io.Serializable;
import java.util.Map;
public interface IBatchBolt extends Serializable, IComponent {
vo... | package backtype.storm.coordination;
package backtype.storm.coordination;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IComponent;
import backtype.storm.tuple.Tuple;
import java.io.Serializable;
import java.util.Map;
public interface IBatchBolt extends Serializable, IComponent {
voi... |
import backtype.storm.coordination.BatchOutputCollector;
package backtype.storm.transactional.partitioned;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IComponent;
import backtype.storm.transactional.TransactionAttempt;
import backtype.storm.transactional.BatchOutputCollector;
import jav... | import backtype.storm.coordination.BatchOutputCollector;
package backtype.storm.transactional.partitioned;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IComponent;
import backtype.storm.transactional.TransactionAttempt;
import backtype.storm.coordination.BatchOutputCollector;
import java... |
public EJBComponentCreateService(final ComponentConfiguration componentConfiguration, final ApplicationExceptions applicationExceptions) {
super(componentConfiguration);
this.applicationExceptions = applicationExceptions;
final EJBComponentDescription ejbComponentDescription = (EJBComponent... | public EJBComponentCreateService(final ComponentConfiguration componentConfiguration, final ApplicationExceptions applicationExceptions) {
super(componentConfiguration);
this.applicationExceptions = applicationExceptions;
final EJBComponentDescription ejbComponentDescription = (EJBComponent... |
public void actionPerformed(ActionEvent e) {
StringBuilder builder = new StringBuilder("deploy");
String path = pathField.getText();
if (!path.trim().isEmpty()) {
builder.append(" ").append(path);
} else {
JOptionPane.showMessageDialog(this, "A file must be ... | public void actionPerformed(ActionEvent e) {
StringBuilder builder = new StringBuilder("deploy");
String path = pathField.getText();
if (!path.trim().isEmpty()) {
builder.append(" ").append(path);
} else {
JOptionPane.showMessageDialog(this, "A file must be ... |
public void testMessageCodesResolver() {
loadBeanDefinitions("mvc-config-message-codes-resolver.xml");
RequestMappingHandlerAdapter adapter = appContext.getBean(RequestMappingHandlerAdapter.class);
assertNotNull(adapter);
Object initializer = new DirectFieldAccessor(adapter).getPropertyValue("webBindingInitial... | public void testMessageCodesResolver() {
loadBeanDefinitions("mvc-config-message-codes-resolver.xml");
RequestMappingHandlerAdapter adapter = appContext.getBean(RequestMappingHandlerAdapter.class);
assertNotNull(adapter);
Object initializer = adapter.getWebBindingInitializer();
assertNotNull(initializer);
... |
public void accept(final CommandVisitor<T> visitor) {
visitor.visitDeleteCommand(object);
}
| public void accept(final CommandVisitor<T> visitor) {
visitor.visitDeleteCommand(getObject());
}
|
public void accept(final CommandVisitor<T> visitor) {
visitor.visitInsertCommand(object);
}
| public void accept(final CommandVisitor<T> visitor) {
visitor.visitInsertCommand(getObject());
}
|
public void accept(final CommandVisitor<T> visitor) {
visitor.visitKeepCommand(object);
}
| public void accept(final CommandVisitor<T> visitor) {
visitor.visitKeepCommand(getObject());
}
|
public static ModelNode getSystemPropertiesDescription(Locale locale) {
final ResourceBundle bundle = getResourceBundle(locale);
return CommonDescriptions.getSystemPropertyDescription(locale, bundle.getString("server-group.system-property"), false);
}
| public static ModelNode getSystemPropertiesDescription(Locale locale) {
final ResourceBundle bundle = getResourceBundle(locale);
return CommonDescriptions.getSystemPropertyDescription(locale, bundle.getString("server-group.system-property"), true);
}
|
public int readBits(final int count) throws IOException {
if (count < 0 || count > MAXIMUM_CACHE_SIZE) {
throw new IllegalArgumentException("count must be between 0 and " + MAXIMUM_CACHE_SIZE);
}
while (bitsCachedSize < count) {
final int nextByte = in.read();
... | public int readBits(final int count) throws IOException {
if (count < 0 || count > MAXIMUM_CACHE_SIZE) {
throw new IllegalArgumentException("count must not be negative or bigger than " + MAXIMUM_CACHE_SIZE);
}
while (bitsCachedSize < count) {
final int nextByte = in.r... |
private DistributionStructure appliesToStructure;
PatchConfigBuilder setPatchId(String patchId) {
this.patchId = patchId;
return this;
}
PatchConfigBuilder setDescription(String description) {
this.description = description;
return this;
}
PatchConfigBuilder ... | private DistributionStructure appliesToStructure;
PatchConfigBuilder setPatchId(String patchId) {
this.patchId = patchId;
return this;
}
PatchConfigBuilder setDescription(String description) {
this.description = description;
return this;
}
PatchConfigBuilder ... |
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 PatchElement createElement(Patch.PatchType patchType) {
assert patchId != null;
assert provider != null;
if (element.getPatchType() == null) {
if (patchType == Patch.PatchType.CUMULATIVE) {
element.setUpgrade("unknown");
} else {
... | public PatchElement createElement(Patch.PatchType patchType) {
assert patchId != null;
assert provider != null;
if (element.getPatchType() == null) {
if (patchType == Patch.PatchType.UPGRADE) {
element.setUpgrade("unknown");
} else {
e... |
public PatchElementImpl setUpgrade(String version) {
if(version == null) {
throw new IllegalArgumentException("version is null");
}
this.resultingVersion = version;
this.patchType = PatchType.CUMULATIVE;
return this;
}
| public PatchElementImpl setUpgrade(String version) {
if(version == null) {
throw new IllegalArgumentException("version is null");
}
this.resultingVersion = version;
this.patchType = PatchType.UPGRADE;
return this;
}
|
public void baseLayerIsAlwaysInstalled() throws Exception {
tree(env.getInstalledImage().getJbossHome());
InstalledIdentity installedIdentity = loadInstalledIdentity();
List<Layer> layers = installedIdentity.getLayers();
assertEquals(1, layers.size());
Layer layer = layers.g... | public void baseLayerIsAlwaysInstalled() throws Exception {
tree(env.getInstalledImage().getJbossHome());
InstalledIdentity installedIdentity = loadInstalledIdentity();
List<Layer> layers = installedIdentity.getLayers();
assertEquals(1, layers.size());
Layer layer = layers.g... |
public void testParseCP() throws Exception {
final InputStream is = getResource("patch-01-CP.xml");
final Patch patch = PatchXml.parse(is);
// Cumulative Patch
assertNotNull(patch);
assertNotNull(patch.getPatchId());
assertNotNull(patch.getDescription());
ass... | public void testParseCP() throws Exception {
final InputStream is = getResource("patch-01-CP.xml");
final Patch patch = PatchXml.parse(is);
// Cumulative Patch
assertNotNull(patch);
assertNotNull(patch.getPatchId());
assertNotNull(patch.getDescription());
ass... |
public CSVLexer(CSVFormat format, ExtendedBufferedReader in) {
super(format, in);
}
/**
* Returns the next token.
* <p/>
* A token corresponds to a term, a record change or an end-of-file indicator.
*
* @param tkn an existing Token object to reuse. The caller is respons... | public CSVLexer(CSVFormat format, ExtendedBufferedReader in) {
super(format, in);
}
/**
* Returns the next token.
* <p/>
* A token corresponds to a term, a record change or an end-of-file indicator.
*
* @param tkn an existing Token object to reuse. The caller is respons... |
public AbstractSubHyperplane<S, T> copySelf() {
return buildNew(hyperplane, remainingRegion);
}
| public AbstractSubHyperplane<S, T> copySelf() {
return buildNew(hyperplane.copySelf(), remainingRegion);
}
|
public void deploy(final URL archiveURL) throws Exception {
final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan().add(archiveURL).andDeploy();
final DeploymentPlan plan = builder.build();
final DeploymentAction deployAction = builder.getLastAction();
final Strin... | public void deploy(final URL archiveURL) throws Exception {
final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan().withRollback().add(archiveURL).andDeploy();
final DeploymentPlan plan = builder.build();
final DeploymentAction deployAction = builder.getLastAction();
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.