buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public interface ParametricUnivariateFunction {
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache ... | public interface ParametricUnivariateFunction {
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache ... |
public DfpField(final int decimalDigits, final boolean computeConstants) {
this.radixDigits = (decimalDigits + 3) / 4;
this.rMode = RoundingMode.ROUND_HALF_EVEN;
this.ieeeFlags = 0;
this.zero = new Dfp(this, 0);
this.one = new Dfp(this, 1);
thi... | public DfpField(final int decimalDigits, final boolean computeConstants) {
this.radixDigits = (decimalDigits < 13) ? 4 : (decimalDigits + 3) / 4;
this.rMode = RoundingMode.ROUND_HALF_EVEN;
this.ieeeFlags = 0;
this.zero = new Dfp(this, 0);
this.one = ne... |
public void write(byte b[], int offset, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
} else if (offset < 0 || len < 0 || offset + len < 0) {
throw new IndexOutOfBoundsException();
} else if (offset > b.length || offset + len > b.len... | public void write(byte b[], int offset, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
} else if (offset < 0 || len < 0) {
throw new IndexOutOfBoundsException();
} else if (offset > b.length || offset + len > b.length) {
t... |
private OSGiMetaData getModuleMetadata(Module module) throws IOException {
URL manifestURL = module.getClassLoader().getResource(JarFile.MANIFEST_NAME);
if (manifestURL != null) {
InputStream input = manifestURL.openStream();
try {
Manifest manifest = new Mani... | private OSGiMetaData getModuleMetadata(Module module) throws IOException {
URL manifestURL = module.getExportedResource(JarFile.MANIFEST_NAME);
if (manifestURL != null) {
InputStream input = manifestURL.openStream();
try {
Manifest manifest = new Manifest(inpu... |
public Object processInvocation(InterceptorContext invocation) throws Exception {
final EJBComponent component = (EJBComponent) invocation.getPrivateData(Component.class);
switch (txAttr) {
case MANDATORY:
return mandatory(invocation, component);
case NEVER:
... | public Object processInvocation(InterceptorContext invocation) throws Exception {
final EJBComponent component = (EJBComponent) invocation.getPrivateData(Component.class);
switch (txAttr) {
case MANDATORY:
return mandatory(invocation, component);
case NEVER:
... |
public void testUnescapeJava() throws IOException {
assertEquals(null, StringEscapeUtils.unescapeJava(null));
try {
StringEscapeUtils.unescapeJava(null, null);
fail();
} catch (IOException ex) {
fail();
} catch (IllegalArgumentException ex) {
... | public void testUnescapeJava() throws IOException {
assertEquals(null, StringEscapeUtils.unescapeJava(null));
try {
StringEscapeUtils.unescapeJava(null, null);
fail();
} catch (IOException ex) {
fail();
} catch (IllegalArgumentException ex) {
... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
// Check if we already have an OSGi deployment
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
BundleInfo info = BundleInfoAttachment.getBundleInfo(deploymentUnit);
... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
// Check if we already have an OSGi deployment
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
BundleInfo info = BundleInfoAttachment.getBundleInfo(deploymentUnit);
... |
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
// Check if we already have an OSGi deployment
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
Deployment deployment = OSGiDeploymentAttachment.getDeployment(depl... | public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
// Check if we already have an OSGi deployment
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
Deployment deployment = OSGiDeploymentAttachment.getDeployment(depl... |
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode recoveryEnvModel,
ServiceVerificationHandler verificationHandler,
List<ServiceController<?>> serviceControllers) throws OperationFailedException {
final... | protected void performRuntime(OperationContext context, ModelNode operation, ModelNode recoveryEnvModel,
ServiceVerificationHandler verificationHandler,
List<ServiceController<?>> serviceControllers) throws OperationFailedException {
final... |
public void beanMethodOverloadingWithoutInheritance() {
@SuppressWarnings({ "unused", "hiding" })
@Configuration class Config {
@Bean String aString() { return "na"; }
@Bean String aString(Integer dependency) { return "na"; }
}
try {
new AnnotationConfigApplicationContext(Config.class);
fail("expec... | public void beanMethodOverloadingWithoutInheritance() {
@SuppressWarnings({ "hiding" })
@Configuration class Config {
@Bean String aString() { return "na"; }
@Bean String aString(Integer dependency) { return "na"; }
}
try {
new AnnotationConfigApplicationContext(Config.class);
fail("expected bean m... |
public void handleEvent(EventRequest request, EventResponse response, Object handler) throws Exception {
Object returnValue = doHandle(request, response, handler);
if (returnValue != null) {
throw new IllegalStateException("Invalid action method return value: " + returnValue);
}
}
| public void handleEvent(EventRequest request, EventResponse response, Object handler) throws Exception {
Object returnValue = doHandle(request, response, handler);
if (returnValue != null) {
throw new IllegalStateException("Invalid event method return value: " + returnValue);
}
}
|
private static String execute(final Callable<String> task, final long timeout, final TimeUnit unit) throws TimeoutException, IOException {
final ExecutorService executor = Executors.newSingleThreadExecutor();
final Future<String> result = executor.submit(task);
try {
return resul... | private static String execute(final Callable<String> task, final long timeout, final TimeUnit unit) throws TimeoutException, IOException {
final ExecutorService executor = Executors.newSingleThreadExecutor();
final Future<String> result = executor.submit(task);
try {
return resul... |
public void addObservation(final double[] x, final double y) {
if ((!this.hasIntercept && x.length != nvars) ||
(this.hasIntercept && x.length + 1 != nvars)) {
throw new IllegalArgumentException("Length of regressor list is less that numberOfVariables");
}
if (!th... | public void addObservation(final double[] x, final double y) {
if ((!this.hasIntercept && x.length != nvars) ||
(this.hasIntercept && x.length + 1 != nvars)) {
throw new IllegalArgumentException("Length of regressor list is less that numberOfVariables");
}
if (!th... |
private StandaloneServer boot(final String[] args) {
StandaloneServer server = null;
try {
ServerEnvironment config = determineEnvironment(args, props);
if (config == null) {
abort(null);
} else {
if(config.isStandalone()) {
... | private StandaloneServer boot(final String[] args) {
StandaloneServer server = null;
try {
ServerEnvironment config = determineEnvironment(args, props);
if (config == null) {
abort(null);
} else {
if(config.isStandalone()) {
... |
public String toString() {
String parentID = (parentModuleID != null ? parentModuleID.getModuleID() : null);
return "[target=" + target.getName() + ",parent=" + parentID + ",id=" + moduleID + "]";
}
| public String toString() {
String parentID = (parentModuleID != null ? parentModuleID.getModuleID() : null);
return "[target=" + target.getName() + ",parent=" + parentID + ",type=" + moduleType+ ",id=" + moduleID + "]";
}
|
// not writable because (1) name is private (2) there is no setter, only a getter
evaluateAndCheckError("madeup", SpelMessages.PROPERTY_OR_FIELD_NOT_FOUND, 0, "madeup",
"org.springframework.expression.spel.testresources.Inventor");
}
| // not writable because (1) name is private (2) there is no setter, only a getter
evaluateAndCheckError("madeup", SpelMessages.PROPERTY_OR_FIELD_NOT_READABLE, 0, "madeup",
"org.springframework.expression.spel.testresources.Inventor");
}
|
public void testInvocationOnNullContextObject() {
evaluateAndCheckError("null.toString()",SpelMessages.ATTEMPTED_METHOD_CALL_ON_NULL_CONTEXT_OBJECT);
}
| public void testInvocationOnNullContextObject() {
evaluateAndCheckError("null.toString()",SpelMessages.METHOD_CALL_ON_NULL_OBJECT_NOT_ALLOWED);
}
|
package org.springframework.messaging.simp.user;
/*
* Copyright 2002-2013 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
*
* http://www.apache.org/lic... | package org.springframework.messaging.simp.user;
/*
* Copyright 2002-2013 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
*
* http://www.apache.org/lic... |
package org.springframework.messaging.simp.user;
package org.springframework.messaging.simp.handler;
import java.util.Set;
/**
* A registry for looking up active session id's by user.
*
* <p>Used in support of resolving unique session-specific user destinations.
* See {@link DefaultUserDestinationResolver} for m... | package org.springframework.messaging.simp.user;
package org.springframework.messaging.simp.user;
import java.util.Set;
/**
* A registry for looking up active session id's by user.
*
* <p>Used in support of resolving unique session-specific user destinations.
* See {@link DefaultUserDestinationResolver} for more... |
public void testAppendFixedWidthPadLeft() {
StrBuilder sb = new StrBuilder();
sb.appendFixedWidthPadLeft("foo", -1, '-');
assertEquals("", sb.toString());
sb.clear();
sb.appendFixedWidthPadLeft("foo", 0, '-');
assertEquals("", sb.toString());
sb.clear();
... | public void testAppendFixedWidthPadLeft() {
StrBuilder sb = new StrBuilder();
sb.appendFixedWidthPadLeft("foo", -1, '-');
assertEquals("", sb.toString());
sb.clear();
sb.appendFixedWidthPadLeft("foo", 0, '-');
assertEquals("", sb.toString());
sb.clear();
... |
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) {
final ServiceRegistry registry = context.getServiceRegistry(true);
final ModelNode address = operation.require(OP_ADDR);
PathAddress path = PathAddress.pathAddress(address);
final String ... | protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) {
final ServiceRegistry registry = context.getServiceRegistry(true);
final ModelNode address = operation.require(OP_ADDR);
PathAddress path = PathAddress.pathAddress(address);
final String ... |
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) {
final ServiceRegistry registry = context.getServiceRegistry(true);
final ModelNode address = operation.require(OP_ADDR);
PathAddress path = PathAddress.pathAddress(address);
final String ... | protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) {
final ServiceRegistry registry = context.getServiceRegistry(true);
final ModelNode address = operation.require(OP_ADDR);
PathAddress path = PathAddress.pathAddress(address);
final String ... |
Class<?>[] value() default {};
/*
* Copyright 2002-2011 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
*
* http://www.apache.org/licenses/LICENSE... | Class<?>[] value() default {};
/*
* Copyright 2002-2011 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
*
* http://www.apache.org/licenses/LICENSE... |
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
final ModelNode address = new ModelNode().set(SUBSYSTEM, SUBSYSTEM_NAME);;
String threadPoolName = null;
final int count = reader.getAttributeCount();
for (... | public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
final ModelNode address = new ModelNode().set(SUBSYSTEM, SUBSYSTEM_NAME);
String threadPoolName = null;
final int count = reader.getAttributeCount();
for (i... |
public Object intercept(InvocationContext context) throws Exception {
log.info("-----> Intercepting call to " + context.getMethod());
return context.proceed();
}
| public Object intercept(InvocationContext context) throws Exception {
log.info("-----> Intercepting call to " + context.getMethod());
return "#BeanWithSimpleInjected#" + context.proceed();
}
|
public Object intercept(InvocationContext context) throws Exception {
log.info("-----> Intercepting call to " + context.getMethod().getDeclaringClass() + "." + context.getMethod().getName() + "()");
return context.proceed();
}
| public Object intercept(InvocationContext context) throws Exception {
log.info("-----> Intercepting call to " + context.getMethod().getDeclaringClass() + "." + context.getMethod().getName() + "()");
return "#InterceptorBean#" + context.proceed();
}
|
private static void install(ServiceName name, int quorum, ServiceActivatorContext context) {
InjectedValue<ServerEnvironment> env = new InjectedValue<>();
MyService service = new MyService(env);
ServiceController<?> factoryService = context.getServiceRegistry().getRequiredService(SingletonSe... | private static void install(ServiceName name, int quorum, ServiceActivatorContext context) {
InjectedValue<ServerEnvironment> env = new InjectedValue<>();
MyService service = new MyService(env);
ServiceController<?> factoryService = context.getServiceRegistry().getRequiredService(SingletonSe... |
protected static void writeSlottedItem(final XMLExtendedStreamWriter writer, Element element, ContentModification modification) throws XMLStreamException {
writer.writeEmptyElement(element.name);
final ModuleItem item = (ModuleItem) modification.getItem();
final ModificationType type = mod... | protected static void writeSlottedItem(final XMLExtendedStreamWriter writer, Element element, ContentModification modification) throws XMLStreamException {
writer.writeEmptyElement(element.name);
final ModuleItem item = (ModuleItem) modification.getItem();
final ModificationType type = mod... |
public void testPreserveExisting() throws Exception {
// content-item 'two' replacing 'one', but kept 'four'
final RollbackInfo patch01 = createRollbackInfo("patch01", two, one, four, four);
// content-item 'three' replacing 'two'
final RollbackInfo patch02 = createRollbackInfo("pat... | public void testPreserveExisting() throws Exception {
// content-item 'two' replacing 'one', but kept 'four'
final RollbackInfo patch01 = createRollbackInfo("patch01", two, one, four, four);
// content-item 'three' replacing 'two'
final RollbackInfo patch02 = createRollbackInfo("pat... |
public void testModuleOverrideAndRollback() throws Exception {
final PatchingTestStepBuilder step = testModuleConflicts(policyBuilder().overrideAll().createPolicy());
rollback(step, ContentVerificationPolicy.STRICT);
}
| public void testModuleOverrideAndRollback() throws Exception {
final PatchingTestStepBuilder step = testModuleConflicts(policyBuilder().overrideAll().createPolicy());
rollback(step);
}
|
public ArArchiveEntry(File inputFile, String entryName) {
// TODO sort out mode
this(entryName, inputFile.isFile() ? inputFile.length() : 0,
0, 0, 0, inputFile.lastModified() / 1000);
}
| public ArArchiveEntry(File inputFile, String entryName) {
// TODO sort out mode
this(entryName, inputFile.isFile() ? inputFile.length() : 0,
0, 0, DEFAULT_MODE, inputFile.lastModified() / 1000);
}
|
private static ServiceName newServiceName(final String name) {
if(name == null) {
throw new IllegalArgumentException("Name must not be null");
}
return MBEAN_SERVICE_NAME_BASE.append(name);
}
| private static ServiceName newServiceName(final String name) {
if(name == null) {
throw SarMessages.MESSAGES.nullVar("name");
}
return MBEAN_SERVICE_NAME_BASE.append(name);
}
|
private ServiceRegistry getServiceRegistry() {
return getDeploymentUnitInjector().getValue().getServiceRegistry();
}
ServiceName getResourceAdapterServiceName() {
final Collection<ServiceName> serviceNames = ConnectorServices.getResourceAdapterServiceNames(this.resourceAdapterName);
... | private ServiceRegistry getServiceRegistry() {
return getDeploymentUnitInjector().getValue().getServiceRegistry();
}
ServiceName getResourceAdapterServiceName() {
final Collection<ServiceName> serviceNames = ConnectorServices.getResourceAdapterDependencies(this.resourceAdapterName);
... |
public static MixedDomainTestSupport create(String testClass, Version.AsVersion version) throws Exception {
OldVersionCopier oldVersionCopier = OldVersionCopier.expandOldVersions();
File dir = oldVersionCopier.getVersionDir(version);
return new MixedDomainTestSupport(testClass, "master-conf... | public static MixedDomainTestSupport create(String testClass, Version.AsVersion version) throws Exception {
OldVersionCopier oldVersionCopier = OldVersionCopier.expandOldVersion(version);
File dir = oldVersionCopier.getVersionDir(version);
return new MixedDomainTestSupport(testClass, "maste... |
private PropertyTokenHolder getPropertyNameTokens(String propertyName) {
PropertyTokenHolder tokens = new PropertyTokenHolder();
String actualName = null;
List keys = new ArrayList(2);
int searchIndex = 0;
while (searchIndex != -1) {
int keyStart = propertyName.indexOf(PROPERTY_KEY_PREFIX, searchIndex);
... | private PropertyTokenHolder getPropertyNameTokens(String propertyName) {
PropertyTokenHolder tokens = new PropertyTokenHolder();
String actualName = null;
List<String> keys = new ArrayList<String>(2);
int searchIndex = 0;
while (searchIndex != -1) {
int keyStart = propertyName.indexOf(PROPERTY_KEY_PREFIX,... |
protected String[] determineUrlsForHandler(String beanName) {
List urls = new ArrayList();
if (beanName.startsWith("/")) {
urls.add(beanName);
}
String[] aliases = getApplicationContext().getAliases(beanName);
for (int i = 0; i < aliases.length; i++) {
if (aliases[i].startsWith("/")) {
urls.add(ali... | protected String[] determineUrlsForHandler(String beanName) {
List<String> urls = new ArrayList<String>();
if (beanName.startsWith("/")) {
urls.add(beanName);
}
String[] aliases = getApplicationContext().getAliases(beanName);
for (int i = 0; i < aliases.length; i++) {
if (aliases[i].startsWith("/")) {
... |
public static String registerWithGeneratedName(
AbstractBeanDefinition definition, BeanDefinitionRegistry registry)
throws BeanDefinitionStoreException {
String generatedName = generateBeanName(definition, registry, false);
registry.registerBeanDefinition(generatedName, definition);
return generatedName;
... | public static String registerWithGeneratedName(
BeanDefinition definition, BeanDefinitionRegistry registry)
throws BeanDefinitionStoreException {
String generatedName = generateBeanName(definition, registry, false);
registry.registerBeanDefinition(generatedName, definition);
return generatedName;
}
|
@Target(ElementType.TYPE)
/*
* Copyright 2002-2009 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
*
* http://www.apache.org/licenses/LICENSE-2.0
... | @Target(ElementType.TYPE)
/*
* Copyright 2002-2009 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
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext) {
return TxNamespaceHandler.DEFAULT_TRANSACTION_MANAGER_BEAN_NAME;
}
| protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext) {
return TxAnnotationDriven.DEFAULT_TRANSACTION_MANAGER_BEAN_NAME;
}
|
protected void execute(DeploymentProcessorTarget processorTarget) {
ROOT_LOGGER.debug("Adding EJB IIOP support");
processorTarget.addDeploymentProcessor(Phase.POST_MODULE, Phase.POST_MODULE_EJB_IIOP, new EjbIIOPDeploymentUnitProcessor(settingsService));
}
... | protected void execute(DeploymentProcessorTarget processorTarget) {
ROOT_LOGGER.debug("Adding EJB IIOP support");
processorTarget.addDeploymentProcessor(EJB3Extension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_EJB_IIOP, new EjbIIOPDeploymentUnitProcessor(setting... |
public void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SimpleSubsystemDeploymentProcessor.PHASE, SimpleSubsystemDeploymentProcessor.PRIORITY, new SimpleSubsystemDeploymentProcessor());
}
}, OperationContext.Stage.RUNTIME);
... | public void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SimpleSubsystemExtension.SUBSYSTEM_NAME, SimpleSubsystemDeploymentProcessor.PHASE, SimpleSubsystemDeploymentProcessor.PRIORITY, new SimpleSubsystemDeploymentProcessor());
}
... |
public void start(final Deployment dep) {
if (WSHelper.isJseDeployment(dep)) {
this.log.debug("Creating JBoss agnostic JSE meta data for deployment: " + dep.getSimpleName());
if (WSHelper.hasAttachment(dep, JBossWebMetaData.class)) {
final JSEArchiveMetaData jseMetaDa... | public void start(final Deployment dep) {
if (WSHelper.isJseDeployment(dep)) {
this.log.debug("Creating JBoss agnostic JSE meta data for deployment: " + dep.getSimpleName());
if (WSHelper.hasAttachment(dep, JBossWebMetaData.class)) {
final JSEArchiveMetaData jseMetaDa... |
@Test public void testIdentityPredicate() {
assertSame(nullPredicate(), PredicateUtils.identityPredicate(null));
assertNotNull(PredicateUtils.identityPredicate(Integer.valueOf(6)));
assertEquals(false, PredicateUtils.identityPredicate(Integer.valueOf(6)).evaluate(null));
assertEquals... | @Test public void testIdentityPredicate() {
assertSame(nullPredicate(), PredicateUtils.identityPredicate(null));
assertNotNull(PredicateUtils.identityPredicate(Integer.valueOf(6)));
assertEquals(false, PredicateUtils.identityPredicate(Integer.valueOf(6)).evaluate(null));
assertEquals... |
private RuntimeBeanReference getValidator(Element element, Object source, ParserContext parserContext) {
if (element.hasAttribute("validator")) {
return new RuntimeBeanReference(element.getAttribute("validator"));
}
else if (javaxValidationPresent) {
RootBeanDefinition validatorDef = new RootBeanDefinition... | private RuntimeBeanReference getValidator(Element element, Object source, ParserContext parserContext) {
if (element.hasAttribute("validator")) {
return new RuntimeBeanReference(element.getAttribute("validator"));
}
else if (javaxValidationPresent) {
RootBeanDefinition validatorDef = new RootBeanDefinition... |
private void writeHiddenFields(Map<String, String> hiddenFields) throws JspException {
if (hiddenFields != null) {
for (String name : hiddenFields.keySet()) {
this.tagWriter.appendValue("<input type=\"hidden\" ");
this.tagWriter.appendValue("name=\"" + name + "\" value=\"" + hiddenFields.get(name) + "\" "... | private void writeHiddenFields(Map<String, String> hiddenFields) throws JspException {
if (hiddenFields != null) {
for (String name : hiddenFields.keySet()) {
this.tagWriter.appendValue("<input type=\"hidden\" ");
this.tagWriter.appendValue("name=\"" + name + "\" value=\"" + hiddenFields.get(name) + "\">"... |
private volatile long startTime;
ApplicationServerService(final List<ServiceActivator> extraServices, final Bootstrap.Configuration configuration) {
this.extraServices = extraServices;
this.configuration = configuration;
runningModeControl = new RunningModeControl(configuration.getServe... | private volatile long startTime;
ApplicationServerService(final List<ServiceActivator> extraServices, final Bootstrap.Configuration configuration) {
this.extraServices = extraServices;
this.configuration = configuration;
runningModeControl = configuration.getRunningModeControl();
... |
public CoarseSessionEntry<L> findValue(String id) {
TransactionConfiguration transaction = this.sessionCache.getCacheConfiguration().transaction();
boolean pessimistic = transaction.transactionMode().isTransactional() && (transaction.lockingMode() == LockingMode.PESSIMISTIC);
Cache<String, C... | public CoarseSessionEntry<L> findValue(String id) {
TransactionConfiguration transaction = this.sessionCache.getCacheConfiguration().transaction();
boolean pessimistic = transaction.transactionMode().isTransactional() && (transaction.lockingMode() == LockingMode.PESSIMISTIC);
Cache<String, C... |
public List<JdrCommand> getCommands() throws Exception {
Sanitizer xmlSanitizer = Sanitizers.xml("//password");
Sanitizer passwordSanitizer = Sanitizers.pattern("password=.*", "password=*");
return Arrays.asList(
new TreeCommand(),
new JarCheck(),
new Cal... | public List<JdrCommand> getCommands() throws Exception {
Sanitizer xmlSanitizer = Sanitizers.xml("//password");
Sanitizer passwordSanitizer = Sanitizers.pattern("password=.*", "password=*");
return Arrays.asList(
new TreeCommand(),
new JarCheck(),
new Cal... |
protected Pointcut buildPointcut(Set<Class<? extends Annotation>> asyncAnnotationTypes) {
ComposablePointcut result = null;
for (Class<? extends Annotation> asyncAnnotationType : asyncAnnotationTypes) {
Pointcut cpc = new AnnotationMatchingPointcut(asyncAnnotationType, true);
Pointcut mpc = new AnnotationMat... | protected Pointcut buildPointcut(Set<Class<? extends Annotation>> asyncAnnotationTypes) {
ComposablePointcut result = null;
for (Class<? extends Annotation> asyncAnnotationType : asyncAnnotationTypes) {
Pointcut cpc = new AnnotationMatchingPointcut(asyncAnnotationType, true);
Pointcut mpc = AnnotationMatchin... |
public MediaType(String type, String subtype, Charset charSet) {
this(type, subtype, Collections.singletonMap(PARAM_CHARSET, charSet.toString()));
}
| public MediaType(String type, String subtype, Charset charSet) {
this(type, subtype, Collections.singletonMap(PARAM_CHARSET, charSet.name()));
}
|
public void activate(final BootUpdateContext updateContext) {
updateContext.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_OSGI_MANIFEST, new OSGiManifestParseProcessor());
updateContext.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_OSGI_BUNDLE_INFO, new OSGiBundleInfoParseProcessor());
u... | public void activate(final BootUpdateContext updateContext) {
updateContext.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_OSGI_MANIFEST, new OSGiManifestStructureProcessor());
updateContext.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_OSGI_BUNDLE_INFO, new OSGiBundleInfoParseProcessor()... |
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
// Because we use child resources in a read-only manner to configure the cache, replace t... | protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
// Because we use child resources in a read-only manner to configure the cache, replace t... |
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
// Because we use child resources in a read-only manner to configure the cache container,... | protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
// Because we use child resources in a read-only manner to configure the cache container,... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
// we only process top level deployment units
if (deploymentUnit.getParent() != null) {
return;
}
... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
// we only process top level deployment units
if (deploymentUnit.getParent() != null) {
return;
}
... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
// get hold of the deployment unit
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
final ModuleSpeci... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
// get hold of the deployment unit
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
final ModuleSpeci... |
protected void setUp() throws Exception {
this.targetClass = Foo.class;
this.methods = new String[] {"a", "b", "b2", "b3", "c", "d", "d2", "d3", "e", "e2", "e3"};
this.expectedResults = new Class[] {
Integer.class, null, null, Set.class, null, Integer.class,
Integer.class, Integer.class, Integer.class, Int... | protected void setUp() throws Exception {
this.targetClass = Foo.class;
this.methods = new String[] {"a", "b", "b2", "b3", "c", "d", "d2", "d3", "e", "e2", "e3"};
this.expectedResults = new Class[] {
Integer.class, null, Set.class, Set.class, null, Integer.class,
Integer.class, Integer.class, Integer.class... |
public double value(final double t) throws FunctionEvaluationException {
try {
interpolator.setInterpolatedTime(t);
return handler.g(t, interpolator.getInterpolatedState());
} ... | public double value(final double t) throws FunctionEvaluationException {
try {
interpolator.setInterpolatedTime(t);
return handler.g(t, interpolator.getInterpolatedState());
} ... |
private void handleResponse(ManagementResponseHeader header, DataInput input) throws IOException {
ManagementResponseHandler<?> responseHandler = responseHandlers.get(header.getResponseId());
if (responseHandler == null) {
throw new IOException("No response handler for re... | private void handleResponse(ManagementResponseHeader header, DataInput input) throws IOException {
ManagementResponseHandler<?> responseHandler = responseHandlers.get(header.getResponseId());
if (responseHandler == null) {
throw new IOException("No response handler for re... |
public void testAdjustToLong() {
assertEquals((long) Integer.MAX_VALUE,
ZipArchiveOutputStream.adjustToLong(Integer.MAX_VALUE));
assertEquals(((long) Integer.MAX_VALUE) + 1,
ZipArchiveOutputStream.adjustToLong(Integer.MAX_VALUE + 1));
assertEquals(2 ... | public void testAdjustToLong() {
assertEquals(Integer.MAX_VALUE,
ZipArchiveOutputStream.adjustToLong(Integer.MAX_VALUE));
assertEquals(((long) Integer.MAX_VALUE) + 1,
ZipArchiveOutputStream.adjustToLong(Integer.MAX_VALUE + 1));
assertEquals(2 * ((lon... |
@Message(id = 14261, value = "Failed to reinstate timer '%s' (id=%s) from its persistent state")
/*
*
* * 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 ... | @Message(id = 14261, value = "Failed to reinstate timer '%s' (id=%s) from its persistent state")
/*
*
* * 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 ... |
package org.springframework.web.socket.config;
/*
* Copyright 2002-2013 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
*
* http://www.apache.org/licen... | package org.springframework.web.socket.config;
/*
* Copyright 2002-2013 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
*
* http://www.apache.org/licen... |
package org.springframework.web.socket.config;
/*
* Copyright 2002-2013 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
*
* http://www.apache.org/licen... | package org.springframework.web.socket.config;
/*
* Copyright 2002-2013 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
*
* http://www.apache.org/licen... |
package org.springframework.web.socket.config;
/*
* Copyright 2002-2013 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
*
* http://www.apache.org/licen... | package org.springframework.web.socket.config;
/*
* Copyright 2002-2013 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
*
* http://www.apache.org/licen... |
package org.springframework.web.socket.config;
/*
* Copyright 2002-2013 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
*
* http://www.apache.org/licen... | package org.springframework.web.socket.config;
/*
* Copyright 2002-2013 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
*
* http://www.apache.org/licen... |
import org.springframework.web.socket.config.SockJsServiceRegistration;
/*
* Copyright 2002-2013 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... | import org.springframework.web.socket.config.SockJsServiceRegistration;
/*
* Copyright 2002-2013 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 byte getType() {
return ManagementProtocol.TYPE_PONG;
}
| public byte getType() {
return ManagementProtocol.TYPE_PING;
}
|
public byte getType() {
return ManagementProtocol.TYPE_PING;
}
| public byte getType() {
return ManagementProtocol.TYPE_PONG;
}
|
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(LoggingSubsystemProviders.SUBSYSTEM);
registration.registerOperationHandl... | public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(LoggingSubsystemProviders.SUBSYSTEM);
registration.registerOperationHandl... |
boolean matches(Class<?> clazz);
/*
* Copyright 2002-2007 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
*
* http://www.apache.org/licenses/LICEN... | boolean matches(Class<?> clazz);
/*
* Copyright 2002-2007 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
*
* http://www.apache.org/licenses/LICEN... |
public void prepare(Map config, TopologyContext context, OutputCollector collector) {
TimeCacheMap.ExpiredCallback<Object, TrackingInfo> callback = null;
if(_delegate instanceof TimeoutCallback) {
callback = new TimeoutItems();
}
_tracked = new TimeCacheMap<Object, Tracki... | public void prepare(Map config, TopologyContext context, OutputCollector collector) {
TimeCacheMap.ExpiredCallback<Object, TrackingInfo> callback = null;
if(_delegate instanceof TimeoutCallback) {
callback = new TimeoutItems();
}
_tracked = new TimeCacheMap<Object, Tracki... |
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
nameValidator.validate(operation);
final String attributeName = operation.require(NAME).asString();
final ModelNode submodel = context.readResource(PathAddress.EMPTY_ADDRESS).getModel();
... | public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
this.nameValidator.validate(operation);
final String attributeName = operation.require(NAME).asString();
final ModelNode submodel = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(... |
public void registerChildren(ManagementResourceRegistration registration) {
super.registerChildren(registration);
registration.registerSubModel(new StateTransferResourceDefinition());
registration.registerSubModel(new BackupSiteResource(isRuntimeRegistration()));
registration.regist... | public void registerChildren(ManagementResourceRegistration registration) {
super.registerChildren(registration);
registration.registerSubModel(new StateTransferResourceDefinition());
registration.registerSubModel(new BackupSiteResourceDefinition(this.runtimeRegistration));
registra... |
public Interceptor create(InterceptorFactoryContext context) {
final Interceptor[] interceptors = new Interceptor[interceptorFactories.size()];
final Iterator<InterceptorFactory> factories = interceptorFactories.iterator();
for (int i = 0; i < interceptors.len... | public Interceptor create(InterceptorFactoryContext context) {
final Interceptor[] interceptors = new Interceptor[interceptorFactories.size()];
final Iterator<InterceptorFactory> factories = interceptorFactories.iterator();
for (int i = 0; i < interceptors.len... |
public Integer call() {
for (int i = 0; i < REPEAT; i++) {
// Calls ToStringStyle
new ToStringBuilder(holder).append(holder.collection);
}
return REPEAT;
}
};
Collection<Callable<Integer>> tas... | public Integer call() {
for (int i = 0; i < REPEAT; i++) {
// Calls ToStringStyle
new ToStringBuilder(holder).append(holder.collection);
}
return Integer.valueOf(REPEAT);
}
};
Collection<Calla... |
protected Integer initialize() throws Exception {
if (ex != null) {
throw ex;
}
if (shouldSleep) {
Thread.sleep(60000L);
}
return ++initializeCalls;
}
}
| protected Integer initialize() throws Exception {
if (ex != null) {
throw ex;
}
if (shouldSleep) {
Thread.sleep(60000L);
}
return Integer.valueOf(++initializeCalls);
}
}
|
protected Integer initialize() throws Exception {
currentExecutor = getActiveExecutor();
initializeCalls++;
if (ex != null) {
throw ex;
}
return initializeCalls;
}
}
| protected Integer initialize() throws Exception {
currentExecutor = getActiveExecutor();
initializeCalls++;
if (ex != null) {
throw ex;
}
return Integer.valueOf(initializeCalls);
}
}
|
public void testParseSubsystem() throws Exception {
//Parse the subsystem xml into operations
List<ModelNode> operations = super.parse(SUBSYSTEM_XML);
///Check that we have the expected number of operations
Assert.assertEquals(6, operations.size());
}
| public void testParseSubsystem() throws Exception {
//Parse the subsystem xml into operations
List<ModelNode> operations = super.parse(SUBSYSTEM_XML);
///Check that we have the expected number of operations
Assert.assertEquals(1, operations.size());
}
|
public Object processInvocation(InterceptorContext invocation) throws Exception {
final EJBComponent component = (EJBComponent) invocation.getPrivateData(Component.class);
switch (txAttr) {
case MANDATORY:
return mandatory(invocation, component);
case NEVER:
... | public Object processInvocation(InterceptorContext invocation) throws Exception {
final EJBComponent component = (EJBComponent) invocation.getPrivateData(Component.class);
switch (txAttr) {
case MANDATORY:
return mandatory(invocation, component);
case NEVER:
... |
public void checkModifiedTimeStamp() {
long currentTime = new Date().getTime();
long oneMinuteAgo = currentTime - (1000 * 60);
servletRequest.setMethod("GET");
servletRequest.addHeader("If-Modified-Since", oneMinuteAgo);
request.checkNotModified(currentTime);
assertEquals(200, servletResponse.getStatus(... | public void checkModifiedTimeStamp() {
long currentTime = new Date().getTime();
long oneMinuteAgo = currentTime - (1000 * 60);
servletRequest.setMethod("GET");
servletRequest.addHeader("If-Modified-Since", oneMinuteAgo);
request.checkNotModified(currentTime);
assertEquals(200, servletResponse.getStatus(... |
private ResultAction executeStep(final Step step) {
PathAddress oldModelAddress = modelAddress;
ModelNode oldOperation = operation;
ModelNode oldResponse = this.response;
StampHolder oldRestartStamp = restartStampHolder;
Stage stepStage = null;
ModelNode response = nu... | private ResultAction executeStep(final Step step) {
PathAddress oldModelAddress = modelAddress;
ModelNode oldOperation = operation;
ModelNode oldResponse = this.response;
StampHolder oldRestartStamp = restartStampHolder;
Stage stepStage = null;
ModelNode response = nu... |
RealMatrix getR();
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the ... | RealMatrix getR();
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the ... |
@Message(id = 14356, value = "Not a business method %s. Do not call non-public methods on EJB's")
EJBException failToCallBusinessOnNonePublicMethod(Method method);
/**
* Creates an exception indicating component instance isn't available for invocation
*
* @return a {@link Exception} for the ... | @Message(id = 14356, value = "Not a business method %s. Do not call non-public methods on EJB's")
EJBException failToCallBusinessOnNonePublicMethod(Method method);
/**
* Creates an exception indicating component instance isn't available for invocation
*
* @return a {@link Exception} for the ... |
public void run() {
RandomAccessFile reader = null;
try {
long last = 0; // The last time the file was checked for changes
long position = 0; // position within the file
// Open the file
while (run && reader == null) {
try {
... | public void run() {
RandomAccessFile reader = null;
try {
long last = 0; // The last time the file was checked for changes
long position = 0; // position within the file
// Open the file
while (run && reader == null) {
try {
... |
private static final Set<String> STANDARD_ROLES;
static {
Set<String> stdRoles = new LinkedHashSet<String>();
for (StandardRole stdRole : StandardRole.values()) {
stdRoles.add(stdRole.toString());
}
STANDARD_ROLES = stdRoles;
}
| private static final Set<String> STANDARD_ROLES;
static {
Set<String> stdRoles = new LinkedHashSet<String>();
for (StandardRole stdRole : StandardRole.values()) {
stdRoles.add(stdRole.getFormalName());
}
STANDARD_ROLES = stdRoles;
}
|
protected Resource getResource(PathAddress resourceAddress, Resource rootResource, ModelNode resourceModel,
OperationContext context, List<ModelNode> addOps) {
if(resourceAddress.size() == 0) {
return rootResource;
}
boolean allowCreate = true;
... | protected Resource getResource(PathAddress resourceAddress, Resource rootResource, ModelNode resourceModel,
OperationContext context, List<ModelNode> addOps) {
if(resourceAddress.size() == 0) {
return rootResource;
}
boolean allowCreate = true;
... |
public static void checkNotNaN(final double[] in)
throws NotStrictlyPositiveException {
for(int i = 0; i < in.length; i++) {
if (Double.isNaN(in[i])) {
throw new NotANumberException();
}
}
}
| public static void checkNotNaN(final double[] in)
throws NotANumberException {
for(int i = 0; i < in.length; i++) {
if (Double.isNaN(in[i])) {
throw new NotANumberException();
}
}
}
|
public void supportedReturnTypesInDefaultResolutionMode() throws Exception {
processor = new ModelAttributeMethodProcessor(true);
assertTrue(processor.supportsReturnType(returnParamNamedModelAttr));
assertFalse(processor.supportsReturnType(returnParamNonSimpleType));
}
| public void supportedReturnTypesInDefaultResolutionMode() throws Exception {
processor = new ModelAttributeMethodProcessor(true);
assertTrue(processor.supportsReturnType(returnParamNamedModelAttr));
assertTrue(processor.supportsReturnType(returnParamNonSimpleType));
}
|
package org.jboss.as.configadmin.service;
/*
* 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; you c... | package org.jboss.as.configadmin.service;
/*
* 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; you c... |
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException {
TypedValue context = state.getActiveContextObject();
Object targetObject = context.getValue();
TypeDescriptor targetObjectTypeDescriptor = context.getTypeDescriptor();
TypedValue indexValue = null;
Object index = null;
... | public TypedValue getValueInternal(ExpressionState state) throws EvaluationException {
TypedValue context = state.getActiveContextObject();
Object targetObject = context.getValue();
TypeDescriptor targetObjectTypeDescriptor = context.getTypeDescriptor();
TypedValue indexValue = null;
Object index = null;
... |
public static RegistrationPolicy valueOf(int registrationBehavior) {
switch (registrationBehavior) {
case MBeanRegistrationSupport.REGISTRATION_IGNORE_EXISTING:
return RegistrationPolicy.IGNORE_EXISTING;
case MBeanRegistrationSupport.REGISTRATION_REPLACE_EXISTING:
return RegistrationPolicy.REPLACE_EXIS... | public enum RegistrationPolicy {
/**
* Registration should fail when attempting to register an MBean under a name that
* already exists.
*/
FAIL_ON_EXISTING,
/**
* Registration should ignore the affected MBean when attempting to register an MBean
* under a name that already exists.
*/
IGNORE_EXISTING,... |
protected List<String> parseRolesAttribute(final XMLExtendedStreamReader reader, int index) throws XMLStreamException {
return reader.getListAttributeValue(index);
}
static void processConnectors(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> updates) throws XM... | protected List<String> parseRolesAttribute(final XMLExtendedStreamReader reader, int index) throws XMLStreamException {
return reader.getListAttributeValue(index);
}
static void processConnectors(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> updates) throws XM... |
private void parseRemoteOutboundConnection(final XMLExtendedStreamReader reader, final ModelNode parentAddress, final List<ModelNode> operations) throws XMLStreamException {
final EnumSet<Attribute> required = EnumSet.of(Attribute.NAME, Attribute.OUTBOUND_SOCKET_BINDING_REF);
final int count = reade... | private void parseRemoteOutboundConnection(final XMLExtendedStreamReader reader, final ModelNode parentAddress, final List<ModelNode> operations) throws XMLStreamException {
final EnumSet<Attribute> required = EnumSet.of(Attribute.NAME, Attribute.OUTBOUND_SOCKET_BINDING_REF);
final int count = reade... |
protected ServerSubsystemAdd getServerModelUpdate() {
return null;
}
| protected ServerSubsystemAdd getServerModelUpdate() {
return new ServerSubsystemAdd(namespaceUri);
}
|
public void prepare(Map config, TopologyContext context, OutputCollector collector) {
_tracked = new TimeCacheMap<Object, TrackingInfo>(Utils.toInteger(config.get(Config.TOPOLOGY_MESSAGE_TIMEOUT_SECS)));
_collector = collector;
| public void prepare(Map config, TopologyContext context, OutputCollector collector) {
_tracked = new TimeCacheMap<Object, TrackingInfo>(Utils.getInt(config.get(Config.TOPOLOGY_MESSAGE_TIMEOUT_SECS)));
_collector = collector;
|
public TestHost(String name, List<String> aliases, UndertowService service, Server server) {
super(name, aliases);
this.getUndertowService().inject(service);
this.getServerInjection().inject(server);
}
| public TestHost(String name, List<String> aliases, UndertowService service, Server server) {
super(name, aliases, "ROOT.war");
this.getUndertowService().inject(service);
this.getServerInjection().inject(server);
}
|
public void testFullBagCompatibility() throws IOException, ClassNotFoundException {
// test to make sure the canonical form has been preserved
Bag<T> bag = makeObject();
bag.add((T) "A");
bag.add((T) "A");
bag.add((T) "B");
bag.add((T) "B");
bag.add((T) "C");
... | public void testFullBagCompatibility() throws IOException, ClassNotFoundException {
// test to make sure the canonical form has been preserved
Bag<T> bag = makeObject();
bag.add((T) "A");
bag.add((T) "A");
bag.add((T) "B");
bag.add((T) "B");
bag.add((T) "C");
... |
public void setupFrameworkServices(final BatchBuilder batchBuilder) {
batchBuilder.addService(MBeanServerService.SERVICE_NAME, new MBeanServerService());
TestBundleManagerService.addService(batchBuilder);
FrameworkService.addService(batchBuilder, null);
PackageAdminService.addService... | public void setupFrameworkServices(final BatchBuilder batchBuilder) {
batchBuilder.addService(MBeanServerService.SERVICE_NAME, new MBeanServerService());
TestBundleManagerService.addService(batchBuilder);
FrameworkService.addService(batchBuilder, Mode.IMMEDIATE);
PackageAdminService.... |
public SparseRealMatrix(int rowDimension, int columnDimension) {
super(rowDimension, columnDimension);
this.rowDimension = rowDimension;
this.columnDimension = columnDimension;
this.entries = new OpenIntToDoubleHashMap();
}
| public SparseRealMatrix(int rowDimension, int columnDimension) {
super(rowDimension, columnDimension);
this.rowDimension = rowDimension;
this.columnDimension = columnDimension;
this.entries = new OpenIntToDoubleHashMap(0.0);
}
|
public String encode(String source) {
String txt = source;
if (txt == null || txt.length() == 0) {
return SIX_1;
}
// 1. Convert to lowercase
txt = txt.toLowerCase(java.util.Locale.ENGLISH);
// 2. Remove anything not A-Z
txt = txt.replaceAll("[^a... | public String encode(final String source) {
String txt = source;
if (txt == null || txt.length() == 0) {
return SIX_1;
}
// 1. Convert to lowercase
txt = txt.toLowerCase(java.util.Locale.ENGLISH);
// 2. Remove anything not A-Z
txt = txt.replaceAl... |
public String encode(String source) {
String txt = source;
if (txt == null || txt.length() == 0) {
return TEN_1;
}
// 1. Convert to lowercase
txt = txt.toLowerCase(java.util.Locale.ENGLISH);
// 2. Remove anything not A-Z
txt = txt.replaceAll("[^a... | public String encode(final String source) {
String txt = source;
if (txt == null || txt.length() == 0) {
return TEN_1;
}
// 1. Convert to lowercase
txt = txt.toLowerCase(java.util.Locale.ENGLISH);
// 2. Remove anything not A-Z
txt = txt.replaceAl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.