buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public int read(byte b[], int pos, int len) throws IOException {
if (this.countdown-- > 0) {
b[pos] = '\n';
return 1;
} else {
return EOF;
}
}
} | public int read(final byte b[], final int pos, final int len) throws IOException {
if (this.countdown-- > 0) {
b[pos] = '\n';
return 1;
} else {
return EOF;
}
}
} |
public void testB64from24bit() {
StringBuilder buffer = new StringBuilder("");
B64.b64from24bit((byte) 8, (byte) 16, (byte) 64, 2, buffer);
B64.b64from24bit((byte) 7, (byte) 77, (byte) 120, 4, buffer);
assertEquals("./spo/", buffer.toString());
}
| public void testB64from24bit() {
final StringBuilder buffer = new StringBuilder("");
B64.b64from24bit((byte) 8, (byte) 16, (byte) 64, 2, buffer);
B64.b64from24bit((byte) 7, (byte) 77, (byte) 120, 4, buffer);
assertEquals("./spo/", buffer.toString());
}
|
public void testSha256LargetThanBlocksize() {
byte[] buffer = new byte[200];
Arrays.fill(buffer, 0, 200, (byte)'A');
assertEquals("$5$abc$HbF3RRc15OwNKB/RZZ5F.1I6zsLcKXHQoSdB9Owx/Q8", Sha2Crypt.sha256Crypt(buffer, "$5$abc"));
}
| public void testSha256LargetThanBlocksize() {
final byte[] buffer = new byte[200];
Arrays.fill(buffer, 0, 200, (byte)'A');
assertEquals("$5$abc$HbF3RRc15OwNKB/RZZ5F.1I6zsLcKXHQoSdB9Owx/Q8", Sha2Crypt.sha256Crypt(buffer, "$5$abc"));
}
|
public void testSha256LargetThanBlocksize() {
byte[] buffer = new byte[200];
Arrays.fill(buffer, 0, 200, (byte)'A');
assertEquals("$6$abc$oP/h8PRhCKIA66KSTjGwNsQMSLLZnuFOTjOhrqNrDkKgjTlpePSqibB0qtmDapMbP/zN1cUEYSeHFrpgqZ.GG1", Sha2Crypt.sha512Crypt(buffer, "$6$abc"));
}
| public void testSha256LargetThanBlocksize() {
final byte[] buffer = new byte[200];
Arrays.fill(buffer, 0, 200, (byte)'A');
assertEquals("$6$abc$oP/h8PRhCKIA66KSTjGwNsQMSLLZnuFOTjOhrqNrDkKgjTlpePSqibB0qtmDapMbP/zN1cUEYSeHFrpgqZ.GG1", Sha2Crypt.sha512Crypt(buffer, "$6$abc"));
}
|
public void testGetMappingCodeNonLetter() {
char code = this.getStringEncoder().getMappingCode('#');
assertEquals("Code does not equals zero", 0, code);
}
| public void testGetMappingCodeNonLetter() {
final char code = this.getStringEncoder().getMappingCode('#');
assertEquals("Code does not equals zero", 0, code);
}
|
protected void processDeployment(final String hostName, final WarMetaData warMetaData, final DeploymentUnit deploymentUnit,
final ServiceTarget serviceTarget) throws DeploymentUnitProcessingException {
final VirtualFile deploymentRoot = deploymentUnit.getAttachment(Attac... | protected void processDeployment(final String hostName, final WarMetaData warMetaData, final DeploymentUnit deploymentUnit,
final ServiceTarget serviceTarget) throws DeploymentUnitProcessingException {
final VirtualFile deploymentRoot = deploymentUnit.getAttachment(Attac... |
public void testFormatDurationWords() {
String text = null;
text = DurationFormatUtils.formatDurationWords(50 * 1000, true, false);
assertEquals("50 seconds", text);
text = DurationFormatUtils.formatDurationWords(65 * 1000, true, false);
assertEquals("1 minute 5 seconds", te... | public void testFormatDurationWords() {
String text = null;
text = DurationFormatUtils.formatDurationWords(50 * 1000, true, false);
assertEquals("50 seconds", text);
text = DurationFormatUtils.formatDurationWords(65 * 1000, true, false);
assertEquals("1 minute 5 seconds", te... |
public void test() throws Exception {
List<ModelNode> operations = parse("subsystem.xml");
Assert.assertEquals(1, operations.size());
final ModelNode operation = operations.get(0);
System.err.println(operation);
operation.get(OP_ADDR).asPropertyList();
final ModelN... | public void test() throws Exception {
List<ModelNode> operations = parse("subsystem.xml");
Assert.assertEquals(6, operations.size());
final ModelNode operation = operations.get(0);
System.err.println(operation);
operation.get(OP_ADDR).asPropertyList();
final ModelN... |
public void testContextedExceptionStringThrowableContext() {
exceptionContext = new ContextedRuntimeException(TEST_MESSAGE_2, new Exception(TEST_MESSAGE), new DefaultExceptionContext());
final String message = exceptionContext.getMessage();
final String trace = ExceptionUtils.getStackTrace(e... | public void testContextedExceptionStringThrowableContext() {
exceptionContext = new ContextedRuntimeException(TEST_MESSAGE_2, new Exception(TEST_MESSAGE), new DefaultExceptionContext() {});
final String message = exceptionContext.getMessage();
final String trace = ExceptionUtils.getStackTrac... |
byte FETCH_DOMAIN_CONFIGURATION_REQUEST = 0x57;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2006, 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 softwa... | byte FETCH_DOMAIN_CONFIGURATION_REQUEST = 0x57;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2006, 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 softwa... |
private static String VERSION;
static {
try {
Properties props = new Properties();
props.load(ModelTestControllerVersion.class.getResourceAsStream("version.properties"));
VERSION = props.getProperty("as.version");
} catch (Exceptio... | private static String VERSION;
static {
try {
Properties props = new Properties();
props.load(ModelTestControllerVersion.class.getResourceAsStream("version.properties"));
VERSION = props.getProperty("as.version");
} catch (Exceptio... |
public static ServiceController<Void> addService(ServiceTarget target, OSGiRuntimeResource resource, InitialDeploymentTracker deploymentTracker, List<SubsystemExtension> extensions, ServiceVerificationHandler verificationHandler) {
FrameworkBootstrapService service = new FrameworkBootstrapService(resource, ... | public static ServiceController<Void> addService(ServiceTarget target, OSGiRuntimeResource resource, InitialDeploymentTracker deploymentTracker, List<SubsystemExtension> extensions, ServiceVerificationHandler verificationHandler) {
FrameworkBootstrapService service = new FrameworkBootstrapService(resource, ... |
public static Collection<ServiceController<?>> doDeploy(final OperationContext context, final String deploymentUnitName, final String managementName, final ServiceVerificationHandler verificationHandler,
final Resource deploymentResource, final ImmutableM... | public static Collection<ServiceController<?>> doDeploy(final OperationContext context, final String deploymentUnitName, final String managementName, final ServiceVerificationHandler verificationHandler,
final Resource deploymentResource, final ImmutableM... |
public boolean isActive() {
return timerService.isStarted() && !isCanceled() && !isExpired() && timerService.isScheduled(getId());
}
| public boolean isActive() {
return timerService.isStarted() && !isCanceled() && !isExpired() && (timerService.isScheduled(getId()) || timerState == TimerState.CREATED);
}
|
public void setupParser() throws Exception {
parser = new JBossServiceXmlDescriptorParser();
xmlMapper = XMLMapper.Factory.create();
xmlMapper.registerRootElement(new QName(JBossServiceXmlDescriptorParser.NAMESPACE, "server"), parser);
inputFactory = XMLInputFactory.newInstance();
... | public void setupParser() throws Exception {
parser = new JBossServiceXmlDescriptorParser(propertyReplacer);
xmlMapper = XMLMapper.Factory.create();
xmlMapper.registerRootElement(new QName(JBossServiceXmlDescriptorParser.NAMESPACE, "server"), parser);
inputFactory = XMLInputFactory.n... |
public void validate() throws ConfigurationException {
super.validate();
Validate.configurationDirectoryExists(jbossHome, "jbossHome must exist at " + jbossHome);
if (javaHome != null) {
Validate.configurationDirectoryExists(javaHome, "javaHome must exist at " + javaHome);
... | public void validate() throws ConfigurationException {
super.validate();
Validate.configurationDirectoryExists(jbossHome, "jbossHome must exist at " + jbossHome);
if (javaHome != null) {
Validate.configurationDirectoryExists(javaHome, "javaHome must exist at " + javaHome);
... |
public static ConversionService createDefaultConversionService() {
GenericConversionService conversionService = new GenericConversionService();
conversionService.addGenericConverter(new ArrayToArrayConverter(conversionService));
conversionService.addGenericConverter(new ArrayToCollectionConverter(conversionServi... | public static ConversionService createDefaultConversionService() {
GenericConversionService conversionService = new GenericConversionService();
conversionService.addGenericConverter(new ArrayToArrayConverter(conversionService));
conversionService.addGenericConverter(new ArrayToCollectionConverter(conversionServi... |
private static void sendError(HttpServerExchange exchange, boolean encode, ModelNode msg, int errorCode) {
if(encode) {
try {
ModelNode response = new ModelNode();
response.set(msg);
ByteArrayOutputStream bout = new ByteArrayOutputStream();
... | private static void sendError(HttpServerExchange exchange, boolean encode, ModelNode msg, int errorCode) {
if(encode) {
try {
ModelNode response = new ModelNode();
response.set(msg);
ByteArrayOutputStream bout = new ByteArrayOutputStream();
... |
public void validateResolvedParameter(String parameterName, ModelNode value) throws OperationFailedException {
//TODO implement validateResolvedParameter
throw new UnsupportedOperationException();
}
});
static SimpleAttributeDefinition DATASOURCE_DRIVER = new SimpleAttri... | public void validateResolvedParameter(String parameterName, ModelNode value) throws OperationFailedException {
//TODO implement validateResolvedParameter
throw new UnsupportedOperationException();
}
});
static SimpleAttributeDefinition DATASOURCE_DRIVER = new SimpleAttri... |
private static final String NO_RECOVERY_NAME = "no-recovery";
static final SimpleAttributeDefinition CLASS_NAME = new SimpleAttributeDefinition(CLASS_NAME_NAME, CommonConnDef.Attribute.CLASS_NAME.getLocalName(), new ModelNode(), ModelType.STRING, true, true, MeasurementUnit.NONE);
static SimpleAttribute... | private static final String NO_RECOVERY_NAME = "no-recovery";
static final SimpleAttributeDefinition CLASS_NAME = new SimpleAttributeDefinition(CLASS_NAME_NAME, CommonConnDef.Attribute.CLASS_NAME.getLocalName(), new ModelNode(), ModelType.STRING, true, true, MeasurementUnit.NONE);
static SimpleAttribute... |
public void testIntegerValues() {
Object obj1 = null;
obj1 = Integer.valueOf(1);
Integer int1 = Integer.valueOf(1);
f.addValue(obj1);
f.addValue(int1);
f.addValue(2);
f.addValue(Long.valueOf(2));
assertEquals("Integer 1 count", 2, f.getCount(1));
... | public void testIntegerValues() {
Object obj1 = null;
obj1 = Integer.valueOf(1);
Integer int1 = Integer.valueOf(1);
f.addValue(obj1);
f.addValue(int1);
f.addValue(2);
f.addValue(Long.valueOf(2));
assertEquals("Integer 1 count", 2, f.getCount(1));
... |
private int readLiteralLength(int b) throws IOException {
int length;
switch (b >> 2) {
case 60:
length = readOneByte();
break;
case 61:
length = readOneByte();
length |= (readOneByte() << 8);
break;
case 62:
... | private int readLiteralLength(int b) throws IOException {
int length;
switch (b >> 2) {
case 60:
length = readOneByte();
break;
case 61:
length = readOneByte();
length |= (readOneByte() << 8);
break;
case 62:
... |
public void execute(NewOperationContext context, ModelNode operation) throws OperationFailedException {
final String attributeName = operation.require(NAME).asString();
final AttributeAccess attributeAccess = context.getModelNodeRegistration().getAttributeAccess(PathAddress.EMPTY_ADDRESS... | public void execute(NewOperationContext context, ModelNode operation) throws OperationFailedException {
final String attributeName = operation.require(NAME).asString();
final AttributeAccess attributeAccess = context.getModelNodeRegistration().getAttributeAccess(PathAddress.EMPTY_ADDRESS... |
protected void performRuntime(NewOperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) {
PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
String name = address.getLastElement().... | protected void performRuntime(NewOperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) {
PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
String name = address.getLastElement().... |
public void registerChildren(ManagementResourceRegistration registration) {
registration.registerSubModel(new RemoteSiteResourceDefinition());
registration.registerSubModel(new PropertyResourceDefinition());
}
| public void registerChildren(ManagementResourceRegistration registration) {
registration.registerSubModel(new RemoteSiteResourceDefinition());
registration.registerSubModel(PropertyResourceDefinition.INSTANCE);
}
|
Object getBean(String name, Object... args) 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 of the License at
*
* ht... | Object getBean(String name, Object... args) 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 of the License at
*
* ht... |
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
validator.validateParameter(NAME, operation.get(NAME));
validator.validateParameter(VALUE, operation.get(VALUE));
final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_A... | public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
validator.validateParameter(NAME, operation.get(NAME));
validator.validateParameter(VALUE, operation.get(VALUE));
final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_A... |
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
validator.validateParameter(NAME, operation.get(NAME));
final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS);
final ModelNode model = resource.getModel();
... | public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
validator.validateParameter(NAME, operation.get(NAME));
final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS);
final ModelNode model = resource.getModel();
... |
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
validator.validateParameter(JvmAttributes.JVM_OPTION, operation.get(JvmAttributes.JVM_OPTION));
final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS);
final Mod... | public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
validator.validateParameter(JvmAttributes.JVM_OPTION, operation.get(JvmAttributes.JVM_OPTION));
final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS);
final Mod... |
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
validator.validateParameter(JvmAttributes.JVM_OPTION, operation.get(JvmAttributes.JVM_OPTION));
final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS);
final Mod... | public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
validator.validateParameter(JvmAttributes.JVM_OPTION, operation.get(JvmAttributes.JVM_OPTION));
final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS);
final Mod... |
public void testNextIntDirect() {
// Set up test values - end of the array filled randomly
int[] testValues = new int[] {4, 10, 12, 32, 100, 10000, 0, 0, 0, 0};
for (int i = 6; i < 10; i++) {
final int val = generator.nextInt();
testValues[i] = val < 0 ? -val : val + ... | public void testNextIntDirect() {
// Set up test values - end of the array filled randomly
int[] testValues = new int[] {4, 10, 12, 32, 100, 10000, 0, 0, 0, 0};
for (int i = 6; i < 10; i++) {
final int val = generator.nextInt();
testValues[i] = val < 0 ? -val : val + ... |
public static <E extends Enum<E>> EnumSet<E> processBitVectors(final Class<E> enumClass, final long... values) {
final EnumSet<E> results = EnumSet.noneOf(asEnum(enumClass));
long[] lvalues = ArrayUtils.clone(Validate.notNull(values));
ArrayUtils.reverse(lvalues);
for (final E consta... | public static <E extends Enum<E>> EnumSet<E> processBitVectors(final Class<E> enumClass, final long... values) {
final EnumSet<E> results = EnumSet.noneOf(asEnum(enumClass));
final long[] lvalues = ArrayUtils.clone(Validate.notNull(values));
ArrayUtils.reverse(lvalues);
for (final E ... |
public static int hashCodeMulti(final Object... objects) {
int hash = 1;
if (objects != null) {
for (final Object object : objects) {
int tmpHash = ObjectUtils.hashCode(object);
hash = hash * 31 + tmpHash;
}
}
return hash;
}... | public static int hashCodeMulti(final Object... objects) {
int hash = 1;
if (objects != null) {
for (final Object object : objects) {
final int tmpHash = ObjectUtils.hashCode(object);
hash = hash * 31 + tmpHash;
}
}
return hash;... |
public boolean translate(int codepoint, Writer out) throws IOException {
if (codepoint >= Character.MIN_SURROGATE && codepoint <= Character.MAX_SURROGATE) {
// It's a surrogate. Write nothing and say we've translated.
return true;
} else {
// It's not a surrogate.... | public boolean translate(final int codepoint, final Writer out) throws IOException {
if (codepoint >= Character.MIN_SURROGATE && codepoint <= Character.MAX_SURROGATE) {
// It's a surrogate. Write nothing and say we've translated.
return true;
} else {
// It's not ... |
public void testRoundtrip() {
HashMap<Object, Object> newMap = SerializationUtils.roundtrip(iMap);
assertEquals(iMap, newMap);
}
| public void testRoundtrip() {
final HashMap<Object, Object> newMap = SerializationUtils.roundtrip(iMap);
assertEquals(iMap, newMap);
}
|
public void consume(T t) {
}
} | public void consume(final T t) {
}
} |
public void consume(String t) {
super.consume(t);
}
} | public void consume(final String t) {
super.consume(t);
}
} |
public void testLang954() throws Exception {
String pattern = "yyyy-MM-dd'T'";
FastDateFormat.getInstance(pattern);
}
| public void testLang954() throws Exception {
final String pattern = "yyyy-MM-dd'T'";
FastDateFormat.getInstance(pattern);
}
|
public PrepareStepHandler(final LocalHostControllerInfo localHostControllerInfo,
ContentRepository contentRepository, final Map<String, ProxyController> hostProxies,
final Map<String, ProxyController> serverProxies) {
this.localHostControllerInfo =... | public PrepareStepHandler(final LocalHostControllerInfo localHostControllerInfo,
ContentRepository contentRepository, final Map<String, ProxyController> hostProxies,
final Map<String, ProxyController> serverProxies) {
this.localHostControllerInfo =... |
public void initializeConnection(Socket socket) throws IOException, InitialSocketRequestException {
InputStream in = socket.getInputStream();
StringBuilder sb = new StringBuilder();
//TODO Timeout on the read?
Status status = StreamUtils.readWord(in, sb);
... | public void initializeConnection(Socket socket) throws IOException, InitialSocketRequestException {
InputStream in = socket.getInputStream();
StringBuilder sb = new StringBuilder();
//TODO Timeout on the read?
Status status = StreamUtils.readWord(in, sb);
... |
public void provideCapacity(final int capacity) {
if (c.length >= capacity) return;
int newcapacity = capacity;
char[] newc = new char[newcapacity];
System.arraycopy(c, 0, newc, 0, length);
c = newc;
}
| public void provideCapacity(final int capacity) {
if (c.length >= capacity) return;
int newcapacity = ((capacity*3)>>1) + 1;
char[] newc = new char[newcapacity];
System.arraycopy(c, 0, newc, 0, length);
c = newc;
}
|
public void testStatelessBean() throws Exception {
deployer.deploy(EJB3_DEPLOYMENT_NAME);
try {
String jndiname = "java:global/ejb3-osgi/SimpleStatelessSessionBean!org.jboss.as.testsuite.integration.osgi.ejb3.SimpleStatelessSessionBean";
Echo service = (Echo) new InitialConte... | public void testStatelessBean() throws Exception {
deployer.deploy(EJB3_DEPLOYMENT_NAME);
try {
String jndiname = "java:global/ejb3-osgi/SimpleStatelessSessionBean!org.jboss.as.testsuite.integration.osgi.xservice.api.Echo";
Echo service = (Echo) new InitialContext().lookup(jn... |
package org.jboss.as.testsuite.integration.ws.ejb;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, 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 softwa... | package org.jboss.as.testsuite.integration.ws.ejb;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, 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 softwa... |
public static boolean matches( byte[] signature ) {
// 4b50 0403 0014 0000
if (signature[0] != 0x50) {
return false;
}
if (signature[1] != 0x4b) {
return false;
}
if (signature[2] != 0x03) {
return false;
}
if (signature[3] != 0x04) {
return false;
... | public static boolean matches( byte[] signature, int length ) {
// 4b50 0403 0014 0000
if (signature[0] != 0x50) {
return false;
}
if (signature[1] != 0x4b) {
return false;
}
if (signature[2] != 0x03) {
return false;
}
if (signature[3] != 0x04) {
retu... |
public Object processInvocation(InterceptorContext context) throws Exception {
StatefulSessionComponent component = getComponent(context, StatefulSessionComponent.class);
// TODO: this is a contract with the client interceptor
SessionID sessionId = (SessionID) context.getPrivateData(SessionI... | public Object processInvocation(InterceptorContext context) throws Exception {
StatefulSessionComponent component = getComponent(context, StatefulSessionComponent.class);
// TODO: this is a contract with the client interceptor
SessionID sessionId = (SessionID) context.getPrivateData(SessionI... |
public Interceptor create(InterceptorFactoryContext context) {
final AtomicReference<SessionID> sessionIdReference = new AtomicReference<SessionID>();
context.getContextData().put(StatefulSessionComponent.SESSION_ID_REFERENCE_KEY, sessionIdReference);
//if we are attaching to an existing in... | public Interceptor create(InterceptorFactoryContext context) {
final AtomicReference<SessionID> sessionIdReference = new AtomicReference<SessionID>();
context.getContextData().put(StatefulSessionComponent.SESSION_ID_REFERENCE_KEY, sessionIdReference);
//if we are attaching to an existing in... |
public ManagedReference createViewInstance(final ComponentView componentView, final Map<Object, Object> contextData) throws Exception {
SessionID sessionID = (SessionID) contextData.get(SessionID.SESSION_ID_KEY);
if(sessionID == null) {
sessionID = EJBClient.createSession(applicationName... | public ManagedReference createViewInstance(final ComponentView componentView, final Map<Object, Object> contextData) throws Exception {
SessionID sessionID = (SessionID) contextData.get(SessionID.class);
if(sessionID == null) {
sessionID = EJBClient.createSession(applicationName, moduleN... |
private Object readResolve() throws ObjectStreamException {
ServiceController<ComponentView> view = (ServiceController<ComponentView>) CurrentServiceContainer.getServiceContainer().getRequiredService(ServiceName.parse(viewName));
try {
return view.getValue().createInstance(Collections.<O... | private Object readResolve() throws ObjectStreamException {
ServiceController<ComponentView> view = (ServiceController<ComponentView>) CurrentServiceContainer.getServiceContainer().getRequiredService(ServiceName.parse(viewName));
try {
return view.getValue().createInstance(Collections.<O... |
public Object processInvocation(final InterceptorContext context) throws Exception {
SessionID sessionId = (SessionID) context.getPrivateData(SessionID.SESSION_ID_KEY);
return new StatefulSerializedProxy(serviceName, sessionId);
}
| public Object processInvocation(final InterceptorContext context) throws Exception {
SessionID sessionId = (SessionID) context.getPrivateData(SessionID.class);
return new StatefulSerializedProxy(serviceName, sessionId);
}
|
private void prepareInterceptorContext(final SkeletonStrategy op, final Object[] params, final InterceptorContext interceptorContext) throws IOException, ClassNotFoundException {
if (!home) {
if (componentView.getComponent() instanceof StatefulSessionComponent) {
final SessionID ... | private void prepareInterceptorContext(final SkeletonStrategy op, final Object[] params, final InterceptorContext interceptorContext) throws IOException, ClassNotFoundException {
if (!home) {
if (componentView.getComponent() instanceof StatefulSessionComponent) {
final SessionID ... |
protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
newControllers.add(installRuntimeService(context, model, verificationHandler));
... | protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
newControllers.add(installRuntimeService(context, model, verificationHandler));
... |
public synchronized <S> S getBusinessObject(Class<S> businessInterfaceType) {
if (isRemoved()) {
throw new NoSuchEJBException("Bean has been removed");
}
if (viewServices.containsKey(businessInterfaceType.getName())) {
final ServiceController<?> serviceController = Cu... | public synchronized <S> S getBusinessObject(Class<S> businessInterfaceType) {
if (isRemoved()) {
throw new NoSuchEJBException("Bean has been removed");
}
if (viewServices.containsKey(businessInterfaceType.getName())) {
final ServiceController<?> serviceController = Cu... |
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION,
MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSION);
final ManagementResourceRegistration registration = subsyst... | public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION,
MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSION);
final ManagementResourceRegistration registration = subsyst... |
public boolean isExpired() {
if (this.timeout == null) return false;
Date lastAccessedTime = this.entry.getLastAccessedTime();
long timeout = this.timeout.convert(TimeUnit.MILLISECONDS);
return (lastAccessedTime != null) && (timeout > 0) ? ((System.currentTimeMillis() - lastAccessedT... | public boolean isExpired() {
if (this.timeout == null) return false;
Date lastAccessedTime = this.entry.getLastAccessedTime();
long timeout = this.timeout.convert(TimeUnit.MILLISECONDS);
return (lastAccessedTime != null) && (timeout > 0) ? ((System.currentTimeMillis() - lastAccessedT... |
public boolean isExpired() {
long maxInactiveInterval = this.getMaxInactiveInterval(TimeUnit.MILLISECONDS);
return (maxInactiveInterval > 0) ? (System.currentTimeMillis() - this.lastAccessedTime.getTime()) > maxInactiveInterval : false;
}
| public boolean isExpired() {
long maxInactiveInterval = this.getMaxInactiveInterval(TimeUnit.MILLISECONDS);
return (maxInactiveInterval > 0) ? (System.currentTimeMillis() - this.lastAccessedTime.getTime()) >= maxInactiveInterval : false;
}
|
private StepInterpolator buildInterpolator(double t0, double[] y0, double t1) {
DummyStepInterpolator interpolator = new DummyStepInterpolator(y0, t1 >= t0);
interpolator.storeTime(t0);
interpolator.shift();
interpolator.storeTime(t1);
return interpolator;
}
| private StepInterpolator buildInterpolator(double t0, double[] y0, double t1) {
DummyStepInterpolator interpolator = new DummyStepInterpolator(y0, new double[y0.length], t1 >= t0);
interpolator.storeTime(t0);
interpolator.shift();
interpolator.storeTime(t1);
return interpolator;
}
|
public int eventOccurred(double t, double[] y, boolean increasing) {
return CONTINUE;
}
};
final double tolerance = 0.1;
EventState es = new EventState(closeEventsGenerator, 1.5 * gap, tolerance, 10);
double t0 = r1 - 0.5 * gap;
es.reinit... | public int eventOccurred(double t, double[] y, boolean increasing) {
return CONTINUE;
}
};
final double tolerance = 0.1;
EventState es = new EventState(closeEventsGenerator, 1.5 * gap, tolerance, 10);
double t0 = r1 - 0.5 * gap;
es.reinit... |
protected void handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response,
AbstractHttpSockJsSession sockJsSession) throws SockJsException {
if (sockJsSession.isNew()) {
logger.debug("Opening " + getTransportType() + " connection");
sockJsSession.handleInitialRequest(request, response, ge... | protected void handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response,
AbstractHttpSockJsSession sockJsSession) throws SockJsException {
if (sockJsSession.isNew()) {
logger.debug("Opening " + getTransportType() + " connection");
sockJsSession.handleInitialRequest(request, response, ge... |
protected void afterRequestUpdated() {
// we already validated the parameter above..
String callback = getCallbackParam(getRequest());
String html = String.format(PARTIAL_HTML_CONTENT, callback);
try {
getResponse().getBody().write(html.getBytes("UTF-8"));
getResponse().flush();
}
catch (I... | protected void writePrelude() {
// we already validated the parameter above..
String callback = getCallbackParam(getRequest());
String html = String.format(PARTIAL_HTML_CONTENT, callback);
try {
getResponse().getBody().write(html.getBytes("UTF-8"));
getResponse().flush();
}
catch (IOExcept... |
public synchronized void handleInitialRequest(ServerHttpRequest request, ServerHttpResponse response,
SockJsFrameFormat frameFormat) throws SockJsException {
super.handleInitialRequest(request, response, frameFormat);
// the WebSocketHandler delegate may have closed the session
if (!isClosed()) {
super.s... | public synchronized void handleInitialRequest(ServerHttpRequest request, ServerHttpResponse response,
SockJsFrameFormat frameFormat) throws SockJsException {
super.handleInitialRequest(request, response, frameFormat);
// the WebSocketHandler delegate may have closed the session
if (!isClosed()) {
super.s... |
protected static <T extends FieldElement<T>> T[][] buildArray(final Field<T> field,
final int rows,
final int columns) {
if (columns < 0) {
T[] dummyRow = (T[]) Arr... | protected static <T extends FieldElement<T>> T[][] buildArray(final Field<T> field,
final int rows,
final int columns) {
if (columns < 0) {
T[] dummyRow = (T[]) Arr... |
public static <T extends FieldElement<T>> FieldMatrix<T>
createFieldIdentityMatrix(final Field<T> field, final int dimension) {
final T zero = field.getZero();
final T one = field.getOne();
final T[][] d = (T[][]) Array.newInstance(zero.getClass(), dimension, dimension);
for... | public static <T extends FieldElement<T>> FieldMatrix<T>
createFieldIdentityMatrix(final Field<T> field, final int dimension) {
final T zero = field.getZero();
final T one = field.getOne();
final T[][] d = (T[][]) Array.newInstance(zero.getClass(), new int[] { dimension, dimension }... |
Pair<RealVector, RealMatrix> value(RealVector point);
package org.apache.commons.math3.fitting.leastsquares;
import org.apache.commons.math3.linear.RealMatrix;
import org.apache.commons.math3.linear.RealVector;
import org.apache.commons.math3.util.Pair;
/**
* A interface for functions that compute a vector of value... | Pair<RealVector, RealMatrix> value(RealVector point);
package org.apache.commons.math3.fitting.leastsquares;
import org.apache.commons.math3.linear.RealMatrix;
import org.apache.commons.math3.linear.RealVector;
import org.apache.commons.math3.util.Pair;
/**
* A interface for functions that compute a vector of value... |
private void minpackTest(MinpackFunction function, boolean exceptionExpected) {
final double tol = 2.22044604926e-16;
final double sqrtTol = FastMath.sqrt(tol);
LevenbergMarquardtOptimizer optimizer = new LevenbergMarquardtOptimizer()
.withCostRelativeTolerance(sqrtTol)
... | private void minpackTest(MinpackFunction function, boolean exceptionExpected) {
final double tol = 2.22044604926e-16;
final double sqrtTol = FastMath.sqrt(tol);
LevenbergMarquardtOptimizer optimizer = new LevenbergMarquardtOptimizer()
.withCostRelativeTolerance(sqrtTol)
... |
updateContext.addDeploymentProcessor(Phase.CONFIGURE_MODULE, Phase.CONFIGURE_MODULE_WAR, new WarModuleConfigProcessor());
/*
* 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 f... | updateContext.addDeploymentProcessor(Phase.CONFIGURE_MODULE, Phase.CONFIGURE_MODULE_WAR, new WarModuleConfigProcessor());
/*
* 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 f... |
public static WebArchive deployment() throws Exception {
doSetup();
return ShrinkWrap.create(WebArchive.class, "test-external.war")
.addClass(InternalTag.class)
.addAsManifestResource(ExternalTagLibTestCase.class.getPackage(), "internal.tld", "internal.tld")
... | public static WebArchive deployment() throws Exception {
doSetup();
return ShrinkWrap.create(WebArchive.class, "test-external.war")
.addClass(InternalTag.class)
.addAsWebInfResource(ExternalTagLibTestCase.class.getPackage(), "internal.tld", "internal.tld")
... |
private void addSystemProperties(final ModelNode source, final Map<String, String> props, boolean boottimeOnly) {
if (source.hasDefined(SYSTEM_PROPERTY)) {
for (Property prop : source.get(SYSTEM_PROPERTY).asPropertyList()) {
ModelNode propResource = prop.getValue();
... | private void addSystemProperties(final ModelNode source, final Map<String, String> props, boolean boottimeOnly) {
if (source.hasDefined(SYSTEM_PROPERTY)) {
for (Property prop : source.get(SYSTEM_PROPERTY).asPropertyList()) {
ModelNode propResource = prop.getValue();
... |
private void addSystemProperties(final ModelNode source, final Map<String, String> props, boolean boottimeOnly) {
if (source.hasDefined(SYSTEM_PROPERTY)) {
for (Property prop : source.get(SYSTEM_PROPERTY).asPropertyList()) {
ModelNode propResource = prop.getValue();
... | private void addSystemProperties(final ModelNode source, final Map<String, String> props, boolean boottimeOnly) {
if (source.hasDefined(SYSTEM_PROPERTY)) {
for (Property prop : source.get(SYSTEM_PROPERTY).asPropertyList()) {
ModelNode propResource = prop.getValue();
... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
final Modu... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
final Modu... |
public static BigInteger sizeOfDirectoryAsBigInteger(File directory) {
checkDirectory(directory);
final File[] files = directory.listFiles();
if (files == null) { // null if security restricted
return BigInteger.ZERO;
}
BigInteger size = BigInteger.ZERO;
... | public static BigInteger sizeOfDirectoryAsBigInteger(File directory) {
checkDirectory(directory);
final File[] files = directory.listFiles();
if (files == null) { // null if security restricted
return BigInteger.ZERO;
}
BigInteger size = BigInteger.ZERO;
... |
public ResourceAdapterXmlDeploymentService(ConnectorXmlDescriptor connectorXmlDescriptor, ResourceAdapter raxml,
Module module, final String deployment, final ServiceName deploymentServiceName) {
this.connectorXmlDescriptor = connectorXmlDescriptor;
thi... | public ResourceAdapterXmlDeploymentService(ConnectorXmlDescriptor connectorXmlDescriptor, ResourceAdapter raxml,
Module module, final String deployment, final ServiceName deploymentServiceName) {
this.connectorXmlDescriptor = connectorXmlDescriptor;
thi... |
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
assertNotNull(sourceType, targetType);
if (logger.isDebugEnabled()) {
logger.debug("Converting value " + StylerUtils.style(source) + " of " + sourceType + " to " + targetType);
}
if (sourceType == TypeDescriptor.NUL... | public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
assertNotNull(sourceType, targetType);
if (logger.isDebugEnabled()) {
logger.debug("Converting value " + StylerUtils.style(source) + " of " + sourceType + " to " + targetType);
}
if (sourceType == TypeDescriptor.NUL... |
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
installRuntimeServices(context, operation, Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS)));
}
static void installRuntimeServices(OperationContex... | protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
installRuntimeServices(context, operation, Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS)));
}
static void installRuntimeServices(OperationContex... |
public void install(ServiceTarget target, String group, ModuleIdentifier module) {
ServiceName name = GroupServiceNames.COMMAND_DISPATCHER.getServiceName(group);
ContextNames.BindInfo bindInfo = createBinding(group);
this.logger.debugf("Installing %s service, bound to ", name.getCanonicalNa... | public void install(ServiceTarget target, String group, ModuleIdentifier module) {
ServiceName name = GroupServiceNames.COMMAND_DISPATCHER.getServiceName(group);
ContextNames.BindInfo bindInfo = createBinding(group);
this.logger.debugf("Installing %s service, bound to ", name.getCanonicalNa... |
public void install(ServiceTarget target, String container, String cache) {
ServiceName name = CacheServiceNames.GROUP.getServiceName(container, cache);
ContextNames.BindInfo bindInfo = createBinding(container, cache);
this.logger.debugf("Installing %s service, bound to ", name.getCanonical... | public void install(ServiceTarget target, String container, String cache) {
ServiceName name = CacheServiceNames.GROUP.getServiceName(container, cache);
ContextNames.BindInfo bindInfo = createBinding(container, cache);
this.logger.debugf("Installing %s service, bound to ", name.getCanonical... |
public void install(ServiceTarget target, String group, ModuleIdentifier module) {
ServiceName name = GroupServiceNames.GROUP.getServiceName(group);
ContextNames.BindInfo bindInfo = createBinding(group);
this.logger.debugf("Installing %s service, bound to ", name.getCanonicalName(), bindInf... | public void install(ServiceTarget target, String group, ModuleIdentifier module) {
ServiceName name = GroupServiceNames.GROUP.getServiceName(group);
ContextNames.BindInfo bindInfo = createBinding(group);
this.logger.debugf("Installing %s service, bound to ", name.getCanonicalName(), bindInf... |
public void install(ServiceTarget target, String container, String cache) {
ServiceName name = CacheServiceNames.SERVICE_PROVIDER_REGISTRATION.getServiceName(container, cache);
ContextNames.BindInfo bindInfo = createBinding(container, cache);
this.logger.debugf("Installing %s service, bound... | public void install(ServiceTarget target, String container, String cache) {
ServiceName name = CacheServiceNames.SERVICE_PROVIDER_REGISTRATION.getServiceName(container, cache);
ContextNames.BindInfo bindInfo = createBinding(container, cache);
this.logger.debugf("Installing %s service, bound... |
public void install(ServiceTarget target, String container, String cache) {
ServiceName name = CacheServiceNames.REGISTRY_FACTORY.getServiceName(container, cache);
ContextNames.BindInfo bindInfo = createBinding(container, cache);
this.logger.debugf("Installing %s service, bound to ", name.g... | public void install(ServiceTarget target, String container, String cache) {
ServiceName name = CacheServiceNames.REGISTRY_FACTORY.getServiceName(container, cache);
ContextNames.BindInfo bindInfo = createBinding(container, cache);
this.logger.debugf("Installing %s service, bound to ", name.g... |
public void testCloseEarly() throws Exception {
String encoding = "UTF-8";
File testFile = new File(getTestDirectory(), "LineIterator-closeEarly.txt");
createLinesFile(testFile, encoding, 3);
LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
try {
... | public void testCloseEarly() throws Exception {
String encoding = "UTF-8";
File testFile = new File(getTestDirectory(), "LineIterator-closeEarly.txt");
createLinesFile(testFile, encoding, 3);
LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
try {
... |
private void addDependency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader,
DeploymentUnit deploymentUnit, ModuleIdentifier... moduleIdentifiers) {
for ( ModuleIdentifier moduleIdentifier : moduleIdentifiers) {
moduleSpecification.addSystemDepend... | private void addDependency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader,
DeploymentUnit deploymentUnit, ModuleIdentifier... moduleIdentifiers) {
for ( ModuleIdentifier moduleIdentifier : moduleIdentifiers) {
moduleSpecification.addSystemDepend... |
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
fina... | protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
fina... |
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(LoggingExtension.rootLoggerPath);
... | protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(LoggingExtension.rootLoggerPath);
... |
public boolean equals(Object object) {
if (object == this) {
return true;
}
if (object instanceof Bag == false) {
return false;
}
Bag other = (Bag) object;
if (other.size() != size()) {
return false;
}
for (Iterator ... | public boolean equals(Object object) {
if (object == this) {
return true;
}
if (object instanceof Bag == false) {
return false;
}
Bag other = (Bag) object;
if (other.size() != size()) {
return false;
}
for (Iterator ... |
public boolean addAll(Collection coll) {
int size = map.size();
for (Iterator it = coll.iterator(); it.hasNext();) {
Object obj = (Object) it.next();
map.put(obj, dummyValue);
}
return (map.size() != size);
}
| public boolean addAll(Collection coll) {
int size = map.size();
for (Iterator it = coll.iterator(); it.hasNext();) {
Object obj = it.next();
map.put(obj, dummyValue);
}
return (map.size() != size);
}
|
public void execute(Tuple input) {
String result = (String) input.getValue(0);
String returnInfo = (String) input.getValue(1);
if(returnInfo!=null) {
Map retMap = (Map) JSONValue.parse(returnInfo);
String host = (String) retMap.get("host");
int port = (int... | public void execute(Tuple input) {
String result = (String) input.getValue(0);
String returnInfo = (String) input.getValue(1);
if(returnInfo!=null) {
Map retMap = (Map) JSONValue.parse(returnInfo);
String host = (String) retMap.get("host");
int port = (int... |
public void testDirectory() throws Exception {
// XXX: This test presumes the current working dir is the base dir of the source checkout.
IOFileFilter filter = new DirectoryFileFilter();
assertFiltering(filter, new File("src/"), true);
assertFiltering(filter, new File("src/java/"), ... | public void testDirectory() throws Exception {
// XXX: This test presumes the current working dir is the base dir of the source checkout.
IOFileFilter filter = new DirectoryFileFilter();
assertFiltering(filter, new File("src/"), true);
assertFiltering(filter, new File("src/main/java... |
public void start(StartContext context) throws StartException {
processState.setStarting();
String prettyVersion = environment.getProductConfig().getPrettyVersionString();
AS_ROOT_LOGGER.serverStarting(prettyVersion);
if (CONFIG_LOGGER.isDebugEnabled()) {
final Properti... | public void start(StartContext context) throws StartException {
processState.setStarting();
String prettyVersion = environment.getProductConfig().getPrettyVersionString();
AS_ROOT_LOGGER.serverStarting(prettyVersion);
if (CONFIG_LOGGER.isDebugEnabled()) {
final Properti... |
public double nextUniform(double lower, double upper) {
if (lower >= upper) {
throw new IllegalArgumentException
("lower bound must be <= upper bound");
}
RandomGenerator rand = getRan();
// ensure nextDouble() isn't 0.0
double u = rand.nextDouble();
... | public double nextUniform(double lower, double upper) {
if (lower >= upper) {
throw new IllegalArgumentException
("lower bound must be < upper bound");
}
RandomGenerator rand = getRan();
// ensure nextDouble() isn't 0.0
double u = rand.nextDouble();
... |
protected <P> void applyUpdate(UpdateContext updateContext, UpdateResultHandler<Object, P> resultHandler, P param) {
// [TODO] review what to do here
}
} | protected <P> void applyUpdate(final UpdateContext updateContext, final UpdateResultHandler<? super Object, P> handler, final P param) {
// [TODO] review what to do here
}
} |
private static void submitJar(Map conf) {
if(submittedJar==null) {
LOG.info("Jar not uploaded to master yet. Submitting jar...");
String localJar = System.getenv("STORM_JAR");
submittedJar = submitJar(conf, localJar);
} else {
LOG.info("Jar already upl... | private static void submitJar(Map conf) {
if(submittedJar==null) {
LOG.info("Jar not uploaded to master yet. Submitting jar...");
String localJar = System.getProperty("storm.jar");
submittedJar = submitJar(conf, localJar);
} else {
LOG.info("Jar alread... |
protected void checkValidity(java.util.List<Double> representation) throws InvalidRepresentationException {
for (double val : representation) {
if (val < 0 || val > 1) {
throw new InvalidRepresentationException("Values of representation must be in [0,1] interval");
}
... | protected void checkValidity(java.util.List<Double> representation) throws InvalidRepresentationException {
for (double val : representation) {
if (val < 0 || val > 1) {
throw new InvalidRepresentationException("Values of representation must be in [0,1] interval");
}
... |
boolean isCallerInRole(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 a full listing of ind... | boolean isCallerInRole(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 a full listing of ind... |
@Message(value = "Set system property jboss.bind.address.public to the given value")
String argPublicBindAddress();
| @Message(value = "Set system property jboss.bind.address to the given value")
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, 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... |
public void run() {
try {
serverInventory.stopServers(-1, true); // TODO graceful shutdown // TODO async
serverInventory = null;
client.getValue().setServerInventory(null);
} finally {
... | public void run() {
try {
serverInventory.stopServers(-1, true); // TODO graceful shutdown // TODO async
serverInventory = null;
// client.getValue().setServerInventory(null);
} finally {
... |
public List<ModelNode> getBootUpdates() {
//System.out.println("DOMAIN");
//System.out.println(domainModel);
//System.out.println("HOST");
//System.out.println(hostModel);
final String socketBindingRef = serverModel.get(SOCKET_BINDING_GROUP).asString();
List<ModelN... | public List<ModelNode> getBootUpdates() {
//System.out.println("DOMAIN");
//System.out.println(domainModel);
//System.out.println("HOST");
//System.out.println(hostModel);
final String socketBindingRef = serverModel.get(SOCKET_BINDING_GROUP).asString();
List<ModelN... |
public void testCreateNumber() {
// a lot of things can go wrong
assertEquals("createNumber(String) 1 failed", new Float("1234.5"), NumberUtils.createNumber("1234.5"));
assertEquals("createNumber(String) 2 failed", new Integer("12345"), NumberUtils.createNumber("12345"));
assertEqual... | public void testCreateNumber() {
// a lot of things can go wrong
assertEquals("createNumber(String) 1 failed", new Float("1234.5"), NumberUtils.createNumber("1234.5"));
assertEquals("createNumber(String) 2 failed", new Integer("12345"), NumberUtils.createNumber("12345"));
assertEqual... |
public void testShutdownSharedExecutorTask() throws InterruptedException {
ScheduledExecutorService service = EasyMock
.createMock(ScheduledExecutorService.class);
ScheduledFuture<?> future = EasyMock.createMock(ScheduledFuture.class);
prepareStartTimer(service, future);
... | public void testShutdownSharedExecutorTask() throws InterruptedException {
ScheduledExecutorService service = EasyMock
.createMock(ScheduledExecutorService.class);
ScheduledFuture<?> future = EasyMock.createMock(ScheduledFuture.class);
prepareStartTimer(service, future);
... |
public void startCallableProcessingWithAsyncTask() {
AsyncTaskExecutor executor = createMock(AsyncTaskExecutor.class);
expect(executor.submit((Runnable) notNull())).andReturn(null);
replay(executor);
this.asyncWebRequest.setTimeout(1000L);
this.asyncWebRequest.addTimeoutHandler(EasyMock.<Runnable>anyObject... | public void startCallableProcessingWithAsyncTask() {
AsyncTaskExecutor executor = createMock(AsyncTaskExecutor.class);
expect(executor.submit((Runnable) notNull())).andReturn(null);
replay(executor);
this.asyncWebRequest.setTimeout(1000L);
this.asyncWebRequest.addTimeoutHandler(EasyMock.<Runnable>anyObject... |
private final CharBuffer code = new CharBuffer(4);
/**
* Token is an internal token representation.
*
* It is used as contract between the lexer and the parser.
*/
class Token {
/** Token type, see TT_xxx constants. */
int type = TT_INVALID;
/** The content buffer. */
CharBuffer ... | private final CharBuffer code = new CharBuffer(4);
/**
* Token is an internal token representation.
*
* It is used as contract between the lexer and the parser.
*/
static class Token {
/** Token type, see TT_xxx constants. */
int type = TT_INVALID;
/** The content buffer. */
Char... |
public String resolveEmbeddedValue(String value) {
String result = value;
for (StringValueResolver resolver : this.embeddedValueResolvers) {
result = resolver.resolveStringValue(result);
}
return result;
}
| public String resolveEmbeddedValue(String value) {
String result = value;
for (StringValueResolver resolver : this.embeddedValueResolvers) {
result = (result == null ? null : resolver.resolveStringValue(result));
}
return result;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.